diff --git a/index.html b/index.html index 143f8307..853b34ea 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Pro React
\ No newline at end of file +Pro React
\ No newline at end of file diff --git a/static/js/3971.ca5531f7a8430d763cc8.js b/static/js/3971.20c5a168732a0363e328.js similarity index 96% rename from static/js/3971.ca5531f7a8430d763cc8.js rename to static/js/3971.20c5a168732a0363e328.js index 63c3ed52..3c8e9126 100644 --- a/static/js/3971.ca5531f7a8430d763cc8.js +++ b/static/js/3971.20c5a168732a0363e328.js @@ -1,8 +1,8 @@ -(self.webpackChunkpro_react_admin=self.webpackChunkpro_react_admin||[]).push([[3971],{43224:function(Rt,rt,E){"use strict";E.r(rt),E.d(rt,{default:function(){return VM}});var st={};E.r(st),E.d(st,{Axis:function(){return X._0},ChartView:function(){return X.OZ},ComponentModel:function(){return X.jT},ComponentView:function(){return X.bR},List:function(){return X.B8},Model:function(){return X.Kx},PRIORITY:function(){return X.FQ},SeriesModel:function(){return X.rP},color:function(){return X.yW},connect:function(){return X.Ng},dataTool:function(){return X.p5},dependencies:function(){return X.El},disConnect:function(){return X.zm},disconnect:function(){return X.Zf},dispose:function(){return X.AS},env:function(){return X._K},extendChartView:function(){return X.yX},extendComponentModel:function(){return X.rt},extendComponentView:function(){return X.NO},extendSeriesModel:function(){return X.NA},format:function(){return X.GP},getCoordinateSystemDimensions:function(){return X.Bo},getInstanceByDom:function(){return X.FP},getInstanceById:function(){return X.aQ},getMap:function(){return X.ZB},graphic:function(){return X.fA},helper:function(){return X.dw},init:function(){return X.Ts},innerDrawElementOnCanvas:function(){return X.UU},matrix:function(){return X.UP},number:function(){return X.ai},parseGeoJSON:function(){return X.l3},parseGeoJson:function(){return X.zI},registerAction:function(){return X.OH},registerCoordinateSystem:function(){return X.pX},registerLayout:function(){return X.Oh},registerLoading:function(){return X.Ej},registerLocale:function(){return X.E},registerMap:function(){return X.mz},registerPostInit:function(){return X.cf},registerPostUpdate:function(){return X.tb},registerPreprocessor:function(){return X.lP},registerProcessor:function(){return X.qg},registerTheme:function(){return X.bf},registerTransform:function(){return X.iY},registerUpdateLifecycle:function(){return X.xV},registerVisual:function(){return X.AF},setCanvasCreator:function(){return X.vV},setPlatformAPI:function(){return X.Gs},throttle:function(){return X.nF},time:function(){return X.kB},use:function(){return X.Yx},util:function(){return X.ZS},vector:function(){return X.i1},version:function(){return X.rE},zrUtil:function(){return X.F_},zrender:function(){return X.nd}});var pt=E(31635),Y=E(3087),X=E(30990),dt=E(73098),p=E(98026),Ft=E(15727),gt=E(57861),ht=E(53479),It=E(29571),vt=E(29308),ie=E(56448),ee=E(59741);function Te(a,e,t){var r=ee.yh.createCanvas(),i=e.getWidth(),n=e.getHeight(),o=r.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=n+"px",r.setAttribute("data-zr-dom-id",a)),r.width=i*t,r.height=n*t,r}var ne=function(a){(0,Ft.C6)(e,a);function e(t,r,i){var n=a.call(this)||this;n.motionBlur=!1,n.lastFrameAlpha=.7,n.dpr=1,n.virtual=!1,n.config={},n.incremental=!1,n.zlevel=0,n.maxRepaintRectCount=5,n.__dirty=!0,n.__firstTimePaint=!0,n.__used=!1,n.__drawIndex=0,n.__startIndex=0,n.__endIndex=0,n.__prevStartIndex=null,n.__prevEndIndex=null;var o;i=i||dt.Y5,typeof t=="string"?o=Te(t,r,i):p.isObject(t)&&(o=t,t=o.id),n.id=t,n.dom=o;var s=o.style;return s&&(p.disableUserSelect(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),n.painter=r,n.dpr=i,n}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Te("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,r,i,n){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new vt.A(0,0,0,0);function h(S){if(!(!S.isFinite()||S.isZero()))if(o.length===0){var x=new vt.A(0,0,0,0);x.copy(S),o.push(x)}else{for(var b=!1,_=1/0,A=0,w=0;w=s)}}for(var v=this.__startIndex;v15)break}}P.prevElClipPaths&&m.restore()};if(S)if(S.length===0)C=y.__endIndex;else for(var I=f.dpr,D=0;D0&&e>i[0]){for(l=0;le);l++);s=r[i[l]]}if(i.splice(l+1,0,e),r[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},a.prototype.eachLayer=function(e,t){for(var r=this._zlevelList,i=0;i0?De:0),this._needsManuallyCompositing),h.__builtin__||p.logError("ZLevel "+u+" has been used by unkown layer "+h.id),h!==n&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,t(l),n=h),i.__dirty&ie.M&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(v,c){!v.__used&&v.getElementCount()>0&&(v.__dirty=!0,v.__startIndex=v.__endIndex=v.__drawIndex=0),v.__dirty&&v.__drawIndex<0&&(v.__drawIndex=v.__startIndex)})},a.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},a.prototype._clearLayer=function(e){e.clear()},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e,p.each(this._layers,function(t){t.setUnpainted()})},a.prototype.configLayer=function(e,t){if(t){var r=this._layerConfig;r[e]?p.merge(r[e],t,!0):r[e]=t;for(var i=0;i=N:-u>=N),f=u>0?u%N:u%N+N,d=!1;c?d=!0:(0,bt.Cv)(v)?d=!1:d=f>=sa==!!h;var g=e+r*Vr(o),y=t+i*oa(o);this._start&&this._add("M",g,y);var m=Math.round(n*G);if(c){var S=1/this._p,x=(h?1:-1)*(N-S);this._add("A",r,i,m,1,+h,e+r*Vr(o+x),t+i*oa(o+x)),S>.01&&this._add("A",r,i,m,0,+h,g,y)}else{var b=e+r*Vr(s),_=t+i*oa(s);this._add("A",r,i,m,+d,+h,b,_)}},a.prototype.rect=function(e,t,r,i){this._add("M",e,t),this._add("l",r,0),this._add("l",0,i),this._add("l",-r,0),this._add("Z")},a.prototype.closePath=function(){this._d.length>0&&this._add("Z")},a.prototype._add=function(e,t,r,i,n,o,s,l,u){for(var h=[],v=this._p,c=1;c"}function Qd(a){return""}function yn(a,e){e=e||{};var t=e.newline?` +(self.webpackChunkpro_react_admin=self.webpackChunkpro_react_admin||[]).push([[3971],{43224:function(Rt,rt,E){"use strict";E.r(rt),E.d(rt,{default:function(){return VM}});var st={};E.r(st),E.d(st,{Axis:function(){return X._0},ChartView:function(){return X.OZ},ComponentModel:function(){return X.jT},ComponentView:function(){return X.bR},List:function(){return X.B8},Model:function(){return X.Kx},PRIORITY:function(){return X.FQ},SeriesModel:function(){return X.rP},color:function(){return X.yW},connect:function(){return X.Ng},dataTool:function(){return X.p5},dependencies:function(){return X.El},disConnect:function(){return X.zm},disconnect:function(){return X.Zf},dispose:function(){return X.AS},env:function(){return X._K},extendChartView:function(){return X.yX},extendComponentModel:function(){return X.rt},extendComponentView:function(){return X.NO},extendSeriesModel:function(){return X.NA},format:function(){return X.GP},getCoordinateSystemDimensions:function(){return X.Bo},getInstanceByDom:function(){return X.FP},getInstanceById:function(){return X.aQ},getMap:function(){return X.ZB},graphic:function(){return X.fA},helper:function(){return X.dw},init:function(){return X.Ts},innerDrawElementOnCanvas:function(){return X.UU},matrix:function(){return X.UP},number:function(){return X.ai},parseGeoJSON:function(){return X.l3},parseGeoJson:function(){return X.zI},registerAction:function(){return X.OH},registerCoordinateSystem:function(){return X.pX},registerLayout:function(){return X.Oh},registerLoading:function(){return X.Ej},registerLocale:function(){return X.E},registerMap:function(){return X.mz},registerPostInit:function(){return X.cf},registerPostUpdate:function(){return X.tb},registerPreprocessor:function(){return X.lP},registerProcessor:function(){return X.qg},registerTheme:function(){return X.bf},registerTransform:function(){return X.iY},registerUpdateLifecycle:function(){return X.xV},registerVisual:function(){return X.AF},setCanvasCreator:function(){return X.vV},setPlatformAPI:function(){return X.Gs},throttle:function(){return X.nF},time:function(){return X.kB},use:function(){return X.Yx},util:function(){return X.ZS},vector:function(){return X.i1},version:function(){return X.rE},zrUtil:function(){return X.F_},zrender:function(){return X.nd}});var dt=E(31635),Y=E(3087),X=E(30990),gt=E(73098),p=E(98026),Ft=E(15727),ct=E(57861),ht=E(53479),It=E(29571),vt=E(29308),ie=E(56448),ee=E(59741);function Te(a,e,t){var r=ee.yh.createCanvas(),i=e.getWidth(),n=e.getHeight(),o=r.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=n+"px",r.setAttribute("data-zr-dom-id",a)),r.width=i*t,r.height=n*t,r}var ne=function(a){(0,Ft.C6)(e,a);function e(t,r,i){var n=a.call(this)||this;n.motionBlur=!1,n.lastFrameAlpha=.7,n.dpr=1,n.virtual=!1,n.config={},n.incremental=!1,n.zlevel=0,n.maxRepaintRectCount=5,n.__dirty=!0,n.__firstTimePaint=!0,n.__used=!1,n.__drawIndex=0,n.__startIndex=0,n.__endIndex=0,n.__prevStartIndex=null,n.__prevEndIndex=null;var o;i=i||gt.Y5,typeof t=="string"?o=Te(t,r,i):p.isObject(t)&&(o=t,t=o.id),n.id=t,n.dom=o;var s=o.style;return s&&(p.disableUserSelect(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),n.painter=r,n.dpr=i,n}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Te("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,r,i,n){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new vt.A(0,0,0,0);function h(S){if(!(!S.isFinite()||S.isZero()))if(o.length===0){var x=new vt.A(0,0,0,0);x.copy(S),o.push(x)}else{for(var b=!1,_=1/0,A=0,w=0;w=s)}}for(var v=this.__startIndex;v15)break}}P.prevElClipPaths&&m.restore()};if(S)if(S.length===0)C=y.__endIndex;else for(var I=f.dpr,D=0;D0&&e>i[0]){for(l=0;le);l++);s=r[i[l]]}if(i.splice(l+1,0,e),r[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},a.prototype.eachLayer=function(e,t){for(var r=this._zlevelList,i=0;i0?De:0),this._needsManuallyCompositing),h.__builtin__||p.logError("ZLevel "+u+" has been used by unkown layer "+h.id),h!==n&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,t(l),n=h),i.__dirty&ie.M&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(v,c){!v.__used&&v.getElementCount()>0&&(v.__dirty=!0,v.__startIndex=v.__endIndex=v.__drawIndex=0),v.__dirty&&v.__drawIndex<0&&(v.__drawIndex=v.__startIndex)})},a.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},a.prototype._clearLayer=function(e){e.clear()},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e,p.each(this._layers,function(t){t.setUnpainted()})},a.prototype.configLayer=function(e,t){if(t){var r=this._layerConfig;r[e]?p.merge(r[e],t,!0):r[e]=t;for(var i=0;i=N:-u>=N),f=u>0?u%N:u%N+N,d=!1;c?d=!0:(0,bt.Cv)(v)?d=!1:d=f>=sa==!!h;var g=e+r*Vr(o),y=t+i*oa(o);this._start&&this._add("M",g,y);var m=Math.round(n*G);if(c){var S=1/this._p,x=(h?1:-1)*(N-S);this._add("A",r,i,m,1,+h,e+r*Vr(o+x),t+i*oa(o+x)),S>.01&&this._add("A",r,i,m,0,+h,g,y)}else{var b=e+r*Vr(s),_=t+i*oa(s);this._add("A",r,i,m,+d,+h,b,_)}},a.prototype.rect=function(e,t,r,i){this._add("M",e,t),this._add("l",r,0),this._add("l",0,i),this._add("l",-r,0),this._add("Z")},a.prototype.closePath=function(){this._d.length>0&&this._add("Z")},a.prototype._add=function(e,t,r,i,n,o,s,l,u){for(var h=[],v=this._p,c=1;c"}function Qd(a){return""}function yn(a,e){e=e||{};var t=e.newline?` `:"";function r(i){var n=i.children,o=i.tag,s=i.attrs,l=i.text;return Jd(o,s)+(o!=="style"?(0,He.Me)(l):l||"")+(n?""+t+(0,p.map)(n,function(u){return r(u)}).join(t)+t:"")+Qd(o)}return r(a)}function qd(a,e,t){t=t||{};var r=t.newline?` -`:"",i=" {"+r,n=r+"}",o=(0,p.map)((0,p.keys)(a),function(l){return l+i+(0,p.map)((0,p.keys)(a[l]),function(u){return u+":"+a[l][u]+";"}).join(r)+n}).join(r),s=(0,p.map)((0,p.keys)(e),function(l){return"@keyframes "+l+i+(0,p.map)((0,p.keys)(e[l]),function(u){return u+i+(0,p.map)((0,p.keys)(e[l][u]),function(h){var v=e[l][u][h];return h==="d"&&(v='path("'+v+'")'),h+":"+v+";"}).join(r)+n}).join(r)+n}).join(r);return!o&&!s?"":[""].join(r)}function mn(a){return{zrId:a,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function wl(a,e,t,r){return $t("svg","root",{width:a,height:e,xmlns:Et,"xmlns:xlink":oe,version:"1.1",baseProfile:"full",viewBox:r?"0 0 "+a+" "+e:!1},t)}var tg=E(12191),Me=E(92836),la=E(68717),Cl=E(82591),eg=E(96320),rg=0;function Tl(){return rg++}var Il={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},cr="transform-origin";function ag(a,e,t){var r=(0,p.extend)({},a.shape);(0,p.extend)(r,e),a.buildPath(t,r);var i=new F;return i.reset((0,bt.MD)(a)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function ig(a,e){var t=e.originX,r=e.originY;(t||r)&&(a[cr]=t+"px "+r+"px")}var ng={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Dl(a,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=a,t}function og(a,e,t){var r=a.shape.paths,i={},n,o;if((0,p.each)(r,function(l){var u=mn(t.zrId);u.animation=!0,ri(l,{},u,!0);var h=u.cssAnims,v=u.cssNodes,c=(0,p.keys)(h),f=c.length;if(f){o=c[f-1];var d=h[o];for(var g in d){var y=d[g];i[g]=i[g]||{d:""},i[g].d+=y.d||""}for(var m in v){var S=v[m].animation;S.indexOf(o)>=0&&(n=S)}}}),!!n){e.d=!1;var s=Dl(i,t);return n.replace(o,s)}}function Ll(a){return(0,p.isString)(a)?Il[a]?"cubic-bezier("+Il[a]+")":(0,eg.w)(a)?a:"":""}function ri(a,e,t,r){var i=a.animators,n=i.length,o=[];if(a instanceof Cl.A){var s=og(a,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u0}).length){var xt=Dl(w,t);return xt+" "+S[0]+" both"}}for(var y in l){var s=g(l[y]);s&&o.push(s)}if(o.length){var m=t.zrId+"-cls-"+Tl();t.cssNodes["."+m]={animation:o.join(",")},e.class=m}}var _t=E(32322),Wt=E(47698);function sg(a,e,t){if(!a.ignore)if(a.isSilent()){var r={"pointer-events":"none"};Ml(r,e,t,!0)}else{var i=a.states.emphasis&&a.states.emphasis.style?a.states.emphasis.style:{},n=i.fill;if(!n){var o=a.style&&a.style.fill,s=a.states.select&&a.states.select.style&&a.states.select.style.fill,l=a.currentStates.indexOf("select")>=0&&s||o;l&&(n=(0,Wt.liftColor)(l))}var u=i.lineWidth;if(u){var h=!i.strokeNoScale&&a.transform?a.transform[0]:1;u=u/h}var r={cursor:"pointer"};n&&(r.fill=n),i.stroke&&(r.stroke=i.stroke),u&&(r["stroke-width"]=u),Ml(r,e,t,!0)}}function Ml(a,e,t,r){var i=JSON.stringify(a),n=t.cssStyleCache[i];n||(n=t.zrId+"-cls-"+Tl(),t.cssStyleCache[i]=n,t.cssNodes["."+n+(r?":hover":"")]=a),e.class=e.class?e.class+" "+n:n}var lg=E(82755),ua=Math.round;function Pl(a){return a&&(0,p.isString)(a.src)}function Rl(a){return a&&(0,p.isFunction)(a.toDataURL)}function xn(a,e,t,r){Qt(function(i,n){var o=i==="fill"||i==="stroke";o&&(0,bt.bn)(n)?zl(e,a,i,r):o&&(0,bt.Pt)(n)?Bl(t,a,i,r):o&&n==="none"?a[i]="transparent":a[i]=n},e,t,!1),dg(t,a,r)}function Sn(a,e){var t=(0,lg.getElementSSRData)(e);t&&(t.each(function(r,i){r!=null&&(a[(Oe+i).toLowerCase()]=r+"")}),e.isSilent()&&(a[Oe+"silent"]="true"))}function El(a){return(0,bt.Cv)(a[0]-1)&&(0,bt.Cv)(a[1])&&(0,bt.Cv)(a[2])&&(0,bt.Cv)(a[3]-1)}function ug(a){return(0,bt.Cv)(a[4])&&(0,bt.Cv)(a[5])}function bn(a,e,t){if(e&&!(ug(e)&&El(e))){var r=t?10:1e4;a.transform=El(e)?"translate("+ua(e[4]*r)/r+" "+ua(e[5]*r)/r+")":(0,bt.nV)(e)}}function Vl(a,e,t){for(var r=a.points,i=[],n=0;nn?(d=t[l+1]==null?null:t[l+1].elm,Ul(a,d,t,i,l)):ai(a,e,r,n))}function Or(a,e){var t=e.elm=a.elm,r=a.children,i=e.children;a!==e&&(wn(a,e),An(e.text)?ke(r)&&ke(i)?r!==i&&Sg(t,r,i):ke(i)?(ke(a.text)&&_n(t,""),Ul(t,null,i,0,i.length-1)):ke(r)?ai(t,r,0,r.length-1):ke(a.text)&&_n(t,""):a.text!==e.text&&(ke(r)&&ai(t,r,0,r.length-1),_n(t,e.text)))}function bg(a,e){if(ha(a,e))Or(a,e);else{var t=a.elm,r=Wl(t);va(e),r!==null&&(fr(r,e.elm,Yl(t)),ai(r,[a],0,0))}return e}var _g=0,Ag=function(){function a(e,t,r){if(this.type="svg",this.refreshHover=Xl("refreshHover"),this.configLayer=Xl("configLayer"),this.storage=t,this._opts=r=(0,p.extend)({},r),this.root=e,this._id="zr"+_g++,this._oldVNode=wl(r.width,r.height),e&&!r.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=Al("svg");wn(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(r.width,r.height)}return a.prototype.getType=function(){return this.type},a.prototype.getViewportRoot=function(){return this._viewport},a.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},a.prototype.getSvgDom=function(){return this._svgDom},a.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",bg(this._oldVNode,e),this._oldVNode=e}},a.prototype.renderOneToVNode=function(e){return Nl(e,mn(this._id))},a.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),r=this._width,i=this._height,n=mn(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress,n.emphasis=e.emphasis;var o=[],s=this._bgVNode=wg(r,i,this._backgroundColor,n);s&&o.push(s);var l=e.compress?null:this._mainVNode=$t("g","main",{},[]);this._paintList(t,n,l?l.children:o),l&&o.push(l);var u=(0,p.map)((0,p.keys)(n.defs),function(c){return n.defs[c]});if(u.length&&o.push($t("defs","defs",{},u)),e.animation){var h=qd(n.cssNodes,n.cssAnims,{newline:!0});if(h){var v=$t("style","stl",{},[],h);o.push(v)}}return wl(r,i,o,e.useViewBox)},a.prototype.renderToString=function(e){return e=e||{},yn(this.renderToVNode({animation:(0,p.retrieve2)(e.cssAnimation,!0),emphasis:(0,p.retrieve2)(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:(0,p.retrieve2)(e.useViewBox,!0)}),{newline:!0})},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e},a.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},a.prototype._paintList=function(e,t,r){for(var i=e.length,n=[],o=0,s,l,u=0,h=0;h=0&&!(c&&l&&c[g]===l[g]);g--);for(var y=d-1;y>g;y--)o--,s=n[o-1];for(var m=g+1;m-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),r},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ot.A),Dg=Ig,Q=E(5638),tt=E(43199),ct=E(69622),U=E(34833),jl=E(58267);function kr(a,e){var t=a.mapDimensionsAll("defaultedLabel"),r=t.length;if(r===1){var i=(0,jl.QE)(a,e,t[0]);return i!=null?i+"":null}else if(r){for(var n=[],o=0;o=0&&r.push(e[n])}return r.join(" ")}var q=E(89632),Lg=function(a){(0,O.C6)(e,a);function e(t,r,i,n){var o=a.call(this)||this;return o.updateData(t,r,i,n),o}return e.prototype._createSymbol=function(t,r,i,n,o){this.removeAll();var s=(0,Tt.v5)(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),s.drift=Mg,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){(0,U.HY)(this.childAt(0))},e.prototype.downplay=function(){(0,U.SD)(this.childAt(0))},e.prototype.setZ=function(t,r){var i=this.childAt(0);i.zlevel=t,i.z=r},e.prototype.setDraggable=function(t,r){var i=this.childAt(0);i.draggable=t,i.cursor=!r&&t?"move":i.cursor},e.prototype.updateData=function(t,r,i,n){this.silent=!1;var o=t.getItemVisual(r,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,r),u=o!==this._symbolType,h=n&&n.disableAnimation;if(u){var v=t.getItemVisual(r,"symbolKeepAspect");this._createSymbol(o,t,r,l,v)}else{var c=this.childAt(0);c.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};h?c.attr(f):Q.oi(c,f,s,r),(0,Q.ap)(c)}if(this._updateCommon(t,r,l,i,n),u){var c=this.childAt(0);if(!h){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Q.LW(c,f,s,r)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,r,i,n,o){var s=this.childAt(0),l=t.hostModel,u,h,v,c,f,d,g,y,m;if(n&&(u=n.emphasisItemStyle,h=n.blurItemStyle,v=n.selectItemStyle,c=n.focus,f=n.blurScope,g=n.labelStatesModels,y=n.hoverScale,m=n.cursorStyle,d=n.emphasisDisabled),!n||t.hasItemOption){var S=n&&n.itemModel?n.itemModel:t.getItemModel(r),x=S.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),v=S.getModel(["select","itemStyle"]).getItemStyle(),h=S.getModel(["blur","itemStyle"]).getItemStyle(),c=x.get("focus"),f=x.get("blurScope"),d=x.get("disabled"),g=(0,q.lx)(S),y=x.getShallow("scale"),m=S.getShallow("cursor")}var b=t.getItemVisual(r,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var _=(0,Tt.hV)(t.getItemVisual(r,"symbolOffset"),i);_&&(s.x=_[0],s.y=_[1]),m&&s.attr("cursor",m);var A=t.getItemVisual(r,"style"),w=A.fill;if(s instanceof ue.Ay){var C=s.style;s.useStyle((0,p.extend)({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},A))}else s.__isEmptyBrush?s.useStyle((0,p.extend)({},A)):s.useStyle(A),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var T=t.getItemVisual(r,"liftZ"),I=this._z2;T!=null?I==null&&(this._z2=s.z2,s.z2+=T):I!=null&&(s.z2=I,this._z2=null);var D=o&&o.useNameLabel;(0,q.qM)(s,g,{labelFetcher:l,labelDataIndex:r,defaultText:L,inheritColor:w,defaultOpacity:A.opacity});function L(R){return D?t.getName(R):kr(t,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var M=s.ensureState("emphasis");M.style=u,s.ensureState("select").style=v,s.ensureState("blur").style=h;var P=y==null||y===!0?Math.max(1.1,3/this._sizeY):isFinite(y)&&y>0?+y:1;M.scaleX=this._sizeX*P,M.scaleY=this._sizeY*P,this.setSymbolScale(1),(0,U.Lm)(this,c,f,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,r,i){var n=this.childAt(0),o=(0,ct.z)(this).dataIndex,s=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var l=n.getTextContent();l&&Q.Nz(l,{style:{opacity:0}},r,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();Q.Nz(n,{style:{opacity:0},scaleX:0,scaleY:0},r,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,r){return(0,Tt.xU)(t.getItemVisual(r,"symbolSize"))},e}(it.A);function Mg(a,e){this.parent.drift(a,e)}var ca=Lg;function Cn(a,e,t,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r.isIgnore&&r.isIgnore(t))&&!(r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&a.getItemVisual(t,"symbol")!=="none"}function $l(a){return a!=null&&!(0,p.isObject)(a)&&(a={isIgnore:a}),a||{}}function Jl(a){var e=a.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:(0,q.lx)(e),cursorStyle:e.get("cursor")}}var Pg=function(){function a(e){this.group=new it.A,this._SymbolCtor=e||ca}return a.prototype.updateData=function(e,t){this._progressiveEls=null,t=$l(t);var r=this.group,i=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Jl(e),u={disableAnimation:s},h=t.getSymbolPoint||function(v){return e.getItemLayout(v)};n||r.removeAll(),e.diff(n).add(function(v){var c=h(v);if(Cn(e,c,v,t)){var f=new o(e,v,l,u);f.setPosition(c),e.setItemGraphicEl(v,f),r.add(f)}}).update(function(v,c){var f=n.getItemGraphicEl(c),d=h(v);if(!Cn(e,d,v,t)){r.remove(f);return}var g=e.getItemVisual(v,"symbol")||"circle",y=f&&f.getSymbolType&&f.getSymbolType();if(!f||y&&y!==g)r.remove(f),f=new o(e,v,l,u),f.setPosition(d);else{f.updateData(e,v,l,u);var m={x:d[0],y:d[1]};s?f.attr(m):Q.oi(f,m,i)}r.add(f),e.setItemGraphicEl(v,f)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&c.fadeOut(function(){r.remove(c)},i)}).execute(),this._getSymbolPoint=h,this._data=e},a.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(r,i){var n=e._getSymbolPoint(i);r.setPosition(n),r.markRedraw()})},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Jl(e),this._data=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t,r){this._progressiveEls=[],r=$l(r);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0?t=r[0]:r[1]<0&&(t=r[1]),t}function ql(a,e,t,r){var i=NaN;a.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=a.valueStart);var n=a.baseDataOffset,o=[];return o[n]=t.get(a.baseDim,r),o[1-n]=i,e.dataToPoint(o)}var dr=E(8957);function Eg(a,e){var t=[];return e.diff(a).add(function(r){t.push({cmd:"+",idx:r})}).update(function(r,i){t.push({cmd:"=",idx:i,idx1:r})}).remove(function(r){t.push({cmd:"-",idx:r})}).execute(),t}function Vg(a,e,t,r,i,n,o,s){for(var l=Eg(a,e),u=[],h=[],v=[],c=[],f=[],d=[],g=[],y=Ql(i,e,o),m=a.getLayout("points")||[],S=e.getLayout("points")||[],x=0;x=i||g<0)break;if(gr(m,S)){if(l){g+=n;continue}break}if(g===t)a[n>0?"moveTo":"lineTo"](m,S),v=m,c=S;else{var x=m-u,b=S-h;if(x*x+b*b<.5){g+=n;continue}if(o>0){for(var _=g+n,A=e[_*2],w=e[_*2+1];A===m&&w===S&&y=r||gr(A,w))f=m,d=S;else{I=A-u,D=w-h;var P=m-u,R=A-m,V=S-h,B=w-S,z=void 0,W=void 0;if(s==="x"){z=Math.abs(P),W=Math.abs(R);var $=I>0?1:-1;f=m-$*z*o,d=S,L=m+$*W*o,M=S}else if(s==="y"){z=Math.abs(V),W=Math.abs(B);var K=D>0?1:-1;f=m,d=S-K*z*o,L=m,M=S+K*W*o}else z=Math.sqrt(P*P+V*V),W=Math.sqrt(R*R+B*B),T=W/(W+z),f=m-I*o*(1-T),d=S-D*o*(1-T),L=m+I*o*T,M=S+D*o*T,L=$e(L,Je(A,m)),M=$e(M,Je(w,S)),L=Je(L,$e(A,m)),M=Je(M,$e(w,S)),I=L-m,D=M-S,f=m-I*z/W,d=S-D*z/W,f=$e(f,Je(u,m)),d=$e(d,Je(h,S)),f=Je(f,$e(u,m)),d=Je(d,$e(h,S)),I=m-f,D=S-d,L=m+I*W/z,M=S+D*W/z}a.bezierCurveTo(v,c,f,d,m,S),v=L,c=M}else a.lineTo(m,S)}u=m,h=S,g+=n}return y}var tu=function(){function a(){this.smooth=0,this.smoothConstraint=!0}return a}(),Og=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-polyline",r}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new tu},e.prototype.buildPath=function(t,r){var i=r.points,n=0,o=i.length/2;if(r.connectNulls){for(;o>0&&gr(i[o*2-2],i[o*2-1]);o--);for(;n=0){var b=u?(d-l)*x+l:(f-s)*x+s;return u?[t,b]:[b,t]}s=f,l=d;break;case o.C:f=n[v++],d=n[v++],g=n[v++],y=n[v++],m=n[v++],S=n[v++];var _=u?(0,ge._E)(s,f,g,m,t,h):(0,ge._E)(l,d,y,S,t,h);if(_>0)for(var A=0;A<_;A++){var w=h[A];if(w<=1&&w>=0){var b=u?(0,ge.Yb)(l,d,y,S,w):(0,ge.Yb)(s,f,g,m,w);return u?[t,b]:[b,t]}}s=m,l=S;break}}},e}(Vt.Ay),kg=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e}(tu),eu=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-polygon",r}return e.prototype.getDefaultShape=function(){return new kg},e.prototype.buildPath=function(t,r){var i=r.points,n=r.stackedOnPoints,o=0,s=i.length/2,l=r.smoothMonotone;if(r.connectNulls){for(;s>0&&gr(i[s*2-2],i[s*2-1]);s--);for(;oe){n?t.push(o(n,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),n=l}return t}function Bg(a,e,t){var r=a.getVisual("visualMeta");if(!(!r||!r.length||!a.count())&&e.type==="cartesian2d"){for(var i,n,o=r.length-1;o>=0;o--){var s=a.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=r[o];break}}if(n){var l=e.getAxis(i),u=p.map(n.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),h=u.length,v=n.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),v.reverse());var c=zg(u,i==="x"?t.getWidth():t.getHeight()),f=c.length;if(!f&&h)return u[0].coord<0?v[1]?v[1]:u[h-1].color:v[0]?v[0]:u[0].color;var d=10,g=c[0].coord-d,y=c[f-1].coord+d,m=y-g;if(m<.001)return"transparent";p.each(c,function(x){x.offset=(x.coord-g)/m}),c.push({offset:f?c[f-1].offset:.5,color:v[1]||"transparent"}),c.unshift({offset:f?c[0].offset:.5,color:v[0]||"transparent"});var S=new ii.A(0,0,0,0,c,!0);return S[i]=g,S[i+"2"]=y,S}}}function Gg(a,e,t){var r=a.get("showAllSymbol"),i=r==="auto";if(!(r&&!i)){var n=t.getAxesByScale("ordinal")[0];if(n&&!(i&&Hg(n,e))){var o=e.mapDimension(n.dim),s={};return p.each(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Hg(a,e){var t=a.getExtent(),r=Math.abs(t[1]-t[0])/a.scale.count();isNaN(r)&&(r=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function Fg(a,e){return isNaN(a)||isNaN(e)}function Wg(a){for(var e=a.length/2;e>0&&Fg(a[e*2-2],a[e*2-1]);e--);return e-1}function lu(a,e){return[a[e*2],a[e*2+1]]}function Yg(a,e,t){for(var r=a.length/2,i=t==="x"?0:1,n,o,s=0,l=-1,u=0;u=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function uu(a){if(a.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var $=g.getState("emphasis").style;$.lineWidth=+g.style.lineWidth+1}(0,ct.z)(g).seriesIndex=t.seriesIndex,(0,U.Lm)(g,B,z,W);var K=su(t.get("smooth")),et=t.get("smoothMonotone");if(g.setShape({smooth:K,smoothMonotone:et,connectNulls:C}),y){var lt=l.getCalculationInfo("stackedOnSeries"),ot=0;y.useStyle(p.defaults(h.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),lt&&(ot=su(lt.get("smooth"))),y.setShape({smooth:K,stackedOnSmooth:ot,smoothMonotone:et,connectNulls:C}),(0,U.Mx)(y,t,"areaStyle"),(0,ct.z)(y).seriesIndex=t.seriesIndex,(0,U.Lm)(y,B,z,W)}var mt=function(At){n._changePolyState(At)};l.eachItemGraphicEl(function(At){At&&(At.onHoverStateChange=mt)}),this._polyline.onHoverStateChange=mt,this._data=l,this._coordSys=o,this._stackedOnPoints=A,this._points=v,this._step=D,this._valueOrigin=b,t.get("triggerLineEvent")&&(this.packEventData(t,g),y&&this.packEventData(t,y))},e.prototype.packEventData=function(t,r){(0,ct.z)(r).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,r,i,n){var o=t.getData(),s=J.le(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],v=l[s*2+1];if(isNaN(h)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,v))return;var c=t.get("zlevel")||0,f=t.get("z")||0;u=new ca(o,s),u.x=h,u.y=v,u.setZ(c,f);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=f,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Nt.A.prototype.highlight.call(this,t,r,i,n)},e.prototype.downplay=function(t,r,i,n){var o=t.getData(),s=J.le(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Nt.A.prototype.downplay.call(this,t,r,i,n)},e.prototype._changePolyState=function(t){var r=this._polygon;(0,U.Pk)(this._polyline,t),r&&(0,U.Pk)(r,t)},e.prototype._newPolyline=function(t){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new Og({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},e.prototype._newPolygon=function(t,r){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new eu({shape:{points:t,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,r,i){var n,o,s=r.getBaseAxis(),l=s.inverse;r.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):r.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,h=u.get("animationDuration");p.isFunction(h)&&(h=h(null));var v=u.get("animationDelay")||0,c=p.isFunction(v)?v(null):v;t.eachItemGraphicEl(function(f,d){var g=f;if(g){var y=[f.x,f.y],m=void 0,S=void 0,x=void 0;if(i)if(o){var b=i,_=r.pointToCoord(y);n?(m=b.startAngle,S=b.endAngle,x=-_[1]/180*Math.PI):(m=b.r0,S=b.r,x=_[0])}else{var A=i;n?(m=A.x,S=A.x+A.width,x=f.x):(m=A.y+A.height,S=A.y,x=f.y)}var w=S===m?0:(x-m)/(S-m);l&&(w=1-w);var C=p.isFunction(v)?v(d):h*w+c,T=g.getSymbolPath(),I=T.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),I&&I.animateFrom({style:{opacity:0}},{duration:300,delay:C}),T.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,r,i){var n=t.getModel("endLabel");if(uu(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new _t.Ay({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=Wg(l);h>=0&&((0,q.qM)(s,(0,q.lx)(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:h,defaultText:function(v,c,f){return f!=null?Kl(o,f):kr(o,v)},enableTextSetter:!0},Zg(n,r)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,r,i,n,o,s,l){var u=this._endLabel,h=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var v=i.getLayout("points"),c=i.hostModel,f=c.get("connectNulls"),d=s.get("precision"),g=s.get("distance")||0,y=l.getBaseAxis(),m=y.isHorizontal(),S=y.inverse,x=r.shape,b=S?m?x.x:x.y+x.height:m?x.x+x.width:x.y,_=(m?g:0)*(S?-1:1),A=(m?0:-g)*(S?-1:1),w=m?"x":"y",C=Yg(v,b,w),T=C.range,I=T[1]-T[0],D=void 0;if(I>=1){if(I>1&&!f){var L=lu(v,T[0]);u.attr({x:L[0]+_,y:L[1]+A}),o&&(D=c.getRawValue(T[0]))}else{var L=h.getPointOn(b,w);L&&u.attr({x:L[0]+_,y:L[1]+A});var M=c.getRawValue(T[0]),P=c.getRawValue(T[1]);o&&(D=J.Il(i,d,M,P,C.t))}n.lastFrameIndex=T[0]}else{var R=t===1||n.lastFrameIndex>0?T[0]:0,L=lu(v,R);o&&(D=c.getRawValue(R)),u.attr({x:L[0]+_,y:L[1]+A})}if(o){var V=(0,q.Lu)(u);typeof V.setLabelText=="function"&&V.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,r,i,n,o,s,l){var u=this._polyline,h=this._polygon,v=t.hostModel,c=Vg(this._data,t,this._stackedOnPoints,r,this._coordSys,i,this._valueOrigin,s),f=c.current,d=c.stackedOnCurrent,g=c.next,y=c.stackedOnNext;if(o&&(f=Qe(c.current,i,o,l),d=Qe(c.stackedOnCurrent,i,o,l),g=Qe(c.next,i,o,l),y=Qe(c.stackedOnNext,i,o,l)),ou(f,g)>3e3||h&&ou(d,y)>3e3){u.stopAnimation(),u.setShape({points:g}),h&&(h.stopAnimation(),h.setShape({points:g,stackedOnPoints:y}));return}u.shape.__points=c.current,u.shape.points=f;var m={shape:{points:g}};c.current!==f&&(m.shape.__points=c.next),u.stopAnimation(),Q.oi(u,m,v),h&&(h.setShape({points:f,stackedOnPoints:d}),h.stopAnimation(),Q.oi(h,{shape:{stackedOnPoints:y}},v),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var S=[],x=c.status,b=0;be&&(e=a[t]);return isFinite(e)?e:NaN},min:function(a){for(var e=1/0,t=0;te&&(e=n,t=i)}return isFinite(t)?t:NaN},nearest:function(a){return a[0]}},Kg=function(a){return Math.round(a.length/2)};function hu(a){return{seriesType:a,reset:function(e,t,r){var i=e.getData(),n=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),v=r.getDevicePixelRatio(),c=Math.abs(h[1]-h[0])*(v||1),f=Math.round(s/c);if(isFinite(f)&&f>1){n==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/f));var d=void 0;(0,p.isString)(n)?d=jg[n]:(0,p.isFunction)(n)&&(d=n),d&&e.setData(i.downSample(i.mapDimension(u.dim),1/f,d,Kg))}}}}}function $g(a){a.registerChartView(Xg),a.registerSeriesModel(Dg),a.registerLayout(da("line",!0)),a.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),r=e.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",r)}}),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,hu("line"))}var ga=E(62536),vu=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return(0,Fe.A)(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,r,i){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(t),s=n.dataToPoint(o);if(i)(0,p.each)(n.getAxes(),function(c,f){if(c.type==="category"&&r!=null){var d=c.getTicksCoords(),g=c.getTickModel().get("alignWithLabel"),y=o[f],m=r[f]==="x1"||r[f]==="y1";if(m&&!g&&(y+=1),d.length<2)return;if(d.length===2){s[f]=c.toGlobalCoord(c.getExtent()[m?1:0]);return}for(var S=void 0,x=void 0,b=1,_=0;_y){x=(A+S)/2;break}_===1&&(b=w-d[0].tickValue)}x==null&&(S?S&&(x=d[d.length-1].coord):x=d[0].coord),s[f]=c.toGlobalCoord(x)}});else{var l=this.getData(),u=l.getLayout("offset"),h=l.getLayout("size"),v=n.getBaseAxis().isHorizontal()?0:1;s[v]+=u+h/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Ot.A);Ot.A.registerClass(vu);var oi=vu,Ne=E(12616),Jg=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return(0,Fe.A)(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),r=this.get("largeThreshold");return r>t&&(t=r),t},e.prototype.brushSelector=function(t,r,i){return i.rect(r.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=(0,Ne.G_)(oi.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(oi),Qg=Jg,me=E(24711),qg=function(){function a(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return a}(),ty=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="sausage",r}return e.prototype.getDefaultShape=function(){return new qg},e.prototype.buildPath=function(t,r){var i=r.cx,n=r.cy,o=Math.max(r.r0||0,0),s=Math.max(r.r,0),l=(s-o)*.5,u=o+l,h=r.startAngle,v=r.endAngle,c=r.clockwise,f=Math.PI*2,d=c?v-hMath.PI/2&&hs)return!0;s=v}return!1},e.prototype._isOrderDifferentInView=function(t,r){for(var i=r.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,r,i,n){if(this._isOrderChangedWithinSameData(t,r,i)){var o=this._dataSort(t,i,r);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,r,i){var n=r.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(r.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,r){this._clear(this._model),this._removeOnRenderedListener(r)},e.prototype.dispose=function(t,r){this._removeOnRenderedListener(r)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var r=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){(0,Q.t5)(n,t,(0,ct.z)(n).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Nt.A),cu={cartesian2d:function(a,e){var t=e.width<0?-1:1,r=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var i=a.x+a.width,n=a.y+a.height,o=Dn(e.x,a.x),s=Ln(e.x+e.width,i),l=Dn(e.y,a.y),u=Ln(e.y+e.height,n),h=si?s:o,e.y=v&&l>n?u:l,e.width=h?0:s-o,e.height=v?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),h||v},polar:function(a,e){var t=e.r0<=e.r?1:-1;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}var i=Ln(e.r,a.r),n=Dn(e.r0,a.r0);e.r=i,e.r0=n;var o=i-n<0;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}return o}},fu={cartesian2d:function(a,e,t,r,i,n,o,s,l){var u=new Dt.A({shape:(0,p.extend)({},r),z2:1});if(u.__dataIndex=t,u.name="item",n){var h=u.shape,v=i?"height":"width";h[v]=0}return u},polar:function(a,e,t,r,i,n,o,s,l){var u=!i&&l?si:ye.A,h=new u({shape:r,z2:1});h.name="item";var v=yu(i);if(h.calculateTextPosition=ey(v,{isRoundCap:u===si}),n){var c=h.shape,f=i?"r":"endAngle",d={};c[f]=i?r.r0:r.startAngle,d[f]=r[f],(s?Q.oi:Q.LW)(h,{shape:d},n)}return h}};function ny(a,e){var t=a.get("realtimeSort",!0),r=e.getBaseAxis();if(t&&r.type==="category"&&e.type==="cartesian2d")return{baseAxis:r,otherAxis:e.getOtherAxis(r)}}function pu(a,e,t,r,i,n,o,s){var l,u;n?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(o?Q.oi:Q.LW)(t,{shape:l},e,i,null);var h=e?a.baseAxis.model:null;(o?Q.oi:Q.LW)(t,{shape:u},h,i)}function du(a,e){for(var t=0;t0?1:-1,o=r.height>0?1:-1;return{x:r.x+n*i/2,y:r.y+o*i/2,width:r.width-n*i,height:r.height-o*i}},polar:function(a,e,t){var r=a.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function ly(a){return a.startAngle!=null&&a.endAngle!=null&&a.startAngle===a.endAngle}function yu(a){return function(e){var t=e?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+t;default:return r}}}(a)}function mu(a,e,t,r,i,n,o,s){var l=e.getItemVisual(t,"style");if(s){if(!n.get("roundCap")){var h=a.shape,v=mr(r.getModel("itemStyle"),h,!0);(0,p.extend)(h,v),a.setShape(h)}}else{var u=r.get(["itemStyle","borderRadius"])||0;a.setShape("r",u)}a.useStyle(l);var c=r.getShallow("cursor");c&&a.attr("cursor",c);var f=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=(0,q.lx)(r);(0,q.qM)(a,d,{labelFetcher:n,labelDataIndex:t,defaultText:kr(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var g=a.getTextContent();if(s&&g){var y=r.get(["label","position"]);a.textConfig.inside=y==="middle"?!0:null,ry(a,y==="outside"?f:y,yu(o),r.get(["label","rotate"]))}(0,q.Oh)(g,d,n.getRawValue(t),function(S){return Kl(e,S)});var m=r.getModel(["emphasis"]);(0,U.Lm)(a,m.get("focus"),m.get("blurScope"),m.get("disabled")),(0,U.Mx)(a,r),ly(i)&&(a.style.fill="none",a.style.stroke="none",(0,p.each)(a.states,function(S){S.style&&(S.style.fill=S.style.stroke="none")}))}function uy(a,e){var t=a.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var r=a.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,i,n)}var hy=function(){function a(){}return a}(),xu=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeBar",r}return e.prototype.getDefaultShape=function(){return new hy},e.prototype.buildPath=function(t,r){for(var i=r.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,h=0;h=0?t:null},30,!1);function vy(a,e,t){for(var r=a.baseDimIdx,i=1-r,n=a.shape.points,o=a.largeDataIndices,s=[],l=[],u=a.barWidth,h=0,v=n.length/3;h=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[h]}return-1}function _u(a,e,t){if(yr(t,"cartesian2d")){var r=e,i=t.getArea();return{x:a?r.x:i.x,y:a?i.y:r.y,width:a?r.width:i.width,height:a?i.height:r.height}}else{var i=t.getArea(),n=e;return{cx:i.cx,cy:i.cy,r0:a?i.r0:n.r0,r:a?i.r:n.r,startAngle:a?n.startAngle:0,endAngle:a?n.endAngle:Math.PI*2}}}function cy(a,e,t){var r=a.type==="polar"?ye.A:Dt.A;return new r({shape:_u(e,t,a),silent:!0,z2:0})}var fy=iy;function py(a){a.registerChartView(fy),a.registerSeriesModel(Qg),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,p.curry(ga.Zp,"bar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,(0,ga.KF)("bar")),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,hu("bar")),a.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var Au=E(16884),yt=E(34253),wu=Math.PI*2,vi=Math.PI/180;function Cu(a,e){return yt.dV(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Tu(a,e){var t=Cu(a,e),r=a.get("center"),i=a.get("radius");p.isArray(i)||(i=[0,i]);var n=(0,k.lo)(t.width,e.getWidth()),o=(0,k.lo)(t.height,e.getHeight()),s=Math.min(n,o),l=(0,k.lo)(i[0],s/2),u=(0,k.lo)(i[1],s/2),h,v,c=a.coordinateSystem;if(c){var f=c.dataToPoint(r);h=f[0]||0,v=f[1]||0}else p.isArray(r)||(r=[r,r]),h=(0,k.lo)(r[0],n)+t.x,v=(0,k.lo)(r[1],o)+t.y;return{cx:h,cy:v,r0:l,r:u}}function dy(a,e,t){e.eachSeriesByType(a,function(r){var i=r.getData(),n=i.mapDimension("value"),o=Cu(r,t),s=Tu(r,t),l=s.cx,u=s.cy,h=s.r,v=s.r0,c=-r.get("startAngle")*vi,f=r.get("endAngle"),d=r.get("padAngle")*vi;f=f==="auto"?c-wu:-f*vi;var g=r.get("minAngle")*vi,y=g+d,m=0;i.each(n,function(B){!isNaN(B)&&m++});var S=i.getSum(n),x=Math.PI/(S||m)*2,b=r.get("clockwise"),_=r.get("roseType"),A=r.get("stillShowZeroSum"),w=i.getDataExtent(n);w[0]=0;var C=b?1:-1,T=[c,f],I=C*d/2;(0,la.q)(T,!b),c=T[0],f=T[1];var D=Iu(r);D.startAngle=c,D.endAngle=f,D.clockwise=b;var L=Math.abs(f-c),M=L,P=0,R=c;if(i.setLayout({viewRect:o,r:h}),i.each(n,function(B,z){var W;if(isNaN(B)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:l,cy:u,r0:v,r:_?NaN:h});return}_!=="area"?W=S===0&&A?x:B*x:W=L/m,WW?(K=R+C*W/2,et=K):(K=R+I,et=$-I),i.setItemLayout(z,{angle:W,startAngle:K,endAngle:et,clockwise:b,cx:l,cy:u,r0:v,r:_?(0,k.Cb)(B,w,[v,h]):h}),R=$}),Mt?m:y,_=Math.abs(x.label.y-t);if(_>=b.maxY){var A=x.label.x-e-x.len2*i,w=r+x.len,C=Math.abs(A)a.unconstrainedWidth?null:f:null;r.setStyle("width",d)}var g=r.getBoundingRect();n.width=g.width;var y=(r.style.margin||0)+2.1;n.height=g.height+y,n.y-=(n.height-v)/2}}}function Pn(a){return a.position==="center"}function my(a){var e=a.getData(),t=[],r,i,n=!1,o=(a.get("minShowLabelAngle")||0)*gy,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,h=s.x,v=s.y,c=s.height;function f(A){A.ignore=!0}function d(A){if(!A.ignore)return!0;for(var w in A.states)if(A.states[w].ignore===!1)return!0;return!1}e.each(function(A){var w=e.getItemGraphicEl(A),C=w.shape,T=w.getTextContent(),I=w.getTextGuideLine(),D=e.getItemModel(A),L=D.getModel("label"),M=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),V=(0,k.lo)(L.get("edgeDistance"),u),B=L.get("bleedMargin"),z=D.getModel("labelLine"),W=z.get("length");W=(0,k.lo)(W,u);var $=z.get("length2");if($=(0,k.lo)($,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":et>0?"left":"right"}var jt=Math.PI,Zt=0,se=L.get("rotate");if((0,p.isNumber)(se))Zt=se*(jt/180);else if(M==="center")Zt=0;else if(se==="radial"||se===!0){var Ke=et<0?-K+jt:-K;Zt=Ke}else if(se==="tangential"&&M!=="outside"&&M!=="outer"){var ve=Math.atan2(et,lt);ve<0&&(ve=jt*2+ve);var dn=lt>0;dn&&(ve=jt+ve),Zt=ve-jt}if(n=!!Zt,T.x=ot,T.y=mt,T.rotation=Zt,T.setStyle({verticalAlign:"middle"}),nt){T.setStyle({align:xt});var _l=T.states.select;_l&&(_l.x+=T.x,_l.y+=T.y)}else{var vr=T.getBoundingRect().clone();vr.applyTransform(T.getComputedTransform());var $d=(T.style.margin||0)+2.1;vr.y-=$d/2,vr.height+=$d,t.push({label:T,labelLine:I,position:M,len:W,len2:$,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new Re.A(et,lt),linePoints:At,textAlign:xt,labelDistance:P,labelAlignTo:R,edgeDistance:V,bleedMargin:B,rect:vr,unconstrainedWidth:vr.width,labelStyleWidth:T.style.width})}w.setTextConfig({inside:nt})}}),!n&&a.get("avoidLabelOverlap")&&yy(t,r,i,l,u,c,h,v);for(var g=0;g0){for(var h=o.getItemLayout(0),v=1;isNaN(h&&h.startAngle)&&v=n.r0}},e.type="pie",e}(Nt.A),by=Sy,ci=E(97351),he=E(6006);function zr(a,e,t){e=(0,p.isArray)(e)&&{coordDimensions:e}||(0,p.extend)({encodeDefine:a.getEncode()},e);var r=a.getSource(),i=(0,ci.A)(r,e).dimensions,n=new he.A(i,a);return n.initData(r,t),n}var fi=E(23071),_y=function(){function a(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return a.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},a.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},a.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},a.prototype.getItemVisual=function(e,t){var r=this._getDataWithEncodedVisual();return r.getItemVisual(e,t)},a}(),ma=_y,Ay=J.$r(),wy=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ma(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){a.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return zr(this,{coordDimensions:["value"],encodeDefaulter:p.curry(fi.ln,this)})},e.prototype.getDataParams=function(t){var r=this.getData(),i=Ay(r),n=i.seats;if(!n){var o=[];r.each(r.mapDimension("value"),function(l){o.push(l)}),n=i.seats=(0,k.kM)(o,r.hostModel.get("percentPrecision"))}var s=a.prototype.getDataParams.call(this,t);return s.percent=n[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){J.M5(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Ot.A),Cy=wy;function Ty(a){return{seriesType:a,reset:function(e,t){var r=e.getData();r.filterSelf(function(i){var n=r.mapDimension("value"),o=r.get(n,i);return!((0,p.isNumber)(o)&&!isNaN(o)&&o<0)})}}}function Iy(a){a.registerChartView(by),a.registerSeriesModel(Cy),(0,Au.I)("pie",a.registerAction),a.registerLayout((0,p.curry)(dy,"pie")),a.registerProcessor(ya("pie")),a.registerProcessor(Ty("pie"))}var Dy=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,r){return(0,Fe.A)(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,r,i){return i.point(r.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Ot.A),Ly=Dy,Mu=4,My=function(){function a(){}return a}(),Py=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return e.prototype.getDefaultShape=function(){return new My},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,r){var i=r.points,n=r.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]=0;u--){var h=u*2,v=n[h]-s/2,c=n[h+1]-l/2;if(t>=v&&r>=c&&t<=v+s&&r<=c+l)return u}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),n=this.getBoundingRect();if(t=i[0],r=i[1],n.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.points,n=r.size,o=n[0],s=n[1],l=1/0,u=1/0,h=-1/0,v=-1/0,c=0;c=0&&(u.dataIndex=v+(e.startIndex||0))})},a.prototype.remove=function(){this._clear()},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),Ey=Ry,Vy=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._symbolDraw.incrementalUpdate(t,r.getData(),{clipShape:this._getClipShape(r)}),this._finished=t.end===r.getData().count()},e.prototype.updateTransform=function(t,r,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=da("").reset(t,r,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var r=t.coordinateSystem;return r&&r.getArea&&r.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,r){var i=this._symbolDraw,n=r.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Ey:new fa,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Nt.A),Oy=Vy,Yt=E(59109),Ht=E(15915),ky=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Ht.A),Ny=ky,xa=E(12462),Rn=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",J.US).models[0]},e.type="cartesian2dAxis",e}(Ht.A);p.mixin(Rn,xa.L);var HM=null,Pu={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},zy=p.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Pu),En=p.merge({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Pu),By=p.merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},En),Gy=p.defaults({logBase:10},En),Ru={category:zy,value:En,time:By,log:Gy},Hy=E(15135),Fy={value:1,category:1,time:1,log:1};function Br(a,e,t,r){(0,p.each)(Fy,function(i,n){var o=(0,p.merge)((0,p.merge)({},Ru[n],!0),r,!0),s=function(l){(0,O.C6)(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=e+"Axis."+n,h}return u.prototype.mergeDefaultAndTheme=function(h,v){var c=(0,yt.ad)(this),f=c?(0,yt.vs)(h):{},d=v.getTheme();(0,p.merge)(h,d.get(n+"Axis")),(0,p.merge)(h,this.getDefaultOption()),h.type=Eu(h),c&&(0,yt.YA)(h,f,c)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=Hy.A.createByAxisModel(this))},u.prototype.getCategories=function(h){var v=this.option;if(v.type==="category")return h?v.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+n,u.defaultOption=o,u}(t);a.registerComponentModel(s)}),a.registerSubTypeDefaulter(e+"Axis",Eu)}function Eu(a){return a.type||(a.data?"category":"value")}var Ut=E(25751),Wy=function(){function a(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return a.prototype.getAxis=function(e){return this._axes[e]},a.prototype.getAxes=function(){return p.map(this._dimList,function(e){return this._axes[e]},this)},a.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),p.filter(this.getAxes(),function(t){return t.scale.type===e})},a.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},a}(),Yy=Wy,Lt=E(45587),at=E(83509),Vn=["x","y"];function Vu(a){return a.type==="interval"||a.type==="time"}var Zy=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Vn,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!Vu(t)||!Vu(r))){var i=t.getExtent(),n=r.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,v=(s[1]-o[1])/u,c=o[0]-i[0]*h,f=o[1]-n[0]*v,d=this._transform=[h,0,0,v,c,f];this._invTransform=(0,Lt.invert)([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var r=this.getAxis("x"),i=this.getAxis("y");return r.contain(r.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,r){var i=this.dataToPoint(t),n=this.dataToPoint(r),o=this.getArea(),s=new vt.A(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,r,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return(0,at.applyTransform)(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,r)),i[1]=l.toGlobalCoord(l.dataToCoord(o,r)),i},e.prototype.clampData=function(t,r){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(t[0]),u=n.parse(t[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),r[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),r},e.prototype.pointToData=function(t,r){var i=[];if(this._invTransform)return(0,at.applyTransform)(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),r),i[1]=o.coordToData(o.toLocalCoord(t[1]),r),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var r=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),n=Math.min(r[0],r[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(r[0],r[1])-n+t,l=Math.max(i[0],i[1])-o+t;return new vt.A(n,o,s,l)},e}(Yy),Uy=Zy,Ee=E(20912),Xy=function(a){(0,O.C6)(e,a);function e(t,r,i,n,o){var s=a.call(this,t,r,i)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),t&&r[0]>r[1]&&r.reverse(),r},e.prototype.pointToData=function(t,r){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),r)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Ee.A),jy=Xy;function On(a,e,t){t=t||{};var r=a.coordinateSystem,i=e.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,h=r.getRect(),v=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,d=u==="x"?[v[2]-f,v[3]+f]:[v[0]-f,v[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(g,d[1]),d[0])}n.position=[u==="y"?d[c[l]]:v[0],u==="x"?d[c[l]]:v[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var y={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=y[s],n.labelOffset=o?d[c[s]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),p.retrieve(t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var m=e.get(["axisLabel","rotate"]);return n.labelRotate=l==="top"?-m:m,n.z2=1,n}function Ou(a){return a.get("coordinateSystem")==="cartesian2d"}function ku(a){var e={xAxisModel:null,yAxisModel:null};return p.each(e,function(t,r){var i=r.replace(/Model$/,""),n=a.getReferringComponents(i,J.US).models[0];e[r]=n}),e}var Gr=E(67071),pi=E(74562),kn=Math.log;function Nu(a,e,t){var r=pi.A.prototype,i=r.getTicks.call(t),n=r.getTicks.call(t,!0),o=i.length-1,s=r.getInterval.call(t),l=(0,Ut.Rx)(a,e),u=l.extent,h=l.fixMin,v=l.fixMax;if(a.type==="log"){var c=kn(a.base);u=[kn(u[0])/c,kn(u[1])/c]}a.setExtent(u[0],u[1]),a.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:v});var f=r.getExtent.call(a);h&&(u[0]=f[0]),v&&(u[1]=f[1]);var d=r.getInterval.call(a),g=u[0],y=u[1];if(h&&v)d=(y-g)/o;else if(h)for(y=u[0]+d*o;yu[0]&&isFinite(g)&&isFinite(u[0]);)d=(0,Gr.kH)(d),g=u[1]-d*o;else{var m=a.getTicks().length-1;m>o&&(d=(0,Gr.kH)(d));var S=d*o;y=Math.ceil(u[1]/d)*d,g=(0,k.LI)(y-S),g<0&&u[0]>=0?(g=0,y=(0,k.LI)(S)):y>0&&u[1]<=0&&(y=0,g=-(0,k.LI)(S))}var x=(i[0].value-n[0].value)/s,b=(i[o].value-n[o].value)/s;if(r.setExtent.call(a,g+d*x,y+d*b),r.setInterval.call(a,d),(x||b)&&r.setNiceExtent.call(a,g+d,y-d),0)var _}var Ky=function(){function a(e,t,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Vn,this._initCartesian(e,t,r),this.model=e}return a.prototype.getRect=function(){return this._rect},a.prototype.update=function(e,t){var r=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=(0,p.keys)(o),u=l.length;if(u){for(var h=[],v=u-1;v>=0;v--){var c=+l[v],f=o[c],d=f.model,g=f.scale;(0,Gr.rf)(g)&&d.get("alignTicks")&&d.get("interval")==null?h.push(f):((0,Ut.af)(g,d),(0,Gr.rf)(g)&&(s=f))}h.length&&(s||(s=h.pop(),(0,Ut.af)(s.scale,s.model)),(0,p.each)(h,function(y){Nu(y.scale,y.model,s.scale)}))}}i(r.x),i(r.y);var n={};(0,p.each)(r.x,function(o){zu(r,"y",o,n)}),(0,p.each)(r.y,function(o){zu(r,"x",o,n)}),this.resize(this.model,t)},a.prototype.resize=function(e,t,r){var i=e.getBoxLayoutParams(),n=!r&&e.get("containLabel"),o=(0,yt.dV)(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),n&&((0,p.each)(s,function(u){if(!u.model.get(["axisLabel","inside"])){var h=(0,Ut.Og)(u);if(h){var v=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[v]-=h[v]+c,u.position==="top"?o.y+=h.height+c:u.position==="left"&&(o.x+=h.width+c)}}}),l()),(0,p.each)(this._coordsList,function(u){u.calcAffineTransform()});function l(){(0,p.each)(s,function(u){var h=u.isHorizontal(),v=h?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(v[c],v[1-c]),$y(u,h?o.x:o.y)})}},a.prototype.getAxis=function(e,t){var r=this._axesMap[e];if(r!=null)return r[t||0]},a.prototype.getAxes=function(){return this._axesList.slice()},a.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var r="x"+e+"y"+t;return this._coordsMap[r]}(0,p.isObject)(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,n=this._coordsList;i0?"top":"bottom",n="center"):(0,k.dh)(i-qe)?(o=r>0?"bottom":"top",n="center"):(o="middle",i>0&&i0?"right":"left":n=r>0?"left":"right"),{rotation:i,textAlign:n,textVerticalAlign:o}},a.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},a.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},a}(),Gu={axisLine:function(a,e,t,r){var i=e.get(["axisLine","show"]);if(i==="auto"&&a.handleAutoShown&&(i=a.handleAutoShown("axisLine")),!!i){var n=e.axis.getExtent(),o=r.transform,s=[n[0],0],l=[n[1],0],u=s[0]>l[0];o&&((0,at.applyTransform)(s,s,o),(0,at.applyTransform)(l,l,o));var h=(0,p.extend)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),v=new le.A({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:a.strokeContainThreshold||5,silent:!0,z2:1});tt.subPixelOptimizeLine(v.shape,v.style.lineWidth),v.anid="line",t.add(v);var c=e.get(["axisLine","symbol"]);if(c!=null){var f=e.get(["axisLine","symbolSize"]);(0,p.isString)(c)&&(c=[c,c]),((0,p.isString)(f)||(0,p.isNumber)(f))&&(f=[f,f]);var d=(0,Tt.hV)(e.get(["axisLine","symbolOffset"])||0,f),g=f[0],y=f[1];(0,p.each)([{rotate:a.rotation+Math.PI/2,offset:d[0],r:0},{rotate:a.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,S){if(c[S]!=="none"&&c[S]!=null){var x=(0,Tt.v5)(c[S],-g/2,-y/2,g,y,h.stroke,!0),b=m.r+m.offset,_=u?l:s;x.attr({rotation:m.rotate,x:_[0]+b*Math.cos(a.rotation),y:_[1]-b*Math.sin(a.rotation),silent:!0,z2:11}),t.add(x)}})}}},axisTickLabel:function(a,e,t,r){var i=t0(t,r,e,a),n=r0(t,r,e,a);if(qy(e,n,i),e0(t,r,e,a.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=(0,Mn.os)((0,p.map)(n,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));(0,Mn.If)(o)}},axisName:function(a,e,t,r){var i=(0,p.retrieve)(a.axisName,e.get("name"));if(i){var n=e.get("nameLocation"),o=a.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),h=u[0]>u[1]?-1:1,v=[n==="start"?u[0]-h*l:n==="end"?u[1]+h*l:(u[0]+u[1])/2,Fu(n)?a.labelOffset+o*l:0],c,f=e.get("nameRotate");f!=null&&(f=f*qe/180);var d;Fu(n)?c=xr.innerTextLayout(a.rotation,f!=null?f:a.rotation,o):(c=Qy(a.rotation,n,f||0,u),d=a.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var g=s.getFont(),y=e.get("nameTruncate",!0)||{},m=y.ellipsis,S=(0,p.retrieve)(a.nameTruncateMaxWidth,y.maxWidth,d),x=new _t.Ay({x:v[0],y:v[1],rotation:c.rotation,silent:xr.isLabelSilent(e),style:(0,q.VB)(s,{text:i,font:g,overflow:"truncate",width:S,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(tt.setTooltipConfig({el:x,componentModel:e,itemName:i}),x.__fullText=i,x.anid="name",e.get("triggerEvent")){var b=xr.makeAxisEventDataBase(e);b.targetType="axisName",b.name=i,(0,ct.z)(x).eventData=b}r.add(x),x.updateTransform(),t.add(x),x.decomposeTransform()}}};function Qy(a,e,t,r){var i=(0,k._7)(t-a),n,o,s=r[0]>r[1],l=e==="start"&&!s||e!=="start"&&s;return(0,k.dh)(i-qe/2)?(o=l?"bottom":"top",n="center"):(0,k.dh)(i-qe*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",iqe/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function qy(a,e,t){if(!(0,Ut.PJ)(a.axis)){var r=a.get(["axisLabel","showMinLabel"]),i=a.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],h=t[1],v=t[t.length-1],c=t[t.length-2];r===!1?(xe(n),xe(u)):Hu(n,o)&&(r?(xe(o),xe(h)):(xe(n),xe(u))),i===!1?(xe(s),xe(v)):Hu(l,s)&&(i?(xe(l),xe(c)):(xe(s),xe(v)))}}function xe(a){a&&(a.ignore=!0)}function Hu(a,e){var t=a&&a.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(!(!t||!r)){var i=Lt.identity([]);return Lt.rotate(i,i,-a.rotation),t.applyTransform(Lt.mul([],i,a.getLocalTransform())),r.applyTransform(Lt.mul([],i,e.getLocalTransform())),t.intersect(r)}}function Fu(a){return a==="middle"||a==="center"}function Wu(a,e,t,r,i){for(var n=[],o=[],s=[],l=0;l=0||a===e}function l0(a){var e=Bn(a);if(e){var t=e.axisPointerModel,r=e.axis.scale,i=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=r.parse(o));var s=Gn(t);n==null&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var g=l;d.color!=null&&(g=p.defaults({color:d.color},l));var y=p.merge(p.clone(d),{boundaryGap:t,splitNumber:r,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:v,nameTextStyle:g,triggerEvent:c},!1);if(p.isString(h)){var m=y.name;y.name=h.replace("{value}",m!=null?m:"")}else p.isFunction(h)&&(y.name=h(y.name,y));var S=new Xt.A(y,null,this.ecModel);return p.mixin(S,xa.L.prototype),S.mainType="radar",S.componentIndex=this.componentIndex,S},this);this._indicatorModels=f},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:p.merge({lineStyle:{color:"#bbb"}},ba.axisLine),axisLabel:di(ba.axisLabel,!1),axisTick:di(ba.axisTick,!1),splitLine:di(ba.splitLine,!0),splitArea:di(ba.splitArea,!0),indicator:[]},e}(Ht.A),w0=A0,_a=E(31571),qu=E(42933),C0=["axisLine","axisTickLabel","axisName"],T0=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var r=t.coordinateSystem,i=r.getIndicatorAxes(),n=p.map(i,function(o){var s=o.model.get("showName")?o.name:"",l=new We(o.model,{axisName:s,position:[r.cx,r.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});p.each(n,function(o){p.each(C0,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var r=t.coordinateSystem,i=r.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),h=o.get("show"),v=s.get("show"),c=l.get("color"),f=u.get("color"),d=p.isArray(c)?c:[c],g=p.isArray(f)?f:[f],y=[],m=[];function S(R,V,B){var z=B%V.length;return R[z]=R[z]||[],z}if(n==="circle")for(var x=i[0].getTicksCoords(),b=r.cx,_=r.cy,A=0;A3?1.4:o>1?1.2:1.1,h=n>0?u:1/u;Wn(this,"zoom","zoomOnMouseWheel",t,{scale:h,originX:s,originY:l,isAvailableBehavior:null})}if(i){var v=Math.abs(n),c=(n>0?1:-1)*(v>3?.4:v>1?.15:.05);Wn(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!eh(this._zr,"globalPan")){var r=t.pinchScale>1?1.1:1/1.1;Wn(this,"zoom",null,t,{scale:r,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(gt.A);function Wn(a,e,t,r,i){a.pointerChecker&&a.pointerChecker(r,i.originX,i.originY)&&(pe.ds(r.event),rh(a,e,t,r,i))}function rh(a,e,t,r,i){i.isAvailableBehavior=(0,p.bind)(yi,null,t,r),a.trigger(e,i)}function yi(a,e,t){var r=t[a];return!a||r&&(!(0,p.isString)(r)||e.event[r+"Key"])}var Aa=k0;function Yn(a,e,t){var r=a.target;r.x+=e,r.y+=t,r.dirty()}function Zn(a,e,t,r){var i=a.target,n=a.zoomLimit,o=a.zoom=a.zoom||1;if(o*=e,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/a.zoom;a.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(r-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var N0={axisPointer:1,tooltip:1,brush:1};function mi(a,e,t){var r=e.getComponentByElement(a.topTarget),i=r&&r.coordinateSystem;return r&&r!==t&&!N0.hasOwnProperty(r.mainType)&&i&&i.model!==t}var z0=E(18393),xi=E(59442),B0=E(82250);function ah(a){if((0,p.isString)(a)){var e=new DOMParser;a=e.parseFromString(a,"text/xml")}var t=a;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Un,Si={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},ih=(0,p.keys)(Si),bi={"alignment-baseline":"textBaseline","stop-color":"stopColor"},nh=(0,p.keys)(bi),G0=function(){function a(){this._defs={},this._root=null}return a.prototype.parse=function(e,t){t=t||{};var r=ah(e);this._defsUsePending=[];var i=new it.A;this._root=i;var n=[],o=r.getAttribute("viewBox")||"",s=parseFloat(r.getAttribute("width")||t.width),l=parseFloat(r.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),de(r,i,null,!0,!1);for(var u=r.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;W0(this._defs,this._defsUsePending),this._defsUsePending=[];var h,v;if(o){var c=_i(o);c.length>=4&&(h={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(h&&s!=null&&l!=null&&(v=fh(h,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var f=i;i=new it.A,i.add(f),f.scaleX=f.scaleY=v.scale,f.x=v.x,f.y=v.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Dt.A({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:h,viewBoxTransform:v,named:n}},a.prototype._parseNode=function(e,t,r,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var h=Un[s];if(h&&(0,p.hasOwn)(Un,s)){l=h.call(this,e,t);var v=e.getAttribute("name");if(v){var c={name:v,namedFrom:null,svgNodeTagLower:s,el:l};r.push(c),s==="g"&&(u=c)}else i&&r.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var f=oh[s];if(f&&(0,p.hasOwn)(oh,s)){var d=f.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=d)}}if(l&&l.isGroup)for(var y=e.firstChild;y;)y.nodeType===1?this._parseNode(y,l,r,u,n,o):y.nodeType===3&&o&&this._parseText(y,l),y=y.nextSibling},a.prototype._parseText=function(e,t){var r=new na.A({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});be(t,r),de(e,r,this._defsUsePending,!1,!1),H0(r,t);var i=r.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,r.scaleX*=n/9,r.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=r.getBoundingRect();return this._textX+=s.width,t.add(r),r},a.internalField=function(){Un={g:function(e,t){var r=new it.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r},rect:function(e,t){var r=new Dt.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),r.silent=!0,r},circle:function(e,t){var r=new _a.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),r.silent=!0,r},line:function(e,t){var r=new le.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),r.silent=!0,r},ellipse:function(e,t){var r=new z0.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),r.silent=!0,r},polygon:function(e,t){var r=e.getAttribute("points"),i;r&&(i=uh(r));var n=new Se.A({shape:{points:i||[]},silent:!0});return be(t,n),de(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var r=e.getAttribute("points"),i;r&&(i=uh(r));var n=new Pe.A({shape:{points:i||[]},silent:!0});return be(t,n),de(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var r=new ue.Ay;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),r.silent=!0,r},text:function(e,t){var r=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new it.A;return be(t,s),de(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var r=e.getAttribute("x"),i=e.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new it.A;return be(t,s),de(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var r=e.getAttribute("d")||"",i=(0,xi.UJ)(r);return be(t,i),de(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),a}(),oh={lineargradient:function(a){var e=parseInt(a.getAttribute("x1")||"0",10),t=parseInt(a.getAttribute("y1")||"0",10),r=parseInt(a.getAttribute("x2")||"10",10),i=parseInt(a.getAttribute("y2")||"0",10),n=new ii.A(e,t,r,i);return sh(a,n),lh(a,n),n},radialgradient:function(a){var e=parseInt(a.getAttribute("cx")||"0",10),t=parseInt(a.getAttribute("cy")||"0",10),r=parseInt(a.getAttribute("r")||"0",10),i=new B0.A(e,t,r);return sh(a,i),lh(a,i),i}};function sh(a,e){var t=a.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function lh(a,e){for(var t=a.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var r=t.getAttribute("offset"),i=void 0;r&&r.indexOf("%")>0?i=parseInt(r,10)/100:r?i=parseFloat(r):i=0;var n={};ch(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function be(a,e){a&&a.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),(0,p.defaults)(e.__inheritedStyle,a.__inheritedStyle))}function uh(a){for(var e=_i(a),t=[],r=0;r0;n-=2){var o=r[n],s=r[n-1],l=_i(o);switch(i=i||Lt.create(),s){case"translate":Lt.translate(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Lt.scale(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Lt.rotate(i,i,-parseFloat(l[0])*Xn,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Xn);Lt.mul(i,[1,0,u,1,0,0],i);break;case"skewY":var h=Math.tan(parseFloat(l[0])*Xn);Lt.mul(i,[1,h,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var vh=/([^\s:;]+)\s*:\s*([^:;]+)/g;function ch(a,e,t){var r=a.getAttribute("style");if(r){vh.lastIndex=0;for(var i;(i=vh.exec(r))!=null;){var n=i[1],o=(0,p.hasOwn)(Si,n)?Si[n]:null;o&&(e[o]=i[2]);var s=(0,p.hasOwn)(bi,n)?bi[n]:null;s&&(t[s]=i[2])}}}function X0(a,e,t){for(var r=0;r"].join(r)}function mn(a){return{zrId:a,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function wl(a,e,t,r){return $t("svg","root",{width:a,height:e,xmlns:Et,"xmlns:xlink":oe,version:"1.1",baseProfile:"full",viewBox:r?"0 0 "+a+" "+e:!1},t)}var tg=E(12191),Me=E(92836),la=E(68717),Cl=E(82591),eg=E(96320),rg=0;function Tl(){return rg++}var Il={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},cr="transform-origin";function ag(a,e,t){var r=(0,p.extend)({},a.shape);(0,p.extend)(r,e),a.buildPath(t,r);var i=new F;return i.reset((0,bt.MD)(a)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function ig(a,e){var t=e.originX,r=e.originY;(t||r)&&(a[cr]=t+"px "+r+"px")}var ng={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Dl(a,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=a,t}function og(a,e,t){var r=a.shape.paths,i={},n,o;if((0,p.each)(r,function(l){var u=mn(t.zrId);u.animation=!0,ri(l,{},u,!0);var h=u.cssAnims,v=u.cssNodes,c=(0,p.keys)(h),f=c.length;if(f){o=c[f-1];var d=h[o];for(var g in d){var y=d[g];i[g]=i[g]||{d:""},i[g].d+=y.d||""}for(var m in v){var S=v[m].animation;S.indexOf(o)>=0&&(n=S)}}}),!!n){e.d=!1;var s=Dl(i,t);return n.replace(o,s)}}function Ll(a){return(0,p.isString)(a)?Il[a]?"cubic-bezier("+Il[a]+")":(0,eg.w)(a)?a:"":""}function ri(a,e,t,r){var i=a.animators,n=i.length,o=[];if(a instanceof Cl.A){var s=og(a,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u0}).length){var xt=Dl(w,t);return xt+" "+S[0]+" both"}}for(var y in l){var s=g(l[y]);s&&o.push(s)}if(o.length){var m=t.zrId+"-cls-"+Tl();t.cssNodes["."+m]={animation:o.join(",")},e.class=m}}var _t=E(32322),Wt=E(47698);function sg(a,e,t){if(!a.ignore)if(a.isSilent()){var r={"pointer-events":"none"};Ml(r,e,t,!0)}else{var i=a.states.emphasis&&a.states.emphasis.style?a.states.emphasis.style:{},n=i.fill;if(!n){var o=a.style&&a.style.fill,s=a.states.select&&a.states.select.style&&a.states.select.style.fill,l=a.currentStates.indexOf("select")>=0&&s||o;l&&(n=(0,Wt.liftColor)(l))}var u=i.lineWidth;if(u){var h=!i.strokeNoScale&&a.transform?a.transform[0]:1;u=u/h}var r={cursor:"pointer"};n&&(r.fill=n),i.stroke&&(r.stroke=i.stroke),u&&(r["stroke-width"]=u),Ml(r,e,t,!0)}}function Ml(a,e,t,r){var i=JSON.stringify(a),n=t.cssStyleCache[i];n||(n=t.zrId+"-cls-"+Tl(),t.cssStyleCache[i]=n,t.cssNodes["."+n+(r?":hover":"")]=a),e.class=e.class?e.class+" "+n:n}var lg=E(82755),ua=Math.round;function Pl(a){return a&&(0,p.isString)(a.src)}function Rl(a){return a&&(0,p.isFunction)(a.toDataURL)}function xn(a,e,t,r){Qt(function(i,n){var o=i==="fill"||i==="stroke";o&&(0,bt.bn)(n)?zl(e,a,i,r):o&&(0,bt.Pt)(n)?Bl(t,a,i,r):o&&n==="none"?a[i]="transparent":a[i]=n},e,t,!1),dg(t,a,r)}function Sn(a,e){var t=(0,lg.getElementSSRData)(e);t&&(t.each(function(r,i){r!=null&&(a[(Oe+i).toLowerCase()]=r+"")}),e.isSilent()&&(a[Oe+"silent"]="true"))}function El(a){return(0,bt.Cv)(a[0]-1)&&(0,bt.Cv)(a[1])&&(0,bt.Cv)(a[2])&&(0,bt.Cv)(a[3]-1)}function ug(a){return(0,bt.Cv)(a[4])&&(0,bt.Cv)(a[5])}function bn(a,e,t){if(e&&!(ug(e)&&El(e))){var r=t?10:1e4;a.transform=El(e)?"translate("+ua(e[4]*r)/r+" "+ua(e[5]*r)/r+")":(0,bt.nV)(e)}}function Vl(a,e,t){for(var r=a.points,i=[],n=0;nn?(d=t[l+1]==null?null:t[l+1].elm,Ul(a,d,t,i,l)):ai(a,e,r,n))}function Or(a,e){var t=e.elm=a.elm,r=a.children,i=e.children;a!==e&&(wn(a,e),An(e.text)?ke(r)&&ke(i)?r!==i&&Sg(t,r,i):ke(i)?(ke(a.text)&&_n(t,""),Ul(t,null,i,0,i.length-1)):ke(r)?ai(t,r,0,r.length-1):ke(a.text)&&_n(t,""):a.text!==e.text&&(ke(r)&&ai(t,r,0,r.length-1),_n(t,e.text)))}function bg(a,e){if(ha(a,e))Or(a,e);else{var t=a.elm,r=Wl(t);va(e),r!==null&&(fr(r,e.elm,Yl(t)),ai(r,[a],0,0))}return e}var _g=0,Ag=function(){function a(e,t,r){if(this.type="svg",this.refreshHover=Xl("refreshHover"),this.configLayer=Xl("configLayer"),this.storage=t,this._opts=r=(0,p.extend)({},r),this.root=e,this._id="zr"+_g++,this._oldVNode=wl(r.width,r.height),e&&!r.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=Al("svg");wn(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(r.width,r.height)}return a.prototype.getType=function(){return this.type},a.prototype.getViewportRoot=function(){return this._viewport},a.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},a.prototype.getSvgDom=function(){return this._svgDom},a.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",bg(this._oldVNode,e),this._oldVNode=e}},a.prototype.renderOneToVNode=function(e){return Nl(e,mn(this._id))},a.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),r=this._width,i=this._height,n=mn(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress,n.emphasis=e.emphasis;var o=[],s=this._bgVNode=wg(r,i,this._backgroundColor,n);s&&o.push(s);var l=e.compress?null:this._mainVNode=$t("g","main",{},[]);this._paintList(t,n,l?l.children:o),l&&o.push(l);var u=(0,p.map)((0,p.keys)(n.defs),function(c){return n.defs[c]});if(u.length&&o.push($t("defs","defs",{},u)),e.animation){var h=qd(n.cssNodes,n.cssAnims,{newline:!0});if(h){var v=$t("style","stl",{},[],h);o.push(v)}}return wl(r,i,o,e.useViewBox)},a.prototype.renderToString=function(e){return e=e||{},yn(this.renderToVNode({animation:(0,p.retrieve2)(e.cssAnimation,!0),emphasis:(0,p.retrieve2)(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:(0,p.retrieve2)(e.useViewBox,!0)}),{newline:!0})},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e},a.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},a.prototype._paintList=function(e,t,r){for(var i=e.length,n=[],o=0,s,l,u=0,h=0;h=0&&!(c&&l&&c[g]===l[g]);g--);for(var y=d-1;y>g;y--)o--,s=n[o-1];for(var m=g+1;m-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),r},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ot.A),Dg=Ig,Q=E(5638),tt=E(43199),ft=E(69622),U=E(34833),jl=E(58267);function kr(a,e){var t=a.mapDimensionsAll("defaultedLabel"),r=t.length;if(r===1){var i=(0,jl.QE)(a,e,t[0]);return i!=null?i+"":null}else if(r){for(var n=[],o=0;o=0&&r.push(e[n])}return r.join(" ")}var q=E(89632),Lg=function(a){(0,O.C6)(e,a);function e(t,r,i,n){var o=a.call(this)||this;return o.updateData(t,r,i,n),o}return e.prototype._createSymbol=function(t,r,i,n,o){this.removeAll();var s=(0,Tt.v5)(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),s.drift=Mg,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){(0,U.HY)(this.childAt(0))},e.prototype.downplay=function(){(0,U.SD)(this.childAt(0))},e.prototype.setZ=function(t,r){var i=this.childAt(0);i.zlevel=t,i.z=r},e.prototype.setDraggable=function(t,r){var i=this.childAt(0);i.draggable=t,i.cursor=!r&&t?"move":i.cursor},e.prototype.updateData=function(t,r,i,n){this.silent=!1;var o=t.getItemVisual(r,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,r),u=o!==this._symbolType,h=n&&n.disableAnimation;if(u){var v=t.getItemVisual(r,"symbolKeepAspect");this._createSymbol(o,t,r,l,v)}else{var c=this.childAt(0);c.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};h?c.attr(f):Q.oi(c,f,s,r),(0,Q.ap)(c)}if(this._updateCommon(t,r,l,i,n),u){var c=this.childAt(0);if(!h){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Q.LW(c,f,s,r)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,r,i,n,o){var s=this.childAt(0),l=t.hostModel,u,h,v,c,f,d,g,y,m;if(n&&(u=n.emphasisItemStyle,h=n.blurItemStyle,v=n.selectItemStyle,c=n.focus,f=n.blurScope,g=n.labelStatesModels,y=n.hoverScale,m=n.cursorStyle,d=n.emphasisDisabled),!n||t.hasItemOption){var S=n&&n.itemModel?n.itemModel:t.getItemModel(r),x=S.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),v=S.getModel(["select","itemStyle"]).getItemStyle(),h=S.getModel(["blur","itemStyle"]).getItemStyle(),c=x.get("focus"),f=x.get("blurScope"),d=x.get("disabled"),g=(0,q.lx)(S),y=x.getShallow("scale"),m=S.getShallow("cursor")}var b=t.getItemVisual(r,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var _=(0,Tt.hV)(t.getItemVisual(r,"symbolOffset"),i);_&&(s.x=_[0],s.y=_[1]),m&&s.attr("cursor",m);var A=t.getItemVisual(r,"style"),w=A.fill;if(s instanceof ue.Ay){var C=s.style;s.useStyle((0,p.extend)({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},A))}else s.__isEmptyBrush?s.useStyle((0,p.extend)({},A)):s.useStyle(A),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var T=t.getItemVisual(r,"liftZ"),I=this._z2;T!=null?I==null&&(this._z2=s.z2,s.z2+=T):I!=null&&(s.z2=I,this._z2=null);var D=o&&o.useNameLabel;(0,q.qM)(s,g,{labelFetcher:l,labelDataIndex:r,defaultText:L,inheritColor:w,defaultOpacity:A.opacity});function L(R){return D?t.getName(R):kr(t,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var M=s.ensureState("emphasis");M.style=u,s.ensureState("select").style=v,s.ensureState("blur").style=h;var P=y==null||y===!0?Math.max(1.1,3/this._sizeY):isFinite(y)&&y>0?+y:1;M.scaleX=this._sizeX*P,M.scaleY=this._sizeY*P,this.setSymbolScale(1),(0,U.Lm)(this,c,f,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,r,i){var n=this.childAt(0),o=(0,ft.z)(this).dataIndex,s=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var l=n.getTextContent();l&&Q.Nz(l,{style:{opacity:0}},r,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();Q.Nz(n,{style:{opacity:0},scaleX:0,scaleY:0},r,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,r){return(0,Tt.xU)(t.getItemVisual(r,"symbolSize"))},e}(it.A);function Mg(a,e){this.parent.drift(a,e)}var ca=Lg;function Cn(a,e,t,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r.isIgnore&&r.isIgnore(t))&&!(r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&a.getItemVisual(t,"symbol")!=="none"}function $l(a){return a!=null&&!(0,p.isObject)(a)&&(a={isIgnore:a}),a||{}}function Jl(a){var e=a.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:(0,q.lx)(e),cursorStyle:e.get("cursor")}}var Pg=function(){function a(e){this.group=new it.A,this._SymbolCtor=e||ca}return a.prototype.updateData=function(e,t){this._progressiveEls=null,t=$l(t);var r=this.group,i=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Jl(e),u={disableAnimation:s},h=t.getSymbolPoint||function(v){return e.getItemLayout(v)};n||r.removeAll(),e.diff(n).add(function(v){var c=h(v);if(Cn(e,c,v,t)){var f=new o(e,v,l,u);f.setPosition(c),e.setItemGraphicEl(v,f),r.add(f)}}).update(function(v,c){var f=n.getItemGraphicEl(c),d=h(v);if(!Cn(e,d,v,t)){r.remove(f);return}var g=e.getItemVisual(v,"symbol")||"circle",y=f&&f.getSymbolType&&f.getSymbolType();if(!f||y&&y!==g)r.remove(f),f=new o(e,v,l,u),f.setPosition(d);else{f.updateData(e,v,l,u);var m={x:d[0],y:d[1]};s?f.attr(m):Q.oi(f,m,i)}r.add(f),e.setItemGraphicEl(v,f)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&c.fadeOut(function(){r.remove(c)},i)}).execute(),this._getSymbolPoint=h,this._data=e},a.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(r,i){var n=e._getSymbolPoint(i);r.setPosition(n),r.markRedraw()})},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Jl(e),this._data=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t,r){this._progressiveEls=[],r=$l(r);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0?t=r[0]:r[1]<0&&(t=r[1]),t}function ql(a,e,t,r){var i=NaN;a.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=a.valueStart);var n=a.baseDataOffset,o=[];return o[n]=t.get(a.baseDim,r),o[1-n]=i,e.dataToPoint(o)}var dr=E(8957);function Eg(a,e){var t=[];return e.diff(a).add(function(r){t.push({cmd:"+",idx:r})}).update(function(r,i){t.push({cmd:"=",idx:i,idx1:r})}).remove(function(r){t.push({cmd:"-",idx:r})}).execute(),t}function Vg(a,e,t,r,i,n,o,s){for(var l=Eg(a,e),u=[],h=[],v=[],c=[],f=[],d=[],g=[],y=Ql(i,e,o),m=a.getLayout("points")||[],S=e.getLayout("points")||[],x=0;x=i||g<0)break;if(gr(m,S)){if(l){g+=n;continue}break}if(g===t)a[n>0?"moveTo":"lineTo"](m,S),v=m,c=S;else{var x=m-u,b=S-h;if(x*x+b*b<.5){g+=n;continue}if(o>0){for(var _=g+n,A=e[_*2],w=e[_*2+1];A===m&&w===S&&y=r||gr(A,w))f=m,d=S;else{I=A-u,D=w-h;var P=m-u,R=A-m,V=S-h,B=w-S,z=void 0,W=void 0;if(s==="x"){z=Math.abs(P),W=Math.abs(R);var $=I>0?1:-1;f=m-$*z*o,d=S,L=m+$*W*o,M=S}else if(s==="y"){z=Math.abs(V),W=Math.abs(B);var K=D>0?1:-1;f=m,d=S-K*z*o,L=m,M=S+K*W*o}else z=Math.sqrt(P*P+V*V),W=Math.sqrt(R*R+B*B),T=W/(W+z),f=m-I*o*(1-T),d=S-D*o*(1-T),L=m+I*o*T,M=S+D*o*T,L=$e(L,Je(A,m)),M=$e(M,Je(w,S)),L=Je(L,$e(A,m)),M=Je(M,$e(w,S)),I=L-m,D=M-S,f=m-I*z/W,d=S-D*z/W,f=$e(f,Je(u,m)),d=$e(d,Je(h,S)),f=Je(f,$e(u,m)),d=Je(d,$e(h,S)),I=m-f,D=S-d,L=m+I*W/z,M=S+D*W/z}a.bezierCurveTo(v,c,f,d,m,S),v=L,c=M}else a.lineTo(m,S)}u=m,h=S,g+=n}return y}var tu=function(){function a(){this.smooth=0,this.smoothConstraint=!0}return a}(),Og=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-polyline",r}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new tu},e.prototype.buildPath=function(t,r){var i=r.points,n=0,o=i.length/2;if(r.connectNulls){for(;o>0&&gr(i[o*2-2],i[o*2-1]);o--);for(;n=0){var b=u?(d-l)*x+l:(f-s)*x+s;return u?[t,b]:[b,t]}s=f,l=d;break;case o.C:f=n[v++],d=n[v++],g=n[v++],y=n[v++],m=n[v++],S=n[v++];var _=u?(0,ge._E)(s,f,g,m,t,h):(0,ge._E)(l,d,y,S,t,h);if(_>0)for(var A=0;A<_;A++){var w=h[A];if(w<=1&&w>=0){var b=u?(0,ge.Yb)(l,d,y,S,w):(0,ge.Yb)(s,f,g,m,w);return u?[t,b]:[b,t]}}s=m,l=S;break}}},e}(Vt.Ay),kg=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e}(tu),eu=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-polygon",r}return e.prototype.getDefaultShape=function(){return new kg},e.prototype.buildPath=function(t,r){var i=r.points,n=r.stackedOnPoints,o=0,s=i.length/2,l=r.smoothMonotone;if(r.connectNulls){for(;s>0&&gr(i[s*2-2],i[s*2-1]);s--);for(;oe){n?t.push(o(n,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),n=l}return t}function Bg(a,e,t){var r=a.getVisual("visualMeta");if(!(!r||!r.length||!a.count())&&e.type==="cartesian2d"){for(var i,n,o=r.length-1;o>=0;o--){var s=a.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=r[o];break}}if(n){var l=e.getAxis(i),u=p.map(n.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),h=u.length,v=n.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),v.reverse());var c=zg(u,i==="x"?t.getWidth():t.getHeight()),f=c.length;if(!f&&h)return u[0].coord<0?v[1]?v[1]:u[h-1].color:v[0]?v[0]:u[0].color;var d=10,g=c[0].coord-d,y=c[f-1].coord+d,m=y-g;if(m<.001)return"transparent";p.each(c,function(x){x.offset=(x.coord-g)/m}),c.push({offset:f?c[f-1].offset:.5,color:v[1]||"transparent"}),c.unshift({offset:f?c[0].offset:.5,color:v[0]||"transparent"});var S=new ii.A(0,0,0,0,c,!0);return S[i]=g,S[i+"2"]=y,S}}}function Gg(a,e,t){var r=a.get("showAllSymbol"),i=r==="auto";if(!(r&&!i)){var n=t.getAxesByScale("ordinal")[0];if(n&&!(i&&Hg(n,e))){var o=e.mapDimension(n.dim),s={};return p.each(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Hg(a,e){var t=a.getExtent(),r=Math.abs(t[1]-t[0])/a.scale.count();isNaN(r)&&(r=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function Fg(a,e){return isNaN(a)||isNaN(e)}function Wg(a){for(var e=a.length/2;e>0&&Fg(a[e*2-2],a[e*2-1]);e--);return e-1}function lu(a,e){return[a[e*2],a[e*2+1]]}function Yg(a,e,t){for(var r=a.length/2,i=t==="x"?0:1,n,o,s=0,l=-1,u=0;u=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function uu(a){if(a.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var $=g.getState("emphasis").style;$.lineWidth=+g.style.lineWidth+1}(0,ft.z)(g).seriesIndex=t.seriesIndex,(0,U.Lm)(g,B,z,W);var K=su(t.get("smooth")),et=t.get("smoothMonotone");if(g.setShape({smooth:K,smoothMonotone:et,connectNulls:C}),y){var lt=l.getCalculationInfo("stackedOnSeries"),ot=0;y.useStyle(p.defaults(h.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),lt&&(ot=su(lt.get("smooth"))),y.setShape({smooth:K,stackedOnSmooth:ot,smoothMonotone:et,connectNulls:C}),(0,U.Mx)(y,t,"areaStyle"),(0,ft.z)(y).seriesIndex=t.seriesIndex,(0,U.Lm)(y,B,z,W)}var mt=function(At){n._changePolyState(At)};l.eachItemGraphicEl(function(At){At&&(At.onHoverStateChange=mt)}),this._polyline.onHoverStateChange=mt,this._data=l,this._coordSys=o,this._stackedOnPoints=A,this._points=v,this._step=D,this._valueOrigin=b,t.get("triggerLineEvent")&&(this.packEventData(t,g),y&&this.packEventData(t,y))},e.prototype.packEventData=function(t,r){(0,ft.z)(r).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,r,i,n){var o=t.getData(),s=J.le(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],v=l[s*2+1];if(isNaN(h)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,v))return;var c=t.get("zlevel")||0,f=t.get("z")||0;u=new ca(o,s),u.x=h,u.y=v,u.setZ(c,f);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=f,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Nt.A.prototype.highlight.call(this,t,r,i,n)},e.prototype.downplay=function(t,r,i,n){var o=t.getData(),s=J.le(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Nt.A.prototype.downplay.call(this,t,r,i,n)},e.prototype._changePolyState=function(t){var r=this._polygon;(0,U.Pk)(this._polyline,t),r&&(0,U.Pk)(r,t)},e.prototype._newPolyline=function(t){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new Og({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},e.prototype._newPolygon=function(t,r){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new eu({shape:{points:t,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,r,i){var n,o,s=r.getBaseAxis(),l=s.inverse;r.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):r.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,h=u.get("animationDuration");p.isFunction(h)&&(h=h(null));var v=u.get("animationDelay")||0,c=p.isFunction(v)?v(null):v;t.eachItemGraphicEl(function(f,d){var g=f;if(g){var y=[f.x,f.y],m=void 0,S=void 0,x=void 0;if(i)if(o){var b=i,_=r.pointToCoord(y);n?(m=b.startAngle,S=b.endAngle,x=-_[1]/180*Math.PI):(m=b.r0,S=b.r,x=_[0])}else{var A=i;n?(m=A.x,S=A.x+A.width,x=f.x):(m=A.y+A.height,S=A.y,x=f.y)}var w=S===m?0:(x-m)/(S-m);l&&(w=1-w);var C=p.isFunction(v)?v(d):h*w+c,T=g.getSymbolPath(),I=T.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),I&&I.animateFrom({style:{opacity:0}},{duration:300,delay:C}),T.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,r,i){var n=t.getModel("endLabel");if(uu(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new _t.Ay({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=Wg(l);h>=0&&((0,q.qM)(s,(0,q.lx)(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:h,defaultText:function(v,c,f){return f!=null?Kl(o,f):kr(o,v)},enableTextSetter:!0},Zg(n,r)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,r,i,n,o,s,l){var u=this._endLabel,h=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var v=i.getLayout("points"),c=i.hostModel,f=c.get("connectNulls"),d=s.get("precision"),g=s.get("distance")||0,y=l.getBaseAxis(),m=y.isHorizontal(),S=y.inverse,x=r.shape,b=S?m?x.x:x.y+x.height:m?x.x+x.width:x.y,_=(m?g:0)*(S?-1:1),A=(m?0:-g)*(S?-1:1),w=m?"x":"y",C=Yg(v,b,w),T=C.range,I=T[1]-T[0],D=void 0;if(I>=1){if(I>1&&!f){var L=lu(v,T[0]);u.attr({x:L[0]+_,y:L[1]+A}),o&&(D=c.getRawValue(T[0]))}else{var L=h.getPointOn(b,w);L&&u.attr({x:L[0]+_,y:L[1]+A});var M=c.getRawValue(T[0]),P=c.getRawValue(T[1]);o&&(D=J.Il(i,d,M,P,C.t))}n.lastFrameIndex=T[0]}else{var R=t===1||n.lastFrameIndex>0?T[0]:0,L=lu(v,R);o&&(D=c.getRawValue(R)),u.attr({x:L[0]+_,y:L[1]+A})}if(o){var V=(0,q.Lu)(u);typeof V.setLabelText=="function"&&V.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,r,i,n,o,s,l){var u=this._polyline,h=this._polygon,v=t.hostModel,c=Vg(this._data,t,this._stackedOnPoints,r,this._coordSys,i,this._valueOrigin,s),f=c.current,d=c.stackedOnCurrent,g=c.next,y=c.stackedOnNext;if(o&&(f=Qe(c.current,i,o,l),d=Qe(c.stackedOnCurrent,i,o,l),g=Qe(c.next,i,o,l),y=Qe(c.stackedOnNext,i,o,l)),ou(f,g)>3e3||h&&ou(d,y)>3e3){u.stopAnimation(),u.setShape({points:g}),h&&(h.stopAnimation(),h.setShape({points:g,stackedOnPoints:y}));return}u.shape.__points=c.current,u.shape.points=f;var m={shape:{points:g}};c.current!==f&&(m.shape.__points=c.next),u.stopAnimation(),Q.oi(u,m,v),h&&(h.setShape({points:f,stackedOnPoints:d}),h.stopAnimation(),Q.oi(h,{shape:{stackedOnPoints:y}},v),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var S=[],x=c.status,b=0;be&&(e=a[t]);return isFinite(e)?e:NaN},min:function(a){for(var e=1/0,t=0;te&&(e=n,t=i)}return isFinite(t)?t:NaN},nearest:function(a){return a[0]}},Kg=function(a){return Math.round(a.length/2)};function hu(a){return{seriesType:a,reset:function(e,t,r){var i=e.getData(),n=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),v=r.getDevicePixelRatio(),c=Math.abs(h[1]-h[0])*(v||1),f=Math.round(s/c);if(isFinite(f)&&f>1){n==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/f));var d=void 0;(0,p.isString)(n)?d=jg[n]:(0,p.isFunction)(n)&&(d=n),d&&e.setData(i.downSample(i.mapDimension(u.dim),1/f,d,Kg))}}}}}function $g(a){a.registerChartView(Xg),a.registerSeriesModel(Dg),a.registerLayout(da("line",!0)),a.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),r=e.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",r)}}),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,hu("line"))}var ga=E(62536),vu=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return(0,Fe.A)(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,r,i){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(t),s=n.dataToPoint(o);if(i)(0,p.each)(n.getAxes(),function(c,f){if(c.type==="category"&&r!=null){var d=c.getTicksCoords(),g=c.getTickModel().get("alignWithLabel"),y=o[f],m=r[f]==="x1"||r[f]==="y1";if(m&&!g&&(y+=1),d.length<2)return;if(d.length===2){s[f]=c.toGlobalCoord(c.getExtent()[m?1:0]);return}for(var S=void 0,x=void 0,b=1,_=0;_y){x=(A+S)/2;break}_===1&&(b=w-d[0].tickValue)}x==null&&(S?S&&(x=d[d.length-1].coord):x=d[0].coord),s[f]=c.toGlobalCoord(x)}});else{var l=this.getData(),u=l.getLayout("offset"),h=l.getLayout("size"),v=n.getBaseAxis().isHorizontal()?0:1;s[v]+=u+h/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Ot.A);Ot.A.registerClass(vu);var oi=vu,Ne=E(12616),Jg=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return(0,Fe.A)(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),r=this.get("largeThreshold");return r>t&&(t=r),t},e.prototype.brushSelector=function(t,r,i){return i.rect(r.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=(0,Ne.G_)(oi.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(oi),Qg=Jg,me=E(24711),qg=function(){function a(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return a}(),ty=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="sausage",r}return e.prototype.getDefaultShape=function(){return new qg},e.prototype.buildPath=function(t,r){var i=r.cx,n=r.cy,o=Math.max(r.r0||0,0),s=Math.max(r.r,0),l=(s-o)*.5,u=o+l,h=r.startAngle,v=r.endAngle,c=r.clockwise,f=Math.PI*2,d=c?v-hMath.PI/2&&hs)return!0;s=v}return!1},e.prototype._isOrderDifferentInView=function(t,r){for(var i=r.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,r,i,n){if(this._isOrderChangedWithinSameData(t,r,i)){var o=this._dataSort(t,i,r);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,r,i){var n=r.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(r.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,r){this._clear(this._model),this._removeOnRenderedListener(r)},e.prototype.dispose=function(t,r){this._removeOnRenderedListener(r)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var r=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){(0,Q.t5)(n,t,(0,ft.z)(n).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Nt.A),cu={cartesian2d:function(a,e){var t=e.width<0?-1:1,r=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var i=a.x+a.width,n=a.y+a.height,o=Dn(e.x,a.x),s=Ln(e.x+e.width,i),l=Dn(e.y,a.y),u=Ln(e.y+e.height,n),h=si?s:o,e.y=v&&l>n?u:l,e.width=h?0:s-o,e.height=v?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),h||v},polar:function(a,e){var t=e.r0<=e.r?1:-1;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}var i=Ln(e.r,a.r),n=Dn(e.r0,a.r0);e.r=i,e.r0=n;var o=i-n<0;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}return o}},fu={cartesian2d:function(a,e,t,r,i,n,o,s,l){var u=new Dt.A({shape:(0,p.extend)({},r),z2:1});if(u.__dataIndex=t,u.name="item",n){var h=u.shape,v=i?"height":"width";h[v]=0}return u},polar:function(a,e,t,r,i,n,o,s,l){var u=!i&&l?si:ye.A,h=new u({shape:r,z2:1});h.name="item";var v=yu(i);if(h.calculateTextPosition=ey(v,{isRoundCap:u===si}),n){var c=h.shape,f=i?"r":"endAngle",d={};c[f]=i?r.r0:r.startAngle,d[f]=r[f],(s?Q.oi:Q.LW)(h,{shape:d},n)}return h}};function ny(a,e){var t=a.get("realtimeSort",!0),r=e.getBaseAxis();if(t&&r.type==="category"&&e.type==="cartesian2d")return{baseAxis:r,otherAxis:e.getOtherAxis(r)}}function pu(a,e,t,r,i,n,o,s){var l,u;n?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(o?Q.oi:Q.LW)(t,{shape:l},e,i,null);var h=e?a.baseAxis.model:null;(o?Q.oi:Q.LW)(t,{shape:u},h,i)}function du(a,e){for(var t=0;t0?1:-1,o=r.height>0?1:-1;return{x:r.x+n*i/2,y:r.y+o*i/2,width:r.width-n*i,height:r.height-o*i}},polar:function(a,e,t){var r=a.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function ly(a){return a.startAngle!=null&&a.endAngle!=null&&a.startAngle===a.endAngle}function yu(a){return function(e){var t=e?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+t;default:return r}}}(a)}function mu(a,e,t,r,i,n,o,s){var l=e.getItemVisual(t,"style");if(s){if(!n.get("roundCap")){var h=a.shape,v=mr(r.getModel("itemStyle"),h,!0);(0,p.extend)(h,v),a.setShape(h)}}else{var u=r.get(["itemStyle","borderRadius"])||0;a.setShape("r",u)}a.useStyle(l);var c=r.getShallow("cursor");c&&a.attr("cursor",c);var f=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=(0,q.lx)(r);(0,q.qM)(a,d,{labelFetcher:n,labelDataIndex:t,defaultText:kr(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var g=a.getTextContent();if(s&&g){var y=r.get(["label","position"]);a.textConfig.inside=y==="middle"?!0:null,ry(a,y==="outside"?f:y,yu(o),r.get(["label","rotate"]))}(0,q.Oh)(g,d,n.getRawValue(t),function(S){return Kl(e,S)});var m=r.getModel(["emphasis"]);(0,U.Lm)(a,m.get("focus"),m.get("blurScope"),m.get("disabled")),(0,U.Mx)(a,r),ly(i)&&(a.style.fill="none",a.style.stroke="none",(0,p.each)(a.states,function(S){S.style&&(S.style.fill=S.style.stroke="none")}))}function uy(a,e){var t=a.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var r=a.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,i,n)}var hy=function(){function a(){}return a}(),xu=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeBar",r}return e.prototype.getDefaultShape=function(){return new hy},e.prototype.buildPath=function(t,r){for(var i=r.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,h=0;h=0?t:null},30,!1);function vy(a,e,t){for(var r=a.baseDimIdx,i=1-r,n=a.shape.points,o=a.largeDataIndices,s=[],l=[],u=a.barWidth,h=0,v=n.length/3;h=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[h]}return-1}function _u(a,e,t){if(yr(t,"cartesian2d")){var r=e,i=t.getArea();return{x:a?r.x:i.x,y:a?i.y:r.y,width:a?r.width:i.width,height:a?i.height:r.height}}else{var i=t.getArea(),n=e;return{cx:i.cx,cy:i.cy,r0:a?i.r0:n.r0,r:a?i.r:n.r,startAngle:a?n.startAngle:0,endAngle:a?n.endAngle:Math.PI*2}}}function cy(a,e,t){var r=a.type==="polar"?ye.A:Dt.A;return new r({shape:_u(e,t,a),silent:!0,z2:0})}var fy=iy;function py(a){a.registerChartView(fy),a.registerSeriesModel(Qg),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,p.curry(ga.Zp,"bar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,(0,ga.KF)("bar")),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,hu("bar")),a.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var Au=E(16884),yt=E(34253),wu=Math.PI*2,vi=Math.PI/180;function Cu(a,e){return yt.dV(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Tu(a,e){var t=Cu(a,e),r=a.get("center"),i=a.get("radius");p.isArray(i)||(i=[0,i]);var n=(0,k.lo)(t.width,e.getWidth()),o=(0,k.lo)(t.height,e.getHeight()),s=Math.min(n,o),l=(0,k.lo)(i[0],s/2),u=(0,k.lo)(i[1],s/2),h,v,c=a.coordinateSystem;if(c){var f=c.dataToPoint(r);h=f[0]||0,v=f[1]||0}else p.isArray(r)||(r=[r,r]),h=(0,k.lo)(r[0],n)+t.x,v=(0,k.lo)(r[1],o)+t.y;return{cx:h,cy:v,r0:l,r:u}}function dy(a,e,t){e.eachSeriesByType(a,function(r){var i=r.getData(),n=i.mapDimension("value"),o=Cu(r,t),s=Tu(r,t),l=s.cx,u=s.cy,h=s.r,v=s.r0,c=-r.get("startAngle")*vi,f=r.get("endAngle"),d=r.get("padAngle")*vi;f=f==="auto"?c-wu:-f*vi;var g=r.get("minAngle")*vi,y=g+d,m=0;i.each(n,function(B){!isNaN(B)&&m++});var S=i.getSum(n),x=Math.PI/(S||m)*2,b=r.get("clockwise"),_=r.get("roseType"),A=r.get("stillShowZeroSum"),w=i.getDataExtent(n);w[0]=0;var C=b?1:-1,T=[c,f],I=C*d/2;(0,la.q)(T,!b),c=T[0],f=T[1];var D=Iu(r);D.startAngle=c,D.endAngle=f,D.clockwise=b;var L=Math.abs(f-c),M=L,P=0,R=c;if(i.setLayout({viewRect:o,r:h}),i.each(n,function(B,z){var W;if(isNaN(B)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:l,cy:u,r0:v,r:_?NaN:h});return}_!=="area"?W=S===0&&A?x:B*x:W=L/m,WW?(K=R+C*W/2,et=K):(K=R+I,et=$-I),i.setItemLayout(z,{angle:W,startAngle:K,endAngle:et,clockwise:b,cx:l,cy:u,r0:v,r:_?(0,k.Cb)(B,w,[v,h]):h}),R=$}),Mt?m:y,_=Math.abs(x.label.y-t);if(_>=b.maxY){var A=x.label.x-e-x.len2*i,w=r+x.len,C=Math.abs(A)a.unconstrainedWidth?null:f:null;r.setStyle("width",d)}var g=r.getBoundingRect();n.width=g.width;var y=(r.style.margin||0)+2.1;n.height=g.height+y,n.y-=(n.height-v)/2}}}function Pn(a){return a.position==="center"}function my(a){var e=a.getData(),t=[],r,i,n=!1,o=(a.get("minShowLabelAngle")||0)*gy,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,h=s.x,v=s.y,c=s.height;function f(A){A.ignore=!0}function d(A){if(!A.ignore)return!0;for(var w in A.states)if(A.states[w].ignore===!1)return!0;return!1}e.each(function(A){var w=e.getItemGraphicEl(A),C=w.shape,T=w.getTextContent(),I=w.getTextGuideLine(),D=e.getItemModel(A),L=D.getModel("label"),M=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),V=(0,k.lo)(L.get("edgeDistance"),u),B=L.get("bleedMargin"),z=D.getModel("labelLine"),W=z.get("length");W=(0,k.lo)(W,u);var $=z.get("length2");if($=(0,k.lo)($,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":et>0?"left":"right"}var jt=Math.PI,Zt=0,se=L.get("rotate");if((0,p.isNumber)(se))Zt=se*(jt/180);else if(M==="center")Zt=0;else if(se==="radial"||se===!0){var Ke=et<0?-K+jt:-K;Zt=Ke}else if(se==="tangential"&&M!=="outside"&&M!=="outer"){var ve=Math.atan2(et,lt);ve<0&&(ve=jt*2+ve);var dn=lt>0;dn&&(ve=jt+ve),Zt=ve-jt}if(n=!!Zt,T.x=ot,T.y=mt,T.rotation=Zt,T.setStyle({verticalAlign:"middle"}),nt){T.setStyle({align:xt});var _l=T.states.select;_l&&(_l.x+=T.x,_l.y+=T.y)}else{var vr=T.getBoundingRect().clone();vr.applyTransform(T.getComputedTransform());var $d=(T.style.margin||0)+2.1;vr.y-=$d/2,vr.height+=$d,t.push({label:T,labelLine:I,position:M,len:W,len2:$,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new Re.A(et,lt),linePoints:At,textAlign:xt,labelDistance:P,labelAlignTo:R,edgeDistance:V,bleedMargin:B,rect:vr,unconstrainedWidth:vr.width,labelStyleWidth:T.style.width})}w.setTextConfig({inside:nt})}}),!n&&a.get("avoidLabelOverlap")&&yy(t,r,i,l,u,c,h,v);for(var g=0;g0){for(var h=o.getItemLayout(0),v=1;isNaN(h&&h.startAngle)&&v=n.r0}},e.type="pie",e}(Nt.A),by=Sy,ci=E(97351),he=E(6006);function zr(a,e,t){e=(0,p.isArray)(e)&&{coordDimensions:e}||(0,p.extend)({encodeDefine:a.getEncode()},e);var r=a.getSource(),i=(0,ci.A)(r,e).dimensions,n=new he.A(i,a);return n.initData(r,t),n}var fi=E(23071),_y=function(){function a(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return a.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},a.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},a.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},a.prototype.getItemVisual=function(e,t){var r=this._getDataWithEncodedVisual();return r.getItemVisual(e,t)},a}(),ma=_y,Ay=J.$r(),wy=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ma(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){a.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return zr(this,{coordDimensions:["value"],encodeDefaulter:p.curry(fi.ln,this)})},e.prototype.getDataParams=function(t){var r=this.getData(),i=Ay(r),n=i.seats;if(!n){var o=[];r.each(r.mapDimension("value"),function(l){o.push(l)}),n=i.seats=(0,k.kM)(o,r.hostModel.get("percentPrecision"))}var s=a.prototype.getDataParams.call(this,t);return s.percent=n[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){J.M5(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Ot.A),Cy=wy;function Ty(a){return{seriesType:a,reset:function(e,t){var r=e.getData();r.filterSelf(function(i){var n=r.mapDimension("value"),o=r.get(n,i);return!((0,p.isNumber)(o)&&!isNaN(o)&&o<0)})}}}function Iy(a){a.registerChartView(by),a.registerSeriesModel(Cy),(0,Au.I)("pie",a.registerAction),a.registerLayout((0,p.curry)(dy,"pie")),a.registerProcessor(ya("pie")),a.registerProcessor(Ty("pie"))}var Dy=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,r){return(0,Fe.A)(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,r,i){return i.point(r.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Ot.A),Ly=Dy,Mu=4,My=function(){function a(){}return a}(),Py=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return e.prototype.getDefaultShape=function(){return new My},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,r){var i=r.points,n=r.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]=0;u--){var h=u*2,v=n[h]-s/2,c=n[h+1]-l/2;if(t>=v&&r>=c&&t<=v+s&&r<=c+l)return u}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),n=this.getBoundingRect();if(t=i[0],r=i[1],n.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.points,n=r.size,o=n[0],s=n[1],l=1/0,u=1/0,h=-1/0,v=-1/0,c=0;c=0&&(u.dataIndex=v+(e.startIndex||0))})},a.prototype.remove=function(){this._clear()},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),Ey=Ry,Vy=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._symbolDraw.incrementalUpdate(t,r.getData(),{clipShape:this._getClipShape(r)}),this._finished=t.end===r.getData().count()},e.prototype.updateTransform=function(t,r,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=da("").reset(t,r,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var r=t.coordinateSystem;return r&&r.getArea&&r.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,r){var i=this._symbolDraw,n=r.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Ey:new fa,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Nt.A),Oy=Vy,Yt=E(59109),Ht=E(15915),ky=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Ht.A),Ny=ky,xa=E(12462),Rn=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",J.US).models[0]},e.type="cartesian2dAxis",e}(Ht.A);p.mixin(Rn,xa.L);var HM=null,Pu={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},zy=p.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Pu),En=p.merge({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Pu),By=p.merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},En),Gy=p.defaults({logBase:10},En),Ru={category:zy,value:En,time:By,log:Gy},Hy=E(15135),Fy={value:1,category:1,time:1,log:1};function Br(a,e,t,r){(0,p.each)(Fy,function(i,n){var o=(0,p.merge)((0,p.merge)({},Ru[n],!0),r,!0),s=function(l){(0,O.C6)(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=e+"Axis."+n,h}return u.prototype.mergeDefaultAndTheme=function(h,v){var c=(0,yt.ad)(this),f=c?(0,yt.vs)(h):{},d=v.getTheme();(0,p.merge)(h,d.get(n+"Axis")),(0,p.merge)(h,this.getDefaultOption()),h.type=Eu(h),c&&(0,yt.YA)(h,f,c)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=Hy.A.createByAxisModel(this))},u.prototype.getCategories=function(h){var v=this.option;if(v.type==="category")return h?v.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+n,u.defaultOption=o,u}(t);a.registerComponentModel(s)}),a.registerSubTypeDefaulter(e+"Axis",Eu)}function Eu(a){return a.type||(a.data?"category":"value")}var Ut=E(25751),Wy=function(){function a(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return a.prototype.getAxis=function(e){return this._axes[e]},a.prototype.getAxes=function(){return p.map(this._dimList,function(e){return this._axes[e]},this)},a.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),p.filter(this.getAxes(),function(t){return t.scale.type===e})},a.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},a}(),Yy=Wy,Lt=E(45587),at=E(83509),Vn=["x","y"];function Vu(a){return a.type==="interval"||a.type==="time"}var Zy=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Vn,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!Vu(t)||!Vu(r))){var i=t.getExtent(),n=r.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,v=(s[1]-o[1])/u,c=o[0]-i[0]*h,f=o[1]-n[0]*v,d=this._transform=[h,0,0,v,c,f];this._invTransform=(0,Lt.invert)([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var r=this.getAxis("x"),i=this.getAxis("y");return r.contain(r.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,r){var i=this.dataToPoint(t),n=this.dataToPoint(r),o=this.getArea(),s=new vt.A(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,r,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return(0,at.applyTransform)(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,r)),i[1]=l.toGlobalCoord(l.dataToCoord(o,r)),i},e.prototype.clampData=function(t,r){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(t[0]),u=n.parse(t[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),r[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),r},e.prototype.pointToData=function(t,r){var i=[];if(this._invTransform)return(0,at.applyTransform)(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),r),i[1]=o.coordToData(o.toLocalCoord(t[1]),r),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var r=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),n=Math.min(r[0],r[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(r[0],r[1])-n+t,l=Math.max(i[0],i[1])-o+t;return new vt.A(n,o,s,l)},e}(Yy),Uy=Zy,Ee=E(20912),Xy=function(a){(0,O.C6)(e,a);function e(t,r,i,n,o){var s=a.call(this,t,r,i)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),t&&r[0]>r[1]&&r.reverse(),r},e.prototype.pointToData=function(t,r){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),r)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Ee.A),jy=Xy;function On(a,e,t){t=t||{};var r=a.coordinateSystem,i=e.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,h=r.getRect(),v=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,d=u==="x"?[v[2]-f,v[3]+f]:[v[0]-f,v[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(g,d[1]),d[0])}n.position=[u==="y"?d[c[l]]:v[0],u==="x"?d[c[l]]:v[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var y={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=y[s],n.labelOffset=o?d[c[s]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),p.retrieve(t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var m=e.get(["axisLabel","rotate"]);return n.labelRotate=l==="top"?-m:m,n.z2=1,n}function Ou(a){return a.get("coordinateSystem")==="cartesian2d"}function ku(a){var e={xAxisModel:null,yAxisModel:null};return p.each(e,function(t,r){var i=r.replace(/Model$/,""),n=a.getReferringComponents(i,J.US).models[0];e[r]=n}),e}var Gr=E(67071),pi=E(74562),kn=Math.log;function Nu(a,e,t){var r=pi.A.prototype,i=r.getTicks.call(t),n=r.getTicks.call(t,!0),o=i.length-1,s=r.getInterval.call(t),l=(0,Ut.Rx)(a,e),u=l.extent,h=l.fixMin,v=l.fixMax;if(a.type==="log"){var c=kn(a.base);u=[kn(u[0])/c,kn(u[1])/c]}a.setExtent(u[0],u[1]),a.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:v});var f=r.getExtent.call(a);h&&(u[0]=f[0]),v&&(u[1]=f[1]);var d=r.getInterval.call(a),g=u[0],y=u[1];if(h&&v)d=(y-g)/o;else if(h)for(y=u[0]+d*o;yu[0]&&isFinite(g)&&isFinite(u[0]);)d=(0,Gr.kH)(d),g=u[1]-d*o;else{var m=a.getTicks().length-1;m>o&&(d=(0,Gr.kH)(d));var S=d*o;y=Math.ceil(u[1]/d)*d,g=(0,k.LI)(y-S),g<0&&u[0]>=0?(g=0,y=(0,k.LI)(S)):y>0&&u[1]<=0&&(y=0,g=-(0,k.LI)(S))}var x=(i[0].value-n[0].value)/s,b=(i[o].value-n[o].value)/s;if(r.setExtent.call(a,g+d*x,y+d*b),r.setInterval.call(a,d),(x||b)&&r.setNiceExtent.call(a,g+d,y-d),0)var _}var Ky=function(){function a(e,t,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Vn,this._initCartesian(e,t,r),this.model=e}return a.prototype.getRect=function(){return this._rect},a.prototype.update=function(e,t){var r=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=(0,p.keys)(o),u=l.length;if(u){for(var h=[],v=u-1;v>=0;v--){var c=+l[v],f=o[c],d=f.model,g=f.scale;(0,Gr.rf)(g)&&d.get("alignTicks")&&d.get("interval")==null?h.push(f):((0,Ut.af)(g,d),(0,Gr.rf)(g)&&(s=f))}h.length&&(s||(s=h.pop(),(0,Ut.af)(s.scale,s.model)),(0,p.each)(h,function(y){Nu(y.scale,y.model,s.scale)}))}}i(r.x),i(r.y);var n={};(0,p.each)(r.x,function(o){zu(r,"y",o,n)}),(0,p.each)(r.y,function(o){zu(r,"x",o,n)}),this.resize(this.model,t)},a.prototype.resize=function(e,t,r){var i=e.getBoxLayoutParams(),n=!r&&e.get("containLabel"),o=(0,yt.dV)(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),n&&((0,p.each)(s,function(u){if(!u.model.get(["axisLabel","inside"])){var h=(0,Ut.Og)(u);if(h){var v=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[v]-=h[v]+c,u.position==="top"?o.y+=h.height+c:u.position==="left"&&(o.x+=h.width+c)}}}),l()),(0,p.each)(this._coordsList,function(u){u.calcAffineTransform()});function l(){(0,p.each)(s,function(u){var h=u.isHorizontal(),v=h?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(v[c],v[1-c]),$y(u,h?o.x:o.y)})}},a.prototype.getAxis=function(e,t){var r=this._axesMap[e];if(r!=null)return r[t||0]},a.prototype.getAxes=function(){return this._axesList.slice()},a.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var r="x"+e+"y"+t;return this._coordsMap[r]}(0,p.isObject)(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,n=this._coordsList;i0?"top":"bottom",n="center"):(0,k.dh)(i-qe)?(o=r>0?"bottom":"top",n="center"):(o="middle",i>0&&i0?"right":"left":n=r>0?"left":"right"),{rotation:i,textAlign:n,textVerticalAlign:o}},a.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},a.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},a}(),Gu={axisLine:function(a,e,t,r){var i=e.get(["axisLine","show"]);if(i==="auto"&&a.handleAutoShown&&(i=a.handleAutoShown("axisLine")),!!i){var n=e.axis.getExtent(),o=r.transform,s=[n[0],0],l=[n[1],0],u=s[0]>l[0];o&&((0,at.applyTransform)(s,s,o),(0,at.applyTransform)(l,l,o));var h=(0,p.extend)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),v=new le.A({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:a.strokeContainThreshold||5,silent:!0,z2:1});tt.subPixelOptimizeLine(v.shape,v.style.lineWidth),v.anid="line",t.add(v);var c=e.get(["axisLine","symbol"]);if(c!=null){var f=e.get(["axisLine","symbolSize"]);(0,p.isString)(c)&&(c=[c,c]),((0,p.isString)(f)||(0,p.isNumber)(f))&&(f=[f,f]);var d=(0,Tt.hV)(e.get(["axisLine","symbolOffset"])||0,f),g=f[0],y=f[1];(0,p.each)([{rotate:a.rotation+Math.PI/2,offset:d[0],r:0},{rotate:a.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,S){if(c[S]!=="none"&&c[S]!=null){var x=(0,Tt.v5)(c[S],-g/2,-y/2,g,y,h.stroke,!0),b=m.r+m.offset,_=u?l:s;x.attr({rotation:m.rotate,x:_[0]+b*Math.cos(a.rotation),y:_[1]-b*Math.sin(a.rotation),silent:!0,z2:11}),t.add(x)}})}}},axisTickLabel:function(a,e,t,r){var i=t0(t,r,e,a),n=r0(t,r,e,a);if(qy(e,n,i),e0(t,r,e,a.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=(0,Mn.os)((0,p.map)(n,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));(0,Mn.If)(o)}},axisName:function(a,e,t,r){var i=(0,p.retrieve)(a.axisName,e.get("name"));if(i){var n=e.get("nameLocation"),o=a.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),h=u[0]>u[1]?-1:1,v=[n==="start"?u[0]-h*l:n==="end"?u[1]+h*l:(u[0]+u[1])/2,Fu(n)?a.labelOffset+o*l:0],c,f=e.get("nameRotate");f!=null&&(f=f*qe/180);var d;Fu(n)?c=xr.innerTextLayout(a.rotation,f!=null?f:a.rotation,o):(c=Qy(a.rotation,n,f||0,u),d=a.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var g=s.getFont(),y=e.get("nameTruncate",!0)||{},m=y.ellipsis,S=(0,p.retrieve)(a.nameTruncateMaxWidth,y.maxWidth,d),x=new _t.Ay({x:v[0],y:v[1],rotation:c.rotation,silent:xr.isLabelSilent(e),style:(0,q.VB)(s,{text:i,font:g,overflow:"truncate",width:S,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(tt.setTooltipConfig({el:x,componentModel:e,itemName:i}),x.__fullText=i,x.anid="name",e.get("triggerEvent")){var b=xr.makeAxisEventDataBase(e);b.targetType="axisName",b.name=i,(0,ft.z)(x).eventData=b}r.add(x),x.updateTransform(),t.add(x),x.decomposeTransform()}}};function Qy(a,e,t,r){var i=(0,k._7)(t-a),n,o,s=r[0]>r[1],l=e==="start"&&!s||e!=="start"&&s;return(0,k.dh)(i-qe/2)?(o=l?"bottom":"top",n="center"):(0,k.dh)(i-qe*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",iqe/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function qy(a,e,t){if(!(0,Ut.PJ)(a.axis)){var r=a.get(["axisLabel","showMinLabel"]),i=a.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],h=t[1],v=t[t.length-1],c=t[t.length-2];r===!1?(xe(n),xe(u)):Hu(n,o)&&(r?(xe(o),xe(h)):(xe(n),xe(u))),i===!1?(xe(s),xe(v)):Hu(l,s)&&(i?(xe(l),xe(c)):(xe(s),xe(v)))}}function xe(a){a&&(a.ignore=!0)}function Hu(a,e){var t=a&&a.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(!(!t||!r)){var i=Lt.identity([]);return Lt.rotate(i,i,-a.rotation),t.applyTransform(Lt.mul([],i,a.getLocalTransform())),r.applyTransform(Lt.mul([],i,e.getLocalTransform())),t.intersect(r)}}function Fu(a){return a==="middle"||a==="center"}function Wu(a,e,t,r,i){for(var n=[],o=[],s=[],l=0;l=0||a===e}function l0(a){var e=Bn(a);if(e){var t=e.axisPointerModel,r=e.axis.scale,i=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=r.parse(o));var s=Gn(t);n==null&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var g=l;d.color!=null&&(g=p.defaults({color:d.color},l));var y=p.merge(p.clone(d),{boundaryGap:t,splitNumber:r,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:v,nameTextStyle:g,triggerEvent:c},!1);if(p.isString(h)){var m=y.name;y.name=h.replace("{value}",m!=null?m:"")}else p.isFunction(h)&&(y.name=h(y.name,y));var S=new Xt.A(y,null,this.ecModel);return p.mixin(S,xa.L.prototype),S.mainType="radar",S.componentIndex=this.componentIndex,S},this);this._indicatorModels=f},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:p.merge({lineStyle:{color:"#bbb"}},ba.axisLine),axisLabel:di(ba.axisLabel,!1),axisTick:di(ba.axisTick,!1),splitLine:di(ba.splitLine,!0),splitArea:di(ba.splitArea,!0),indicator:[]},e}(Ht.A),w0=A0,_a=E(31571),qu=E(42933),C0=["axisLine","axisTickLabel","axisName"],T0=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var r=t.coordinateSystem,i=r.getIndicatorAxes(),n=p.map(i,function(o){var s=o.model.get("showName")?o.name:"",l=new We(o.model,{axisName:s,position:[r.cx,r.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});p.each(n,function(o){p.each(C0,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var r=t.coordinateSystem,i=r.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),h=o.get("show"),v=s.get("show"),c=l.get("color"),f=u.get("color"),d=p.isArray(c)?c:[c],g=p.isArray(f)?f:[f],y=[],m=[];function S(R,V,B){var z=B%V.length;return R[z]=R[z]||[],z}if(n==="circle")for(var x=i[0].getTicksCoords(),b=r.cx,_=r.cy,A=0;A3?1.4:o>1?1.2:1.1,h=n>0?u:1/u;Wn(this,"zoom","zoomOnMouseWheel",t,{scale:h,originX:s,originY:l,isAvailableBehavior:null})}if(i){var v=Math.abs(n),c=(n>0?1:-1)*(v>3?.4:v>1?.15:.05);Wn(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!eh(this._zr,"globalPan")){var r=t.pinchScale>1?1.1:1/1.1;Wn(this,"zoom",null,t,{scale:r,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(ct.A);function Wn(a,e,t,r,i){a.pointerChecker&&a.pointerChecker(r,i.originX,i.originY)&&(pe.ds(r.event),rh(a,e,t,r,i))}function rh(a,e,t,r,i){i.isAvailableBehavior=(0,p.bind)(yi,null,t,r),a.trigger(e,i)}function yi(a,e,t){var r=t[a];return!a||r&&(!(0,p.isString)(r)||e.event[r+"Key"])}var Aa=k0;function Yn(a,e,t){var r=a.target;r.x+=e,r.y+=t,r.dirty()}function Zn(a,e,t,r){var i=a.target,n=a.zoomLimit,o=a.zoom=a.zoom||1;if(o*=e,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/a.zoom;a.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(r-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var N0={axisPointer:1,tooltip:1,brush:1};function mi(a,e,t){var r=e.getComponentByElement(a.topTarget),i=r&&r.coordinateSystem;return r&&r!==t&&!N0.hasOwnProperty(r.mainType)&&i&&i.model!==t}var z0=E(18393),xi=E(59442),B0=E(82250);function ah(a){if((0,p.isString)(a)){var e=new DOMParser;a=e.parseFromString(a,"text/xml")}var t=a;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Un,Si={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},ih=(0,p.keys)(Si),bi={"alignment-baseline":"textBaseline","stop-color":"stopColor"},nh=(0,p.keys)(bi),G0=function(){function a(){this._defs={},this._root=null}return a.prototype.parse=function(e,t){t=t||{};var r=ah(e);this._defsUsePending=[];var i=new it.A;this._root=i;var n=[],o=r.getAttribute("viewBox")||"",s=parseFloat(r.getAttribute("width")||t.width),l=parseFloat(r.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),de(r,i,null,!0,!1);for(var u=r.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;W0(this._defs,this._defsUsePending),this._defsUsePending=[];var h,v;if(o){var c=_i(o);c.length>=4&&(h={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(h&&s!=null&&l!=null&&(v=fh(h,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var f=i;i=new it.A,i.add(f),f.scaleX=f.scaleY=v.scale,f.x=v.x,f.y=v.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Dt.A({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:h,viewBoxTransform:v,named:n}},a.prototype._parseNode=function(e,t,r,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var h=Un[s];if(h&&(0,p.hasOwn)(Un,s)){l=h.call(this,e,t);var v=e.getAttribute("name");if(v){var c={name:v,namedFrom:null,svgNodeTagLower:s,el:l};r.push(c),s==="g"&&(u=c)}else i&&r.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var f=oh[s];if(f&&(0,p.hasOwn)(oh,s)){var d=f.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=d)}}if(l&&l.isGroup)for(var y=e.firstChild;y;)y.nodeType===1?this._parseNode(y,l,r,u,n,o):y.nodeType===3&&o&&this._parseText(y,l),y=y.nextSibling},a.prototype._parseText=function(e,t){var r=new na.A({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});be(t,r),de(e,r,this._defsUsePending,!1,!1),H0(r,t);var i=r.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,r.scaleX*=n/9,r.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=r.getBoundingRect();return this._textX+=s.width,t.add(r),r},a.internalField=function(){Un={g:function(e,t){var r=new it.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r},rect:function(e,t){var r=new Dt.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),r.silent=!0,r},circle:function(e,t){var r=new _a.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),r.silent=!0,r},line:function(e,t){var r=new le.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),r.silent=!0,r},ellipse:function(e,t){var r=new z0.A;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),r.silent=!0,r},polygon:function(e,t){var r=e.getAttribute("points"),i;r&&(i=uh(r));var n=new Se.A({shape:{points:i||[]},silent:!0});return be(t,n),de(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var r=e.getAttribute("points"),i;r&&(i=uh(r));var n=new Pe.A({shape:{points:i||[]},silent:!0});return be(t,n),de(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var r=new ue.Ay;return be(t,r),de(e,r,this._defsUsePending,!1,!1),r.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),r.silent=!0,r},text:function(e,t){var r=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new it.A;return be(t,s),de(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var r=e.getAttribute("x"),i=e.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new it.A;return be(t,s),de(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var r=e.getAttribute("d")||"",i=(0,xi.UJ)(r);return be(t,i),de(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),a}(),oh={lineargradient:function(a){var e=parseInt(a.getAttribute("x1")||"0",10),t=parseInt(a.getAttribute("y1")||"0",10),r=parseInt(a.getAttribute("x2")||"10",10),i=parseInt(a.getAttribute("y2")||"0",10),n=new ii.A(e,t,r,i);return sh(a,n),lh(a,n),n},radialgradient:function(a){var e=parseInt(a.getAttribute("cx")||"0",10),t=parseInt(a.getAttribute("cy")||"0",10),r=parseInt(a.getAttribute("r")||"0",10),i=new B0.A(e,t,r);return sh(a,i),lh(a,i),i}};function sh(a,e){var t=a.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function lh(a,e){for(var t=a.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var r=t.getAttribute("offset"),i=void 0;r&&r.indexOf("%")>0?i=parseInt(r,10)/100:r?i=parseFloat(r):i=0;var n={};ch(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function be(a,e){a&&a.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),(0,p.defaults)(e.__inheritedStyle,a.__inheritedStyle))}function uh(a){for(var e=_i(a),t=[],r=0;r0;n-=2){var o=r[n],s=r[n-1],l=_i(o);switch(i=i||Lt.create(),s){case"translate":Lt.translate(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Lt.scale(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Lt.rotate(i,i,-parseFloat(l[0])*Xn,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Xn);Lt.mul(i,[1,0,u,1,0,0],i);break;case"skewY":var h=Math.tan(parseFloat(l[0])*Xn);Lt.mul(i,[1,h,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var vh=/([^\s:;]+)\s*:\s*([^:;]+)/g;function ch(a,e,t){var r=a.getAttribute("style");if(r){vh.lastIndex=0;for(var i;(i=vh.exec(r))!=null;){var n=i[1],o=(0,p.hasOwn)(Si,n)?Si[n]:null;o&&(e[o]=i[2]);var s=(0,p.hasOwn)(bi,n)?bi[n]:null;s&&(t[s]=i[2])}}}function X0(a,e,t){for(var r=0;r0,y={api:r,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:c};l.resourceType==="geoJSON"?this._buildGeoJSON(y):l.resourceType==="geoSVG"&&this._buildSVG(y),this._updateController(e,t,r),this._updateMapSelectHandler(e,u,r,i)},a.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=p.createHashMap(),r=p.createHashMap(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function h(f,d){return d&&(f=d(f)),f&&[f[0]*n.scaleX+n.x,f[1]*n.scaleY+n.y]}function v(f){for(var d=[],g=!u&&l&&l.project,y=0;y=0)&&(c=i);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;(0,q.qM)(e,(0,q.lx)(r),{labelFetcher:c,labelDataIndex:v,defaultText:t},f);var d=e.getTextContent();if(d&&(gh(d).ignore=d.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Sh(a,e,t,r,i,n){a.data?a.data.setItemGraphicEl(n,e):(0,ct.z)(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:r&&r.option||{}}}function bh(a,e,t,r,i){a.data||tt.setTooltipConfig({el:e,componentModel:i,itemName:t,itemTooltipOption:r.get("tooltip")})}function _h(a,e,t,r,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=r.getModel("emphasis"),o=n.get("focus");return(0,U.Lm)(e,o,n.get("blurScope"),n.get("disabled")),a.isGeo&&(0,U.ml)(e,i,t),o}function Ah(a,e,t){var r=[],i;function n(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),p.each(a,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Ot.A),gm=dm;function ym(a,e){var t={};return p.each(a,function(r){r.each(r.mapDimension("value"),function(i,n){var o="ec-"+r.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),a[0].map(a[0].mapDimension("value"),function(r,i){for(var n="ec-"+a[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,h=0;h1?(b.width=x,b.height=x/y):(b.height=x,b.width=x*y),b.y=S[1]-b.height/2,b.x=S[0]-b.width/2;else{var _=a.getBoxLayoutParams();_.aspect=y,b=yt.dV(_,{width:d,height:g})}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(a.get("center"),e),this.setZoom(a.get("zoom"))}function _m(a,e){p.each(e.get("geoCoord"),function(t,r){a.addGeoCoord(r,t)})}var Am=function(){function a(){this.dimensions=Ih}return a.prototype.create=function(e,t){var r=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Mh(l+s,l,p.extend({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),r.push(u),o.coordinateSystem=u,u.model=o,u.resize=Ph,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=r[l]}});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),p.each(n,function(o,s){var l=p.map(o,function(h){return h.get("nameMap")}),u=new Mh(s,s,p.extend({nameMap:p.mergeAll(l)},i(o[0])));u.zoomLimit=p.retrieve.apply(null,p.map(o,function(h){return h.get("scaleLimit")})),r.push(u),u.resize=Ph,u.resize(o[0],t),p.each(o,function(h){h.coordinateSystem=u,_m(u,h)})}),r},a.prototype.getFilledRegions=function(e,t,r,i){for(var n=(e||[]).slice(),o=p.createHashMap(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function Rm(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,i=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){Om(a);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(a.hierNode.prelim=i.hierNode.prelim+e(a,i),a.hierNode.modifier=a.hierNode.prelim-n):a.hierNode.prelim=n}else i&&(a.hierNode.prelim=i.hierNode.prelim+e(a,i));a.parentNode.hierNode.defaultAncestor=km(a,i,a.parentNode.hierNode.defaultAncestor||r[0],e)}function Em(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function kh(a){return arguments.length?a:Bm}function Ta(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function Vm(a,e){return yt.dV(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Om(a){for(var e=a.children,t=e.length,r=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=r,n.hierNode.modifier+=r,i+=n.hierNode.change,r+=n.hierNode.shift+i}}function km(a,e,t,r){if(e){for(var i=a,n=a,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,h=o.hierNode.modifier,v=s.hierNode.modifier;s=Qn(s),n=qn(n),s&&n;){i=Qn(i),o=qn(o),i.hierNode.ancestor=a;var c=s.hierNode.prelim+v-n.hierNode.prelim-u+r(s,n);c>0&&(zm(Nm(s,a,t),a,c),u+=c,l+=c),v+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!Qn(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=v-l),n&&!qn(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,t=a)}return t}function Qn(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function qn(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function Nm(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function zm(a,e,t){var r=t/(e.hierNode.i-a.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,a.hierNode.change+=r}function Bm(a,e){return a.parentNode===e.parentNode?1:2}var Ci=E(48813),Gm=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),Hm=function(a){(0,O.C6)(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Gm},e.prototype.buildPath=function(t,r){var i=r.childPoints,n=i.length,o=r.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=r.orient,h=u==="TB"||u==="BT"?0:1,v=1-h,c=(0,k.lo)(r.forkPosition,1),f=[];f[h]=o[h],f[v]=o[v]+(l[v]-o[v])*c,t.moveTo(o[0],o[1]),t.lineTo(f[0],f[1]),t.moveTo(s[0],s[1]),f[h]=s[h],t.lineTo(f[0],f[1]),f[h]=l[h],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var d=1;dS.x,_||(b=b-Math.PI));var w=_?"left":"right",C=s.getModel("label"),T=C.get("rotate"),I=T*(Math.PI/180),D=y.getTextContent();D&&(y.setTextConfig({position:C.get("position")||w,rotation:T==null?-b:I,origin:"center"}),D.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),M=L==="relative"?p.concatArray(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;M&&((0,ct.z)(t).focus=M),Wm(i,o,h,t,d,f,g,r),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&a.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===U.zX||(0,U.Pk)(t.__edge,P)}})}function Wm(a,e,t,r,i,n,o,s){var l=e.getModel(),u=a.get("edgeShape"),h=a.get("layout"),v=a.getOrient(),c=a.get(["lineStyle","curveness"]),f=a.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),g=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(g||(g=r.__edge=new Oh.A({shape:to(h,v,c,i,i)})),Q.oi(g,{shape:to(h,v,c,n,o)},a));else if(u==="polyline"&&h==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var y=e.children,m=[],S=0;St&&(t=i.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,i=r.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=t.getData().tree.root,i=a.targetNode;if(p.isString(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var n=a.targetNodeId;if(n!=null&&(i=r.getNodeById(n)))return{node:i}}}function Yh(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function ao(a,e){var t=Yh(a);return p.indexOf(t,e)>=0}function Ti(a,e){for(var t=[];a;){var r=a.dataIndex;t.push({name:a.name,dataIndex:r,value:e.getRawValue(r)}),a=a.parentNode}return t.reverse(),t}var ex=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var r={name:t.name,children:t.data},i=t.leaves||{},n=new Xt.A(i,this,this.ecModel),o=ro.createTree(r,this,s);function s(v){v.wrapMethod("getItemModel",function(c,f){var d=o.getNodeByDataIndex(f);return d&&d.children.length&&d.isExpand||(c.parentModel=n),c})}var l=0;o.eachNode("preorder",function(v){v.depth>l&&(l=v.depth)});var u=t.expandAndCollapse,h=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(v){var c=v.hostTree.data.getRawDataItem(v.dataIndex);v.isExpand=c&&c.collapsed!=null?!c.collapsed:v.depth<=h}),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,r,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return(0,zt.Qx)("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ti(i,this),r.collapsed=!i.isExpand,r},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}(Ot.A),rx=ex;function ax(a,e,t){for(var r=[a],i=[],n;n=r.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;n--)t.push(i[n])}}function ix(a,e){a.eachSeriesByType("tree",function(t){nx(t,e)})}function nx(a,e){var t=Vm(a,e);a.layoutInfo=t;var r=a.get("layout"),i=0,n=0,o=null;r==="radial"?(i=2*Math.PI,n=Math.min(t.height,t.width)/2,o=kh(function(x,b){return(x.parentNode===b.parentNode?1:2)/x.depth})):(i=t.width,n=t.height,o=kh());var s=a.getData().tree.root,l=s.children[0];if(l){Pm(s),ax(l,Rm,o),s.hierNode.modifier=-l.hierNode.prelim,Da(l,Em);var u=l,h=l,v=l;Da(l,function(x){var b=x.getLayout().x;bh.getLayout().x&&(h=x),x.depth>v.depth&&(v=x)});var c=u===h?1:o(u,h)/2,f=c-u.getLayout().x,d=0,g=0,y=0,m=0;if(r==="radial")d=i/(h.getLayout().x+c+f),g=n/(v.depth-1||1),Da(l,function(x){y=(x.getLayout().x+f)*d,m=(x.depth-1)*g;var b=Ta(y,m);x.setLayout({x:b.x,y:b.y,rawX:y,rawY:m},!0)});else{var S=a.getOrient();S==="RL"||S==="LR"?(g=n/(h.getLayout().x+c+f),d=i/(v.depth-1||1),Da(l,function(x){m=(x.getLayout().x+f)*g,y=S==="LR"?(x.depth-1)*d:i-(x.depth-1)*d,x.setLayout({x:y,y:m},!0)})):(S==="TB"||S==="BT")&&(d=i/(h.getLayout().x+c+f),g=n/(v.depth-1||1),Da(l,function(x){y=(x.getLayout().x+f)*d,m=S==="TB"?(x.depth-1)*g:n-(x.depth-1)*g,x.setLayout({x:y,y:m},!0)}))}}}function ox(a){a.eachSeriesByType("tree",function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");(0,p.extend)(s,o)})})}function sx(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var i=e.dataIndex,n=r.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),a.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,r){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=i.coordinateSystem,o=$n(n,e,void 0,r);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function lx(a){a.registerChartView(Ym),a.registerSeriesModel(rx),a.registerLayout(ix),a.registerVisual(ox),sx(a)}var Zh=["treemapZoomToNode","treemapRender","treemapMove"];function ux(a){for(var e=0;e1;)n=n.parentNode;var o=(0,io.x)(a.ecModel,n.name||n.dataIndex+"",r);i.setVisual("decal",o)})}var hx=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,r){var i={name:t.name,children:t.data};Xh(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Xt.A({itemStyle:o},this,r);n=t.levels=vx(n,r);var l=p.map(n||[],function(v){return new Xt.A(v,s,r)},this),u=ro.createTree(i,this,h);function h(v){v.wrapMethod("getItemModel",function(c,f){var d=u.getNodeByDataIndex(f),g=d?l[d.depth]:null;return c.parentModel=g||s,c})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return(0,zt.Qx)("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ti(i,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},p.extend(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=p.createHashMap(),this._idIndexMapCount=0);var i=r.get(t);return i==null&&r.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Uh(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,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Ot.A);function Xh(a){var e=0;p.each(a.children,function(r){Xh(r);var i=r.value;p.isArray(i)&&(i=i[0]),e+=i});var t=a.value;p.isArray(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),p.isArray(a.value)?a.value[0]=t:a.value=t}function vx(a,e){var t=(0,J.qB)(e.get("color")),r=(0,J.qB)(e.get(["aria","decal","decals"]));if(t){a=a||[];var i,n;p.each(a,function(s){var l=new Xt.A(s),u=l.get("color"),h=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||h&&h!=="none")&&(n=!0)});var o=a[0]||(a[0]={});return i||(o.color=t.slice()),!n&&r&&(o.decal=r.slice()),a}}var cx=hx,tr=E(16563),fx=8,jh=8,no=5,px=function(){function a(e){this.group=new it.A,e.add(this.group)}return a.prototype.render=function(e,t,r,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!r)){var s=n.getModel("itemStyle"),l=n.getModel("emphasis"),u=s.getModel("textStyle"),h=l.getModel(["itemStyle","textStyle"]),v={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,v,u),this._renderContent(e,v,s,l,u,h,i),yt.m$(o,v.pos,v.box)}},a.prototype._prepare=function(e,t,r){for(var i=e;i;i=i.parentNode){var n=(0,J.vS)(i.getModel().get("name"),""),o=r.getTextRect(n),s=Math.max(o.width+fx*2,t.emptyItemWidth);t.totalWidth+=s+jh,t.renderList.push({node:i,text:n,width:s})}},a.prototype._renderContent=function(e,t,r,i,n,o,s){for(var l=0,u=t.emptyItemWidth,h=e.get(["breadcrumb","height"]),v=yt.HU(t.pos,t.box),c=t.totalWidth,f=t.renderList,d=i.getModel("itemStyle").getItemStyle(),g=f.length-1;g>=0;g--){var y=f[g],m=y.node,S=y.width,x=y.text;c>v.width&&(c-=S-u,S=u,x=null);var b=new Se.A({shape:{points:dx(l,0,S,h,g===f.length-1,g===0)},style:(0,p.defaults)(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new _t.Ay({style:(0,q.VB)(n,{text:x})}),textConfig:{position:"inside"},z2:U.CA*1e4,onclick:(0,p.curry)(s,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=(0,q.VB)(o,{text:x}),b.ensureState("emphasis").style=d,(0,U.Lm)(b,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(b),gx(b,e,m),l+=S+jh}},a.prototype.remove=function(){this.group.removeAll()},a}();function dx(a,e,t,r,i,n){var o=[[i?a:a-no,e],[a+t,e],[a+t,e+r],[i?a:a-no,e+r]];return!n&&o.splice(2,0,[a+t+no,e+r/2]),!i&&o.push([a,e+r/2]),o}function gx(a,e,t){(0,ct.z)(a).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&&Ti(t,e)}}var yx=px,mx=function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:i,easing:n}),!0)},a.prototype.finished=function(e){return this._finishedCallback=e,this},a.prototype.start=function(){for(var e=this,t=this._storage.length,r=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;iJh||Math.abs(t.dy)>Jh)){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var r=t.originX,i=t.originY,n=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new vt.A(s.x,s.y,s.width,s.height),u=null,h=this._controllerHost;u=h.zoomLimit;var v=h.zoom=h.zoom||1;if(v*=n,u){var c=u.min||0,f=u.max||1/0;v=Math.max(Math.min(f,v),c)}var d=v/h.zoom;h.zoom=v;var g=this.seriesModel.layoutInfo;r-=g.x,i-=g.y;var y=Lt.create();Lt.translate(y,y,[-r,-i]),Lt.scale(y,y,[d,d]),Lt.translate(y,y,[r,i]),l.applyTransform(y),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 r=this;t.on("click",function(i){if(r._state==="ready"){var n=r.seriesModel.get("nodeClick",!0);if(n){var o=r.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)r._rootToNode(o);else if(n==="zoomToNode")r._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),h=l.get("target",!0)||"blank";u&&(0,qt.JW)(u,h)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new yx(this.group))).render(t,r,i.node,function(o){n._state!=="animating"&&(ao(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=La(),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,r){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,r),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(Nt.A);function La(){return{nodeGroup:[],background:[],content:[]}}function wx(a,e,t,r,i,n,o,s,l,u){if(!o)return;var h=o.getLayout(),v=a.getData(),c=o.getModel();if(v.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var f=h.width,d=h.height,g=h.borderWidth,y=h.invisible,m=o.getRawIndex(),S=s&&s.getRawIndex(),x=o.viewChildren,b=h.upperHeight,_=x&&x.length,A=c.getModel("itemStyle"),w=c.getModel(["emphasis","itemStyle"]),C=c.getModel(["blur","itemStyle"]),T=c.getModel(["select","itemStyle"]),I=A.get("borderRadius")||0,D=ot("nodeGroup",oo);if(!D)return;if(l.add(D),D.x=h.x||0,D.y=h.y||0,D.markRedraw(),Ii(D).nodeWidth=f,Ii(D).nodeHeight=d,h.isAboveViewRoot)return D;var L=ot("background",$h,u,bx);L&&W(D,L,_&&h.upperLabelHeight);var M=c.getModel("emphasis"),P=M.get("focus"),R=M.get("blurScope"),V=M.get("disabled"),B=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(_)(0,U.u6)(D)&&(0,U.ix)(D,!1),L&&((0,U.ix)(L,!V),v.setItemGraphicEl(o.dataIndex,L),(0,U.gR)(L,B,R));else{var z=ot("content",$h,u,_x);z&&$(D,z),L.disableMorphing=!0,L&&(0,U.u6)(L)&&(0,U.ix)(L,!1),(0,U.ix)(D,!V),v.setItemGraphicEl(o.dataIndex,D),(0,U.gR)(D,B,R)}return D;function W(xt,nt,Ct){var wt=(0,ct.z)(nt);if(wt.dataIndex=o.dataIndex,wt.seriesIndex=a.seriesIndex,nt.setShape({x:0,y:0,width:f,height:d,r:I}),y)K(nt);else{nt.invisible=!1;var Mt=o.getVisual("style"),Jt=Mt.stroke,te=tv(A);te.fill=Jt;var kt=wr(w);kt.fill=w.get("borderColor");var jt=wr(C);jt.fill=C.get("borderColor");var Zt=wr(T);if(Zt.fill=T.get("borderColor"),Ct){var se=f-2*g;et(nt,Jt,Mt.opacity,{x:g,y:0,width:se,height:b})}else nt.removeTextContent();nt.setStyle(te),nt.ensureState("emphasis").style=kt,nt.ensureState("blur").style=jt,nt.ensureState("select").style=Zt,(0,U.DW)(nt)}xt.add(nt)}function $(xt,nt){var Ct=(0,ct.z)(nt);Ct.dataIndex=o.dataIndex,Ct.seriesIndex=a.seriesIndex;var wt=Math.max(f-2*g,0),Mt=Math.max(d-2*g,0);if(nt.culling=!0,nt.setShape({x:g,y:g,width:wt,height:Mt,r:I}),y)K(nt);else{nt.invisible=!1;var Jt=o.getVisual("style"),te=Jt.fill,kt=tv(A);kt.fill=te,kt.decal=Jt.decal;var jt=wr(w),Zt=wr(C),se=wr(T);et(nt,te,Jt.opacity,null),nt.setStyle(kt),nt.ensureState("emphasis").style=jt,nt.ensureState("blur").style=Zt,nt.ensureState("select").style=se,(0,U.DW)(nt)}xt.add(nt)}function K(xt){!xt.invisible&&n.push(xt)}function et(xt,nt,Ct,wt){var Mt=c.getModel(wt?qh:Qh),Jt=(0,J.vS)(c.get("name"),null),te=Mt.getShallow("show");(0,q.qM)(xt,(0,q.lx)(c,wt?qh:Qh),{defaultText:te?Jt:null,inheritColor:nt,defaultOpacity:Ct,labelFetcher:a,labelDataIndex:o.dataIndex});var kt=xt.getTextContent();if(kt){var jt=kt.style,Zt=(0,p.normalizeCssArray)(jt.padding||0);wt&&(xt.setTextConfig({layoutRect:wt}),kt.disableLabelLayout=!0),kt.beforeUpdate=function(){var Ke=Math.max((wt?wt.width:xt.shape.width)-Zt[1]-Zt[3],0),ve=Math.max((wt?wt.height:xt.shape.height)-Zt[0]-Zt[2],0);(jt.width!==Ke||jt.height!==ve)&&kt.setStyle({width:Ke,height:ve})},jt.truncateMinChar=2,jt.lineOverflow="truncate",lt(jt,wt,h);var se=kt.getState("emphasis");lt(se?se.style:null,wt,h)}}function lt(xt,nt,Ct){var wt=xt?xt.text:null;if(!nt&&Ct.isLeafRoot&&wt!=null){var Mt=a.get("drillDownIcon",!0);xt.text=Mt?Mt+" "+wt:wt}}function ot(xt,nt,Ct,wt){var Mt=S!=null&&t[xt][S],Jt=i[xt];return Mt?(t[xt][S]=null,mt(Jt,Mt)):y||(Mt=new nt,Mt instanceof Ar.Ay&&(Mt.z2=Cx(Ct,wt)),At(Jt,Mt)),e[xt][m]=Mt}function mt(xt,nt){var Ct=xt[m]={};nt instanceof oo?(Ct.oldX=nt.x,Ct.oldY=nt.y):Ct.oldShape=(0,p.extend)({},nt.shape)}function At(xt,nt){var Ct=xt[m]={},wt=o.parentNode,Mt=nt instanceof it.A;if(wt&&(!r||r.direction==="drillDown")){var Jt=0,te=0,kt=i.background[wt.getRawIndex()];!r&&kt&&kt.oldShape&&(Jt=kt.oldShape.width,te=kt.oldShape.height),Mt?(Ct.oldX=0,Ct.oldY=te):Ct.oldShape={x:Jt,y:te,width:0,height:0}}Ct.fadein=!Mt}}function Cx(a,e){return a*Sx+e}var Tx=Ax,Ma=p.each,Ix=p.isObject,Di=-1,so=function(){function a(e){var t=e.mappingMethod,r=e.type,i=this.option=p.clone(e);this.type=r,this.mappingMethod=t,this._normalizeData=Mx[t];var n=a.visualHandlers[r];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(lo(i),Dx(i)):t==="category"?i.categories?Lx(i):lo(i,!0):(p.assert(t!=="linear"||i.dataExtent),lo(i))}return a.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},a.prototype.getNormalizer=function(){return p.bind(this._normalizeData,this)},a.listVisualTypes=function(){return p.keys(a.visualHandlers)},a.isValidType=function(e){return a.visualHandlers.hasOwnProperty(e)},a.eachVisual=function(e,t,r){p.isObject(e)?p.each(e,t,r):t.call(r,e)},a.mapVisual=function(e,t,r){var i,n=p.isArray(e)?[]:p.isObject(e)?{}:(i=!0,null);return a.eachVisual(e,function(o,s){var l=t.call(r,o,s);i?n=l:n[s]=l}),n},a.retrieveVisuals=function(e){var t={},r;return e&&Ma(a.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],r=!0)}),r?t:null},a.prepareVisualTypes=function(e){if(p.isArray(e))e=e.slice();else if(Ix(e)){var t=[];Ma(e,function(r,i){t.push(i)}),e=t}else return[];return e.sort(function(r,i){return i==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),e},a.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},a.findPieceIndex=function(e,t,r){for(var i,n=1/0,o=0,s=t.length;o=0;n--)r[n]==null&&(delete t[e[n]],e.pop())}function lo(a,e){var t=a.visual,r=[];p.isObject(t)?Ma(t,function(n){r.push(n)}):t!=null&&r.push(t);var i={color:1,symbol:1};!e&&r.length===1&&!i.hasOwnProperty(a.type)&&(r[1]=r[0]),rv(a,r)}function Li(a){return{applyVisual:function(e,t,r){var i=this.mapValueToVisual(e);r("color",a(t("color"),i))},_normalizedToVisual:uo([0,1])}}function ev(a){var e=this.option.visual;return e[Math.round((0,k.Cb)(a,[0,1],[0,e.length-1],!0))]||{}}function Pa(a){return function(e,t,r){r(a,this.mapValueToVisual(e))}}function Ra(a){var e=this.option.visual;return e[this.option.loop&&a!==Di?a%e.length:a]}function Cr(){return this.option.visual[0]}function uo(a){return{linear:function(e){return(0,k.Cb)(e,a,this.option.visual,!0)},category:Ra,piecewise:function(e,t){var r=ho.call(this,t);return r==null&&(r=(0,k.Cb)(e,a,this.option.visual,!0)),r},fixed:Cr}}function ho(a){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var r=so.findPieceIndex(a,t),i=t[r];if(i&&i.visual)return i.visual[this.type]}}function rv(a,e){return a.visual=e,a.type==="color"&&(a.parsedVisual=p.map(e,function(t){var r=Wt.parse(t);return r||[0,0,0,1]})),e}var Mx={linear:function(a){return(0,k.Cb)(a,this.option.dataExtent,[0,1],!0)},piecewise:function(a){var e=this.option.pieceList,t=so.findPieceIndex(a,e,!0);if(t!=null)return(0,k.Cb)(t,[0,e.length-1],[0,1],!0)},category:function(a){var e=this.option.categories?this.option.categoryMap[a]:a;return e==null?Di:e},fixed:p.noop};function Mi(a,e,t){return a?e<=t:e=t.length||g===t[g.depth]){var m=kx(i,l,g,y,d,r);iv(g,m,t,r)}})}}}function Ex(a,e,t){var r=(0,p.extend)({},e),i=t.designatedVisualItemStyle;return(0,p.each)(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=a.get(n);i[n]=null,o!=null&&(r[n]=o)}),r}function nv(a){var e=vo(a,"color");if(e){var t=vo(a,"colorAlpha"),r=vo(a,"colorSaturation");return r&&(e=(0,Wt.modifyHSL)(e,null,null,r)),t&&(e=(0,Wt.modifyAlpha)(e,t)),e}}function Vx(a,e){return e!=null?(0,Wt.modifyHSL)(e,null,null,a):null}function vo(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function Ox(a,e,t,r,i,n){if(!(!n||!n.length)){var o=co(e,"color")||i.color!=null&&i.color!=="none"&&(co(e,"colorAlpha")||co(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),v={type:o.name,dataExtent:u,visual:o.range};v.type==="color"&&(h==="index"||h==="id")?(v.mappingMethod="category",v.loop=!0):v.mappingMethod="linear";var c=new ae(v);return av(c).drColorMappingBy=h,c}}}function co(a,e){var t=a.get(e);return(0,p.isArray)(t)&&t.length?{name:e,range:t}:null}function kx(a,e,t,r,i,n){var o=(0,p.extend)({},e);if(i){var s=i.type,l=s==="color"&&av(i).drColorMappingBy,u=l==="index"?r:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Ea=Math.max,Pi=Math.min,ov=p.retrieve,fo=p.each,sv=["itemStyle","borderWidth"],Nx=["itemStyle","gapWidth"],zx=["upperLabel","show"],Bx=["upperLabel","height"],Gx={seriesType:"treemap",reset:function(a,e,t,r){var i=t.getWidth(),n=t.getHeight(),o=a.option,s=yt.dV(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=(0,k.lo)(ov(s.width,l[0]),i),h=(0,k.lo)(ov(s.height,l[1]),n),v=r&&r.type,c=["treemapZoomToNode","treemapRootToNode"],f=Ia(r,c,a),d=v==="treemapRender"||v==="treemapMove"?r.rootRect:null,g=a.getViewRoot(),y=Yh(g);if(v!=="treemapMove"){var m=v==="treemapZoomToNode"?Ux(a,f,g,u,h):d?[d.width,d.height]:[u,h],S=o.sort;S&&S!=="asc"&&S!=="desc"&&(S="desc");var x={squareRatio:o.squareRatio,sort:S,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(b),lv(g,x,!1,0),b=g.getLayout(),fo(y,function(A,w){var C=(y[w+1]||g).getValue();A.setLayout(p.extend({dataExtent:[C,C],borderWidth:0,upperHeight:0},b))})}var _=a.getData().tree.root;_.setLayout(Xx(s,d,f),!0),a.setLayoutInfo(s),hv(_,new vt.A(-s.x,-s.y,i,n),y,g,0)}};function lv(a,e,t,r){var i,n;if(!a.isRemoved()){var o=a.getLayout();i=o.width,n=o.height;var s=a.getModel(),l=s.get(sv),u=s.get(Nx)/2,h=vv(s),v=Math.max(l,h),c=l-u,f=v-u;a.setLayout({borderWidth:l,upperHeight:v,upperLabelHeight:h},!0),i=Ea(i-2*c,0),n=Ea(n-c-f,0);var d=i*n,g=Hx(a,s,d,e,t,r);if(g.length){var y={x:c,y:f,width:i,height:n},m=Pi(i,n),S=1/0,x=[];x.area=0;for(var b=0,_=g.length;b<_;){var A=g[b];x.push(A),x.area+=A.getLayout().area;var w=Zx(x,m,e.squareRatio);w<=S?(b++,S=w):(x.area-=x.pop().getLayout().area,uv(x,m,y,u,!1),m=Pi(y.width,y.height),x.length=x.area=0,S=1/0)}if(x.length&&uv(x,m,y,u,!0),!t){var C=s.get("childrenVisibleMin");C!=null&&d=0;l--){var u=i[r==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function Zx(a,e,t){for(var r=0,i=1/0,n=0,o=void 0,s=a.length;nr&&(r=o));var l=a.area*a.area,u=e*e*t;return l?Ea(u*r/l,l/(u*i)):1/0}function uv(a,e,t,r,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],h=e?a.area/e:0;(i||h>t[l[o]])&&(h=t[l[o]]);for(var v=0,c=a.length;vk.Is&&(u=k.Is),n=s}ur&&(r=e);var n=r%2?r+2:r+3;i=[];for(var o=0;o0&&(_[0]=-_[0],_[1]=-_[1]);var w=b[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var C=-Math.atan2(b[1],b[0]);v[0].8?"left":c[0]<-.8?"right":"center",g=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":n.x=-c[0]*m+h[0],n.y=-c[1]*S+h[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",g=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=m*w+h[0],n.y=h[1]+T,d=b[0]<0?"right":"left",n.originX=-m*w,n.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=A[0],n.y=A[1]+T,d="center",n.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-m*w+v[0],n.y=v[1]+T,d=b[0]>=0?"right":"left",n.originX=m*w,n.originY=-T;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||g,align:n.__align||d})}},e}(it.A),Co=cS,fS=function(){function a(e){this.group=new it.A,this._LineCtor=e||Co}return a.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,i=r.group,n=r._lineData;r._lineData=e,n||i.removeAll();var o=_v(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,r){t.updateLayout(e,r)},this)},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=_v(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!pS(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function _v(a){var e=a.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:(0,q.lx)(e)}}function Av(a){return isNaN(a[0])||isNaN(a[1])}function To(a){return a&&!Av(a[0])&&!Av(a[1])}var Io=fS,Do=[],Lo=[],Mo=[],Wr=ge.k3,Po=at.distSquare,wv=Math.abs;function Cv(a,e,t){for(var r=a[0],i=a[1],n=a[2],o=1/0,s,l=t*t,u=.1,h=.1;h<=.9;h+=.1){Do[0]=Wr(r[0],i[0],n[0],h),Do[1]=Wr(r[1],i[1],n[1],h);var v=wv(Po(Do,e)-l);v=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Ro(a,e){var t=[],r=ge.kx,i=[[],[],[]],n=[[],[]],o=[];e/=2,a.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),v=s.getVisual("toSymbol");u.__original||(u.__original=[at.clone(u[0]),at.clone(u[1])],u[2]&&u.__original.push(at.clone(u[2])));var c=u.__original;if(u[2]!=null){if(at.copy(i[0],c[0]),at.copy(i[1],c[2]),at.copy(i[2],c[1]),h&&h!=="none"){var f=ka(s.node1),d=Cv(i,c[0],f*e);r(i[0][0],i[1][0],i[2][0],d,t),i[0][0]=t[3],i[1][0]=t[4],r(i[0][1],i[1][1],i[2][1],d,t),i[0][1]=t[3],i[1][1]=t[4]}if(v&&v!=="none"){var f=ka(s.node2),d=Cv(i,c[1],f*e);r(i[0][0],i[1][0],i[2][0],d,t),i[1][0]=t[1],i[2][0]=t[2],r(i[0][1],i[1][1],i[2][1],d,t),i[1][1]=t[1],i[2][1]=t[2]}at.copy(u[0],i[0]),at.copy(u[1],i[2]),at.copy(u[2],i[1])}else{if(at.copy(n[0],c[0]),at.copy(n[1],c[1]),at.sub(o,n[1],n[0]),at.normalize(o,o),h&&h!=="none"){var f=ka(s.node1);at.scaleAndAdd(n[0],n[0],o,f*e)}if(v&&v!=="none"){var f=ka(s.node2);at.scaleAndAdd(n[1],n[1],o,-f*e)}at.copy(u[0],n[0]),at.copy(u[1],n[1])}})}function Tv(a){return a.type==="view"}var dS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){var i=new fa,n=new Io,o=this.group;this._controller=new Aa(r.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,r,i){var n=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(Tv(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(h):Q.oi(u,h,t)}Ro(t.getGraph(),Oa(t));var v=t.getData();s.updateData(v);var c=t.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,r,i),clearTimeout(this._layoutTimeout);var f=t.forceLayout,d=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,d);var g=t.get("layout");v.graph.eachNode(function(x){var b=x.dataIndex,_=x.getGraphicEl(),A=x.getModel();if(_){_.off("drag").off("dragend");var w=A.get("draggable");w&&_.on("drag",function(T){switch(g){case"force":f.warmUp(),!n._layouting&&n._startForceLayoutIteration(f,d),f.setFixed(b),v.setItemLayout(b,[_.x,_.y]);break;case"circular":v.setItemLayout(b,[_.x,_.y]),x.setLayout({fixed:!0},!0),So(t,"symbolSize",x,[T.offsetX,T.offsetY]),n.updateLayout(t);break;case"none":default:v.setItemLayout(b,[_.x,_.y]),mo(t.getGraph(),t),n.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(b)}),_.setDraggable(w,!!A.get("cursor"));var C=A.get(["emphasis","focus"]);C==="adjacency"&&((0,ct.z)(_).focus=x.getAdjacentDataIndices())}}),v.graph.eachEdge(function(x){var b=x.getGraphicEl(),_=x.getModel().get(["emphasis","focus"]);b&&_==="adjacency"&&((0,ct.z)(b).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var y=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=v.getLayout("cx"),S=v.getLayout("cy");v.graph.eachNode(function(x){gv(x,y,m,S)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,r){var i=this;(function n(){t.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(r?i._layoutTimeout=setTimeout(n,16):n())})})()},e.prototype._updateController=function(t,r,i){var n=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,h,v){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(h,v)&&!mi(u,i,t)}),!Tv(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Yn(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Zn(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(),Ro(t.getGraph(),Oa(t)),n._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),i=Oa(t);r.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},e.prototype.updateLayout=function(t){Ro(t.getGraph(),Oa(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Nt.A),gS=dS;function Yr(a){return"_EC_"+a}var yS=function(){function a(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return a.prototype.isDirected=function(){return this._directed},a.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var r=this._nodesMap;if(!r[Yr(e)]){var i=new Tr(e,t);return i.hostGraph=this,this.nodes.push(i),r[Yr(e)]=i,i}},a.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},a.prototype.getNodeById=function(e){return this._nodesMap[Yr(e)]},a.prototype.addEdge=function(e,t,r){var i=this._nodesMap,n=this._edgesMap;if(p.isNumber(e)&&(e=this.nodes[e]),p.isNumber(t)&&(t=this.nodes[t]),e instanceof Tr||(e=i[Yr(e)]),t instanceof Tr||(t=i[Yr(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new Iv(e,t,r);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),n[o]=s,s}},a.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},a.prototype.getEdge=function(e,t){e instanceof Tr&&(e=e.id),t instanceof Tr&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},a.prototype.eachNode=function(e,t){for(var r=this.nodes,i=r.length,n=0;n=0&&e.call(t,r[n],n)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,i=r.length,n=0;n=0&&r[n].node1.dataIndex>=0&&r[n].node2.dataIndex>=0&&e.call(t,r[n],n)},a.prototype.breadthFirstTraverse=function(e,t,r,i){if(t instanceof Tr||(t=this._nodesMap[Yr(t)]),!!t){for(var n=r==="out"?"outEdges":r==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n=0&&this[a][e].setItemVisual(this.dataIndex,t,r)},getVisual:function(t){return this[a][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,r){this.dataIndex>=0&&this[a][e].setItemLayout(this.dataIndex,t,r)},getLayout:function(){return this[a][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[a][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[a][e].getRawIndex(this.dataIndex)}}}p.mixin(Tr,Dv("hostGraph","data")),p.mixin(Iv,Dv("hostGraph","edgeData"));var mS=yS,Lv=E(89737);function Mv(a,e,t,r,i){for(var n=new mS(r),o=0;o "+c)),u++)}var f=t.get("coordinateSystem"),d;if(f==="cartesian2d"||f==="polar")d=(0,Fe.A)(a,t);else{var g=Lv.A.get(f),y=g?g.dimensions||[]:[];p.indexOf(y,"value")<0&&y.concat(["value"]);var m=(0,ci.A)(a,{coordDimensions:y,encodeDefine:t.getEncode()}).dimensions;d=new he.A(m,t),d.initData(a)}var S=new he.A(["value"],t);return S.initData(l,s),i&&i(d,S),Wh({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var xS=E(4235),SS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments);var r=this;function i(){return r._categoriesData}this.legendVisualProvider=new ma(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){a.prototype.mergeDefaultAndTheme.apply(this,arguments),(0,J.M5)(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){tS(this);var s=Mv(n,i,this,!0,l);return p.each(s.edges,function(u){eS(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,h){u.wrapMethod("getItemModel",function(d){var g=o._categoriesModels,y=d.getShallow("category"),m=g[y];return m&&(m.parentModel=d.parentModel,d.parentModel=m),d});var v=Xt.A.prototype.getModel;function c(d,g){var y=v.call(this,d,g);return y.resolveParentPath=f,y}h.wrapMethod("getItemModel",function(d){return d.resolveParentPath=f,d.getModel=c,d});function f(d){if(d&&(d[0]==="label"||d[1]==="label")){var g=d.slice();return d[0]==="label"?g[0]="edgeLabel":d[1]==="label"&&(g[1]="edgeLabel"),g}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,r,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),(0,zt.Qx)("nameValue",{name:h.join(" > "),value:o.value,noValue:o.value==null})}var v=(0,xS.J)({series:this,dataIndex:t,multipleSeries:r});return v},e.prototype._updateCategoriesData=function(){var t=p.map(this.option.categories||[],function(i){return i.value!=null?i:p.extend({value:0},i)}),r=new he.A(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(i){return r.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return a.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}(Ot.A),bS=SS,_S={type:"graphRoam",event:"graphRoam",update:"none"};function AS(a){a.registerChartView(gS),a.registerSeriesModel(bS),a.registerProcessor(Kx),a.registerVisual($x),a.registerVisual(Jx),a.registerLayout(rS),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,iS),a.registerLayout(oS),a.registerCoordinateSystem("graphView",{dimensions:Ca.dimensions,create:lS}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},p.noop),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},p.noop),a.registerAction(_S,function(e,t,r){t.eachComponent({mainType:"series",query:e},function(i){var n=i.coordinateSystem,o=$n(n,e,void 0,r);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var wS=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),CS=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new wS},e.prototype.buildPath=function(t,r){var i=Math.cos,n=Math.sin,o=r.r,s=r.width,l=r.angle,u=r.x-i(l)*s*(s>=o/3?1:2),h=r.y-n(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,t.moveTo(u,h),t.lineTo(r.x+i(l)*s,r.y+n(l)*s),t.lineTo(r.x+i(r.angle)*o,r.y+n(r.angle)*o),t.lineTo(r.x-i(l)*s,r.y-n(l)*s),t.lineTo(u,h)},e}(Vt.Ay),TS=CS;function IS(a,e){var t=a.get("center"),r=e.getWidth(),i=e.getHeight(),n=Math.min(r,i),o=(0,k.lo)(t[0],e.getWidth()),s=(0,k.lo)(t[1],e.getHeight()),l=(0,k.lo)(a.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Vi(a,e){var t=a==null?"":a+"";return e&&((0,p.isString)(e)?t=e.replace("{value}",t):(0,p.isFunction)(e)&&(t=e(a))),t}var DS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=IS(t,i);this._renderMain(t,r,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,i,n,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,v=t.getModel("axisLine"),c=v.get("roundCap"),f=c?si:ye.A,d=v.get("show"),g=v.getModel("lineStyle"),y=g.get("width"),m=[u,h];(0,la.q)(m,!l),u=m[0],h=m[1];for(var S=h-u,x=u,b=[],_=0;d&&_=T&&(I===0?0:n[I-1][0])Math.PI/2&&(ot+=Math.PI)):lt==="tangential"?ot=-C-Math.PI/2:(0,p.isNumber)(lt)&&(ot=lt*Math.PI/180),ot===0?v.add(new _t.Ay({style:(0,q.VB)(x,{text:W,x:K,y:et,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:$}),silent:!0})):v.add(new _t.Ay({style:(0,q.VB)(x,{text:W,x:K,y:et,verticalAlign:"middle",align:"center"},{inheritColor:$}),silent:!0,originX:K,originY:et,rotation:ot}))}if(S.get("show")&&V!==b){var B=S.get("distance");B=B?B+h:h;for(var mt=0;mt<=_;mt++){P=Math.cos(C),R=Math.sin(C);var At=new le.A({shape:{x1:P*(d-B)+c,y1:R*(d-B)+f,x2:P*(d-w-B)+c,y2:R*(d-w-B)+f},silent:!0,style:L});L.stroke==="auto"&&At.setStyle({stroke:n((V+mt/_)/b)}),v.add(At),C+=I}C-=I}else C+=T}},e.prototype._renderPointer=function(t,r,i,n,o,s,l,u,h){var v=this.group,c=this._data,f=this._progressEls,d=[],g=t.get(["pointer","show"]),y=t.getModel("progress"),m=y.get("show"),S=t.getData(),x=S.mapDimension("value"),b=+t.get("min"),_=+t.get("max"),A=[b,_],w=[s,l];function C(I,D){var L=S.getItemModel(I),M=L.getModel("pointer"),P=(0,k.lo)(M.get("width"),o.r),R=(0,k.lo)(M.get("length"),o.r),V=t.get(["pointer","icon"]),B=M.get("offsetCenter"),z=(0,k.lo)(B[0],o.r),W=(0,k.lo)(B[1],o.r),$=M.get("keepAspect"),K;return V?K=(0,Tt.v5)(V,z-P/2,W-R,P,R,null,$):K=new TS({shape:{angle:-Math.PI/2,width:P,r:R,x:z,y:W}}),K.rotation=-(D+Math.PI/2),K.x=o.cx,K.y=o.cy,K}function T(I,D){var L=y.get("roundCap"),M=L?si:ye.A,P=y.get("overlap"),R=P?y.get("width"):h/S.count(),V=P?o.r-R:o.r-(I+1)*R,B=P?o.r:o.r-I*R,z=new M({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:V,r:B}});return P&&(z.z2=_-S.get(x,I)%_),z}(m||g)&&(S.diff(c).add(function(I){var D=S.get(x,I);if(g){var L=C(I,s);Q.LW(L,{rotation:-((isNaN(+D)?w[0]:(0,k.Cb)(D,A,w,!0))+Math.PI/2)},t),v.add(L),S.setItemGraphicEl(I,L)}if(m){var M=T(I,s),P=y.get("clip");Q.LW(M,{shape:{endAngle:(0,k.Cb)(D,A,w,P)}},t),v.add(M),(0,ct.a)(t.seriesIndex,S.dataType,I,M),d[I]=M}}).update(function(I,D){var L=S.get(x,I);if(g){var M=c.getItemGraphicEl(D),P=M?M.rotation:s,R=C(I,P);R.rotation=P,Q.oi(R,{rotation:-((isNaN(+L)?w[0]:(0,k.Cb)(L,A,w,!0))+Math.PI/2)},t),v.add(R),S.setItemGraphicEl(I,R)}if(m){var V=f[D],B=V?V.shape.endAngle:s,z=T(I,B),W=y.get("clip");Q.oi(z,{shape:{endAngle:(0,k.Cb)(L,A,w,W)}},t),v.add(z),(0,ct.a)(t.seriesIndex,S.dataType,I,z),d[I]=z}}).execute(),S.each(function(I){var D=S.getItemModel(I),L=D.getModel("emphasis"),M=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(g){var V=S.getItemGraphicEl(I),B=S.getItemVisual(I,"style"),z=B.fill;if(V instanceof ue.Ay){var W=V.style;V.useStyle((0,p.extend)({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},B))}else V.useStyle(B),V.type!=="pointer"&&V.setColor(z);V.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),V.style.fill==="auto"&&V.setStyle("fill",n((0,k.Cb)(S.get(x,I),A,[0,1],!0))),V.z2EmphasisLift=0,(0,U.Mx)(V,D),(0,U.Lm)(V,M,P,R)}if(m){var $=d[I];$.useStyle(S.getItemVisual(I,"style")),$.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),$.z2EmphasisLift=0,(0,U.Mx)($,D),(0,U.Lm)($,M,P,R)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,r){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),h=(0,Tt.v5)(s,r.cx-o/2+(0,k.lo)(l[0],r.r),r.cy-o/2+(0,k.lo)(l[1],r.r),o,o,null,u);h.z2=i.get("showAbove")?1:0,h.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(h)}},e.prototype._renderTitleAndDetail=function(t,r,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),h=+t.get("min"),v=+t.get("max"),c=new it.A,f=[],d=[],g=t.isAnimationEnabled(),y=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){f[m]=new _t.Ay({silent:!0}),d[m]=new _t.Ay({silent:!0})}).update(function(m,S){f[m]=s._titleEls[S],d[m]=s._detailEls[S]}).execute(),l.each(function(m){var S=l.getItemModel(m),x=l.get(u,m),b=new it.A,_=n((0,k.Cb)(x,[h,v],[0,1],!0)),A=S.getModel("title");if(A.get("show")){var w=A.get("offsetCenter"),C=o.cx+(0,k.lo)(w[0],o.r),T=o.cy+(0,k.lo)(w[1],o.r),I=f[m];I.attr({z2:y?0:2,style:(0,q.VB)(A,{x:C,y:T,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:_})}),b.add(I)}var D=S.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),M=o.cx+(0,k.lo)(L[0],o.r),P=o.cy+(0,k.lo)(L[1],o.r),R=(0,k.lo)(D.get("width"),o.r),V=(0,k.lo)(D.get("height"),o.r),B=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:_,I=d[m],z=D.get("formatter");I.attr({z2:y?0:2,style:(0,q.VB)(D,{x:M,y:P,text:Vi(x,z),width:isNaN(R)?null:R,height:isNaN(V)?null:V,align:"center",verticalAlign:"middle"},{inheritColor:B})}),(0,q.Oh)(I,{normal:D},x,function($){return Vi($,z)}),g&&(0,q.xb)(I,m,l,t,{getFormattedLabel:function($,K,et,lt,ot,mt){return Vi(mt?mt.interpolatedValue:x,z)}}),b.add(I)}c.add(b)}),this.group.add(c),this._titleEls=f,this._detailEls=d},e.type="gauge",e}(Nt.A),LS=DS,MS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,r){return zr(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}(Ot.A),PS=MS;function RS(a){a.registerChartView(LS),a.registerSeriesModel(PS)}var ES=["itemStyle","opacity"],VS=function(a){(0,O.C6)(e,a);function e(t,r){var i=a.call(this)||this,n=i,o=new Pe.A,s=new _t.Ay;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,r,!0),i}return e.prototype.updateData=function(t,r,i){var n=this,o=t.hostModel,s=t.getItemModel(r),l=t.getItemLayout(r),u=s.getModel("emphasis"),h=s.get(ES);h=h==null?1:h,i||(0,Q.ap)(n),n.useStyle(t.getItemVisual(r,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,Q.LW(n,{style:{opacity:h}},o,r)):Q.oi(n,{style:{opacity:h},shape:{points:l.points}},o,r),(0,U.Mx)(n,s),this._updateLabel(t,r),(0,U.Lm)(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(r),u=t.getItemLayout(r),h=u.label,v=t.getItemVisual(r,"style"),c=v.fill;(0,q.qM)(o,(0,q.lx)(l),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:v.opacity,defaultText:t.getName(r)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}}),i.setTextConfig({local:!0,inside:!!h.inside,insideStroke:c,outsideFill:c});var f=h.linePoints;n.setShape({points:f}),i.textGuideLineConfig={anchor:f?new Re.A(f[0][0],f[0][1]):null},Q.oi(o,{style:{x:h.x,y:h.y}},s,r),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),(0,Nr.eR)(i,(0,Nr.rv)(l),{stroke:c})},e}(Se.A),OS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new VS(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(n,l),s.add(h),n.setItemGraphicEl(l,h)}).remove(function(l){var u=o.getItemGraphicEl(l);Q.t5(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Nt.A),kS=OS,NS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ma(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return zr(this,{coordDimensions:["value"],encodeDefaulter:p.curry(fi.ln,this)})},e.prototype._defaultLabelLine=function(t){(0,J.M5)(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),i=a.prototype.getDataParams.call(this,t),n=r.mapDimension("value"),o=r.getSum(n);return i.percent=o?+(r.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},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}(Ot.A),zS=NS;function BS(a,e){return yt.dV(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function GS(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=a.count();on1)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(a){if(!(this._mouseDownPoint||!Vo(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]),r=t.behavior;r==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(r==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:r==="jump"?null:{duration:0}})}}};function Vo(a,e){var t=a._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var l1=o1,u1=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){a.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var r=this.option;t&&p.merge(r,t,!0),this._initDimensions()},e.prototype.contains=function(t,r){var i=t.get("parallelIndex");return i!=null&&r.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){p.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(r){t.hasOwnProperty(r)&&(this.option[r]=t[r])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],r=this.parallelAxisIndex=[],i=p.filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);p.each(i,function(n){t.push("dim"+n.get("dim")),r.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Ht.A),h1=u1,v1=function(a){(0,O.C6)(e,a);function e(t,r,i,n,o){var s=a.call(this,t,r,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Ee.A),c1=v1;function Ir(a,e,t,r,i,n){a=a||0;var o=t[1]-t[0];if(i!=null&&(i=Zr(i,[0,o])),n!=null&&(n=Math.max(n,i!=null?i:0)),r==="all"){var s=Math.abs(e[1]-e[0]);s=Zr(s,[0,o]),i=n=Zr(s,[i,n]),r=0}e[0]=Zr(e[0],t),e[1]=Zr(e[1],t);var l=Oo(e,r);e[r]+=a;var u=i||0,h=t.slice();l.sign<0?h[0]+=u:h[1]-=u,e[r]=Zr(e[r],h);var v;return v=Oo(e,r),i!=null&&(v.sign!==l.sign||v.spann&&(e[1-r]=e[r]+v.sign*n),e}function Oo(a,e){var t=a[e]-a[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Zr(a,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,a))}var ko=p.each,Vv=Math.min,Ov=Math.max,kv=Math.floor,f1=Math.ceil,Nv=k.LI,p1=Math.PI,d1=function(){function a(e,t,r){this.type="parallel",this._axesMap=p.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var i=e.dimensions,n=e.parallelAxisIndex;ko(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),h=this._axesMap.set(o,new c1(o,Ut.f$(u),[0,0],u.get("type"),l)),v=h.type==="category";h.onBand=v&&u.get("boundaryGap"),h.inverse=u.get("inverse"),u.axis=h,h.model=u,h.coordinateSystem=u.coordinateSystem=this},this)},a.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},a.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),r=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=r&&o<=r+t.axisLength&&s>=i&&s<=i+t.layoutLength},a.prototype.getModel=function(){return this._model},a.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(r){if(e.contains(r,t)){var i=r.getData();ko(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),Ut.af(o.scale,o.model)},this)}},this)},a.prototype.resize=function(e,t){this._rect=yt.dV(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},a.prototype.getRect=function(){return this._rect},a.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,r=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,h=Oi(e.get("axisExpandWidth"),l),v=Oi(e.get("axisExpandCount")||0,[0,u]),c=e.get("axisExpandable")&&u>3&&u>v&&v>1&&h>0&&s>0,f=e.get("axisExpandWindow"),d;if(f)d=Oi(f[1]-f[0],l),f[1]=f[0]+d;else{d=Oi(h*(v-1),l);var g=e.get("axisExpandCenter")||kv(u/2);f=[h*g-d/2],f[1]=f[0]+d}var y=(s-d)/(u-v);y<3&&(y=0);var m=[kv(Nv(f[0]/h,1))+1,f1(Nv(f[1]/h,1))-1],S=y/h*f[0];return{layout:n,pixelDimIndex:o,layoutBase:t[r[o]],layoutLength:s,axisBase:t[r[1-o]],axisLength:t[i[1-o]],axisExpandable:c,axisExpandWidth:h,axisCollapseWidth:y,axisExpandWindow:f,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:S}},a.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,r=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),ko(r,function(o,s){var l=(i.axisExpandable?y1:g1)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},h={horizontal:p1/2,vertical:0},v=[u[n].x+e.x,u[n].y+e.y],c=h[n],f=Lt.create();Lt.rotate(f,f,c),Lt.translate(f,f,v),this._axesLayout[o]={position:v,rotation:c,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},a.prototype.getAxis=function(e){return this._axesMap.get(e)},a.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},a.prototype.eachActiveState=function(e,t,r,i){r==null&&(r=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];p.each(o,function(y){s.push(e.mapDimension(y)),l.push(n.get(y).model)});for(var u=this.hasAxisBrushed(),h=r;hn*(1-v[0])?(u="jump",l=s-n*(1-v[2])):(l=s-n*v[1])>=0&&(l=s-n*(1-v[1]))<=0&&(l=0),l*=t.axisExpandWidth/h,l?Ir(l,i,o,"all"):u="none";else{var f=i[1]-i[0],d=o[1]*s/f;i=[Ov(0,d-f/2)],i[1]=Vv(o[1],i[0]+f),i[0]=i[1]-f}return{axisExpandWindow:i,behavior:u}},a}();function Oi(a,e){return Vv(Ov(a,e[0]),e[1])}function g1(a,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*a,axisNameAvailableWidth:t,axisLabelShow:!0}}function y1(a,e){var t=e.layoutLength,r=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,h;return a=0;i--)k.Y6(r[i])},e.prototype.getActiveState=function(t){var r=this.activeIntervals;if(!r.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(r.length===1){var i=r[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=r.length;nw1}function Xv(a){var e=a.length-1;return e<0&&(e=0),[a[0],a[e]]}function jv(a,e,t,r){var i=new it.A;return i.add(new Dt.A({name:"main",style:Fo(t),silent:!0,draggable:!0,cursor:"move",drift:(0,p.curry)(Jv,a,e,i,["n","s","w","e"]),ondragend:(0,p.curry)(Lr,e,{isEnd:!0})})),(0,p.each)(r,function(n){i.add(new Dt.A({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,p.curry)(Jv,a,e,i,n),ondragend:(0,p.curry)(Lr,e,{isEnd:!0})}))}),i}function Kv(a,e,t,r){var i=r.brushStyle.lineWidth||0,n=Ur(i,C1),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,h=t[0][1],v=t[1][1],c=h-n+i/2,f=v-n+i/2,d=h-o,g=v-s,y=d+i,m=g+i;Ze(a,e,"main",o,s,d,g),r.transformable&&(Ze(a,e,"w",l,u,n,m),Ze(a,e,"e",c,u,n,m),Ze(a,e,"n",l,u,y,n),Ze(a,e,"s",l,f,y,n),Ze(a,e,"nw",l,u,n,n),Ze(a,e,"ne",c,u,n,n),Ze(a,e,"sw",l,f,n,n),Ze(a,e,"se",c,f,n,n))}function Ho(a,e){var t=e.__brushOption,r=t.transformable,i=e.childAt(0);i.useStyle(Fo(t)),i.attr({silent:!r,cursor:r?"move":"default"}),(0,p.each)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),s=n.length===1?Wo(a,n[0]):R1(a,n);o&&o.attr({silent:!r,invisible:!r,cursor:r?I1[s]+"-resize":null})})}function Ze(a,e,t,r,i,n,o){var s=e.childOfName(t);s&&s.setShape(V1(Yo(a,e,[[r,i],[r+n,i+o]])))}function Fo(a){return(0,p.defaults)({strokeNoScale:!0},a.brushStyle)}function $v(a,e,t,r){var i=[Na(a,t),Na(e,r)],n=[Ur(a,t),Ur(e,r)];return[[i[0],n[0]],[i[1],n[1]]]}function P1(a){return tt.getTransform(a.group)}function Wo(a,e){var t={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=tt.transformDirection(t[e],P1(a));return r[i]}function R1(a,e){var t=[Wo(a,e[0]),Wo(a,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function Jv(a,e,t,r,i,n){var o=t.__brushOption,s=a.toRectRange(o.range),l=Qv(e,i,n);(0,p.each)(r,function(u){var h=T1[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=a.fromRectRange($v(s[0][0],s[1][0],s[0][1],s[1][1])),No(e,t),Lr(e,{isEnd:!1})}function E1(a,e,t,r){var i=e.__brushOption.range,n=Qv(a,t,r);(0,p.each)(i,function(o){o[0]+=n[0],o[1]+=n[1]}),No(a,e),Lr(a,{isEnd:!1})}function Qv(a,e,t){var r=a.group,i=r.transformCoordToLocal(e,t),n=r.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function Yo(a,e,t){var r=Uv(a,e);return r&&r!==Dr?r.clipPath(t,a._transform):(0,p.clone)(t)}function V1(a){var e=Na(a[0][0],a[1][0]),t=Na(a[0][1],a[1][1]),r=Ur(a[0][0],a[1][0]),i=Ur(a[0][1],a[1][1]);return{x:e,y:t,width:r-e,height:i-t}}function O1(a,e,t){if(!(!a._brushType||N1(a,e.offsetX,e.offsetY))){var r=a._zr,i=a._covers,n=Bo(a,e,t);if(!a._dragging)for(var o=0;or.getWidth()||t<0||t>r.getHeight()}var ki={lineX:rc(0),lineY:rc(1),rect:{createCover:function(a,e){function t(r){return r}return jv({toRectRange:t,fromRectRange:t},a,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(a){var e=Xv(a);return $v(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(a,e,t,r){Kv(a,e,t,r)},updateCommon:Ho,contain:Uo},polygon:{createCover:function(a,e){var t=new it.A;return t.add(new Pe.A({name:"main",style:Fo(e),silent:!0})),t},getCreatingRange:function(a){return a},endCreating:function(a,e){e.remove(e.childAt(0)),e.add(new Se.A({name:"main",draggable:!0,drift:(0,p.curry)(E1,a,e),ondragend:(0,p.curry)(Lr,a,{isEnd:!0})}))},updateCoverShape:function(a,e,t,r){e.childAt(0).setShape({points:Yo(a,e,t)})},updateCommon:Ho,contain:Uo}};function rc(a){return{createCover:function(e,t){return jv({toRectRange:function(r){var i=[r,[0,100]];return a&&i.reverse(),i},fromRectRange:function(r){return r[a]}},e,t,[[["w"],["e"]],[["n"],["s"]]][a])},getCreatingRange:function(e){var t=Xv(e),r=Na(t[0][a],t[1][a]),i=Ur(t[0][a],t[1][a]);return[r,i]},updateCoverShape:function(e,t,r,i){var n,o=Uv(e,t);if(o!==Dr&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(a);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-a]]}var l=[r,n];a&&l.reverse(),Kv(e,t,l,i)},updateCommon:Ho,contain:Uo}}var Xo=L1;function ac(a){return a=jo(a),function(e){return tt.clipPointsByRect(e,a)}}function ic(a,e){return a=jo(a),function(t){var r=e!=null?e:t,i=r?a.width:a.height,n=r?a.x:a.y;return[n,n+(i||0)]}}function nc(a,e,t){var r=jo(a);return function(i,n){return r.contain(n[0],n[1])&&!mi(i,e,t)}}function jo(a){return vt.A.create(a)}var z1=["axisLine","axisTickLabel","axisName"],B1=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){a.prototype.init.apply(this,arguments),(this._brushController=new Xo(r.getZr())).on("brush",p.bind(this._onBrush,this))},e.prototype.render=function(t,r,i,n){if(!G1(t,r,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new it.A,this.group.add(this._axisGroup),!!t.get("show")){var s=F1(t,r),l=s.coordinateSystem,u=t.getAreaSelectStyle(),h=u.width,v=t.axis.dim,c=l.getAxisLayout(v),f=p.extend({strokeContainThreshold:h},c),d=new We(t,f);p.each(z1,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(f,u,t,s,h,i),tt.groupTransition(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,r,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,Math.abs(u)*.1),v=vt.A.create({x:l[0],y:-o/2,width:u,height:o});v.x-=h,v.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:ac(v),isTargetByCursor:nc(v,s,n),getLinearBrushOtherExtent:ic(v,0)}]).enableBrush({brushType:"lineX",brushStyle:r,removeOnClick:!0}).updateCovers(H1(i))},e.prototype._onBrush=function(t){var r=t.areas,i=this.axisModel,n=i.axis,o=p.map(r,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Yt.A);function G1(a,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===a}function H1(a){var e=a.axis;return p.map(a.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function F1(a,e){return e.getComponent("parallel",a.get("parallelIndex"))}var W1=B1,Y1={type:"axisAreaSelect",event:"axisAreaSelected"};function Z1(a){a.registerAction(Y1,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(r){r.axis.model.setActiveIntervals(e.intervals)})}),a.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(r){r.setAxisExpand(e)})})}var U1={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function oc(a){a.registerComponentView(l1),a.registerComponentModel(h1),a.registerCoordinateSystem("parallel",b1),a.registerPreprocessor(r1),a.registerComponentModel(Bv),a.registerComponentView(W1),Br(a,"parallel",Bv,U1),Z1(a)}function X1(a){(0,Y.Y)(oc),a.registerChartView(jS),a.registerSeriesModel(QS),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,e1)}var j1=function(){function a(){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 a}(),K1=function(a){(0,O.C6)(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new j1},e.prototype.buildPath=function(t,r){var i=r.extent;t.moveTo(r.x1,r.y1),t.bezierCurveTo(r.cpx1,r.cpy1,r.cpx2,r.cpy2,r.x2,r.y2),r.orient==="vertical"?(t.lineTo(r.x2+i,r.y2),t.bezierCurveTo(r.cpx2+i,r.cpy2,r.cpx1+i,r.cpy1,r.x1+i,r.y1)):(t.lineTo(r.x2,r.y2+i),t.bezierCurveTo(r.cpx2,r.cpy2+i,r.cpx1,r.cpy1+i,r.x1,r.y1+i)),t.closePath()},e.prototype.highlight=function(){(0,U.HY)(this)},e.prototype.downplay=function(){(0,U.SD)(this)},e}(Vt.Ay),$1=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,r,i){var n=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,h=l.height,v=t.getData(),c=t.getData("edge"),f=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var g=new K1,y=(0,ct.z)(g);y.dataIndex=d.dataIndex,y.seriesIndex=t.seriesIndex,y.dataType="edge";var m=d.getModel(),S=m.getModel("lineStyle"),x=S.get("curveness"),b=d.node1.getLayout(),_=d.node1.getModel(),A=_.get("localX"),w=_.get("localY"),C=d.node2.getLayout(),T=d.node2.getModel(),I=T.get("localX"),D=T.get("localY"),L=d.getLayout(),M,P,R,V,B,z,W,$;g.shape.extent=Math.max(1,L.dy),g.shape.orient=f,f==="vertical"?(M=(A!=null?A*u:b.x)+L.sy,P=(w!=null?w*h:b.y)+b.dy,R=(I!=null?I*u:C.x)+L.ty,V=D!=null?D*h:C.y,B=M,z=P*(1-x)+V*x,W=R,$=P*x+V*(1-x)):(M=(A!=null?A*u:b.x)+b.dx,P=(w!=null?w*h:b.y)+L.sy,R=I!=null?I*u:C.x,V=(D!=null?D*h:C.y)+L.ty,B=M*(1-x)+R*x,z=P,W=M*x+R*(1-x),$=V),g.setShape({x1:M,y1:P,x2:R,y2:V,cpx1:B,cpy1:z,cpx2:W,cpy2:$}),g.useStyle(S.getItemStyle()),sc(g.style,f,d);var K=""+m.get("value"),et=(0,q.lx)(m,"edgeLabel");(0,q.qM)(g,et,{labelFetcher:{getFormattedLabel:function(mt,At,xt,nt,Ct,wt){return t.getFormattedLabel(mt,At,"edge",nt,(0,p.retrieve3)(Ct,et.normal&&et.normal.get("formatter"),K),wt)}},labelDataIndex:d.dataIndex,defaultText:K}),g.setTextConfig({position:"inside"});var lt=m.getModel("emphasis");(0,U.Mx)(g,m,"lineStyle",function(mt){var At=mt.getItemStyle();return sc(At,f,d),At}),s.add(g),c.setItemGraphicEl(d.dataIndex,g);var ot=lt.get("focus");(0,U.Lm)(g,ot==="adjacency"?d.getAdjacentDataIndices():ot==="trajectory"?d.getTrajectoryDataIndices():ot,lt.get("blurScope"),lt.get("disabled"))}),o.eachNode(function(d){var g=d.getLayout(),y=d.getModel(),m=y.get("localX"),S=y.get("localY"),x=y.getModel("emphasis"),b=y.get(["itemStyle","borderRadius"])||0,_=new Dt.A({shape:{x:m!=null?m*u:g.x,y:S!=null?S*h:g.y,width:g.dx,height:g.dy,r:b},style:y.getModel("itemStyle").getItemStyle(),z2:10});(0,q.qM)(_,(0,q.lx)(y),{labelFetcher:{getFormattedLabel:function(w,C){return t.getFormattedLabel(w,C,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),_.disableLabelAnimation=!0,_.setStyle("fill",d.getVisual("color")),_.setStyle("decal",d.getVisual("style").decal),(0,U.Mx)(_,y),s.add(_),v.setItemGraphicEl(d.dataIndex,_),(0,ct.z)(_).dataType="node";var A=x.get("focus");(0,U.Lm)(_,A==="adjacency"?d.getAdjacentDataIndices():A==="trajectory"?d.getTrajectoryDataIndices():A,x.get("blurScope"),x.get("disabled"))}),v.eachItemGraphicEl(function(d,g){var y=v.getItemModel(g);y.get("draggable")&&(d.drift=function(m,S){n._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=S,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:v.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/h})},d.ondragend=function(){n._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(J1(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Nt.A);function sc(a,e,t){switch(a.fill){case"source":a.fill=t.node1.getVisual("color"),a.decal=t.node1.getVisual("style").decal;break;case"target":a.fill=t.node2.getVisual("color"),a.decal=t.node2.getVisual("style").decal;break;case"gradient":var r=t.node1.getVisual("color"),i=t.node2.getVisual("color");(0,p.isString)(r)&&(0,p.isString)(i)&&(a.fill=new ii.A(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:r,offset:0},{color:i,offset:1}]))}}function J1(a,e,t){var r=new Dt.A({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return Q.LW(r,{shape:{width:a.width+20}},e,t),r}var Q1=$1,q1=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Xt.A(o[l],this,r));if(n&&i){var u=Mv(n,i,this,!0,h);return u.data}function h(v,c){v.wrapMethod("getItemModel",function(f,d){var g=f.parentModel,y=g.getData().getItemLayout(d);if(y){var m=y.depth,S=g.levelModels[m];S&&(f.parentModel=S)}return f}),c.wrapMethod("getItemModel",function(f,d){var g=f.parentModel,y=g.getGraph().getEdgeByIndex(d),m=y.node1.getLayout();if(m){var S=m.depth,x=g.levelModels[S];x&&(f.parentModel=x)}return f})}},e.prototype.setNodePosition=function(t,r){var i=this.option.data||this.option.nodes,n=i[t];n.localX=r[0],n.localY=r[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,r,i){function n(f){return isNaN(f)||f==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return(0,zt.Qx)("nameValue",{name:u,value:l,noValue:n(l)})}else{var h=this.getGraph().getNodeByIndex(t),v=h.getLayout().value,c=this.getDataParams(t,i).data.name;return(0,zt.Qx)("nameValue",{name:c!=null?c+"":null,value:v,noValue:n(v)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var i=a.prototype.getDataParams.call(this,t,r);if(i.value==null&&r==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},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},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Ot.A),tb=q1;function eb(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),i=t.get("nodeGap"),n=rb(t,e);t.layoutInfo=n;var o=n.width,s=n.height,l=t.getGraph(),u=l.nodes,h=l.edges;ib(u);var v=p.filter(u,function(g){return g.getLayout().value===0}),c=v.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),d=t.get("nodeAlign");ab(u,h,r,i,o,s,c,f,d)})}function rb(a,e){return yt.dV(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function ab(a,e,t,r,i,n,o,s,l){nb(a,e,t,i,n,s,l),ub(a,e,n,i,r,o,s),mb(a,s)}function ib(a){p.each(a,function(e){var t=rr(e.outEdges,Ni),r=rr(e.inEdges,Ni),i=e.getValue()||0,n=Math.max(t,r,i);e.setLayout({value:n},!0)})}function nb(a,e,t,r,i,n,o){for(var s=[],l=[],u=[],h=[],v=0,c=0;c=0;m&&y.depth>f&&(f=y.depth),g.setLayout({depth:m?y.depth:v},!0),n==="vertical"?g.setLayout({dy:t},!0):g.setLayout({dx:t},!0);for(var S=0;Sv-1?f:v-1;o&&o!=="left"&&ob(a,o,n,w);var C=n==="vertical"?(i-t)/w:(r-t)/w;lb(a,C,n)}function lc(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function ob(a,e,t,r){if(e==="right"){for(var i=[],n=a,o=0;n.length;){for(var s=0;s0;n--)l*=.99,cb(s,l,o),Ko(s,i,t,r,o),yb(s,l,o),Ko(s,i,t,r,o)}function hb(a,e){var t=[],r=e==="vertical"?"y":"x",i=(0,J.Sq)(a,function(n){return n.getLayout()[r]});return i.keys.sort(function(n,o){return n-o}),p.each(i.keys,function(n){t.push(i.buckets.get(n))}),t}function vb(a,e,t,r,i,n){var o=1/0;p.each(a,function(s){var l=s.length,u=0;p.each(s,function(v){u+=v.getLayout().value});var h=n==="vertical"?(r-(l-1)*i)/u:(t-(l-1)*i)/u;h0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]+l.getLayout()[c]+e;var d=i==="vertical"?r:t;if(u=h-e-d,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s;for(var f=v-2;f>=0;--f)l=o[f],u=l.getLayout()[n]+l.getLayout()[c]+e-h,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]}})}function cb(a,e,t){p.each(a.slice().reverse(),function(r){p.each(r,function(i){if(i.outEdges.length){var n=rr(i.outEdges,fb,t)/rr(i.outEdges,Ni);if(isNaN(n)){var o=i.outEdges.length;n=o?rr(i.outEdges,pb,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-er(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-er(i,t))*e;i.setLayout({y:l},!0)}}})})}function fb(a,e){return er(a.node2,e)*a.getValue()}function pb(a,e){return er(a.node2,e)}function db(a,e){return er(a.node1,e)*a.getValue()}function gb(a,e){return er(a.node1,e)}function er(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function Ni(a){return a.getValue()}function rr(a,e,t){for(var r=0,i=a.length,n=-1;++no&&(o=l)}),p.each(r,function(s){var l=new ae({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get(["itemStyle","color"]);h!=null?(s.setVisual("color",h),s.setVisual("style",{fill:h})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&p.each(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Sb(a){a.registerChartView(Q1),a.registerSeriesModel(tb),a.registerLayout(eb),a.registerVisual(xb),a.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(r){r.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var $o=E(29756),uc=function(){function a(){}return a.prototype.getInitialData=function(e,t){var r,i=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",r=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",r=n.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],h=e.layout==="horizontal"?0:1,v=this._baseAxisDim=u[h],c=u[1-h],f=[i,n],d=f[h].get("type"),g=f[1-h].get("type"),y=e.data;if(y&&l){var m=[];p.each(y,function(b,_){var A;p.isArray(b)?(A=b.slice(),b.unshift(_)):p.isArray(b.value)?(A=p.extend({},b),A.value=A.value.slice(),b.value.unshift(_)):A=b,m.push(A)}),e.data=m}var S=this.defaultValueDimensions,x=[{name:v,type:(0,$o.B)(d),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:(0,$o.B)(g),dimsDef:S.slice()}];return zr(this,{coordDimensions:x,dimensionsCount:S.length+1,encodeDefaulter:p.curry(fi.OC,x,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),hc=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.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}(Ot.A);(0,p.mixin)(hc,uc,!0);var bb=hc,_b=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var h=n.getItemLayout(u),v=vc(h,n,u,l,!0);n.setItemGraphicEl(u,v),o.add(v)}}).update(function(u,h){var v=s.getItemGraphicEl(h);if(!n.hasValue(u)){o.remove(v);return}var c=n.getItemLayout(u);v?((0,Q.ap)(v),cc(c,v,n,u)):v=vc(c,n,u,l),o.add(v),n.setItemGraphicEl(u,v)}).remove(function(u){var h=s.getItemGraphicEl(u);h&&o.remove(h)}).execute(),this._data=n},e.prototype.remove=function(t){var r=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&r.remove(n)})},e.type="boxplot",e}(Nt.A),Ab=function(){function a(){}return a}(),wb=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new Ab},e.prototype.buildPath=function(t,r){var i=r.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();ng){var b=[m,x];r.push(b)}}}return{boxData:t,outliers:r}}var Gt=E(41025),zi=E(13430),Rb={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==zi.Km){var r="";(0,Gt.$8)(r)}var i=Pb(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Eb(a){a.registerSeriesModel(bb),a.registerChartView(Tb),a.registerLayout(Ib),a.registerTransform(Rb)}var Vb=["color","borderColor"],Ob=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){tt.traverseElements(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t){var r=t.getData(),i=this._data,n=this.group,o=r.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),r.diff(i).add(function(h){if(r.hasValue(h)){var v=r.getItemLayout(h);if(s&&fc(u,v))return;var c=Jo(v,h,!0);Q.LW(c,{shape:{points:v.ends}},t,h),Qo(c,r,h,o),n.add(c),r.setItemGraphicEl(h,c)}}).update(function(h,v){var c=i.getItemGraphicEl(v);if(!r.hasValue(h)){n.remove(c);return}var f=r.getItemLayout(h);if(s&&fc(u,f)){n.remove(c);return}c?(Q.oi(c,{shape:{points:f.ends}},t,h),(0,Q.ap)(c)):c=Jo(f,h),Qo(c,r,h,o),n.add(c),r.setItemGraphicEl(h,c)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&n.remove(v)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),pc(t,this.group);var r=t.get("clip",!0)?pa(t.coordinateSystem,!1,t):null;r?this.group.setClipPath(r):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,r){for(var i=r.getData(),n=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=Jo(s,o);Qo(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){pc(r,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}(Nt.A),kb=function(){function a(){}return a}(),Nb=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new kb},e.prototype.buildPath=function(t,r){var i=r.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(Vt.Ay);function Jo(a,e,t){var r=a.ends;return new Nb({shape:{points:t?zb(r,a):r},z2:100})}function fc(a,e){for(var t=!0,r=0;r0?"borderColor":"borderColor0"])||t.get(["itemStyle",a>0?"color":"color0"]);a===0&&(i=t.get(["itemStyle","borderColorDoji"]));var n=t.getModel("itemStyle").getItemStyle(Vb);e.useStyle(n),e.style.fill=null,e.style.stroke=i}var Gb=Ob,dc=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.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,r,i){var n=r.getItemLayout(t);return n&&i.rect(n.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",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Ot.A);(0,p.mixin)(dc,uc,!0);var Hb=dc;function Fb(a){!a||!p.isArray(a.series)||p.each(a.series,function(e){p.isObject(e)&&e.type==="k"&&(e.type="candlestick")})}var Wb=["itemStyle","borderColor"],Yb=["itemStyle","borderColor0"],Zb=["itemStyle","borderColorDoji"],Ub=["itemStyle","color"],Xb=["itemStyle","color0"],jb={seriesType:"candlestick",plan:(0,ni.A)(),performRawSeries:!0,reset:function(a,e){function t(n,o){return o.get(n>0?Ub:Xb)}function r(n,o){return o.get(n===0?Zb:n>0?Wb:Yb)}if(!e.isSeriesFiltered(a)){var i=a.pipelineContext.large;return!i&&{progress:function(n,o){for(var s;(s=n.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,h=l.getItemStyle();h.fill=t(u,l),h.stroke=r(u,l)||h.fill;var v=o.ensureUniqueItemVisual(s,"style");(0,p.extend)(v,h)}}}}}},Kb=jb,$b={seriesType:"candlestick",plan:(0,ni.A)(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=Jb(a,t),i=0,n=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=(0,p.map)(t.mapDimensionsAll(o[n]),t.getDimensionIndex,t),u=l[0],h=l[1],v=l[2],c=l[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||l.length<4)return;return{progress:a.pipelineContext.large?d:f};function f(g,y){for(var m,S=y.getStore();(m=g.next())!=null;){var x=S.get(s,m),b=S.get(u,m),_=S.get(h,m),A=S.get(v,m),w=S.get(c,m),C=Math.min(b,_),T=Math.max(b,_),I=B(C,x),D=B(T,x),L=B(A,x),M=B(w,x),P=[];z(P,D,0),z(P,I,1),P.push($(M),$(D),$(L),$(I));var R=y.getItemModel(m),V=!!R.get(["itemStyle","borderColorDoji"]);y.setItemLayout(m,{sign:gc(S,m,b,_,h,V),initBaseline:b>_?D[n]:I[n],ends:P,brushRect:W(A,w,x)})}function B(K,et){var lt=[];return lt[i]=et,lt[n]=K,isNaN(et)||isNaN(K)?[NaN,NaN]:e.dataToPoint(lt)}function z(K,et,lt){var ot=et.slice(),mt=et.slice();ot[i]=(0,tt.subPixelOptimize)(ot[i]+r/2,1,!1),mt[i]=(0,tt.subPixelOptimize)(mt[i]-r/2,1,!0),lt?K.push(ot,mt):K.push(mt,ot)}function W(K,et,lt){var ot=B(K,lt),mt=B(et,lt);return ot[i]-=r/2,mt[i]-=r/2,{x:ot[0],y:ot[1],width:n?r:mt[0]-ot[0],height:n?mt[1]-ot[1]:r}}function $(K){return K[i]=(0,tt.subPixelOptimize)(K[i],1),K}}function d(g,y){for(var m=(0,dr.J)(g.count*4),S=0,x,b=[],_=[],A,w=y.getStore(),C=!!a.get(["itemStyle","borderColorDoji"]);(A=g.next())!=null;){var T=w.get(s,A),I=w.get(u,A),D=w.get(h,A),L=w.get(v,A),M=w.get(c,A);if(isNaN(T)||isNaN(L)||isNaN(M)){m[S++]=NaN,S+=3;continue}m[S++]=gc(w,A,I,D,h,C),b[i]=T,b[n]=L,x=e.dataToPoint(b,null,_),m[S++]=x?x[0]:NaN,m[S++]=x?x[1]:NaN,b[n]=M,x=e.dataToPoint(b,null,_),m[S++]=x?x[1]:NaN}y.setLayout("largePoints",m)}}};function gc(a,e,t,r,i,n){var o;return t>r?o=-1:t0?a.get(i,e-1)<=r?1:-1:1,o}function Jb(a,e){var t=a.getBaseAxis(),r,i=t.type==="category"?t.getBandWidth():(r=t.getExtent(),Math.abs(r[1]-r[0])/e.count()),n=(0,k.lo)((0,p.retrieve2)(a.get("barMaxWidth"),i),i),o=(0,k.lo)((0,p.retrieve2)(a.get("barMinWidth"),1),i),s=a.get("barWidth");return s!=null?(0,k.lo)(s,i):Math.max(Math.min(i/2,n),o)}var Qb=$b;function qb(a){a.registerChartView(Gb),a.registerSeriesModel(Hb),a.registerPreprocessor(Fb),a.registerVisual(Kb),a.registerLayout(Qb)}function yc(a,e){var t=e.rippleEffectColor||e.color;a.eachChild(function(r){r.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var t_=function(a){(0,O.C6)(e,a);function e(t,r){var i=a.call(this)||this,n=new ca(t,r),o=new it.A;return i.add(n),i.add(o),i.updateData(t,r),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(n)/h*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){n.stopAnimation();var c=void 0;p.isFunction(v)?c=v(i):c=v,n.__t>0&&(c=-s*n.__t),this._animateSymbol(n,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,r,i,n,o){if(r>0){t.__t=0;var s=this,l=t.animate("",n).when(o?r*2:r,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});n||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return at.dist(t.__p1,t.__cp1)+at.dist(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,r){t.__p1=r[0],t.__p2=r[1],t.__cp1=r[2]||[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]},e.prototype.updateData=function(t,r,i){this.childAt(0).updateData(t,r,i),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=ge.k3,h=ge.z7;s[0]=u(r[0],n[0],i[0],o),s[1]=u(r[1],n[1],i[1],o);var v=t.__t<1?h(r[0],n[0],i[0],o):h(i[0],n[0],r[0],1-o),c=t.__t<1?h(r[1],n[1],i[1],o):h(i[1],n[1],r[1],1-o);t.rotation=-Math.atan2(c,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(n[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;lr);l++);l=Math.min(l-1,o-2)}var h=(r-n[l])/(n[l+1]-n[l]),v=i[l],c=i[l+1];t.x=v[0]*(1-h)+h*c[0],t.y=v[1]*(1-h)+h*c[1];var f=t.__t<1?c[0]-v[0]:v[0]-c[0],d=t.__t<1?c[1]-v[1]:v[1]-c[1];t.rotation=-Math.atan2(d,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=r,t.ignore=!1}},e}(mc),h_=u_,Sc=E(57043),v_=E(14423),c_=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),f_=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}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 c_},e.prototype.buildPath=function(t,r){var i=r.segs,n=r.curveness,o;if(r.polyline)for(o=this._off;o0){t.moveTo(i[o++],i[o++]);for(var l=1;l0){var f=(u+v)/2-(h-c)*n,d=(h+c)/2-(v-u)*n;t.quadraticCurveTo(f,d,v,c)}else t.lineTo(v,c)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var v=n[u++],c=n[u++],f=1;f0){var y=(v+d)/2-(c-g)*o,m=(c+g)/2-(d-v)*o;if(v_.l(v,c,y,m,d,g,s,t,r))return l}else if(Sc.l(v,c,d,g,s,t,r))return l;l++}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),n=this.getBoundingRect();if(t=i[0],r=i[1],n.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),d_=p_,g_={seriesType:"lines",plan:(0,ni.A)(),reset:function(a){var e=a.coordinateSystem;if(e){var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(i,n){var o=[];if(r){var s=void 0,l=i.end-i.start;if(t){for(var u=0,h=i.start;h0&&(h||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var v=t.get("clip",!0)&&pa(t.coordinateSystem,!1,t);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._lineDraw.incrementalUpdate(t,r.getData()),this._finished=t.end===r.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,r,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=bc.reset(t,r,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,r){var i=this._lineDraw,n=this._showEffect(r),o=!!r.get("polyline"),s=r.pipelineContext,l=s.large;return(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new d_:new Io(o?n?h_:xc:n?mc:Co),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var r=t.getZr(),i=r.painter.getType()==="svg";!i&&this._lastZlevel!=null&&r.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,r){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(r)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.type="lines",e}(Nt.A),m_=y_,x_=typeof Uint32Array=="undefined"?Array:Uint32Array,S_=typeof Float64Array=="undefined"?Array:Float64Array;function _c(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(a.data=(0,p.map)(e,function(t){var r=[t[0].coord,t[1].coord],i={coords:r};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),(0,p.mergeAll)([i,t[0],t[1]])}))}var b_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.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||[],_c(t);var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count)),a.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(_c(t),t.data){var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count))}a.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var r=this._processFlatCoordsArray(t.data);r.flatCoords&&(this._flatCoords?(this._flatCoords=(0,p.concatArray)(this._flatCoords,r.flatCoords),this._flatCoordsOffset=(0,p.concatArray)(this._flatCoordsOffset,r.flatCoordsOffset)):(this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset),t.data=new Float32Array(r.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var r=this.getData().getItemModel(t),i=r.option instanceof Array?r.option:r.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,r){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;oi}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,r){if(0)var i;var n=new he.A(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;n.hasItemOption=!0;var h=o.value;if(h!=null)return h instanceof Array?h[u]:h}),n},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=n.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),(0,zt.Qx)("nameValue",{name:h.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"),r=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&r>0?r+"":""},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}(Ot.A),__=b_;function Bi(a){return a instanceof Array||(a=[a,a]),a}var A_={seriesType:"lines",reset:function(a){var e=Bi(a.get("symbol")),t=Bi(a.get("symbolSize")),r=a.getData();r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",t&&t[0]),r.setVisual("toSymbolSize",t&&t[1]);function i(n,o){var s=n.getItemModel(o),l=Bi(s.getShallow("symbol",!0)),u=Bi(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:r.hasItemOption?i:null}}},w_=A_;function C_(a){a.registerChartView(m_),a.registerSeriesModel(__),a.registerLayout(bc),a.registerVisual(w_)}var T_=256,I_=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ee.yh.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),h=this.pointSize+this.blurSize,v=this.canvas,c=v.getContext("2d"),f=e.length;v.width=t,v.height=r;for(var d=0;d0){var L=o(x)?l:u;x>0&&(x=x*I+C),_[A++]=L[D],_[A++]=L[D+1],_[A++]=L[D+2],_[A++]=L[D+3]*x*256}else A+=4}return c.putImageData(b,0,0),v},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ee.yh.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var i=e.getContext("2d");return i.clearRect(0,0,r,r),i.shadowOffsetX=r,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,i=r[t]||(r[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},a}(),D_=I_;function L_(a,e,t){var r=a[1]-a[0];e=p.map(e,function(o){return{interval:[(o.interval[0]-a[0])/r,(o.interval[1]-a[0])/r]}});var i=e.length,n=0;return function(o){var s;for(s=n;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s=e[0]&&r<=e[1]}}function Ac(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var P_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n;r.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Ac(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,r,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,i,n){var o=r.coordinateSystem;o&&(Ac(o)?this.render(r,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){tt.traverseElements(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,i,n,o){var s=t.coordinateSystem,l=yr(s,"cartesian2d"),u,h,v,c;if(l){var f=s.getAxis("x"),d=s.getAxis("y");u=f.getBandWidth()+.5,h=d.getBandWidth()+.5,v=f.scale.getExtent(),c=d.scale.getExtent()}for(var g=this.group,y=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),S=t.getModel(["blur","itemStyle"]).getItemStyle(),x=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),_=(0,q.lx)(t),A=t.getModel("emphasis"),w=A.get("focus"),C=A.get("blurScope"),T=A.get("disabled"),I=l?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],D=i;Dv[1]||Rc[1])continue;var V=s.dataToPoint([P,R]);L=new Dt.A({shape:{x:V[0]-u/2,y:V[1]-h/2,width:u,height:h},style:M})}else{if(isNaN(y.get(I[1],D)))continue;L=new Dt.A({z2:1,shape:s.dataToRect([y.get(I[0],D)]).contentShape,style:M})}if(y.hasItemOption){var B=y.getItemModel(D),z=B.getModel("emphasis");m=z.getModel("itemStyle").getItemStyle(),S=B.getModel(["blur","itemStyle"]).getItemStyle(),x=B.getModel(["select","itemStyle"]).getItemStyle(),b=B.get(["itemStyle","borderRadius"]),w=z.get("focus"),C=z.get("blurScope"),T=z.get("disabled"),_=(0,q.lx)(B)}L.shape.r=b;var W=t.getRawValue(D),$="-";W&&W[2]!=null&&($=W[2]+""),(0,q.qM)(L,_,{labelFetcher:t,labelDataIndex:D,defaultOpacity:M.opacity,defaultText:$}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=S,L.ensureState("select").style=x,(0,U.Lm)(L,w,C,T),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(D,L),this._progressiveEls&&this._progressiveEls.push(L)}},e.prototype._renderOnGeo=function(t,r,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=r.getData(),u=this._hmLayer||this._hmLayer||new D_;u.blurSize=r.get("blurSize"),u.pointSize=r.get("pointSize"),u.minOpacity=r.get("minOpacity"),u.maxOpacity=r.get("maxOpacity");var h=t.getViewRect().clone(),v=t.getRoamTransform();h.applyTransform(v);var c=Math.max(h.x,0),f=Math.max(h.y,0),d=Math.min(h.width+h.x,n.getWidth()),g=Math.min(h.height+h.y,n.getHeight()),y=d-c,m=g-f,S=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(S,function(w,C,T){var I=t.dataToPoint([w,C]);return I[0]-=c,I[1]-=f,I.push(T),I}),b=i.getExtent(),_=i.type==="visualMap.continuous"?M_(b,i.option.range):L_(b,i.getPieceList(),i.option.selected);u.update(x,y,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},_);var A=new ue.Ay({style:{width:y,height:m,x:c,y:f,image:u.canvas},silent:!0});this.group.add(A)},e.type="heatmap",e}(Nt.A),R_=P_,E_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return(0,Fe.A)(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Lv.A.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}(Ot.A),V_=E_;function O_(a){a.registerChartView(R_),a.registerSeriesModel(V_)}var k_=["itemStyle","borderWidth"],wc=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],es=new _a.A,N_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),h=u.isHorizontal(),v=l.master.getRect(),c={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:h,valueDim:wc[+h],categoryDim:wc[1-+h]};o.diff(s).add(function(d){if(o.hasValue(d)){var g=Pc(o,d),y=Cc(o,d,g,c),m=Rc(o,c,y);o.setItemGraphicEl(d,m),n.add(m),Oc(m,c,y)}}).update(function(d,g){var y=s.getItemGraphicEl(g);if(!o.hasValue(d)){n.remove(y);return}var m=Pc(o,d),S=Cc(o,d,m,c),x=Vc(o,S);y&&x!==y.__pictorialShapeStr&&(n.remove(y),o.setItemGraphicEl(d,null),y=null),y?Y_(y,c,S):y=Rc(o,c,S,!0),o.setItemGraphicEl(d,y),y.__pictorialSymbolMeta=S,n.add(y),Oc(y,c,S)}).remove(function(d){var g=s.getItemGraphicEl(d);g&&Ec(s,d,g.__pictorialSymbolMeta.animationModel,g)}).execute();var f=t.get("clip",!0)?pa(t.coordinateSystem,!1,t):null;return f?n.setClipPath(f):n.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,r){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){Ec(n,(0,ct.z)(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(Nt.A);function Cc(a,e,t,r){var i=a.getItemLayout(e),n=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=t.get("symbolPatternSize")||2,v=t.isAnimationEnabled(),c={dataIndex:e,layout:i,itemModel:t,symbolType:a.getItemVisual(e,"symbol")||"circle",style:a.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:v?t:null,hoverScale:v&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};z_(t,n,i,r,c),B_(a,e,i,n,o,c.boundingLength,c.pxSign,h,r,c),G_(t,c.symbolScale,u,r,c);var f=c.symbolSize,d=(0,Tt.hV)(t.get("symbolOffset"),f);return H_(t,f,i,n,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,r,c),c}function z_(a,e,t,r,i){var n=r.valueDim,o=a.get("symbolBoundingData"),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),h;if(p.isArray(o)){var v=[rs(s,o[0])-l,rs(s,o[1])-l];v[1]0?1:-1}function rs(a,e){return a.toGlobalCoord(a.dataToCoord(a.scale.parse(e)))}function B_(a,e,t,r,i,n,o,s,l,u){var h=l.valueDim,v=l.categoryDim,c=Math.abs(t[v.wh]),f=a.getItemVisual(e,"symbolSize"),d;p.isArray(f)?d=f.slice():f==null?d=["100%","100%"]:d=[f,f],d[v.index]=(0,k.lo)(d[v.index],c),d[h.index]=(0,k.lo)(d[h.index],r?c:Math.abs(n)),u.symbolSize=d;var g=u.symbolScale=[d[0]/s,d[1]/s];g[h.index]*=(l.isHorizontal?-1:1)*o}function G_(a,e,t,r,i){var n=a.get(k_)||0;n&&(es.attr({scaleX:e[0],scaleY:e[1],rotation:t}),es.updateTransform(),n/=es.getLineScale(),n*=e[r.valueDim.index]),i.valueLineWidth=n||0}function H_(a,e,t,r,i,n,o,s,l,u,h,v){var c=h.categoryDim,f=h.valueDim,d=v.pxSign,g=Math.max(e[f.index]+s,0),y=g;if(r){var m=Math.abs(l),S=p.retrieve(a.get("symbolMargin"),"15%")+"",x=!1;S.lastIndexOf("!")===S.length-1&&(x=!0,S=S.slice(0,S.length-1));var b=(0,k.lo)(S,e[f.index]),_=Math.max(g+b*2,0),A=x?0:b*2,w=(0,k.kf)(r),C=w?r:kc((m+A)/_),T=m-C*g;b=T/2/(x?C:Math.max(C-1,1)),_=g+b*2,A=x?0:b*2,!w&&r!=="fixed"&&(C=u?kc((Math.abs(u)+A)/_):0),y=C*_-A,v.repeatTimes=C,v.symbolMargin=b}var I=d*(y/2),D=v.pathPosition=[];D[c.index]=t[c.wh]/2,D[f.index]=o==="start"?I:o==="end"?l-I:l/2,n&&(D[0]+=n[0],D[1]+=n[1]);var L=v.bundlePosition=[];L[c.index]=t[c.xy],L[f.index]=t[f.xy];var M=v.barRectShape=p.extend({},t);M[f.wh]=d*Math.max(Math.abs(t[f.wh]),Math.abs(D[f.index]+I)),M[c.wh]=t[c.wh];var P=v.clipShape={};P[c.xy]=-t[c.xy],P[c.wh]=h.ecSize[c.wh],P[f.xy]=0,P[f.wh]=t[f.wh]}function Tc(a){var e=a.symbolPatternSize,t=(0,Tt.v5)(a.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function Ic(a,e,t,r){var i=a.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,h=0,v=n[e.valueDim.index]+o+t.symbolMargin*2;for(as(a,function(g){g.__pictorialAnimationIndex=h,g.__pictorialRepeatTimes=u,h0:m<0)&&(S=u-1-g),y[l.index]=v*(S-u/2+.5)+s[l.index],{x:y[0],y:y[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function Dc(a,e,t,r){var i=a.__pictorialBundle,n=a.__pictorialMainPath;n?Xr(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,r):(n=a.__pictorialMainPath=Tc(t),i.add(n),Xr(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,r))}function Lc(a,e,t){var r=p.extend({},e.barRectShape),i=a.__pictorialBarRect;i?Xr(i,null,{shape:r},e,t):(i=a.__pictorialBarRect=new Dt.A({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,a.add(i))}function Mc(a,e,t,r){if(t.symbolClip){var i=a.__pictorialClipPath,n=p.extend({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)Q.oi(i,{shape:n},s,l);else{n[o.wh]=0,i=new Dt.A({shape:n}),a.__pictorialBundle.setClipPath(i),a.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],tt[r?"updateProps":"initProps"](i,{shape:u},s,l)}}}function Pc(a,e){var t=a.getItemModel(e);return t.getAnimationDelayParams=F_,t.isAnimationEnabled=W_,t}function F_(a){return{index:a.__pictorialAnimationIndex,count:a.__pictorialRepeatTimes}}function W_(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Rc(a,e,t,r){var i=new it.A,n=new it.A;return i.add(n),i.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?Ic(i,e,t):Dc(i,e,t),Lc(i,t,r),Mc(i,e,t,r),i.__pictorialShapeStr=Vc(a,t),i.__pictorialSymbolMeta=t,i}function Y_(a,e,t){var r=t.animationModel,i=t.dataIndex,n=a.__pictorialBundle;Q.oi(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},r,i),t.symbolRepeat?Ic(a,e,t,!0):Dc(a,e,t,!0),Lc(a,t,!0),Mc(a,e,t,!0)}function Ec(a,e,t,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var n=[];as(r,function(o){n.push(o)}),r.__pictorialMainPath&&n.push(r.__pictorialMainPath),r.__pictorialClipPath&&(t=null),p.each(n,function(o){Q.Nz(o,{scaleX:0,scaleY:0},t,e,function(){r.parent&&r.parent.remove(r)})}),a.setItemGraphicEl(e,null)}function Vc(a,e){return[a.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function as(a,e,t){p.each(a.__pictorialBundle.children(),function(r){r!==a.__pictorialBarRect&&e.call(t,r)})}function Xr(a,e,t,r,i,n){e&&a.attr(e),r.symbolClip&&!i?t&&a.attr(t):t&&tt[i?"updateProps":"initProps"](a,t,r.animationModel,r.dataIndex,n)}function Oc(a,e,t){var r=t.dataIndex,i=t.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),h=n.get("focus"),v=n.get("blurScope"),c=n.get("scale");as(a,function(g){if(g instanceof ue.Ay){var y=g.style;g.useStyle(p.extend({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},t.style))}else g.useStyle(t.style);var m=g.ensureState("emphasis");m.style=o,c&&(m.scaleX=g.scaleX*1.1,m.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],d=a.__pictorialBarRect;d.ignoreClip=!0,(0,q.qM)(d,(0,q.lx)(i),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:kr(e.seriesModel.getData(),r),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),(0,U.Lm)(a,h,v,n.get("disabled"))}function kc(a){var e=Math.round(a);return Math.abs(a-e)<1e-4?e:Math.ceil(a)}var Z_=N_,U_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,a.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=(0,Ne.G_)(oi.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(oi),X_=U_;function j_(a){a.registerChartView(Z_),a.registerSeriesModel(X_),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,(0,p.curry)(ga.Zp,"pictorialBar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,(0,ga.KF)("pictorialBar"))}var K_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),h=u.rect,v=u.boundaryGap;s.x=0,s.y=h.y+v[0];function c(y){return y.name}var f=new tr.A(this._layersSeries||[],l,c,c),d=[];f.add((0,p.bind)(g,this,"add")).update((0,p.bind)(g,this,"update")).remove((0,p.bind)(g,this,"remove")).execute();function g(y,m,S){var x=o._layers;if(y==="remove"){s.remove(x[m]);return}for(var b=[],_=[],A,w=l[m].indices,C=0;Cn&&(n=s),r.push(s)}for(var u=0;un&&(n=v)}return{y0:i,max:n}}function rA(a){a.registerChartView(J_),a.registerSeriesModel(q_),a.registerLayout(tA),a.registerProcessor(ya("themeRiver"))}var Gi=E(41589),aA=2,iA=4,nA=function(a){(0,O.C6)(e,a);function e(t,r,i,n){var o=a.call(this)||this;o.z2=aA,o.textConfig={inside:!0},(0,ct.z)(o).seriesIndex=r.seriesIndex;var s=new _t.Ay({z2:iA,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,r,i,n),o}return e.prototype.updateData=function(t,r,i,n,o){this.node=r,r.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;(0,ct.z)(s).dataIndex=r.dataIndex;var l=r.getModel(),u=l.getModel("emphasis"),h=r.getLayout(),v=p.extend({},h);v.label=null;var c=r.getVisual("style");c.lineJoin="bevel";var f=r.getVisual("decal");f&&(c.decal=(0,Ai.w)(f,o));var d=mr(l.getModel("itemStyle"),v,!0);p.extend(v,d),p.each(U.BV,function(S){var x=s.ensureState(S),b=l.getModel([S,"itemStyle"]);x.style=b.getItemStyle();var _=mr(b,v);_&&(x.shape=_)}),t?(s.setShape(v),s.shape.r=h.r0,Q.LW(s,{shape:{r:h.r}},i,r.dataIndex)):(Q.oi(s,{shape:v},i),(0,Q.ap)(s)),s.useStyle(c),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var y=u.get("focus"),m=y==="ancestor"?r.getAncestorsIndices():y==="descendant"?r.getDescendantIndices():y;(0,U.Lm)(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),h=Math.sin(l),v=this,c=v.getTextContent(),f=this.node.dataIndex,d=n.get("minAngle")/180*Math.PI,g=n.get("show")&&!(d!=null&&Math.abs(s)P&&!(0,k.dh)(V-P)&&V0?(o.virtualPiece?o.virtualPiece.updateData(!1,S,t,r,i):(o.virtualPiece=new zc(S,t,r,i),h.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(x.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(r){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===r.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var h=l.get("target",!0)||"_blank";(0,qt.JW)(u,h)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ns,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var i=r.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e}(Nt.A),uA=lA,hA=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,r){var i={name:t.name,children:t.data};Gc(i);var n=this._levelModels=p.map(t.levels||[],function(l){return new Xt.A(l,this,r)},this),o=ro.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,h){var v=o.getNodeByDataIndex(h),c=n[v.depth];return c&&(u.parentModel=c),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=Ti(i,this),r},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 r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Uh(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}(Ot.A);function Gc(a){var e=0;p.each(a.children,function(r){Gc(r);var i=r.value;p.isArray(i)&&(i=i[0]),e+=i});var t=a.value;p.isArray(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),p.isArray(a.value)?a.value[0]=t:a.value=t}var vA=hA,Hc=Math.PI/180;function cA(a,e,t){e.eachSeriesByType(a,function(r){var i=r.get("center"),n=r.get("radius");p.isArray(n)||(n=[0,n]),p.isArray(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=(0,k.lo)(i[0],o),h=(0,k.lo)(i[1],s),v=(0,k.lo)(n[0],l/2),c=(0,k.lo)(n[1],l/2),f=-r.get("startAngle")*Hc,d=r.get("minAngle")*Hc,g=r.getData().tree.root,y=r.getViewRoot(),m=y.depth,S=r.get("sort");S!=null&&Fc(y,S);var x=0;p.each(y.children,function(V){!isNaN(V.getValue())&&x++});var b=y.getValue(),_=Math.PI/(b||x)*2,A=y.depth>0,w=y.height-(A?-1:1),C=(c-v)/(w||1),T=r.get("clockwise"),I=r.get("stillShowZeroSum"),D=T?1:-1,L=function(V,B){if(V){var z=B;if(V!==g){var W=V.getValue(),$=b===0&&I?_:W*_;$1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&(0,p.isString)(s)&&(s=(0,Wt.lift)(s,(r.depth-1)/(n-1)*.5)),s}a.eachSeriesByType("sunburst",function(r){var i=r.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,r,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");(0,p.extend)(u,l)})})}function dA(a){a.registerChartView(uA),a.registerSeriesModel(vA),a.registerLayout((0,p.curry)(cA,"sunburst")),a.registerProcessor((0,p.curry)(ya,"sunburst")),a.registerVisual(pA),sA(a)}var Wc={color:"fill",borderColor:"stroke"},gA={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ue=(0,J.$r)(),yA=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.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,r){return(0,Fe.A)(null,this)},e.prototype.getDataParams=function(t,r,i){var n=a.prototype.getDataParams.call(this,t,r);return i&&(n.info=Ue(i).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ot.A),mA=yA;function xA(a,e){return e=e||[0,0],p.map(["x","y"],function(t,r){var i=this.getAxis(t),n=e[r],o=a[r]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function SA(a){var e=a.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:p.bind(xA,a)}}}function bA(a,e){return e=e||[0,0],p.map([0,1],function(t){var r=e[t],i=a[t]/2,n=[],o=[];return n[t]=r-i,o[t]=r+i,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function _A(a){var e=a.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:a.getZoom()},api:{coord:function(t){return a.dataToPoint(t)},size:p.bind(bA,a)}}}function AA(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,i=(a instanceof Array?a[0]:a)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(r-i)-t.dataToCoord(r+i))}function wA(a){var e=a.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:(0,p.bind)(AA,a)}}}function CA(a,e){return e=e||[0,0],p.map(["Radius","Angle"],function(t,r){var i="get"+t+"Axis",n=this[i](),o=e[r],s=a[r]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function TA(a){var e=a.getRadiusAxis(),t=a.getAngleAxis(),r=e.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:r[1],r0:r[0]},api:{coord:function(i){var n=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=a.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:p.bind(CA,a)}}}function IA(a){var e=a.getRect(),t=a.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:a.getCellWidth(),cellHeight:a.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(r,i){return a.dataToPoint(r,i)}}}}var YM={};function Yc(a,e,t,r){return a&&(a.legacy||a.legacy!==!1&&!t&&!r&&e!=="tspan"&&(e==="text"||(0,p.hasOwn)(a,"text")))}function Zc(a,e,t){var r=a,i,n,o;if(e==="text")o=r;else{o={},(0,p.hasOwn)(r,"text")&&(o.text=r.text),(0,p.hasOwn)(r,"rich")&&(o.rich=r.rich),(0,p.hasOwn)(r,"textFill")&&(o.fill=r.textFill),(0,p.hasOwn)(r,"textStroke")&&(o.stroke=r.textStroke),(0,p.hasOwn)(r,"fontFamily")&&(o.fontFamily=r.fontFamily),(0,p.hasOwn)(r,"fontSize")&&(o.fontSize=r.fontSize),(0,p.hasOwn)(r,"fontStyle")&&(o.fontStyle=r.fontStyle),(0,p.hasOwn)(r,"fontWeight")&&(o.fontWeight=r.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=(0,p.hasOwn)(r,"textPosition");t?i.position=s?r.textPosition:"inside":s&&(i.position=r.textPosition),(0,p.hasOwn)(r,"textPosition")&&(i.position=r.textPosition),(0,p.hasOwn)(r,"textOffset")&&(i.offset=r.textOffset),(0,p.hasOwn)(r,"textRotation")&&(i.rotation=r.textRotation),(0,p.hasOwn)(r,"textDistance")&&(i.distance=r.textDistance)}return Uc(o,a),(0,p.each)(o.rich,function(l){Uc(l,l)}),{textConfig:i,textContent:n}}function Uc(a,e){e&&(e.font=e.textFont||e.font,(0,p.hasOwn)(e,"textStrokeWidth")&&(a.lineWidth=e.textStrokeWidth),(0,p.hasOwn)(e,"textAlign")&&(a.align=e.textAlign),(0,p.hasOwn)(e,"textVerticalAlign")&&(a.verticalAlign=e.textVerticalAlign),(0,p.hasOwn)(e,"textLineHeight")&&(a.lineHeight=e.textLineHeight),(0,p.hasOwn)(e,"textWidth")&&(a.width=e.textWidth),(0,p.hasOwn)(e,"textHeight")&&(a.height=e.textHeight),(0,p.hasOwn)(e,"textBackgroundColor")&&(a.backgroundColor=e.textBackgroundColor),(0,p.hasOwn)(e,"textPadding")&&(a.padding=e.textPadding),(0,p.hasOwn)(e,"textBorderColor")&&(a.borderColor=e.textBorderColor),(0,p.hasOwn)(e,"textBorderWidth")&&(a.borderWidth=e.textBorderWidth),(0,p.hasOwn)(e,"textBorderRadius")&&(a.borderRadius=e.textBorderRadius),(0,p.hasOwn)(e,"textBoxShadowColor")&&(a.shadowColor=e.textBoxShadowColor),(0,p.hasOwn)(e,"textBoxShadowBlur")&&(a.shadowBlur=e.textBoxShadowBlur),(0,p.hasOwn)(e,"textBoxShadowOffsetX")&&(a.shadowOffsetX=e.textBoxShadowOffsetX),(0,p.hasOwn)(e,"textBoxShadowOffsetY")&&(a.shadowOffsetY=e.textBoxShadowOffsetY))}function Xc(a,e,t){var r=a;r.textPosition=r.textPosition||t.position||"inside",t.offset!=null&&(r.textOffset=t.offset),t.rotation!=null&&(r.textRotation=t.rotation),t.distance!=null&&(r.textDistance=t.distance);var i=r.textPosition.indexOf("inside")>=0,n=a.fill||"#000";jc(r,e);var o=r.textFill==null;return i?o&&(r.textFill=t.insideFill||"#fff",!r.textStroke&&t.insideStroke&&(r.textStroke=t.insideStroke),!r.textStroke&&(r.textStroke=n),r.textStrokeWidth==null&&(r.textStrokeWidth=2)):(o&&(r.textFill=a.fill||t.outsideFill||"#000"),!r.textStroke&&t.outsideStroke&&(r.textStroke=t.outsideStroke)),r.text=e.text,r.rich=e.rich,(0,p.each)(e.rich,function(s){jc(s,s)}),r}function jc(a,e){e&&((0,p.hasOwn)(e,"fill")&&(a.textFill=e.fill),(0,p.hasOwn)(e,"stroke")&&(a.textStroke=e.fill),(0,p.hasOwn)(e,"lineWidth")&&(a.textStrokeWidth=e.lineWidth),(0,p.hasOwn)(e,"font")&&(a.font=e.font),(0,p.hasOwn)(e,"fontStyle")&&(a.fontStyle=e.fontStyle),(0,p.hasOwn)(e,"fontWeight")&&(a.fontWeight=e.fontWeight),(0,p.hasOwn)(e,"fontSize")&&(a.fontSize=e.fontSize),(0,p.hasOwn)(e,"fontFamily")&&(a.fontFamily=e.fontFamily),(0,p.hasOwn)(e,"align")&&(a.textAlign=e.align),(0,p.hasOwn)(e,"verticalAlign")&&(a.textVerticalAlign=e.verticalAlign),(0,p.hasOwn)(e,"lineHeight")&&(a.textLineHeight=e.lineHeight),(0,p.hasOwn)(e,"width")&&(a.textWidth=e.width),(0,p.hasOwn)(e,"height")&&(a.textHeight=e.height),(0,p.hasOwn)(e,"backgroundColor")&&(a.textBackgroundColor=e.backgroundColor),(0,p.hasOwn)(e,"padding")&&(a.textPadding=e.padding),(0,p.hasOwn)(e,"borderColor")&&(a.textBorderColor=e.borderColor),(0,p.hasOwn)(e,"borderWidth")&&(a.textBorderWidth=e.borderWidth),(0,p.hasOwn)(e,"borderRadius")&&(a.textBorderRadius=e.borderRadius),(0,p.hasOwn)(e,"shadowColor")&&(a.textBoxShadowColor=e.shadowColor),(0,p.hasOwn)(e,"shadowBlur")&&(a.textBoxShadowBlur=e.shadowBlur),(0,p.hasOwn)(e,"shadowOffsetX")&&(a.textBoxShadowOffsetX=e.shadowOffsetX),(0,p.hasOwn)(e,"shadowOffsetY")&&(a.textBoxShadowOffsetY=e.shadowOffsetY),(0,p.hasOwn)(e,"textShadowColor")&&(a.textShadowColor=e.textShadowColor),(0,p.hasOwn)(e,"textShadowBlur")&&(a.textShadowBlur=e.textShadowBlur),(0,p.hasOwn)(e,"textShadowOffsetX")&&(a.textShadowOffsetX=e.textShadowOffsetX),(0,p.hasOwn)(e,"textShadowOffsetY")&&(a.textShadowOffsetY=e.textShadowOffsetY))}function ZM(a,e){if(0)var t}var DA=E(21756),Kc={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},$c=(0,p.keys)(Kc),UM=(0,p.reduce)(Me.Wx,function(a,e){return a[e]=1,a},{}),XM=Me.Wx.join(", "),Hi=["","style","shape","extra"],jr=(0,J.$r)();function os(a,e,t,r,i){var n=a+"Animation",o=(0,Q.Jw)(a,r,i)||{},s=jr(e).userDuring;return o.duration>0&&(o.during=s?(0,p.bind)(EA,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=a),(0,p.extend)(o,t[n]),o}function Fi(a,e,t,r){r=r||{};var i=r.dataIndex,n=r.isInit,o=r.clearStyle,s=t.isAnimationEnabled(),l=jr(a),u=e.style;l.userDuring=e.during;var h={},v={};if(OA(a,e,v),qc("shape",e,v),qc("extra",e,v),!n&&s&&(VA(a,e,h),Qc("shape",a,e,h),Qc("extra",a,e,h),kA(a,e,u,h)),v.style=u,LA(a,v,o),PA(a,e),s)if(n){var c={};(0,p.each)(Hi,function(d){var g=d?e[d]:e;g&&g.enterFrom&&(d&&(c[d]=c[d]||{}),(0,p.extend)(d?c[d]:c,g.enterFrom))});var f=os("enter",a,e,t,i);f.duration>0&&a.animateFrom(c,f)}else MA(a,e,i||0,t,h);Jc(a,e),u?a.dirty():a.markRedraw()}function Jc(a,e){for(var t=jr(a).leaveToProps,r=0;r0&&a.animateFrom(i,n)}}function PA(a,e){(0,p.hasOwn)(e,"silent")&&(a.silent=e.silent),(0,p.hasOwn)(e,"ignore")&&(a.ignore=e.ignore),a instanceof Ar.Ay&&(0,p.hasOwn)(e,"invisible")&&(a.invisible=e.invisible),a instanceof Vt.Ay&&(0,p.hasOwn)(e,"autoBatch")&&(a.autoBatch=e.autoBatch)}var ze={},RA={setTransform:function(a,e){return ze.el[a]=e,this},getTransform:function(a){return ze.el[a]},setShape:function(a,e){var t=ze.el,r=t.shape||(t.shape={});return r[a]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(a){var e=ze.el.shape;if(e)return e[a]},setStyle:function(a,e){var t=ze.el,r=t.style;return r&&(r[a]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(a){var e=ze.el.style;if(e)return e[a]},setExtra:function(a,e){var t=ze.el.extra||(ze.el.extra={});return t[a]=e,this},getExtra:function(a){var e=ze.el.extra;if(e)return e[a]}};function jM(a){}function EA(){var a=this,e=a.el;if(e){var t=jr(e).userDuring,r=a.userDuring;if(t!==r){a.el=a.userDuring=null;return}ze.el=e,r(RA)}}function Qc(a,e,t,r){var i=t[a];if(i){var n=e[a],o;if(n){var s=t.transition,l=i.transition;if(l)if(!o&&(o=r[a]={}),Mr(l))(0,p.extend)(o,n);else for(var u=(0,J.qB)(l),h=0;h=0){!o&&(o=r[a]={});for(var f=(0,p.keys)(n),h=0;h=0)){var c=a.getAnimationStyleProps(),f=c?c.style:null;if(f){!n&&(n=r.style={});for(var d=(0,p.keys)(t),u=0;u=0?e.getStore().get(B,R):void 0}var z=e.get(V.name,R),W=V&&V.ordinalMeta;return W?W.categories[z]:z}function A(P,R){R==null&&(R=u);var V=e.getItemVisual(R,"style"),B=V&&V.fill,z=V&&V.opacity,W=S(R,ar).getItemStyle();B!=null&&(W.fill=B),z!=null&&(W.opacity=z);var $={inheritColor:(0,p.isString)(B)?B:"#000"},K=x(R,ar),et=q.VB(K,null,$,!1,!0);et.text=K.getShallow("show")?(0,p.retrieve2)(a.getFormattedLabel(R,ar),kr(e,R)):null;var lt=q.sD(K,$,!1);return T(P,W),W=Xc(W,et,lt),P&&C(W,P),W.legacy=!0,W}function w(P,R){R==null&&(R=u);var V=S(R,Xe).getItemStyle(),B=x(R,Xe),z=q.VB(B,null,null,!0,!0);z.text=B.getShallow("show")?(0,p.retrieve3)(a.getFormattedLabel(R,Xe),a.getFormattedLabel(R,ar),kr(e,R)):null;var W=q.sD(B,null,!0);return T(P,V),V=Xc(V,z,W),P&&C(V,P),V.legacy=!0,V}function C(P,R){for(var V in R)(0,p.hasOwn)(R,V)&&(P[V]=R[V])}function T(P,R){P&&(P.textFill&&(R.textFill=P.textFill),P.textPosition&&(R.textPosition=P.textPosition))}function I(P,R){if(R==null&&(R=u),(0,p.hasOwn)(Wc,P)){var V=e.getItemVisual(R,"style");return V?V[Wc[P]]:null}if((0,p.hasOwn)(gA,P))return e.getItemVisual(R,P)}function D(P){if(n.type==="cartesian2d"){var R=n.getBaseAxis();return(0,ga.DL)((0,p.defaults)({axis:R},P))}}function L(){return t.getCurrentSeriesIndices()}function M(P){return q.c8(P,t)}}function XA(a){var e={};return(0,p.each)(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var i=r.coordDim,n=e[i]=e[i]||[];n[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function ds(a,e,t,r,i,n,o){if(!r){n.remove(e);return}var s=gs(a,e,t,r,i,n);return s&&o.setItemGraphicEl(t,s),s&&(0,U.Lm)(s,r.focus,r.blurScope,r.emphasisDisabled),s}function gs(a,e,t,r,i,n){var o=-1,s=e;e&&nf(e,r,i)&&(o=(0,p.indexOf)(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=fs(r),s&&FA(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Ae.normal.cfg=Ae.normal.conOpt=Ae.emphasis.cfg=Ae.emphasis.conOpt=Ae.blur.cfg=Ae.blur.conOpt=Ae.select.cfg=Ae.select.conOpt=null,Ae.isLegacy=!1,KA(u,t,r,i,l,Ae),jA(u,t,r,i,l),ps(a,u,t,r,Ae,i,l),(0,p.hasOwn)(r,"info")&&(Ue(u).info=r.info);for(var h=0;h=0?n.replaceAt(u,o):n.add(u),u}function nf(a,e,t){var r=Ue(a),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i==="path"&&tw(n)&&uf(n)!==r.customPathData||i==="image"&&(0,p.hasOwn)(o,"image")&&o.image!==r.customImagePath}function jA(a,e,t,r,i){var n=t.clipPath;if(n===!1)a&&a.getClipPath()&&a.removeClipPath();else if(n){var o=a.getClipPath();o&&nf(o,n,r)&&(o=null),o||(o=fs(n),a.setClipPath(o)),ps(null,o,e,n,null,r,i)}}function KA(a,e,t,r,i,n){if(!a.isGroup){of(t,null,n),of(t,Xe,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var h=a.getTextContent();if(o===!1)h&&a.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},h?h.clearStates():(h=fs(o),a.setTextContent(h)),ps(null,h,e,o,null,r,i);for(var v=o&&o.style,c=0;c=h;f--){var d=e.childAt(f);JA(e,d,i)}}}function JA(a,e,t){e&&Wi(e,Ue(a).option,t)}function QA(a){new tr.A(a.oldChildren,a.newChildren,sf,sf,a).add(lf).update(lf).remove(qA).execute()}function sf(a,e){var t=a&&a.name;return t!=null?t:GA+e}function lf(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,i=e!=null?t.oldChildren[e]:null;gs(t.api,i,t.dataIndex,r,t.seriesModel,t.group)}function qA(a){var e=this.context,t=e.oldChildren[a];t&&Wi(t,Ue(t).option,e.seriesModel)}function uf(a){return a&&(a.pathData||a.d)}function tw(a){return a&&((0,p.hasOwn)(a,"pathData")||(0,p.hasOwn)(a,"d"))}function ew(a){a.registerChartView(YA),a.registerSeriesModel(mA)}var Pr=(0,J.$r)(),hf=p.clone,ms=p.bind,rw=function(){function a(){this._dragging=!1,this.animationThreshold=15}return a.prototype.render=function(e,t,r,i){var n=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=r,!(!i&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,n,e,t,r);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=h;var v=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new it.A,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),r.getZr().add(s);else{var c=p.curry(vf,t,v);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,t)}pf(s,t,!0),this._renderHandle(n)}},a.prototype.remove=function(e){this.clear(e)},a.prototype.dispose=function(e){this.clear(e)},a.prototype.determineAnimation=function(e,t){var r=t.get("animation"),i=e.axis,n=i.type==="category",o=t.get("snap");if(!o&&!n)return!1;if(r==="auto"||r==null){var s=this.animationThreshold;if(n&&i.getBandWidth()>s)return!0;if(o){var l=Bn(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return r===!0},a.prototype.makeElOption=function(e,t,r,i,n){},a.prototype.createPointerEl=function(e,t,r,i){var n=t.pointer;if(n){var o=Pr(e).pointerEl=new tt[n.type](hf(t.pointer));e.add(o)}},a.prototype.createLabelEl=function(e,t,r,i){if(t.label){var n=Pr(e).labelEl=new _t.Ay(hf(t.label));e.add(n),ff(n,i)}},a.prototype.updatePointerEl=function(e,t,r){var i=Pr(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),r(i,{shape:t.pointer.shape}))},a.prototype.updateLabelEl=function(e,t,r,i){var n=Pr(e).labelEl;n&&(n.setStyle(t.label.style),r(n,{x:t.label.x,y:t.label.y}),ff(n,i))},a.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,r=this._api.getZr(),i=this._handle,n=t.getModel("handle"),o=t.get("status");if(!n.get("show")||!o||o==="hide"){i&&r.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=tt.createIcon(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){pe.ds(u.event)},onmousedown:ms(this._onHandleDragMove,this,0,0),drift:ms(this._onHandleDragMove,this),ondragend:ms(this._onHandleDragEnd,this)}),r.add(i)),pf(i,t,!1),i.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");p.isArray(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,me.N(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},a.prototype._moveHandleToValue=function(e,t){vf(this._axisPointerModel,!t&&this._moveAnimation,this._handle,xs(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},a.prototype._onHandleDragMove=function(e,t){var r=this._handle;if(r){this._dragging=!0;var i=this.updateHandleTransform(xs(r),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,r.stopAnimation(),r.attr(xs(i)),Pr(r).lastProp=null,this._doDispatchAxisPointer()}},a.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},a.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},a.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),r=this._group,i=this._handle;t&&r&&(this._lastGraphicKey=null,r&&t.remove(r),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),me.IU(this,"_doDispatchAxisPointer")},a.prototype.doClear=function(){},a.prototype.buildLabel=function(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}},a}();function vf(a,e,t,r){cf(Pr(t).lastProp,r)||(Pr(t).lastProp=r,e?Q.oi(t,r,a):(t.stopAnimation(),t.attr(r)))}function cf(a,e){if(p.isObject(a)&&p.isObject(e)){var t=!0;return p.each(e,function(r,i){t=t&&cf(a[i],r)}),!!t}else return a===e}function ff(a,e){a[e.get(["label","show"])?"show":"hide"]()}function xs(a){return{x:a.x||0,y:a.y||0,rotation:a.rotation||0}}function pf(a,e,t){var r=e.get("z"),i=e.get("zlevel");a&&a.traverse(function(n){n.type!=="group"&&(r!=null&&(n.z=r),i!=null&&(n.zlevel=i),n.silent=t)})}var Ss=rw;function bs(a){var e=a.get("type"),t=a.getModel(e+"Style"),r;return e==="line"?(r=t.getLineStyle(),r.fill=null):e==="shadow"&&(r=t.getAreaStyle(),r.stroke=null),r}function df(a,e,t,r,i){var n=t.get("value"),o=gf(n,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=qt.QX(s.get("padding")||0),u=s.getFont(),h=ce.NO(o,u),v=i.position,c=h.width+l[1]+l[3],f=h.height+l[0]+l[2],d=i.align;d==="right"&&(v[0]-=c),d==="center"&&(v[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(v[1]-=f),g==="middle"&&(v[1]-=f/2),aw(v,c,f,r);var y=s.get("backgroundColor");(!y||y==="auto")&&(y=e.get(["axisLine","lineStyle","color"])),a.label={x:v[0],y:v[1],style:(0,q.VB)(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:y}),z2:10}}function aw(a,e,t,r){var i=r.getWidth(),n=r.getHeight();a[0]=Math.min(a[0]+e,i)-e,a[1]=Math.min(a[1]+t,n)-t,a[0]=Math.max(a[0],0),a[1]=Math.max(a[1],0)}function gf(a,e,t,r,i){a=e.scale.parse(a);var n=e.scale.getLabel({value:a},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ut.Dt(e,{value:a}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};p.each(r,function(l){var u=t.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,v=u&&u.getDataParams(h);v&&s.seriesData.push(v)}),p.isString(o)?n=o.replace("{value}",n):p.isFunction(o)&&(n=o(s))}return n}function _s(a,e,t){var r=Lt.create();return Lt.rotate(r,r,t.rotation),Lt.translate(r,r,t.position),tt.applyTransform([a.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],r)}function yf(a,e,t,r,i,n){var o=We.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),df(e,r,i,n,{position:_s(r.axis,a,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function As(a,e,t){return t=t||0,{x1:a[t],y1:a[1-t],x2:e[t],y2:e[1-t]}}function mf(a,e,t){return t=t||0,{x:a[t],y:a[1-t],width:e[t],height:e[1-t]}}function xf(a,e,t,r,i,n){return{cx:a,cy:e,r0:t,r,startAngle:i,endAngle:n,clockwise:!0}}var iw=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis,l=s.grid,u=n.get("type"),h=Sf(l,s).getOtherAxis(s).getGlobalExtent(),v=s.toGlobalCoord(s.dataToCoord(r,!0));if(u&&u!=="none"){var c=bs(n),f=nw[u](s,v,h);f.style=c,t.graphicKey=f.type,t.pointer=f}var d=On(l.model,i);yf(r,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,r,i){var n=On(r.axis.grid.model,r,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=_s(r.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,n){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Sf(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,v=[t.x,t.y];v[h]+=r[h],v[h]=Math.min(l[1],v[h]),v[h]=Math.max(l[0],v[h]);var c=(u[1]+u[0])/2,f=[c,c];f[h]=v[h];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:f,tooltipOption:d[h]}},e}(Ss);function Sf(a,e){var t={};return t[e.dim+"AxisIndex"]=e.index,a.getCartesian(t)}var nw={line:function(a,e,t){var r=As([e,t[0]],[e,t[1]],bf(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=Math.max(1,a.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:mf([e-r/2,t[0]],[r,i],bf(a))}}};function bf(a){return a.dim==="x"?0:1}var ow=iw,sw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Ht.A),lw=sw,je=(0,J.$r)(),uw=p.each;function _f(a,e,t){if(!Kt.A.node){var r=e.getZr();je(r).records||(je(r).records={}),hw(r,e);var i=je(r).records[a]||(je(r).records[a]={});i.handler=t}}function hw(a,e){if(je(a).initialized)return;je(a).initialized=!0,t("click",p.curry(Af,"click")),t("mousemove",p.curry(Af,"mousemove")),t("globalout",cw);function t(r,i){a.on(r,function(n){var o=fw(e);uw(je(a).records,function(s){s&&i(s,n,o.dispatchAction)}),vw(o.pendings,e)})}}function vw(a,e){var t=a.showTip.length,r=a.hideTip.length,i;t?i=a.showTip[t-1]:r&&(i=a.hideTip[r-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function cw(a,e,t){a.handler("leave",null,t)}function Af(a,e,t,r){e.handler(a,t,r)}function fw(a){var e={showTip:[],hideTip:[]},t=function(r){var i=e[r.type];i?i.push(r):(r.dispatchAction=t,a.dispatchAction(r))};return{dispatchAction:t,pendings:e}}function ws(a,e){if(!Kt.A.node){var t=e.getZr(),r=(je(t).records||{})[a];r&&(je(t).records[a]=null)}}var pw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=r.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";_f("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,r){ws("axisPointer",r)},e.prototype.dispose=function(t,r){ws("axisPointer",r)},e.type="axisPointer",e}(Yt.A),dw=pw;function wf(a,e){var t=[],r=a.seriesIndex,i;if(r==null||!(i=e.getSeriesByIndex(r)))return{point:[]};var n=i.getData(),o=J.le(n,a);if(o==null||o<0||p.isArray(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(a.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),v=h.dim,c=u.dim,f=v==="x"||v==="radius"?1:0,d=n.mapDimension(c),g=[];g[f]=n.get(d,o),g[1-f]=n.get(n.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(g)||[]}else t=l.dataToPoint(n.getValues(p.map(l.dimensions,function(m){return n.mapDimension(m)}),o))||[];else if(s){var y=s.getBoundingRect().clone();y.applyTransform(s.transform),t=[y.x+y.width/2,y.y+y.height/2]}return{point:t,el:s}}var Cf=(0,J.$r)();function gw(a,e,t){var r=a.currTrigger,i=[a.x,a.y],n=a,o=a.dispatchAction||(0,p.bind)(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Ui(i)&&(i=wf({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=Ui(i),u=n.axesInfo,h=s.axesInfo,v=r==="leave"||Ui(i),c={},f={},d={list:[],map:{}},g={showPointer:(0,p.curry)(mw,f),showTooltip:(0,p.curry)(xw,d)};(0,p.each)(s.coordSysMap,function(m,S){var x=l||m.containPoint(i);(0,p.each)(s.coordSysAxesInfo[S],function(b,_){var A=b.axis,w=Aw(u,b);if(!v&&x&&(!u||w)){var C=w&&w.value;C==null&&!l&&(C=A.pointToData(i)),C!=null&&Tf(b,C,g,!1,c)}})});var y={};return(0,p.each)(h,function(m,S){var x=m.linkGroup;x&&!f[S]&&(0,p.each)(x.axesInfo,function(b,_){var A=f[_];if(b!==m&&A){var w=A.value;x.mapper&&(w=m.axis.scale.parse(x.mapper(w,If(b),If(m)))),y[m.key]=w}})}),(0,p.each)(y,function(m,S){Tf(h[S],m,g,!0,c)}),Sw(f,h,c),bw(d,i,a,o),_w(h,o,t),c}}function Tf(a,e,t,r,i){var n=a.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!a.involveSeries){t.showPointer(a,e);return}var o=yw(e,a),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&(0,p.extend)(i,s[0]),!r&&a.snap&&n.containData(l)&&l!=null&&(e=l),t.showPointer(a,e,s),t.showTooltip(a,o,l)}}function yw(a,e){var t=e.axis,r=t.dim,i=a,n=[],o=Number.MAX_VALUE,s=-1;return(0,p.each)(e.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(r),v,c;if(l.getAxisTooltipData){var f=l.getAxisTooltipData(h,a,t);c=f.dataIndices,v=f.nestestValue}else{if(c=l.getData().indicesOfNearest(h[0],a,t.type==="category"?.5:null),!c.length)return;v=l.getData().get(h[0],c[0])}if(!(v==null||!isFinite(v))){var d=a-v,g=Math.abs(d);g<=o&&((g=0&&s<0)&&(o=g,s=d,i=v,n.length=0),(0,p.each)(c,function(y){n.push({seriesIndex:l.seriesIndex,dataIndexInside:y,dataIndex:l.getData().getRawIndex(y)})}))}}),{payloadBatch:n,snapToValue:i}}function mw(a,e,t,r){a[e.key]={value:t,payloadBatch:r}}function xw(a,e,t,r){var i=t.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Sa(l),h=a.map[u];h||(h=a.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},a.list.push(h)),h.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function Sw(a,e,t){var r=t.axesInfo=[];(0,p.each)(e,function(i,n){var o=i.axisPointerModel.option,s=a[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&r.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function bw(a,e,t,r){if(Ui(e)||!a.list.length){r({type:"hideTip"});return}var i=((a.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:a.list})}function _w(a,e,t){var r=t.getZr(),i="axisPointerLastHighlights",n=Cf(r)[i]||{},o=Cf(r)[i]={};(0,p.each)(a,function(u,h){var v=u.axisPointerModel.option;v.status==="show"&&u.triggerEmphasis&&(0,p.each)(v.seriesDataIndices,function(c){var f=c.seriesIndex+" | "+c.dataIndex;o[f]=c})});var s=[],l=[];(0,p.each)(n,function(u,h){!o[h]&&l.push(u)}),(0,p.each)(o,function(u,h){!n[h]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Aw(a,e){for(var t=0;t<(a||[]).length;t++){var r=a[t];if(e.axis.dim===r.axisDim&&e.axis.model.componentIndex===r.axisIndex)return r}}function If(a){var e=a.axis.model,t={},r=t.axisDim=a.axis.dim;return t.axisIndex=t[r+"AxisIndex"]=e.componentIndex,t.axisName=t[r+"AxisName"]=e.name,t.axisId=t[r+"AxisId"]=e.id,t}function Ui(a){return!a||a[0]==null||isNaN(a[0])||a[1]==null||isNaN(a[1])}function Ba(a){Sr.registerAxisPointerClass("CartesianAxisPointer",ow),a.registerComponentModel(lw),a.registerComponentView(dw),a.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!(0,p.isArray)(t)&&(e.axisPointer.link=[t])}}),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=a0(e,t)}),a.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},gw)}function ww(a){(0,Y.Y)($u),(0,Y.Y)(Ba)}var Cw=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),v=s.dataToCoord(r),c=n.get("type");if(c&&c!=="none"){var f=bs(n),d=Iw[c](s,l,v,h);d.style=f,t.graphicKey=d.type,t.pointer=d}var g=n.get(["label","margin"]),y=Tw(r,i,n,l,g);df(t,i,n,o,y)},e}(Ss);function Tw(a,e,t,r,i){var n=e.axis,o=n.dataToCoord(a),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,h,v;if(n.dim==="radius"){var c=Lt.create();Lt.rotate(c,c,s),Lt.translate(c,c,[r.cx,r.cy]),u=tt.applyTransform([o,-i],c);var f=e.getModel("axisLabel").get("rotate")||0,d=We.innerTextLayout(s,f*Math.PI/180,-1);h=d.textAlign,v=d.textVerticalAlign}else{var g=l[1];u=r.coordToPoint([g+i,o]);var y=r.cx,m=r.cy;h=Math.abs(u[0]-y)/g<.3?"center":u[0]>y?"left":"right",v=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:h,verticalAlign:v}}var Iw={line:function(a,e,t,r){return a.dim==="angle"?{type:"Line",shape:As(e.coordToPoint([r[0],t]),e.coordToPoint([r[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(a,e,t,r){var i=Math.max(1,a.getBandWidth()),n=Math.PI/180;return a.dim==="angle"?{type:"Sector",shape:xf(e.cx,e.cy,r[0],r[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:xf(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},Dw=Cw,Lw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var r,i=this.ecModel;return i.eachComponent(t,function(n){n.getCoordSysModel()===this&&(r=n)},this),r},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Ht.A),Mw=Lw,Cs=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",J.US).models[0]},e.type="polarAxis",e}(Ht.A);p.mixin(Cs,xa.L);var Pw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(Cs),Rw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(Cs),Ts=function(a){(0,O.C6)(e,a);function e(t,r){return a.call(this,"radius",t,r)||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e}(Ee.A);Ts.prototype.dataToRadius=Ee.A.prototype.dataToCoord,Ts.prototype.radiusToData=Ee.A.prototype.coordToData;var Ew=Ts,Vw=(0,J.$r)(),Is=function(a){(0,O.C6)(e,a);function e(t,r){return a.call(this,"angle",t,r||[0,360])||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,r=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),h=ce.NO(s==null?"":s+"",r.getFont(),"center","top"),v=Math.max(h.height,7),c=v/u;isNaN(c)&&(c=1/0);var f=Math.max(0,Math.floor(c)),d=Vw(t.model),g=d.lastAutoInterval,y=d.lastTickCount;return g!=null&&y!=null&&Math.abs(g-f)<=1&&Math.abs(y-o)<=1&&g>f?f=g:(d.lastTickCount=o,d.lastAutoInterval=f),f},e}(Ee.A);Is.prototype.dataToAngle=Ee.A.prototype.dataToCoord,Is.prototype.angleToData=Ee.A.prototype.coordToData;var Ow=Is,Df=["radius","angle"],kw=function(){function a(e){this.dimensions=Df,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Ew,this._angleAxis=new Ow,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return a.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},a.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},a.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},a.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},a.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,i=this._radiusAxis;return r.scale.type===e&&t.push(r),i.scale.type===e&&t.push(i),t},a.prototype.getAngleAxis=function(){return this._angleAxis},a.prototype.getRadiusAxis=function(){return this._radiusAxis},a.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},a.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},a.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},a.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},a.prototype.pointToData=function(e,t){var r=this.pointToCoord(e);return[this._radiusAxis.radiusToData(r[0],t),this._angleAxis.angleToData(r[1],t)]},a.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+r*r);t/=l,r/=l;for(var u=Math.atan2(-r,t)/Math.PI*180,h=us;)u+=h*360;return[l,u]},a.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,i=Math.cos(r)*t+this.cx,n=-Math.sin(r)*t+this.cy;return[i,n]},a.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var i=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,h=l*l+u*u-1e-4,v=this.r,c=this.r0;return h<=v*v&&h>=c*c}}},a.prototype.convertToPixel=function(e,t,r){var i=Lf(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=Lf(t);return i===this?this.pointToData(r):null},a}();function Lf(a){var e=a.seriesModel,t=a.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var Nw=kw;function zw(a,e,t){var r=e.get("center"),i=t.getWidth(),n=t.getHeight();a.cx=(0,k.lo)(r[0],i),a.cy=(0,k.lo)(r[1],n);var o=a.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:p.isArray(l)||(l=[0,l]);var u=[(0,k.lo)(l[0],s),(0,k.lo)(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function Bw(a,e){var t=this,r=t.getAngleAxis(),i=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),a.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();p.each((0,Ut.wq)(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),p.each((0,Ut.wq)(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),(0,Ut.af)(r.scale,r.model),(0,Ut.af)(i.scale,i.model),r.type==="category"&&!r.onBand){var n=r.getExtent(),o=360/r.scale.count();r.inverse?n[1]+=o:n[1]-=o,r.setExtent(n[0],n[1])}}function Gw(a){return a.mainType==="angleAxis"}function Mf(a,e){var t;if(a.type=e.get("type"),a.scale=(0,Ut.f$)(e),a.onBand=e.get("boundaryGap")&&a.type==="category",a.inverse=e.get("inverse"),Gw(e)){a.inverse=a.inverse!==e.get("clockwise");var r=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:r+(a.inverse?-360:360);a.setExtent(r,i)}e.axis=a,a.model=e}var Hw={dimensions:Df,create:function(a,e){var t=[];return a.eachComponent("polar",function(r,i){var n=new Nw(i+"");n.update=Bw;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");Mf(o,l),Mf(s,u),zw(n,r,e),t.push(n),r.coordinateSystem=n,n.model=r}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var i=r.getReferringComponents("polar",J.US).models[0];r.coordinateSystem=i.coordinateSystem}}),t}},Fw=Hw,Ww=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Xi(a,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=a.coordToPoint([e[0],t]),i=a.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function ji(a){var e=a.getRadiusAxis();return e.inverse?0:1}function Pf(a){var e=a[0],t=a[a.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&a.pop()}var Yw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=p.map(i.getViewLabels(),function(h){h=p.clone(h);var v=i.scale,c=v.type==="ordinal"?v.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=i.dataToCoord(c),h});Pf(u),Pf(s),p.each(Ww,function(h){t.get([h,"show"])&&(!i.scale.isBlank()||h==="axisLine")&&Zw[h](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e}(Sr),Zw={axisLine:function(a,e,t,r,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=ji(t),v=h?0:1,c,f=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[v]===0?c=new tt[f]({shape:{cx:t.cx,cy:t.cy,r:n[h],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):c=new qu.A({shape:{cx:t.cx,cy:t.cy,r:n[h],r0:n[v]},style:o.getLineStyle(),z2:1,silent:!0}),c.style.fill=null,a.add(c)},axisTick:function(a,e,t,r,i,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[ji(t)],u=p.map(r,function(h){return new le.A({shape:Xi(t,[l,l+s],h.coord)})});a.add(tt.mergePath(u,{style:p.defaults(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(a,e,t,r,i,n){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[ji(t)],h=[],v=0;vm?"left":"right",b=Math.abs(y[1]-S)/g<.3?"middle":y[1]>S?"top":"bottom";if(s&&s[d]){var _=s[d];p.isObject(_)&&_.textStyle&&(f=new Xt.A(_.textStyle,l,l.ecModel))}var A=new _t.Ay({silent:We.isLabelSilent(e),style:(0,q.VB)(f,{x:y[0],y:y[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:x,verticalAlign:b})});if(a.add(A),h){var w=We.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=v.rawLabel,(0,ct.z)(A).eventData=w}},this)},splitLine:function(a,e,t,r,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],v=0;v=0?"p":"n",R=T;_&&(r[h][M]||(r[h][M]={p:T,n:T}),R=r[h][M][P]);var V=void 0,B=void 0,z=void 0,W=void 0;if(d.dim==="radius"){var $=d.dataToCoord(L)-T,K=l.dataToCoord(M);Math.abs($)=W})}}})}function tC(a){var e={};p.each(a,function(r,i){var n=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=Ef(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),v=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=v.stacks;e[l]=v;var f=Rf(r);c[f]||v.autoWidthCount++,c[f]=c[f]||{width:0,maxWidth:0};var d=(0,k.lo)(r.get("barWidth"),h),g=(0,k.lo)(r.get("barMaxWidth"),h),y=r.get("barGap"),m=r.get("barCategoryGap");d&&!c[f].width&&(d=Math.min(v.remainedWidth,d),c[f].width=d,v.remainedWidth-=d),g&&(c[f].maxWidth=g),y!=null&&(v.gap=y),m!=null&&(v.categoryGap=m)});var t={};return p.each(e,function(r,i){t[i]={};var n=r.stacks,o=r.bandWidth,s=(0,k.lo)(r.categoryGap,o),l=(0,k.lo)(r.gap,1),u=r.remainedWidth,h=r.autoWidthCount,v=(u-s)/(h+(h-1)*l);v=Math.max(v,0),p.each(n,function(g,y){var m=g.maxWidth;m&&m=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),i=[],n=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[n]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-n]=n===0?r.y+r.height/2:r.x+r.width/2,i},a.prototype.convertToPixel=function(e,t,r){var i=kf(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=kf(t);return i===this?this.pointToData(r):null},a}();function kf(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var pC=fC;function dC(a,e){var t=[];return a.eachComponent("singleAxis",function(r,i){var n=new pC(r,a,e);n.name="single_"+i,n.resize(r,e),r.coordinateSystem=n,t.push(n)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var i=r.getReferringComponents("singleAxis",J.US).models[0];r.coordinateSystem=i&&i.coordinateSystem}}),t}var gC={create:dC,dimensions:Of},yC=gC,Nf=["x","y"],mC=["width","height"],xC=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis,l=s.coordinateSystem,u=Ms(l,1-Ki(s)),h=l.dataToPoint(r)[0],v=n.get("type");if(v&&v!=="none"){var c=bs(n),f=SC[v](s,h,u);f.style=c,t.graphicKey=f.type,t.pointer=f}var d=Ds(i);yf(r,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,r,i){var n=Ds(r,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=_s(r.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,n){var o=i.axis,s=o.coordinateSystem,l=Ki(o),u=Ms(s,l),h=[t.x,t.y];h[l]+=r[l],h[l]=Math.min(u[1],h[l]),h[l]=Math.max(u[0],h[l]);var v=Ms(s,1-l),c=(v[1]+v[0])/2,f=[c,c];return f[l]=h[l],{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(Ss),SC={line:function(a,e,t){var r=As([e,t[0]],[e,t[1]],Ki(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=a.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:mf([e-r/2,t[0]],[r,i],Ki(a))}}};function Ki(a){return a.isHorizontal()?0:1}function Ms(a,e){var t=a.getRect();return[t[Nf[e]],t[Nf[e]]+t[mC[e]]]}var bC=xC,_C=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Yt.A);function AC(a){(0,Y.Y)(Ba),Sr.registerAxisPointerClass("SingleAxisPointer",bC),a.registerComponentView(_C),a.registerComponentView(hC),a.registerComponentModel(Ls),Br(a,"single",Ls,Ls.defaultOption),a.registerCoordinateSystem("single",yC)}var wC=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,i){var n=(0,yt.vs)(t);a.prototype.init.apply(this,arguments),zf(t,n)},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),zf(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Ht.A);function zf(a,e){var t=a.cellSize,r;p.isArray(t)?r=t:r=a.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var i=p.map([0,1],function(n){return(0,yt.Qf)(e,n)&&(r[n]="auto"),r[n]!=null&&r[n]!=="auto"});(0,yt.YA)(a,e,{type:"box",ignoreSize:i})}var CC=wC,Bf=E(30182),TC=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=r.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,r,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=r.start.time;u<=r.end.time;u=n.getNextNDay(u,1).time){var h=n.dataToRect([u],!1).tl,v=new Dt.A({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});i.add(v)}},e.prototype._renderLines=function(t,r,i,n){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),h=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var v=r.start,c=0;v.time<=r.end.time;c++){d(v.formatedDate),c===0&&(v=s.getDateInfo(r.start.y+"-"+r.start.m));var f=v.date;f.setMonth(f.getMonth()+1),v=s.getDateInfo(f)}d(s.getNextNDay(r.end.time,1).formatedDate);function d(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToRect([g],!1).tl);var y=o._getLinePointsOfOneWeek(t,g,i);o._tlpoints.push(y[0]),o._blpoints.push(y[y.length-1]),u&&o._drawSplitline(y,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,i),l,n)},e.prototype._getEdgesPoints=function(t,r,i){var n=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-r/2,n[1][o]=n[1][o]+r/2,n},e.prototype._drawSplitline=function(t,r,i){var n=new Pe.A({z2:20,shape:{points:t},style:r});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,r,i){for(var n=t.coordinateSystem,o=n.getDateInfo(r),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),h=n.dataToRect([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return(0,p.isString)(t)&&t?(0,qt.io)(t,r):(0,p.isFunction)(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,i,n,o){var s=r[0],l=r[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(n==="left"||n==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,r,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,v=(u[0][1]+u[1][1])/2,c=i==="horizontal"?0:1,f={top:[h,u[c][1]],bottom:[h,u[1-c][1]],left:[u[1-c][0],v],right:[u[c][0],v]},d=r.start.y;+r.end.y>+r.start.y&&(d=d+"-"+r.end.y);var g=o.get("formatter"),y={start:r.start.y,end:r.end.y,nameMap:d},m=this._formatterLabel(g,y),S=new _t.Ay({z2:30,style:(0,q.VB)(o,{text:m})});S.attr(this._yearTextPositionControl(S,f[l],i,l,s)),n.add(S)}},e.prototype._monthTextPositionControl=function(t,r,i,n,o){var s="left",l="top",u=t[0],h=t[1];return i==="horizontal"?(h=h+o,r&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,r&&(l="middle"),n==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,r,i,n){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),h=o.get("align"),v=[this._tlpoints,this._blpoints];(!s||(0,p.isString)(s))&&(s&&(r=(0,Bf.A4)(s)||r),s=r.get(["time","monthAbbr"])||[]);var c=u==="start"?0:1,f=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=h==="center",g=0;g=i.start.time&&r.times.end.time&&t.reverse(),t},a.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],r;t[0].time>t[1].time&&(r=!0,t.reverse());var i=Math.floor(t[1].time/Ps)-Math.floor(t[0].time/Ps)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)i-=u,n.setDate(l-u);var h=Math.floor((i+t[0].day+6)/7),v=r?-h+1:h-1;return r&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:h,nthWeek:v,fweek:t[0].day,lweek:t[1].day}},a.prototype._getDateByWeeksAndDay=function(e,t,r){var i=this._getRangeInfo(r);if(e>i.weeks||e===0&&ti.lweek)return null;var n=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},a.create=function(e,t){var r=[];return e.eachComponent("calendar",function(i){var n=new a(i,e,t);r.push(n),i.coordinateSystem=n}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=r[i.get("calendarIndex")||0])}),r},a.dimensions=["time","value"],a}();function Gf(a){var e=a.calendarModel,t=a.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}var LC=DC;function MC(a){a.registerComponentModel(CC),a.registerComponentView(IC),a.registerCoordinateSystem("calendar",LC)}function PC(a,e){var t=a.existing;if(e.id=a.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var r=e.parentOption;r?e.parentId=r.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Hf(a,e){var t;return p.each(e,function(r){a[r]!=null&&a[r]!=="auto"&&(t=!0)}),t}function RC(a,e,t){var r=p.extend({},t),i=a[e],n=t.$action||"merge";if(n==="merge")if(i){if(0)var o;p.merge(i,r,!0),(0,yt.YA)(i,r,{ignoreSize:!0}),(0,yt.Ir)(t,i),$i(t,i),$i(t,i,"shape"),$i(t,i,"style"),$i(t,i,"extra"),t.clipPath=i.clipPath}else a[e]=r;else n==="replace"?a[e]=r:n==="remove"&&i&&(a[e]=null)}var Ff=["transition","enterFrom","leaveTo"],EC=Ff.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function $i(a,e,t){if(t&&(!a[t]&&e[t]&&(a[t]={}),a=a[t],e=e[t]),!(!a||!e))for(var r=t?Ff:EC,i=0;i=0;h--){var v=i[h],c=J.vS(v.id,null),f=c!=null?o.get(c):null;if(f){var d=f.parent,m=we(d),S=d===n?{width:s,height:l}:{width:m.width,height:m.height},x={},b=yt.m$(f,v,S,null,{hv:v.hv,boundingMode:v.bounding},x);if(!we(f).isNew&&b){for(var _=v.transition,A={},w=0;w=0)?A[C]=T:f[C]=T}(0,Q.oi)(f,A,t,0)}else f.attr(x)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(i){Ji(i,we(i).option,r,t._lastGraphicModel)}),this._elMap=p.createHashMap()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Yt.A);function Rs(a){var e=p.hasOwn(Wf,a)?Wf[a]:tt.getShapeClass(a),t=new e({});return we(t).type=a,t}function Yf(a,e,t,r){var i=Rs(t);return e.add(i),r.set(a,i),we(i).id=a,we(i).isNew=!0,i}function Ji(a,e,t,r){var i=a&&a.parent;i&&(a.type==="group"&&a.traverse(function(n){Ji(n,e,t,r)}),Wi(a,e,r),t.removeKey(we(a).id))}function Zf(a,e,t,r){a.isGroup||p.each([["cursor",Ar.Ay.prototype.cursor],["zlevel",r||0],["z",t||0],["z2",0]],function(i){var n=i[0];p.hasOwn(e,n)?a[n]=p.retrieve2(e[n],i[1]):a[n]==null&&(a[n]=i[1])}),p.each(p.keys(e),function(i){if(i.indexOf("on")===0){var n=e[i];a[i]=p.isFunction(n)?n:null}}),p.hasOwn(e,"draggable")&&(a.draggable=e.draggable),e.name!=null&&(a.name=e.name),e.id!=null&&(a.id=e.id)}function NC(a){return a=p.extend({},a),p.each(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(yt.Tj),function(e){delete a[e]}),a}function zC(a,e,t){var r=(0,ct.z)(a).eventData;!a.silent&&!a.ignore&&!r&&(r=(0,ct.z)(a).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:a.name}),r&&(r.info=t.info)}function BC(a){a.registerComponentModel(OC),a.registerComponentView(kC),a.registerPreprocessor(function(e){var t=e.graphic;(0,p.isArray)(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Uf=["x","y","radius","angle","single"],GC=["cartesian2d","polar","singleAxis"];function HC(a){var e=a.get("coordinateSystem");return(0,p.indexOf)(GC,e)>=0}function nr(a){return a+"Axis"}function $M(a){return a+"AxisIndex"}function JM(a){return a+"AxisId"}function FC(a,e){var t=(0,p.createHashMap)(),r=[],i=(0,p.createHashMap)();a.eachComponent({mainType:"dataZoom",query:e},function(h){i.get(h.uid)||s(h)});var n;do n=!1,a.eachComponent("dataZoom",o);while(n);function o(h){!i.get(h.uid)&&l(h)&&(s(h),n=!0)}function s(h){i.set(h.uid,!0),r.push(h),u(h)}function l(h){var v=!1;return h.eachTargetAxis(function(c,f){var d=t.get(c);d&&d[f]&&(v=!0)}),v}function u(h){h.eachTargetAxis(function(v,c){(t.get(v)||t.set(v,[]))[c]=!0})}return r}function Xf(a){var e=a.ecModel,t={infoList:[],infoMap:(0,p.createHashMap)()};return a.eachTargetAxis(function(r,i){var n=e.getComponent(nr(r),i);if(n){var o=n.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(n)}}}),t}var Es=function(){function a(){this.indexList=[],this.indexMap=[]}return a.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},a}(),WC=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,r,i){var n=jf(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this._doInit(n)},e.prototype.mergeOption=function(t){var r=jf(t);(0,p.merge)(this.option,t,!0),(0,p.merge)(this.settledOption,r,!0),this._doInit(r)},e.prototype._doInit=function(t){var r=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;(0,p.each)([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(r[n[0]]=i[n[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),r=this._targetAxisInfoMap=(0,p.createHashMap)(),i=this._fillSpecifiedTargetAxis(r);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(r,this._orient)),this._noTarget=!0,r.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var r=!1;return(0,p.each)(Uf,function(i){var n=this.getReferringComponents(nr(i),J.UW);if(n.specified){r=!0;var o=new Es;(0,p.each)(n.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),r},e.prototype._fillAutoTargetAxisByOrient=function(t,r){var i=this.ecModel,n=!0;if(n){var o=r==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=i.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===r}});l(s,"single")}function l(u,h){var v=u[0];if(v){var c=new Es;if(c.add(v.componentIndex),t.set(h,c),n=!1,h==="x"||h==="y"){var f=v.getReferringComponents("grid",J.US).models[0];f&&(0,p.each)(u,function(d){v.componentIndex!==d.componentIndex&&f===d.getReferringComponents("grid",J.US).models[0]&&c.add(d.componentIndex)})}}}n&&(0,p.each)(Uf,function(u){if(n){var h=i.findComponents({mainType:nr(u),filter:function(c){return c.get("type",!0)==="category"}});if(h[0]){var v=new Es;v.add(h[0].componentIndex),t.set(u,v),n=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(r){!t&&(t=r)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var r=this.ecModel.option;this.option.throttle=r.animation&&r.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var r=this._rangePropMode,i=this.get("rangeMode");(0,p.each)([["start","startValue"],["end","endValue"]],function(n,o){var s=t[n[0]]!=null,l=t[n[1]]!=null;s&&!l?r[o]="percent":!s&&l?r[o]="value":i?r[o]=i[o]:s&&(r[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(r,i){t==null&&(t=this.ecModel.getComponent(nr(r),i))},this),t},e.prototype.eachTargetAxis=function(t,r){this._targetAxisInfoMap.each(function(i,n){(0,p.each)(i.indexList,function(o){t.call(r,n,o)})})},e.prototype.getAxisProxy=function(t,r){var i=this.getAxisModel(t,r);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,r){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[r])return this.ecModel.getComponent(nr(t),r)},e.prototype.setRawRange=function(t){var r=this.option,i=this.settledOption;(0,p.each)([["start","startValue"],["end","endValue"]],function(n){(t[n[0]]!=null||t[n[1]]!=null)&&(r[n[0]]=i[n[0]]=t[n[0]],r[n[1]]=i[n[1]]=t[n[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var r=this.option;(0,p.each)(["start","startValue","end","endValue"],function(i){r[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,r){if(t==null&&r==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,r).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var r,i=this._targetAxisInfoMap.keys(),n=0;no[1];if(x&&!b&&!_)return!0;x&&(y=!0),b&&(d=!0),_&&(g=!0)}return y&&d&&g})}else Kr(h,function(f){if(n==="empty")l.setData(u=u.map(f,function(g){return s(g)?g:NaN}));else{var d={};d[f]=o,u.selectRange(d)}});Kr(h,function(f){u.setApproximateExtent(o,f)})}});function s(l){return l>=o[0]&&l<=o[1]}},a.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,r=this._dataExtent;Kr(["min","max"],function(i){var n=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=k.Cb(r[0]+o,r,[0,100],!0):n!=null&&(o=k.Cb(n,[0,100],r,!0)-r[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o},this)},a.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,r=this._valueWindow;if(t){var i=k.hb(r,[0,500]);i=Math.min(i,20);var n=e.axis.scale.rawExtentInfo;t[0]!==0&&n.setDeterminedMinMax("min",+r[0].toFixed(i)),t[1]!==100&&n.setDeterminedMinMax("max",+r[1].toFixed(i)),n.freeze()}},a}();function JC(a,e,t){var r=[1/0,-1/0];Kr(t,function(o){(0,Ut.PN)(r,o.getData(),e)});var i=a.getAxisModel(),n=(0,KC.Tc)(i.axis.scale,i,r).calculate();return[n.min,n.max]}var QC=$C,qC={getTargetSeries:function(a){function e(i){a.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=a.getComponent(nr(o),s);i(o,s,l,n)})})}e(function(i,n,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new QC(i,n,s,a),t.push(o.__dzAxisProxy))});var r=(0,p.createHashMap)();return(0,p.each)(t,function(i){(0,p.each)(i.getTargetSeriesModels(),function(n){r.set(n.uid,n)})}),r},overallReset:function(a,e){a.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(r,i){t.getAxisProxy(r,i).reset(t)}),t.eachTargetAxis(function(r,i){t.getAxisProxy(r,i).filterData(t,e)})}),a.eachComponent("dataZoom",function(t){var r=t.findRepresentativeAxisProxy();if(r){var i=r.getDataPercentWindow(),n=r.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}})}},tT=qC;function eT(a){a.registerAction("dataZoom",function(e,t){var r=FC(t,e);(0,p.each)(r,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var $f=!1;function Os(a){$f||($f=!0,a.registerProcessor(a.PRIORITY.PROCESSOR.FILTER,tT),eT(a),a.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function rT(a){a.registerComponentModel(ZC),a.registerComponentView(jC),Os(a)}var Ce=function(){function a(){}return a}(),Jf={};function $r(a,e){Jf[a]=e}function Qf(a){return Jf[a]}var aT=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){a.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;p.each(this.option.feature,function(r,i){var n=Qf(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(t)),p.merge(r,n.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Ht.A),iT=aT;function nT(a,e,t){var r=e.getBoxLayoutParams(),i=e.get("padding"),n={width:t.getWidth(),height:t.getHeight()},o=(0,yt.dV)(r,n,i);(0,yt.aP)(e.get("orient"),a,e.get("itemGap"),o.width,o.height),(0,yt.m$)(a,r,n,i)}function qf(a,e){var t=qt.QX(e.get("padding")),r=e.getItemStyle(["color","opacity"]);return r.fill=e.get("backgroundColor"),a=new Dt.A({shape:{x:a.x-t[3],y:a.y-t[0],width:a.width+t[1]+t[3],height:a.height+t[0]+t[2],r:e.get("borderRadius")},style:r,silent:!0,z2:-1}),a}var oT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i,n){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},h=this._features||(this._features={}),v=[];p.each(u,function(d,g){v.push(g)}),new tr.A(this._featureNames||[],v).add(c).update(c).remove(p.curry(c,null)).execute(),this._featureNames=v;function c(d,g){var y=v[d],m=v[g],S=u[y],x=new Xt.A(S,t,t.ecModel),b;if(n&&n.newTitle!=null&&n.featureName===y&&(S.title=n.newTitle),y&&!m){if(sT(y))b={onclick:x.option.onclick,featureName:y};else{var _=Qf(y);if(!_)return;b=new _}h[y]=b}else if(b=h[m],!b)return;b.uid=(0,Ne.$Q)("toolbox-feature"),b.model=x,b.ecModel=r,b.api=i;var A=b instanceof Ce;if(!y&&m){A&&b.dispose&&b.dispose(r,i);return}if(!x.get("show")||A&&b.unusable){A&&b.remove&&b.remove(r,i);return}f(x,b,y),x.setIconStatus=function(w,C){var T=this.option,I=this.iconPaths;T.iconStatus=T.iconStatus||{},T.iconStatus[w]=C,I[w]&&(C==="emphasis"?U.HY:U.SD)(I[w])},b instanceof Ce&&b.render&&b.render(x,r,i,n)}function f(d,g,y){var m=d.getModel("iconStyle"),S=d.getModel(["emphasis","iconStyle"]),x=g instanceof Ce&&g.getIcons?g.getIcons():d.get("icon"),b=d.get("title")||{},_,A;p.isString(x)?(_={},_[y]=x):_=x,p.isString(b)?(A={},A[y]=b):A=b;var w=d.iconPaths={};p.each(_,function(C,T){var I=tt.createIcon(C,{},{x:-s/2,y:-s/2,width:s,height:s});I.setStyle(m.getItemStyle());var D=I.ensureState("emphasis");D.style=S.getItemStyle();var L=new _t.Ay({style:{text:A[T],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:(0,q.c8)({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},r)},ignore:!0});I.setTextContent(L),tt.setTooltipConfig({el:I,componentModel:t,itemName:T,formatterParamsExtra:{title:A[T]}}),I.__title=A[T],I.on("mouseover",function(){var M=S.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:S.get("textFill")||M.fill||M.stroke||"#000",backgroundColor:S.get("textBackgroundColor")}),I.setTextConfig({position:S.get("textPosition")||P}),L.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",T])!=="emphasis"&&i.leaveEmphasis(this),L.hide()}),(d.get(["iconStatus",T])==="emphasis"?U.HY:U.SD)(I),o.add(I),I.on("click",p.bind(g.onclick,g,r,i,T)),w[T]=I})}nT(o,t,i),o.add(qf(o.getBoundingRect(),t)),l||o.eachChild(function(d){var g=d.__title,y=d.ensureState("emphasis"),m=y.textConfig||(y.textConfig={}),S=d.getTextContent(),x=S&&S.ensureState("emphasis");if(x&&!p.isFunction(x)&&g){var b=x.style||(x.style={}),_=ce.NO(g,_t.Ay.makeFont(b)),A=d.x+o.x,w=d.y+o.y+s,C=!1;w+_.height>i.getHeight()&&(m.position="top",C=!0);var T=C?-5-_.height:s+10;A+_.width/2>i.getWidth()?(m.position=["100%",T],b.align="right"):A-_.width/2<0&&(m.position=[0,T],b.align="left")}})},e.prototype.updateView=function(t,r,i,n){p.each(this._features,function(o){o instanceof Ce&&o.updateView&&o.updateView(o.model,r,i,n)})},e.prototype.remove=function(t,r){p.each(this._features,function(i){i instanceof Ce&&i.remove&&i.remove(t,r)}),this.group.removeAll()},e.prototype.dispose=function(t,r){p.each(this._features,function(i){i instanceof Ce&&i.dispose&&i.dispose(t,r)})},e.type="toolbox",e}(Yt.A);function sT(a){return a.indexOf("my")===0}var lT=oT,uT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=r.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=r.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Kt.A.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=n+"."+s,h.target="_blank",h.href=l;var v=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(v)}else if(window.navigator.msSaveOrOpenBlob||o){var c=l.split(","),f=c[0].indexOf("base64")>-1,d=o?decodeURIComponent(c[1]):c[1];f&&(d=window.atob(d));var g=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var y=d.length,m=new Uint8Array(y);y--;)m[y]=d.charCodeAt(y);var S=new Blob([m]);window.navigator.msSaveOrOpenBlob(S,g)}else{var x=document.createElement("iframe");document.body.appendChild(x);var b=x.contentWindow,_=b.document;_.open("image/svg+xml","replace"),_.write(d),_.close(),b.focus(),_.execCommand("SaveAs",!0,g),document.body.removeChild(x)}}else{var A=i.get("lang"),w='',C=window.open();C.document.write(w),C.document.title=n}},e.getDefaultOption=function(t){var r={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return r},e}(Ce),hT=uT,tp="__ec_magicType_stack__",QM=null,qM=null,vT=[["line","bar"],["stack"]],cT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,r=t.get("icon"),i={};return p.each(t.get("type"),function(n){r[n]&&(i[n]=r[n])}),i},e.getDefaultOption=function(t){var r={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return r},e.prototype.onclick=function(t,r,i){var n=this.model,o=n.get(["seriesIndex",i]);if(ep[i]){var s={series:[]},l=function(v){var c=v.subType,f=v.id,d=ep[i](c,f,v,n);d&&(p.defaults(d,v.option),s.series.push(d));var g=v.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var y=g.getAxesByScale("ordinal")[0];if(y){var m=y.dim,S=m+"Axis",x=v.getReferringComponents(S,J.US).models[0],b=x.componentIndex;s[S]=s[S]||[];for(var _=0;_<=b;_++)s[S][b]=s[S][b]||{};s[S][b].boundaryGap=i==="bar"}}};p.each(vT,function(v){p.indexOf(v,i)>=0&&p.each(v,function(c){n.setIconStatus(c,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=i;i==="stack"&&(u=p.merge({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",i])!=="emphasis"&&(h="tiled")),r.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Ce),ep={line:function(a,e,t,r){if(a==="bar")return p.merge({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(a,e,t,r){if(a==="line")return p.merge({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(a,e,t,r){var i=t.get("stack")===tp;if(a==="line"||a==="bar")return r.setIconStatus("stack",i?"normal":"emphasis"),p.merge({id:e,stack:i?"":tp},r.get(["option","stack"])||{},!0)}};gi.OH({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(a,e){e.mergeOption(a.newOption)});var fT=cT,Qi=new Array(60).join("-"),Jr=" ";function pT(a){var e={},t=[],r=[];return a.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:r}}function dT(a){var e=[];return p.each(a,function(t,r){var i=t.categoryAxis,n=t.valueAxis,o=n.dim,s=[" "].concat(p.map(t.series,function(f){return f.name})),l=[i.model.getCategories()];p.each(t.series,function(f){var d=f.getRawData();l.push(f.getRawData().mapArray(d.mapDimension(o),function(g){return g}))});for(var u=[s.join(Jr)],h=0;h0,y={api:r,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:c};l.resourceType==="geoJSON"?this._buildGeoJSON(y):l.resourceType==="geoSVG"&&this._buildSVG(y),this._updateController(e,t,r),this._updateMapSelectHandler(e,u,r,i)},a.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=p.createHashMap(),r=p.createHashMap(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function h(f,d){return d&&(f=d(f)),f&&[f[0]*n.scaleX+n.x,f[1]*n.scaleY+n.y]}function v(f){for(var d=[],g=!u&&l&&l.project,y=0;y=0)&&(c=i);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;(0,q.qM)(e,(0,q.lx)(r),{labelFetcher:c,labelDataIndex:v,defaultText:t},f);var d=e.getTextContent();if(d&&(gh(d).ignore=d.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Sh(a,e,t,r,i,n){a.data?a.data.setItemGraphicEl(n,e):(0,ft.z)(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:r&&r.option||{}}}function bh(a,e,t,r,i){a.data||tt.setTooltipConfig({el:e,componentModel:i,itemName:t,itemTooltipOption:r.get("tooltip")})}function _h(a,e,t,r,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=r.getModel("emphasis"),o=n.get("focus");return(0,U.Lm)(e,o,n.get("blurScope"),n.get("disabled")),a.isGeo&&(0,U.ml)(e,i,t),o}function Ah(a,e,t){var r=[],i;function n(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),p.each(a,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Ot.A),gm=dm;function ym(a,e){var t={};return p.each(a,function(r){r.each(r.mapDimension("value"),function(i,n){var o="ec-"+r.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),a[0].map(a[0].mapDimension("value"),function(r,i){for(var n="ec-"+a[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,h=0;h1?(b.width=x,b.height=x/y):(b.height=x,b.width=x*y),b.y=S[1]-b.height/2,b.x=S[0]-b.width/2;else{var _=a.getBoxLayoutParams();_.aspect=y,b=yt.dV(_,{width:d,height:g})}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(a.get("center"),e),this.setZoom(a.get("zoom"))}function _m(a,e){p.each(e.get("geoCoord"),function(t,r){a.addGeoCoord(r,t)})}var Am=function(){function a(){this.dimensions=Ih}return a.prototype.create=function(e,t){var r=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Mh(l+s,l,p.extend({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),r.push(u),o.coordinateSystem=u,u.model=o,u.resize=Ph,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=r[l]}});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),p.each(n,function(o,s){var l=p.map(o,function(h){return h.get("nameMap")}),u=new Mh(s,s,p.extend({nameMap:p.mergeAll(l)},i(o[0])));u.zoomLimit=p.retrieve.apply(null,p.map(o,function(h){return h.get("scaleLimit")})),r.push(u),u.resize=Ph,u.resize(o[0],t),p.each(o,function(h){h.coordinateSystem=u,_m(u,h)})}),r},a.prototype.getFilledRegions=function(e,t,r,i){for(var n=(e||[]).slice(),o=p.createHashMap(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function Rm(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,i=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){Om(a);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(a.hierNode.prelim=i.hierNode.prelim+e(a,i),a.hierNode.modifier=a.hierNode.prelim-n):a.hierNode.prelim=n}else i&&(a.hierNode.prelim=i.hierNode.prelim+e(a,i));a.parentNode.hierNode.defaultAncestor=km(a,i,a.parentNode.hierNode.defaultAncestor||r[0],e)}function Em(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function kh(a){return arguments.length?a:Bm}function Ta(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function Vm(a,e){return yt.dV(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Om(a){for(var e=a.children,t=e.length,r=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=r,n.hierNode.modifier+=r,i+=n.hierNode.change,r+=n.hierNode.shift+i}}function km(a,e,t,r){if(e){for(var i=a,n=a,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,h=o.hierNode.modifier,v=s.hierNode.modifier;s=Qn(s),n=qn(n),s&&n;){i=Qn(i),o=qn(o),i.hierNode.ancestor=a;var c=s.hierNode.prelim+v-n.hierNode.prelim-u+r(s,n);c>0&&(zm(Nm(s,a,t),a,c),u+=c,l+=c),v+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!Qn(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=v-l),n&&!qn(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,t=a)}return t}function Qn(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function qn(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function Nm(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function zm(a,e,t){var r=t/(e.hierNode.i-a.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,a.hierNode.change+=r}function Bm(a,e){return a.parentNode===e.parentNode?1:2}var Ci=E(48813),Gm=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),Hm=function(a){(0,O.C6)(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Gm},e.prototype.buildPath=function(t,r){var i=r.childPoints,n=i.length,o=r.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=r.orient,h=u==="TB"||u==="BT"?0:1,v=1-h,c=(0,k.lo)(r.forkPosition,1),f=[];f[h]=o[h],f[v]=o[v]+(l[v]-o[v])*c,t.moveTo(o[0],o[1]),t.lineTo(f[0],f[1]),t.moveTo(s[0],s[1]),f[h]=s[h],t.lineTo(f[0],f[1]),f[h]=l[h],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var d=1;dS.x,_||(b=b-Math.PI));var w=_?"left":"right",C=s.getModel("label"),T=C.get("rotate"),I=T*(Math.PI/180),D=y.getTextContent();D&&(y.setTextConfig({position:C.get("position")||w,rotation:T==null?-b:I,origin:"center"}),D.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),M=L==="relative"?p.concatArray(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;M&&((0,ft.z)(t).focus=M),Wm(i,o,h,t,d,f,g,r),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&a.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===U.zX||(0,U.Pk)(t.__edge,P)}})}function Wm(a,e,t,r,i,n,o,s){var l=e.getModel(),u=a.get("edgeShape"),h=a.get("layout"),v=a.getOrient(),c=a.get(["lineStyle","curveness"]),f=a.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),g=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(g||(g=r.__edge=new Oh.A({shape:to(h,v,c,i,i)})),Q.oi(g,{shape:to(h,v,c,n,o)},a));else if(u==="polyline"&&h==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var y=e.children,m=[],S=0;St&&(t=i.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,i=r.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=t.getData().tree.root,i=a.targetNode;if(p.isString(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var n=a.targetNodeId;if(n!=null&&(i=r.getNodeById(n)))return{node:i}}}function Yh(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function ao(a,e){var t=Yh(a);return p.indexOf(t,e)>=0}function Ti(a,e){for(var t=[];a;){var r=a.dataIndex;t.push({name:a.name,dataIndex:r,value:e.getRawValue(r)}),a=a.parentNode}return t.reverse(),t}var ex=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var r={name:t.name,children:t.data},i=t.leaves||{},n=new Xt.A(i,this,this.ecModel),o=ro.createTree(r,this,s);function s(v){v.wrapMethod("getItemModel",function(c,f){var d=o.getNodeByDataIndex(f);return d&&d.children.length&&d.isExpand||(c.parentModel=n),c})}var l=0;o.eachNode("preorder",function(v){v.depth>l&&(l=v.depth)});var u=t.expandAndCollapse,h=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(v){var c=v.hostTree.data.getRawDataItem(v.dataIndex);v.isExpand=c&&c.collapsed!=null?!c.collapsed:v.depth<=h}),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,r,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return(0,zt.Qx)("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ti(i,this),r.collapsed=!i.isExpand,r},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}(Ot.A),rx=ex;function ax(a,e,t){for(var r=[a],i=[],n;n=r.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;n--)t.push(i[n])}}function ix(a,e){a.eachSeriesByType("tree",function(t){nx(t,e)})}function nx(a,e){var t=Vm(a,e);a.layoutInfo=t;var r=a.get("layout"),i=0,n=0,o=null;r==="radial"?(i=2*Math.PI,n=Math.min(t.height,t.width)/2,o=kh(function(x,b){return(x.parentNode===b.parentNode?1:2)/x.depth})):(i=t.width,n=t.height,o=kh());var s=a.getData().tree.root,l=s.children[0];if(l){Pm(s),ax(l,Rm,o),s.hierNode.modifier=-l.hierNode.prelim,Da(l,Em);var u=l,h=l,v=l;Da(l,function(x){var b=x.getLayout().x;bh.getLayout().x&&(h=x),x.depth>v.depth&&(v=x)});var c=u===h?1:o(u,h)/2,f=c-u.getLayout().x,d=0,g=0,y=0,m=0;if(r==="radial")d=i/(h.getLayout().x+c+f),g=n/(v.depth-1||1),Da(l,function(x){y=(x.getLayout().x+f)*d,m=(x.depth-1)*g;var b=Ta(y,m);x.setLayout({x:b.x,y:b.y,rawX:y,rawY:m},!0)});else{var S=a.getOrient();S==="RL"||S==="LR"?(g=n/(h.getLayout().x+c+f),d=i/(v.depth-1||1),Da(l,function(x){m=(x.getLayout().x+f)*g,y=S==="LR"?(x.depth-1)*d:i-(x.depth-1)*d,x.setLayout({x:y,y:m},!0)})):(S==="TB"||S==="BT")&&(d=i/(h.getLayout().x+c+f),g=n/(v.depth-1||1),Da(l,function(x){y=(x.getLayout().x+f)*d,m=S==="TB"?(x.depth-1)*g:n-(x.depth-1)*g,x.setLayout({x:y,y:m},!0)}))}}}function ox(a){a.eachSeriesByType("tree",function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");(0,p.extend)(s,o)})})}function sx(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var i=e.dataIndex,n=r.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),a.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,r){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=i.coordinateSystem,o=$n(n,e,void 0,r);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function lx(a){a.registerChartView(Ym),a.registerSeriesModel(rx),a.registerLayout(ix),a.registerVisual(ox),sx(a)}var Zh=["treemapZoomToNode","treemapRender","treemapMove"];function ux(a){for(var e=0;e1;)n=n.parentNode;var o=(0,io.x)(a.ecModel,n.name||n.dataIndex+"",r);i.setVisual("decal",o)})}var hx=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,r){var i={name:t.name,children:t.data};Xh(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Xt.A({itemStyle:o},this,r);n=t.levels=vx(n,r);var l=p.map(n||[],function(v){return new Xt.A(v,s,r)},this),u=ro.createTree(i,this,h);function h(v){v.wrapMethod("getItemModel",function(c,f){var d=u.getNodeByDataIndex(f),g=d?l[d.depth]:null;return c.parentModel=g||s,c})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return(0,zt.Qx)("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ti(i,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},p.extend(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=p.createHashMap(),this._idIndexMapCount=0);var i=r.get(t);return i==null&&r.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Uh(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,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Ot.A);function Xh(a){var e=0;p.each(a.children,function(r){Xh(r);var i=r.value;p.isArray(i)&&(i=i[0]),e+=i});var t=a.value;p.isArray(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),p.isArray(a.value)?a.value[0]=t:a.value=t}function vx(a,e){var t=(0,J.qB)(e.get("color")),r=(0,J.qB)(e.get(["aria","decal","decals"]));if(t){a=a||[];var i,n;p.each(a,function(s){var l=new Xt.A(s),u=l.get("color"),h=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||h&&h!=="none")&&(n=!0)});var o=a[0]||(a[0]={});return i||(o.color=t.slice()),!n&&r&&(o.decal=r.slice()),a}}var cx=hx,tr=E(16563),fx=8,jh=8,no=5,px=function(){function a(e){this.group=new it.A,e.add(this.group)}return a.prototype.render=function(e,t,r,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!r)){var s=n.getModel("itemStyle"),l=n.getModel("emphasis"),u=s.getModel("textStyle"),h=l.getModel(["itemStyle","textStyle"]),v={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,v,u),this._renderContent(e,v,s,l,u,h,i),yt.m$(o,v.pos,v.box)}},a.prototype._prepare=function(e,t,r){for(var i=e;i;i=i.parentNode){var n=(0,J.vS)(i.getModel().get("name"),""),o=r.getTextRect(n),s=Math.max(o.width+fx*2,t.emptyItemWidth);t.totalWidth+=s+jh,t.renderList.push({node:i,text:n,width:s})}},a.prototype._renderContent=function(e,t,r,i,n,o,s){for(var l=0,u=t.emptyItemWidth,h=e.get(["breadcrumb","height"]),v=yt.HU(t.pos,t.box),c=t.totalWidth,f=t.renderList,d=i.getModel("itemStyle").getItemStyle(),g=f.length-1;g>=0;g--){var y=f[g],m=y.node,S=y.width,x=y.text;c>v.width&&(c-=S-u,S=u,x=null);var b=new Se.A({shape:{points:dx(l,0,S,h,g===f.length-1,g===0)},style:(0,p.defaults)(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new _t.Ay({style:(0,q.VB)(n,{text:x})}),textConfig:{position:"inside"},z2:U.CA*1e4,onclick:(0,p.curry)(s,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=(0,q.VB)(o,{text:x}),b.ensureState("emphasis").style=d,(0,U.Lm)(b,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(b),gx(b,e,m),l+=S+jh}},a.prototype.remove=function(){this.group.removeAll()},a}();function dx(a,e,t,r,i,n){var o=[[i?a:a-no,e],[a+t,e],[a+t,e+r],[i?a:a-no,e+r]];return!n&&o.splice(2,0,[a+t+no,e+r/2]),!i&&o.push([a,e+r/2]),o}function gx(a,e,t){(0,ft.z)(a).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&&Ti(t,e)}}var yx=px,mx=function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:i,easing:n}),!0)},a.prototype.finished=function(e){return this._finishedCallback=e,this},a.prototype.start=function(){for(var e=this,t=this._storage.length,r=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;iJh||Math.abs(t.dy)>Jh)){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var r=t.originX,i=t.originY,n=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new vt.A(s.x,s.y,s.width,s.height),u=null,h=this._controllerHost;u=h.zoomLimit;var v=h.zoom=h.zoom||1;if(v*=n,u){var c=u.min||0,f=u.max||1/0;v=Math.max(Math.min(f,v),c)}var d=v/h.zoom;h.zoom=v;var g=this.seriesModel.layoutInfo;r-=g.x,i-=g.y;var y=Lt.create();Lt.translate(y,y,[-r,-i]),Lt.scale(y,y,[d,d]),Lt.translate(y,y,[r,i]),l.applyTransform(y),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 r=this;t.on("click",function(i){if(r._state==="ready"){var n=r.seriesModel.get("nodeClick",!0);if(n){var o=r.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)r._rootToNode(o);else if(n==="zoomToNode")r._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),h=l.get("target",!0)||"blank";u&&(0,qt.JW)(u,h)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new yx(this.group))).render(t,r,i.node,function(o){n._state!=="animating"&&(ao(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=La(),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,r){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,r),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(Nt.A);function La(){return{nodeGroup:[],background:[],content:[]}}function wx(a,e,t,r,i,n,o,s,l,u){if(!o)return;var h=o.getLayout(),v=a.getData(),c=o.getModel();if(v.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var f=h.width,d=h.height,g=h.borderWidth,y=h.invisible,m=o.getRawIndex(),S=s&&s.getRawIndex(),x=o.viewChildren,b=h.upperHeight,_=x&&x.length,A=c.getModel("itemStyle"),w=c.getModel(["emphasis","itemStyle"]),C=c.getModel(["blur","itemStyle"]),T=c.getModel(["select","itemStyle"]),I=A.get("borderRadius")||0,D=ot("nodeGroup",oo);if(!D)return;if(l.add(D),D.x=h.x||0,D.y=h.y||0,D.markRedraw(),Ii(D).nodeWidth=f,Ii(D).nodeHeight=d,h.isAboveViewRoot)return D;var L=ot("background",$h,u,bx);L&&W(D,L,_&&h.upperLabelHeight);var M=c.getModel("emphasis"),P=M.get("focus"),R=M.get("blurScope"),V=M.get("disabled"),B=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(_)(0,U.u6)(D)&&(0,U.ix)(D,!1),L&&((0,U.ix)(L,!V),v.setItemGraphicEl(o.dataIndex,L),(0,U.gR)(L,B,R));else{var z=ot("content",$h,u,_x);z&&$(D,z),L.disableMorphing=!0,L&&(0,U.u6)(L)&&(0,U.ix)(L,!1),(0,U.ix)(D,!V),v.setItemGraphicEl(o.dataIndex,D),(0,U.gR)(D,B,R)}return D;function W(xt,nt,Ct){var wt=(0,ft.z)(nt);if(wt.dataIndex=o.dataIndex,wt.seriesIndex=a.seriesIndex,nt.setShape({x:0,y:0,width:f,height:d,r:I}),y)K(nt);else{nt.invisible=!1;var Mt=o.getVisual("style"),Jt=Mt.stroke,te=tv(A);te.fill=Jt;var kt=wr(w);kt.fill=w.get("borderColor");var jt=wr(C);jt.fill=C.get("borderColor");var Zt=wr(T);if(Zt.fill=T.get("borderColor"),Ct){var se=f-2*g;et(nt,Jt,Mt.opacity,{x:g,y:0,width:se,height:b})}else nt.removeTextContent();nt.setStyle(te),nt.ensureState("emphasis").style=kt,nt.ensureState("blur").style=jt,nt.ensureState("select").style=Zt,(0,U.DW)(nt)}xt.add(nt)}function $(xt,nt){var Ct=(0,ft.z)(nt);Ct.dataIndex=o.dataIndex,Ct.seriesIndex=a.seriesIndex;var wt=Math.max(f-2*g,0),Mt=Math.max(d-2*g,0);if(nt.culling=!0,nt.setShape({x:g,y:g,width:wt,height:Mt,r:I}),y)K(nt);else{nt.invisible=!1;var Jt=o.getVisual("style"),te=Jt.fill,kt=tv(A);kt.fill=te,kt.decal=Jt.decal;var jt=wr(w),Zt=wr(C),se=wr(T);et(nt,te,Jt.opacity,null),nt.setStyle(kt),nt.ensureState("emphasis").style=jt,nt.ensureState("blur").style=Zt,nt.ensureState("select").style=se,(0,U.DW)(nt)}xt.add(nt)}function K(xt){!xt.invisible&&n.push(xt)}function et(xt,nt,Ct,wt){var Mt=c.getModel(wt?qh:Qh),Jt=(0,J.vS)(c.get("name"),null),te=Mt.getShallow("show");(0,q.qM)(xt,(0,q.lx)(c,wt?qh:Qh),{defaultText:te?Jt:null,inheritColor:nt,defaultOpacity:Ct,labelFetcher:a,labelDataIndex:o.dataIndex});var kt=xt.getTextContent();if(kt){var jt=kt.style,Zt=(0,p.normalizeCssArray)(jt.padding||0);wt&&(xt.setTextConfig({layoutRect:wt}),kt.disableLabelLayout=!0),kt.beforeUpdate=function(){var Ke=Math.max((wt?wt.width:xt.shape.width)-Zt[1]-Zt[3],0),ve=Math.max((wt?wt.height:xt.shape.height)-Zt[0]-Zt[2],0);(jt.width!==Ke||jt.height!==ve)&&kt.setStyle({width:Ke,height:ve})},jt.truncateMinChar=2,jt.lineOverflow="truncate",lt(jt,wt,h);var se=kt.getState("emphasis");lt(se?se.style:null,wt,h)}}function lt(xt,nt,Ct){var wt=xt?xt.text:null;if(!nt&&Ct.isLeafRoot&&wt!=null){var Mt=a.get("drillDownIcon",!0);xt.text=Mt?Mt+" "+wt:wt}}function ot(xt,nt,Ct,wt){var Mt=S!=null&&t[xt][S],Jt=i[xt];return Mt?(t[xt][S]=null,mt(Jt,Mt)):y||(Mt=new nt,Mt instanceof Ar.Ay&&(Mt.z2=Cx(Ct,wt)),At(Jt,Mt)),e[xt][m]=Mt}function mt(xt,nt){var Ct=xt[m]={};nt instanceof oo?(Ct.oldX=nt.x,Ct.oldY=nt.y):Ct.oldShape=(0,p.extend)({},nt.shape)}function At(xt,nt){var Ct=xt[m]={},wt=o.parentNode,Mt=nt instanceof it.A;if(wt&&(!r||r.direction==="drillDown")){var Jt=0,te=0,kt=i.background[wt.getRawIndex()];!r&&kt&&kt.oldShape&&(Jt=kt.oldShape.width,te=kt.oldShape.height),Mt?(Ct.oldX=0,Ct.oldY=te):Ct.oldShape={x:Jt,y:te,width:0,height:0}}Ct.fadein=!Mt}}function Cx(a,e){return a*Sx+e}var Tx=Ax,Ma=p.each,Ix=p.isObject,Di=-1,so=function(){function a(e){var t=e.mappingMethod,r=e.type,i=this.option=p.clone(e);this.type=r,this.mappingMethod=t,this._normalizeData=Mx[t];var n=a.visualHandlers[r];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(lo(i),Dx(i)):t==="category"?i.categories?Lx(i):lo(i,!0):(p.assert(t!=="linear"||i.dataExtent),lo(i))}return a.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},a.prototype.getNormalizer=function(){return p.bind(this._normalizeData,this)},a.listVisualTypes=function(){return p.keys(a.visualHandlers)},a.isValidType=function(e){return a.visualHandlers.hasOwnProperty(e)},a.eachVisual=function(e,t,r){p.isObject(e)?p.each(e,t,r):t.call(r,e)},a.mapVisual=function(e,t,r){var i,n=p.isArray(e)?[]:p.isObject(e)?{}:(i=!0,null);return a.eachVisual(e,function(o,s){var l=t.call(r,o,s);i?n=l:n[s]=l}),n},a.retrieveVisuals=function(e){var t={},r;return e&&Ma(a.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],r=!0)}),r?t:null},a.prepareVisualTypes=function(e){if(p.isArray(e))e=e.slice();else if(Ix(e)){var t=[];Ma(e,function(r,i){t.push(i)}),e=t}else return[];return e.sort(function(r,i){return i==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),e},a.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},a.findPieceIndex=function(e,t,r){for(var i,n=1/0,o=0,s=t.length;o=0;n--)r[n]==null&&(delete t[e[n]],e.pop())}function lo(a,e){var t=a.visual,r=[];p.isObject(t)?Ma(t,function(n){r.push(n)}):t!=null&&r.push(t);var i={color:1,symbol:1};!e&&r.length===1&&!i.hasOwnProperty(a.type)&&(r[1]=r[0]),rv(a,r)}function Li(a){return{applyVisual:function(e,t,r){var i=this.mapValueToVisual(e);r("color",a(t("color"),i))},_normalizedToVisual:uo([0,1])}}function ev(a){var e=this.option.visual;return e[Math.round((0,k.Cb)(a,[0,1],[0,e.length-1],!0))]||{}}function Pa(a){return function(e,t,r){r(a,this.mapValueToVisual(e))}}function Ra(a){var e=this.option.visual;return e[this.option.loop&&a!==Di?a%e.length:a]}function Cr(){return this.option.visual[0]}function uo(a){return{linear:function(e){return(0,k.Cb)(e,a,this.option.visual,!0)},category:Ra,piecewise:function(e,t){var r=ho.call(this,t);return r==null&&(r=(0,k.Cb)(e,a,this.option.visual,!0)),r},fixed:Cr}}function ho(a){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var r=so.findPieceIndex(a,t),i=t[r];if(i&&i.visual)return i.visual[this.type]}}function rv(a,e){return a.visual=e,a.type==="color"&&(a.parsedVisual=p.map(e,function(t){var r=Wt.parse(t);return r||[0,0,0,1]})),e}var Mx={linear:function(a){return(0,k.Cb)(a,this.option.dataExtent,[0,1],!0)},piecewise:function(a){var e=this.option.pieceList,t=so.findPieceIndex(a,e,!0);if(t!=null)return(0,k.Cb)(t,[0,e.length-1],[0,1],!0)},category:function(a){var e=this.option.categories?this.option.categoryMap[a]:a;return e==null?Di:e},fixed:p.noop};function Mi(a,e,t){return a?e<=t:e=t.length||g===t[g.depth]){var m=kx(i,l,g,y,d,r);iv(g,m,t,r)}})}}}function Ex(a,e,t){var r=(0,p.extend)({},e),i=t.designatedVisualItemStyle;return(0,p.each)(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=a.get(n);i[n]=null,o!=null&&(r[n]=o)}),r}function nv(a){var e=vo(a,"color");if(e){var t=vo(a,"colorAlpha"),r=vo(a,"colorSaturation");return r&&(e=(0,Wt.modifyHSL)(e,null,null,r)),t&&(e=(0,Wt.modifyAlpha)(e,t)),e}}function Vx(a,e){return e!=null?(0,Wt.modifyHSL)(e,null,null,a):null}function vo(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function Ox(a,e,t,r,i,n){if(!(!n||!n.length)){var o=co(e,"color")||i.color!=null&&i.color!=="none"&&(co(e,"colorAlpha")||co(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),v={type:o.name,dataExtent:u,visual:o.range};v.type==="color"&&(h==="index"||h==="id")?(v.mappingMethod="category",v.loop=!0):v.mappingMethod="linear";var c=new ae(v);return av(c).drColorMappingBy=h,c}}}function co(a,e){var t=a.get(e);return(0,p.isArray)(t)&&t.length?{name:e,range:t}:null}function kx(a,e,t,r,i,n){var o=(0,p.extend)({},e);if(i){var s=i.type,l=s==="color"&&av(i).drColorMappingBy,u=l==="index"?r:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Ea=Math.max,Pi=Math.min,ov=p.retrieve,fo=p.each,sv=["itemStyle","borderWidth"],Nx=["itemStyle","gapWidth"],zx=["upperLabel","show"],Bx=["upperLabel","height"],Gx={seriesType:"treemap",reset:function(a,e,t,r){var i=t.getWidth(),n=t.getHeight(),o=a.option,s=yt.dV(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=(0,k.lo)(ov(s.width,l[0]),i),h=(0,k.lo)(ov(s.height,l[1]),n),v=r&&r.type,c=["treemapZoomToNode","treemapRootToNode"],f=Ia(r,c,a),d=v==="treemapRender"||v==="treemapMove"?r.rootRect:null,g=a.getViewRoot(),y=Yh(g);if(v!=="treemapMove"){var m=v==="treemapZoomToNode"?Ux(a,f,g,u,h):d?[d.width,d.height]:[u,h],S=o.sort;S&&S!=="asc"&&S!=="desc"&&(S="desc");var x={squareRatio:o.squareRatio,sort:S,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(b),lv(g,x,!1,0),b=g.getLayout(),fo(y,function(A,w){var C=(y[w+1]||g).getValue();A.setLayout(p.extend({dataExtent:[C,C],borderWidth:0,upperHeight:0},b))})}var _=a.getData().tree.root;_.setLayout(Xx(s,d,f),!0),a.setLayoutInfo(s),hv(_,new vt.A(-s.x,-s.y,i,n),y,g,0)}};function lv(a,e,t,r){var i,n;if(!a.isRemoved()){var o=a.getLayout();i=o.width,n=o.height;var s=a.getModel(),l=s.get(sv),u=s.get(Nx)/2,h=vv(s),v=Math.max(l,h),c=l-u,f=v-u;a.setLayout({borderWidth:l,upperHeight:v,upperLabelHeight:h},!0),i=Ea(i-2*c,0),n=Ea(n-c-f,0);var d=i*n,g=Hx(a,s,d,e,t,r);if(g.length){var y={x:c,y:f,width:i,height:n},m=Pi(i,n),S=1/0,x=[];x.area=0;for(var b=0,_=g.length;b<_;){var A=g[b];x.push(A),x.area+=A.getLayout().area;var w=Zx(x,m,e.squareRatio);w<=S?(b++,S=w):(x.area-=x.pop().getLayout().area,uv(x,m,y,u,!1),m=Pi(y.width,y.height),x.length=x.area=0,S=1/0)}if(x.length&&uv(x,m,y,u,!0),!t){var C=s.get("childrenVisibleMin");C!=null&&d=0;l--){var u=i[r==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function Zx(a,e,t){for(var r=0,i=1/0,n=0,o=void 0,s=a.length;nr&&(r=o));var l=a.area*a.area,u=e*e*t;return l?Ea(u*r/l,l/(u*i)):1/0}function uv(a,e,t,r,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],h=e?a.area/e:0;(i||h>t[l[o]])&&(h=t[l[o]]);for(var v=0,c=a.length;vk.Is&&(u=k.Is),n=s}ur&&(r=e);var n=r%2?r+2:r+3;i=[];for(var o=0;o0&&(_[0]=-_[0],_[1]=-_[1]);var w=b[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var C=-Math.atan2(b[1],b[0]);v[0].8?"left":c[0]<-.8?"right":"center",g=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":n.x=-c[0]*m+h[0],n.y=-c[1]*S+h[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",g=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=m*w+h[0],n.y=h[1]+T,d=b[0]<0?"right":"left",n.originX=-m*w,n.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=A[0],n.y=A[1]+T,d="center",n.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-m*w+v[0],n.y=v[1]+T,d=b[0]>=0?"right":"left",n.originX=m*w,n.originY=-T;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||g,align:n.__align||d})}},e}(it.A),Co=cS,fS=function(){function a(e){this.group=new it.A,this._LineCtor=e||Co}return a.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,i=r.group,n=r._lineData;r._lineData=e,n||i.removeAll();var o=_v(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,r){t.updateLayout(e,r)},this)},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=_v(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!pS(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function _v(a){var e=a.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:(0,q.lx)(e)}}function Av(a){return isNaN(a[0])||isNaN(a[1])}function To(a){return a&&!Av(a[0])&&!Av(a[1])}var Io=fS,Do=[],Lo=[],Mo=[],Wr=ge.k3,Po=at.distSquare,wv=Math.abs;function Cv(a,e,t){for(var r=a[0],i=a[1],n=a[2],o=1/0,s,l=t*t,u=.1,h=.1;h<=.9;h+=.1){Do[0]=Wr(r[0],i[0],n[0],h),Do[1]=Wr(r[1],i[1],n[1],h);var v=wv(Po(Do,e)-l);v=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Ro(a,e){var t=[],r=ge.kx,i=[[],[],[]],n=[[],[]],o=[];e/=2,a.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),v=s.getVisual("toSymbol");u.__original||(u.__original=[at.clone(u[0]),at.clone(u[1])],u[2]&&u.__original.push(at.clone(u[2])));var c=u.__original;if(u[2]!=null){if(at.copy(i[0],c[0]),at.copy(i[1],c[2]),at.copy(i[2],c[1]),h&&h!=="none"){var f=ka(s.node1),d=Cv(i,c[0],f*e);r(i[0][0],i[1][0],i[2][0],d,t),i[0][0]=t[3],i[1][0]=t[4],r(i[0][1],i[1][1],i[2][1],d,t),i[0][1]=t[3],i[1][1]=t[4]}if(v&&v!=="none"){var f=ka(s.node2),d=Cv(i,c[1],f*e);r(i[0][0],i[1][0],i[2][0],d,t),i[1][0]=t[1],i[2][0]=t[2],r(i[0][1],i[1][1],i[2][1],d,t),i[1][1]=t[1],i[2][1]=t[2]}at.copy(u[0],i[0]),at.copy(u[1],i[2]),at.copy(u[2],i[1])}else{if(at.copy(n[0],c[0]),at.copy(n[1],c[1]),at.sub(o,n[1],n[0]),at.normalize(o,o),h&&h!=="none"){var f=ka(s.node1);at.scaleAndAdd(n[0],n[0],o,f*e)}if(v&&v!=="none"){var f=ka(s.node2);at.scaleAndAdd(n[1],n[1],o,-f*e)}at.copy(u[0],n[0]),at.copy(u[1],n[1])}})}function Tv(a){return a.type==="view"}var dS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){var i=new fa,n=new Io,o=this.group;this._controller=new Aa(r.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,r,i){var n=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(Tv(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(h):Q.oi(u,h,t)}Ro(t.getGraph(),Oa(t));var v=t.getData();s.updateData(v);var c=t.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,r,i),clearTimeout(this._layoutTimeout);var f=t.forceLayout,d=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,d);var g=t.get("layout");v.graph.eachNode(function(x){var b=x.dataIndex,_=x.getGraphicEl(),A=x.getModel();if(_){_.off("drag").off("dragend");var w=A.get("draggable");w&&_.on("drag",function(T){switch(g){case"force":f.warmUp(),!n._layouting&&n._startForceLayoutIteration(f,d),f.setFixed(b),v.setItemLayout(b,[_.x,_.y]);break;case"circular":v.setItemLayout(b,[_.x,_.y]),x.setLayout({fixed:!0},!0),So(t,"symbolSize",x,[T.offsetX,T.offsetY]),n.updateLayout(t);break;case"none":default:v.setItemLayout(b,[_.x,_.y]),mo(t.getGraph(),t),n.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(b)}),_.setDraggable(w,!!A.get("cursor"));var C=A.get(["emphasis","focus"]);C==="adjacency"&&((0,ft.z)(_).focus=x.getAdjacentDataIndices())}}),v.graph.eachEdge(function(x){var b=x.getGraphicEl(),_=x.getModel().get(["emphasis","focus"]);b&&_==="adjacency"&&((0,ft.z)(b).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var y=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=v.getLayout("cx"),S=v.getLayout("cy");v.graph.eachNode(function(x){gv(x,y,m,S)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,r){var i=this;(function n(){t.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(r?i._layoutTimeout=setTimeout(n,16):n())})})()},e.prototype._updateController=function(t,r,i){var n=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,h,v){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(h,v)&&!mi(u,i,t)}),!Tv(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Yn(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Zn(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(),Ro(t.getGraph(),Oa(t)),n._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),i=Oa(t);r.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},e.prototype.updateLayout=function(t){Ro(t.getGraph(),Oa(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Nt.A),gS=dS;function Yr(a){return"_EC_"+a}var yS=function(){function a(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return a.prototype.isDirected=function(){return this._directed},a.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var r=this._nodesMap;if(!r[Yr(e)]){var i=new Tr(e,t);return i.hostGraph=this,this.nodes.push(i),r[Yr(e)]=i,i}},a.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},a.prototype.getNodeById=function(e){return this._nodesMap[Yr(e)]},a.prototype.addEdge=function(e,t,r){var i=this._nodesMap,n=this._edgesMap;if(p.isNumber(e)&&(e=this.nodes[e]),p.isNumber(t)&&(t=this.nodes[t]),e instanceof Tr||(e=i[Yr(e)]),t instanceof Tr||(t=i[Yr(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new Iv(e,t,r);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),n[o]=s,s}},a.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},a.prototype.getEdge=function(e,t){e instanceof Tr&&(e=e.id),t instanceof Tr&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},a.prototype.eachNode=function(e,t){for(var r=this.nodes,i=r.length,n=0;n=0&&e.call(t,r[n],n)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,i=r.length,n=0;n=0&&r[n].node1.dataIndex>=0&&r[n].node2.dataIndex>=0&&e.call(t,r[n],n)},a.prototype.breadthFirstTraverse=function(e,t,r,i){if(t instanceof Tr||(t=this._nodesMap[Yr(t)]),!!t){for(var n=r==="out"?"outEdges":r==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n=0&&this[a][e].setItemVisual(this.dataIndex,t,r)},getVisual:function(t){return this[a][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,r){this.dataIndex>=0&&this[a][e].setItemLayout(this.dataIndex,t,r)},getLayout:function(){return this[a][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[a][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[a][e].getRawIndex(this.dataIndex)}}}p.mixin(Tr,Dv("hostGraph","data")),p.mixin(Iv,Dv("hostGraph","edgeData"));var mS=yS,Lv=E(89737);function Mv(a,e,t,r,i){for(var n=new mS(r),o=0;o "+c)),u++)}var f=t.get("coordinateSystem"),d;if(f==="cartesian2d"||f==="polar")d=(0,Fe.A)(a,t);else{var g=Lv.A.get(f),y=g?g.dimensions||[]:[];p.indexOf(y,"value")<0&&y.concat(["value"]);var m=(0,ci.A)(a,{coordDimensions:y,encodeDefine:t.getEncode()}).dimensions;d=new he.A(m,t),d.initData(a)}var S=new he.A(["value"],t);return S.initData(l,s),i&&i(d,S),Wh({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var xS=E(4235),SS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments);var r=this;function i(){return r._categoriesData}this.legendVisualProvider=new ma(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){a.prototype.mergeDefaultAndTheme.apply(this,arguments),(0,J.M5)(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){tS(this);var s=Mv(n,i,this,!0,l);return p.each(s.edges,function(u){eS(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,h){u.wrapMethod("getItemModel",function(d){var g=o._categoriesModels,y=d.getShallow("category"),m=g[y];return m&&(m.parentModel=d.parentModel,d.parentModel=m),d});var v=Xt.A.prototype.getModel;function c(d,g){var y=v.call(this,d,g);return y.resolveParentPath=f,y}h.wrapMethod("getItemModel",function(d){return d.resolveParentPath=f,d.getModel=c,d});function f(d){if(d&&(d[0]==="label"||d[1]==="label")){var g=d.slice();return d[0]==="label"?g[0]="edgeLabel":d[1]==="label"&&(g[1]="edgeLabel"),g}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,r,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),(0,zt.Qx)("nameValue",{name:h.join(" > "),value:o.value,noValue:o.value==null})}var v=(0,xS.J)({series:this,dataIndex:t,multipleSeries:r});return v},e.prototype._updateCategoriesData=function(){var t=p.map(this.option.categories||[],function(i){return i.value!=null?i:p.extend({value:0},i)}),r=new he.A(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(i){return r.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return a.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}(Ot.A),bS=SS,_S={type:"graphRoam",event:"graphRoam",update:"none"};function AS(a){a.registerChartView(gS),a.registerSeriesModel(bS),a.registerProcessor(Kx),a.registerVisual($x),a.registerVisual(Jx),a.registerLayout(rS),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,iS),a.registerLayout(oS),a.registerCoordinateSystem("graphView",{dimensions:Ca.dimensions,create:lS}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},p.noop),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},p.noop),a.registerAction(_S,function(e,t,r){t.eachComponent({mainType:"series",query:e},function(i){var n=i.coordinateSystem,o=$n(n,e,void 0,r);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var wS=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),CS=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new wS},e.prototype.buildPath=function(t,r){var i=Math.cos,n=Math.sin,o=r.r,s=r.width,l=r.angle,u=r.x-i(l)*s*(s>=o/3?1:2),h=r.y-n(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,t.moveTo(u,h),t.lineTo(r.x+i(l)*s,r.y+n(l)*s),t.lineTo(r.x+i(r.angle)*o,r.y+n(r.angle)*o),t.lineTo(r.x-i(l)*s,r.y-n(l)*s),t.lineTo(u,h)},e}(Vt.Ay),TS=CS;function IS(a,e){var t=a.get("center"),r=e.getWidth(),i=e.getHeight(),n=Math.min(r,i),o=(0,k.lo)(t[0],e.getWidth()),s=(0,k.lo)(t[1],e.getHeight()),l=(0,k.lo)(a.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Vi(a,e){var t=a==null?"":a+"";return e&&((0,p.isString)(e)?t=e.replace("{value}",t):(0,p.isFunction)(e)&&(t=e(a))),t}var DS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=IS(t,i);this._renderMain(t,r,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,i,n,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,v=t.getModel("axisLine"),c=v.get("roundCap"),f=c?si:ye.A,d=v.get("show"),g=v.getModel("lineStyle"),y=g.get("width"),m=[u,h];(0,la.q)(m,!l),u=m[0],h=m[1];for(var S=h-u,x=u,b=[],_=0;d&&_=T&&(I===0?0:n[I-1][0])Math.PI/2&&(ot+=Math.PI)):lt==="tangential"?ot=-C-Math.PI/2:(0,p.isNumber)(lt)&&(ot=lt*Math.PI/180),ot===0?v.add(new _t.Ay({style:(0,q.VB)(x,{text:W,x:K,y:et,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:$}),silent:!0})):v.add(new _t.Ay({style:(0,q.VB)(x,{text:W,x:K,y:et,verticalAlign:"middle",align:"center"},{inheritColor:$}),silent:!0,originX:K,originY:et,rotation:ot}))}if(S.get("show")&&V!==b){var B=S.get("distance");B=B?B+h:h;for(var mt=0;mt<=_;mt++){P=Math.cos(C),R=Math.sin(C);var At=new le.A({shape:{x1:P*(d-B)+c,y1:R*(d-B)+f,x2:P*(d-w-B)+c,y2:R*(d-w-B)+f},silent:!0,style:L});L.stroke==="auto"&&At.setStyle({stroke:n((V+mt/_)/b)}),v.add(At),C+=I}C-=I}else C+=T}},e.prototype._renderPointer=function(t,r,i,n,o,s,l,u,h){var v=this.group,c=this._data,f=this._progressEls,d=[],g=t.get(["pointer","show"]),y=t.getModel("progress"),m=y.get("show"),S=t.getData(),x=S.mapDimension("value"),b=+t.get("min"),_=+t.get("max"),A=[b,_],w=[s,l];function C(I,D){var L=S.getItemModel(I),M=L.getModel("pointer"),P=(0,k.lo)(M.get("width"),o.r),R=(0,k.lo)(M.get("length"),o.r),V=t.get(["pointer","icon"]),B=M.get("offsetCenter"),z=(0,k.lo)(B[0],o.r),W=(0,k.lo)(B[1],o.r),$=M.get("keepAspect"),K;return V?K=(0,Tt.v5)(V,z-P/2,W-R,P,R,null,$):K=new TS({shape:{angle:-Math.PI/2,width:P,r:R,x:z,y:W}}),K.rotation=-(D+Math.PI/2),K.x=o.cx,K.y=o.cy,K}function T(I,D){var L=y.get("roundCap"),M=L?si:ye.A,P=y.get("overlap"),R=P?y.get("width"):h/S.count(),V=P?o.r-R:o.r-(I+1)*R,B=P?o.r:o.r-I*R,z=new M({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:V,r:B}});return P&&(z.z2=_-S.get(x,I)%_),z}(m||g)&&(S.diff(c).add(function(I){var D=S.get(x,I);if(g){var L=C(I,s);Q.LW(L,{rotation:-((isNaN(+D)?w[0]:(0,k.Cb)(D,A,w,!0))+Math.PI/2)},t),v.add(L),S.setItemGraphicEl(I,L)}if(m){var M=T(I,s),P=y.get("clip");Q.LW(M,{shape:{endAngle:(0,k.Cb)(D,A,w,P)}},t),v.add(M),(0,ft.a)(t.seriesIndex,S.dataType,I,M),d[I]=M}}).update(function(I,D){var L=S.get(x,I);if(g){var M=c.getItemGraphicEl(D),P=M?M.rotation:s,R=C(I,P);R.rotation=P,Q.oi(R,{rotation:-((isNaN(+L)?w[0]:(0,k.Cb)(L,A,w,!0))+Math.PI/2)},t),v.add(R),S.setItemGraphicEl(I,R)}if(m){var V=f[D],B=V?V.shape.endAngle:s,z=T(I,B),W=y.get("clip");Q.oi(z,{shape:{endAngle:(0,k.Cb)(L,A,w,W)}},t),v.add(z),(0,ft.a)(t.seriesIndex,S.dataType,I,z),d[I]=z}}).execute(),S.each(function(I){var D=S.getItemModel(I),L=D.getModel("emphasis"),M=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(g){var V=S.getItemGraphicEl(I),B=S.getItemVisual(I,"style"),z=B.fill;if(V instanceof ue.Ay){var W=V.style;V.useStyle((0,p.extend)({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},B))}else V.useStyle(B),V.type!=="pointer"&&V.setColor(z);V.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),V.style.fill==="auto"&&V.setStyle("fill",n((0,k.Cb)(S.get(x,I),A,[0,1],!0))),V.z2EmphasisLift=0,(0,U.Mx)(V,D),(0,U.Lm)(V,M,P,R)}if(m){var $=d[I];$.useStyle(S.getItemVisual(I,"style")),$.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),$.z2EmphasisLift=0,(0,U.Mx)($,D),(0,U.Lm)($,M,P,R)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,r){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),h=(0,Tt.v5)(s,r.cx-o/2+(0,k.lo)(l[0],r.r),r.cy-o/2+(0,k.lo)(l[1],r.r),o,o,null,u);h.z2=i.get("showAbove")?1:0,h.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(h)}},e.prototype._renderTitleAndDetail=function(t,r,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),h=+t.get("min"),v=+t.get("max"),c=new it.A,f=[],d=[],g=t.isAnimationEnabled(),y=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){f[m]=new _t.Ay({silent:!0}),d[m]=new _t.Ay({silent:!0})}).update(function(m,S){f[m]=s._titleEls[S],d[m]=s._detailEls[S]}).execute(),l.each(function(m){var S=l.getItemModel(m),x=l.get(u,m),b=new it.A,_=n((0,k.Cb)(x,[h,v],[0,1],!0)),A=S.getModel("title");if(A.get("show")){var w=A.get("offsetCenter"),C=o.cx+(0,k.lo)(w[0],o.r),T=o.cy+(0,k.lo)(w[1],o.r),I=f[m];I.attr({z2:y?0:2,style:(0,q.VB)(A,{x:C,y:T,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:_})}),b.add(I)}var D=S.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),M=o.cx+(0,k.lo)(L[0],o.r),P=o.cy+(0,k.lo)(L[1],o.r),R=(0,k.lo)(D.get("width"),o.r),V=(0,k.lo)(D.get("height"),o.r),B=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:_,I=d[m],z=D.get("formatter");I.attr({z2:y?0:2,style:(0,q.VB)(D,{x:M,y:P,text:Vi(x,z),width:isNaN(R)?null:R,height:isNaN(V)?null:V,align:"center",verticalAlign:"middle"},{inheritColor:B})}),(0,q.Oh)(I,{normal:D},x,function($){return Vi($,z)}),g&&(0,q.xb)(I,m,l,t,{getFormattedLabel:function($,K,et,lt,ot,mt){return Vi(mt?mt.interpolatedValue:x,z)}}),b.add(I)}c.add(b)}),this.group.add(c),this._titleEls=f,this._detailEls=d},e.type="gauge",e}(Nt.A),LS=DS,MS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,r){return zr(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}(Ot.A),PS=MS;function RS(a){a.registerChartView(LS),a.registerSeriesModel(PS)}var ES=["itemStyle","opacity"],VS=function(a){(0,O.C6)(e,a);function e(t,r){var i=a.call(this)||this,n=i,o=new Pe.A,s=new _t.Ay;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,r,!0),i}return e.prototype.updateData=function(t,r,i){var n=this,o=t.hostModel,s=t.getItemModel(r),l=t.getItemLayout(r),u=s.getModel("emphasis"),h=s.get(ES);h=h==null?1:h,i||(0,Q.ap)(n),n.useStyle(t.getItemVisual(r,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,Q.LW(n,{style:{opacity:h}},o,r)):Q.oi(n,{style:{opacity:h},shape:{points:l.points}},o,r),(0,U.Mx)(n,s),this._updateLabel(t,r),(0,U.Lm)(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(r),u=t.getItemLayout(r),h=u.label,v=t.getItemVisual(r,"style"),c=v.fill;(0,q.qM)(o,(0,q.lx)(l),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:v.opacity,defaultText:t.getName(r)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}}),i.setTextConfig({local:!0,inside:!!h.inside,insideStroke:c,outsideFill:c});var f=h.linePoints;n.setShape({points:f}),i.textGuideLineConfig={anchor:f?new Re.A(f[0][0],f[0][1]):null},Q.oi(o,{style:{x:h.x,y:h.y}},s,r),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),(0,Nr.eR)(i,(0,Nr.rv)(l),{stroke:c})},e}(Se.A),OS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new VS(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(n,l),s.add(h),n.setItemGraphicEl(l,h)}).remove(function(l){var u=o.getItemGraphicEl(l);Q.t5(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Nt.A),kS=OS,NS=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ma(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return zr(this,{coordDimensions:["value"],encodeDefaulter:p.curry(fi.ln,this)})},e.prototype._defaultLabelLine=function(t){(0,J.M5)(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),i=a.prototype.getDataParams.call(this,t),n=r.mapDimension("value"),o=r.getSum(n);return i.percent=o?+(r.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},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}(Ot.A),zS=NS;function BS(a,e){return yt.dV(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function GS(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=a.count();on1)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(a){if(!(this._mouseDownPoint||!Vo(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]),r=t.behavior;r==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(r==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:r==="jump"?null:{duration:0}})}}};function Vo(a,e){var t=a._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var l1=o1,u1=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){a.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var r=this.option;t&&p.merge(r,t,!0),this._initDimensions()},e.prototype.contains=function(t,r){var i=t.get("parallelIndex");return i!=null&&r.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){p.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(r){t.hasOwnProperty(r)&&(this.option[r]=t[r])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],r=this.parallelAxisIndex=[],i=p.filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);p.each(i,function(n){t.push("dim"+n.get("dim")),r.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Ht.A),h1=u1,v1=function(a){(0,O.C6)(e,a);function e(t,r,i,n,o){var s=a.call(this,t,r,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Ee.A),c1=v1;function Ir(a,e,t,r,i,n){a=a||0;var o=t[1]-t[0];if(i!=null&&(i=Zr(i,[0,o])),n!=null&&(n=Math.max(n,i!=null?i:0)),r==="all"){var s=Math.abs(e[1]-e[0]);s=Zr(s,[0,o]),i=n=Zr(s,[i,n]),r=0}e[0]=Zr(e[0],t),e[1]=Zr(e[1],t);var l=Oo(e,r);e[r]+=a;var u=i||0,h=t.slice();l.sign<0?h[0]+=u:h[1]-=u,e[r]=Zr(e[r],h);var v;return v=Oo(e,r),i!=null&&(v.sign!==l.sign||v.spann&&(e[1-r]=e[r]+v.sign*n),e}function Oo(a,e){var t=a[e]-a[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Zr(a,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,a))}var ko=p.each,Vv=Math.min,Ov=Math.max,kv=Math.floor,f1=Math.ceil,Nv=k.LI,p1=Math.PI,d1=function(){function a(e,t,r){this.type="parallel",this._axesMap=p.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var i=e.dimensions,n=e.parallelAxisIndex;ko(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),h=this._axesMap.set(o,new c1(o,Ut.f$(u),[0,0],u.get("type"),l)),v=h.type==="category";h.onBand=v&&u.get("boundaryGap"),h.inverse=u.get("inverse"),u.axis=h,h.model=u,h.coordinateSystem=u.coordinateSystem=this},this)},a.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},a.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),r=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=r&&o<=r+t.axisLength&&s>=i&&s<=i+t.layoutLength},a.prototype.getModel=function(){return this._model},a.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(r){if(e.contains(r,t)){var i=r.getData();ko(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),Ut.af(o.scale,o.model)},this)}},this)},a.prototype.resize=function(e,t){this._rect=yt.dV(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},a.prototype.getRect=function(){return this._rect},a.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,r=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,h=Oi(e.get("axisExpandWidth"),l),v=Oi(e.get("axisExpandCount")||0,[0,u]),c=e.get("axisExpandable")&&u>3&&u>v&&v>1&&h>0&&s>0,f=e.get("axisExpandWindow"),d;if(f)d=Oi(f[1]-f[0],l),f[1]=f[0]+d;else{d=Oi(h*(v-1),l);var g=e.get("axisExpandCenter")||kv(u/2);f=[h*g-d/2],f[1]=f[0]+d}var y=(s-d)/(u-v);y<3&&(y=0);var m=[kv(Nv(f[0]/h,1))+1,f1(Nv(f[1]/h,1))-1],S=y/h*f[0];return{layout:n,pixelDimIndex:o,layoutBase:t[r[o]],layoutLength:s,axisBase:t[r[1-o]],axisLength:t[i[1-o]],axisExpandable:c,axisExpandWidth:h,axisCollapseWidth:y,axisExpandWindow:f,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:S}},a.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,r=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),ko(r,function(o,s){var l=(i.axisExpandable?y1:g1)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},h={horizontal:p1/2,vertical:0},v=[u[n].x+e.x,u[n].y+e.y],c=h[n],f=Lt.create();Lt.rotate(f,f,c),Lt.translate(f,f,v),this._axesLayout[o]={position:v,rotation:c,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},a.prototype.getAxis=function(e){return this._axesMap.get(e)},a.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},a.prototype.eachActiveState=function(e,t,r,i){r==null&&(r=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];p.each(o,function(y){s.push(e.mapDimension(y)),l.push(n.get(y).model)});for(var u=this.hasAxisBrushed(),h=r;hn*(1-v[0])?(u="jump",l=s-n*(1-v[2])):(l=s-n*v[1])>=0&&(l=s-n*(1-v[1]))<=0&&(l=0),l*=t.axisExpandWidth/h,l?Ir(l,i,o,"all"):u="none";else{var f=i[1]-i[0],d=o[1]*s/f;i=[Ov(0,d-f/2)],i[1]=Vv(o[1],i[0]+f),i[0]=i[1]-f}return{axisExpandWindow:i,behavior:u}},a}();function Oi(a,e){return Vv(Ov(a,e[0]),e[1])}function g1(a,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*a,axisNameAvailableWidth:t,axisLabelShow:!0}}function y1(a,e){var t=e.layoutLength,r=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,h;return a=0;i--)k.Y6(r[i])},e.prototype.getActiveState=function(t){var r=this.activeIntervals;if(!r.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(r.length===1){var i=r[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=r.length;nw1}function Xv(a){var e=a.length-1;return e<0&&(e=0),[a[0],a[e]]}function jv(a,e,t,r){var i=new it.A;return i.add(new Dt.A({name:"main",style:Fo(t),silent:!0,draggable:!0,cursor:"move",drift:(0,p.curry)(Jv,a,e,i,["n","s","w","e"]),ondragend:(0,p.curry)(Lr,e,{isEnd:!0})})),(0,p.each)(r,function(n){i.add(new Dt.A({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,p.curry)(Jv,a,e,i,n),ondragend:(0,p.curry)(Lr,e,{isEnd:!0})}))}),i}function Kv(a,e,t,r){var i=r.brushStyle.lineWidth||0,n=Ur(i,C1),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,h=t[0][1],v=t[1][1],c=h-n+i/2,f=v-n+i/2,d=h-o,g=v-s,y=d+i,m=g+i;Ze(a,e,"main",o,s,d,g),r.transformable&&(Ze(a,e,"w",l,u,n,m),Ze(a,e,"e",c,u,n,m),Ze(a,e,"n",l,u,y,n),Ze(a,e,"s",l,f,y,n),Ze(a,e,"nw",l,u,n,n),Ze(a,e,"ne",c,u,n,n),Ze(a,e,"sw",l,f,n,n),Ze(a,e,"se",c,f,n,n))}function Ho(a,e){var t=e.__brushOption,r=t.transformable,i=e.childAt(0);i.useStyle(Fo(t)),i.attr({silent:!r,cursor:r?"move":"default"}),(0,p.each)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),s=n.length===1?Wo(a,n[0]):R1(a,n);o&&o.attr({silent:!r,invisible:!r,cursor:r?I1[s]+"-resize":null})})}function Ze(a,e,t,r,i,n,o){var s=e.childOfName(t);s&&s.setShape(V1(Yo(a,e,[[r,i],[r+n,i+o]])))}function Fo(a){return(0,p.defaults)({strokeNoScale:!0},a.brushStyle)}function $v(a,e,t,r){var i=[Na(a,t),Na(e,r)],n=[Ur(a,t),Ur(e,r)];return[[i[0],n[0]],[i[1],n[1]]]}function P1(a){return tt.getTransform(a.group)}function Wo(a,e){var t={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=tt.transformDirection(t[e],P1(a));return r[i]}function R1(a,e){var t=[Wo(a,e[0]),Wo(a,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function Jv(a,e,t,r,i,n){var o=t.__brushOption,s=a.toRectRange(o.range),l=Qv(e,i,n);(0,p.each)(r,function(u){var h=T1[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=a.fromRectRange($v(s[0][0],s[1][0],s[0][1],s[1][1])),No(e,t),Lr(e,{isEnd:!1})}function E1(a,e,t,r){var i=e.__brushOption.range,n=Qv(a,t,r);(0,p.each)(i,function(o){o[0]+=n[0],o[1]+=n[1]}),No(a,e),Lr(a,{isEnd:!1})}function Qv(a,e,t){var r=a.group,i=r.transformCoordToLocal(e,t),n=r.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function Yo(a,e,t){var r=Uv(a,e);return r&&r!==Dr?r.clipPath(t,a._transform):(0,p.clone)(t)}function V1(a){var e=Na(a[0][0],a[1][0]),t=Na(a[0][1],a[1][1]),r=Ur(a[0][0],a[1][0]),i=Ur(a[0][1],a[1][1]);return{x:e,y:t,width:r-e,height:i-t}}function O1(a,e,t){if(!(!a._brushType||N1(a,e.offsetX,e.offsetY))){var r=a._zr,i=a._covers,n=Bo(a,e,t);if(!a._dragging)for(var o=0;or.getWidth()||t<0||t>r.getHeight()}var ki={lineX:rc(0),lineY:rc(1),rect:{createCover:function(a,e){function t(r){return r}return jv({toRectRange:t,fromRectRange:t},a,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(a){var e=Xv(a);return $v(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(a,e,t,r){Kv(a,e,t,r)},updateCommon:Ho,contain:Uo},polygon:{createCover:function(a,e){var t=new it.A;return t.add(new Pe.A({name:"main",style:Fo(e),silent:!0})),t},getCreatingRange:function(a){return a},endCreating:function(a,e){e.remove(e.childAt(0)),e.add(new Se.A({name:"main",draggable:!0,drift:(0,p.curry)(E1,a,e),ondragend:(0,p.curry)(Lr,a,{isEnd:!0})}))},updateCoverShape:function(a,e,t,r){e.childAt(0).setShape({points:Yo(a,e,t)})},updateCommon:Ho,contain:Uo}};function rc(a){return{createCover:function(e,t){return jv({toRectRange:function(r){var i=[r,[0,100]];return a&&i.reverse(),i},fromRectRange:function(r){return r[a]}},e,t,[[["w"],["e"]],[["n"],["s"]]][a])},getCreatingRange:function(e){var t=Xv(e),r=Na(t[0][a],t[1][a]),i=Ur(t[0][a],t[1][a]);return[r,i]},updateCoverShape:function(e,t,r,i){var n,o=Uv(e,t);if(o!==Dr&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(a);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-a]]}var l=[r,n];a&&l.reverse(),Kv(e,t,l,i)},updateCommon:Ho,contain:Uo}}var Xo=L1;function ac(a){return a=jo(a),function(e){return tt.clipPointsByRect(e,a)}}function ic(a,e){return a=jo(a),function(t){var r=e!=null?e:t,i=r?a.width:a.height,n=r?a.x:a.y;return[n,n+(i||0)]}}function nc(a,e,t){var r=jo(a);return function(i,n){return r.contain(n[0],n[1])&&!mi(i,e,t)}}function jo(a){return vt.A.create(a)}var z1=["axisLine","axisTickLabel","axisName"],B1=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){a.prototype.init.apply(this,arguments),(this._brushController=new Xo(r.getZr())).on("brush",p.bind(this._onBrush,this))},e.prototype.render=function(t,r,i,n){if(!G1(t,r,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new it.A,this.group.add(this._axisGroup),!!t.get("show")){var s=F1(t,r),l=s.coordinateSystem,u=t.getAreaSelectStyle(),h=u.width,v=t.axis.dim,c=l.getAxisLayout(v),f=p.extend({strokeContainThreshold:h},c),d=new We(t,f);p.each(z1,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(f,u,t,s,h,i),tt.groupTransition(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,r,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,Math.abs(u)*.1),v=vt.A.create({x:l[0],y:-o/2,width:u,height:o});v.x-=h,v.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:ac(v),isTargetByCursor:nc(v,s,n),getLinearBrushOtherExtent:ic(v,0)}]).enableBrush({brushType:"lineX",brushStyle:r,removeOnClick:!0}).updateCovers(H1(i))},e.prototype._onBrush=function(t){var r=t.areas,i=this.axisModel,n=i.axis,o=p.map(r,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Yt.A);function G1(a,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===a}function H1(a){var e=a.axis;return p.map(a.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function F1(a,e){return e.getComponent("parallel",a.get("parallelIndex"))}var W1=B1,Y1={type:"axisAreaSelect",event:"axisAreaSelected"};function Z1(a){a.registerAction(Y1,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(r){r.axis.model.setActiveIntervals(e.intervals)})}),a.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(r){r.setAxisExpand(e)})})}var U1={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function oc(a){a.registerComponentView(l1),a.registerComponentModel(h1),a.registerCoordinateSystem("parallel",b1),a.registerPreprocessor(r1),a.registerComponentModel(Bv),a.registerComponentView(W1),Br(a,"parallel",Bv,U1),Z1(a)}function X1(a){(0,Y.Y)(oc),a.registerChartView(jS),a.registerSeriesModel(QS),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,e1)}var j1=function(){function a(){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 a}(),K1=function(a){(0,O.C6)(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new j1},e.prototype.buildPath=function(t,r){var i=r.extent;t.moveTo(r.x1,r.y1),t.bezierCurveTo(r.cpx1,r.cpy1,r.cpx2,r.cpy2,r.x2,r.y2),r.orient==="vertical"?(t.lineTo(r.x2+i,r.y2),t.bezierCurveTo(r.cpx2+i,r.cpy2,r.cpx1+i,r.cpy1,r.x1+i,r.y1)):(t.lineTo(r.x2,r.y2+i),t.bezierCurveTo(r.cpx2,r.cpy2+i,r.cpx1,r.cpy1+i,r.x1,r.y1+i)),t.closePath()},e.prototype.highlight=function(){(0,U.HY)(this)},e.prototype.downplay=function(){(0,U.SD)(this)},e}(Vt.Ay),$1=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,r,i){var n=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,h=l.height,v=t.getData(),c=t.getData("edge"),f=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var g=new K1,y=(0,ft.z)(g);y.dataIndex=d.dataIndex,y.seriesIndex=t.seriesIndex,y.dataType="edge";var m=d.getModel(),S=m.getModel("lineStyle"),x=S.get("curveness"),b=d.node1.getLayout(),_=d.node1.getModel(),A=_.get("localX"),w=_.get("localY"),C=d.node2.getLayout(),T=d.node2.getModel(),I=T.get("localX"),D=T.get("localY"),L=d.getLayout(),M,P,R,V,B,z,W,$;g.shape.extent=Math.max(1,L.dy),g.shape.orient=f,f==="vertical"?(M=(A!=null?A*u:b.x)+L.sy,P=(w!=null?w*h:b.y)+b.dy,R=(I!=null?I*u:C.x)+L.ty,V=D!=null?D*h:C.y,B=M,z=P*(1-x)+V*x,W=R,$=P*x+V*(1-x)):(M=(A!=null?A*u:b.x)+b.dx,P=(w!=null?w*h:b.y)+L.sy,R=I!=null?I*u:C.x,V=(D!=null?D*h:C.y)+L.ty,B=M*(1-x)+R*x,z=P,W=M*x+R*(1-x),$=V),g.setShape({x1:M,y1:P,x2:R,y2:V,cpx1:B,cpy1:z,cpx2:W,cpy2:$}),g.useStyle(S.getItemStyle()),sc(g.style,f,d);var K=""+m.get("value"),et=(0,q.lx)(m,"edgeLabel");(0,q.qM)(g,et,{labelFetcher:{getFormattedLabel:function(mt,At,xt,nt,Ct,wt){return t.getFormattedLabel(mt,At,"edge",nt,(0,p.retrieve3)(Ct,et.normal&&et.normal.get("formatter"),K),wt)}},labelDataIndex:d.dataIndex,defaultText:K}),g.setTextConfig({position:"inside"});var lt=m.getModel("emphasis");(0,U.Mx)(g,m,"lineStyle",function(mt){var At=mt.getItemStyle();return sc(At,f,d),At}),s.add(g),c.setItemGraphicEl(d.dataIndex,g);var ot=lt.get("focus");(0,U.Lm)(g,ot==="adjacency"?d.getAdjacentDataIndices():ot==="trajectory"?d.getTrajectoryDataIndices():ot,lt.get("blurScope"),lt.get("disabled"))}),o.eachNode(function(d){var g=d.getLayout(),y=d.getModel(),m=y.get("localX"),S=y.get("localY"),x=y.getModel("emphasis"),b=y.get(["itemStyle","borderRadius"])||0,_=new Dt.A({shape:{x:m!=null?m*u:g.x,y:S!=null?S*h:g.y,width:g.dx,height:g.dy,r:b},style:y.getModel("itemStyle").getItemStyle(),z2:10});(0,q.qM)(_,(0,q.lx)(y),{labelFetcher:{getFormattedLabel:function(w,C){return t.getFormattedLabel(w,C,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),_.disableLabelAnimation=!0,_.setStyle("fill",d.getVisual("color")),_.setStyle("decal",d.getVisual("style").decal),(0,U.Mx)(_,y),s.add(_),v.setItemGraphicEl(d.dataIndex,_),(0,ft.z)(_).dataType="node";var A=x.get("focus");(0,U.Lm)(_,A==="adjacency"?d.getAdjacentDataIndices():A==="trajectory"?d.getTrajectoryDataIndices():A,x.get("blurScope"),x.get("disabled"))}),v.eachItemGraphicEl(function(d,g){var y=v.getItemModel(g);y.get("draggable")&&(d.drift=function(m,S){n._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=S,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:v.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/h})},d.ondragend=function(){n._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(J1(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Nt.A);function sc(a,e,t){switch(a.fill){case"source":a.fill=t.node1.getVisual("color"),a.decal=t.node1.getVisual("style").decal;break;case"target":a.fill=t.node2.getVisual("color"),a.decal=t.node2.getVisual("style").decal;break;case"gradient":var r=t.node1.getVisual("color"),i=t.node2.getVisual("color");(0,p.isString)(r)&&(0,p.isString)(i)&&(a.fill=new ii.A(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:r,offset:0},{color:i,offset:1}]))}}function J1(a,e,t){var r=new Dt.A({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return Q.LW(r,{shape:{width:a.width+20}},e,t),r}var Q1=$1,q1=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Xt.A(o[l],this,r));if(n&&i){var u=Mv(n,i,this,!0,h);return u.data}function h(v,c){v.wrapMethod("getItemModel",function(f,d){var g=f.parentModel,y=g.getData().getItemLayout(d);if(y){var m=y.depth,S=g.levelModels[m];S&&(f.parentModel=S)}return f}),c.wrapMethod("getItemModel",function(f,d){var g=f.parentModel,y=g.getGraph().getEdgeByIndex(d),m=y.node1.getLayout();if(m){var S=m.depth,x=g.levelModels[S];x&&(f.parentModel=x)}return f})}},e.prototype.setNodePosition=function(t,r){var i=this.option.data||this.option.nodes,n=i[t];n.localX=r[0],n.localY=r[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,r,i){function n(f){return isNaN(f)||f==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return(0,zt.Qx)("nameValue",{name:u,value:l,noValue:n(l)})}else{var h=this.getGraph().getNodeByIndex(t),v=h.getLayout().value,c=this.getDataParams(t,i).data.name;return(0,zt.Qx)("nameValue",{name:c!=null?c+"":null,value:v,noValue:n(v)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var i=a.prototype.getDataParams.call(this,t,r);if(i.value==null&&r==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},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},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Ot.A),tb=q1;function eb(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),i=t.get("nodeGap"),n=rb(t,e);t.layoutInfo=n;var o=n.width,s=n.height,l=t.getGraph(),u=l.nodes,h=l.edges;ib(u);var v=p.filter(u,function(g){return g.getLayout().value===0}),c=v.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),d=t.get("nodeAlign");ab(u,h,r,i,o,s,c,f,d)})}function rb(a,e){return yt.dV(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function ab(a,e,t,r,i,n,o,s,l){nb(a,e,t,i,n,s,l),ub(a,e,n,i,r,o,s),mb(a,s)}function ib(a){p.each(a,function(e){var t=rr(e.outEdges,Ni),r=rr(e.inEdges,Ni),i=e.getValue()||0,n=Math.max(t,r,i);e.setLayout({value:n},!0)})}function nb(a,e,t,r,i,n,o){for(var s=[],l=[],u=[],h=[],v=0,c=0;c=0;m&&y.depth>f&&(f=y.depth),g.setLayout({depth:m?y.depth:v},!0),n==="vertical"?g.setLayout({dy:t},!0):g.setLayout({dx:t},!0);for(var S=0;Sv-1?f:v-1;o&&o!=="left"&&ob(a,o,n,w);var C=n==="vertical"?(i-t)/w:(r-t)/w;lb(a,C,n)}function lc(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function ob(a,e,t,r){if(e==="right"){for(var i=[],n=a,o=0;n.length;){for(var s=0;s0;n--)l*=.99,cb(s,l,o),Ko(s,i,t,r,o),yb(s,l,o),Ko(s,i,t,r,o)}function hb(a,e){var t=[],r=e==="vertical"?"y":"x",i=(0,J.Sq)(a,function(n){return n.getLayout()[r]});return i.keys.sort(function(n,o){return n-o}),p.each(i.keys,function(n){t.push(i.buckets.get(n))}),t}function vb(a,e,t,r,i,n){var o=1/0;p.each(a,function(s){var l=s.length,u=0;p.each(s,function(v){u+=v.getLayout().value});var h=n==="vertical"?(r-(l-1)*i)/u:(t-(l-1)*i)/u;h0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]+l.getLayout()[c]+e;var d=i==="vertical"?r:t;if(u=h-e-d,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s;for(var f=v-2;f>=0;--f)l=o[f],u=l.getLayout()[n]+l.getLayout()[c]+e-h,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]}})}function cb(a,e,t){p.each(a.slice().reverse(),function(r){p.each(r,function(i){if(i.outEdges.length){var n=rr(i.outEdges,fb,t)/rr(i.outEdges,Ni);if(isNaN(n)){var o=i.outEdges.length;n=o?rr(i.outEdges,pb,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-er(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-er(i,t))*e;i.setLayout({y:l},!0)}}})})}function fb(a,e){return er(a.node2,e)*a.getValue()}function pb(a,e){return er(a.node2,e)}function db(a,e){return er(a.node1,e)*a.getValue()}function gb(a,e){return er(a.node1,e)}function er(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function Ni(a){return a.getValue()}function rr(a,e,t){for(var r=0,i=a.length,n=-1;++no&&(o=l)}),p.each(r,function(s){var l=new ae({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get(["itemStyle","color"]);h!=null?(s.setVisual("color",h),s.setVisual("style",{fill:h})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&p.each(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Sb(a){a.registerChartView(Q1),a.registerSeriesModel(tb),a.registerLayout(eb),a.registerVisual(xb),a.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(r){r.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var $o=E(29756),uc=function(){function a(){}return a.prototype.getInitialData=function(e,t){var r,i=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",r=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",r=n.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],h=e.layout==="horizontal"?0:1,v=this._baseAxisDim=u[h],c=u[1-h],f=[i,n],d=f[h].get("type"),g=f[1-h].get("type"),y=e.data;if(y&&l){var m=[];p.each(y,function(b,_){var A;p.isArray(b)?(A=b.slice(),b.unshift(_)):p.isArray(b.value)?(A=p.extend({},b),A.value=A.value.slice(),b.value.unshift(_)):A=b,m.push(A)}),e.data=m}var S=this.defaultValueDimensions,x=[{name:v,type:(0,$o.B)(d),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:(0,$o.B)(g),dimsDef:S.slice()}];return zr(this,{coordDimensions:x,dimensionsCount:S.length+1,encodeDefaulter:p.curry(fi.OC,x,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),hc=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.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}(Ot.A);(0,p.mixin)(hc,uc,!0);var bb=hc,_b=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var h=n.getItemLayout(u),v=vc(h,n,u,l,!0);n.setItemGraphicEl(u,v),o.add(v)}}).update(function(u,h){var v=s.getItemGraphicEl(h);if(!n.hasValue(u)){o.remove(v);return}var c=n.getItemLayout(u);v?((0,Q.ap)(v),cc(c,v,n,u)):v=vc(c,n,u,l),o.add(v),n.setItemGraphicEl(u,v)}).remove(function(u){var h=s.getItemGraphicEl(u);h&&o.remove(h)}).execute(),this._data=n},e.prototype.remove=function(t){var r=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&r.remove(n)})},e.type="boxplot",e}(Nt.A),Ab=function(){function a(){}return a}(),wb=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new Ab},e.prototype.buildPath=function(t,r){var i=r.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();ng){var b=[m,x];r.push(b)}}}return{boxData:t,outliers:r}}var Gt=E(41025),zi=E(13430),Rb={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==zi.Km){var r="";(0,Gt.$8)(r)}var i=Pb(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Eb(a){a.registerSeriesModel(bb),a.registerChartView(Tb),a.registerLayout(Ib),a.registerTransform(Rb)}var Vb=["color","borderColor"],Ob=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){tt.traverseElements(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t){var r=t.getData(),i=this._data,n=this.group,o=r.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),r.diff(i).add(function(h){if(r.hasValue(h)){var v=r.getItemLayout(h);if(s&&fc(u,v))return;var c=Jo(v,h,!0);Q.LW(c,{shape:{points:v.ends}},t,h),Qo(c,r,h,o),n.add(c),r.setItemGraphicEl(h,c)}}).update(function(h,v){var c=i.getItemGraphicEl(v);if(!r.hasValue(h)){n.remove(c);return}var f=r.getItemLayout(h);if(s&&fc(u,f)){n.remove(c);return}c?(Q.oi(c,{shape:{points:f.ends}},t,h),(0,Q.ap)(c)):c=Jo(f,h),Qo(c,r,h,o),n.add(c),r.setItemGraphicEl(h,c)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&n.remove(v)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),pc(t,this.group);var r=t.get("clip",!0)?pa(t.coordinateSystem,!1,t):null;r?this.group.setClipPath(r):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,r){for(var i=r.getData(),n=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=Jo(s,o);Qo(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){pc(r,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}(Nt.A),kb=function(){function a(){}return a}(),Nb=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new kb},e.prototype.buildPath=function(t,r){var i=r.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(Vt.Ay);function Jo(a,e,t){var r=a.ends;return new Nb({shape:{points:t?zb(r,a):r},z2:100})}function fc(a,e){for(var t=!0,r=0;r0?"borderColor":"borderColor0"])||t.get(["itemStyle",a>0?"color":"color0"]);a===0&&(i=t.get(["itemStyle","borderColorDoji"]));var n=t.getModel("itemStyle").getItemStyle(Vb);e.useStyle(n),e.style.fill=null,e.style.stroke=i}var Gb=Ob,dc=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.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,r,i){var n=r.getItemLayout(t);return n&&i.rect(n.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",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Ot.A);(0,p.mixin)(dc,uc,!0);var Hb=dc;function Fb(a){!a||!p.isArray(a.series)||p.each(a.series,function(e){p.isObject(e)&&e.type==="k"&&(e.type="candlestick")})}var Wb=["itemStyle","borderColor"],Yb=["itemStyle","borderColor0"],Zb=["itemStyle","borderColorDoji"],Ub=["itemStyle","color"],Xb=["itemStyle","color0"],jb={seriesType:"candlestick",plan:(0,ni.A)(),performRawSeries:!0,reset:function(a,e){function t(n,o){return o.get(n>0?Ub:Xb)}function r(n,o){return o.get(n===0?Zb:n>0?Wb:Yb)}if(!e.isSeriesFiltered(a)){var i=a.pipelineContext.large;return!i&&{progress:function(n,o){for(var s;(s=n.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,h=l.getItemStyle();h.fill=t(u,l),h.stroke=r(u,l)||h.fill;var v=o.ensureUniqueItemVisual(s,"style");(0,p.extend)(v,h)}}}}}},Kb=jb,$b={seriesType:"candlestick",plan:(0,ni.A)(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=Jb(a,t),i=0,n=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=(0,p.map)(t.mapDimensionsAll(o[n]),t.getDimensionIndex,t),u=l[0],h=l[1],v=l[2],c=l[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||l.length<4)return;return{progress:a.pipelineContext.large?d:f};function f(g,y){for(var m,S=y.getStore();(m=g.next())!=null;){var x=S.get(s,m),b=S.get(u,m),_=S.get(h,m),A=S.get(v,m),w=S.get(c,m),C=Math.min(b,_),T=Math.max(b,_),I=B(C,x),D=B(T,x),L=B(A,x),M=B(w,x),P=[];z(P,D,0),z(P,I,1),P.push($(M),$(D),$(L),$(I));var R=y.getItemModel(m),V=!!R.get(["itemStyle","borderColorDoji"]);y.setItemLayout(m,{sign:gc(S,m,b,_,h,V),initBaseline:b>_?D[n]:I[n],ends:P,brushRect:W(A,w,x)})}function B(K,et){var lt=[];return lt[i]=et,lt[n]=K,isNaN(et)||isNaN(K)?[NaN,NaN]:e.dataToPoint(lt)}function z(K,et,lt){var ot=et.slice(),mt=et.slice();ot[i]=(0,tt.subPixelOptimize)(ot[i]+r/2,1,!1),mt[i]=(0,tt.subPixelOptimize)(mt[i]-r/2,1,!0),lt?K.push(ot,mt):K.push(mt,ot)}function W(K,et,lt){var ot=B(K,lt),mt=B(et,lt);return ot[i]-=r/2,mt[i]-=r/2,{x:ot[0],y:ot[1],width:n?r:mt[0]-ot[0],height:n?mt[1]-ot[1]:r}}function $(K){return K[i]=(0,tt.subPixelOptimize)(K[i],1),K}}function d(g,y){for(var m=(0,dr.J)(g.count*4),S=0,x,b=[],_=[],A,w=y.getStore(),C=!!a.get(["itemStyle","borderColorDoji"]);(A=g.next())!=null;){var T=w.get(s,A),I=w.get(u,A),D=w.get(h,A),L=w.get(v,A),M=w.get(c,A);if(isNaN(T)||isNaN(L)||isNaN(M)){m[S++]=NaN,S+=3;continue}m[S++]=gc(w,A,I,D,h,C),b[i]=T,b[n]=L,x=e.dataToPoint(b,null,_),m[S++]=x?x[0]:NaN,m[S++]=x?x[1]:NaN,b[n]=M,x=e.dataToPoint(b,null,_),m[S++]=x?x[1]:NaN}y.setLayout("largePoints",m)}}};function gc(a,e,t,r,i,n){var o;return t>r?o=-1:t0?a.get(i,e-1)<=r?1:-1:1,o}function Jb(a,e){var t=a.getBaseAxis(),r,i=t.type==="category"?t.getBandWidth():(r=t.getExtent(),Math.abs(r[1]-r[0])/e.count()),n=(0,k.lo)((0,p.retrieve2)(a.get("barMaxWidth"),i),i),o=(0,k.lo)((0,p.retrieve2)(a.get("barMinWidth"),1),i),s=a.get("barWidth");return s!=null?(0,k.lo)(s,i):Math.max(Math.min(i/2,n),o)}var Qb=$b;function qb(a){a.registerChartView(Gb),a.registerSeriesModel(Hb),a.registerPreprocessor(Fb),a.registerVisual(Kb),a.registerLayout(Qb)}function yc(a,e){var t=e.rippleEffectColor||e.color;a.eachChild(function(r){r.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var t_=function(a){(0,O.C6)(e,a);function e(t,r){var i=a.call(this)||this,n=new ca(t,r),o=new it.A;return i.add(n),i.add(o),i.updateData(t,r),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(n)/h*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){n.stopAnimation();var c=void 0;p.isFunction(v)?c=v(i):c=v,n.__t>0&&(c=-s*n.__t),this._animateSymbol(n,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,r,i,n,o){if(r>0){t.__t=0;var s=this,l=t.animate("",n).when(o?r*2:r,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});n||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return at.dist(t.__p1,t.__cp1)+at.dist(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,r){t.__p1=r[0],t.__p2=r[1],t.__cp1=r[2]||[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]},e.prototype.updateData=function(t,r,i){this.childAt(0).updateData(t,r,i),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=ge.k3,h=ge.z7;s[0]=u(r[0],n[0],i[0],o),s[1]=u(r[1],n[1],i[1],o);var v=t.__t<1?h(r[0],n[0],i[0],o):h(i[0],n[0],r[0],1-o),c=t.__t<1?h(r[1],n[1],i[1],o):h(i[1],n[1],r[1],1-o);t.rotation=-Math.atan2(c,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(n[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;lr);l++);l=Math.min(l-1,o-2)}var h=(r-n[l])/(n[l+1]-n[l]),v=i[l],c=i[l+1];t.x=v[0]*(1-h)+h*c[0],t.y=v[1]*(1-h)+h*c[1];var f=t.__t<1?c[0]-v[0]:v[0]-c[0],d=t.__t<1?c[1]-v[1]:v[1]-c[1];t.rotation=-Math.atan2(d,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=r,t.ignore=!1}},e}(mc),h_=u_,Sc=E(57043),v_=E(14423),c_=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),f_=function(a){(0,O.C6)(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}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 c_},e.prototype.buildPath=function(t,r){var i=r.segs,n=r.curveness,o;if(r.polyline)for(o=this._off;o0){t.moveTo(i[o++],i[o++]);for(var l=1;l0){var f=(u+v)/2-(h-c)*n,d=(h+c)/2-(v-u)*n;t.quadraticCurveTo(f,d,v,c)}else t.lineTo(v,c)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var v=n[u++],c=n[u++],f=1;f0){var y=(v+d)/2-(c-g)*o,m=(c+g)/2-(d-v)*o;if(v_.l(v,c,y,m,d,g,s,t,r))return l}else if(Sc.l(v,c,d,g,s,t,r))return l;l++}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),n=this.getBoundingRect();if(t=i[0],r=i[1],n.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),d_=p_,g_={seriesType:"lines",plan:(0,ni.A)(),reset:function(a){var e=a.coordinateSystem;if(e){var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(i,n){var o=[];if(r){var s=void 0,l=i.end-i.start;if(t){for(var u=0,h=i.start;h0&&(h||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var v=t.get("clip",!0)&&pa(t.coordinateSystem,!1,t);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._lineDraw.incrementalUpdate(t,r.getData()),this._finished=t.end===r.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,r,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=bc.reset(t,r,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,r){var i=this._lineDraw,n=this._showEffect(r),o=!!r.get("polyline"),s=r.pipelineContext,l=s.large;return(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new d_:new Io(o?n?h_:xc:n?mc:Co),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var r=t.getZr(),i=r.painter.getType()==="svg";!i&&this._lastZlevel!=null&&r.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,r){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(r)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.type="lines",e}(Nt.A),m_=y_,x_=typeof Uint32Array=="undefined"?Array:Uint32Array,S_=typeof Float64Array=="undefined"?Array:Float64Array;function _c(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(a.data=(0,p.map)(e,function(t){var r=[t[0].coord,t[1].coord],i={coords:r};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),(0,p.mergeAll)([i,t[0],t[1]])}))}var b_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.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||[],_c(t);var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count)),a.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(_c(t),t.data){var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count))}a.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var r=this._processFlatCoordsArray(t.data);r.flatCoords&&(this._flatCoords?(this._flatCoords=(0,p.concatArray)(this._flatCoords,r.flatCoords),this._flatCoordsOffset=(0,p.concatArray)(this._flatCoordsOffset,r.flatCoordsOffset)):(this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset),t.data=new Float32Array(r.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var r=this.getData().getItemModel(t),i=r.option instanceof Array?r.option:r.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,r){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;oi}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,r){if(0)var i;var n=new he.A(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;n.hasItemOption=!0;var h=o.value;if(h!=null)return h instanceof Array?h[u]:h}),n},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=n.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),(0,zt.Qx)("nameValue",{name:h.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"),r=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&r>0?r+"":""},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}(Ot.A),__=b_;function Bi(a){return a instanceof Array||(a=[a,a]),a}var A_={seriesType:"lines",reset:function(a){var e=Bi(a.get("symbol")),t=Bi(a.get("symbolSize")),r=a.getData();r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",t&&t[0]),r.setVisual("toSymbolSize",t&&t[1]);function i(n,o){var s=n.getItemModel(o),l=Bi(s.getShallow("symbol",!0)),u=Bi(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:r.hasItemOption?i:null}}},w_=A_;function C_(a){a.registerChartView(m_),a.registerSeriesModel(__),a.registerLayout(bc),a.registerVisual(w_)}var T_=256,I_=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ee.yh.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),h=this.pointSize+this.blurSize,v=this.canvas,c=v.getContext("2d"),f=e.length;v.width=t,v.height=r;for(var d=0;d0){var L=o(x)?l:u;x>0&&(x=x*I+C),_[A++]=L[D],_[A++]=L[D+1],_[A++]=L[D+2],_[A++]=L[D+3]*x*256}else A+=4}return c.putImageData(b,0,0),v},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ee.yh.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var i=e.getContext("2d");return i.clearRect(0,0,r,r),i.shadowOffsetX=r,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,i=r[t]||(r[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},a}(),D_=I_;function L_(a,e,t){var r=a[1]-a[0];e=p.map(e,function(o){return{interval:[(o.interval[0]-a[0])/r,(o.interval[1]-a[0])/r]}});var i=e.length,n=0;return function(o){var s;for(s=n;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s=e[0]&&r<=e[1]}}function Ac(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var P_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n;r.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Ac(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,r,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,i,n){var o=r.coordinateSystem;o&&(Ac(o)?this.render(r,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){tt.traverseElements(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,i,n,o){var s=t.coordinateSystem,l=yr(s,"cartesian2d"),u,h,v,c;if(l){var f=s.getAxis("x"),d=s.getAxis("y");u=f.getBandWidth()+.5,h=d.getBandWidth()+.5,v=f.scale.getExtent(),c=d.scale.getExtent()}for(var g=this.group,y=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),S=t.getModel(["blur","itemStyle"]).getItemStyle(),x=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),_=(0,q.lx)(t),A=t.getModel("emphasis"),w=A.get("focus"),C=A.get("blurScope"),T=A.get("disabled"),I=l?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],D=i;Dv[1]||Rc[1])continue;var V=s.dataToPoint([P,R]);L=new Dt.A({shape:{x:V[0]-u/2,y:V[1]-h/2,width:u,height:h},style:M})}else{if(isNaN(y.get(I[1],D)))continue;L=new Dt.A({z2:1,shape:s.dataToRect([y.get(I[0],D)]).contentShape,style:M})}if(y.hasItemOption){var B=y.getItemModel(D),z=B.getModel("emphasis");m=z.getModel("itemStyle").getItemStyle(),S=B.getModel(["blur","itemStyle"]).getItemStyle(),x=B.getModel(["select","itemStyle"]).getItemStyle(),b=B.get(["itemStyle","borderRadius"]),w=z.get("focus"),C=z.get("blurScope"),T=z.get("disabled"),_=(0,q.lx)(B)}L.shape.r=b;var W=t.getRawValue(D),$="-";W&&W[2]!=null&&($=W[2]+""),(0,q.qM)(L,_,{labelFetcher:t,labelDataIndex:D,defaultOpacity:M.opacity,defaultText:$}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=S,L.ensureState("select").style=x,(0,U.Lm)(L,w,C,T),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(D,L),this._progressiveEls&&this._progressiveEls.push(L)}},e.prototype._renderOnGeo=function(t,r,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=r.getData(),u=this._hmLayer||this._hmLayer||new D_;u.blurSize=r.get("blurSize"),u.pointSize=r.get("pointSize"),u.minOpacity=r.get("minOpacity"),u.maxOpacity=r.get("maxOpacity");var h=t.getViewRect().clone(),v=t.getRoamTransform();h.applyTransform(v);var c=Math.max(h.x,0),f=Math.max(h.y,0),d=Math.min(h.width+h.x,n.getWidth()),g=Math.min(h.height+h.y,n.getHeight()),y=d-c,m=g-f,S=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(S,function(w,C,T){var I=t.dataToPoint([w,C]);return I[0]-=c,I[1]-=f,I.push(T),I}),b=i.getExtent(),_=i.type==="visualMap.continuous"?M_(b,i.option.range):L_(b,i.getPieceList(),i.option.selected);u.update(x,y,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},_);var A=new ue.Ay({style:{width:y,height:m,x:c,y:f,image:u.canvas},silent:!0});this.group.add(A)},e.type="heatmap",e}(Nt.A),R_=P_,E_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return(0,Fe.A)(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Lv.A.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}(Ot.A),V_=E_;function O_(a){a.registerChartView(R_),a.registerSeriesModel(V_)}var k_=["itemStyle","borderWidth"],wc=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],es=new _a.A,N_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),h=u.isHorizontal(),v=l.master.getRect(),c={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:h,valueDim:wc[+h],categoryDim:wc[1-+h]};o.diff(s).add(function(d){if(o.hasValue(d)){var g=Pc(o,d),y=Cc(o,d,g,c),m=Rc(o,c,y);o.setItemGraphicEl(d,m),n.add(m),Oc(m,c,y)}}).update(function(d,g){var y=s.getItemGraphicEl(g);if(!o.hasValue(d)){n.remove(y);return}var m=Pc(o,d),S=Cc(o,d,m,c),x=Vc(o,S);y&&x!==y.__pictorialShapeStr&&(n.remove(y),o.setItemGraphicEl(d,null),y=null),y?Y_(y,c,S):y=Rc(o,c,S,!0),o.setItemGraphicEl(d,y),y.__pictorialSymbolMeta=S,n.add(y),Oc(y,c,S)}).remove(function(d){var g=s.getItemGraphicEl(d);g&&Ec(s,d,g.__pictorialSymbolMeta.animationModel,g)}).execute();var f=t.get("clip",!0)?pa(t.coordinateSystem,!1,t):null;return f?n.setClipPath(f):n.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,r){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){Ec(n,(0,ft.z)(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(Nt.A);function Cc(a,e,t,r){var i=a.getItemLayout(e),n=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=t.get("symbolPatternSize")||2,v=t.isAnimationEnabled(),c={dataIndex:e,layout:i,itemModel:t,symbolType:a.getItemVisual(e,"symbol")||"circle",style:a.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:v?t:null,hoverScale:v&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};z_(t,n,i,r,c),B_(a,e,i,n,o,c.boundingLength,c.pxSign,h,r,c),G_(t,c.symbolScale,u,r,c);var f=c.symbolSize,d=(0,Tt.hV)(t.get("symbolOffset"),f);return H_(t,f,i,n,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,r,c),c}function z_(a,e,t,r,i){var n=r.valueDim,o=a.get("symbolBoundingData"),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),h;if(p.isArray(o)){var v=[rs(s,o[0])-l,rs(s,o[1])-l];v[1]0?1:-1}function rs(a,e){return a.toGlobalCoord(a.dataToCoord(a.scale.parse(e)))}function B_(a,e,t,r,i,n,o,s,l,u){var h=l.valueDim,v=l.categoryDim,c=Math.abs(t[v.wh]),f=a.getItemVisual(e,"symbolSize"),d;p.isArray(f)?d=f.slice():f==null?d=["100%","100%"]:d=[f,f],d[v.index]=(0,k.lo)(d[v.index],c),d[h.index]=(0,k.lo)(d[h.index],r?c:Math.abs(n)),u.symbolSize=d;var g=u.symbolScale=[d[0]/s,d[1]/s];g[h.index]*=(l.isHorizontal?-1:1)*o}function G_(a,e,t,r,i){var n=a.get(k_)||0;n&&(es.attr({scaleX:e[0],scaleY:e[1],rotation:t}),es.updateTransform(),n/=es.getLineScale(),n*=e[r.valueDim.index]),i.valueLineWidth=n||0}function H_(a,e,t,r,i,n,o,s,l,u,h,v){var c=h.categoryDim,f=h.valueDim,d=v.pxSign,g=Math.max(e[f.index]+s,0),y=g;if(r){var m=Math.abs(l),S=p.retrieve(a.get("symbolMargin"),"15%")+"",x=!1;S.lastIndexOf("!")===S.length-1&&(x=!0,S=S.slice(0,S.length-1));var b=(0,k.lo)(S,e[f.index]),_=Math.max(g+b*2,0),A=x?0:b*2,w=(0,k.kf)(r),C=w?r:kc((m+A)/_),T=m-C*g;b=T/2/(x?C:Math.max(C-1,1)),_=g+b*2,A=x?0:b*2,!w&&r!=="fixed"&&(C=u?kc((Math.abs(u)+A)/_):0),y=C*_-A,v.repeatTimes=C,v.symbolMargin=b}var I=d*(y/2),D=v.pathPosition=[];D[c.index]=t[c.wh]/2,D[f.index]=o==="start"?I:o==="end"?l-I:l/2,n&&(D[0]+=n[0],D[1]+=n[1]);var L=v.bundlePosition=[];L[c.index]=t[c.xy],L[f.index]=t[f.xy];var M=v.barRectShape=p.extend({},t);M[f.wh]=d*Math.max(Math.abs(t[f.wh]),Math.abs(D[f.index]+I)),M[c.wh]=t[c.wh];var P=v.clipShape={};P[c.xy]=-t[c.xy],P[c.wh]=h.ecSize[c.wh],P[f.xy]=0,P[f.wh]=t[f.wh]}function Tc(a){var e=a.symbolPatternSize,t=(0,Tt.v5)(a.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function Ic(a,e,t,r){var i=a.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,h=0,v=n[e.valueDim.index]+o+t.symbolMargin*2;for(as(a,function(g){g.__pictorialAnimationIndex=h,g.__pictorialRepeatTimes=u,h0:m<0)&&(S=u-1-g),y[l.index]=v*(S-u/2+.5)+s[l.index],{x:y[0],y:y[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function Dc(a,e,t,r){var i=a.__pictorialBundle,n=a.__pictorialMainPath;n?Xr(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,r):(n=a.__pictorialMainPath=Tc(t),i.add(n),Xr(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,r))}function Lc(a,e,t){var r=p.extend({},e.barRectShape),i=a.__pictorialBarRect;i?Xr(i,null,{shape:r},e,t):(i=a.__pictorialBarRect=new Dt.A({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,a.add(i))}function Mc(a,e,t,r){if(t.symbolClip){var i=a.__pictorialClipPath,n=p.extend({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)Q.oi(i,{shape:n},s,l);else{n[o.wh]=0,i=new Dt.A({shape:n}),a.__pictorialBundle.setClipPath(i),a.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],tt[r?"updateProps":"initProps"](i,{shape:u},s,l)}}}function Pc(a,e){var t=a.getItemModel(e);return t.getAnimationDelayParams=F_,t.isAnimationEnabled=W_,t}function F_(a){return{index:a.__pictorialAnimationIndex,count:a.__pictorialRepeatTimes}}function W_(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Rc(a,e,t,r){var i=new it.A,n=new it.A;return i.add(n),i.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?Ic(i,e,t):Dc(i,e,t),Lc(i,t,r),Mc(i,e,t,r),i.__pictorialShapeStr=Vc(a,t),i.__pictorialSymbolMeta=t,i}function Y_(a,e,t){var r=t.animationModel,i=t.dataIndex,n=a.__pictorialBundle;Q.oi(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},r,i),t.symbolRepeat?Ic(a,e,t,!0):Dc(a,e,t,!0),Lc(a,t,!0),Mc(a,e,t,!0)}function Ec(a,e,t,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var n=[];as(r,function(o){n.push(o)}),r.__pictorialMainPath&&n.push(r.__pictorialMainPath),r.__pictorialClipPath&&(t=null),p.each(n,function(o){Q.Nz(o,{scaleX:0,scaleY:0},t,e,function(){r.parent&&r.parent.remove(r)})}),a.setItemGraphicEl(e,null)}function Vc(a,e){return[a.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function as(a,e,t){p.each(a.__pictorialBundle.children(),function(r){r!==a.__pictorialBarRect&&e.call(t,r)})}function Xr(a,e,t,r,i,n){e&&a.attr(e),r.symbolClip&&!i?t&&a.attr(t):t&&tt[i?"updateProps":"initProps"](a,t,r.animationModel,r.dataIndex,n)}function Oc(a,e,t){var r=t.dataIndex,i=t.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),h=n.get("focus"),v=n.get("blurScope"),c=n.get("scale");as(a,function(g){if(g instanceof ue.Ay){var y=g.style;g.useStyle(p.extend({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},t.style))}else g.useStyle(t.style);var m=g.ensureState("emphasis");m.style=o,c&&(m.scaleX=g.scaleX*1.1,m.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],d=a.__pictorialBarRect;d.ignoreClip=!0,(0,q.qM)(d,(0,q.lx)(i),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:kr(e.seriesModel.getData(),r),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),(0,U.Lm)(a,h,v,n.get("disabled"))}function kc(a){var e=Math.round(a);return Math.abs(a-e)<1e-4?e:Math.ceil(a)}var Z_=N_,U_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,a.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=(0,Ne.G_)(oi.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(oi),X_=U_;function j_(a){a.registerChartView(Z_),a.registerSeriesModel(X_),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,(0,p.curry)(ga.Zp,"pictorialBar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,(0,ga.KF)("pictorialBar"))}var K_=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),h=u.rect,v=u.boundaryGap;s.x=0,s.y=h.y+v[0];function c(y){return y.name}var f=new tr.A(this._layersSeries||[],l,c,c),d=[];f.add((0,p.bind)(g,this,"add")).update((0,p.bind)(g,this,"update")).remove((0,p.bind)(g,this,"remove")).execute();function g(y,m,S){var x=o._layers;if(y==="remove"){s.remove(x[m]);return}for(var b=[],_=[],A,w=l[m].indices,C=0;Cn&&(n=s),r.push(s)}for(var u=0;un&&(n=v)}return{y0:i,max:n}}function rA(a){a.registerChartView(J_),a.registerSeriesModel(q_),a.registerLayout(tA),a.registerProcessor(ya("themeRiver"))}var Gi=E(41589),aA=2,iA=4,nA=function(a){(0,O.C6)(e,a);function e(t,r,i,n){var o=a.call(this)||this;o.z2=aA,o.textConfig={inside:!0},(0,ft.z)(o).seriesIndex=r.seriesIndex;var s=new _t.Ay({z2:iA,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,r,i,n),o}return e.prototype.updateData=function(t,r,i,n,o){this.node=r,r.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;(0,ft.z)(s).dataIndex=r.dataIndex;var l=r.getModel(),u=l.getModel("emphasis"),h=r.getLayout(),v=p.extend({},h);v.label=null;var c=r.getVisual("style");c.lineJoin="bevel";var f=r.getVisual("decal");f&&(c.decal=(0,Ai.w)(f,o));var d=mr(l.getModel("itemStyle"),v,!0);p.extend(v,d),p.each(U.BV,function(S){var x=s.ensureState(S),b=l.getModel([S,"itemStyle"]);x.style=b.getItemStyle();var _=mr(b,v);_&&(x.shape=_)}),t?(s.setShape(v),s.shape.r=h.r0,Q.LW(s,{shape:{r:h.r}},i,r.dataIndex)):(Q.oi(s,{shape:v},i),(0,Q.ap)(s)),s.useStyle(c),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var y=u.get("focus"),m=y==="ancestor"?r.getAncestorsIndices():y==="descendant"?r.getDescendantIndices():y;(0,U.Lm)(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),h=Math.sin(l),v=this,c=v.getTextContent(),f=this.node.dataIndex,d=n.get("minAngle")/180*Math.PI,g=n.get("show")&&!(d!=null&&Math.abs(s)P&&!(0,k.dh)(V-P)&&V0?(o.virtualPiece?o.virtualPiece.updateData(!1,S,t,r,i):(o.virtualPiece=new zc(S,t,r,i),h.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(x.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(r){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===r.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var h=l.get("target",!0)||"_blank";(0,qt.JW)(u,h)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ns,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var i=r.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e}(Nt.A),uA=lA,hA=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,r){var i={name:t.name,children:t.data};Gc(i);var n=this._levelModels=p.map(t.levels||[],function(l){return new Xt.A(l,this,r)},this),o=ro.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,h){var v=o.getNodeByDataIndex(h),c=n[v.depth];return c&&(u.parentModel=c),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=Ti(i,this),r},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 r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Uh(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}(Ot.A);function Gc(a){var e=0;p.each(a.children,function(r){Gc(r);var i=r.value;p.isArray(i)&&(i=i[0]),e+=i});var t=a.value;p.isArray(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),p.isArray(a.value)?a.value[0]=t:a.value=t}var vA=hA,Hc=Math.PI/180;function cA(a,e,t){e.eachSeriesByType(a,function(r){var i=r.get("center"),n=r.get("radius");p.isArray(n)||(n=[0,n]),p.isArray(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=(0,k.lo)(i[0],o),h=(0,k.lo)(i[1],s),v=(0,k.lo)(n[0],l/2),c=(0,k.lo)(n[1],l/2),f=-r.get("startAngle")*Hc,d=r.get("minAngle")*Hc,g=r.getData().tree.root,y=r.getViewRoot(),m=y.depth,S=r.get("sort");S!=null&&Fc(y,S);var x=0;p.each(y.children,function(V){!isNaN(V.getValue())&&x++});var b=y.getValue(),_=Math.PI/(b||x)*2,A=y.depth>0,w=y.height-(A?-1:1),C=(c-v)/(w||1),T=r.get("clockwise"),I=r.get("stillShowZeroSum"),D=T?1:-1,L=function(V,B){if(V){var z=B;if(V!==g){var W=V.getValue(),$=b===0&&I?_:W*_;$1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&(0,p.isString)(s)&&(s=(0,Wt.lift)(s,(r.depth-1)/(n-1)*.5)),s}a.eachSeriesByType("sunburst",function(r){var i=r.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,r,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");(0,p.extend)(u,l)})})}function dA(a){a.registerChartView(uA),a.registerSeriesModel(vA),a.registerLayout((0,p.curry)(cA,"sunburst")),a.registerProcessor((0,p.curry)(ya,"sunburst")),a.registerVisual(pA),sA(a)}var Wc={color:"fill",borderColor:"stroke"},gA={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ue=(0,J.$r)(),yA=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.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,r){return(0,Fe.A)(null,this)},e.prototype.getDataParams=function(t,r,i){var n=a.prototype.getDataParams.call(this,t,r);return i&&(n.info=Ue(i).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ot.A),mA=yA;function xA(a,e){return e=e||[0,0],p.map(["x","y"],function(t,r){var i=this.getAxis(t),n=e[r],o=a[r]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function SA(a){var e=a.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:p.bind(xA,a)}}}function bA(a,e){return e=e||[0,0],p.map([0,1],function(t){var r=e[t],i=a[t]/2,n=[],o=[];return n[t]=r-i,o[t]=r+i,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function _A(a){var e=a.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:a.getZoom()},api:{coord:function(t){return a.dataToPoint(t)},size:p.bind(bA,a)}}}function AA(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,i=(a instanceof Array?a[0]:a)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(r-i)-t.dataToCoord(r+i))}function wA(a){var e=a.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:(0,p.bind)(AA,a)}}}function CA(a,e){return e=e||[0,0],p.map(["Radius","Angle"],function(t,r){var i="get"+t+"Axis",n=this[i](),o=e[r],s=a[r]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function TA(a){var e=a.getRadiusAxis(),t=a.getAngleAxis(),r=e.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:r[1],r0:r[0]},api:{coord:function(i){var n=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=a.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:p.bind(CA,a)}}}function IA(a){var e=a.getRect(),t=a.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:a.getCellWidth(),cellHeight:a.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(r,i){return a.dataToPoint(r,i)}}}}var YM={};function Yc(a,e,t,r){return a&&(a.legacy||a.legacy!==!1&&!t&&!r&&e!=="tspan"&&(e==="text"||(0,p.hasOwn)(a,"text")))}function Zc(a,e,t){var r=a,i,n,o;if(e==="text")o=r;else{o={},(0,p.hasOwn)(r,"text")&&(o.text=r.text),(0,p.hasOwn)(r,"rich")&&(o.rich=r.rich),(0,p.hasOwn)(r,"textFill")&&(o.fill=r.textFill),(0,p.hasOwn)(r,"textStroke")&&(o.stroke=r.textStroke),(0,p.hasOwn)(r,"fontFamily")&&(o.fontFamily=r.fontFamily),(0,p.hasOwn)(r,"fontSize")&&(o.fontSize=r.fontSize),(0,p.hasOwn)(r,"fontStyle")&&(o.fontStyle=r.fontStyle),(0,p.hasOwn)(r,"fontWeight")&&(o.fontWeight=r.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=(0,p.hasOwn)(r,"textPosition");t?i.position=s?r.textPosition:"inside":s&&(i.position=r.textPosition),(0,p.hasOwn)(r,"textPosition")&&(i.position=r.textPosition),(0,p.hasOwn)(r,"textOffset")&&(i.offset=r.textOffset),(0,p.hasOwn)(r,"textRotation")&&(i.rotation=r.textRotation),(0,p.hasOwn)(r,"textDistance")&&(i.distance=r.textDistance)}return Uc(o,a),(0,p.each)(o.rich,function(l){Uc(l,l)}),{textConfig:i,textContent:n}}function Uc(a,e){e&&(e.font=e.textFont||e.font,(0,p.hasOwn)(e,"textStrokeWidth")&&(a.lineWidth=e.textStrokeWidth),(0,p.hasOwn)(e,"textAlign")&&(a.align=e.textAlign),(0,p.hasOwn)(e,"textVerticalAlign")&&(a.verticalAlign=e.textVerticalAlign),(0,p.hasOwn)(e,"textLineHeight")&&(a.lineHeight=e.textLineHeight),(0,p.hasOwn)(e,"textWidth")&&(a.width=e.textWidth),(0,p.hasOwn)(e,"textHeight")&&(a.height=e.textHeight),(0,p.hasOwn)(e,"textBackgroundColor")&&(a.backgroundColor=e.textBackgroundColor),(0,p.hasOwn)(e,"textPadding")&&(a.padding=e.textPadding),(0,p.hasOwn)(e,"textBorderColor")&&(a.borderColor=e.textBorderColor),(0,p.hasOwn)(e,"textBorderWidth")&&(a.borderWidth=e.textBorderWidth),(0,p.hasOwn)(e,"textBorderRadius")&&(a.borderRadius=e.textBorderRadius),(0,p.hasOwn)(e,"textBoxShadowColor")&&(a.shadowColor=e.textBoxShadowColor),(0,p.hasOwn)(e,"textBoxShadowBlur")&&(a.shadowBlur=e.textBoxShadowBlur),(0,p.hasOwn)(e,"textBoxShadowOffsetX")&&(a.shadowOffsetX=e.textBoxShadowOffsetX),(0,p.hasOwn)(e,"textBoxShadowOffsetY")&&(a.shadowOffsetY=e.textBoxShadowOffsetY))}function Xc(a,e,t){var r=a;r.textPosition=r.textPosition||t.position||"inside",t.offset!=null&&(r.textOffset=t.offset),t.rotation!=null&&(r.textRotation=t.rotation),t.distance!=null&&(r.textDistance=t.distance);var i=r.textPosition.indexOf("inside")>=0,n=a.fill||"#000";jc(r,e);var o=r.textFill==null;return i?o&&(r.textFill=t.insideFill||"#fff",!r.textStroke&&t.insideStroke&&(r.textStroke=t.insideStroke),!r.textStroke&&(r.textStroke=n),r.textStrokeWidth==null&&(r.textStrokeWidth=2)):(o&&(r.textFill=a.fill||t.outsideFill||"#000"),!r.textStroke&&t.outsideStroke&&(r.textStroke=t.outsideStroke)),r.text=e.text,r.rich=e.rich,(0,p.each)(e.rich,function(s){jc(s,s)}),r}function jc(a,e){e&&((0,p.hasOwn)(e,"fill")&&(a.textFill=e.fill),(0,p.hasOwn)(e,"stroke")&&(a.textStroke=e.fill),(0,p.hasOwn)(e,"lineWidth")&&(a.textStrokeWidth=e.lineWidth),(0,p.hasOwn)(e,"font")&&(a.font=e.font),(0,p.hasOwn)(e,"fontStyle")&&(a.fontStyle=e.fontStyle),(0,p.hasOwn)(e,"fontWeight")&&(a.fontWeight=e.fontWeight),(0,p.hasOwn)(e,"fontSize")&&(a.fontSize=e.fontSize),(0,p.hasOwn)(e,"fontFamily")&&(a.fontFamily=e.fontFamily),(0,p.hasOwn)(e,"align")&&(a.textAlign=e.align),(0,p.hasOwn)(e,"verticalAlign")&&(a.textVerticalAlign=e.verticalAlign),(0,p.hasOwn)(e,"lineHeight")&&(a.textLineHeight=e.lineHeight),(0,p.hasOwn)(e,"width")&&(a.textWidth=e.width),(0,p.hasOwn)(e,"height")&&(a.textHeight=e.height),(0,p.hasOwn)(e,"backgroundColor")&&(a.textBackgroundColor=e.backgroundColor),(0,p.hasOwn)(e,"padding")&&(a.textPadding=e.padding),(0,p.hasOwn)(e,"borderColor")&&(a.textBorderColor=e.borderColor),(0,p.hasOwn)(e,"borderWidth")&&(a.textBorderWidth=e.borderWidth),(0,p.hasOwn)(e,"borderRadius")&&(a.textBorderRadius=e.borderRadius),(0,p.hasOwn)(e,"shadowColor")&&(a.textBoxShadowColor=e.shadowColor),(0,p.hasOwn)(e,"shadowBlur")&&(a.textBoxShadowBlur=e.shadowBlur),(0,p.hasOwn)(e,"shadowOffsetX")&&(a.textBoxShadowOffsetX=e.shadowOffsetX),(0,p.hasOwn)(e,"shadowOffsetY")&&(a.textBoxShadowOffsetY=e.shadowOffsetY),(0,p.hasOwn)(e,"textShadowColor")&&(a.textShadowColor=e.textShadowColor),(0,p.hasOwn)(e,"textShadowBlur")&&(a.textShadowBlur=e.textShadowBlur),(0,p.hasOwn)(e,"textShadowOffsetX")&&(a.textShadowOffsetX=e.textShadowOffsetX),(0,p.hasOwn)(e,"textShadowOffsetY")&&(a.textShadowOffsetY=e.textShadowOffsetY))}function ZM(a,e){if(0)var t}var DA=E(21756),Kc={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},$c=(0,p.keys)(Kc),UM=(0,p.reduce)(Me.Wx,function(a,e){return a[e]=1,a},{}),XM=Me.Wx.join(", "),Hi=["","style","shape","extra"],jr=(0,J.$r)();function os(a,e,t,r,i){var n=a+"Animation",o=(0,Q.Jw)(a,r,i)||{},s=jr(e).userDuring;return o.duration>0&&(o.during=s?(0,p.bind)(EA,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=a),(0,p.extend)(o,t[n]),o}function Fi(a,e,t,r){r=r||{};var i=r.dataIndex,n=r.isInit,o=r.clearStyle,s=t.isAnimationEnabled(),l=jr(a),u=e.style;l.userDuring=e.during;var h={},v={};if(OA(a,e,v),qc("shape",e,v),qc("extra",e,v),!n&&s&&(VA(a,e,h),Qc("shape",a,e,h),Qc("extra",a,e,h),kA(a,e,u,h)),v.style=u,LA(a,v,o),PA(a,e),s)if(n){var c={};(0,p.each)(Hi,function(d){var g=d?e[d]:e;g&&g.enterFrom&&(d&&(c[d]=c[d]||{}),(0,p.extend)(d?c[d]:c,g.enterFrom))});var f=os("enter",a,e,t,i);f.duration>0&&a.animateFrom(c,f)}else MA(a,e,i||0,t,h);Jc(a,e),u?a.dirty():a.markRedraw()}function Jc(a,e){for(var t=jr(a).leaveToProps,r=0;r0&&a.animateFrom(i,n)}}function PA(a,e){(0,p.hasOwn)(e,"silent")&&(a.silent=e.silent),(0,p.hasOwn)(e,"ignore")&&(a.ignore=e.ignore),a instanceof Ar.Ay&&(0,p.hasOwn)(e,"invisible")&&(a.invisible=e.invisible),a instanceof Vt.Ay&&(0,p.hasOwn)(e,"autoBatch")&&(a.autoBatch=e.autoBatch)}var ze={},RA={setTransform:function(a,e){return ze.el[a]=e,this},getTransform:function(a){return ze.el[a]},setShape:function(a,e){var t=ze.el,r=t.shape||(t.shape={});return r[a]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(a){var e=ze.el.shape;if(e)return e[a]},setStyle:function(a,e){var t=ze.el,r=t.style;return r&&(r[a]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(a){var e=ze.el.style;if(e)return e[a]},setExtra:function(a,e){var t=ze.el.extra||(ze.el.extra={});return t[a]=e,this},getExtra:function(a){var e=ze.el.extra;if(e)return e[a]}};function jM(a){}function EA(){var a=this,e=a.el;if(e){var t=jr(e).userDuring,r=a.userDuring;if(t!==r){a.el=a.userDuring=null;return}ze.el=e,r(RA)}}function Qc(a,e,t,r){var i=t[a];if(i){var n=e[a],o;if(n){var s=t.transition,l=i.transition;if(l)if(!o&&(o=r[a]={}),Mr(l))(0,p.extend)(o,n);else for(var u=(0,J.qB)(l),h=0;h=0){!o&&(o=r[a]={});for(var f=(0,p.keys)(n),h=0;h=0)){var c=a.getAnimationStyleProps(),f=c?c.style:null;if(f){!n&&(n=r.style={});for(var d=(0,p.keys)(t),u=0;u=0?e.getStore().get(B,R):void 0}var z=e.get(V.name,R),W=V&&V.ordinalMeta;return W?W.categories[z]:z}function A(P,R){R==null&&(R=u);var V=e.getItemVisual(R,"style"),B=V&&V.fill,z=V&&V.opacity,W=S(R,ar).getItemStyle();B!=null&&(W.fill=B),z!=null&&(W.opacity=z);var $={inheritColor:(0,p.isString)(B)?B:"#000"},K=x(R,ar),et=q.VB(K,null,$,!1,!0);et.text=K.getShallow("show")?(0,p.retrieve2)(a.getFormattedLabel(R,ar),kr(e,R)):null;var lt=q.sD(K,$,!1);return T(P,W),W=Xc(W,et,lt),P&&C(W,P),W.legacy=!0,W}function w(P,R){R==null&&(R=u);var V=S(R,Xe).getItemStyle(),B=x(R,Xe),z=q.VB(B,null,null,!0,!0);z.text=B.getShallow("show")?(0,p.retrieve3)(a.getFormattedLabel(R,Xe),a.getFormattedLabel(R,ar),kr(e,R)):null;var W=q.sD(B,null,!0);return T(P,V),V=Xc(V,z,W),P&&C(V,P),V.legacy=!0,V}function C(P,R){for(var V in R)(0,p.hasOwn)(R,V)&&(P[V]=R[V])}function T(P,R){P&&(P.textFill&&(R.textFill=P.textFill),P.textPosition&&(R.textPosition=P.textPosition))}function I(P,R){if(R==null&&(R=u),(0,p.hasOwn)(Wc,P)){var V=e.getItemVisual(R,"style");return V?V[Wc[P]]:null}if((0,p.hasOwn)(gA,P))return e.getItemVisual(R,P)}function D(P){if(n.type==="cartesian2d"){var R=n.getBaseAxis();return(0,ga.DL)((0,p.defaults)({axis:R},P))}}function L(){return t.getCurrentSeriesIndices()}function M(P){return q.c8(P,t)}}function XA(a){var e={};return(0,p.each)(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var i=r.coordDim,n=e[i]=e[i]||[];n[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function ds(a,e,t,r,i,n,o){if(!r){n.remove(e);return}var s=gs(a,e,t,r,i,n);return s&&o.setItemGraphicEl(t,s),s&&(0,U.Lm)(s,r.focus,r.blurScope,r.emphasisDisabled),s}function gs(a,e,t,r,i,n){var o=-1,s=e;e&&nf(e,r,i)&&(o=(0,p.indexOf)(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=fs(r),s&&FA(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Ae.normal.cfg=Ae.normal.conOpt=Ae.emphasis.cfg=Ae.emphasis.conOpt=Ae.blur.cfg=Ae.blur.conOpt=Ae.select.cfg=Ae.select.conOpt=null,Ae.isLegacy=!1,KA(u,t,r,i,l,Ae),jA(u,t,r,i,l),ps(a,u,t,r,Ae,i,l),(0,p.hasOwn)(r,"info")&&(Ue(u).info=r.info);for(var h=0;h=0?n.replaceAt(u,o):n.add(u),u}function nf(a,e,t){var r=Ue(a),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i==="path"&&tw(n)&&uf(n)!==r.customPathData||i==="image"&&(0,p.hasOwn)(o,"image")&&o.image!==r.customImagePath}function jA(a,e,t,r,i){var n=t.clipPath;if(n===!1)a&&a.getClipPath()&&a.removeClipPath();else if(n){var o=a.getClipPath();o&&nf(o,n,r)&&(o=null),o||(o=fs(n),a.setClipPath(o)),ps(null,o,e,n,null,r,i)}}function KA(a,e,t,r,i,n){if(!a.isGroup){of(t,null,n),of(t,Xe,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var h=a.getTextContent();if(o===!1)h&&a.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},h?h.clearStates():(h=fs(o),a.setTextContent(h)),ps(null,h,e,o,null,r,i);for(var v=o&&o.style,c=0;c=h;f--){var d=e.childAt(f);JA(e,d,i)}}}function JA(a,e,t){e&&Wi(e,Ue(a).option,t)}function QA(a){new tr.A(a.oldChildren,a.newChildren,sf,sf,a).add(lf).update(lf).remove(qA).execute()}function sf(a,e){var t=a&&a.name;return t!=null?t:GA+e}function lf(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,i=e!=null?t.oldChildren[e]:null;gs(t.api,i,t.dataIndex,r,t.seriesModel,t.group)}function qA(a){var e=this.context,t=e.oldChildren[a];t&&Wi(t,Ue(t).option,e.seriesModel)}function uf(a){return a&&(a.pathData||a.d)}function tw(a){return a&&((0,p.hasOwn)(a,"pathData")||(0,p.hasOwn)(a,"d"))}function ew(a){a.registerChartView(YA),a.registerSeriesModel(mA)}var Pr=(0,J.$r)(),hf=p.clone,ms=p.bind,rw=function(){function a(){this._dragging=!1,this.animationThreshold=15}return a.prototype.render=function(e,t,r,i){var n=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=r,!(!i&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,n,e,t,r);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=h;var v=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new it.A,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),r.getZr().add(s);else{var c=p.curry(vf,t,v);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,t)}pf(s,t,!0),this._renderHandle(n)}},a.prototype.remove=function(e){this.clear(e)},a.prototype.dispose=function(e){this.clear(e)},a.prototype.determineAnimation=function(e,t){var r=t.get("animation"),i=e.axis,n=i.type==="category",o=t.get("snap");if(!o&&!n)return!1;if(r==="auto"||r==null){var s=this.animationThreshold;if(n&&i.getBandWidth()>s)return!0;if(o){var l=Bn(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return r===!0},a.prototype.makeElOption=function(e,t,r,i,n){},a.prototype.createPointerEl=function(e,t,r,i){var n=t.pointer;if(n){var o=Pr(e).pointerEl=new tt[n.type](hf(t.pointer));e.add(o)}},a.prototype.createLabelEl=function(e,t,r,i){if(t.label){var n=Pr(e).labelEl=new _t.Ay(hf(t.label));e.add(n),ff(n,i)}},a.prototype.updatePointerEl=function(e,t,r){var i=Pr(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),r(i,{shape:t.pointer.shape}))},a.prototype.updateLabelEl=function(e,t,r,i){var n=Pr(e).labelEl;n&&(n.setStyle(t.label.style),r(n,{x:t.label.x,y:t.label.y}),ff(n,i))},a.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,r=this._api.getZr(),i=this._handle,n=t.getModel("handle"),o=t.get("status");if(!n.get("show")||!o||o==="hide"){i&&r.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=tt.createIcon(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){pe.ds(u.event)},onmousedown:ms(this._onHandleDragMove,this,0,0),drift:ms(this._onHandleDragMove,this),ondragend:ms(this._onHandleDragEnd,this)}),r.add(i)),pf(i,t,!1),i.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");p.isArray(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,me.N(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},a.prototype._moveHandleToValue=function(e,t){vf(this._axisPointerModel,!t&&this._moveAnimation,this._handle,xs(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},a.prototype._onHandleDragMove=function(e,t){var r=this._handle;if(r){this._dragging=!0;var i=this.updateHandleTransform(xs(r),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,r.stopAnimation(),r.attr(xs(i)),Pr(r).lastProp=null,this._doDispatchAxisPointer()}},a.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},a.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},a.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),r=this._group,i=this._handle;t&&r&&(this._lastGraphicKey=null,r&&t.remove(r),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),me.IU(this,"_doDispatchAxisPointer")},a.prototype.doClear=function(){},a.prototype.buildLabel=function(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}},a}();function vf(a,e,t,r){cf(Pr(t).lastProp,r)||(Pr(t).lastProp=r,e?Q.oi(t,r,a):(t.stopAnimation(),t.attr(r)))}function cf(a,e){if(p.isObject(a)&&p.isObject(e)){var t=!0;return p.each(e,function(r,i){t=t&&cf(a[i],r)}),!!t}else return a===e}function ff(a,e){a[e.get(["label","show"])?"show":"hide"]()}function xs(a){return{x:a.x||0,y:a.y||0,rotation:a.rotation||0}}function pf(a,e,t){var r=e.get("z"),i=e.get("zlevel");a&&a.traverse(function(n){n.type!=="group"&&(r!=null&&(n.z=r),i!=null&&(n.zlevel=i),n.silent=t)})}var Ss=rw;function bs(a){var e=a.get("type"),t=a.getModel(e+"Style"),r;return e==="line"?(r=t.getLineStyle(),r.fill=null):e==="shadow"&&(r=t.getAreaStyle(),r.stroke=null),r}function df(a,e,t,r,i){var n=t.get("value"),o=gf(n,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=qt.QX(s.get("padding")||0),u=s.getFont(),h=ce.NO(o,u),v=i.position,c=h.width+l[1]+l[3],f=h.height+l[0]+l[2],d=i.align;d==="right"&&(v[0]-=c),d==="center"&&(v[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(v[1]-=f),g==="middle"&&(v[1]-=f/2),aw(v,c,f,r);var y=s.get("backgroundColor");(!y||y==="auto")&&(y=e.get(["axisLine","lineStyle","color"])),a.label={x:v[0],y:v[1],style:(0,q.VB)(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:y}),z2:10}}function aw(a,e,t,r){var i=r.getWidth(),n=r.getHeight();a[0]=Math.min(a[0]+e,i)-e,a[1]=Math.min(a[1]+t,n)-t,a[0]=Math.max(a[0],0),a[1]=Math.max(a[1],0)}function gf(a,e,t,r,i){a=e.scale.parse(a);var n=e.scale.getLabel({value:a},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ut.Dt(e,{value:a}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};p.each(r,function(l){var u=t.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,v=u&&u.getDataParams(h);v&&s.seriesData.push(v)}),p.isString(o)?n=o.replace("{value}",n):p.isFunction(o)&&(n=o(s))}return n}function _s(a,e,t){var r=Lt.create();return Lt.rotate(r,r,t.rotation),Lt.translate(r,r,t.position),tt.applyTransform([a.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],r)}function yf(a,e,t,r,i,n){var o=We.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),df(e,r,i,n,{position:_s(r.axis,a,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function As(a,e,t){return t=t||0,{x1:a[t],y1:a[1-t],x2:e[t],y2:e[1-t]}}function mf(a,e,t){return t=t||0,{x:a[t],y:a[1-t],width:e[t],height:e[1-t]}}function xf(a,e,t,r,i,n){return{cx:a,cy:e,r0:t,r,startAngle:i,endAngle:n,clockwise:!0}}var iw=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis,l=s.grid,u=n.get("type"),h=Sf(l,s).getOtherAxis(s).getGlobalExtent(),v=s.toGlobalCoord(s.dataToCoord(r,!0));if(u&&u!=="none"){var c=bs(n),f=nw[u](s,v,h);f.style=c,t.graphicKey=f.type,t.pointer=f}var d=On(l.model,i);yf(r,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,r,i){var n=On(r.axis.grid.model,r,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=_s(r.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,n){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Sf(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,v=[t.x,t.y];v[h]+=r[h],v[h]=Math.min(l[1],v[h]),v[h]=Math.max(l[0],v[h]);var c=(u[1]+u[0])/2,f=[c,c];f[h]=v[h];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:f,tooltipOption:d[h]}},e}(Ss);function Sf(a,e){var t={};return t[e.dim+"AxisIndex"]=e.index,a.getCartesian(t)}var nw={line:function(a,e,t){var r=As([e,t[0]],[e,t[1]],bf(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=Math.max(1,a.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:mf([e-r/2,t[0]],[r,i],bf(a))}}};function bf(a){return a.dim==="x"?0:1}var ow=iw,sw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Ht.A),lw=sw,je=(0,J.$r)(),uw=p.each;function _f(a,e,t){if(!Kt.A.node){var r=e.getZr();je(r).records||(je(r).records={}),hw(r,e);var i=je(r).records[a]||(je(r).records[a]={});i.handler=t}}function hw(a,e){if(je(a).initialized)return;je(a).initialized=!0,t("click",p.curry(Af,"click")),t("mousemove",p.curry(Af,"mousemove")),t("globalout",cw);function t(r,i){a.on(r,function(n){var o=fw(e);uw(je(a).records,function(s){s&&i(s,n,o.dispatchAction)}),vw(o.pendings,e)})}}function vw(a,e){var t=a.showTip.length,r=a.hideTip.length,i;t?i=a.showTip[t-1]:r&&(i=a.hideTip[r-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function cw(a,e,t){a.handler("leave",null,t)}function Af(a,e,t,r){e.handler(a,t,r)}function fw(a){var e={showTip:[],hideTip:[]},t=function(r){var i=e[r.type];i?i.push(r):(r.dispatchAction=t,a.dispatchAction(r))};return{dispatchAction:t,pendings:e}}function ws(a,e){if(!Kt.A.node){var t=e.getZr(),r=(je(t).records||{})[a];r&&(je(t).records[a]=null)}}var pw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=r.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";_f("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,r){ws("axisPointer",r)},e.prototype.dispose=function(t,r){ws("axisPointer",r)},e.type="axisPointer",e}(Yt.A),dw=pw;function wf(a,e){var t=[],r=a.seriesIndex,i;if(r==null||!(i=e.getSeriesByIndex(r)))return{point:[]};var n=i.getData(),o=J.le(n,a);if(o==null||o<0||p.isArray(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(a.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),v=h.dim,c=u.dim,f=v==="x"||v==="radius"?1:0,d=n.mapDimension(c),g=[];g[f]=n.get(d,o),g[1-f]=n.get(n.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(g)||[]}else t=l.dataToPoint(n.getValues(p.map(l.dimensions,function(m){return n.mapDimension(m)}),o))||[];else if(s){var y=s.getBoundingRect().clone();y.applyTransform(s.transform),t=[y.x+y.width/2,y.y+y.height/2]}return{point:t,el:s}}var Cf=(0,J.$r)();function gw(a,e,t){var r=a.currTrigger,i=[a.x,a.y],n=a,o=a.dispatchAction||(0,p.bind)(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Ui(i)&&(i=wf({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=Ui(i),u=n.axesInfo,h=s.axesInfo,v=r==="leave"||Ui(i),c={},f={},d={list:[],map:{}},g={showPointer:(0,p.curry)(mw,f),showTooltip:(0,p.curry)(xw,d)};(0,p.each)(s.coordSysMap,function(m,S){var x=l||m.containPoint(i);(0,p.each)(s.coordSysAxesInfo[S],function(b,_){var A=b.axis,w=Aw(u,b);if(!v&&x&&(!u||w)){var C=w&&w.value;C==null&&!l&&(C=A.pointToData(i)),C!=null&&Tf(b,C,g,!1,c)}})});var y={};return(0,p.each)(h,function(m,S){var x=m.linkGroup;x&&!f[S]&&(0,p.each)(x.axesInfo,function(b,_){var A=f[_];if(b!==m&&A){var w=A.value;x.mapper&&(w=m.axis.scale.parse(x.mapper(w,If(b),If(m)))),y[m.key]=w}})}),(0,p.each)(y,function(m,S){Tf(h[S],m,g,!0,c)}),Sw(f,h,c),bw(d,i,a,o),_w(h,o,t),c}}function Tf(a,e,t,r,i){var n=a.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!a.involveSeries){t.showPointer(a,e);return}var o=yw(e,a),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&(0,p.extend)(i,s[0]),!r&&a.snap&&n.containData(l)&&l!=null&&(e=l),t.showPointer(a,e,s),t.showTooltip(a,o,l)}}function yw(a,e){var t=e.axis,r=t.dim,i=a,n=[],o=Number.MAX_VALUE,s=-1;return(0,p.each)(e.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(r),v,c;if(l.getAxisTooltipData){var f=l.getAxisTooltipData(h,a,t);c=f.dataIndices,v=f.nestestValue}else{if(c=l.getData().indicesOfNearest(h[0],a,t.type==="category"?.5:null),!c.length)return;v=l.getData().get(h[0],c[0])}if(!(v==null||!isFinite(v))){var d=a-v,g=Math.abs(d);g<=o&&((g=0&&s<0)&&(o=g,s=d,i=v,n.length=0),(0,p.each)(c,function(y){n.push({seriesIndex:l.seriesIndex,dataIndexInside:y,dataIndex:l.getData().getRawIndex(y)})}))}}),{payloadBatch:n,snapToValue:i}}function mw(a,e,t,r){a[e.key]={value:t,payloadBatch:r}}function xw(a,e,t,r){var i=t.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Sa(l),h=a.map[u];h||(h=a.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},a.list.push(h)),h.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function Sw(a,e,t){var r=t.axesInfo=[];(0,p.each)(e,function(i,n){var o=i.axisPointerModel.option,s=a[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&r.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function bw(a,e,t,r){if(Ui(e)||!a.list.length){r({type:"hideTip"});return}var i=((a.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:a.list})}function _w(a,e,t){var r=t.getZr(),i="axisPointerLastHighlights",n=Cf(r)[i]||{},o=Cf(r)[i]={};(0,p.each)(a,function(u,h){var v=u.axisPointerModel.option;v.status==="show"&&u.triggerEmphasis&&(0,p.each)(v.seriesDataIndices,function(c){var f=c.seriesIndex+" | "+c.dataIndex;o[f]=c})});var s=[],l=[];(0,p.each)(n,function(u,h){!o[h]&&l.push(u)}),(0,p.each)(o,function(u,h){!n[h]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Aw(a,e){for(var t=0;t<(a||[]).length;t++){var r=a[t];if(e.axis.dim===r.axisDim&&e.axis.model.componentIndex===r.axisIndex)return r}}function If(a){var e=a.axis.model,t={},r=t.axisDim=a.axis.dim;return t.axisIndex=t[r+"AxisIndex"]=e.componentIndex,t.axisName=t[r+"AxisName"]=e.name,t.axisId=t[r+"AxisId"]=e.id,t}function Ui(a){return!a||a[0]==null||isNaN(a[0])||a[1]==null||isNaN(a[1])}function Ba(a){Sr.registerAxisPointerClass("CartesianAxisPointer",ow),a.registerComponentModel(lw),a.registerComponentView(dw),a.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!(0,p.isArray)(t)&&(e.axisPointer.link=[t])}}),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=a0(e,t)}),a.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},gw)}function ww(a){(0,Y.Y)($u),(0,Y.Y)(Ba)}var Cw=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),v=s.dataToCoord(r),c=n.get("type");if(c&&c!=="none"){var f=bs(n),d=Iw[c](s,l,v,h);d.style=f,t.graphicKey=d.type,t.pointer=d}var g=n.get(["label","margin"]),y=Tw(r,i,n,l,g);df(t,i,n,o,y)},e}(Ss);function Tw(a,e,t,r,i){var n=e.axis,o=n.dataToCoord(a),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,h,v;if(n.dim==="radius"){var c=Lt.create();Lt.rotate(c,c,s),Lt.translate(c,c,[r.cx,r.cy]),u=tt.applyTransform([o,-i],c);var f=e.getModel("axisLabel").get("rotate")||0,d=We.innerTextLayout(s,f*Math.PI/180,-1);h=d.textAlign,v=d.textVerticalAlign}else{var g=l[1];u=r.coordToPoint([g+i,o]);var y=r.cx,m=r.cy;h=Math.abs(u[0]-y)/g<.3?"center":u[0]>y?"left":"right",v=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:h,verticalAlign:v}}var Iw={line:function(a,e,t,r){return a.dim==="angle"?{type:"Line",shape:As(e.coordToPoint([r[0],t]),e.coordToPoint([r[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(a,e,t,r){var i=Math.max(1,a.getBandWidth()),n=Math.PI/180;return a.dim==="angle"?{type:"Sector",shape:xf(e.cx,e.cy,r[0],r[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:xf(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},Dw=Cw,Lw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var r,i=this.ecModel;return i.eachComponent(t,function(n){n.getCoordSysModel()===this&&(r=n)},this),r},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Ht.A),Mw=Lw,Cs=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",J.US).models[0]},e.type="polarAxis",e}(Ht.A);p.mixin(Cs,xa.L);var Pw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(Cs),Rw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(Cs),Ts=function(a){(0,O.C6)(e,a);function e(t,r){return a.call(this,"radius",t,r)||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e}(Ee.A);Ts.prototype.dataToRadius=Ee.A.prototype.dataToCoord,Ts.prototype.radiusToData=Ee.A.prototype.coordToData;var Ew=Ts,Vw=(0,J.$r)(),Is=function(a){(0,O.C6)(e,a);function e(t,r){return a.call(this,"angle",t,r||[0,360])||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,r=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),h=ce.NO(s==null?"":s+"",r.getFont(),"center","top"),v=Math.max(h.height,7),c=v/u;isNaN(c)&&(c=1/0);var f=Math.max(0,Math.floor(c)),d=Vw(t.model),g=d.lastAutoInterval,y=d.lastTickCount;return g!=null&&y!=null&&Math.abs(g-f)<=1&&Math.abs(y-o)<=1&&g>f?f=g:(d.lastTickCount=o,d.lastAutoInterval=f),f},e}(Ee.A);Is.prototype.dataToAngle=Ee.A.prototype.dataToCoord,Is.prototype.angleToData=Ee.A.prototype.coordToData;var Ow=Is,Df=["radius","angle"],kw=function(){function a(e){this.dimensions=Df,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Ew,this._angleAxis=new Ow,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return a.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},a.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},a.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},a.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},a.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,i=this._radiusAxis;return r.scale.type===e&&t.push(r),i.scale.type===e&&t.push(i),t},a.prototype.getAngleAxis=function(){return this._angleAxis},a.prototype.getRadiusAxis=function(){return this._radiusAxis},a.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},a.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},a.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},a.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},a.prototype.pointToData=function(e,t){var r=this.pointToCoord(e);return[this._radiusAxis.radiusToData(r[0],t),this._angleAxis.angleToData(r[1],t)]},a.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+r*r);t/=l,r/=l;for(var u=Math.atan2(-r,t)/Math.PI*180,h=us;)u+=h*360;return[l,u]},a.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,i=Math.cos(r)*t+this.cx,n=-Math.sin(r)*t+this.cy;return[i,n]},a.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var i=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,h=l*l+u*u-1e-4,v=this.r,c=this.r0;return h<=v*v&&h>=c*c}}},a.prototype.convertToPixel=function(e,t,r){var i=Lf(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=Lf(t);return i===this?this.pointToData(r):null},a}();function Lf(a){var e=a.seriesModel,t=a.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var Nw=kw;function zw(a,e,t){var r=e.get("center"),i=t.getWidth(),n=t.getHeight();a.cx=(0,k.lo)(r[0],i),a.cy=(0,k.lo)(r[1],n);var o=a.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:p.isArray(l)||(l=[0,l]);var u=[(0,k.lo)(l[0],s),(0,k.lo)(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function Bw(a,e){var t=this,r=t.getAngleAxis(),i=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),a.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();p.each((0,Ut.wq)(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),p.each((0,Ut.wq)(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),(0,Ut.af)(r.scale,r.model),(0,Ut.af)(i.scale,i.model),r.type==="category"&&!r.onBand){var n=r.getExtent(),o=360/r.scale.count();r.inverse?n[1]+=o:n[1]-=o,r.setExtent(n[0],n[1])}}function Gw(a){return a.mainType==="angleAxis"}function Mf(a,e){var t;if(a.type=e.get("type"),a.scale=(0,Ut.f$)(e),a.onBand=e.get("boundaryGap")&&a.type==="category",a.inverse=e.get("inverse"),Gw(e)){a.inverse=a.inverse!==e.get("clockwise");var r=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:r+(a.inverse?-360:360);a.setExtent(r,i)}e.axis=a,a.model=e}var Hw={dimensions:Df,create:function(a,e){var t=[];return a.eachComponent("polar",function(r,i){var n=new Nw(i+"");n.update=Bw;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");Mf(o,l),Mf(s,u),zw(n,r,e),t.push(n),r.coordinateSystem=n,n.model=r}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var i=r.getReferringComponents("polar",J.US).models[0];r.coordinateSystem=i.coordinateSystem}}),t}},Fw=Hw,Ww=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Xi(a,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=a.coordToPoint([e[0],t]),i=a.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function ji(a){var e=a.getRadiusAxis();return e.inverse?0:1}function Pf(a){var e=a[0],t=a[a.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&a.pop()}var Yw=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=p.map(i.getViewLabels(),function(h){h=p.clone(h);var v=i.scale,c=v.type==="ordinal"?v.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=i.dataToCoord(c),h});Pf(u),Pf(s),p.each(Ww,function(h){t.get([h,"show"])&&(!i.scale.isBlank()||h==="axisLine")&&Zw[h](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e}(Sr),Zw={axisLine:function(a,e,t,r,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=ji(t),v=h?0:1,c,f=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[v]===0?c=new tt[f]({shape:{cx:t.cx,cy:t.cy,r:n[h],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):c=new qu.A({shape:{cx:t.cx,cy:t.cy,r:n[h],r0:n[v]},style:o.getLineStyle(),z2:1,silent:!0}),c.style.fill=null,a.add(c)},axisTick:function(a,e,t,r,i,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[ji(t)],u=p.map(r,function(h){return new le.A({shape:Xi(t,[l,l+s],h.coord)})});a.add(tt.mergePath(u,{style:p.defaults(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(a,e,t,r,i,n){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[ji(t)],h=[],v=0;vm?"left":"right",b=Math.abs(y[1]-S)/g<.3?"middle":y[1]>S?"top":"bottom";if(s&&s[d]){var _=s[d];p.isObject(_)&&_.textStyle&&(f=new Xt.A(_.textStyle,l,l.ecModel))}var A=new _t.Ay({silent:We.isLabelSilent(e),style:(0,q.VB)(f,{x:y[0],y:y[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:x,verticalAlign:b})});if(a.add(A),h){var w=We.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=v.rawLabel,(0,ft.z)(A).eventData=w}},this)},splitLine:function(a,e,t,r,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],v=0;v=0?"p":"n",R=T;_&&(r[h][M]||(r[h][M]={p:T,n:T}),R=r[h][M][P]);var V=void 0,B=void 0,z=void 0,W=void 0;if(d.dim==="radius"){var $=d.dataToCoord(L)-T,K=l.dataToCoord(M);Math.abs($)=W})}}})}function tC(a){var e={};p.each(a,function(r,i){var n=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=Ef(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),v=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=v.stacks;e[l]=v;var f=Rf(r);c[f]||v.autoWidthCount++,c[f]=c[f]||{width:0,maxWidth:0};var d=(0,k.lo)(r.get("barWidth"),h),g=(0,k.lo)(r.get("barMaxWidth"),h),y=r.get("barGap"),m=r.get("barCategoryGap");d&&!c[f].width&&(d=Math.min(v.remainedWidth,d),c[f].width=d,v.remainedWidth-=d),g&&(c[f].maxWidth=g),y!=null&&(v.gap=y),m!=null&&(v.categoryGap=m)});var t={};return p.each(e,function(r,i){t[i]={};var n=r.stacks,o=r.bandWidth,s=(0,k.lo)(r.categoryGap,o),l=(0,k.lo)(r.gap,1),u=r.remainedWidth,h=r.autoWidthCount,v=(u-s)/(h+(h-1)*l);v=Math.max(v,0),p.each(n,function(g,y){var m=g.maxWidth;m&&m=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),i=[],n=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[n]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-n]=n===0?r.y+r.height/2:r.x+r.width/2,i},a.prototype.convertToPixel=function(e,t,r){var i=kf(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=kf(t);return i===this?this.pointToData(r):null},a}();function kf(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var pC=fC;function dC(a,e){var t=[];return a.eachComponent("singleAxis",function(r,i){var n=new pC(r,a,e);n.name="single_"+i,n.resize(r,e),r.coordinateSystem=n,t.push(n)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var i=r.getReferringComponents("singleAxis",J.US).models[0];r.coordinateSystem=i&&i.coordinateSystem}}),t}var gC={create:dC,dimensions:Of},yC=gC,Nf=["x","y"],mC=["width","height"],xC=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis,l=s.coordinateSystem,u=Ms(l,1-Ki(s)),h=l.dataToPoint(r)[0],v=n.get("type");if(v&&v!=="none"){var c=bs(n),f=SC[v](s,h,u);f.style=c,t.graphicKey=f.type,t.pointer=f}var d=Ds(i);yf(r,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,r,i){var n=Ds(r,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=_s(r.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,n){var o=i.axis,s=o.coordinateSystem,l=Ki(o),u=Ms(s,l),h=[t.x,t.y];h[l]+=r[l],h[l]=Math.min(u[1],h[l]),h[l]=Math.max(u[0],h[l]);var v=Ms(s,1-l),c=(v[1]+v[0])/2,f=[c,c];return f[l]=h[l],{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(Ss),SC={line:function(a,e,t){var r=As([e,t[0]],[e,t[1]],Ki(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=a.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:mf([e-r/2,t[0]],[r,i],Ki(a))}}};function Ki(a){return a.isHorizontal()?0:1}function Ms(a,e){var t=a.getRect();return[t[Nf[e]],t[Nf[e]]+t[mC[e]]]}var bC=xC,_C=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Yt.A);function AC(a){(0,Y.Y)(Ba),Sr.registerAxisPointerClass("SingleAxisPointer",bC),a.registerComponentView(_C),a.registerComponentView(hC),a.registerComponentModel(Ls),Br(a,"single",Ls,Ls.defaultOption),a.registerCoordinateSystem("single",yC)}var wC=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,i){var n=(0,yt.vs)(t);a.prototype.init.apply(this,arguments),zf(t,n)},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),zf(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Ht.A);function zf(a,e){var t=a.cellSize,r;p.isArray(t)?r=t:r=a.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var i=p.map([0,1],function(n){return(0,yt.Qf)(e,n)&&(r[n]="auto"),r[n]!=null&&r[n]!=="auto"});(0,yt.YA)(a,e,{type:"box",ignoreSize:i})}var CC=wC,Bf=E(30182),TC=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=r.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,r,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=r.start.time;u<=r.end.time;u=n.getNextNDay(u,1).time){var h=n.dataToRect([u],!1).tl,v=new Dt.A({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});i.add(v)}},e.prototype._renderLines=function(t,r,i,n){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),h=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var v=r.start,c=0;v.time<=r.end.time;c++){d(v.formatedDate),c===0&&(v=s.getDateInfo(r.start.y+"-"+r.start.m));var f=v.date;f.setMonth(f.getMonth()+1),v=s.getDateInfo(f)}d(s.getNextNDay(r.end.time,1).formatedDate);function d(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToRect([g],!1).tl);var y=o._getLinePointsOfOneWeek(t,g,i);o._tlpoints.push(y[0]),o._blpoints.push(y[y.length-1]),u&&o._drawSplitline(y,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,i),l,n)},e.prototype._getEdgesPoints=function(t,r,i){var n=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-r/2,n[1][o]=n[1][o]+r/2,n},e.prototype._drawSplitline=function(t,r,i){var n=new Pe.A({z2:20,shape:{points:t},style:r});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,r,i){for(var n=t.coordinateSystem,o=n.getDateInfo(r),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),h=n.dataToRect([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return(0,p.isString)(t)&&t?(0,qt.io)(t,r):(0,p.isFunction)(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,i,n,o){var s=r[0],l=r[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(n==="left"||n==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,r,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,v=(u[0][1]+u[1][1])/2,c=i==="horizontal"?0:1,f={top:[h,u[c][1]],bottom:[h,u[1-c][1]],left:[u[1-c][0],v],right:[u[c][0],v]},d=r.start.y;+r.end.y>+r.start.y&&(d=d+"-"+r.end.y);var g=o.get("formatter"),y={start:r.start.y,end:r.end.y,nameMap:d},m=this._formatterLabel(g,y),S=new _t.Ay({z2:30,style:(0,q.VB)(o,{text:m})});S.attr(this._yearTextPositionControl(S,f[l],i,l,s)),n.add(S)}},e.prototype._monthTextPositionControl=function(t,r,i,n,o){var s="left",l="top",u=t[0],h=t[1];return i==="horizontal"?(h=h+o,r&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,r&&(l="middle"),n==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,r,i,n){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),h=o.get("align"),v=[this._tlpoints,this._blpoints];(!s||(0,p.isString)(s))&&(s&&(r=(0,Bf.A4)(s)||r),s=r.get(["time","monthAbbr"])||[]);var c=u==="start"?0:1,f=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=h==="center",g=0;g=i.start.time&&r.times.end.time&&t.reverse(),t},a.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],r;t[0].time>t[1].time&&(r=!0,t.reverse());var i=Math.floor(t[1].time/Ps)-Math.floor(t[0].time/Ps)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)i-=u,n.setDate(l-u);var h=Math.floor((i+t[0].day+6)/7),v=r?-h+1:h-1;return r&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:h,nthWeek:v,fweek:t[0].day,lweek:t[1].day}},a.prototype._getDateByWeeksAndDay=function(e,t,r){var i=this._getRangeInfo(r);if(e>i.weeks||e===0&&ti.lweek)return null;var n=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},a.create=function(e,t){var r=[];return e.eachComponent("calendar",function(i){var n=new a(i,e,t);r.push(n),i.coordinateSystem=n}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=r[i.get("calendarIndex")||0])}),r},a.dimensions=["time","value"],a}();function Gf(a){var e=a.calendarModel,t=a.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}var LC=DC;function MC(a){a.registerComponentModel(CC),a.registerComponentView(IC),a.registerCoordinateSystem("calendar",LC)}function PC(a,e){var t=a.existing;if(e.id=a.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var r=e.parentOption;r?e.parentId=r.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Hf(a,e){var t;return p.each(e,function(r){a[r]!=null&&a[r]!=="auto"&&(t=!0)}),t}function RC(a,e,t){var r=p.extend({},t),i=a[e],n=t.$action||"merge";if(n==="merge")if(i){if(0)var o;p.merge(i,r,!0),(0,yt.YA)(i,r,{ignoreSize:!0}),(0,yt.Ir)(t,i),$i(t,i),$i(t,i,"shape"),$i(t,i,"style"),$i(t,i,"extra"),t.clipPath=i.clipPath}else a[e]=r;else n==="replace"?a[e]=r:n==="remove"&&i&&(a[e]=null)}var Ff=["transition","enterFrom","leaveTo"],EC=Ff.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function $i(a,e,t){if(t&&(!a[t]&&e[t]&&(a[t]={}),a=a[t],e=e[t]),!(!a||!e))for(var r=t?Ff:EC,i=0;i=0;h--){var v=i[h],c=J.vS(v.id,null),f=c!=null?o.get(c):null;if(f){var d=f.parent,m=we(d),S=d===n?{width:s,height:l}:{width:m.width,height:m.height},x={},b=yt.m$(f,v,S,null,{hv:v.hv,boundingMode:v.bounding},x);if(!we(f).isNew&&b){for(var _=v.transition,A={},w=0;w=0)?A[C]=T:f[C]=T}(0,Q.oi)(f,A,t,0)}else f.attr(x)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(i){Ji(i,we(i).option,r,t._lastGraphicModel)}),this._elMap=p.createHashMap()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Yt.A);function Rs(a){var e=p.hasOwn(Wf,a)?Wf[a]:tt.getShapeClass(a),t=new e({});return we(t).type=a,t}function Yf(a,e,t,r){var i=Rs(t);return e.add(i),r.set(a,i),we(i).id=a,we(i).isNew=!0,i}function Ji(a,e,t,r){var i=a&&a.parent;i&&(a.type==="group"&&a.traverse(function(n){Ji(n,e,t,r)}),Wi(a,e,r),t.removeKey(we(a).id))}function Zf(a,e,t,r){a.isGroup||p.each([["cursor",Ar.Ay.prototype.cursor],["zlevel",r||0],["z",t||0],["z2",0]],function(i){var n=i[0];p.hasOwn(e,n)?a[n]=p.retrieve2(e[n],i[1]):a[n]==null&&(a[n]=i[1])}),p.each(p.keys(e),function(i){if(i.indexOf("on")===0){var n=e[i];a[i]=p.isFunction(n)?n:null}}),p.hasOwn(e,"draggable")&&(a.draggable=e.draggable),e.name!=null&&(a.name=e.name),e.id!=null&&(a.id=e.id)}function NC(a){return a=p.extend({},a),p.each(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(yt.Tj),function(e){delete a[e]}),a}function zC(a,e,t){var r=(0,ft.z)(a).eventData;!a.silent&&!a.ignore&&!r&&(r=(0,ft.z)(a).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:a.name}),r&&(r.info=t.info)}function BC(a){a.registerComponentModel(OC),a.registerComponentView(kC),a.registerPreprocessor(function(e){var t=e.graphic;(0,p.isArray)(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Uf=["x","y","radius","angle","single"],GC=["cartesian2d","polar","singleAxis"];function HC(a){var e=a.get("coordinateSystem");return(0,p.indexOf)(GC,e)>=0}function nr(a){return a+"Axis"}function $M(a){return a+"AxisIndex"}function JM(a){return a+"AxisId"}function FC(a,e){var t=(0,p.createHashMap)(),r=[],i=(0,p.createHashMap)();a.eachComponent({mainType:"dataZoom",query:e},function(h){i.get(h.uid)||s(h)});var n;do n=!1,a.eachComponent("dataZoom",o);while(n);function o(h){!i.get(h.uid)&&l(h)&&(s(h),n=!0)}function s(h){i.set(h.uid,!0),r.push(h),u(h)}function l(h){var v=!1;return h.eachTargetAxis(function(c,f){var d=t.get(c);d&&d[f]&&(v=!0)}),v}function u(h){h.eachTargetAxis(function(v,c){(t.get(v)||t.set(v,[]))[c]=!0})}return r}function Xf(a){var e=a.ecModel,t={infoList:[],infoMap:(0,p.createHashMap)()};return a.eachTargetAxis(function(r,i){var n=e.getComponent(nr(r),i);if(n){var o=n.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(n)}}}),t}var Es=function(){function a(){this.indexList=[],this.indexMap=[]}return a.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},a}(),WC=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,r,i){var n=jf(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this._doInit(n)},e.prototype.mergeOption=function(t){var r=jf(t);(0,p.merge)(this.option,t,!0),(0,p.merge)(this.settledOption,r,!0),this._doInit(r)},e.prototype._doInit=function(t){var r=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;(0,p.each)([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(r[n[0]]=i[n[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),r=this._targetAxisInfoMap=(0,p.createHashMap)(),i=this._fillSpecifiedTargetAxis(r);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(r,this._orient)),this._noTarget=!0,r.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var r=!1;return(0,p.each)(Uf,function(i){var n=this.getReferringComponents(nr(i),J.UW);if(n.specified){r=!0;var o=new Es;(0,p.each)(n.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),r},e.prototype._fillAutoTargetAxisByOrient=function(t,r){var i=this.ecModel,n=!0;if(n){var o=r==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=i.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===r}});l(s,"single")}function l(u,h){var v=u[0];if(v){var c=new Es;if(c.add(v.componentIndex),t.set(h,c),n=!1,h==="x"||h==="y"){var f=v.getReferringComponents("grid",J.US).models[0];f&&(0,p.each)(u,function(d){v.componentIndex!==d.componentIndex&&f===d.getReferringComponents("grid",J.US).models[0]&&c.add(d.componentIndex)})}}}n&&(0,p.each)(Uf,function(u){if(n){var h=i.findComponents({mainType:nr(u),filter:function(c){return c.get("type",!0)==="category"}});if(h[0]){var v=new Es;v.add(h[0].componentIndex),t.set(u,v),n=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(r){!t&&(t=r)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var r=this.ecModel.option;this.option.throttle=r.animation&&r.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var r=this._rangePropMode,i=this.get("rangeMode");(0,p.each)([["start","startValue"],["end","endValue"]],function(n,o){var s=t[n[0]]!=null,l=t[n[1]]!=null;s&&!l?r[o]="percent":!s&&l?r[o]="value":i?r[o]=i[o]:s&&(r[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(r,i){t==null&&(t=this.ecModel.getComponent(nr(r),i))},this),t},e.prototype.eachTargetAxis=function(t,r){this._targetAxisInfoMap.each(function(i,n){(0,p.each)(i.indexList,function(o){t.call(r,n,o)})})},e.prototype.getAxisProxy=function(t,r){var i=this.getAxisModel(t,r);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,r){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[r])return this.ecModel.getComponent(nr(t),r)},e.prototype.setRawRange=function(t){var r=this.option,i=this.settledOption;(0,p.each)([["start","startValue"],["end","endValue"]],function(n){(t[n[0]]!=null||t[n[1]]!=null)&&(r[n[0]]=i[n[0]]=t[n[0]],r[n[1]]=i[n[1]]=t[n[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var r=this.option;(0,p.each)(["start","startValue","end","endValue"],function(i){r[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,r){if(t==null&&r==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,r).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var r,i=this._targetAxisInfoMap.keys(),n=0;no[1];if(x&&!b&&!_)return!0;x&&(y=!0),b&&(d=!0),_&&(g=!0)}return y&&d&&g})}else Kr(h,function(f){if(n==="empty")l.setData(u=u.map(f,function(g){return s(g)?g:NaN}));else{var d={};d[f]=o,u.selectRange(d)}});Kr(h,function(f){u.setApproximateExtent(o,f)})}});function s(l){return l>=o[0]&&l<=o[1]}},a.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,r=this._dataExtent;Kr(["min","max"],function(i){var n=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=k.Cb(r[0]+o,r,[0,100],!0):n!=null&&(o=k.Cb(n,[0,100],r,!0)-r[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o},this)},a.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,r=this._valueWindow;if(t){var i=k.hb(r,[0,500]);i=Math.min(i,20);var n=e.axis.scale.rawExtentInfo;t[0]!==0&&n.setDeterminedMinMax("min",+r[0].toFixed(i)),t[1]!==100&&n.setDeterminedMinMax("max",+r[1].toFixed(i)),n.freeze()}},a}();function JC(a,e,t){var r=[1/0,-1/0];Kr(t,function(o){(0,Ut.PN)(r,o.getData(),e)});var i=a.getAxisModel(),n=(0,KC.Tc)(i.axis.scale,i,r).calculate();return[n.min,n.max]}var QC=$C,qC={getTargetSeries:function(a){function e(i){a.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=a.getComponent(nr(o),s);i(o,s,l,n)})})}e(function(i,n,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new QC(i,n,s,a),t.push(o.__dzAxisProxy))});var r=(0,p.createHashMap)();return(0,p.each)(t,function(i){(0,p.each)(i.getTargetSeriesModels(),function(n){r.set(n.uid,n)})}),r},overallReset:function(a,e){a.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(r,i){t.getAxisProxy(r,i).reset(t)}),t.eachTargetAxis(function(r,i){t.getAxisProxy(r,i).filterData(t,e)})}),a.eachComponent("dataZoom",function(t){var r=t.findRepresentativeAxisProxy();if(r){var i=r.getDataPercentWindow(),n=r.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}})}},tT=qC;function eT(a){a.registerAction("dataZoom",function(e,t){var r=FC(t,e);(0,p.each)(r,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var $f=!1;function Os(a){$f||($f=!0,a.registerProcessor(a.PRIORITY.PROCESSOR.FILTER,tT),eT(a),a.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function rT(a){a.registerComponentModel(ZC),a.registerComponentView(jC),Os(a)}var Ce=function(){function a(){}return a}(),Jf={};function $r(a,e){Jf[a]=e}function Qf(a){return Jf[a]}var aT=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){a.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;p.each(this.option.feature,function(r,i){var n=Qf(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(t)),p.merge(r,n.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Ht.A),iT=aT;function nT(a,e,t){var r=e.getBoxLayoutParams(),i=e.get("padding"),n={width:t.getWidth(),height:t.getHeight()},o=(0,yt.dV)(r,n,i);(0,yt.aP)(e.get("orient"),a,e.get("itemGap"),o.width,o.height),(0,yt.m$)(a,r,n,i)}function qf(a,e){var t=qt.QX(e.get("padding")),r=e.getItemStyle(["color","opacity"]);return r.fill=e.get("backgroundColor"),a=new Dt.A({shape:{x:a.x-t[3],y:a.y-t[0],width:a.width+t[1]+t[3],height:a.height+t[0]+t[2],r:e.get("borderRadius")},style:r,silent:!0,z2:-1}),a}var oT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i,n){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},h=this._features||(this._features={}),v=[];p.each(u,function(d,g){v.push(g)}),new tr.A(this._featureNames||[],v).add(c).update(c).remove(p.curry(c,null)).execute(),this._featureNames=v;function c(d,g){var y=v[d],m=v[g],S=u[y],x=new Xt.A(S,t,t.ecModel),b;if(n&&n.newTitle!=null&&n.featureName===y&&(S.title=n.newTitle),y&&!m){if(sT(y))b={onclick:x.option.onclick,featureName:y};else{var _=Qf(y);if(!_)return;b=new _}h[y]=b}else if(b=h[m],!b)return;b.uid=(0,Ne.$Q)("toolbox-feature"),b.model=x,b.ecModel=r,b.api=i;var A=b instanceof Ce;if(!y&&m){A&&b.dispose&&b.dispose(r,i);return}if(!x.get("show")||A&&b.unusable){A&&b.remove&&b.remove(r,i);return}f(x,b,y),x.setIconStatus=function(w,C){var T=this.option,I=this.iconPaths;T.iconStatus=T.iconStatus||{},T.iconStatus[w]=C,I[w]&&(C==="emphasis"?U.HY:U.SD)(I[w])},b instanceof Ce&&b.render&&b.render(x,r,i,n)}function f(d,g,y){var m=d.getModel("iconStyle"),S=d.getModel(["emphasis","iconStyle"]),x=g instanceof Ce&&g.getIcons?g.getIcons():d.get("icon"),b=d.get("title")||{},_,A;p.isString(x)?(_={},_[y]=x):_=x,p.isString(b)?(A={},A[y]=b):A=b;var w=d.iconPaths={};p.each(_,function(C,T){var I=tt.createIcon(C,{},{x:-s/2,y:-s/2,width:s,height:s});I.setStyle(m.getItemStyle());var D=I.ensureState("emphasis");D.style=S.getItemStyle();var L=new _t.Ay({style:{text:A[T],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:(0,q.c8)({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},r)},ignore:!0});I.setTextContent(L),tt.setTooltipConfig({el:I,componentModel:t,itemName:T,formatterParamsExtra:{title:A[T]}}),I.__title=A[T],I.on("mouseover",function(){var M=S.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:S.get("textFill")||M.fill||M.stroke||"#000",backgroundColor:S.get("textBackgroundColor")}),I.setTextConfig({position:S.get("textPosition")||P}),L.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",T])!=="emphasis"&&i.leaveEmphasis(this),L.hide()}),(d.get(["iconStatus",T])==="emphasis"?U.HY:U.SD)(I),o.add(I),I.on("click",p.bind(g.onclick,g,r,i,T)),w[T]=I})}nT(o,t,i),o.add(qf(o.getBoundingRect(),t)),l||o.eachChild(function(d){var g=d.__title,y=d.ensureState("emphasis"),m=y.textConfig||(y.textConfig={}),S=d.getTextContent(),x=S&&S.ensureState("emphasis");if(x&&!p.isFunction(x)&&g){var b=x.style||(x.style={}),_=ce.NO(g,_t.Ay.makeFont(b)),A=d.x+o.x,w=d.y+o.y+s,C=!1;w+_.height>i.getHeight()&&(m.position="top",C=!0);var T=C?-5-_.height:s+10;A+_.width/2>i.getWidth()?(m.position=["100%",T],b.align="right"):A-_.width/2<0&&(m.position=[0,T],b.align="left")}})},e.prototype.updateView=function(t,r,i,n){p.each(this._features,function(o){o instanceof Ce&&o.updateView&&o.updateView(o.model,r,i,n)})},e.prototype.remove=function(t,r){p.each(this._features,function(i){i instanceof Ce&&i.remove&&i.remove(t,r)}),this.group.removeAll()},e.prototype.dispose=function(t,r){p.each(this._features,function(i){i instanceof Ce&&i.dispose&&i.dispose(t,r)})},e.type="toolbox",e}(Yt.A);function sT(a){return a.indexOf("my")===0}var lT=oT,uT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=r.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=r.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Kt.A.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=n+"."+s,h.target="_blank",h.href=l;var v=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(v)}else if(window.navigator.msSaveOrOpenBlob||o){var c=l.split(","),f=c[0].indexOf("base64")>-1,d=o?decodeURIComponent(c[1]):c[1];f&&(d=window.atob(d));var g=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var y=d.length,m=new Uint8Array(y);y--;)m[y]=d.charCodeAt(y);var S=new Blob([m]);window.navigator.msSaveOrOpenBlob(S,g)}else{var x=document.createElement("iframe");document.body.appendChild(x);var b=x.contentWindow,_=b.document;_.open("image/svg+xml","replace"),_.write(d),_.close(),b.focus(),_.execCommand("SaveAs",!0,g),document.body.removeChild(x)}}else{var A=i.get("lang"),w='',C=window.open();C.document.write(w),C.document.title=n}},e.getDefaultOption=function(t){var r={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return r},e}(Ce),hT=uT,tp="__ec_magicType_stack__",QM=null,qM=null,vT=[["line","bar"],["stack"]],cT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,r=t.get("icon"),i={};return p.each(t.get("type"),function(n){r[n]&&(i[n]=r[n])}),i},e.getDefaultOption=function(t){var r={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return r},e.prototype.onclick=function(t,r,i){var n=this.model,o=n.get(["seriesIndex",i]);if(ep[i]){var s={series:[]},l=function(v){var c=v.subType,f=v.id,d=ep[i](c,f,v,n);d&&(p.defaults(d,v.option),s.series.push(d));var g=v.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var y=g.getAxesByScale("ordinal")[0];if(y){var m=y.dim,S=m+"Axis",x=v.getReferringComponents(S,J.US).models[0],b=x.componentIndex;s[S]=s[S]||[];for(var _=0;_<=b;_++)s[S][b]=s[S][b]||{};s[S][b].boundaryGap=i==="bar"}}};p.each(vT,function(v){p.indexOf(v,i)>=0&&p.each(v,function(c){n.setIconStatus(c,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=i;i==="stack"&&(u=p.merge({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",i])!=="emphasis"&&(h="tiled")),r.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Ce),ep={line:function(a,e,t,r){if(a==="bar")return p.merge({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(a,e,t,r){if(a==="line")return p.merge({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(a,e,t,r){var i=t.get("stack")===tp;if(a==="line"||a==="bar")return r.setIconStatus("stack",i?"normal":"emphasis"),p.merge({id:e,stack:i?"":tp},r.get(["option","stack"])||{},!0)}};gi.OH({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(a,e){e.mergeOption(a.newOption)});var fT=cT,Qi=new Array(60).join("-"),Jr=" ";function pT(a){var e={},t=[],r=[];return a.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:r}}function dT(a){var e=[];return p.each(a,function(t,r){var i=t.categoryAxis,n=t.valueAxis,o=n.dim,s=[" "].concat(p.map(t.series,function(f){return f.name})),l=[i.model.getCategories()];p.each(t.series,function(f){var d=f.getRawData();l.push(f.getRawData().mapArray(d.mapDimension(o),function(g){return g}))});for(var u=[s.join(Jr)],h=0;h=0)return!0}var ks=new RegExp("["+Jr+"]+","g");function xT(a){for(var e=a.split(/\n+/g),t=qi(e.shift()).split(ks),r=[],i=p.map(t,function(l){return{name:l,data:[]}}),n=0;n=0;n--){var o=t[n];if(o[i])break}if(n<0){var s=a.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function TT(a){var e=Ns(a),t=e[e.length-1];e.length>1&&e.pop();var r={};return rp(t,function(i,n){for(var o=e.length-1;o>=0;o--)if(i=e[o][n],i){r[n]=i;break}}),r}function IT(a){ap(a).snapshots=null}function DT(a){return Ns(a).length}function Ns(a){var e=ap(a);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var LT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){IT(t),r.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var r={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return r},e}(Ce);gi.OH({type:"restore",event:"restore",update:"prepareAndUpdate"},function(a,e){e.resetOption("recreate")});var MT=LT,PT=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],RT=function(){function a(e,t,r){var i=this;this._targetInfoList=[];var n=ip(t,e);(0,p.each)(ET,function(o,s){(!r||!r.include||(0,p.indexOf)(r.include,s)>=0)&&o(n,i._targetInfoList)})}return a.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(r,i,n){if((r.coordRanges||(r.coordRanges=[])).push(i),!r.coordRange){r.coordRange=i;var o=Bs[r.brushType](0,n,i);r.__rangeOffset={offset:lp[r.brushType](o.values,r.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},a.prototype.matchOutputRanges=function(e,t,r){(0,p.each)(e,function(i){var n=this.findTargetInfo(i,t);n&&n!==!0&&(0,p.each)(n.coordSyses,function(o){var s=Bs[i.brushType](1,o,i.range,!0);r(i,s.values,o,t)})},this)},a.prototype.setInputRanges=function(e,t){(0,p.each)(e,function(r){var i=this.findTargetInfo(r,t);if(r.range=r.range||[],i&&i!==!0){r.panelId=i.panelId;var n=Bs[r.brushType](0,i.coordSys,r.coordRange),o=r.__rangeOffset;r.range=o?lp[r.brushType](n.values,o.offset,VT(n.xyMinMax,o.xyMinMax)):n.values}},this)},a.prototype.makePanelOpts=function(e,t){return(0,p.map)(this._targetInfoList,function(r){var i=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:t?t(r):null,clipPath:ac(i),isTargetByCursor:nc(i,e,r.coordSysModel),getLinearBrushOtherExtent:ic(i)}})},a.prototype.controlSeries=function(e,t,r){var i=this.findTargetInfo(e,r);return i===!0||i&&(0,p.indexOf)(i.coordSyses,t.coordinateSystem)>=0},a.prototype.findTargetInfo=function(e,t){for(var r=this._targetInfoList,i=ip(t,e),n=0;na[1]&&a.reverse(),a}function ip(a,e){return(0,J._e)(a,e,{includeMainTypes:PT})}var ET={grid:function(a,e){var t=a.xAxisModels,r=a.yAxisModels,i=a.gridModels,n=(0,p.createHashMap)(),o={},s={};!t&&!r&&!i||((0,p.each)(t,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),(0,p.each)(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),(0,p.each)(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,h=[];(0,p.each)(u.getCartesians(),function(v,c){((0,p.indexOf)(t,v.getAxis("x").model)>=0||(0,p.indexOf)(r,v.getAxis("y").model)>=0)&&h.push(v)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:op.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(a,e){(0,p.each)(a.geoModels,function(t){var r=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:r,coordSyses:[r],getPanelRect:op.geo})})}},np=[function(a,e){var t=a.xAxisModel,r=a.yAxisModel,i=a.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===e.gridModel},function(a,e){var t=a.geoModel;return t&&t===e.geoModel}],op={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var a=this.coordSys,e=a.getBoundingRect().clone();return e.applyTransform(tt.getTransform(a)),e}},Bs={lineX:(0,p.curry)(sp,0),lineY:(0,p.curry)(sp,1),rect:function(a,e,t,r){var i=a?e.pointToData([t[0][0],t[1][0]],r):e.dataToPoint([t[0][0],t[1][0]],r),n=a?e.pointToData([t[0][1],t[1][1]],r):e.dataToPoint([t[0][1],t[1][1]],r),o=[zs([i[0],n[0]]),zs([i[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(a,e,t,r){var i=[[1/0,-1/0],[1/0,-1/0]],n=(0,p.map)(t,function(o){var s=a?e.pointToData(o,r):e.dataToPoint(o,r);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:n,xyMinMax:i}}};function sp(a,e,t,r){var i=t.getAxis(["x","y"][a]),n=zs((0,p.map)([0,1],function(s){return e?i.coordToData(i.toLocalCoord(r[s]),!0):i.toGlobalCoord(i.dataToCoord(r[s]))})),o=[];return o[a]=n,o[1-a]=[NaN,NaN],{values:n,xyMinMax:o}}var lp={lineX:(0,p.curry)(up,0),lineY:(0,p.curry)(up,1),rect:function(a,e,t){return[[a[0][0]-t[0]*e[0][0],a[0][1]-t[0]*e[0][1]],[a[1][0]-t[1]*e[1][0],a[1][1]-t[1]*e[1][1]]]},polygon:function(a,e,t){return(0,p.map)(a,function(r,i){return[r[0]-t[0]*e[i][0],r[1]-t[1]*e[i][1]]})}};function up(a,e,t,r){return[e[0]-r[a]*t[0],e[1]-r[a]*t[1]]}function VT(a,e){var t=hp(a),r=hp(e),i=[t[0]/r[0],t[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function hp(a){return a?[a[0][1]-a[0][0],a[1][1]-a[1][0]]:[NaN,NaN]}var Gs=RT,OT=E(7442),Hs=p.each,kT=(0,J.S_)("toolbox-dataZoom_"),t2=null,NT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i,n){this._brushController||(this._brushController=new Xo(i.getZr()),this._brushController.on("brush",p.bind(this._onBrush,this)).mount()),GT(t,r,this,n,i),BT(t,r)},e.prototype.onclick=function(t,r,i){zT[i].call(this)},e.prototype.remove=function(t,r){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,r){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var r=t.areas;if(!t.isEnd||!r.length)return;var i={},n=this.ecModel;this._brushController.updateCovers([]);var o=new Gs(Fs(this.model),n,{include:["grid"]});o.matchOutputRanges(r,n,function(u,h,v){if(v.type==="cartesian2d"){var c=u.brushType;c==="rect"?(s("x",v,h[0]),s("y",v,h[1])):s({lineX:"x",lineY:"y"}[c],v,h)}}),CT(n,i),this._dispatchZoomAction(i);function s(u,h,v){var c=h.getAxis(u),f=c.model,d=l(u,f,n),g=d.findRepresentativeAxisProxy(f).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(v=Ir(0,v.slice(),c.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:v[0],endValue:v[1]})}function l(u,h,v){var c;return v.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var d=f.getAxisModel(u,h.componentIndex);d&&(c=f)}),c}},e.prototype._dispatchZoomAction=function(t){var r=[];Hs(t,function(i,n){r.push(p.clone(i))}),r.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:r})},e.getDefaultOption=function(t){var r={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return r},e}(Ce),zT={zoom:function(){var a=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:a})},back:function(){this._dispatchZoomAction(TT(this.ecModel))}};function Fs(a){var e={xAxisIndex:a.get("xAxisIndex",!0),yAxisIndex:a.get("yAxisIndex",!0),xAxisId:a.get("xAxisId",!0),yAxisId:a.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function BT(a,e){a.setIconStatus("back",DT(e)>1?"emphasis":"normal")}function GT(a,e,t,r,i){var n=t._isZoomActive;r&&r.type==="takeGlobalCursor"&&(n=r.key==="dataZoomSelect"?r.dataZoomSelectActive:!1),t._isZoomActive=n,a.setIconStatus("zoom",n?"emphasis":"normal");var o=new Gs(Fs(a),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:a.getModel("brushStyle").getItemStyle()}:!1)}(0,OT.S)("dataZoom",function(a){var e=a.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var r=e.getModel(t),i=[],n=Fs(r),o=(0,J._e)(a,n);Hs(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Hs(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var v=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:kT+u+v};c[h]=v,i.push(c)}return i});var HT=NT;function FT(a){a.registerComponentModel(iT),a.registerComponentView(lT),$r("saveAsImage",hT),$r("magicType",fT),$r("dataView",wT),$r("dataZoom",HT),$r("restore",MT),(0,Y.Y)(rT)}var WT=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Ht.A),YT=WT;function vp(a){var e=a.get("confine");return e!=null?!!e:a.get("renderMode")==="richText"}function cp(a){if(Kt.A.domSupported){for(var e=document.documentElement.style,t=0,r=a.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var h=u*Math.PI/180,v=o+i,c=v*Math.abs(Math.cos(h))+v*Math.abs(Math.sin(h)),f=Math.round(((c-Math.SQRT2*i)/2+Math.SQRT2*i-(c-v)/2)*100)/100;s+=";"+n+":-"+f+"px";var d=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+r+";"];return'
'}function JT(a,e){var t="cubic-bezier(0.23,1,0.32,1)",r=" "+a/2+"s "+t,i="opacity"+r+",visibility"+r;return e||(r=" "+a+"s "+t,i+=Kt.A.transformSupported?","+Ws+r:",left"+r+",top"+r),XT+":"+i}function dp(a,e,t){var r=a.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Kt.A.transformSupported)return t?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var n=Kt.A.transform3dSupported,o="translate"+(n?"3d":"")+"("+r+","+i+(n?",0":"")+")";return t?"top:0;left:0;"+Ws+":"+o+";":[["top",0],["left",0],[fp,o]]}function QT(a){var e=[],t=a.get("fontSize"),r=a.getTextColor();r&&e.push("color:"+r),e.push("font:"+a.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var i=a.get("textShadowColor"),n=a.get("textShadowBlur")||0,o=a.get("textShadowOffsetX")||0,s=a.get("textShadowOffsetY")||0;return i&&n&&e.push("text-shadow:"+o+"px "+s+"px "+n+"px "+i),(0,p.each)(["decoration","align"],function(l){var u=a.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function qT(a,e,t){var r=[],i=a.get("transitionDuration"),n=a.get("backgroundColor"),o=a.get("shadowBlur"),s=a.get("shadowColor"),l=a.get("shadowOffsetX"),u=a.get("shadowOffsetY"),h=a.getModel("textStyle"),v=(0,zt.CO)(a,"html"),c=l+"px "+u+"px "+o+"px "+s;return r.push("box-shadow:"+c),e&&i&&r.push(JT(i,t)),n&&r.push("background-color:"+n),(0,p.each)(["width","color","radius"],function(f){var d="border-"+f,g=(0,qt.Cb)(d),y=a.get(g);y!=null&&r.push(d+":"+y+(f==="color"?"":"px"))}),r.push(QT(h)),v!=null&&r.push("padding:"+(0,qt.QX)(v).join("px ")+"px"),r.join(";")+";"}function gp(a,e,t,r,i){var n=e&&e.painter;if(t){var o=n&&n.getViewportRoot();o&&(0,He.lJ)(a,o,t,r,i)}else{a[0]=r,a[1]=i;var s=n&&n.getViewportRootOffset();s&&(a[0]+=s.offsetLeft,a[1]+=s.offsetTop)}a[2]=a[0]/e.getWidth(),a[3]=a[1]/e.getHeight()}var tI=function(){function a(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Kt.A.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=e.getZr(),n=t.appendTo,o=n&&((0,p.isString)(n)?document.querySelector(n):(0,p.isDom)(n)?n:(0,p.isFunction)(n)&&n(e.getDom()));gp(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(r),this._api=e,this._container=o;var s=this;r.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},r.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,h=i.painter.getViewportRoot();(0,pe.e0)(h,l,!0),u.dispatch("mousemove",l)}},r.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return a.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),r=UT(t,"position"),i=t.style;i.position!=="absolute"&&r!=="absolute"&&(i.position="relative")}var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this.el.className=e.get("className")||""},a.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,i=r.style,n=this._styleCoord;r.innerHTML?i.cssText=jT+qT(e,!this._firstShow,this._longHide)+dp(n[0],n[1],!0)+("border-color:"+(0,qt.he)(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},a.prototype.setContent=function(e,t,r,i,n){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if((0,p.isString)(n)&&r.get("trigger")==="item"&&!vp(r)&&(s=$T(r,i,n)),(0,p.isString)(e))o.innerHTML=e+s;else if(e){o.innerHTML="",(0,p.isArray)(e)||(e=[e]);for(var l=0;l=0?this._tryShow(n,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,r=this._ecModel,i=this._api,n=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,r,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,r,i,n){if(!(n.from===this.uid||Kt.A.node||!i.getDom())){var o=xp(n,i);this._ticket="";var s=n.dataByCoordSys,l=hI(n,r,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var h=nI;h.x=n.x,h.y=n.y,h.update(),(0,ct.z)(h).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:h},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(t,r,i,n))return;var v=wf(n,r),c=v.point[0],f=v.point[1];c!=null&&f!=null&&this._tryShow({offsetX:c,offsetY:f,target:v.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,r,i,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(xp(n,i))},e.prototype._manuallyAxisShowTip=function(t,r,i,n){var o=n.seriesIndex,s=n.dataIndex,l=r.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=r.getSeriesByIndex(o);if(u){var h=u.getData(),v=Fa([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(v.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},e.prototype._tryShow=function(t,r){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=(0,ct.z)(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;(0,Jn.R)(i,function(h){if((0,ct.z)(h).dataIndex!=null)return l=h,!0;if((0,ct.z)(h).tooltipConfig!=null)return u=h,!0},!0),l?this._showSeriesItemTooltip(t,l,r):u?this._showComponentItemTooltip(t,u,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},e.prototype._showOrMove=function(t,r){var i=t.get("showDelay");r=(0,p.bind)(r,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(r,i):r()},e.prototype._showAxisTooltip=function(t,r){var i=this._ecModel,n=this._tooltipModel,o=[r.offsetX,r.offsetY],s=Fa([r.tooltipOption],n),l=this._renderMode,u=[],h=(0,zt.Qx)("section",{blocks:[],noHeader:!0}),v=[],c=new zt.lb;(0,p.each)(t,function(S){(0,p.each)(S.dataByAxis,function(x){var b=i.getComponent(x.axisDim+"Axis",x.axisIndex),_=x.value;if(!(!b||_==null)){var A=gf(_,b.axis,i,x.seriesDataIndices,x.valueLabelOpt),w=(0,zt.Qx)("section",{header:A,noHeader:!(0,p.trim)(A),sortBlocks:!0,blocks:[]});h.blocks.push(w),(0,p.each)(x.seriesDataIndices,function(C){var T=i.getSeriesByIndex(C.seriesIndex),I=C.dataIndexInside,D=T.getDataParams(I);if(!(D.dataIndex<0)){D.axisDim=x.axisDim,D.axisIndex=x.axisIndex,D.axisType=x.axisType,D.axisId=x.axisId,D.axisValue=Ut.Dt(b.axis,{value:_}),D.axisValueLabel=A,D.marker=c.makeTooltipMarker("item",(0,qt.he)(D.color),l);var L=(0,Ha.L)(T.formatTooltip(I,!0,null)),M=L.frag;if(M){var P=Fa([T],n).get("valueFormatter");w.blocks.push(P?(0,p.extend)({valueFormatter:P},M):M)}L.text&&v.push(L.text),u.push(D)}})}})}),h.blocks.reverse(),v.reverse();var f=r.position,d=s.get("order"),g=(0,zt.Yu)(h,c,l,d,i.get("useUTC"),s.get("textStyle"));g&&v.unshift(g);var y=l==="richText"?` +*`,"g")),r={series:[]};return p.each(t,function(i,n){if(mT(i)){var o=xT(i),s=e[n],l=s.axisDim+"Axis";s&&(r[l]=r[l]||[],r[l][s.axisIndex]={data:o.categories},r.series=r.series.concat(o.series))}else{var o=ST(i);r.series.push(o)}}),r}var _T=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){setTimeout(function(){r.dispatchAction({type:"hideTip"})});var i=r.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=n.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=n.get("lang")||[];s.innerHTML=l[0]||n.get("title"),s.style.cssText="margin:10px 20px",s.style.color=n.get("textColor");var u=document.createElement("div"),h=document.createElement("textarea");u.style.cssText="overflow:auto";var v=n.get("optionToContent"),c=n.get("contentToOption"),f=yT(t);if(p.isFunction(v)){var d=v(r.getOption());p.isString(d)?u.innerHTML=d:p.isDom(d)&&u.appendChild(d)}else{h.readOnly=n.get("readOnly");var g=h.style;g.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",g.color=n.get("textColor"),g.borderColor=n.get("textareaBorderColor"),g.backgroundColor=n.get("textareaColor"),h.value=f.value,u.appendChild(h)}var y=f.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var S="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",x=document.createElement("div"),b=document.createElement("div");S+=";background-color:"+n.get("buttonColor"),S+=";color:"+n.get("buttonTextColor");var _=this;function A(){i.removeChild(o),_._dom=null}(0,pe.q2)(x,"click",A),(0,pe.q2)(b,"click",function(){if(c==null&&v!=null||c!=null&&v==null){A();return}var w;try{p.isFunction(c)?w=c(u,r.getOption()):w=bT(h.value,y)}catch(C){throw A(),new Error("Data view format error "+C)}w&&r.dispatchAction({type:"changeDataView",newOption:w}),A()}),x.innerHTML=l[1],b.innerHTML=l[2],b.style.cssText=x.style.cssText=S,!n.get("readOnly")&&m.appendChild(b),m.appendChild(x),o.appendChild(s),o.appendChild(u),o.appendChild(m),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(t,r){this._dom&&r.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.getDefaultOption=function(t){var r={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return r},e}(Ce);function AT(a,e){return p.map(a,function(t,r){var i=e&&e[r];if(p.isObject(i)&&!p.isArray(i)){var n=p.isObject(t)&&!p.isArray(t);n||(t={value:t});var o=i.name!=null&&t.name==null;return t=p.defaults(t,i),o&&delete t.name,t}else return t})}gi.OH({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(a,e){var t=[];p.each(a.newOption.series,function(r){var i=e.getSeriesByName(r.name)[0];if(!i)t.push(p.extend({type:"scatter"},r));else{var n=i.get("data");t.push({name:r.name,data:AT(r.data,n)})}}),e.mergeOption(p.defaults({series:t},a.newOption))});var wT=_T,rp=p.each,ap=(0,J.$r)();function CT(a,e){var t=Ns(a);rp(e,function(r,i){for(var n=t.length-1;n>=0;n--){var o=t[n];if(o[i])break}if(n<0){var s=a.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function TT(a){var e=Ns(a),t=e[e.length-1];e.length>1&&e.pop();var r={};return rp(t,function(i,n){for(var o=e.length-1;o>=0;o--)if(i=e[o][n],i){r[n]=i;break}}),r}function IT(a){ap(a).snapshots=null}function DT(a){return Ns(a).length}function Ns(a){var e=ap(a);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var LT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){IT(t),r.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var r={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return r},e}(Ce);gi.OH({type:"restore",event:"restore",update:"prepareAndUpdate"},function(a,e){e.resetOption("recreate")});var MT=LT,PT=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],RT=function(){function a(e,t,r){var i=this;this._targetInfoList=[];var n=ip(t,e);(0,p.each)(ET,function(o,s){(!r||!r.include||(0,p.indexOf)(r.include,s)>=0)&&o(n,i._targetInfoList)})}return a.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(r,i,n){if((r.coordRanges||(r.coordRanges=[])).push(i),!r.coordRange){r.coordRange=i;var o=Bs[r.brushType](0,n,i);r.__rangeOffset={offset:lp[r.brushType](o.values,r.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},a.prototype.matchOutputRanges=function(e,t,r){(0,p.each)(e,function(i){var n=this.findTargetInfo(i,t);n&&n!==!0&&(0,p.each)(n.coordSyses,function(o){var s=Bs[i.brushType](1,o,i.range,!0);r(i,s.values,o,t)})},this)},a.prototype.setInputRanges=function(e,t){(0,p.each)(e,function(r){var i=this.findTargetInfo(r,t);if(r.range=r.range||[],i&&i!==!0){r.panelId=i.panelId;var n=Bs[r.brushType](0,i.coordSys,r.coordRange),o=r.__rangeOffset;r.range=o?lp[r.brushType](n.values,o.offset,VT(n.xyMinMax,o.xyMinMax)):n.values}},this)},a.prototype.makePanelOpts=function(e,t){return(0,p.map)(this._targetInfoList,function(r){var i=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:t?t(r):null,clipPath:ac(i),isTargetByCursor:nc(i,e,r.coordSysModel),getLinearBrushOtherExtent:ic(i)}})},a.prototype.controlSeries=function(e,t,r){var i=this.findTargetInfo(e,r);return i===!0||i&&(0,p.indexOf)(i.coordSyses,t.coordinateSystem)>=0},a.prototype.findTargetInfo=function(e,t){for(var r=this._targetInfoList,i=ip(t,e),n=0;na[1]&&a.reverse(),a}function ip(a,e){return(0,J._e)(a,e,{includeMainTypes:PT})}var ET={grid:function(a,e){var t=a.xAxisModels,r=a.yAxisModels,i=a.gridModels,n=(0,p.createHashMap)(),o={},s={};!t&&!r&&!i||((0,p.each)(t,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),(0,p.each)(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),(0,p.each)(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,h=[];(0,p.each)(u.getCartesians(),function(v,c){((0,p.indexOf)(t,v.getAxis("x").model)>=0||(0,p.indexOf)(r,v.getAxis("y").model)>=0)&&h.push(v)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:op.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(a,e){(0,p.each)(a.geoModels,function(t){var r=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:r,coordSyses:[r],getPanelRect:op.geo})})}},np=[function(a,e){var t=a.xAxisModel,r=a.yAxisModel,i=a.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===e.gridModel},function(a,e){var t=a.geoModel;return t&&t===e.geoModel}],op={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var a=this.coordSys,e=a.getBoundingRect().clone();return e.applyTransform(tt.getTransform(a)),e}},Bs={lineX:(0,p.curry)(sp,0),lineY:(0,p.curry)(sp,1),rect:function(a,e,t,r){var i=a?e.pointToData([t[0][0],t[1][0]],r):e.dataToPoint([t[0][0],t[1][0]],r),n=a?e.pointToData([t[0][1],t[1][1]],r):e.dataToPoint([t[0][1],t[1][1]],r),o=[zs([i[0],n[0]]),zs([i[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(a,e,t,r){var i=[[1/0,-1/0],[1/0,-1/0]],n=(0,p.map)(t,function(o){var s=a?e.pointToData(o,r):e.dataToPoint(o,r);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:n,xyMinMax:i}}};function sp(a,e,t,r){var i=t.getAxis(["x","y"][a]),n=zs((0,p.map)([0,1],function(s){return e?i.coordToData(i.toLocalCoord(r[s]),!0):i.toGlobalCoord(i.dataToCoord(r[s]))})),o=[];return o[a]=n,o[1-a]=[NaN,NaN],{values:n,xyMinMax:o}}var lp={lineX:(0,p.curry)(up,0),lineY:(0,p.curry)(up,1),rect:function(a,e,t){return[[a[0][0]-t[0]*e[0][0],a[0][1]-t[0]*e[0][1]],[a[1][0]-t[1]*e[1][0],a[1][1]-t[1]*e[1][1]]]},polygon:function(a,e,t){return(0,p.map)(a,function(r,i){return[r[0]-t[0]*e[i][0],r[1]-t[1]*e[i][1]]})}};function up(a,e,t,r){return[e[0]-r[a]*t[0],e[1]-r[a]*t[1]]}function VT(a,e){var t=hp(a),r=hp(e),i=[t[0]/r[0],t[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function hp(a){return a?[a[0][1]-a[0][0],a[1][1]-a[1][0]]:[NaN,NaN]}var Gs=RT,OT=E(7442),Hs=p.each,kT=(0,J.S_)("toolbox-dataZoom_"),t2=null,NT=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i,n){this._brushController||(this._brushController=new Xo(i.getZr()),this._brushController.on("brush",p.bind(this._onBrush,this)).mount()),GT(t,r,this,n,i),BT(t,r)},e.prototype.onclick=function(t,r,i){zT[i].call(this)},e.prototype.remove=function(t,r){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,r){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var r=t.areas;if(!t.isEnd||!r.length)return;var i={},n=this.ecModel;this._brushController.updateCovers([]);var o=new Gs(Fs(this.model),n,{include:["grid"]});o.matchOutputRanges(r,n,function(u,h,v){if(v.type==="cartesian2d"){var c=u.brushType;c==="rect"?(s("x",v,h[0]),s("y",v,h[1])):s({lineX:"x",lineY:"y"}[c],v,h)}}),CT(n,i),this._dispatchZoomAction(i);function s(u,h,v){var c=h.getAxis(u),f=c.model,d=l(u,f,n),g=d.findRepresentativeAxisProxy(f).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(v=Ir(0,v.slice(),c.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:v[0],endValue:v[1]})}function l(u,h,v){var c;return v.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var d=f.getAxisModel(u,h.componentIndex);d&&(c=f)}),c}},e.prototype._dispatchZoomAction=function(t){var r=[];Hs(t,function(i,n){r.push(p.clone(i))}),r.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:r})},e.getDefaultOption=function(t){var r={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return r},e}(Ce),zT={zoom:function(){var a=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:a})},back:function(){this._dispatchZoomAction(TT(this.ecModel))}};function Fs(a){var e={xAxisIndex:a.get("xAxisIndex",!0),yAxisIndex:a.get("yAxisIndex",!0),xAxisId:a.get("xAxisId",!0),yAxisId:a.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function BT(a,e){a.setIconStatus("back",DT(e)>1?"emphasis":"normal")}function GT(a,e,t,r,i){var n=t._isZoomActive;r&&r.type==="takeGlobalCursor"&&(n=r.key==="dataZoomSelect"?r.dataZoomSelectActive:!1),t._isZoomActive=n,a.setIconStatus("zoom",n?"emphasis":"normal");var o=new Gs(Fs(a),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:a.getModel("brushStyle").getItemStyle()}:!1)}(0,OT.S)("dataZoom",function(a){var e=a.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var r=e.getModel(t),i=[],n=Fs(r),o=(0,J._e)(a,n);Hs(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Hs(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var v=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:kT+u+v};c[h]=v,i.push(c)}return i});var HT=NT;function FT(a){a.registerComponentModel(iT),a.registerComponentView(lT),$r("saveAsImage",hT),$r("magicType",fT),$r("dataView",wT),$r("dataZoom",HT),$r("restore",MT),(0,Y.Y)(rT)}var WT=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Ht.A),YT=WT;function vp(a){var e=a.get("confine");return e!=null?!!e:a.get("renderMode")==="richText"}function cp(a){if(Kt.A.domSupported){for(var e=document.documentElement.style,t=0,r=a.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var h=u*Math.PI/180,v=o+i,c=v*Math.abs(Math.cos(h))+v*Math.abs(Math.sin(h)),f=Math.round(((c-Math.SQRT2*i)/2+Math.SQRT2*i-(c-v)/2)*100)/100;s+=";"+n+":-"+f+"px";var d=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+r+";"];return'
'}function JT(a,e){var t="cubic-bezier(0.23,1,0.32,1)",r=" "+a/2+"s "+t,i="opacity"+r+",visibility"+r;return e||(r=" "+a+"s "+t,i+=Kt.A.transformSupported?","+Ws+r:",left"+r+",top"+r),XT+":"+i}function dp(a,e,t){var r=a.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Kt.A.transformSupported)return t?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var n=Kt.A.transform3dSupported,o="translate"+(n?"3d":"")+"("+r+","+i+(n?",0":"")+")";return t?"top:0;left:0;"+Ws+":"+o+";":[["top",0],["left",0],[fp,o]]}function QT(a){var e=[],t=a.get("fontSize"),r=a.getTextColor();r&&e.push("color:"+r),e.push("font:"+a.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var i=a.get("textShadowColor"),n=a.get("textShadowBlur")||0,o=a.get("textShadowOffsetX")||0,s=a.get("textShadowOffsetY")||0;return i&&n&&e.push("text-shadow:"+o+"px "+s+"px "+n+"px "+i),(0,p.each)(["decoration","align"],function(l){var u=a.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function qT(a,e,t){var r=[],i=a.get("transitionDuration"),n=a.get("backgroundColor"),o=a.get("shadowBlur"),s=a.get("shadowColor"),l=a.get("shadowOffsetX"),u=a.get("shadowOffsetY"),h=a.getModel("textStyle"),v=(0,zt.CO)(a,"html"),c=l+"px "+u+"px "+o+"px "+s;return r.push("box-shadow:"+c),e&&i&&r.push(JT(i,t)),n&&r.push("background-color:"+n),(0,p.each)(["width","color","radius"],function(f){var d="border-"+f,g=(0,qt.Cb)(d),y=a.get(g);y!=null&&r.push(d+":"+y+(f==="color"?"":"px"))}),r.push(QT(h)),v!=null&&r.push("padding:"+(0,qt.QX)(v).join("px ")+"px"),r.join(";")+";"}function gp(a,e,t,r,i){var n=e&&e.painter;if(t){var o=n&&n.getViewportRoot();o&&(0,He.lJ)(a,o,t,r,i)}else{a[0]=r,a[1]=i;var s=n&&n.getViewportRootOffset();s&&(a[0]+=s.offsetLeft,a[1]+=s.offsetTop)}a[2]=a[0]/e.getWidth(),a[3]=a[1]/e.getHeight()}var tI=function(){function a(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Kt.A.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=e.getZr(),n=t.appendTo,o=n&&((0,p.isString)(n)?document.querySelector(n):(0,p.isDom)(n)?n:(0,p.isFunction)(n)&&n(e.getDom()));gp(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(r),this._api=e,this._container=o;var s=this;r.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},r.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,h=i.painter.getViewportRoot();(0,pe.e0)(h,l,!0),u.dispatch("mousemove",l)}},r.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return a.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),r=UT(t,"position"),i=t.style;i.position!=="absolute"&&r!=="absolute"&&(i.position="relative")}var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this.el.className=e.get("className")||""},a.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,i=r.style,n=this._styleCoord;r.innerHTML?i.cssText=jT+qT(e,!this._firstShow,this._longHide)+dp(n[0],n[1],!0)+("border-color:"+(0,qt.he)(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},a.prototype.setContent=function(e,t,r,i,n){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if((0,p.isString)(n)&&r.get("trigger")==="item"&&!vp(r)&&(s=$T(r,i,n)),(0,p.isString)(e))o.innerHTML=e+s;else if(e){o.innerHTML="",(0,p.isArray)(e)||(e=[e]);for(var l=0;l=0?this._tryShow(n,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,r=this._ecModel,i=this._api,n=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,r,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,r,i,n){if(!(n.from===this.uid||Kt.A.node||!i.getDom())){var o=xp(n,i);this._ticket="";var s=n.dataByCoordSys,l=hI(n,r,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var h=nI;h.x=n.x,h.y=n.y,h.update(),(0,ft.z)(h).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:h},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(t,r,i,n))return;var v=wf(n,r),c=v.point[0],f=v.point[1];c!=null&&f!=null&&this._tryShow({offsetX:c,offsetY:f,target:v.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,r,i,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(xp(n,i))},e.prototype._manuallyAxisShowTip=function(t,r,i,n){var o=n.seriesIndex,s=n.dataIndex,l=r.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=r.getSeriesByIndex(o);if(u){var h=u.getData(),v=Fa([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(v.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},e.prototype._tryShow=function(t,r){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=(0,ft.z)(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;(0,Jn.R)(i,function(h){if((0,ft.z)(h).dataIndex!=null)return l=h,!0;if((0,ft.z)(h).tooltipConfig!=null)return u=h,!0},!0),l?this._showSeriesItemTooltip(t,l,r):u?this._showComponentItemTooltip(t,u,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},e.prototype._showOrMove=function(t,r){var i=t.get("showDelay");r=(0,p.bind)(r,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(r,i):r()},e.prototype._showAxisTooltip=function(t,r){var i=this._ecModel,n=this._tooltipModel,o=[r.offsetX,r.offsetY],s=Fa([r.tooltipOption],n),l=this._renderMode,u=[],h=(0,zt.Qx)("section",{blocks:[],noHeader:!0}),v=[],c=new zt.lb;(0,p.each)(t,function(S){(0,p.each)(S.dataByAxis,function(x){var b=i.getComponent(x.axisDim+"Axis",x.axisIndex),_=x.value;if(!(!b||_==null)){var A=gf(_,b.axis,i,x.seriesDataIndices,x.valueLabelOpt),w=(0,zt.Qx)("section",{header:A,noHeader:!(0,p.trim)(A),sortBlocks:!0,blocks:[]});h.blocks.push(w),(0,p.each)(x.seriesDataIndices,function(C){var T=i.getSeriesByIndex(C.seriesIndex),I=C.dataIndexInside,D=T.getDataParams(I);if(!(D.dataIndex<0)){D.axisDim=x.axisDim,D.axisIndex=x.axisIndex,D.axisType=x.axisType,D.axisId=x.axisId,D.axisValue=Ut.Dt(b.axis,{value:_}),D.axisValueLabel=A,D.marker=c.makeTooltipMarker("item",(0,qt.he)(D.color),l);var L=(0,Ha.L)(T.formatTooltip(I,!0,null)),M=L.frag;if(M){var P=Fa([T],n).get("valueFormatter");w.blocks.push(P?(0,p.extend)({valueFormatter:P},M):M)}L.text&&v.push(L.text),u.push(D)}})}})}),h.blocks.reverse(),v.reverse();var f=r.position,d=s.get("order"),g=(0,zt.Yu)(h,c,l,d,i.get("useUTC"),s.get("textStyle"));g&&v.unshift(g);var y=l==="richText"?` -`:"
",m=v.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,f,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],f,null,c)})},e.prototype._showSeriesItemTooltip=function(t,r,i){var n=this._ecModel,o=(0,ct.z)(r),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,v=o.dataType,c=u.getData(v),f=this._renderMode,d=t.positionDefault,g=Fa([c.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),y=g.get("trigger");if(!(y!=null&&y!=="item")){var m=u.getDataParams(h,v),S=new zt.lb;m.marker=S.makeTooltipMarker("item",(0,qt.he)(m.color),f);var x=(0,Ha.L)(u.formatTooltip(h,!1,v)),b=g.get("order"),_=g.get("valueFormatter"),A=x.frag,w=A?(0,zt.Yu)(_?(0,p.extend)({valueFormatter:_},A):A,S,f,b,n.get("useUTC"),g.get("textStyle")):x.text,C="item_"+u.name+"_"+h;this._showOrMove(g,function(){this._showTooltipContent(g,w,m,C,t.offsetX,t.offsetY,t.position,t.target,S)}),i({type:"showTip",dataIndexInside:h,dataIndex:c.getRawIndex(h),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,r,i){var n=this._renderMode==="html",o=(0,ct.z)(r),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if((0,p.isString)(l)){var h=l;l={content:h,formatter:h},u=!0}u&&n&&l.content&&(l=(0,p.clone)(l),l.content=(0,He.Me)(l.content));var v=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&v.push(c),v.push({formatter:l.content});var f=t.positionDefault,d=Fa(v,this._tooltipModel,f?{position:f}:null),g=d.get("content"),y=Math.random()+"",m=new zt.lb;this._showOrMove(d,function(){var S=(0,p.clone)(d.get("formatterParams")||{});this._showTooltipContent(d,g,S,y,t.offsetX,t.offsetY,t.position,r,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,r,i,n,o,s,l,u,h){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var v=this._tooltipContent;v.setEnterable(t.get("enterable"));var c=t.get("formatter");l=l||t.get("position");var f=r,d=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor")),g=d.color;if(c)if((0,p.isString)(c)){var y=t.ecModel.get("useUTC"),m=(0,p.isArray)(i)?i[0]:i,S=m&&m.axisType&&m.axisType.indexOf("time")>=0;f=c,S&&(f=(0,iI.GP)(m.axisValue,f,y)),f=(0,qt.YK)(f,i,!0)}else if((0,p.isFunction)(c)){var x=(0,p.bind)(function(b,_){b===this._ticket&&(v.setContent(_,h,t,g,l),this._updatePosition(t,l,o,s,v,i,u))},this);this._ticket=n,f=c(i,n,x)}else f=c;v.setContent(f,h,t,g,l),v.show(t,g),this._updatePosition(t,l,o,s,v,i,u)}},e.prototype._getNearestPoint=function(t,r,i,n){if(i==="axis"||(0,p.isArray)(r))return{color:n||(this._renderMode==="html"?"#fff":"none")};if(!(0,p.isArray)(r))return{color:n||r.color||r.borderColor}},e.prototype._updatePosition=function(t,r,i,n,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();r=r||t.get("position");var v=o.getSize(),c=t.get("align"),f=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),(0,p.isFunction)(r)&&(r=r([i,n],s,o.el,d,{viewSize:[u,h],contentSize:v.slice()})),(0,p.isArray)(r))i=(0,k.lo)(r[0],u),n=(0,k.lo)(r[1],h);else if((0,p.isObject)(r)){var g=r;g.width=v[0],g.height=v[1];var y=(0,yt.dV)(g,{width:u,height:h});i=y.x,n=y.y,c=null,f=null}else if((0,p.isString)(r)&&l){var m=uI(r,d,v,t.get("borderWidth"));i=m[0],n=m[1]}else{var m=sI(i,n,o,u,h,c?null:20,f?null:20);i=m[0],n=m[1]}if(c&&(i-=Sp(c)?v[0]/2:c==="right"?v[0]:0),f&&(n-=Sp(f)?v[1]/2:f==="bottom"?v[1]:0),vp(t)){var m=lI(i,n,o,u,h);i=m[0],n=m[1]}o.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,r){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===t.length;return o&&(0,p.each)(i,function(s,l){var u=s.dataByAxis||[],h=t[l]||{},v=h.dataByAxis||[];o=o&&u.length===v.length,o&&(0,p.each)(u,function(c,f){var d=v[f]||{},g=c.seriesDataIndices||[],y=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&g.length===y.length,o&&(0,p.each)(g,function(m,S){var x=y[S];o=o&&m.seriesIndex===x.seriesIndex&&m.dataIndex===x.dataIndex}),n&&(0,p.each)(c.seriesDataIndices,function(m){var S=m.seriesIndex,x=r[S],b=n[S];x&&b&&b.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=r,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,r){Kt.A.node||!r.getDom()||((0,me.IU)(this,"_updatePosition"),this._tooltipContent.dispose(),ws("itemTooltip",r))},e.type="tooltip",e}(Yt.A);function Fa(a,e,t){var r=e.ecModel,i;t?(i=new Xt.A(t,r,r),i=new Xt.A(e.option,i,r)):i=e;for(var n=a.length-1;n>=0;n--){var o=a[n];o&&(o instanceof Xt.A&&(o=o.get("tooltip",!0)),(0,p.isString)(o)&&(o={formatter:o}),o&&(i=new Xt.A(o,i,r)))}return i}function xp(a,e){return a.dispatchAction||(0,p.bind)(e.dispatchAction,e)}function sI(a,e,t,r,i,n,o){var s=t.getSize(),l=s[0],u=s[1];return n!=null&&(a+l+n+2>r?a-=l+n:a+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[a,e]}function lI(a,e,t,r,i){var n=t.getSize(),o=n[0],s=n[1];return a=Math.min(a+o,r)-o,e=Math.min(e+s,i)-s,a=Math.max(a,0),e=Math.max(e,0),[a,e]}function uI(a,e,t,r){var i=t[0],n=t[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=e.width,h=e.height;switch(a){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-n/2;break;case"top":s=e.x+u/2-i/2,l=e.y-n-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o,l=e.y+h/2-n/2;break;case"right":s=e.x+u+o,l=e.y+h/2-n/2}return[s,l]}function Sp(a){return a==="center"||a==="middle"}function hI(a,e,t){var r=(0,J.HB)(a).queryOptionMap,i=r.keys()[0];if(!(!i||i==="series")){var n=(0,J.JO)(e,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=(0,ct.z)(u).tooltipConfig;if(h&&h.name===a.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var vI=oI;function cI(a){(0,Y.Y)(Ba),a.registerComponentModel(YT),a.registerComponentView(vI),a.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},p.noop),a.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},p.noop)}var fI=["rect","polygon","keep","clear"];function pI(a,e){var t=(0,J.qB)(a?a.brush:[]);if(t.length){var r=[];p.each(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var i=a&&a.toolbox;p.isArray(i)&&(i=i[0]),i||(i={feature:{}},a.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),dI(s),e&&!s.length&&s.push.apply(s,fI)}}function dI(a){var e={};p.each(a,function(t){e[t]=1}),a.length=0,p.each(e,function(t,r){a.push(r)})}var sr=E(37395),bp=p.each;function _p(a){if(a){for(var e in a)if(a.hasOwnProperty(e))return!0}}function Ys(a,e,t){var r={};return bp(e,function(n){var o=r[n]=i();bp(a[n],function(s,l){if(ae.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new ae(u),l==="opacity"&&(u=p.clone(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ae(u))}})}),r;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function Ap(a,e,t){var r;p.each(t,function(i){e.hasOwnProperty(i)&&_p(e[i])&&(r=!0)}),r&&p.each(t,function(i){e.hasOwnProperty(i)&&_p(e[i])?a[i]=p.clone(e[i]):delete a[i]})}function gI(a,e,t,r,i,n){var o={};p.each(a,function(v){var c=ae.prepareVisualTypes(e[v]);o[v]=c});var s;function l(v){return(0,sr.Ez)(t,s,v)}function u(v,c){(0,sr.oZ)(t,s,v,c)}n==null?t.each(h):t.each([n],h);function h(v,c){s=n==null?v:c;var f=t.getRawDataItem(s);if(!(f&&f.visualMap===!1))for(var d=r.call(i,v),g=e[d],y=o[d],m=0,S=y.length;me[0][1]&&(e[0][1]=n[0]),n[1]e[1][1]&&(e[1][1]=n[1])}return e&&Lp(e)}};function Lp(a){return new vt.A(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}var wI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r,this.model,(this._brushController=new Xo(r.getZr())).on("brush",p.bind(this._onBrush,this)).mount()},e.prototype.render=function(t,r,i,n){this.model=t,this._updateController(t,r,i,n)},e.prototype.updateTransform=function(t,r,i,n){Ip(r),this._updateController(t,r,i,n)},e.prototype.updateVisual=function(t,r,i,n){this.updateTransform(t,r,i,n)},e.prototype.updateView=function(t,r,i,n){this._updateController(t,r,i,n)},e.prototype._updateController=function(t,r,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:p.clone(i),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:p.clone(i),$from:r})},e.type="brush",e}(Yt.A),CI=wI,TI="#ddd",II=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&Ap(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:TI},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=p.map(t,function(r){return Mp(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Mp(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}(Ht.A);function Mp(a,e){return p.merge({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new Xt.A(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}var DI=II,LI=["rect","polygon","lineX","lineY","keep","clear"],MI=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i){var n,o,s;r.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,p.each(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,r,i){this.render(t,r,i)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),i={};return p.each(t.get("type",!0),function(n){r[n]&&(i[n]=r[n])}),i},e.prototype.onclick=function(t,r,i){var n=this._brushType,o=this._brushMode;i==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:LI.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 r},e}(Ce),PI=MI;function RI(a){a.registerComponentView(CI),a.registerComponentModel(DI),a.registerPreprocessor(pI),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,xI),a.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),a.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},p.noop),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},p.noop),$r("brush",PI)}var EI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Ht.A),VI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){if(this.group.removeAll(),!!t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=p.retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),h=new _t.Ay({style:(0,q.VB)(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),v=h.getBoundingRect(),c=t.get("subtext"),f=new _t.Ay({style:(0,q.VB)(s,{text:c,fill:s.getTextColor(),y:v.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),g=t.get("sublink"),y=t.get("triggerEvent",!0);h.silent=!d&&!y,f.silent=!g&&!y,d&&h.on("click",function(){(0,qt.JW)(d,"_"+t.get("target"))}),g&&f.on("click",function(){(0,qt.JW)(g,"_"+t.get("subtarget"))}),(0,ct.z)(h).eventData=(0,ct.z)(f).eventData=y?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(h),c&&n.add(f);var m=n.getBoundingRect(),S=t.getBoxLayoutParams();S.width=m.width,S.height=m.height;var x=(0,yt.dV)(S,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),n.x=x.x,n.y=x.y,n.markRedraw();var b={align:l,verticalAlign:u};h.setStyle(b),f.setStyle(b),m=n.getBoundingRect();var _=x.margin,A=t.getItemStyle(["color","opacity"]);A.fill=t.get("backgroundColor");var w=new Dt.A({shape:{x:m.x-_[3],y:m.y-_[0],width:m.width+_[1]+_[3],height:m.height+_[0]+_[2],r:t.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});n.add(w)}},e.type="title",e}(Yt.A);function OI(a){a.registerComponentModel(EI),a.registerComponentView(VI)}var kI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var r=this._data.count();this.option.loop?t=(t%r+r)%r:(t>=r&&(t=r-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,r=t.data||[],i=t.axisType,n=this._names=[],o;i==="category"?(o=[],(0,p.each)(r,function(u,h){var v=(0,J.vS)((0,J.vj)(u),""),c;(0,p.isObject)(u)?(c=(0,p.clone)(u),c.value=h):c=h,o.push(c),n.push(v)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new he.A([{name:"value",type:s}],this);l.initData(o,n)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Ht.A),Pp=kI,Rp=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=(0,Ne.G_)(Pp.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Pp);(0,p.mixin)(Rp,Ha.J.prototype);var NI=Rp,zI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Yt.A),BI=zI,GI=function(a){(0,O.C6)(e,a);function e(t,r,i,n){var o=a.call(this,t,r,i)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Ee.A),HI=GI,FI=E(18550),WI=E(12706),Xs=Math.PI,Ep=(0,J.$r)(),YI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.api=r},e.prototype.render=function(t,r,i){if(this.model=t,this.api=i,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return(0,zt.Qx)("nameValue",{noName:!0,value:h})},(0,p.each)(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,r){var i=t.get(["label","position"]),n=t.get("orient"),o=UI(t,r),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Xs/2},v=n==="vertical"?o.height:o.width,c=t.getModel("controlStyle"),f=c.get("show",!0),d=f?c.get("itemSize"):0,g=f?c.get("itemGap"):0,y=d+g,m=t.get(["label","rotate"])||0;m=m*Xs/180;var S,x,b,_=c.get("position",!0),A=f&&c.get("showPlayBtn",!0),w=f&&c.get("showPrevBtn",!0),C=f&&c.get("showNextBtn",!0),T=0,I=v;_==="left"||_==="bottom"?(A&&(S=[0,0],T+=y),w&&(x=[T,0],T+=y),C&&(b=[I-d,0],I-=y)):(A&&(S=[I-d,0],I-=y),w&&(x=[0,0],T+=y),C&&(b=[I-d,0],I-=y));var D=[T,I];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:v,orient:n,rotation:h[n],labelRotation:m,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:S,prevBtnPosition:x,nextBtnPosition:b,axisExtent:D,controlSize:d,controlGap:g}},e.prototype._position=function(t,r){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Lt.create(),l=o.x,u=o.y+o.height;Lt.translate(s,s,[-l,-u]),Lt.rotate(s,s,-Xs/2),Lt.translate(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=S(o),v=S(i.getBoundingRect()),c=S(n.getBoundingRect()),f=[i.x,i.y],d=[n.x,n.y];d[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(g==null||(0,p.isString)(g)){var y=g==="+"?0:1;x(f,v,h,1,y),x(d,c,h,1,1-y)}else{var y=g>=0?0:1;x(f,v,h,1,y),d[1]=f[1]+g}i.setPosition(f),n.setPosition(d),i.rotation=n.rotation=t.rotation,m(i),m(n);function m(b){b.originX=h[0][0]-b.x,b.originY=h[1][0]-b.y}function S(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function x(b,_,A,w,C){b[w]+=A[w][C]-_[w][C]}},e.prototype._createAxis=function(t,r){var i=r.getData(),n=r.get("axisType"),o=ZI(r,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new HI("value",o,t.axisExtent,n);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new it.A;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var s=new le.A({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:(0,p.extend)({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new le.A({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:(0,p.defaults)({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],(0,p.each)(l,function(u){var h=i.dataToCoord(u.value),v=s.getItemModel(u.value),c=v.getModel("itemStyle"),f=v.getModel(["emphasis","itemStyle"]),d=v.getModel(["progress","itemStyle"]),g={x:h,y:0,onclick:(0,p.bind)(o._changeTimeline,o,u.value)},y=Vp(v,c,r,g);y.ensureState("emphasis").style=f.getItemStyle(),y.ensureState("progress").style=d.getItemStyle(),(0,U.iJ)(y);var m=(0,ct.z)(y);v.get("tooltip")?(m.dataIndex=u.value,m.dataModel=n):m.dataIndex=m.dataModel=null,o._tickSymbols.push(y)})},e.prototype._renderAxisLabel=function(t,r,i,n){var o=this,s=i.getLabelModel();if(s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],(0,p.each)(u,function(h){var v=h.tickValue,c=l.getItemModel(v),f=c.getModel("label"),d=c.getModel(["emphasis","label"]),g=c.getModel(["progress","label"]),y=i.dataToCoord(h.tickValue),m=new _t.Ay({x:y,y:0,rotation:t.labelRotation-t.rotation,onclick:(0,p.bind)(o._changeTimeline,o,v),silent:!1,style:(0,q.VB)(f,{text:h.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});m.ensureState("emphasis").style=(0,q.VB)(d),m.ensureState("progress").style=(0,q.VB)(g),r.add(m),(0,U.iJ)(m),Ep(m).dataIndex=v,o._tickLabels.push(m)})}},e.prototype._renderControl=function(t,r,i,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),h=n.getPlayState(),v=n.get("inverse",!0);c(t.nextBtnPosition,"next",(0,p.bind)(this._changeTimeline,this,v?"-":"+")),c(t.prevBtnPosition,"prev",(0,p.bind)(this._changeTimeline,this,v?"+":"-")),c(t.playPosition,h?"stop":"play",(0,p.bind)(this._handlePlayClick,this,!h),!0);function c(f,d,g,y){if(f){var m=(0,ce.lo)((0,p.retrieve2)(n.get(["controlStyle",d+"BtnSize"]),o),o),S=[0,-m/2,m,m],x=XI(n,d+"Icon",S,{x:f[0],y:f[1],originX:o/2,originY:0,rotation:y?-s:0,rectHover:!0,style:l,onclick:g});x.ensureState("emphasis").style=u,r.add(x),(0,U.iJ)(x)}}},e.prototype._renderCurrentPointer=function(t,r,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(v){v.draggable=!0,v.drift=(0,p.bind)(u._handlePointerDrag,u),v.ondragend=(0,p.bind)(u._handlePointerDragend,u),Op(v,u._progressLine,s,i,n,!0)},onUpdate:function(v){Op(v,u._progressLine,s,i,n)}};this._currentPointer=Vp(l,l,this._mainGroup,{},this._currentPointer,h)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,r,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var i=this._toAxisCoord(t)[0],n=this._axis,o=k.Y6(n.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[n]=+o[n].toFixed(c)),[o,v]}var $s={min:(0,p.curry)(rn,"min"),max:(0,p.curry)(rn,"max"),average:(0,p.curry)(rn,"average"),median:(0,p.curry)(rn,"median")};function Za(a,e){if(e){var t=a.getData(),r=a.coordinateSystem,i=r&&r.dimensions;if(!eD(e)&&!(0,p.isArray)(e.coord)&&(0,p.isArray)(i)){var n=zp(e,t,r,a);if(e=(0,p.clone)(e),e.type&&$s[e.type]&&n.baseAxis&&n.valueAxis){var o=(0,p.indexOf)(i,n.baseAxis.dim),s=(0,p.indexOf)(i,n.valueAxis.dim),l=$s[e.type](t,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!(0,p.isArray)(i))e.coord=[];else for(var u=e.coord,h=0;h<2;h++)$s[u[h]]&&(u[h]=Js(t,t.mapDimension(i[h]),u[h]));return e}}function zp(a,e,t,r){var i={};return a.valueIndex!=null||a.valueDim!=null?(i.valueDataDim=a.valueIndex!=null?e.getDimension(a.valueIndex):a.valueDim,i.valueAxis=t.getAxis(rD(r,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function rD(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function Ua(a,e){return a&&a.containData&&e.coord&&!Ks(e)?a.containData(e.coord):!0}function aD(a,e,t){return a&&a.containZone&&e.coord&&t.coord&&!Ks(e)&&!Ks(t)?a.containZone(e.coord,t.coord):!0}function Bp(a,e){return a?function(t,r,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return(0,ur.Pn)(o,e[n])}:function(t,r,i,n){return(0,ur.Pn)(t.value,e[n])}}function Js(a,e,t){if(t==="average"){var r=0,i=0;return a.each(e,function(n,o){isNaN(n)||(r+=n,i++)}),r/i}else return t==="median"?a.getMedian(e):a.getDataExtent(e)[t==="max"?1:0]}var Qs=(0,J.$r)(),iD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=(0,p.createHashMap)()},e.prototype.render=function(t,r,i){var n=this,o=this.markerGroupMap;o.each(function(s){Qs(s).keep=!1}),r.eachSeries(function(s){var l=lr.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,r,i)}),o.each(function(s){!Qs(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){Qs(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var i=this;(0,p.each)(t,function(n){var o=lr.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?(0,U.QX)(l):(0,U.JC)(l))})}})},e.type="marker",e}(Yt.A),qs=iD;function Gp(a,e,t){var r=e.coordinateSystem;a.each(function(i){var n=a.getItemModel(i),o,s=k.lo(n.get("x"),t.getWidth()),l=k.lo(n.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(a.getValues(a.dimensions,i));else if(r){var u=a.get(r.dimensions[0],i),h=a.get(r.dimensions[1],i);o=r.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),a.setItemLayout(i,o)})}var nD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=lr.getMarkerModelFromSeries(n,"markPoint");o&&(Gp(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new fa),v=oD(o,t,r);r.setData(v),Gp(r.getData(),t,n),v.each(function(c){var f=v.getItemModel(c),d=f.getShallow("symbol"),g=f.getShallow("symbolSize"),y=f.getShallow("symbolRotate"),m=f.getShallow("symbolOffset"),S=f.getShallow("symbolKeepAspect");if((0,p.isFunction)(d)||(0,p.isFunction)(g)||(0,p.isFunction)(y)||(0,p.isFunction)(m)){var x=r.getRawValue(c),b=r.getDataParams(c);(0,p.isFunction)(d)&&(d=d(x,b)),(0,p.isFunction)(g)&&(g=g(x,b)),(0,p.isFunction)(y)&&(y=y(x,b)),(0,p.isFunction)(m)&&(m=m(x,b))}var _=f.getModel("itemStyle").getItemStyle(),A=(0,sr.rI)(l,"color");_.fill||(_.fill=A),v.setItemVisual(c,{symbol:d,symbolSize:g,symbolRotate:y,symbolOffset:m,symbolKeepAspect:S,style:_})}),h.updateData(v),this.group.add(h.group),v.eachItemGraphicEl(function(c){c.traverse(function(f){(0,ct.z)(f).dataModel=r})}),this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e}(qs);function oD(a,e,t){var r;a?r=(0,p.map)(a&&a.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return(0,p.extend)((0,p.extend)({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new he.A(r,t),n=(0,p.map)(t.get("data"),(0,p.curry)(Za,e));a&&(n=(0,p.filter)(n,(0,p.curry)(Ua,a)));var o=Bp(!!a,r);return i.initData(n,null,o),i}var sD=nD;function lD(a){a.registerComponentModel(tD),a.registerComponentView(sD),a.registerPreprocessor(function(e){js(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var uD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},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}(lr),hD=uD,an=(0,J.$r)(),vD=function(a,e,t,r){var i=a.getData(),n;if((0,p.isArray)(r))n=r;else{var o=r.type;if(o==="min"||o==="max"||o==="average"||o==="median"||r.xAxis!=null||r.yAxis!=null){var s=void 0,l=void 0;if(r.yAxis!=null||r.xAxis!=null)s=e.getAxis(r.yAxis!=null?"y":"x"),l=(0,p.retrieve)(r.yAxis,r.xAxis);else{var u=zp(r,i,e,a);s=u.valueAxis;var h=(0,pr.me)(i,u.valueDataDim);l=Js(i,h,o)}var v=s.dim==="x"?0:1,c=1-v,f=(0,p.clone)(r),d={coord:[]};f.type=null,f.coord=[],f.coord[c]=-1/0,d.coord[c]=1/0;var g=t.get("precision");g>=0&&(0,p.isNumber)(l)&&(l=+l.toFixed(Math.min(g,20))),f.coord[v]=d.coord[v]=l,n=[f,d,{type:o,valueIndex:r.valueIndex,value:l}]}else n=[]}var y=[Za(a,n[0]),Za(a,n[1]),(0,p.extend)({},n[2])];return y[2].type=y[2].type||null,(0,p.merge)(y[2],y[0]),(0,p.merge)(y[2],y[1]),y};function nn(a){return!isNaN(a)&&!isFinite(a)}function Hp(a,e,t,r){var i=1-a,n=r.dimensions[a];return nn(e[i])&&nn(t[i])&&e[a]===t[a]&&r.getAxis(n).containData(e[a])}function cD(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(Hp(1,t,r,a)||Hp(0,t,r,a)))return!0}return Ua(a,e[0])&&Ua(a,e[1])}function tl(a,e,t,r,i){var n=r.coordinateSystem,o=a.getItemModel(e),s,l=k.lo(o.get("x"),i.getWidth()),u=k.lo(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(a.dimensions,e));else{var h=n.dimensions,v=a.get(h[0],e),c=a.get(h[1],e);s=n.dataToPoint([v,c])}if(yr(n,"cartesian2d")){var f=n.getAxis("x"),d=n.getAxis("y"),h=n.dimensions;nn(a.get(h[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):nn(a.get(h[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}a.setItemLayout(e,s)}var fD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=lr.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=an(o).from,u=an(o).to;l.each(function(h){tl(l,h,!0,n,i),tl(u,h,!1,n,i)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Io);this.group.add(h.group);var v=pD(o,t,r),c=v.from,f=v.to,d=v.line;an(r).from=c,an(r).to=f,r.setData(d);var g=r.get("symbol"),y=r.get("symbolSize"),m=r.get("symbolRotate"),S=r.get("symbolOffset");(0,p.isArray)(g)||(g=[g,g]),(0,p.isArray)(y)||(y=[y,y]),(0,p.isArray)(m)||(m=[m,m]),(0,p.isArray)(S)||(S=[S,S]),v.from.each(function(b){x(c,b,!0),x(f,b,!1)}),d.each(function(b){var _=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[c.getItemLayout(b),f.getItemLayout(b)]),_.stroke==null&&(_.stroke=c.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:c.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(b,"symbolOffset"),fromSymbolRotate:c.getItemVisual(b,"symbolRotate"),fromSymbolSize:c.getItemVisual(b,"symbolSize"),fromSymbol:c.getItemVisual(b,"symbol"),toSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(b,"symbolOffset"),toSymbolRotate:f.getItemVisual(b,"symbolRotate"),toSymbolSize:f.getItemVisual(b,"symbolSize"),toSymbol:f.getItemVisual(b,"symbol"),style:_})}),h.updateData(d),v.line.eachItemGraphicEl(function(b){(0,ct.z)(b).dataModel=r,b.traverse(function(_){(0,ct.z)(_).dataModel=r})});function x(b,_,A){var w=b.getItemModel(_);tl(b,_,A,t,n);var C=w.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=(0,sr.rI)(l,"color")),b.setItemVisual(_,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:(0,p.retrieve2)(w.get("symbolOffset",!0),S[A?0:1]),symbolRotate:(0,p.retrieve2)(w.get("symbolRotate",!0),m[A?0:1]),symbolSize:(0,p.retrieve2)(w.get("symbolSize"),y[A?0:1]),symbol:(0,p.retrieve2)(w.get("symbol",!0),g[A?0:1]),style:C})}this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(qs);function pD(a,e,t){var r;a?r=(0,p.map)(a&&a.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return(0,p.extend)((0,p.extend)({},h),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new he.A(r,t),n=new he.A(r,t),o=new he.A([],t),s=(0,p.map)(t.get("data"),(0,p.curry)(vD,e,a,t));a&&(s=(0,p.filter)(s,(0,p.curry)(cD,a)));var l=Bp(!!a,r);return i.initData((0,p.map)(s,function(u){return u[0]}),null,l),n.initData((0,p.map)(s,function(u){return u[1]}),null,l),o.initData((0,p.map)(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}var dD=fD;function gD(a){a.registerComponentModel(hD),a.registerComponentView(dD),a.registerPreprocessor(function(e){js(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var yD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},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}(lr),mD=yD,on=(0,J.$r)(),xD=function(a,e,t,r){var i=r[0],n=r[1];if(!(!i||!n)){var o=Za(a,i),s=Za(a,n),l=o.coord,u=s.coord;l[0]=(0,p.retrieve)(l[0],-1/0),l[1]=(0,p.retrieve)(l[1],-1/0),u[0]=(0,p.retrieve)(u[0],1/0),u[1]=(0,p.retrieve)(u[1],1/0);var h=(0,p.mergeAll)([{},o,s]);return h.coord=[o.coord,s.coord],h.x0=o.x,h.y0=o.y,h.x1=s.x,h.y1=s.y,h}};function sn(a){return!isNaN(a)&&!isFinite(a)}function Fp(a,e,t,r){var i=1-a;return sn(e[i])&&sn(t[i])}function SD(a,e){var t=e.coord[0],r=e.coord[1],i={coord:t,x:e.x0,y:e.y0},n={coord:r,x:e.x1,y:e.y1};return yr(a,"cartesian2d")?t&&r&&(Fp(1,t,r,a)||Fp(0,t,r,a))?!0:aD(a,i,n):Ua(a,i)||Ua(a,n)}function Wp(a,e,t,r,i){var n=r.coordinateSystem,o=a.getItemModel(e),s,l=k.lo(o.get(t[0]),i.getWidth()),u=k.lo(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition){var h=a.getValues(["x0","y0"],e),v=a.getValues(["x1","y1"],e),c=n.clampData(h),f=n.clampData(v),d=[];t[0]==="x0"?d[0]=c[0]>f[0]?v[0]:h[0]:d[0]=c[0]>f[0]?h[0]:v[0],t[1]==="y0"?d[1]=c[1]>f[1]?v[1]:h[1]:d[1]=c[1]>f[1]?h[1]:v[1],s=r.getMarkerPosition(d,t,!0)}else{var g=a.get(t[0],e),y=a.get(t[1],e),m=[g,y];n.clampData&&n.clampData(m,m),s=n.dataToPoint(m,!0)}if(yr(n,"cartesian2d")){var S=n.getAxis("x"),x=n.getAxis("y"),g=a.get(t[0],e),y=a.get(t[1],e);sn(g)?s[0]=S.toGlobalCoord(S.getExtent()[t[0]==="x0"?0:1]):sn(y)&&(s[1]=x.toGlobalCoord(x.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Yp=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],bD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=lr.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=(0,p.map)(Yp,function(v){return Wp(s,l,v,n,i)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new it.A});this.group.add(h.group),this.markKeep(h);var v=_D(o,t,r);r.setData(v),v.each(function(c){var f=(0,p.map)(Yp,function(C){return Wp(v,c,C,t,n)}),d=o.getAxis("x").scale,g=o.getAxis("y").scale,y=d.getExtent(),m=g.getExtent(),S=[d.parse(v.get("x0",c)),d.parse(v.get("x1",c))],x=[g.parse(v.get("y0",c)),g.parse(v.get("y1",c))];k.Y6(S),k.Y6(x);var b=!(y[0]>S[1]||y[1]x[1]||m[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Ht.A),el=TD,Qr=p.curry,rl=p.each,ln=it.A,ID=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new ln),this.group.add(this._selectorGroup=new ln),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,r,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,r,i,l,s,u);var h=t.getBoxLayoutParams(),v={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),f=yt.dV(h,v,c),d=this.layoutInner(t,o,f,n,l,u),g=yt.dV(p.defaults({width:d.width,height:d.height},h),v,c);this.group.x=g.x-d.x,this.group.y=g.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=qf(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,r,i,n,o,s,l){var u=this.getContentGroup(),h=p.createHashMap(),v=r.get("selectedMode"),c=[];i.eachRawSeries(function(f){!f.get("legendHoverLink")&&c.push(f.id)}),rl(r.getData(),function(f,d){var g=f.get("name");if(!this.newlineDisabled&&(g===""||g===` -`)){var y=new ln;y.newline=!0,u.add(y);return}var m=i.getSeriesByName(g)[0];if(!h.get(g))if(m){var S=m.getData(),x=S.getVisual("legendLineStyle")||{},b=S.getVisual("legendIcon"),_=S.getVisual("style"),A=this._createItem(m,g,d,f,r,t,x,_,b,v,n);A.on("click",Qr(Zp,g,null,n,c)).on("mouseover",Qr(al,m.name,null,n,c)).on("mouseout",Qr(il,m.name,null,n,c)),i.ssr&&A.eachChild(function(w){var C=(0,ct.z)(w);C.seriesIndex=m.seriesIndex,C.dataIndex=d,C.ssrType="legend"}),h.set(g,!0)}else i.eachRawSeries(function(w){if(!h.get(g)&&w.legendVisualProvider){var C=w.legendVisualProvider;if(!C.containName(g))return;var T=C.indexOfName(g),I=C.getItemVisual(T,"style"),D=C.getItemVisual(T,"legendIcon"),L=(0,Wt.parse)(I.fill);L&&L[3]===0&&(L[3]=.2,I=p.extend(p.extend({},I),{fill:(0,Wt.stringify)(L,"rgba")}));var M=this._createItem(w,g,d,f,r,t,{},I,D,v,n);M.on("click",Qr(Zp,null,g,n,c)).on("mouseover",Qr(al,null,g,n,c)).on("mouseout",Qr(il,null,g,n,c)),i.ssr&&M.eachChild(function(P){var R=(0,ct.z)(P);R.seriesIndex=w.seriesIndex,R.dataIndex=d,R.ssrType="legend"}),h.set(g,!0)}},this)},this),o&&this._createSelector(o,r,n,s,l)},e.prototype._createSelector=function(t,r,i,n,o){var s=this.getSelectorGroup();rl(t,function(u){var h=u.type,v=new _t.Ay({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(v);var c=r.getModel("selectorLabel"),f=r.getModel(["emphasis","selectorLabel"]);(0,q.qM)(v,{normal:c,emphasis:f},{defaultText:u.title}),(0,U.iJ)(v)})},e.prototype._createItem=function(t,r,i,n,o,s,l,u,h,v,c){var f=t.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),y=o.isSelected(r),m=n.get("symbolRotate"),S=n.get("symbolKeepAspect"),x=n.get("icon");h=x||h||"roundRect";var b=DD(h,n,l,u,f,y,c),_=new ln,A=n.getModel("textStyle");if(p.isFunction(t.getLegendIcon)&&(!x||x==="inherit"))_.add(t.getLegendIcon({itemWidth:d,itemHeight:g,icon:h,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:S}));else{var w=x==="inherit"&&t.getData().getVisual("symbol")?m==="inherit"?t.getData().getVisual("symbolRotate"):m:0;_.add(LD({itemWidth:d,itemHeight:g,icon:h,iconRotate:w,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:S}))}var C=s==="left"?d+5:-5,T=s,I=o.get("formatter"),D=r;p.isString(I)&&I?D=I.replace("{name}",r!=null?r:""):p.isFunction(I)&&(D=I(r));var L=y?A.getTextColor():n.get("inactiveColor");_.add(new _t.Ay({style:(0,q.VB)(A,{text:D,x:C,y:g/2,fill:L,align:T,verticalAlign:"middle"},{inheritColor:L})}));var M=new Dt.A({shape:_.getBoundingRect(),style:{fill:"transparent"}}),P=n.getModel("tooltip");return P.get("show")&&tt.setTooltipConfig({el:M,componentModel:o,itemName:r,itemTooltipOption:P.option}),_.add(M),_.eachChild(function(R){R.silent=!0}),M.silent=!v,this.getContentGroup().add(_),(0,U.iJ)(_),_.__legendDataIndex=i,_},e.prototype.layoutInner=function(t,r,i,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();yt.aP(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var h=l.getBoundingRect(),v=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){yt.aP("horizontal",u,t.get("selectorItemGap",!0));var c=u.getBoundingRect(),f=[-c.x,-c.y],d=t.get("selectorButtonGap",!0),g=t.getOrient().index,y=g===0?"width":"height",m=g===0?"height":"width",S=g===0?"y":"x";s==="end"?f[g]+=h[y]+d:v[g]+=c[y]+d,f[1-g]+=h[m]/2-c[m]/2,u.x=f[0],u.y=f[1],l.x=v[0],l.y=v[1];var x={x:0,y:0};return x[y]=h[y]+d+c[y],x[m]=Math.max(h[m],c[m]),x[S]=Math.min(0,c[S]+f[1-g]),x}else return l.x=v[0],l.y=v[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Yt.A);function DD(a,e,t,r,i,n,o){function s(y,m){y.lineWidth==="auto"&&(y.lineWidth=m.lineWidth>0?2:0),rl(y,function(S,x){y[x]==="inherit"&&(y[x]=m[x])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=a.lastIndexOf("empty",0)===0?"fill":"stroke",v=l.getShallow("decal");u.decal=!v||v==="inherit"?r.decal:(0,Ai.w)(v,o),u.fill==="inherit"&&(u.fill=r[i]),u.stroke==="inherit"&&(u.stroke=r[h]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?r:t).opacity),s(u,r);var c=e.getModel("lineStyle"),f=c.getLineStyle();if(s(f,t),u.fill==="auto"&&(u.fill=r.fill),u.stroke==="auto"&&(u.stroke=r.fill),f.stroke==="auto"&&(f.stroke=r.fill),!n){var d=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth=d==="auto"?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),f.stroke=c.get("inactiveColor"),f.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:f}}function LD(a){var e=a.icon||"roundRect",t=(0,Tt.v5)(e,0,0,a.itemWidth,a.itemHeight,a.itemStyle.fill,a.symbolKeepAspect);return t.setStyle(a.itemStyle),t.rotation=(a.iconRotate||0)*Math.PI/180,t.setOrigin([a.itemWidth/2,a.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function Zp(a,e,t,r){il(a,e,t,r),t.dispatchAction({type:"legendToggleSelect",name:a!=null?a:e}),al(a,e,t,r)}function Up(a){for(var e=a.getZr().storage.getDisplayList(),t,r=0,i=e.length;ri[o],y=[-f.x,-f.y];r||(y[n]=h[u]);var m=[0,0],S=[-d.x,-d.y],x=p.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(g){var b=t.get("pageButtonPosition",!0);b==="end"?S[n]+=i[o]-d[o]:m[n]+=d[o]+x}S[1-n]+=f[s]/2-d[s]/2,h.setPosition(y),v.setPosition(m),c.setPosition(S);var _={x:0,y:0};if(_[o]=g?i[o]:f[o],_[s]=Math.max(f[s],d[s]),_[l]=Math.min(0,d[l]+S[1-n]),v.__rectSize=i[o],g){var A={x:0,y:0};A[o]=Math.max(i[o]-d[o]-x,0),A[s]=_[s],v.setClipPath(new Dt.A({shape:A})),v.__rectSize=A[o]}else c.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Q.oi(h,{x:w.contentPosition[0],y:w.contentPosition[1]},g?t:null),this._updatePageInfoView(t,w),_},e.prototype._pageGo=function(t,r,i){var n=this._getPageInfo(r)[t];n!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:r.id})},e.prototype._updatePageInfoView=function(t,r){var i=this._controllerGroup;p.each(["pagePrev","pageNext"],function(h){var v=h+"DataIndex",c=r[v]!=null,f=i.childOfName(h);f&&(f.setStyle("fill",c?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),f.cursor=c?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),s=r.pageIndex,l=s!=null?s+1:0,u=r.pageCount;n&&o&&n.setStyle("text",p.isString(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var r=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,s=nl[o],l=ol[o],u=this._findTargetItemIndex(r),h=i.children(),v=h[u],c=h.length,f=c?1:0,d={contentPosition:[i.x,i.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!v)return d;var g=b(v);d.contentPosition[o]=-g.s;for(var y=u+1,m=g,S=g,x=null;y<=c;++y)x=b(h[y]),(!x&&S.e>m.s+n||x&&!_(x,m.s))&&(S.i>m.i?m=S:m=x,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),S=x;for(var y=u-1,m=g,S=g,x=null;y>=-1;--y)x=b(h[y]),(!x||!_(S,x.s))&&m.i=w&&A.s<=w+n}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var r,i=this.getContentGroup(),n;return i.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===t&&(r=s)}),r!=null?r:n},e.type="legend.scroll",e}(Xp),OD=VD;function kD(a){a.registerAction("legendScroll","legendscroll",function(e,t){var r=e.scrollDataIndex;r!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(r)})})}function ND(a){(0,Y.Y)(jp),a.registerComponentModel(ED),a.registerComponentView(OD),kD(a)}function zD(a){(0,Y.Y)(jp),(0,Y.Y)(ND)}var BD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=(0,Ne.G_)(Ga.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Ga),GD=BD,sl=(0,J.$r)();function HD(a,e,t){sl(a).coordSysRecordMap.each(function(r){var i=r.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function FD(a,e){for(var t=sl(a).coordSysRecordMap,r=t.keys(),i=0;ir[t+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function XD(a){a.registerProcessor(a.PRIORITY.PROCESSOR.FILTER,function(e,t){var r=sl(t),i=r.coordSysRecordMap||(r.coordSysRecordMap=(0,p.createHashMap)());i.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=Xf(n);(0,p.each)(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,WD(t,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=(0,p.createHashMap)());h.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),i.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){Jp(i,n);return}var h=UD(l);o.enable(h.controlType,h.opt),o.setPointerChecker(n.containsPoint),me.N(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var jD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,r,i){if(a.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),HD(i,t,{pan:(0,p.bind)(ll.pan,this),zoom:(0,p.bind)(ll.zoom,this),scrollMove:(0,p.bind)(ll.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),a.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){FD(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Vs),ll={zoom:function(a,e,t,r){var i=this.range,n=i.slice(),o=a.axisModels[0];if(o){var s=ul[e](null,[r.originX,r.originY],o,t,a),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/r.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Ir(0,n,[0,100],0,h.minSpan,h.maxSpan),this.range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:Qp(function(a,e,t,r,i,n){var o=ul[r]([n.oldX,n.oldY],[n.newX,n.newY],e,i,t);return o.signal*(a[1]-a[0])*o.pixel/o.pixelLength}),scrollMove:Qp(function(a,e,t,r,i,n){var o=ul[r]([0,0],[n.scrollDelta,n.scrollDelta],e,i,t);return o.signal*(a[1]-a[0])*n.scrollDelta})};function Qp(a){return function(e,t,r,i){var n=this.range,o=n.slice(),s=e.axisModels[0];if(s){var l=a(o,s,e,t,r,i);if(Ir(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var ul={grid:function(a,e,t,r,i){var n=t.axis,o={},s=i.model.coordinateSystem.getRect();return a=a||[0,0],n.dim==="x"?(o.pixel=e[0]-a[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-a[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(a,e,t,r,i){var n=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return a=a?s.pointToCoord(a):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-a[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-a[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(a,e,t,r,i){var n=t.axis,o=i.model.coordinateSystem.getRect(),s={};return a=a||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-a[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-a[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},KD=jD;function qp(a){Os(a),a.registerComponentModel(GD),a.registerComponentView(KD),XD(a)}var $D=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=(0,Ne.G_)(Ga.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Ga),JD=$D,ja=Dt.A,td=7,QD=1,hl=30,qD=7,Ka="horizontal",ed="vertical",tL=5,eL=["line","bar","candlestick","scatter"],rL={easing:"cubicOut",duration:100,delay:0},aL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,r){this.api=r,this._onBrush=(0,p.bind)(this._onBrush,this),this._onBrushEnd=(0,p.bind)(this._onBrushEnd,this)},e.prototype.render=function(t,r,i,n){if(a.prototype.render.apply(this,arguments),me.N(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),a.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){me.IU(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var r=this._displayables.sliderGroup=new it.A;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(r),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,r=this.api,i=t.get("brushSelect"),n=i?qD:0,o=this._findCoordRect(),s={width:r.getWidth(),height:r.getHeight()},l=this._orient===Ka?{right:s.width-o.x-o.width,top:s.height-hl-td-n,width:o.width,height:hl}:{right:td,top:o.y,width:hl,height:o.height},u=yt.vs(t.option);(0,p.each)(["right","top","width","height"],function(v){u[v]==="ph"&&(u[v]=l[v])});var h=yt.dV(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===ed&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,r=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Ka&&!o?{scaleY:l?1:-1,scaleX:1}:i===Ka&&o?{scaleY:l?1:-1,scaleX:-1}:i===ed&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=r.x-u.x,t.y=r.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,r=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect");i.add(new ja({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new ja({shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:"transparent"},z2:0,onclick:(0,p.bind)(this._onClickPanel,this)}),s=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var r=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),s=n.getShadowDim&&n.getShadowDim(),l=s&&o.getDimensionInfo(s)?n.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||r[0]!==i[0]||r[1]!==i[1]){var v=o.getDataExtent(l),c=(v[1]-v[0])*.3;v=[v[0]-c,v[1]+c];var f=[0,r[1]],d=[0,r[0]],g=[[r[0],0],[0,0]],y=[],m=d[1]/(o.count()-1),S=0,x=Math.round(o.count()/r[0]),b;o.each([l],function(T,I){if(x>0&&I%x){S+=m;return}var D=T==null||isNaN(T)||T==="",L=D?0:(0,k.Cb)(T,v,f,!0);D&&!b&&I?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!D&&b&&(g.push([S,0]),y.push([S,0])),g.push([S,L]),y.push([S,L]),S+=m,b=D}),u=this._shadowPolygonPts=g,h=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[r[0],r[1]];var _=this.dataZoomModel;function A(T){var I=_.getModel(T?"selectedDataBackground":"dataBackground"),D=new it.A,L=new Se.A({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),M=new Pe.A({shape:{points:h},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(L),D.add(M),D}for(var w=0;w<3;w++){var C=A(w===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,r=t.get("showDataShadow");if(r!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();(0,p.each)(l,function(u){if(!i&&!(r!==!0&&(0,p.indexOf)(eL,u.get("type"))<0)){var h=n.getComponent(nr(o),s).axis,v=iL(o),c,f=u.coordinateSystem;v!=null&&f.getOtherAxis&&(c=f.getOtherAxis(h).inverse),v=u.getData().mapDimension(v),i={thisAxis:h,series:u,thisDim:o,otherDim:v,otherAxisInverse:c}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,r=this._displayables,i=r.handles=[null,null],n=r.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,v=l.get("brushSelect"),c=r.filler=new ja({silent:v,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new ja({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:QD,fill:"rgba(0,0,0,0)"}})),(0,p.each)([0,1],function(x){var b=l.get("handleIcon");!Tt.$V[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var _=(0,Tt.v5)(b,-1,0,2,2,null,!0);_.attr({cursor:rd(this._orient),draggable:!0,drift:(0,p.bind)(this._onDragMove,this,x),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1),z2:5});var A=_.getBoundingRect(),w=l.get("handleSize");this._handleHeight=(0,k.lo)(w,this._size[1]),this._handleWidth=A.width/A.height*this._handleHeight,_.setStyle(l.getModel("handleStyle").getItemStyle()),_.style.strokeNoScale=!0,_.rectHover=!0,_.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),(0,U.iJ)(_);var C=l.get("handleColor");C!=null&&(_.style.fill=C),o.add(i[x]=_);var T=l.getModel("textStyle");t.add(n[x]=new _t.Ay({silent:!0,invisible:!0,style:(0,q.VB)(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var f=c;if(v){var d=(0,k.lo)(l.get("moveHandleSize"),s[1]),g=r.moveHandle=new Dt.A({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),y=d*.8,m=r.moveHandleIcon=(0,Tt.v5)(l.get("moveHandleIcon"),-y/2,-y/2,y,y,"#fff",!0);m.silent=!0,m.y=s[1]+d/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var S=Math.min(s[1]/2,Math.max(d,10));f=r.moveZone=new Dt.A({invisible:!0,shape:{y:s[1]-S,height:d+S}}),f.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(m),o.add(f)}f.attr({draggable:!0,cursor:rd(this._orient),drift:(0,p.bind)(this._onDragMove,this,"all"),ondragstart:(0,p.bind)(this._showDataInfo,this,!0),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),r=this._getViewExtent();this._handleEnds=[(0,k.Cb)(t[0],[0,100],r,!0),(0,k.Cb)(t[1],[0,100],r,!0)]},e.prototype._updateInterval=function(t,r){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Ir(r,n,o,i.get("zoomLock")?"all":t,s.minSpan!=null?(0,k.Cb)(s.minSpan,l,o,!0):null,s.maxSpan!=null?(0,k.Cb)(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=(0,k.Y6)([(0,k.Cb)(n[0],o,l,!0),(0,k.Cb)(n[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(t){var r=this._displayables,i=this._handleEnds,n=(0,k.Y6)(i.slice()),o=this._size;(0,p.each)([0,1],function(f){var d=r.handles[f],g=this._handleHeight;d.attr({scaleX:g/2,scaleY:g/2,x:i[f]+(f?-1:1),y:o[1]/2-g/2})},this),r.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};r.moveHandle&&(r.moveHandle.setShape(s),r.moveZone.setShape(s),r.moveZone.getBoundingRect(),r.moveHandleIcon&&r.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=r.dataShadowSegs,u=[0,n[0],n[1],o[0]],h=0;hr[0]||i[1]<0||i[1]>r[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var r=t.offsetX,i=t.offsetY;this._brushStart=new Re.A(r,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var r=this._displayables.brushRect;if(this._brushing=!1,!!r){r.attr("ignore",!0);var i=r.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=(0,k.Y6)([(0,k.Cb)(i.x,o,s,!0),(0,k.Cb)(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(pe.ds(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,r){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new ja({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,r),h=l.transformCoordToLocal(s.x,s.y),v=this._size;u[0]=Math.max(Math.min(v[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:v[1]})},e.prototype._dispatchZoomAction=function(t){var r=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?rL:null,start:r[0],end:r[1]})},e.prototype._findCoordRect=function(){var t,r=Xf(this.dataZoomModel).infoList;if(!t&&r.length){var i=r[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(Vs);function iL(a){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[a]}function rd(a){return a==="vertical"?"ns-resize":"ew-resize"}var nL=aL;function ad(a){a.registerComponentModel(JD),a.registerComponentView(nL),Os(a)}function oL(a){(0,Y.Y)(qp),(0,Y.Y)(ad)}var sL={get:function(a,e,t){var r=p.clone((lL[a]||{})[e]);return t&&p.isArray(r)?r[r.length-1]:r}},lL={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},id=sL,nd=ae.mapVisual,uL=ae.eachVisual,hL=p.isArray,od=p.each,vL=k.Y6,cL=k.Cb,fL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&Ap(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=p.bind(t,this),this.controllerVisuals=Ys(this.option.controller,r,t),this.targetVisuals=Ys(this.option.target,r,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,r=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,n){r.push(n)}):r=J.qB(t),r},e.prototype.eachTargetSeries=function(t,r){p.each(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(r,n)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(i){i===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],p.isArray(t)&&(t=t.slice(),u=!0);var h=r?t:u?[v(t[0]),v(t[1])]:v(t);if(p.isString(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(p.isFunction(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+h[1]:t[1]===s[1]?i[1]+" "+h[0]:h[0]+" - "+h[1];return h;function v(c){return c===s[0]?"min":c===s[1]?"max":(+c).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,r=vL([t.min,t.max]);this._dataExtent=r},e.prototype.getDataDimensionIndex=function(t){var r=this.option.dimension;if(r!=null)return t.getDimensionIndex(r);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,r=this.option,i={inRange:r.inRange,outOfRange:r.outOfRange},n=r.target||(r.target={}),o=r.controller||(r.controller={});p.merge(n,i),p.merge(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),h.call(this,o);function l(v){hL(r.color)&&!v.inRange&&(v.inRange={color:r.color.slice().reverse()}),v.inRange=v.inRange||{color:t.get("gradientColor")}}function u(v,c,f){var d=v[c],g=v[f];d&&!g&&(g=v[f]={},od(d,function(y,m){if(ae.isValidType(m)){var S=id.get(m,"inactive",s);S!=null&&(g[m]=S,m==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function h(v){var c=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,f=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),g=this.getItemSymbol(),y=g||"roundRect";od(this.stateList,function(m){var S=this.itemSize,x=v[m];x||(x=v[m]={color:s?d:[d]}),x.symbol==null&&(x.symbol=c&&p.clone(c)||(s?y:[y])),x.symbolSize==null&&(x.symbolSize=f&&p.clone(f)||(s?S[0]:[S[0],S[0]])),x.symbol=nd(x.symbol,function(A){return A==="none"?y:A});var b=x.symbolSize;if(b!=null){var _=-1/0;uL(b,function(A){A>_&&(_=A)}),x.symbolSize=nd(b,function(A){return cL(A,[0,_],[0,S[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Ht.A),un=fL,sd=[20,140],pL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){a.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=sd[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=sd[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):p.isArray(r)&&(r[0]>r[1]&&r.reverse(),r[0]=Math.max(r[0],t[0]),r[1]=Math.min(r[1],t[1]))},e.prototype.completeVisualOption=function(){a.prototype.completeVisualOption.apply(this,arguments),p.each(this.stateList,function(t){var r=this.option.controller[t].symbolSize;r&&r[0]!==r[1]&&(r[0]=r[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),r=k.Y6((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]=i[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),r.push({seriesId:i.id,dataIndex:n})},this),r},e.prototype.getVisualMeta=function(t){var r=ld(this,"outOfRange",this.getExtent()),i=ld(this,"inRange",this.option.range.slice()),n=[];function o(f,d){n.push({value:f,color:t(f,d)})}for(var s=0,l=0,u=i.length,h=r.length;lt[1])break;n.push({color:this.getControllerVisual(l,"color",r),offset:s/i})}return n.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),n},e.prototype._createBarPoints=function(t,r){var i=this.visualMapModel.itemSize;return[[i[0]-r[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,i=this.visualMapModel.get("inverse");return new it.A(r==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent();yL([0,1],function(h){var v=o[h];v.setStyle("fill",r.handlesColor[h]),v.y=t[h];var c=Be(t[h],[0,l[1]],u,!0),f=this.getControllerVisual(c,"symbolSize");v.scaleX=v.scaleY=f/l[0],v.x=l[0]-f/2;var d=tt.applyTransform(i.handleLabelPoints[h],tt.getTransform(v,this.group));s[h].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,i,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,v=h.indicator;if(v){v.attr("invisible",!1);var c={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",c),d=this.getControllerVisual(t,"symbolSize"),g=Be(t,s,u,!0),y=l[0]-d/2,m={x:v.x,y:v.y};v.y=g,v.x=y;var S=tt.applyTransform(h.indicatorLabelPoint,tt.getTransform(v,this.group)),x=h.indicatorLabel;x.attr("invisible",!1);var b=this._applyTransform("left",h.mainGroup),_=this._orient,A=_==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(r),verticalAlign:A?b:"middle",align:A?"center":b});var w={x:y,y:g,style:{fill:f}},C={style:{x:S[0],y:S[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};v.x=m.x,v.y=m.y,v.animateTo(w,T),x.animateTo(C,T)}else v.attr(w),x.attr(C);this._firstShowIndicator=!1;var I=this._shapes.handleLabels;if(I)for(var D=0;Do[1]&&(v[1]=1/0),r&&(v[0]===-1/0?this._showIndicator(h,v[1],"< ",l):v[1]===1/0?this._showIndicator(h,v[0],"> ",l):this._showIndicator(h,h,"\u2248 ",l));var c=this._hoverLinkDataIndices,f=[];(r||pd(i))&&(f=this._hoverLinkDataIndices=i.findTargetDataIndices(v));var d=J.D6(c,f);this._dispatchHighDown("downplay",hn(d[0],i)),this._dispatchHighDown("highlight",hn(d[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r;if((0,Jn.R)(t.target,function(l){var u=(0,ct.z)(l);if(u.dataIndex!=null)return r=u,!0},!0),!!r){var i=this.ecModel.getSeriesByIndex(r.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(i)){var o=i.getData(r.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),r.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var r=this._shapes.handleLabels;if(r)for(var i=0;i=0&&(n.dimension=o,r.push(n))}}),a.getData().setVisual("visualMeta",r)}}];function TL(a,e,t,r){for(var i=e.targetVisuals[r],n=ae.prepareVisualTypes(i),o={color:(0,sr.rI)(a.getData(),"color")},s=0,l=n.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),a.registerAction(AL,wL),(0,p.each)(CL,function(e){a.registerVisual(a.PRIORITY.VISUAL.COMPONENT,e)}),a.registerPreprocessor(IL))}function xd(a){a.registerComponentModel(dL),a.registerComponentView(_L),md(a)}var DL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],LL[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=p.clone(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=p.map(this._pieceList,function(l){return l=p.clone(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},i=ae.listVisualTypes(),n=this.isCategory();p.each(t.pieces,function(s){p.each(i,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),p.each(r,function(s,l){var u=!1;p.each(this.stateList,function(h){u=u||o(t,h,l)||o(t.target,h,l)},this),!u&&p.each(this.stateList,function(h){(t[h]||(t[h]={}))[l]=id.get(l,h==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}a.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,r){var i=this.option,n=this._pieceList,o=(r?i:t).selected||{};if(i.selected=o,p.each(n,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),i.selectedMode==="single"){var s=!1;p.each(n,function(l,u){var h=this.getSelectedMapKey(l);o[h]&&(s?o[h]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=p.clone(t)},e.prototype.getValueState=function(t){var r=ae.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=ae.findPieceIndex(l,i);h===t&&o.push(u)},this),r.push({seriesId:n.id,dataIndex:o})},this),r},e.prototype.getRepresentValue=function(t){var r;if(this.isCategory())r=t.value;else if(t.value!=null)r=t.value;else{var i=t.interval||[];r=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],i=["",""],n=this;function o(h,v){var c=n.getRepresentValue({interval:h});v||(v=n.getValueState(c));var f=t(c,v);h[0]===-1/0?i[0]=f:h[1]===1/0?i[1]=f:r.push({value:h[0],color:f},{value:h[1],color:f})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return p.each(s,function(h){var v=h.interval;v&&(v[0]>u&&o([u,v[0]],"outOfRange"),o(v.slice()),u=v[1])},this),{stops:r,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=(0,Ne.G_)(un.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(un),LL={splitNumber:function(a){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var n=(r[1]-r[0])/i;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&a.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o","\u2265"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function Sd(a,e){var t=a.inverse;(a.orient==="vertical"?!t:t)&&e.reverse()}var ML=DL,PL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var r=this.visualMapModel,i=r.get("textGap"),n=r.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=r.itemSize,h=this._getViewData(),v=h.endsText,c=p.retrieve(r.get("showLabel",!0),!v);v&&this._renderEndsText(t,v[0],u,c,l),p.each(h.viewPieceList,function(f){var d=f.piece,g=new it.A;g.onclick=p.bind(this._onItemClick,this,d),this._enableHoverLink(g,f.indexInModelPieceList);var y=r.getRepresentValue(d);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]]),c){var m=this.visualMapModel.getValueState(y);g.add(new _t.Ay({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1}}))}t.add(g)},this),v&&this._renderEndsText(t,v[1],u,c,l),yt.aP(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var i=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:hn(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return vd(t,this.api,t.itemSize);var i=r.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,r,i,n,o){if(r){var s=new it.A,l=this.visualMapModel.textStyleModel;s.add(new _t.Ay({style:(0,q.VB)(l,{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:r})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=p.map(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?r.reverse():i&&(i=i.slice().reverse()),{viewPieceList:r,endsText:i}},e.prototype._createItemSymbol=function(t,r,i){t.add((0,Tt.v5)(this.getControllerVisual(r,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(r,"color")))},e.prototype._onItemClick=function(t){var r=this.visualMapModel,i=r.option,n=i.selectedMode;if(n){var o=p.clone(i.selected),s=r.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,p.each(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(ud),RL=PL;function bd(a){a.registerComponentModel(ML),a.registerComponentView(RL),md(a)}function EL(a){(0,Y.Y)(xd),(0,Y.Y)(bd)}var VL={label:{enabled:!0},decal:{show:!1}},_d=(0,J.$r)(),OL={};function kL(a,e){var t=a.getModel("aria");if(!t.get("enabled"))return;var r=p.clone(VL);p.merge(r.label,a.getLocaleModel().get("aria"),!1),p.merge(t.option,r,!1),i(),n();function i(){var u=t.getModel("decal"),h=u.get("show");if(h){var v=p.createHashMap();a.eachSeries(function(c){if(!c.isColorBySeries()){var f=v.get(c.type);f||(f={},v.set(c.type,f)),_d(c).scope=f}}),a.eachRawSeries(function(c){if(a.isSeriesFiltered(c))return;if(p.isFunction(c.enableAriaDecal)){c.enableAriaDecal();return}var f=c.getData();if(c.isColorBySeries()){var S=(0,io.x)(c.ecModel,c.name,OL,a.getSeriesCount()),x=f.getVisual("decal");f.setVisual("decal",b(x,S))}else{var d=c.getRawData(),g={},y=_d(c).scope;f.each(function(_){var A=f.getRawIndex(_);g[A]=_});var m=d.count();d.each(function(_){var A=g[_],w=d.getName(_)||_+"",C=(0,io.x)(c.ecModel,w,y,m),T=f.getItemVisual(A,"decal");f.setItemVisual(A,"decal",b(T,C))})}function b(_,A){var w=_?p.extend(p.extend({},A),_):A;return w.dirty=!0,w}})}}function n(){var u=e.getZr().dom;if(u){var h=a.getLocaleModel().get("aria"),v=t.getModel("label");if(v.option=p.defaults(v.option,h),!!v.get("enabled")){if(v.get("description")){u.setAttribute("aria-label",v.get("description"));return}var c=a.getSeriesCount(),f=v.get(["data","maxCount"])||10,d=v.get(["series","maxCount"])||10,g=Math.min(c,d),y;if(!(c<1)){var m=s();if(m){var S=v.get(["general","withTitle"]);y=o(S,{title:m})}else y=v.get(["general","withoutTitle"]);var x=[],b=c>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);y+=o(b,{seriesCount:c}),a.eachSeries(function(C,T){if(T1?v.get(["series","multiple",L]):v.get(["series","single",L]),I=o(I,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var M=C.getData();if(M.count()>f){var P=v.get(["data","partialData"]);I+=o(P,{displayCnt:f})}else I+=v.get(["data","allData"]);for(var R=v.get(["data","separator","middle"]),V=v.get(["data","separator","end"]),B=[],z=0;z":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},BL=function(){function a(e){var t=this._condVal=(0,p.isString)(e)?new RegExp(e):(0,p.isRegExp)(e)?e:null;if(t==null){var r="";(0,Gt.$8)(r)}}return a.prototype.evaluate=function(e){var t=typeof e;return(0,p.isString)(t)?this._condVal.test(e):(0,p.isNumber)(t)?this._condVal.test(e+""):!1},a}(),GL=function(){function a(){}return a.prototype.evaluate=function(){return this.value},a}(),HL=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&r.push(i),i=[M,P]}function h(M,P,R,V){ta(M,R)&&ta(P,V)||i.push(M,P,R,V,R,V)}function v(M,P,R,V,B,z){var W=Math.abs(P-M),$=Math.tan(W/4)*4/3,K=PC:D2&&r.push(i),r}function dl(a,e,t,r,i,n,o,s,l,u){if(ta(a,t)&&ta(e,r)&&ta(i,o)&&ta(n,s)){l.push(o,s);return}var h=2/u,v=h*h,c=o-a,f=s-e,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var g=t-a,y=r-e,m=i-o,S=n-s,x=g*g+y*y,b=m*m+S*S;if(x=0&&C=0){l.push(o,s);return}var T=[],I=[];(0,ge.YT)(a,t,i,o,.5,T),(0,ge.YT)(e,r,n,s,.5,I),dl(T[0],I[0],T[1],I[1],T[2],I[2],T[3],I[3],l,u),dl(T[4],I[4],T[5],I[5],T[6],I[6],T[7],I[7],l,u)}function eM(a,e){var t=pl(a),r=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),v=Td([l,u],h?0:1,e),c=(h?s:u)/v.length,f=0;fi,o=Td([r,i],n?0:1,e),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",h=n?"y":"x",v=a[s]/o.length,c=0;c1?null:new Re.A(g*l+a,g*u+e)}function iM(a,e,t){var r=new Re.A;Re.A.sub(r,t,e),r.normalize();var i=new Re.A;Re.A.sub(i,a,e);var n=i.dot(r);return n}function ea(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function nM(a,e,t){for(var r=a.length,i=[],n=0;no?(u.x=h.x=s+n/2,u.y=l,h.y=l+o):(u.y=h.y=l+o/2,u.x=s,h.x=s+n),nM(e,u,h)}function vn(a,e,t,r){if(t===1)r.push(e);else{var i=Math.floor(t/2),n=a(e);vn(a,n[0],i,r),vn(a,n[1],t-i,r)}return r}function oM(a,e){for(var t=[],r=0;r0)for(var _=r/t,A=-r/2;A<=r/2;A+=_){for(var w=Math.sin(A),C=Math.cos(A),T=0,x=0;x=0}var Rd="__mOriginal_";function fn(a,e,t){var r=Rd+e,i=a[r]||a[e];a[r]||(a[r]=a[e]);var n=t.replace,o=t.after,s=t.before;a[e]=function(){var l=arguments,u;return s&&s.apply(this,l),n?u=n.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function $a(a,e){var t=Rd+e;a[t]&&(a[e]=a[t],a[t]=null)}function Ed(a,e){for(var t=0;t0;u/=2){var h=0,v=0;(a&u)>0&&(h=1),(e&u)>0&&(v=1),s+=u*u*(3*h^v),v===0&&(h===1&&(a=u-1-a,e=u-1-e),l=a,a=e,e=l)}return s}function pn(a){var e=1/0,t=1/0,r=-1/0,i=-1/0,n=(0,p.map)(a,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),v=l.y+l.height/2+(u?u[5]:0);return e=Math.min(h,e),t=Math.min(v,t),r=Math.max(h,r),i=Math.max(v,i),[h,v]}),o=(0,p.map)(n,function(s,l){return{cp:s,z:dM(s[0],s[1],e,t,r,i),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Od(a){return uM(a.path,a.count)}function yl(){return{fromIndividuals:[],toIndividuals:[],count:0}}function gM(a,e,t){var r=[];function i(_){for(var A=0;A<_.length;A++){var w=_[A];cn(w)?i(w.childrenRef()):w instanceof Vt.Ay&&r.push(w)}}i(a);var n=r.length;if(!n)return yl();var o=t.dividePath||Od,s=o({path:e,count:n});if(s.length!==n)return console.error("Invalid morphing: unmatched splitted path"),yl();r=pn(r),s=pn(s);for(var l=t.done,u=t.during,h=t.individualDelay,v=new Me.Ay,c=0;c=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var n=l.length,u=Math.ceil(n/2);t[i].many=l.slice(u,n),t[s].many=l.slice(0,u),s++}return t}var mM={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,h;kd(a)&&(u=a,h=e),kd(e)&&(u=e,h=a);function v(m,S,x,b,_){var A=m.many,w=m.one;if(A.length===1&&!_){var C=S?A[0]:w,T=S?w:A[0];if(cn(C))v({many:[C],one:T},!0,x,b,!0);else{var I=s?(0,p.defaults)({delay:s(x,b)},l):l;gl(C,T,I),n(C,T,C,T,I)}}else for(var D=(0,p.defaults)({dividePath:mM[t],individualDelay:s&&function(B,z,W,$){return s(B+x,b)}},l),L=S?gM(A,w,D):yM(w,A,D),M=L.fromIndividuals,P=L.toIndividuals,R=M.length,V=0;Ve.length,f=u?Nd(h,u):Nd(c?e:a,[c?a:e]),d=0,g=0;gzd))for(var n=r.getIndices(),o=0;o0&&A.group.traverse(function(C){C instanceof Vt.Ay&&!C.animators.length&&C.animateFrom({style:{opacity:0}},w)})})}function Yd(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function Zd(a){return(0,p.isArray)(a)?a.sort().join(","):a}function hr(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function CM(a,e){var t=(0,p.createHashMap)(),r=(0,p.createHashMap)(),i=(0,p.createHashMap)();(0,p.each)(a.oldSeries,function(o,s){var l=a.oldDataGroupIds[s],u=a.oldData[s],h=Yd(o),v=Zd(h);r.set(v,{dataGroupId:l,data:u}),(0,p.isArray)(h)&&(0,p.each)(h,function(c){i.set(c,{key:v,dataGroupId:l,data:u})})});function n(o){t.get(o)&&(0,Gt.R8)("Duplicated seriesKey in universalTransition "+o)}return(0,p.each)(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=Yd(o),h=Zd(u),v=r.get(h);if(v)t.set(h,{oldSeries:[{dataGroupId:v.dataGroupId,divide:hr(v.data),data:v.data}],newSeries:[{dataGroupId:s,divide:hr(l),data:l}]});else if((0,p.isArray)(u)){var c=[];(0,p.each)(u,function(g){var y=r.get(g);y.data&&c.push({dataGroupId:y.dataGroupId,divide:hr(y.data),data:y.data})}),c.length&&t.set(h,{oldSeries:c,newSeries:[{dataGroupId:s,data:l,divide:hr(l)}]})}else{var f=i.get(u);if(f){var d=t.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:hr(f.data)}],newSeries:[]},t.set(f.key,d)),d.newSeries.push({dataGroupId:s,data:l,divide:hr(l)})}}}}),t}function Ud(a,e){for(var t=0;t=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:hr(e.oldData[s]),groupIdDim:o.dimension})}),(0,p.each)((0,J.qB)(a.to),function(o){var s=Ud(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();n.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:hr(l),groupIdDim:o.dimension})}}),i.length>0&&n.length>0&&Wd(i,n,r)}function IM(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){(0,p.each)((0,J.qB)(r.seriesTransition),function(i){(0,p.each)((0,J.qB)(i.to),function(n){for(var o=r.updatedSeries,s=0;s1&&arguments[1]!==void 0?arguments[1]:60,X=null;return function(){for(var dt=this,p=arguments.length,Ft=new Array(p),gt=0;gt=0;Pt--)(ut=N[Pt])&&(Z=(j<3?ut(Z):j>3?ut(G,H,Z):ut(G,H))||Z);return j>3&&Z&&Object.defineProperty(G,H,Z),Z}function p(N,G){return function(H,F){G(H,F,N)}}function Ft(N,G,H,F,j,Z){function ut(Oe){if(Oe!==void 0&&typeof Oe!="function")throw new TypeError("Function expected");return Oe}for(var Pt=F.kind,re=Pt==="getter"?"get":Pt==="setter"?"set":"value",ft=!G&&N?F.static?N:N.prototype:null,Bt=G||(ft?Object.getOwnPropertyDescriptor(ft,F.name):{}),Qt,He=!1,Et=H.length-1;Et>=0;Et--){var oe={};for(var fe in F)oe[fe]=fe==="access"?{}:F[fe];for(var fe in F.access)oe.access[fe]=F.access[fe];oe.addInitializer=function(Oe){if(He)throw new TypeError("Cannot add initializers after decoration has completed");Z.push(ut(Oe||null))};var Le=(0,H[Et])(Pt==="accessor"?{get:Bt.get,set:Bt.set}:Bt[re],oe);if(Pt==="accessor"){if(Le===void 0)continue;if(Le===null||typeof Le!="object")throw new TypeError("Object expected");(Qt=ut(Le.get))&&(Bt.get=Qt),(Qt=ut(Le.set))&&(Bt.set=Qt),(Qt=ut(Le.init))&&j.unshift(Qt)}else(Qt=ut(Le))&&(Pt==="field"?j.unshift(Qt):Bt[re]=Qt)}ft&&Object.defineProperty(ft,F.name,Bt),He=!0}function gt(N,G,H){for(var F=arguments.length>2,j=0;j0&&Z[Z.length-1])&&(ft[0]===6||ft[0]===2)){H=0;continue}if(ft[0]===3&&(!Z||ft[1]>Z[0]&&ft[1]=N.length&&(N=void 0),{value:N&&N[F++],done:!N}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ie(N,G){var H=typeof Symbol=="function"&&N[Symbol.iterator];if(!H)return N;var F=H.call(N),j,Z=[],ut;try{for(;(G===void 0||G-- >0)&&!(j=F.next()).done;)Z.push(j.value)}catch(Pt){ut={error:Pt}}finally{try{j&&!j.done&&(H=F.return)&&H.call(F)}finally{if(ut)throw ut.error}}return Z}function Kt(){for(var N=[],G=0;G1||re(Et,fe)})},oe&&(j[Et]=oe(j[Et])))}function re(Et,oe){try{ft(F[Et](oe))}catch(fe){He(Z[0][3],fe)}}function ft(Et){Et.value instanceof De?Promise.resolve(Et.value.v).then(Bt,Qt):He(Z[0][2],Et)}function Bt(Et){re("next",Et)}function Qt(Et){re("throw",Et)}function He(Et,oe){Et(oe),Z.shift(),Z.length&&re(Z[0][0],Z[0][1])}}function Qa(N){var G,H;return G={},F("next"),F("throw",function(j){throw j}),F("return"),G[Symbol.iterator]=function(){return this},G;function F(j,Z){G[j]=N[j]?function(ut){return(H=!H)?{value:De(N[j](ut)),done:!1}:Z?Z(ut):ut}:Z}}function qa(N){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var G=N[Symbol.asyncIterator],H;return G?G.call(N):(N=typeof St=="function"?St(N):N[Symbol.iterator](),H={},F("next"),F("throw"),F("return"),H[Symbol.asyncIterator]=function(){return this},H);function F(Z){H[Z]=N[Z]&&function(ut){return new Promise(function(Pt,re){ut=N[Z](ut),j(Pt,re,ut.done,ut.value)})}}function j(Z,ut,Pt,re){Promise.resolve(re).then(function(ft){Z({value:ft,done:Pt})},ut)}}function ti(N,G){return Object.defineProperty?Object.defineProperty(N,"raw",{value:G}):N.raw=G,N}var gn=Object.create?function(N,G){Object.defineProperty(N,"default",{enumerable:!0,value:G})}:function(N,G){N.default=G};function ei(N){if(N&&N.__esModule)return N;var G={};if(N!=null)for(var H in N)H!=="default"&&Object.prototype.hasOwnProperty.call(N,H)&&Te(G,N,H);return gn(G,N),G}function bt(N){return N&&N.__esModule?N:{default:N}}function Vt(N,G,H,F){if(H==="a"&&!F)throw new TypeError("Private accessor was defined without a getter");if(typeof G=="function"?N!==G||!F:!G.has(N))throw new TypeError("Cannot read private member from an object whose class did not declare it");return H==="m"?F:H==="a"?F.call(N):F?F.value:G.get(N)}function ue(N,G,H,F,j){if(F==="m")throw new TypeError("Private method is not writable");if(F==="a"&&!j)throw new TypeError("Private accessor was defined without a setter");if(typeof G=="function"?N!==G||!j:!G.has(N))throw new TypeError("Cannot write private member to an object whose class did not declare it");return F==="a"?j.call(N,H):j?j.value=H:G.set(N,H),H}function ce(N,G){if(G===null||typeof G!="object"&&typeof G!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof N=="function"?G===N:N.has(G)}function na(N,G,H){if(G!=null){if(typeof G!="object"&&typeof G!="function")throw new TypeError("Object expected.");var F,j;if(H){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");F=G[Symbol.asyncDispose]}if(F===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");F=G[Symbol.dispose],H&&(j=F)}if(typeof F!="function")throw new TypeError("Object not disposable.");j&&(F=function(){try{j.call(this)}catch(Z){return Promise.reject(Z)}}),N.stack.push({value:G,dispose:F,async:H})}else H&&N.stack.push({async:!0});return G}var oa=typeof SuppressedError=="function"?SuppressedError:function(N,G,H){var F=new Error(H);return F.name="SuppressedError",F.error=N,F.suppressed=G,F};function Vr(N){function G(Z){N.error=N.hasError?new oa(Z,N.error,"An error was suppressed during disposal."):Z,N.hasError=!0}var H,F=0;function j(){for(;H=N.stack.pop();)try{if(!H.async&&F===1)return F=0,N.stack.push(H),Promise.resolve().then(j);if(H.dispose){var Z=H.dispose.call(H.value);if(H.async)return F|=2,Promise.resolve(Z).then(j,function(ut){return G(ut),j()})}else F|=1}catch(ut){G(ut)}if(F===1)return N.hasError?Promise.reject(N.error):Promise.resolve();if(N.hasError)throw N.error}return j()}function sa(N,G){return typeof N=="string"&&/^\.\.?\//.test(N)?N.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(H,F,j,Z,ut){return F?G?".jsx":".js":j&&(!Z||!ut)?H:j+Z+"."+ut.toLowerCase()+"js"}):N}rt.default={__extends:pt,__assign:Y,__rest:X,__decorate:dt,__param:p,__esDecorate:Ft,__runInitializers:gt,__propKey:ht,__setFunctionName:It,__metadata:vt,__awaiter:ie,__generator:ee,__createBinding:Te,__exportStar:ne,__values:St,__read:Ie,__spread:Kt,__spreadArrays:ia,__spreadArray:Ve,__await:De,__asyncGenerator:Ja,__asyncDelegator:Qa,__asyncValues:qa,__makeTemplateObject:ti,__importStar:ei,__importDefault:bt,__classPrivateFieldGet:Vt,__classPrivateFieldSet:ue,__classPrivateFieldIn:ce,__addDisposableResource:na,__disposeResources:Vr,__rewriteRelativeImportExtension:sa}}}]); +`:"
",m=v.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,f,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],f,null,c)})},e.prototype._showSeriesItemTooltip=function(t,r,i){var n=this._ecModel,o=(0,ft.z)(r),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,v=o.dataType,c=u.getData(v),f=this._renderMode,d=t.positionDefault,g=Fa([c.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),y=g.get("trigger");if(!(y!=null&&y!=="item")){var m=u.getDataParams(h,v),S=new zt.lb;m.marker=S.makeTooltipMarker("item",(0,qt.he)(m.color),f);var x=(0,Ha.L)(u.formatTooltip(h,!1,v)),b=g.get("order"),_=g.get("valueFormatter"),A=x.frag,w=A?(0,zt.Yu)(_?(0,p.extend)({valueFormatter:_},A):A,S,f,b,n.get("useUTC"),g.get("textStyle")):x.text,C="item_"+u.name+"_"+h;this._showOrMove(g,function(){this._showTooltipContent(g,w,m,C,t.offsetX,t.offsetY,t.position,t.target,S)}),i({type:"showTip",dataIndexInside:h,dataIndex:c.getRawIndex(h),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,r,i){var n=this._renderMode==="html",o=(0,ft.z)(r),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if((0,p.isString)(l)){var h=l;l={content:h,formatter:h},u=!0}u&&n&&l.content&&(l=(0,p.clone)(l),l.content=(0,He.Me)(l.content));var v=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&v.push(c),v.push({formatter:l.content});var f=t.positionDefault,d=Fa(v,this._tooltipModel,f?{position:f}:null),g=d.get("content"),y=Math.random()+"",m=new zt.lb;this._showOrMove(d,function(){var S=(0,p.clone)(d.get("formatterParams")||{});this._showTooltipContent(d,g,S,y,t.offsetX,t.offsetY,t.position,r,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,r,i,n,o,s,l,u,h){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var v=this._tooltipContent;v.setEnterable(t.get("enterable"));var c=t.get("formatter");l=l||t.get("position");var f=r,d=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor")),g=d.color;if(c)if((0,p.isString)(c)){var y=t.ecModel.get("useUTC"),m=(0,p.isArray)(i)?i[0]:i,S=m&&m.axisType&&m.axisType.indexOf("time")>=0;f=c,S&&(f=(0,iI.GP)(m.axisValue,f,y)),f=(0,qt.YK)(f,i,!0)}else if((0,p.isFunction)(c)){var x=(0,p.bind)(function(b,_){b===this._ticket&&(v.setContent(_,h,t,g,l),this._updatePosition(t,l,o,s,v,i,u))},this);this._ticket=n,f=c(i,n,x)}else f=c;v.setContent(f,h,t,g,l),v.show(t,g),this._updatePosition(t,l,o,s,v,i,u)}},e.prototype._getNearestPoint=function(t,r,i,n){if(i==="axis"||(0,p.isArray)(r))return{color:n||(this._renderMode==="html"?"#fff":"none")};if(!(0,p.isArray)(r))return{color:n||r.color||r.borderColor}},e.prototype._updatePosition=function(t,r,i,n,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();r=r||t.get("position");var v=o.getSize(),c=t.get("align"),f=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),(0,p.isFunction)(r)&&(r=r([i,n],s,o.el,d,{viewSize:[u,h],contentSize:v.slice()})),(0,p.isArray)(r))i=(0,k.lo)(r[0],u),n=(0,k.lo)(r[1],h);else if((0,p.isObject)(r)){var g=r;g.width=v[0],g.height=v[1];var y=(0,yt.dV)(g,{width:u,height:h});i=y.x,n=y.y,c=null,f=null}else if((0,p.isString)(r)&&l){var m=uI(r,d,v,t.get("borderWidth"));i=m[0],n=m[1]}else{var m=sI(i,n,o,u,h,c?null:20,f?null:20);i=m[0],n=m[1]}if(c&&(i-=Sp(c)?v[0]/2:c==="right"?v[0]:0),f&&(n-=Sp(f)?v[1]/2:f==="bottom"?v[1]:0),vp(t)){var m=lI(i,n,o,u,h);i=m[0],n=m[1]}o.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,r){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===t.length;return o&&(0,p.each)(i,function(s,l){var u=s.dataByAxis||[],h=t[l]||{},v=h.dataByAxis||[];o=o&&u.length===v.length,o&&(0,p.each)(u,function(c,f){var d=v[f]||{},g=c.seriesDataIndices||[],y=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&g.length===y.length,o&&(0,p.each)(g,function(m,S){var x=y[S];o=o&&m.seriesIndex===x.seriesIndex&&m.dataIndex===x.dataIndex}),n&&(0,p.each)(c.seriesDataIndices,function(m){var S=m.seriesIndex,x=r[S],b=n[S];x&&b&&b.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=r,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,r){Kt.A.node||!r.getDom()||((0,me.IU)(this,"_updatePosition"),this._tooltipContent.dispose(),ws("itemTooltip",r))},e.type="tooltip",e}(Yt.A);function Fa(a,e,t){var r=e.ecModel,i;t?(i=new Xt.A(t,r,r),i=new Xt.A(e.option,i,r)):i=e;for(var n=a.length-1;n>=0;n--){var o=a[n];o&&(o instanceof Xt.A&&(o=o.get("tooltip",!0)),(0,p.isString)(o)&&(o={formatter:o}),o&&(i=new Xt.A(o,i,r)))}return i}function xp(a,e){return a.dispatchAction||(0,p.bind)(e.dispatchAction,e)}function sI(a,e,t,r,i,n,o){var s=t.getSize(),l=s[0],u=s[1];return n!=null&&(a+l+n+2>r?a-=l+n:a+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[a,e]}function lI(a,e,t,r,i){var n=t.getSize(),o=n[0],s=n[1];return a=Math.min(a+o,r)-o,e=Math.min(e+s,i)-s,a=Math.max(a,0),e=Math.max(e,0),[a,e]}function uI(a,e,t,r){var i=t[0],n=t[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=e.width,h=e.height;switch(a){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-n/2;break;case"top":s=e.x+u/2-i/2,l=e.y-n-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o,l=e.y+h/2-n/2;break;case"right":s=e.x+u+o,l=e.y+h/2-n/2}return[s,l]}function Sp(a){return a==="center"||a==="middle"}function hI(a,e,t){var r=(0,J.HB)(a).queryOptionMap,i=r.keys()[0];if(!(!i||i==="series")){var n=(0,J.JO)(e,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=(0,ft.z)(u).tooltipConfig;if(h&&h.name===a.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var vI=oI;function cI(a){(0,Y.Y)(Ba),a.registerComponentModel(YT),a.registerComponentView(vI),a.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},p.noop),a.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},p.noop)}var fI=["rect","polygon","keep","clear"];function pI(a,e){var t=(0,J.qB)(a?a.brush:[]);if(t.length){var r=[];p.each(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var i=a&&a.toolbox;p.isArray(i)&&(i=i[0]),i||(i={feature:{}},a.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),dI(s),e&&!s.length&&s.push.apply(s,fI)}}function dI(a){var e={};p.each(a,function(t){e[t]=1}),a.length=0,p.each(e,function(t,r){a.push(r)})}var sr=E(37395),bp=p.each;function _p(a){if(a){for(var e in a)if(a.hasOwnProperty(e))return!0}}function Ys(a,e,t){var r={};return bp(e,function(n){var o=r[n]=i();bp(a[n],function(s,l){if(ae.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new ae(u),l==="opacity"&&(u=p.clone(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ae(u))}})}),r;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function Ap(a,e,t){var r;p.each(t,function(i){e.hasOwnProperty(i)&&_p(e[i])&&(r=!0)}),r&&p.each(t,function(i){e.hasOwnProperty(i)&&_p(e[i])?a[i]=p.clone(e[i]):delete a[i]})}function gI(a,e,t,r,i,n){var o={};p.each(a,function(v){var c=ae.prepareVisualTypes(e[v]);o[v]=c});var s;function l(v){return(0,sr.Ez)(t,s,v)}function u(v,c){(0,sr.oZ)(t,s,v,c)}n==null?t.each(h):t.each([n],h);function h(v,c){s=n==null?v:c;var f=t.getRawDataItem(s);if(!(f&&f.visualMap===!1))for(var d=r.call(i,v),g=e[d],y=o[d],m=0,S=y.length;me[0][1]&&(e[0][1]=n[0]),n[1]e[1][1]&&(e[1][1]=n[1])}return e&&Lp(e)}};function Lp(a){return new vt.A(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}var wI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r,this.model,(this._brushController=new Xo(r.getZr())).on("brush",p.bind(this._onBrush,this)).mount()},e.prototype.render=function(t,r,i,n){this.model=t,this._updateController(t,r,i,n)},e.prototype.updateTransform=function(t,r,i,n){Ip(r),this._updateController(t,r,i,n)},e.prototype.updateVisual=function(t,r,i,n){this.updateTransform(t,r,i,n)},e.prototype.updateView=function(t,r,i,n){this._updateController(t,r,i,n)},e.prototype._updateController=function(t,r,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:p.clone(i),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:p.clone(i),$from:r})},e.type="brush",e}(Yt.A),CI=wI,TI="#ddd",II=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&Ap(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:TI},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=p.map(t,function(r){return Mp(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Mp(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}(Ht.A);function Mp(a,e){return p.merge({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new Xt.A(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}var DI=II,LI=["rect","polygon","lineX","lineY","keep","clear"],MI=function(a){(0,O.C6)(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i){var n,o,s;r.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,p.each(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,r,i){this.render(t,r,i)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),i={};return p.each(t.get("type",!0),function(n){r[n]&&(i[n]=r[n])}),i},e.prototype.onclick=function(t,r,i){var n=this._brushType,o=this._brushMode;i==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:LI.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 r},e}(Ce),PI=MI;function RI(a){a.registerComponentView(CI),a.registerComponentModel(DI),a.registerPreprocessor(pI),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,xI),a.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),a.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},p.noop),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},p.noop),$r("brush",PI)}var EI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Ht.A),VI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){if(this.group.removeAll(),!!t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=p.retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),h=new _t.Ay({style:(0,q.VB)(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),v=h.getBoundingRect(),c=t.get("subtext"),f=new _t.Ay({style:(0,q.VB)(s,{text:c,fill:s.getTextColor(),y:v.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),g=t.get("sublink"),y=t.get("triggerEvent",!0);h.silent=!d&&!y,f.silent=!g&&!y,d&&h.on("click",function(){(0,qt.JW)(d,"_"+t.get("target"))}),g&&f.on("click",function(){(0,qt.JW)(g,"_"+t.get("subtarget"))}),(0,ft.z)(h).eventData=(0,ft.z)(f).eventData=y?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(h),c&&n.add(f);var m=n.getBoundingRect(),S=t.getBoxLayoutParams();S.width=m.width,S.height=m.height;var x=(0,yt.dV)(S,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),n.x=x.x,n.y=x.y,n.markRedraw();var b={align:l,verticalAlign:u};h.setStyle(b),f.setStyle(b),m=n.getBoundingRect();var _=x.margin,A=t.getItemStyle(["color","opacity"]);A.fill=t.get("backgroundColor");var w=new Dt.A({shape:{x:m.x-_[3],y:m.y-_[0],width:m.width+_[1]+_[3],height:m.height+_[0]+_[2],r:t.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});n.add(w)}},e.type="title",e}(Yt.A);function OI(a){a.registerComponentModel(EI),a.registerComponentView(VI)}var kI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var r=this._data.count();this.option.loop?t=(t%r+r)%r:(t>=r&&(t=r-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,r=t.data||[],i=t.axisType,n=this._names=[],o;i==="category"?(o=[],(0,p.each)(r,function(u,h){var v=(0,J.vS)((0,J.vj)(u),""),c;(0,p.isObject)(u)?(c=(0,p.clone)(u),c.value=h):c=h,o.push(c),n.push(v)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new he.A([{name:"value",type:s}],this);l.initData(o,n)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Ht.A),Pp=kI,Rp=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=(0,Ne.G_)(Pp.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Pp);(0,p.mixin)(Rp,Ha.J.prototype);var NI=Rp,zI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Yt.A),BI=zI,GI=function(a){(0,O.C6)(e,a);function e(t,r,i,n){var o=a.call(this,t,r,i)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Ee.A),HI=GI,FI=E(18550),WI=E(12706),Xs=Math.PI,Ep=(0,J.$r)(),YI=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.api=r},e.prototype.render=function(t,r,i){if(this.model=t,this.api=i,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return(0,zt.Qx)("nameValue",{noName:!0,value:h})},(0,p.each)(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,r){var i=t.get(["label","position"]),n=t.get("orient"),o=UI(t,r),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Xs/2},v=n==="vertical"?o.height:o.width,c=t.getModel("controlStyle"),f=c.get("show",!0),d=f?c.get("itemSize"):0,g=f?c.get("itemGap"):0,y=d+g,m=t.get(["label","rotate"])||0;m=m*Xs/180;var S,x,b,_=c.get("position",!0),A=f&&c.get("showPlayBtn",!0),w=f&&c.get("showPrevBtn",!0),C=f&&c.get("showNextBtn",!0),T=0,I=v;_==="left"||_==="bottom"?(A&&(S=[0,0],T+=y),w&&(x=[T,0],T+=y),C&&(b=[I-d,0],I-=y)):(A&&(S=[I-d,0],I-=y),w&&(x=[0,0],T+=y),C&&(b=[I-d,0],I-=y));var D=[T,I];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:v,orient:n,rotation:h[n],labelRotation:m,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:S,prevBtnPosition:x,nextBtnPosition:b,axisExtent:D,controlSize:d,controlGap:g}},e.prototype._position=function(t,r){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Lt.create(),l=o.x,u=o.y+o.height;Lt.translate(s,s,[-l,-u]),Lt.rotate(s,s,-Xs/2),Lt.translate(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=S(o),v=S(i.getBoundingRect()),c=S(n.getBoundingRect()),f=[i.x,i.y],d=[n.x,n.y];d[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(g==null||(0,p.isString)(g)){var y=g==="+"?0:1;x(f,v,h,1,y),x(d,c,h,1,1-y)}else{var y=g>=0?0:1;x(f,v,h,1,y),d[1]=f[1]+g}i.setPosition(f),n.setPosition(d),i.rotation=n.rotation=t.rotation,m(i),m(n);function m(b){b.originX=h[0][0]-b.x,b.originY=h[1][0]-b.y}function S(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function x(b,_,A,w,C){b[w]+=A[w][C]-_[w][C]}},e.prototype._createAxis=function(t,r){var i=r.getData(),n=r.get("axisType"),o=ZI(r,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new HI("value",o,t.axisExtent,n);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new it.A;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var s=new le.A({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:(0,p.extend)({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new le.A({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:(0,p.defaults)({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],(0,p.each)(l,function(u){var h=i.dataToCoord(u.value),v=s.getItemModel(u.value),c=v.getModel("itemStyle"),f=v.getModel(["emphasis","itemStyle"]),d=v.getModel(["progress","itemStyle"]),g={x:h,y:0,onclick:(0,p.bind)(o._changeTimeline,o,u.value)},y=Vp(v,c,r,g);y.ensureState("emphasis").style=f.getItemStyle(),y.ensureState("progress").style=d.getItemStyle(),(0,U.iJ)(y);var m=(0,ft.z)(y);v.get("tooltip")?(m.dataIndex=u.value,m.dataModel=n):m.dataIndex=m.dataModel=null,o._tickSymbols.push(y)})},e.prototype._renderAxisLabel=function(t,r,i,n){var o=this,s=i.getLabelModel();if(s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],(0,p.each)(u,function(h){var v=h.tickValue,c=l.getItemModel(v),f=c.getModel("label"),d=c.getModel(["emphasis","label"]),g=c.getModel(["progress","label"]),y=i.dataToCoord(h.tickValue),m=new _t.Ay({x:y,y:0,rotation:t.labelRotation-t.rotation,onclick:(0,p.bind)(o._changeTimeline,o,v),silent:!1,style:(0,q.VB)(f,{text:h.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});m.ensureState("emphasis").style=(0,q.VB)(d),m.ensureState("progress").style=(0,q.VB)(g),r.add(m),(0,U.iJ)(m),Ep(m).dataIndex=v,o._tickLabels.push(m)})}},e.prototype._renderControl=function(t,r,i,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),h=n.getPlayState(),v=n.get("inverse",!0);c(t.nextBtnPosition,"next",(0,p.bind)(this._changeTimeline,this,v?"-":"+")),c(t.prevBtnPosition,"prev",(0,p.bind)(this._changeTimeline,this,v?"+":"-")),c(t.playPosition,h?"stop":"play",(0,p.bind)(this._handlePlayClick,this,!h),!0);function c(f,d,g,y){if(f){var m=(0,ce.lo)((0,p.retrieve2)(n.get(["controlStyle",d+"BtnSize"]),o),o),S=[0,-m/2,m,m],x=XI(n,d+"Icon",S,{x:f[0],y:f[1],originX:o/2,originY:0,rotation:y?-s:0,rectHover:!0,style:l,onclick:g});x.ensureState("emphasis").style=u,r.add(x),(0,U.iJ)(x)}}},e.prototype._renderCurrentPointer=function(t,r,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(v){v.draggable=!0,v.drift=(0,p.bind)(u._handlePointerDrag,u),v.ondragend=(0,p.bind)(u._handlePointerDragend,u),Op(v,u._progressLine,s,i,n,!0)},onUpdate:function(v){Op(v,u._progressLine,s,i,n)}};this._currentPointer=Vp(l,l,this._mainGroup,{},this._currentPointer,h)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,r,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var i=this._toAxisCoord(t)[0],n=this._axis,o=k.Y6(n.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[n]=+o[n].toFixed(c)),[o,v]}var $s={min:(0,p.curry)(rn,"min"),max:(0,p.curry)(rn,"max"),average:(0,p.curry)(rn,"average"),median:(0,p.curry)(rn,"median")};function Za(a,e){if(e){var t=a.getData(),r=a.coordinateSystem,i=r&&r.dimensions;if(!eD(e)&&!(0,p.isArray)(e.coord)&&(0,p.isArray)(i)){var n=zp(e,t,r,a);if(e=(0,p.clone)(e),e.type&&$s[e.type]&&n.baseAxis&&n.valueAxis){var o=(0,p.indexOf)(i,n.baseAxis.dim),s=(0,p.indexOf)(i,n.valueAxis.dim),l=$s[e.type](t,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!(0,p.isArray)(i))e.coord=[];else for(var u=e.coord,h=0;h<2;h++)$s[u[h]]&&(u[h]=Js(t,t.mapDimension(i[h]),u[h]));return e}}function zp(a,e,t,r){var i={};return a.valueIndex!=null||a.valueDim!=null?(i.valueDataDim=a.valueIndex!=null?e.getDimension(a.valueIndex):a.valueDim,i.valueAxis=t.getAxis(rD(r,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function rD(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function Ua(a,e){return a&&a.containData&&e.coord&&!Ks(e)?a.containData(e.coord):!0}function aD(a,e,t){return a&&a.containZone&&e.coord&&t.coord&&!Ks(e)&&!Ks(t)?a.containZone(e.coord,t.coord):!0}function Bp(a,e){return a?function(t,r,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return(0,ur.Pn)(o,e[n])}:function(t,r,i,n){return(0,ur.Pn)(t.value,e[n])}}function Js(a,e,t){if(t==="average"){var r=0,i=0;return a.each(e,function(n,o){isNaN(n)||(r+=n,i++)}),r/i}else return t==="median"?a.getMedian(e):a.getDataExtent(e)[t==="max"?1:0]}var Qs=(0,J.$r)(),iD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=(0,p.createHashMap)()},e.prototype.render=function(t,r,i){var n=this,o=this.markerGroupMap;o.each(function(s){Qs(s).keep=!1}),r.eachSeries(function(s){var l=lr.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,r,i)}),o.each(function(s){!Qs(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){Qs(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var i=this;(0,p.each)(t,function(n){var o=lr.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?(0,U.QX)(l):(0,U.JC)(l))})}})},e.type="marker",e}(Yt.A),qs=iD;function Gp(a,e,t){var r=e.coordinateSystem;a.each(function(i){var n=a.getItemModel(i),o,s=k.lo(n.get("x"),t.getWidth()),l=k.lo(n.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(a.getValues(a.dimensions,i));else if(r){var u=a.get(r.dimensions[0],i),h=a.get(r.dimensions[1],i);o=r.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),a.setItemLayout(i,o)})}var nD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=lr.getMarkerModelFromSeries(n,"markPoint");o&&(Gp(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new fa),v=oD(o,t,r);r.setData(v),Gp(r.getData(),t,n),v.each(function(c){var f=v.getItemModel(c),d=f.getShallow("symbol"),g=f.getShallow("symbolSize"),y=f.getShallow("symbolRotate"),m=f.getShallow("symbolOffset"),S=f.getShallow("symbolKeepAspect");if((0,p.isFunction)(d)||(0,p.isFunction)(g)||(0,p.isFunction)(y)||(0,p.isFunction)(m)){var x=r.getRawValue(c),b=r.getDataParams(c);(0,p.isFunction)(d)&&(d=d(x,b)),(0,p.isFunction)(g)&&(g=g(x,b)),(0,p.isFunction)(y)&&(y=y(x,b)),(0,p.isFunction)(m)&&(m=m(x,b))}var _=f.getModel("itemStyle").getItemStyle(),A=(0,sr.rI)(l,"color");_.fill||(_.fill=A),v.setItemVisual(c,{symbol:d,symbolSize:g,symbolRotate:y,symbolOffset:m,symbolKeepAspect:S,style:_})}),h.updateData(v),this.group.add(h.group),v.eachItemGraphicEl(function(c){c.traverse(function(f){(0,ft.z)(f).dataModel=r})}),this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e}(qs);function oD(a,e,t){var r;a?r=(0,p.map)(a&&a.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return(0,p.extend)((0,p.extend)({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new he.A(r,t),n=(0,p.map)(t.get("data"),(0,p.curry)(Za,e));a&&(n=(0,p.filter)(n,(0,p.curry)(Ua,a)));var o=Bp(!!a,r);return i.initData(n,null,o),i}var sD=nD;function lD(a){a.registerComponentModel(tD),a.registerComponentView(sD),a.registerPreprocessor(function(e){js(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var uD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},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}(lr),hD=uD,an=(0,J.$r)(),vD=function(a,e,t,r){var i=a.getData(),n;if((0,p.isArray)(r))n=r;else{var o=r.type;if(o==="min"||o==="max"||o==="average"||o==="median"||r.xAxis!=null||r.yAxis!=null){var s=void 0,l=void 0;if(r.yAxis!=null||r.xAxis!=null)s=e.getAxis(r.yAxis!=null?"y":"x"),l=(0,p.retrieve)(r.yAxis,r.xAxis);else{var u=zp(r,i,e,a);s=u.valueAxis;var h=(0,pr.me)(i,u.valueDataDim);l=Js(i,h,o)}var v=s.dim==="x"?0:1,c=1-v,f=(0,p.clone)(r),d={coord:[]};f.type=null,f.coord=[],f.coord[c]=-1/0,d.coord[c]=1/0;var g=t.get("precision");g>=0&&(0,p.isNumber)(l)&&(l=+l.toFixed(Math.min(g,20))),f.coord[v]=d.coord[v]=l,n=[f,d,{type:o,valueIndex:r.valueIndex,value:l}]}else n=[]}var y=[Za(a,n[0]),Za(a,n[1]),(0,p.extend)({},n[2])];return y[2].type=y[2].type||null,(0,p.merge)(y[2],y[0]),(0,p.merge)(y[2],y[1]),y};function nn(a){return!isNaN(a)&&!isFinite(a)}function Hp(a,e,t,r){var i=1-a,n=r.dimensions[a];return nn(e[i])&&nn(t[i])&&e[a]===t[a]&&r.getAxis(n).containData(e[a])}function cD(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(Hp(1,t,r,a)||Hp(0,t,r,a)))return!0}return Ua(a,e[0])&&Ua(a,e[1])}function tl(a,e,t,r,i){var n=r.coordinateSystem,o=a.getItemModel(e),s,l=k.lo(o.get("x"),i.getWidth()),u=k.lo(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(a.dimensions,e));else{var h=n.dimensions,v=a.get(h[0],e),c=a.get(h[1],e);s=n.dataToPoint([v,c])}if(yr(n,"cartesian2d")){var f=n.getAxis("x"),d=n.getAxis("y"),h=n.dimensions;nn(a.get(h[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):nn(a.get(h[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}a.setItemLayout(e,s)}var fD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=lr.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=an(o).from,u=an(o).to;l.each(function(h){tl(l,h,!0,n,i),tl(u,h,!1,n,i)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Io);this.group.add(h.group);var v=pD(o,t,r),c=v.from,f=v.to,d=v.line;an(r).from=c,an(r).to=f,r.setData(d);var g=r.get("symbol"),y=r.get("symbolSize"),m=r.get("symbolRotate"),S=r.get("symbolOffset");(0,p.isArray)(g)||(g=[g,g]),(0,p.isArray)(y)||(y=[y,y]),(0,p.isArray)(m)||(m=[m,m]),(0,p.isArray)(S)||(S=[S,S]),v.from.each(function(b){x(c,b,!0),x(f,b,!1)}),d.each(function(b){var _=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[c.getItemLayout(b),f.getItemLayout(b)]),_.stroke==null&&(_.stroke=c.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:c.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(b,"symbolOffset"),fromSymbolRotate:c.getItemVisual(b,"symbolRotate"),fromSymbolSize:c.getItemVisual(b,"symbolSize"),fromSymbol:c.getItemVisual(b,"symbol"),toSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(b,"symbolOffset"),toSymbolRotate:f.getItemVisual(b,"symbolRotate"),toSymbolSize:f.getItemVisual(b,"symbolSize"),toSymbol:f.getItemVisual(b,"symbol"),style:_})}),h.updateData(d),v.line.eachItemGraphicEl(function(b){(0,ft.z)(b).dataModel=r,b.traverse(function(_){(0,ft.z)(_).dataModel=r})});function x(b,_,A){var w=b.getItemModel(_);tl(b,_,A,t,n);var C=w.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=(0,sr.rI)(l,"color")),b.setItemVisual(_,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:(0,p.retrieve2)(w.get("symbolOffset",!0),S[A?0:1]),symbolRotate:(0,p.retrieve2)(w.get("symbolRotate",!0),m[A?0:1]),symbolSize:(0,p.retrieve2)(w.get("symbolSize"),y[A?0:1]),symbol:(0,p.retrieve2)(w.get("symbol",!0),g[A?0:1]),style:C})}this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(qs);function pD(a,e,t){var r;a?r=(0,p.map)(a&&a.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return(0,p.extend)((0,p.extend)({},h),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new he.A(r,t),n=new he.A(r,t),o=new he.A([],t),s=(0,p.map)(t.get("data"),(0,p.curry)(vD,e,a,t));a&&(s=(0,p.filter)(s,(0,p.curry)(cD,a)));var l=Bp(!!a,r);return i.initData((0,p.map)(s,function(u){return u[0]}),null,l),n.initData((0,p.map)(s,function(u){return u[1]}),null,l),o.initData((0,p.map)(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}var dD=fD;function gD(a){a.registerComponentModel(hD),a.registerComponentView(dD),a.registerPreprocessor(function(e){js(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var yD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},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}(lr),mD=yD,on=(0,J.$r)(),xD=function(a,e,t,r){var i=r[0],n=r[1];if(!(!i||!n)){var o=Za(a,i),s=Za(a,n),l=o.coord,u=s.coord;l[0]=(0,p.retrieve)(l[0],-1/0),l[1]=(0,p.retrieve)(l[1],-1/0),u[0]=(0,p.retrieve)(u[0],1/0),u[1]=(0,p.retrieve)(u[1],1/0);var h=(0,p.mergeAll)([{},o,s]);return h.coord=[o.coord,s.coord],h.x0=o.x,h.y0=o.y,h.x1=s.x,h.y1=s.y,h}};function sn(a){return!isNaN(a)&&!isFinite(a)}function Fp(a,e,t,r){var i=1-a;return sn(e[i])&&sn(t[i])}function SD(a,e){var t=e.coord[0],r=e.coord[1],i={coord:t,x:e.x0,y:e.y0},n={coord:r,x:e.x1,y:e.y1};return yr(a,"cartesian2d")?t&&r&&(Fp(1,t,r,a)||Fp(0,t,r,a))?!0:aD(a,i,n):Ua(a,i)||Ua(a,n)}function Wp(a,e,t,r,i){var n=r.coordinateSystem,o=a.getItemModel(e),s,l=k.lo(o.get(t[0]),i.getWidth()),u=k.lo(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition){var h=a.getValues(["x0","y0"],e),v=a.getValues(["x1","y1"],e),c=n.clampData(h),f=n.clampData(v),d=[];t[0]==="x0"?d[0]=c[0]>f[0]?v[0]:h[0]:d[0]=c[0]>f[0]?h[0]:v[0],t[1]==="y0"?d[1]=c[1]>f[1]?v[1]:h[1]:d[1]=c[1]>f[1]?h[1]:v[1],s=r.getMarkerPosition(d,t,!0)}else{var g=a.get(t[0],e),y=a.get(t[1],e),m=[g,y];n.clampData&&n.clampData(m,m),s=n.dataToPoint(m,!0)}if(yr(n,"cartesian2d")){var S=n.getAxis("x"),x=n.getAxis("y"),g=a.get(t[0],e),y=a.get(t[1],e);sn(g)?s[0]=S.toGlobalCoord(S.getExtent()[t[0]==="x0"?0:1]):sn(y)&&(s[1]=x.toGlobalCoord(x.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Yp=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],bD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=lr.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=(0,p.map)(Yp,function(v){return Wp(s,l,v,n,i)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new it.A});this.group.add(h.group),this.markKeep(h);var v=_D(o,t,r);r.setData(v),v.each(function(c){var f=(0,p.map)(Yp,function(C){return Wp(v,c,C,t,n)}),d=o.getAxis("x").scale,g=o.getAxis("y").scale,y=d.getExtent(),m=g.getExtent(),S=[d.parse(v.get("x0",c)),d.parse(v.get("x1",c))],x=[g.parse(v.get("y0",c)),g.parse(v.get("y1",c))];k.Y6(S),k.Y6(x);var b=!(y[0]>S[1]||y[1]x[1]||m[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Ht.A),el=TD,Qr=p.curry,rl=p.each,ln=it.A,ID=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new ln),this.group.add(this._selectorGroup=new ln),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,r,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,r,i,l,s,u);var h=t.getBoxLayoutParams(),v={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),f=yt.dV(h,v,c),d=this.layoutInner(t,o,f,n,l,u),g=yt.dV(p.defaults({width:d.width,height:d.height},h),v,c);this.group.x=g.x-d.x,this.group.y=g.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=qf(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,r,i,n,o,s,l){var u=this.getContentGroup(),h=p.createHashMap(),v=r.get("selectedMode"),c=[];i.eachRawSeries(function(f){!f.get("legendHoverLink")&&c.push(f.id)}),rl(r.getData(),function(f,d){var g=f.get("name");if(!this.newlineDisabled&&(g===""||g===` +`)){var y=new ln;y.newline=!0,u.add(y);return}var m=i.getSeriesByName(g)[0];if(!h.get(g))if(m){var S=m.getData(),x=S.getVisual("legendLineStyle")||{},b=S.getVisual("legendIcon"),_=S.getVisual("style"),A=this._createItem(m,g,d,f,r,t,x,_,b,v,n);A.on("click",Qr(Zp,g,null,n,c)).on("mouseover",Qr(al,m.name,null,n,c)).on("mouseout",Qr(il,m.name,null,n,c)),i.ssr&&A.eachChild(function(w){var C=(0,ft.z)(w);C.seriesIndex=m.seriesIndex,C.dataIndex=d,C.ssrType="legend"}),h.set(g,!0)}else i.eachRawSeries(function(w){if(!h.get(g)&&w.legendVisualProvider){var C=w.legendVisualProvider;if(!C.containName(g))return;var T=C.indexOfName(g),I=C.getItemVisual(T,"style"),D=C.getItemVisual(T,"legendIcon"),L=(0,Wt.parse)(I.fill);L&&L[3]===0&&(L[3]=.2,I=p.extend(p.extend({},I),{fill:(0,Wt.stringify)(L,"rgba")}));var M=this._createItem(w,g,d,f,r,t,{},I,D,v,n);M.on("click",Qr(Zp,null,g,n,c)).on("mouseover",Qr(al,null,g,n,c)).on("mouseout",Qr(il,null,g,n,c)),i.ssr&&M.eachChild(function(P){var R=(0,ft.z)(P);R.seriesIndex=w.seriesIndex,R.dataIndex=d,R.ssrType="legend"}),h.set(g,!0)}},this)},this),o&&this._createSelector(o,r,n,s,l)},e.prototype._createSelector=function(t,r,i,n,o){var s=this.getSelectorGroup();rl(t,function(u){var h=u.type,v=new _t.Ay({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(v);var c=r.getModel("selectorLabel"),f=r.getModel(["emphasis","selectorLabel"]);(0,q.qM)(v,{normal:c,emphasis:f},{defaultText:u.title}),(0,U.iJ)(v)})},e.prototype._createItem=function(t,r,i,n,o,s,l,u,h,v,c){var f=t.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),y=o.isSelected(r),m=n.get("symbolRotate"),S=n.get("symbolKeepAspect"),x=n.get("icon");h=x||h||"roundRect";var b=DD(h,n,l,u,f,y,c),_=new ln,A=n.getModel("textStyle");if(p.isFunction(t.getLegendIcon)&&(!x||x==="inherit"))_.add(t.getLegendIcon({itemWidth:d,itemHeight:g,icon:h,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:S}));else{var w=x==="inherit"&&t.getData().getVisual("symbol")?m==="inherit"?t.getData().getVisual("symbolRotate"):m:0;_.add(LD({itemWidth:d,itemHeight:g,icon:h,iconRotate:w,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:S}))}var C=s==="left"?d+5:-5,T=s,I=o.get("formatter"),D=r;p.isString(I)&&I?D=I.replace("{name}",r!=null?r:""):p.isFunction(I)&&(D=I(r));var L=y?A.getTextColor():n.get("inactiveColor");_.add(new _t.Ay({style:(0,q.VB)(A,{text:D,x:C,y:g/2,fill:L,align:T,verticalAlign:"middle"},{inheritColor:L})}));var M=new Dt.A({shape:_.getBoundingRect(),style:{fill:"transparent"}}),P=n.getModel("tooltip");return P.get("show")&&tt.setTooltipConfig({el:M,componentModel:o,itemName:r,itemTooltipOption:P.option}),_.add(M),_.eachChild(function(R){R.silent=!0}),M.silent=!v,this.getContentGroup().add(_),(0,U.iJ)(_),_.__legendDataIndex=i,_},e.prototype.layoutInner=function(t,r,i,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();yt.aP(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var h=l.getBoundingRect(),v=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){yt.aP("horizontal",u,t.get("selectorItemGap",!0));var c=u.getBoundingRect(),f=[-c.x,-c.y],d=t.get("selectorButtonGap",!0),g=t.getOrient().index,y=g===0?"width":"height",m=g===0?"height":"width",S=g===0?"y":"x";s==="end"?f[g]+=h[y]+d:v[g]+=c[y]+d,f[1-g]+=h[m]/2-c[m]/2,u.x=f[0],u.y=f[1],l.x=v[0],l.y=v[1];var x={x:0,y:0};return x[y]=h[y]+d+c[y],x[m]=Math.max(h[m],c[m]),x[S]=Math.min(0,c[S]+f[1-g]),x}else return l.x=v[0],l.y=v[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Yt.A);function DD(a,e,t,r,i,n,o){function s(y,m){y.lineWidth==="auto"&&(y.lineWidth=m.lineWidth>0?2:0),rl(y,function(S,x){y[x]==="inherit"&&(y[x]=m[x])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=a.lastIndexOf("empty",0)===0?"fill":"stroke",v=l.getShallow("decal");u.decal=!v||v==="inherit"?r.decal:(0,Ai.w)(v,o),u.fill==="inherit"&&(u.fill=r[i]),u.stroke==="inherit"&&(u.stroke=r[h]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?r:t).opacity),s(u,r);var c=e.getModel("lineStyle"),f=c.getLineStyle();if(s(f,t),u.fill==="auto"&&(u.fill=r.fill),u.stroke==="auto"&&(u.stroke=r.fill),f.stroke==="auto"&&(f.stroke=r.fill),!n){var d=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth=d==="auto"?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),f.stroke=c.get("inactiveColor"),f.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:f}}function LD(a){var e=a.icon||"roundRect",t=(0,Tt.v5)(e,0,0,a.itemWidth,a.itemHeight,a.itemStyle.fill,a.symbolKeepAspect);return t.setStyle(a.itemStyle),t.rotation=(a.iconRotate||0)*Math.PI/180,t.setOrigin([a.itemWidth/2,a.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function Zp(a,e,t,r){il(a,e,t,r),t.dispatchAction({type:"legendToggleSelect",name:a!=null?a:e}),al(a,e,t,r)}function Up(a){for(var e=a.getZr().storage.getDisplayList(),t,r=0,i=e.length;ri[o],y=[-f.x,-f.y];r||(y[n]=h[u]);var m=[0,0],S=[-d.x,-d.y],x=p.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(g){var b=t.get("pageButtonPosition",!0);b==="end"?S[n]+=i[o]-d[o]:m[n]+=d[o]+x}S[1-n]+=f[s]/2-d[s]/2,h.setPosition(y),v.setPosition(m),c.setPosition(S);var _={x:0,y:0};if(_[o]=g?i[o]:f[o],_[s]=Math.max(f[s],d[s]),_[l]=Math.min(0,d[l]+S[1-n]),v.__rectSize=i[o],g){var A={x:0,y:0};A[o]=Math.max(i[o]-d[o]-x,0),A[s]=_[s],v.setClipPath(new Dt.A({shape:A})),v.__rectSize=A[o]}else c.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Q.oi(h,{x:w.contentPosition[0],y:w.contentPosition[1]},g?t:null),this._updatePageInfoView(t,w),_},e.prototype._pageGo=function(t,r,i){var n=this._getPageInfo(r)[t];n!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:r.id})},e.prototype._updatePageInfoView=function(t,r){var i=this._controllerGroup;p.each(["pagePrev","pageNext"],function(h){var v=h+"DataIndex",c=r[v]!=null,f=i.childOfName(h);f&&(f.setStyle("fill",c?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),f.cursor=c?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),s=r.pageIndex,l=s!=null?s+1:0,u=r.pageCount;n&&o&&n.setStyle("text",p.isString(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var r=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,s=nl[o],l=ol[o],u=this._findTargetItemIndex(r),h=i.children(),v=h[u],c=h.length,f=c?1:0,d={contentPosition:[i.x,i.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!v)return d;var g=b(v);d.contentPosition[o]=-g.s;for(var y=u+1,m=g,S=g,x=null;y<=c;++y)x=b(h[y]),(!x&&S.e>m.s+n||x&&!_(x,m.s))&&(S.i>m.i?m=S:m=x,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),S=x;for(var y=u-1,m=g,S=g,x=null;y>=-1;--y)x=b(h[y]),(!x||!_(S,x.s))&&m.i=w&&A.s<=w+n}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var r,i=this.getContentGroup(),n;return i.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===t&&(r=s)}),r!=null?r:n},e.type="legend.scroll",e}(Xp),OD=VD;function kD(a){a.registerAction("legendScroll","legendscroll",function(e,t){var r=e.scrollDataIndex;r!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(r)})})}function ND(a){(0,Y.Y)(jp),a.registerComponentModel(ED),a.registerComponentView(OD),kD(a)}function zD(a){(0,Y.Y)(jp),(0,Y.Y)(ND)}var BD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=(0,Ne.G_)(Ga.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Ga),GD=BD,sl=(0,J.$r)();function HD(a,e,t){sl(a).coordSysRecordMap.each(function(r){var i=r.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function FD(a,e){for(var t=sl(a).coordSysRecordMap,r=t.keys(),i=0;ir[t+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function XD(a){a.registerProcessor(a.PRIORITY.PROCESSOR.FILTER,function(e,t){var r=sl(t),i=r.coordSysRecordMap||(r.coordSysRecordMap=(0,p.createHashMap)());i.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=Xf(n);(0,p.each)(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,WD(t,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=(0,p.createHashMap)());h.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),i.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){Jp(i,n);return}var h=UD(l);o.enable(h.controlType,h.opt),o.setPointerChecker(n.containsPoint),me.N(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var jD=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,r,i){if(a.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),HD(i,t,{pan:(0,p.bind)(ll.pan,this),zoom:(0,p.bind)(ll.zoom,this),scrollMove:(0,p.bind)(ll.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),a.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){FD(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Vs),ll={zoom:function(a,e,t,r){var i=this.range,n=i.slice(),o=a.axisModels[0];if(o){var s=ul[e](null,[r.originX,r.originY],o,t,a),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/r.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Ir(0,n,[0,100],0,h.minSpan,h.maxSpan),this.range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:Qp(function(a,e,t,r,i,n){var o=ul[r]([n.oldX,n.oldY],[n.newX,n.newY],e,i,t);return o.signal*(a[1]-a[0])*o.pixel/o.pixelLength}),scrollMove:Qp(function(a,e,t,r,i,n){var o=ul[r]([0,0],[n.scrollDelta,n.scrollDelta],e,i,t);return o.signal*(a[1]-a[0])*n.scrollDelta})};function Qp(a){return function(e,t,r,i){var n=this.range,o=n.slice(),s=e.axisModels[0];if(s){var l=a(o,s,e,t,r,i);if(Ir(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var ul={grid:function(a,e,t,r,i){var n=t.axis,o={},s=i.model.coordinateSystem.getRect();return a=a||[0,0],n.dim==="x"?(o.pixel=e[0]-a[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-a[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(a,e,t,r,i){var n=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return a=a?s.pointToCoord(a):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-a[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-a[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(a,e,t,r,i){var n=t.axis,o=i.model.coordinateSystem.getRect(),s={};return a=a||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-a[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-a[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},KD=jD;function qp(a){Os(a),a.registerComponentModel(GD),a.registerComponentView(KD),XD(a)}var $D=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=(0,Ne.G_)(Ga.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Ga),JD=$D,ja=Dt.A,td=7,QD=1,hl=30,qD=7,Ka="horizontal",ed="vertical",tL=5,eL=["line","bar","candlestick","scatter"],rL={easing:"cubicOut",duration:100,delay:0},aL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,r){this.api=r,this._onBrush=(0,p.bind)(this._onBrush,this),this._onBrushEnd=(0,p.bind)(this._onBrushEnd,this)},e.prototype.render=function(t,r,i,n){if(a.prototype.render.apply(this,arguments),me.N(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),a.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){me.IU(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var r=this._displayables.sliderGroup=new it.A;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(r),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,r=this.api,i=t.get("brushSelect"),n=i?qD:0,o=this._findCoordRect(),s={width:r.getWidth(),height:r.getHeight()},l=this._orient===Ka?{right:s.width-o.x-o.width,top:s.height-hl-td-n,width:o.width,height:hl}:{right:td,top:o.y,width:hl,height:o.height},u=yt.vs(t.option);(0,p.each)(["right","top","width","height"],function(v){u[v]==="ph"&&(u[v]=l[v])});var h=yt.dV(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===ed&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,r=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Ka&&!o?{scaleY:l?1:-1,scaleX:1}:i===Ka&&o?{scaleY:l?1:-1,scaleX:-1}:i===ed&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=r.x-u.x,t.y=r.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,r=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect");i.add(new ja({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new ja({shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:"transparent"},z2:0,onclick:(0,p.bind)(this._onClickPanel,this)}),s=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var r=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),s=n.getShadowDim&&n.getShadowDim(),l=s&&o.getDimensionInfo(s)?n.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||r[0]!==i[0]||r[1]!==i[1]){var v=o.getDataExtent(l),c=(v[1]-v[0])*.3;v=[v[0]-c,v[1]+c];var f=[0,r[1]],d=[0,r[0]],g=[[r[0],0],[0,0]],y=[],m=d[1]/(o.count()-1),S=0,x=Math.round(o.count()/r[0]),b;o.each([l],function(T,I){if(x>0&&I%x){S+=m;return}var D=T==null||isNaN(T)||T==="",L=D?0:(0,k.Cb)(T,v,f,!0);D&&!b&&I?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!D&&b&&(g.push([S,0]),y.push([S,0])),g.push([S,L]),y.push([S,L]),S+=m,b=D}),u=this._shadowPolygonPts=g,h=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[r[0],r[1]];var _=this.dataZoomModel;function A(T){var I=_.getModel(T?"selectedDataBackground":"dataBackground"),D=new it.A,L=new Se.A({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),M=new Pe.A({shape:{points:h},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(L),D.add(M),D}for(var w=0;w<3;w++){var C=A(w===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,r=t.get("showDataShadow");if(r!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();(0,p.each)(l,function(u){if(!i&&!(r!==!0&&(0,p.indexOf)(eL,u.get("type"))<0)){var h=n.getComponent(nr(o),s).axis,v=iL(o),c,f=u.coordinateSystem;v!=null&&f.getOtherAxis&&(c=f.getOtherAxis(h).inverse),v=u.getData().mapDimension(v),i={thisAxis:h,series:u,thisDim:o,otherDim:v,otherAxisInverse:c}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,r=this._displayables,i=r.handles=[null,null],n=r.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,v=l.get("brushSelect"),c=r.filler=new ja({silent:v,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new ja({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:QD,fill:"rgba(0,0,0,0)"}})),(0,p.each)([0,1],function(x){var b=l.get("handleIcon");!Tt.$V[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var _=(0,Tt.v5)(b,-1,0,2,2,null,!0);_.attr({cursor:rd(this._orient),draggable:!0,drift:(0,p.bind)(this._onDragMove,this,x),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1),z2:5});var A=_.getBoundingRect(),w=l.get("handleSize");this._handleHeight=(0,k.lo)(w,this._size[1]),this._handleWidth=A.width/A.height*this._handleHeight,_.setStyle(l.getModel("handleStyle").getItemStyle()),_.style.strokeNoScale=!0,_.rectHover=!0,_.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),(0,U.iJ)(_);var C=l.get("handleColor");C!=null&&(_.style.fill=C),o.add(i[x]=_);var T=l.getModel("textStyle");t.add(n[x]=new _t.Ay({silent:!0,invisible:!0,style:(0,q.VB)(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var f=c;if(v){var d=(0,k.lo)(l.get("moveHandleSize"),s[1]),g=r.moveHandle=new Dt.A({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),y=d*.8,m=r.moveHandleIcon=(0,Tt.v5)(l.get("moveHandleIcon"),-y/2,-y/2,y,y,"#fff",!0);m.silent=!0,m.y=s[1]+d/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var S=Math.min(s[1]/2,Math.max(d,10));f=r.moveZone=new Dt.A({invisible:!0,shape:{y:s[1]-S,height:d+S}}),f.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(m),o.add(f)}f.attr({draggable:!0,cursor:rd(this._orient),drift:(0,p.bind)(this._onDragMove,this,"all"),ondragstart:(0,p.bind)(this._showDataInfo,this,!0),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),r=this._getViewExtent();this._handleEnds=[(0,k.Cb)(t[0],[0,100],r,!0),(0,k.Cb)(t[1],[0,100],r,!0)]},e.prototype._updateInterval=function(t,r){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Ir(r,n,o,i.get("zoomLock")?"all":t,s.minSpan!=null?(0,k.Cb)(s.minSpan,l,o,!0):null,s.maxSpan!=null?(0,k.Cb)(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=(0,k.Y6)([(0,k.Cb)(n[0],o,l,!0),(0,k.Cb)(n[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(t){var r=this._displayables,i=this._handleEnds,n=(0,k.Y6)(i.slice()),o=this._size;(0,p.each)([0,1],function(f){var d=r.handles[f],g=this._handleHeight;d.attr({scaleX:g/2,scaleY:g/2,x:i[f]+(f?-1:1),y:o[1]/2-g/2})},this),r.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};r.moveHandle&&(r.moveHandle.setShape(s),r.moveZone.setShape(s),r.moveZone.getBoundingRect(),r.moveHandleIcon&&r.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=r.dataShadowSegs,u=[0,n[0],n[1],o[0]],h=0;hr[0]||i[1]<0||i[1]>r[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var r=t.offsetX,i=t.offsetY;this._brushStart=new Re.A(r,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var r=this._displayables.brushRect;if(this._brushing=!1,!!r){r.attr("ignore",!0);var i=r.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=(0,k.Y6)([(0,k.Cb)(i.x,o,s,!0),(0,k.Cb)(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(pe.ds(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,r){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new ja({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,r),h=l.transformCoordToLocal(s.x,s.y),v=this._size;u[0]=Math.max(Math.min(v[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:v[1]})},e.prototype._dispatchZoomAction=function(t){var r=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?rL:null,start:r[0],end:r[1]})},e.prototype._findCoordRect=function(){var t,r=Xf(this.dataZoomModel).infoList;if(!t&&r.length){var i=r[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(Vs);function iL(a){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[a]}function rd(a){return a==="vertical"?"ns-resize":"ew-resize"}var nL=aL;function ad(a){a.registerComponentModel(JD),a.registerComponentView(nL),Os(a)}function oL(a){(0,Y.Y)(qp),(0,Y.Y)(ad)}var sL={get:function(a,e,t){var r=p.clone((lL[a]||{})[e]);return t&&p.isArray(r)?r[r.length-1]:r}},lL={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},id=sL,nd=ae.mapVisual,uL=ae.eachVisual,hL=p.isArray,od=p.each,vL=k.Y6,cL=k.Cb,fL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&Ap(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=p.bind(t,this),this.controllerVisuals=Ys(this.option.controller,r,t),this.targetVisuals=Ys(this.option.target,r,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,r=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,n){r.push(n)}):r=J.qB(t),r},e.prototype.eachTargetSeries=function(t,r){p.each(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(r,n)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(i){i===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],p.isArray(t)&&(t=t.slice(),u=!0);var h=r?t:u?[v(t[0]),v(t[1])]:v(t);if(p.isString(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(p.isFunction(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+h[1]:t[1]===s[1]?i[1]+" "+h[0]:h[0]+" - "+h[1];return h;function v(c){return c===s[0]?"min":c===s[1]?"max":(+c).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,r=vL([t.min,t.max]);this._dataExtent=r},e.prototype.getDataDimensionIndex=function(t){var r=this.option.dimension;if(r!=null)return t.getDimensionIndex(r);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,r=this.option,i={inRange:r.inRange,outOfRange:r.outOfRange},n=r.target||(r.target={}),o=r.controller||(r.controller={});p.merge(n,i),p.merge(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),h.call(this,o);function l(v){hL(r.color)&&!v.inRange&&(v.inRange={color:r.color.slice().reverse()}),v.inRange=v.inRange||{color:t.get("gradientColor")}}function u(v,c,f){var d=v[c],g=v[f];d&&!g&&(g=v[f]={},od(d,function(y,m){if(ae.isValidType(m)){var S=id.get(m,"inactive",s);S!=null&&(g[m]=S,m==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function h(v){var c=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,f=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),g=this.getItemSymbol(),y=g||"roundRect";od(this.stateList,function(m){var S=this.itemSize,x=v[m];x||(x=v[m]={color:s?d:[d]}),x.symbol==null&&(x.symbol=c&&p.clone(c)||(s?y:[y])),x.symbolSize==null&&(x.symbolSize=f&&p.clone(f)||(s?S[0]:[S[0],S[0]])),x.symbol=nd(x.symbol,function(A){return A==="none"?y:A});var b=x.symbolSize;if(b!=null){var _=-1/0;uL(b,function(A){A>_&&(_=A)}),x.symbolSize=nd(b,function(A){return cL(A,[0,_],[0,S[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Ht.A),un=fL,sd=[20,140],pL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){a.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=sd[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=sd[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):p.isArray(r)&&(r[0]>r[1]&&r.reverse(),r[0]=Math.max(r[0],t[0]),r[1]=Math.min(r[1],t[1]))},e.prototype.completeVisualOption=function(){a.prototype.completeVisualOption.apply(this,arguments),p.each(this.stateList,function(t){var r=this.option.controller[t].symbolSize;r&&r[0]!==r[1]&&(r[0]=r[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),r=k.Y6((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]=i[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),r.push({seriesId:i.id,dataIndex:n})},this),r},e.prototype.getVisualMeta=function(t){var r=ld(this,"outOfRange",this.getExtent()),i=ld(this,"inRange",this.option.range.slice()),n=[];function o(f,d){n.push({value:f,color:t(f,d)})}for(var s=0,l=0,u=i.length,h=r.length;lt[1])break;n.push({color:this.getControllerVisual(l,"color",r),offset:s/i})}return n.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),n},e.prototype._createBarPoints=function(t,r){var i=this.visualMapModel.itemSize;return[[i[0]-r[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,i=this.visualMapModel.get("inverse");return new it.A(r==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent();yL([0,1],function(h){var v=o[h];v.setStyle("fill",r.handlesColor[h]),v.y=t[h];var c=Be(t[h],[0,l[1]],u,!0),f=this.getControllerVisual(c,"symbolSize");v.scaleX=v.scaleY=f/l[0],v.x=l[0]-f/2;var d=tt.applyTransform(i.handleLabelPoints[h],tt.getTransform(v,this.group));s[h].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,i,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,v=h.indicator;if(v){v.attr("invisible",!1);var c={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",c),d=this.getControllerVisual(t,"symbolSize"),g=Be(t,s,u,!0),y=l[0]-d/2,m={x:v.x,y:v.y};v.y=g,v.x=y;var S=tt.applyTransform(h.indicatorLabelPoint,tt.getTransform(v,this.group)),x=h.indicatorLabel;x.attr("invisible",!1);var b=this._applyTransform("left",h.mainGroup),_=this._orient,A=_==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(r),verticalAlign:A?b:"middle",align:A?"center":b});var w={x:y,y:g,style:{fill:f}},C={style:{x:S[0],y:S[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};v.x=m.x,v.y=m.y,v.animateTo(w,T),x.animateTo(C,T)}else v.attr(w),x.attr(C);this._firstShowIndicator=!1;var I=this._shapes.handleLabels;if(I)for(var D=0;Do[1]&&(v[1]=1/0),r&&(v[0]===-1/0?this._showIndicator(h,v[1],"< ",l):v[1]===1/0?this._showIndicator(h,v[0],"> ",l):this._showIndicator(h,h,"\u2248 ",l));var c=this._hoverLinkDataIndices,f=[];(r||pd(i))&&(f=this._hoverLinkDataIndices=i.findTargetDataIndices(v));var d=J.D6(c,f);this._dispatchHighDown("downplay",hn(d[0],i)),this._dispatchHighDown("highlight",hn(d[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r;if((0,Jn.R)(t.target,function(l){var u=(0,ft.z)(l);if(u.dataIndex!=null)return r=u,!0},!0),!!r){var i=this.ecModel.getSeriesByIndex(r.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(i)){var o=i.getData(r.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),r.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var r=this._shapes.handleLabels;if(r)for(var i=0;i=0&&(n.dimension=o,r.push(n))}}),a.getData().setVisual("visualMeta",r)}}];function TL(a,e,t,r){for(var i=e.targetVisuals[r],n=ae.prepareVisualTypes(i),o={color:(0,sr.rI)(a.getData(),"color")},s=0,l=n.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),a.registerAction(AL,wL),(0,p.each)(CL,function(e){a.registerVisual(a.PRIORITY.VISUAL.COMPONENT,e)}),a.registerPreprocessor(IL))}function xd(a){a.registerComponentModel(dL),a.registerComponentView(_L),md(a)}var DL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],LL[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=p.clone(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=p.map(this._pieceList,function(l){return l=p.clone(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},i=ae.listVisualTypes(),n=this.isCategory();p.each(t.pieces,function(s){p.each(i,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),p.each(r,function(s,l){var u=!1;p.each(this.stateList,function(h){u=u||o(t,h,l)||o(t.target,h,l)},this),!u&&p.each(this.stateList,function(h){(t[h]||(t[h]={}))[l]=id.get(l,h==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}a.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,r){var i=this.option,n=this._pieceList,o=(r?i:t).selected||{};if(i.selected=o,p.each(n,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),i.selectedMode==="single"){var s=!1;p.each(n,function(l,u){var h=this.getSelectedMapKey(l);o[h]&&(s?o[h]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=p.clone(t)},e.prototype.getValueState=function(t){var r=ae.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=ae.findPieceIndex(l,i);h===t&&o.push(u)},this),r.push({seriesId:n.id,dataIndex:o})},this),r},e.prototype.getRepresentValue=function(t){var r;if(this.isCategory())r=t.value;else if(t.value!=null)r=t.value;else{var i=t.interval||[];r=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],i=["",""],n=this;function o(h,v){var c=n.getRepresentValue({interval:h});v||(v=n.getValueState(c));var f=t(c,v);h[0]===-1/0?i[0]=f:h[1]===1/0?i[1]=f:r.push({value:h[0],color:f},{value:h[1],color:f})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return p.each(s,function(h){var v=h.interval;v&&(v[0]>u&&o([u,v[0]],"outOfRange"),o(v.slice()),u=v[1])},this),{stops:r,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=(0,Ne.G_)(un.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(un),LL={splitNumber:function(a){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var n=(r[1]-r[0])/i;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&a.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o","\u2265"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function Sd(a,e){var t=a.inverse;(a.orient==="vertical"?!t:t)&&e.reverse()}var ML=DL,PL=function(a){(0,O.C6)(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var r=this.visualMapModel,i=r.get("textGap"),n=r.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=r.itemSize,h=this._getViewData(),v=h.endsText,c=p.retrieve(r.get("showLabel",!0),!v);v&&this._renderEndsText(t,v[0],u,c,l),p.each(h.viewPieceList,function(f){var d=f.piece,g=new it.A;g.onclick=p.bind(this._onItemClick,this,d),this._enableHoverLink(g,f.indexInModelPieceList);var y=r.getRepresentValue(d);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]]),c){var m=this.visualMapModel.getValueState(y);g.add(new _t.Ay({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1}}))}t.add(g)},this),v&&this._renderEndsText(t,v[1],u,c,l),yt.aP(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var i=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:hn(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return vd(t,this.api,t.itemSize);var i=r.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,r,i,n,o){if(r){var s=new it.A,l=this.visualMapModel.textStyleModel;s.add(new _t.Ay({style:(0,q.VB)(l,{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:r})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=p.map(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?r.reverse():i&&(i=i.slice().reverse()),{viewPieceList:r,endsText:i}},e.prototype._createItemSymbol=function(t,r,i){t.add((0,Tt.v5)(this.getControllerVisual(r,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(r,"color")))},e.prototype._onItemClick=function(t){var r=this.visualMapModel,i=r.option,n=i.selectedMode;if(n){var o=p.clone(i.selected),s=r.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,p.each(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(ud),RL=PL;function bd(a){a.registerComponentModel(ML),a.registerComponentView(RL),md(a)}function EL(a){(0,Y.Y)(xd),(0,Y.Y)(bd)}var VL={label:{enabled:!0},decal:{show:!1}},_d=(0,J.$r)(),OL={};function kL(a,e){var t=a.getModel("aria");if(!t.get("enabled"))return;var r=p.clone(VL);p.merge(r.label,a.getLocaleModel().get("aria"),!1),p.merge(t.option,r,!1),i(),n();function i(){var u=t.getModel("decal"),h=u.get("show");if(h){var v=p.createHashMap();a.eachSeries(function(c){if(!c.isColorBySeries()){var f=v.get(c.type);f||(f={},v.set(c.type,f)),_d(c).scope=f}}),a.eachRawSeries(function(c){if(a.isSeriesFiltered(c))return;if(p.isFunction(c.enableAriaDecal)){c.enableAriaDecal();return}var f=c.getData();if(c.isColorBySeries()){var S=(0,io.x)(c.ecModel,c.name,OL,a.getSeriesCount()),x=f.getVisual("decal");f.setVisual("decal",b(x,S))}else{var d=c.getRawData(),g={},y=_d(c).scope;f.each(function(_){var A=f.getRawIndex(_);g[A]=_});var m=d.count();d.each(function(_){var A=g[_],w=d.getName(_)||_+"",C=(0,io.x)(c.ecModel,w,y,m),T=f.getItemVisual(A,"decal");f.setItemVisual(A,"decal",b(T,C))})}function b(_,A){var w=_?p.extend(p.extend({},A),_):A;return w.dirty=!0,w}})}}function n(){var u=e.getZr().dom;if(u){var h=a.getLocaleModel().get("aria"),v=t.getModel("label");if(v.option=p.defaults(v.option,h),!!v.get("enabled")){if(v.get("description")){u.setAttribute("aria-label",v.get("description"));return}var c=a.getSeriesCount(),f=v.get(["data","maxCount"])||10,d=v.get(["series","maxCount"])||10,g=Math.min(c,d),y;if(!(c<1)){var m=s();if(m){var S=v.get(["general","withTitle"]);y=o(S,{title:m})}else y=v.get(["general","withoutTitle"]);var x=[],b=c>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);y+=o(b,{seriesCount:c}),a.eachSeries(function(C,T){if(T1?v.get(["series","multiple",L]):v.get(["series","single",L]),I=o(I,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var M=C.getData();if(M.count()>f){var P=v.get(["data","partialData"]);I+=o(P,{displayCnt:f})}else I+=v.get(["data","allData"]);for(var R=v.get(["data","separator","middle"]),V=v.get(["data","separator","end"]),B=[],z=0;z":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},BL=function(){function a(e){var t=this._condVal=(0,p.isString)(e)?new RegExp(e):(0,p.isRegExp)(e)?e:null;if(t==null){var r="";(0,Gt.$8)(r)}}return a.prototype.evaluate=function(e){var t=typeof e;return(0,p.isString)(t)?this._condVal.test(e):(0,p.isNumber)(t)?this._condVal.test(e+""):!1},a}(),GL=function(){function a(){}return a.prototype.evaluate=function(){return this.value},a}(),HL=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&r.push(i),i=[M,P]}function h(M,P,R,V){ta(M,R)&&ta(P,V)||i.push(M,P,R,V,R,V)}function v(M,P,R,V,B,z){var W=Math.abs(P-M),$=Math.tan(W/4)*4/3,K=PC:D2&&r.push(i),r}function dl(a,e,t,r,i,n,o,s,l,u){if(ta(a,t)&&ta(e,r)&&ta(i,o)&&ta(n,s)){l.push(o,s);return}var h=2/u,v=h*h,c=o-a,f=s-e,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var g=t-a,y=r-e,m=i-o,S=n-s,x=g*g+y*y,b=m*m+S*S;if(x=0&&C=0){l.push(o,s);return}var T=[],I=[];(0,ge.YT)(a,t,i,o,.5,T),(0,ge.YT)(e,r,n,s,.5,I),dl(T[0],I[0],T[1],I[1],T[2],I[2],T[3],I[3],l,u),dl(T[4],I[4],T[5],I[5],T[6],I[6],T[7],I[7],l,u)}function eM(a,e){var t=pl(a),r=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),v=Td([l,u],h?0:1,e),c=(h?s:u)/v.length,f=0;fi,o=Td([r,i],n?0:1,e),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",h=n?"y":"x",v=a[s]/o.length,c=0;c1?null:new Re.A(g*l+a,g*u+e)}function iM(a,e,t){var r=new Re.A;Re.A.sub(r,t,e),r.normalize();var i=new Re.A;Re.A.sub(i,a,e);var n=i.dot(r);return n}function ea(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function nM(a,e,t){for(var r=a.length,i=[],n=0;no?(u.x=h.x=s+n/2,u.y=l,h.y=l+o):(u.y=h.y=l+o/2,u.x=s,h.x=s+n),nM(e,u,h)}function vn(a,e,t,r){if(t===1)r.push(e);else{var i=Math.floor(t/2),n=a(e);vn(a,n[0],i,r),vn(a,n[1],t-i,r)}return r}function oM(a,e){for(var t=[],r=0;r0)for(var _=r/t,A=-r/2;A<=r/2;A+=_){for(var w=Math.sin(A),C=Math.cos(A),T=0,x=0;x=0}var Rd="__mOriginal_";function fn(a,e,t){var r=Rd+e,i=a[r]||a[e];a[r]||(a[r]=a[e]);var n=t.replace,o=t.after,s=t.before;a[e]=function(){var l=arguments,u;return s&&s.apply(this,l),n?u=n.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function $a(a,e){var t=Rd+e;a[t]&&(a[e]=a[t],a[t]=null)}function Ed(a,e){for(var t=0;t0;u/=2){var h=0,v=0;(a&u)>0&&(h=1),(e&u)>0&&(v=1),s+=u*u*(3*h^v),v===0&&(h===1&&(a=u-1-a,e=u-1-e),l=a,a=e,e=l)}return s}function pn(a){var e=1/0,t=1/0,r=-1/0,i=-1/0,n=(0,p.map)(a,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),v=l.y+l.height/2+(u?u[5]:0);return e=Math.min(h,e),t=Math.min(v,t),r=Math.max(h,r),i=Math.max(v,i),[h,v]}),o=(0,p.map)(n,function(s,l){return{cp:s,z:dM(s[0],s[1],e,t,r,i),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Od(a){return uM(a.path,a.count)}function yl(){return{fromIndividuals:[],toIndividuals:[],count:0}}function gM(a,e,t){var r=[];function i(_){for(var A=0;A<_.length;A++){var w=_[A];cn(w)?i(w.childrenRef()):w instanceof Vt.Ay&&r.push(w)}}i(a);var n=r.length;if(!n)return yl();var o=t.dividePath||Od,s=o({path:e,count:n});if(s.length!==n)return console.error("Invalid morphing: unmatched splitted path"),yl();r=pn(r),s=pn(s);for(var l=t.done,u=t.during,h=t.individualDelay,v=new Me.Ay,c=0;c=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var n=l.length,u=Math.ceil(n/2);t[i].many=l.slice(u,n),t[s].many=l.slice(0,u),s++}return t}var mM={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,h;kd(a)&&(u=a,h=e),kd(e)&&(u=e,h=a);function v(m,S,x,b,_){var A=m.many,w=m.one;if(A.length===1&&!_){var C=S?A[0]:w,T=S?w:A[0];if(cn(C))v({many:[C],one:T},!0,x,b,!0);else{var I=s?(0,p.defaults)({delay:s(x,b)},l):l;gl(C,T,I),n(C,T,C,T,I)}}else for(var D=(0,p.defaults)({dividePath:mM[t],individualDelay:s&&function(B,z,W,$){return s(B+x,b)}},l),L=S?gM(A,w,D):yM(w,A,D),M=L.fromIndividuals,P=L.toIndividuals,R=M.length,V=0;Ve.length,f=u?Nd(h,u):Nd(c?e:a,[c?a:e]),d=0,g=0;gzd))for(var n=r.getIndices(),o=0;o0&&A.group.traverse(function(C){C instanceof Vt.Ay&&!C.animators.length&&C.animateFrom({style:{opacity:0}},w)})})}function Yd(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function Zd(a){return(0,p.isArray)(a)?a.sort().join(","):a}function hr(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function CM(a,e){var t=(0,p.createHashMap)(),r=(0,p.createHashMap)(),i=(0,p.createHashMap)();(0,p.each)(a.oldSeries,function(o,s){var l=a.oldDataGroupIds[s],u=a.oldData[s],h=Yd(o),v=Zd(h);r.set(v,{dataGroupId:l,data:u}),(0,p.isArray)(h)&&(0,p.each)(h,function(c){i.set(c,{key:v,dataGroupId:l,data:u})})});function n(o){t.get(o)&&(0,Gt.R8)("Duplicated seriesKey in universalTransition "+o)}return(0,p.each)(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=Yd(o),h=Zd(u),v=r.get(h);if(v)t.set(h,{oldSeries:[{dataGroupId:v.dataGroupId,divide:hr(v.data),data:v.data}],newSeries:[{dataGroupId:s,divide:hr(l),data:l}]});else if((0,p.isArray)(u)){var c=[];(0,p.each)(u,function(g){var y=r.get(g);y.data&&c.push({dataGroupId:y.dataGroupId,divide:hr(y.data),data:y.data})}),c.length&&t.set(h,{oldSeries:c,newSeries:[{dataGroupId:s,data:l,divide:hr(l)}]})}else{var f=i.get(u);if(f){var d=t.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:hr(f.data)}],newSeries:[]},t.set(f.key,d)),d.newSeries.push({dataGroupId:s,data:l,divide:hr(l)})}}}}),t}function Ud(a,e){for(var t=0;t=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:hr(e.oldData[s]),groupIdDim:o.dimension})}),(0,p.each)((0,J.qB)(a.to),function(o){var s=Ud(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();n.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:hr(l),groupIdDim:o.dimension})}}),i.length>0&&n.length>0&&Wd(i,n,r)}function IM(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){(0,p.each)((0,J.qB)(r.seriesTransition),function(i){(0,p.each)((0,J.qB)(i.to),function(n){for(var o=r.updatedSeries,s=0;s1&&arguments[1]!==void 0?arguments[1]:60,X=null;return function(){for(var gt=this,p=arguments.length,Ft=new Array(p),ct=0;ct=0;Pt--)(ut=N[Pt])&&(Z=(j<3?ut(Z):j>3?ut(G,H,Z):ut(G,H))||Z);return j>3&&Z&&Object.defineProperty(G,H,Z),Z}function p(N,G){return function(H,F){G(H,F,N)}}function Ft(N,G,H,F,j,Z){function ut(Oe){if(Oe!==void 0&&typeof Oe!="function")throw new TypeError("Function expected");return Oe}for(var Pt=F.kind,re=Pt==="getter"?"get":Pt==="setter"?"set":"value",pt=!G&&N?F.static?N:N.prototype:null,Bt=G||(pt?Object.getOwnPropertyDescriptor(pt,F.name):{}),Qt,He=!1,Et=H.length-1;Et>=0;Et--){var oe={};for(var fe in F)oe[fe]=fe==="access"?{}:F[fe];for(var fe in F.access)oe.access[fe]=F.access[fe];oe.addInitializer=function(Oe){if(He)throw new TypeError("Cannot add initializers after decoration has completed");Z.push(ut(Oe||null))};var Le=(0,H[Et])(Pt==="accessor"?{get:Bt.get,set:Bt.set}:Bt[re],oe);if(Pt==="accessor"){if(Le===void 0)continue;if(Le===null||typeof Le!="object")throw new TypeError("Object expected");(Qt=ut(Le.get))&&(Bt.get=Qt),(Qt=ut(Le.set))&&(Bt.set=Qt),(Qt=ut(Le.init))&&j.unshift(Qt)}else(Qt=ut(Le))&&(Pt==="field"?j.unshift(Qt):Bt[re]=Qt)}pt&&Object.defineProperty(pt,F.name,Bt),He=!0}function ct(N,G,H){for(var F=arguments.length>2,j=0;j0&&Z[Z.length-1])&&(pt[0]===6||pt[0]===2)){H=0;continue}if(pt[0]===3&&(!Z||pt[1]>Z[0]&&pt[1]=N.length&&(N=void 0),{value:N&&N[F++],done:!N}}};throw new TypeError(G?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ie(N,G){var H=typeof Symbol=="function"&&N[Symbol.iterator];if(!H)return N;var F=H.call(N),j,Z=[],ut;try{for(;(G===void 0||G-- >0)&&!(j=F.next()).done;)Z.push(j.value)}catch(Pt){ut={error:Pt}}finally{try{j&&!j.done&&(H=F.return)&&H.call(F)}finally{if(ut)throw ut.error}}return Z}function Kt(){for(var N=[],G=0;G1||re(Et,fe)})},oe&&(j[Et]=oe(j[Et])))}function re(Et,oe){try{pt(F[Et](oe))}catch(fe){He(Z[0][3],fe)}}function pt(Et){Et.value instanceof De?Promise.resolve(Et.value.v).then(Bt,Qt):He(Z[0][2],Et)}function Bt(Et){re("next",Et)}function Qt(Et){re("throw",Et)}function He(Et,oe){Et(oe),Z.shift(),Z.length&&re(Z[0][0],Z[0][1])}}function Qa(N){var G,H;return G={},F("next"),F("throw",function(j){throw j}),F("return"),G[Symbol.iterator]=function(){return this},G;function F(j,Z){G[j]=N[j]?function(ut){return(H=!H)?{value:De(N[j](ut)),done:!1}:Z?Z(ut):ut}:Z}}function qa(N){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var G=N[Symbol.asyncIterator],H;return G?G.call(N):(N=typeof St=="function"?St(N):N[Symbol.iterator](),H={},F("next"),F("throw"),F("return"),H[Symbol.asyncIterator]=function(){return this},H);function F(Z){H[Z]=N[Z]&&function(ut){return new Promise(function(Pt,re){ut=N[Z](ut),j(Pt,re,ut.done,ut.value)})}}function j(Z,ut,Pt,re){Promise.resolve(re).then(function(pt){Z({value:pt,done:Pt})},ut)}}function ti(N,G){return Object.defineProperty?Object.defineProperty(N,"raw",{value:G}):N.raw=G,N}var gn=Object.create?function(N,G){Object.defineProperty(N,"default",{enumerable:!0,value:G})}:function(N,G){N.default=G};function ei(N){if(N&&N.__esModule)return N;var G={};if(N!=null)for(var H in N)H!=="default"&&Object.prototype.hasOwnProperty.call(N,H)&&Te(G,N,H);return gn(G,N),G}function bt(N){return N&&N.__esModule?N:{default:N}}function Vt(N,G,H,F){if(H==="a"&&!F)throw new TypeError("Private accessor was defined without a getter");if(typeof G=="function"?N!==G||!F:!G.has(N))throw new TypeError("Cannot read private member from an object whose class did not declare it");return H==="m"?F:H==="a"?F.call(N):F?F.value:G.get(N)}function ue(N,G,H,F,j){if(F==="m")throw new TypeError("Private method is not writable");if(F==="a"&&!j)throw new TypeError("Private accessor was defined without a setter");if(typeof G=="function"?N!==G||!j:!G.has(N))throw new TypeError("Cannot write private member to an object whose class did not declare it");return F==="a"?j.call(N,H):j?j.value=H:G.set(N,H),H}function ce(N,G){if(G===null||typeof G!="object"&&typeof G!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof N=="function"?G===N:N.has(G)}function na(N,G,H){if(G!=null){if(typeof G!="object"&&typeof G!="function")throw new TypeError("Object expected.");var F,j;if(H){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");F=G[Symbol.asyncDispose]}if(F===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");F=G[Symbol.dispose],H&&(j=F)}if(typeof F!="function")throw new TypeError("Object not disposable.");j&&(F=function(){try{j.call(this)}catch(Z){return Promise.reject(Z)}}),N.stack.push({value:G,dispose:F,async:H})}else H&&N.stack.push({async:!0});return G}var oa=typeof SuppressedError=="function"?SuppressedError:function(N,G,H){var F=new Error(H);return F.name="SuppressedError",F.error=N,F.suppressed=G,F};function Vr(N){function G(Z){N.error=N.hasError?new oa(Z,N.error,"An error was suppressed during disposal."):Z,N.hasError=!0}var H,F=0;function j(){for(;H=N.stack.pop();)try{if(!H.async&&F===1)return F=0,N.stack.push(H),Promise.resolve().then(j);if(H.dispose){var Z=H.dispose.call(H.value);if(H.async)return F|=2,Promise.resolve(Z).then(j,function(ut){return G(ut),j()})}else F|=1}catch(ut){G(ut)}if(F===1)return N.hasError?Promise.reject(N.error):Promise.resolve();if(N.hasError)throw N.error}return j()}function sa(N,G){return typeof N=="string"&&/^\.\.?\//.test(N)?N.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(H,F,j,Z,ut){return F?G?".jsx":".js":j&&(!Z||!ut)?H:j+Z+"."+ut.toLowerCase()+"js"}):N}rt.default={__extends:dt,__assign:Y,__rest:X,__decorate:gt,__param:p,__esDecorate:Ft,__runInitializers:ct,__propKey:ht,__setFunctionName:It,__metadata:vt,__awaiter:ie,__generator:ee,__createBinding:Te,__exportStar:ne,__values:St,__read:Ie,__spread:Kt,__spreadArrays:ia,__spreadArray:Ve,__await:De,__asyncGenerator:Ja,__asyncDelegator:Qa,__asyncValues:qa,__makeTemplateObject:ti,__importStar:ei,__importDefault:bt,__classPrivateFieldGet:Vt,__classPrivateFieldSet:ue,__classPrivateFieldIn:ce,__addDisposableResource:na,__disposeResources:Vr,__rewriteRelativeImportExtension:sa}}}]); -//# sourceMappingURL=3971.ca5531f7a8430d763cc8.js.map \ No newline at end of file +//# sourceMappingURL=3971.20c5a168732a0363e328.js.map \ No newline at end of file diff --git a/static/js/3971.20c5a168732a0363e328.js.gz b/static/js/3971.20c5a168732a0363e328.js.gz new file mode 100644 index 00000000..e49aebab Binary files /dev/null and b/static/js/3971.20c5a168732a0363e328.js.gz differ diff --git a/static/js/3971.ca5531f7a8430d763cc8.js.map b/static/js/3971.20c5a168732a0363e328.js.map similarity index 54% rename from static/js/3971.ca5531f7a8430d763cc8.js.map rename to static/js/3971.20c5a168732a0363e328.js.map index 1c5f3e5a..00b6944f 100644 --- a/static/js/3971.ca5531f7a8430d763cc8.js.map +++ b/static/js/3971.20c5a168732a0363e328.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/3971.ca5531f7a8430d763cc8.js","mappings":"s3EASA,SAASA,GAAUC,EAAIC,EAASC,EAAK,CACjC,IAAIC,EAASC,GAAA,GAAY,aAAa,EAClCC,EAAQJ,EAAQ,SAAS,EACzBK,EAASL,EAAQ,UAAU,EAC3BM,EAAcJ,EAAO,MACzB,OAAII,IACAA,EAAY,SAAW,WACvBA,EAAY,KAAO,IACnBA,EAAY,IAAM,IAClBA,EAAY,MAAQF,EAAQ,KAC5BE,EAAY,OAASD,EAAS,KAC9BH,EAAO,aAAa,iBAAkBH,CAAE,GAE5CG,EAAO,MAAQE,EAAQH,EACvBC,EAAO,OAASG,EAASJ,EAClBC,CACX,CAEA,IAAIK,GAAS,SAAUC,EAAQ,IAC3B,OAAUD,EAAOC,CAAM,EACvB,SAASD,EAAMR,EAAI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","sources":["webpack://pro-react-admin/./node_modules/zrender/lib/canvas/Layer.js","webpack://pro-react-admin/./node_modules/zrender/lib/canvas/Painter.js","webpack://pro-react-admin/./node_modules/echarts/lib/renderer/installCanvasRenderer.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/SVGPathRebuilder.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/mapStyleToAttrs.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/core.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/cssClassId.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/cssAnimation.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/cssEmphasis.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/graphic.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/domapi.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/patch.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/Painter.js","webpack://pro-react-admin/./node_modules/echarts/lib/renderer/installSVGRenderer.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/LineSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/labelHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/Symbol.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/SymbolDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/helper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/lineAnimationDiff.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/poly.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/CoordinateSystem.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/LineView.js","webpack://pro-react-admin/./node_modules/echarts/lib/layout/points.js","webpack://pro-react-admin/./node_modules/echarts/lib/processor/dataSample.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/BaseBarSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/BarSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/util/shape/sausage.js","webpack://pro-react-admin/./node_modules/echarts/lib/label/sectorLabel.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/sectorHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/BarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/pieLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/processor/dataFilter.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/labelLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/PieView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/LegendVisualProvider.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/PieSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/processor/negativeDataFilter.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/scatter/ScatterSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/LargeSymbolDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/scatter/ScatterView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/GridModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/AxisModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/axisDefault.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/axisCommonTypes.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/axisModelCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/Cartesian.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/Cartesian2D.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/Axis2D.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/axisAlignTicks.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/Grid.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/AxisBuilder.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/modelHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/AxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/axisSplitHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/CartesianAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/grid/installSimple.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/scatter/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/radarLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/backwardCompat.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/RadarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/RadarSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/radar/RadarModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/radar/RadarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/radar/IndicatorAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/radar/Radar.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/radar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/interactionMutex.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/RoamController.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/roamHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/cursorHelper.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/parseXML.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/parseSVG.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/GeoSVGResource.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/fix/nanhai.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/fix/textCoord.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/fix/diaoyuIsland.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/GeoJSONResource.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/geoSourceManager.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/MapDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/MapView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/MapSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/mapDataStatistic.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/mapSymbolLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/View.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/Geo.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/geoCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/GeoModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/action/roamHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/geo/GeoView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/geo/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/layoutHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/TreeView.js","webpack://pro-react-admin/./node_modules/echarts/lib/data/helper/linkSeriesData.js","webpack://pro-react-admin/./node_modules/echarts/lib/data/Tree.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/treeHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/TreeSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/traversalHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/treeLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/treeVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/treeAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/treemapAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/enableAriaDecalForTree.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/TreemapSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/Breadcrumb.js","webpack://pro-react-admin/./node_modules/echarts/lib/util/animation.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/TreemapView.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/VisualMapping.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/treemapVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/treemapLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/categoryFilter.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/categoryVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/edgeVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/multipleGraphEdgeHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/simpleLayoutHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/simpleLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/graphHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/circularLayoutHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/circularLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/forceHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/forceLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/createView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/LinePath.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/Line.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/LineDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/adjustEdge.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/GraphView.js","webpack://pro-react-admin/./node_modules/echarts/lib/data/Graph.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/createGraphFromNodeEdge.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/GraphSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/gauge/PointerPath.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/gauge/GaugeView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/gauge/GaugeSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/gauge/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/funnel/FunnelView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/funnel/FunnelSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/funnel/funnelLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/funnel/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/parallel/ParallelView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/parallel/ParallelSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/parallel/parallelVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/parallelPreprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/parallel/ParallelView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/ParallelModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/ParallelAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/sliderMove.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/Parallel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/parallelCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/AxisModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/BrushController.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/brushHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/ParallelAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/parallelAxisAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/parallel/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/parallel/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/SankeyView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/SankeySeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/sankeyLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/sankeyVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/whiskerBoxCommon.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/BoxplotSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/BoxplotView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/boxplotLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/prepareBoxplotData.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/boxplotTransform.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/CandlestickView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/CandlestickSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/candlestickVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/candlestickLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/EffectSymbol.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/effectScatter/EffectScatterView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/effectScatter/EffectScatterSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/effectScatter/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/EffectLine.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/Polyline.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/EffectPolyline.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/LargeLineDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/linesLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/LinesView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/LinesSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/linesVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/heatmap/HeatmapLayer.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/heatmap/HeatmapView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/heatmap/HeatmapSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/heatmap/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/PictorialBarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/PictorialBarSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/installPictorialBar.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/themeRiver/ThemeRiverView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/themeRiver/ThemeRiverSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/themeRiver/themeRiverLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/themeRiver/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/SunburstPiece.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/sunburstAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/SunburstView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/SunburstSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/sunburstLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/sunburstVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/custom/CustomSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/calendar/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/util/styleCompat.js","webpack://pro-react-admin/./node_modules/echarts/lib/animation/customGraphicTransition.js","webpack://pro-react-admin/./node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/custom/CustomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/custom/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/viewHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/globalListener.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/AxisPointerView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/axisTrigger.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/grid/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/PolarAxisPointer.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/PolarModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/AxisModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/RadiusAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/AngleAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/Polar.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/polarCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/AngleAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/RadiusAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/layout/barPolar.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/polar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/singleAxisHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/SingleAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/AxisModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/SingleAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/Single.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/singleCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/SingleAxisPointer.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/singleAxis/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/calendar/CalendarModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/calendar/CalendarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/calendar/Calendar.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/calendar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/graphic/GraphicModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/graphic/GraphicView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/graphic/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/helper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/DataZoomModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/SelectZoomModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/DataZoomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/SelectZoomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/AxisProxy.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/dataZoomAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/installCommon.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/installDataZoomSelect.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/featureManager.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/ToolboxModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/listComponent.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/ToolboxView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/SaveAsImage.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/MagicType.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/DataView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/history.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/Restore.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/BrushTargetManager.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/DataZoom.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/TooltipModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/helper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/TooltipRichContent.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/TooltipView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/visualSolution.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/selector.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/visualEncoding.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/BrushView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/BrushModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/Brush.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/title/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/TimelineModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/SliderTimelineModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/TimelineView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/TimelineAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/SliderTimelineView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/timelineAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/checkMarkerInSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkerModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkPointModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/markerHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkerView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkPointView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/installMarkPoint.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkLineModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkLineView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/installMarkLine.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkAreaModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkAreaView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/installMarkArea.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/LegendModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/LegendView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/legendFilter.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/legendAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/installLegendPlain.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/ScrollableLegendView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/scrollableLegendAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/installLegendScroll.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/roams.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/InsideZoomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/SliderZoomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/visualDefault.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/VisualMapModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/ContinuousModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/VisualMapView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/helper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/ContinuousView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/visualMapAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/visualEncoding.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/installCommon.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/installVisualMapContinuous.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/PiecewiseModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/PiecewiseView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/installVisualMapPiecewise.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/aria.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/aria/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/aria/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/util/conditionalExpression.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/transform/filterTransform.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/transform/sortTransform.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/transform/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataset/install.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/convertPath.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/dividePath.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/morphPath.js","webpack://pro-react-admin/./node_modules/echarts/lib/animation/morphTransitionHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/animation/universalTransition.js","webpack://pro-react-admin/./node_modules/echarts/index.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/helper/pick.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/helper/is-function.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/helper/is-string.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/core.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/index.js","webpack://pro-react-admin/./src/components/stateless/FixTabPanel/index.jsx","webpack://pro-react-admin/./src/pages/echarts/index.jsx","webpack://pro-react-admin/./node_modules/fast-deep-equal/index.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/constant.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/debounce.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/id.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/index.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/sensorPool.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/sensors/index.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/sensors/object.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/sensors/resizeObserver.js","webpack://pro-react-admin/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://pro-react-admin/./node_modules/@babel/runtime/helpers/toPrimitive.js","webpack://pro-react-admin/./node_modules/@babel/runtime/helpers/toPropertyKey.js","webpack://pro-react-admin/./node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["import { __extends } from \"tslib\";\nimport * as util from '../core/util.js';\nimport { devicePixelRatio } from '../config.js';\nimport Eventful from '../core/Eventful.js';\nimport { getCanvasGradient } from './helper.js';\nimport { createCanvasPattern } from './graphic.js';\nimport BoundingRect from '../core/BoundingRect.js';\nimport { REDRAW_BIT } from '../graphic/constants.js';\nimport { platformApi } from '../core/platform.js';\nfunction createDom(id, painter, dpr) {\n var newDom = platformApi.createCanvas();\n var width = painter.getWidth();\n var height = painter.getHeight();\n var newDomStyle = newDom.style;\n if (newDomStyle) {\n newDomStyle.position = 'absolute';\n newDomStyle.left = '0';\n newDomStyle.top = '0';\n newDomStyle.width = width + 'px';\n newDomStyle.height = height + 'px';\n newDom.setAttribute('data-zr-dom-id', id);\n }\n newDom.width = width * dpr;\n newDom.height = height * dpr;\n return newDom;\n}\n;\nvar Layer = (function (_super) {\n __extends(Layer, _super);\n function Layer(id, painter, dpr) {\n var _this = _super.call(this) || this;\n _this.motionBlur = false;\n _this.lastFrameAlpha = 0.7;\n _this.dpr = 1;\n _this.virtual = false;\n _this.config = {};\n _this.incremental = false;\n _this.zlevel = 0;\n _this.maxRepaintRectCount = 5;\n _this.__dirty = true;\n _this.__firstTimePaint = true;\n _this.__used = false;\n _this.__drawIndex = 0;\n _this.__startIndex = 0;\n _this.__endIndex = 0;\n _this.__prevStartIndex = null;\n _this.__prevEndIndex = null;\n var dom;\n dpr = dpr || devicePixelRatio;\n if (typeof id === 'string') {\n dom = createDom(id, painter, dpr);\n }\n else if (util.isObject(id)) {\n dom = id;\n id = dom.id;\n }\n _this.id = id;\n _this.dom = dom;\n var domStyle = dom.style;\n if (domStyle) {\n util.disableUserSelect(dom);\n dom.onselectstart = function () { return false; };\n domStyle.padding = '0';\n domStyle.margin = '0';\n domStyle.borderWidth = '0';\n }\n _this.painter = painter;\n _this.dpr = dpr;\n return _this;\n }\n Layer.prototype.getElementCount = function () {\n return this.__endIndex - this.__startIndex;\n };\n Layer.prototype.afterBrush = function () {\n this.__prevStartIndex = this.__startIndex;\n this.__prevEndIndex = this.__endIndex;\n };\n Layer.prototype.initContext = function () {\n this.ctx = this.dom.getContext('2d');\n this.ctx.dpr = this.dpr;\n };\n Layer.prototype.setUnpainted = function () {\n this.__firstTimePaint = true;\n };\n Layer.prototype.createBackBuffer = function () {\n var dpr = this.dpr;\n this.domBack = createDom('back-' + this.id, this.painter, dpr);\n this.ctxBack = this.domBack.getContext('2d');\n if (dpr !== 1) {\n this.ctxBack.scale(dpr, dpr);\n }\n };\n Layer.prototype.createRepaintRects = function (displayList, prevList, viewWidth, viewHeight) {\n if (this.__firstTimePaint) {\n this.__firstTimePaint = false;\n return null;\n }\n var mergedRepaintRects = [];\n var maxRepaintRectCount = this.maxRepaintRectCount;\n var full = false;\n var pendingRect = new BoundingRect(0, 0, 0, 0);\n function addRectToMergePool(rect) {\n if (!rect.isFinite() || rect.isZero()) {\n return;\n }\n if (mergedRepaintRects.length === 0) {\n var boundingRect = new BoundingRect(0, 0, 0, 0);\n boundingRect.copy(rect);\n mergedRepaintRects.push(boundingRect);\n }\n else {\n var isMerged = false;\n var minDeltaArea = Infinity;\n var bestRectToMergeIdx = 0;\n for (var i = 0; i < mergedRepaintRects.length; ++i) {\n var mergedRect = mergedRepaintRects[i];\n if (mergedRect.intersect(rect)) {\n var pendingRect_1 = new BoundingRect(0, 0, 0, 0);\n pendingRect_1.copy(mergedRect);\n pendingRect_1.union(rect);\n mergedRepaintRects[i] = pendingRect_1;\n isMerged = true;\n break;\n }\n else if (full) {\n pendingRect.copy(rect);\n pendingRect.union(mergedRect);\n var aArea = rect.width * rect.height;\n var bArea = mergedRect.width * mergedRect.height;\n var pendingArea = pendingRect.width * pendingRect.height;\n var deltaArea = pendingArea - aArea - bArea;\n if (deltaArea < minDeltaArea) {\n minDeltaArea = deltaArea;\n bestRectToMergeIdx = i;\n }\n }\n }\n if (full) {\n mergedRepaintRects[bestRectToMergeIdx].union(rect);\n isMerged = true;\n }\n if (!isMerged) {\n var boundingRect = new BoundingRect(0, 0, 0, 0);\n boundingRect.copy(rect);\n mergedRepaintRects.push(boundingRect);\n }\n if (!full) {\n full = mergedRepaintRects.length >= maxRepaintRectCount;\n }\n }\n }\n for (var i = this.__startIndex; i < this.__endIndex; ++i) {\n var el = displayList[i];\n if (el) {\n var shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true);\n var prevRect = el.__isRendered && ((el.__dirty & REDRAW_BIT) || !shouldPaint)\n ? el.getPrevPaintRect()\n : null;\n if (prevRect) {\n addRectToMergePool(prevRect);\n }\n var curRect = shouldPaint && ((el.__dirty & REDRAW_BIT) || !el.__isRendered)\n ? el.getPaintRect()\n : null;\n if (curRect) {\n addRectToMergePool(curRect);\n }\n }\n }\n for (var i = this.__prevStartIndex; i < this.__prevEndIndex; ++i) {\n var el = prevList[i];\n var shouldPaint = el && el.shouldBePainted(viewWidth, viewHeight, true, true);\n if (el && (!shouldPaint || !el.__zr) && el.__isRendered) {\n var prevRect = el.getPrevPaintRect();\n if (prevRect) {\n addRectToMergePool(prevRect);\n }\n }\n }\n var hasIntersections;\n do {\n hasIntersections = false;\n for (var i = 0; i < mergedRepaintRects.length;) {\n if (mergedRepaintRects[i].isZero()) {\n mergedRepaintRects.splice(i, 1);\n continue;\n }\n for (var j = i + 1; j < mergedRepaintRects.length;) {\n if (mergedRepaintRects[i].intersect(mergedRepaintRects[j])) {\n hasIntersections = true;\n mergedRepaintRects[i].union(mergedRepaintRects[j]);\n mergedRepaintRects.splice(j, 1);\n }\n else {\n j++;\n }\n }\n i++;\n }\n } while (hasIntersections);\n this._paintRects = mergedRepaintRects;\n return mergedRepaintRects;\n };\n Layer.prototype.debugGetPaintRects = function () {\n return (this._paintRects || []).slice();\n };\n Layer.prototype.resize = function (width, height) {\n var dpr = this.dpr;\n var dom = this.dom;\n var domStyle = dom.style;\n var domBack = this.domBack;\n if (domStyle) {\n domStyle.width = width + 'px';\n domStyle.height = height + 'px';\n }\n dom.width = width * dpr;\n dom.height = height * dpr;\n if (domBack) {\n domBack.width = width * dpr;\n domBack.height = height * dpr;\n if (dpr !== 1) {\n this.ctxBack.scale(dpr, dpr);\n }\n }\n };\n Layer.prototype.clear = function (clearAll, clearColor, repaintRects) {\n var dom = this.dom;\n var ctx = this.ctx;\n var width = dom.width;\n var height = dom.height;\n clearColor = clearColor || this.clearColor;\n var haveMotionBLur = this.motionBlur && !clearAll;\n var lastFrameAlpha = this.lastFrameAlpha;\n var dpr = this.dpr;\n var self = this;\n if (haveMotionBLur) {\n if (!this.domBack) {\n this.createBackBuffer();\n }\n this.ctxBack.globalCompositeOperation = 'copy';\n this.ctxBack.drawImage(dom, 0, 0, width / dpr, height / dpr);\n }\n var domBack = this.domBack;\n function doClear(x, y, width, height) {\n ctx.clearRect(x, y, width, height);\n if (clearColor && clearColor !== 'transparent') {\n var clearColorGradientOrPattern = void 0;\n if (util.isGradientObject(clearColor)) {\n var shouldCache = clearColor.global || (clearColor.__width === width\n && clearColor.__height === height);\n clearColorGradientOrPattern = shouldCache\n && clearColor.__canvasGradient\n || getCanvasGradient(ctx, clearColor, {\n x: 0,\n y: 0,\n width: width,\n height: height\n });\n clearColor.__canvasGradient = clearColorGradientOrPattern;\n clearColor.__width = width;\n clearColor.__height = height;\n }\n else if (util.isImagePatternObject(clearColor)) {\n clearColor.scaleX = clearColor.scaleX || dpr;\n clearColor.scaleY = clearColor.scaleY || dpr;\n clearColorGradientOrPattern = createCanvasPattern(ctx, clearColor, {\n dirty: function () {\n self.setUnpainted();\n self.painter.refresh();\n }\n });\n }\n ctx.save();\n ctx.fillStyle = clearColorGradientOrPattern || clearColor;\n ctx.fillRect(x, y, width, height);\n ctx.restore();\n }\n if (haveMotionBLur) {\n ctx.save();\n ctx.globalAlpha = lastFrameAlpha;\n ctx.drawImage(domBack, x, y, width, height);\n ctx.restore();\n }\n }\n ;\n if (!repaintRects || haveMotionBLur) {\n doClear(0, 0, width, height);\n }\n else if (repaintRects.length) {\n util.each(repaintRects, function (rect) {\n doClear(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr);\n });\n }\n };\n return Layer;\n}(Eventful));\nexport default Layer;\n","import { devicePixelRatio } from '../config.js';\nimport * as util from '../core/util.js';\nimport Layer from './Layer.js';\nimport requestAnimationFrame from '../animation/requestAnimationFrame.js';\nimport env from '../core/env.js';\nimport { brush, brushSingle } from './graphic.js';\nimport { REDRAW_BIT } from '../graphic/constants.js';\nimport { getSize } from './helper.js';\nvar HOVER_LAYER_ZLEVEL = 1e5;\nvar CANVAS_ZLEVEL = 314159;\nvar EL_AFTER_INCREMENTAL_INC = 0.01;\nvar INCREMENTAL_INC = 0.001;\nfunction isLayerValid(layer) {\n if (!layer) {\n return false;\n }\n if (layer.__builtin__) {\n return true;\n }\n if (typeof (layer.resize) !== 'function'\n || typeof (layer.refresh) !== 'function') {\n return false;\n }\n return true;\n}\nfunction createRoot(width, height) {\n var domRoot = document.createElement('div');\n domRoot.style.cssText = [\n 'position:relative',\n 'width:' + width + 'px',\n 'height:' + height + 'px',\n 'padding:0',\n 'margin:0',\n 'border-width:0'\n ].join(';') + ';';\n return domRoot;\n}\nvar CanvasPainter = (function () {\n function CanvasPainter(root, storage, opts, id) {\n this.type = 'canvas';\n this._zlevelList = [];\n this._prevDisplayList = [];\n this._layers = {};\n this._layerConfig = {};\n this._needsManuallyCompositing = false;\n this.type = 'canvas';\n var singleCanvas = !root.nodeName\n || root.nodeName.toUpperCase() === 'CANVAS';\n this._opts = opts = util.extend({}, opts || {});\n this.dpr = opts.devicePixelRatio || devicePixelRatio;\n this._singleCanvas = singleCanvas;\n this.root = root;\n var rootStyle = root.style;\n if (rootStyle) {\n util.disableUserSelect(root);\n root.innerHTML = '';\n }\n this.storage = storage;\n var zlevelList = this._zlevelList;\n this._prevDisplayList = [];\n var layers = this._layers;\n if (!singleCanvas) {\n this._width = getSize(root, 0, opts);\n this._height = getSize(root, 1, opts);\n var domRoot = this._domRoot = createRoot(this._width, this._height);\n root.appendChild(domRoot);\n }\n else {\n var rootCanvas = root;\n var width = rootCanvas.width;\n var height = rootCanvas.height;\n if (opts.width != null) {\n width = opts.width;\n }\n if (opts.height != null) {\n height = opts.height;\n }\n this.dpr = opts.devicePixelRatio || 1;\n rootCanvas.width = width * this.dpr;\n rootCanvas.height = height * this.dpr;\n this._width = width;\n this._height = height;\n var mainLayer = new Layer(rootCanvas, this, this.dpr);\n mainLayer.__builtin__ = true;\n mainLayer.initContext();\n layers[CANVAS_ZLEVEL] = mainLayer;\n mainLayer.zlevel = CANVAS_ZLEVEL;\n zlevelList.push(CANVAS_ZLEVEL);\n this._domRoot = root;\n }\n }\n CanvasPainter.prototype.getType = function () {\n return 'canvas';\n };\n CanvasPainter.prototype.isSingleCanvas = function () {\n return this._singleCanvas;\n };\n CanvasPainter.prototype.getViewportRoot = function () {\n return this._domRoot;\n };\n CanvasPainter.prototype.getViewportRootOffset = function () {\n var viewportRoot = this.getViewportRoot();\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n };\n CanvasPainter.prototype.refresh = function (paintAll) {\n var list = this.storage.getDisplayList(true);\n var prevList = this._prevDisplayList;\n var zlevelList = this._zlevelList;\n this._redrawId = Math.random();\n this._paintList(list, prevList, paintAll, this._redrawId);\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (!layer.__builtin__ && layer.refresh) {\n var clearColor = i === 0 ? this._backgroundColor : null;\n layer.refresh(clearColor);\n }\n }\n if (this._opts.useDirtyRect) {\n this._prevDisplayList = list.slice();\n }\n return this;\n };\n CanvasPainter.prototype.refreshHover = function () {\n this._paintHoverList(this.storage.getDisplayList(false));\n };\n CanvasPainter.prototype._paintHoverList = function (list) {\n var len = list.length;\n var hoverLayer = this._hoverlayer;\n hoverLayer && hoverLayer.clear();\n if (!len) {\n return;\n }\n var scope = {\n inHover: true,\n viewWidth: this._width,\n viewHeight: this._height\n };\n var ctx;\n for (var i = 0; i < len; i++) {\n var el = list[i];\n if (el.__inHover) {\n if (!hoverLayer) {\n hoverLayer = this._hoverlayer = this.getLayer(HOVER_LAYER_ZLEVEL);\n }\n if (!ctx) {\n ctx = hoverLayer.ctx;\n ctx.save();\n }\n brush(ctx, el, scope, i === len - 1);\n }\n }\n if (ctx) {\n ctx.restore();\n }\n };\n CanvasPainter.prototype.getHoverLayer = function () {\n return this.getLayer(HOVER_LAYER_ZLEVEL);\n };\n CanvasPainter.prototype.paintOne = function (ctx, el) {\n brushSingle(ctx, el);\n };\n CanvasPainter.prototype._paintList = function (list, prevList, paintAll, redrawId) {\n if (this._redrawId !== redrawId) {\n return;\n }\n paintAll = paintAll || false;\n this._updateLayerStatus(list);\n var _a = this._doPaintList(list, prevList, paintAll), finished = _a.finished, needsRefreshHover = _a.needsRefreshHover;\n if (this._needsManuallyCompositing) {\n this._compositeManually();\n }\n if (needsRefreshHover) {\n this._paintHoverList(list);\n }\n if (!finished) {\n var self_1 = this;\n requestAnimationFrame(function () {\n self_1._paintList(list, prevList, paintAll, redrawId);\n });\n }\n else {\n this.eachLayer(function (layer) {\n layer.afterBrush && layer.afterBrush();\n });\n }\n };\n CanvasPainter.prototype._compositeManually = function () {\n var ctx = this.getLayer(CANVAS_ZLEVEL).ctx;\n var width = this._domRoot.width;\n var height = this._domRoot.height;\n ctx.clearRect(0, 0, width, height);\n this.eachBuiltinLayer(function (layer) {\n if (layer.virtual) {\n ctx.drawImage(layer.dom, 0, 0, width, height);\n }\n });\n };\n CanvasPainter.prototype._doPaintList = function (list, prevList, paintAll) {\n var _this = this;\n var layerList = [];\n var useDirtyRect = this._opts.useDirtyRect;\n for (var zi = 0; zi < this._zlevelList.length; zi++) {\n var zlevel = this._zlevelList[zi];\n var layer = this._layers[zlevel];\n if (layer.__builtin__\n && layer !== this._hoverlayer\n && (layer.__dirty || paintAll)) {\n layerList.push(layer);\n }\n }\n var finished = true;\n var needsRefreshHover = false;\n var _loop_1 = function (k) {\n var layer = layerList[k];\n var ctx = layer.ctx;\n var repaintRects = useDirtyRect\n && layer.createRepaintRects(list, prevList, this_1._width, this_1._height);\n var start = paintAll ? layer.__startIndex : layer.__drawIndex;\n var useTimer = !paintAll && layer.incremental && Date.now;\n var startTime = useTimer && Date.now();\n var clearColor = layer.zlevel === this_1._zlevelList[0]\n ? this_1._backgroundColor : null;\n if (layer.__startIndex === layer.__endIndex) {\n layer.clear(false, clearColor, repaintRects);\n }\n else if (start === layer.__startIndex) {\n var firstEl = list[start];\n if (!firstEl.incremental || !firstEl.notClear || paintAll) {\n layer.clear(false, clearColor, repaintRects);\n }\n }\n if (start === -1) {\n console.error('For some unknown reason. drawIndex is -1');\n start = layer.__startIndex;\n }\n var i;\n var repaint = function (repaintRect) {\n var scope = {\n inHover: false,\n allClipped: false,\n prevEl: null,\n viewWidth: _this._width,\n viewHeight: _this._height\n };\n for (i = start; i < layer.__endIndex; i++) {\n var el = list[i];\n if (el.__inHover) {\n needsRefreshHover = true;\n }\n _this._doPaintEl(el, layer, useDirtyRect, repaintRect, scope, i === layer.__endIndex - 1);\n if (useTimer) {\n var dTime = Date.now() - startTime;\n if (dTime > 15) {\n break;\n }\n }\n }\n if (scope.prevElClipPaths) {\n ctx.restore();\n }\n };\n if (repaintRects) {\n if (repaintRects.length === 0) {\n i = layer.__endIndex;\n }\n else {\n var dpr = this_1.dpr;\n for (var r = 0; r < repaintRects.length; ++r) {\n var rect = repaintRects[r];\n ctx.save();\n ctx.beginPath();\n ctx.rect(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr);\n ctx.clip();\n repaint(rect);\n ctx.restore();\n }\n }\n }\n else {\n ctx.save();\n repaint();\n ctx.restore();\n }\n layer.__drawIndex = i;\n if (layer.__drawIndex < layer.__endIndex) {\n finished = false;\n }\n };\n var this_1 = this;\n for (var k = 0; k < layerList.length; k++) {\n _loop_1(k);\n }\n if (env.wxa) {\n util.each(this._layers, function (layer) {\n if (layer && layer.ctx && layer.ctx.draw) {\n layer.ctx.draw();\n }\n });\n }\n return {\n finished: finished,\n needsRefreshHover: needsRefreshHover\n };\n };\n CanvasPainter.prototype._doPaintEl = function (el, currentLayer, useDirtyRect, repaintRect, scope, isLast) {\n var ctx = currentLayer.ctx;\n if (useDirtyRect) {\n var paintRect = el.getPaintRect();\n if (!repaintRect || paintRect && paintRect.intersect(repaintRect)) {\n brush(ctx, el, scope, isLast);\n el.setPrevPaintRect(paintRect);\n }\n }\n else {\n brush(ctx, el, scope, isLast);\n }\n };\n CanvasPainter.prototype.getLayer = function (zlevel, virtual) {\n if (this._singleCanvas && !this._needsManuallyCompositing) {\n zlevel = CANVAS_ZLEVEL;\n }\n var layer = this._layers[zlevel];\n if (!layer) {\n layer = new Layer('zr_' + zlevel, this, this.dpr);\n layer.zlevel = zlevel;\n layer.__builtin__ = true;\n if (this._layerConfig[zlevel]) {\n util.merge(layer, this._layerConfig[zlevel], true);\n }\n else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {\n util.merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);\n }\n if (virtual) {\n layer.virtual = virtual;\n }\n this.insertLayer(zlevel, layer);\n layer.initContext();\n }\n return layer;\n };\n CanvasPainter.prototype.insertLayer = function (zlevel, layer) {\n var layersMap = this._layers;\n var zlevelList = this._zlevelList;\n var len = zlevelList.length;\n var domRoot = this._domRoot;\n var prevLayer = null;\n var i = -1;\n if (layersMap[zlevel]) {\n if (process.env.NODE_ENV !== 'production') {\n util.logError('ZLevel ' + zlevel + ' has been used already');\n }\n return;\n }\n if (!isLayerValid(layer)) {\n if (process.env.NODE_ENV !== 'production') {\n util.logError('Layer of zlevel ' + zlevel + ' is not valid');\n }\n return;\n }\n if (len > 0 && zlevel > zlevelList[0]) {\n for (i = 0; i < len - 1; i++) {\n if (zlevelList[i] < zlevel\n && zlevelList[i + 1] > zlevel) {\n break;\n }\n }\n prevLayer = layersMap[zlevelList[i]];\n }\n zlevelList.splice(i + 1, 0, zlevel);\n layersMap[zlevel] = layer;\n if (!layer.virtual) {\n if (prevLayer) {\n var prevDom = prevLayer.dom;\n if (prevDom.nextSibling) {\n domRoot.insertBefore(layer.dom, prevDom.nextSibling);\n }\n else {\n domRoot.appendChild(layer.dom);\n }\n }\n else {\n if (domRoot.firstChild) {\n domRoot.insertBefore(layer.dom, domRoot.firstChild);\n }\n else {\n domRoot.appendChild(layer.dom);\n }\n }\n }\n layer.painter || (layer.painter = this);\n };\n CanvasPainter.prototype.eachLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n cb.call(context, this._layers[z], z);\n }\n };\n CanvasPainter.prototype.eachBuiltinLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (layer.__builtin__) {\n cb.call(context, layer, z);\n }\n }\n };\n CanvasPainter.prototype.eachOtherLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (!layer.__builtin__) {\n cb.call(context, layer, z);\n }\n }\n };\n CanvasPainter.prototype.getLayers = function () {\n return this._layers;\n };\n CanvasPainter.prototype._updateLayerStatus = function (list) {\n this.eachBuiltinLayer(function (layer, z) {\n layer.__dirty = layer.__used = false;\n });\n function updatePrevLayer(idx) {\n if (prevLayer) {\n if (prevLayer.__endIndex !== idx) {\n prevLayer.__dirty = true;\n }\n prevLayer.__endIndex = idx;\n }\n }\n if (this._singleCanvas) {\n for (var i_1 = 1; i_1 < list.length; i_1++) {\n var el = list[i_1];\n if (el.zlevel !== list[i_1 - 1].zlevel || el.incremental) {\n this._needsManuallyCompositing = true;\n break;\n }\n }\n }\n var prevLayer = null;\n var incrementalLayerCount = 0;\n var prevZlevel;\n var i;\n for (i = 0; i < list.length; i++) {\n var el = list[i];\n var zlevel = el.zlevel;\n var layer = void 0;\n if (prevZlevel !== zlevel) {\n prevZlevel = zlevel;\n incrementalLayerCount = 0;\n }\n if (el.incremental) {\n layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);\n layer.incremental = true;\n incrementalLayerCount = 1;\n }\n else {\n layer = this.getLayer(zlevel + (incrementalLayerCount > 0 ? EL_AFTER_INCREMENTAL_INC : 0), this._needsManuallyCompositing);\n }\n if (!layer.__builtin__) {\n util.logError('ZLevel ' + zlevel + ' has been used by unkown layer ' + layer.id);\n }\n if (layer !== prevLayer) {\n layer.__used = true;\n if (layer.__startIndex !== i) {\n layer.__dirty = true;\n }\n layer.__startIndex = i;\n if (!layer.incremental) {\n layer.__drawIndex = i;\n }\n else {\n layer.__drawIndex = -1;\n }\n updatePrevLayer(i);\n prevLayer = layer;\n }\n if ((el.__dirty & REDRAW_BIT) && !el.__inHover) {\n layer.__dirty = true;\n if (layer.incremental && layer.__drawIndex < 0) {\n layer.__drawIndex = i;\n }\n }\n }\n updatePrevLayer(i);\n this.eachBuiltinLayer(function (layer, z) {\n if (!layer.__used && layer.getElementCount() > 0) {\n layer.__dirty = true;\n layer.__startIndex = layer.__endIndex = layer.__drawIndex = 0;\n }\n if (layer.__dirty && layer.__drawIndex < 0) {\n layer.__drawIndex = layer.__startIndex;\n }\n });\n };\n CanvasPainter.prototype.clear = function () {\n this.eachBuiltinLayer(this._clearLayer);\n return this;\n };\n CanvasPainter.prototype._clearLayer = function (layer) {\n layer.clear();\n };\n CanvasPainter.prototype.setBackgroundColor = function (backgroundColor) {\n this._backgroundColor = backgroundColor;\n util.each(this._layers, function (layer) {\n layer.setUnpainted();\n });\n };\n CanvasPainter.prototype.configLayer = function (zlevel, config) {\n if (config) {\n var layerConfig = this._layerConfig;\n if (!layerConfig[zlevel]) {\n layerConfig[zlevel] = config;\n }\n else {\n util.merge(layerConfig[zlevel], config, true);\n }\n for (var i = 0; i < this._zlevelList.length; i++) {\n var _zlevel = this._zlevelList[i];\n if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {\n var layer = this._layers[_zlevel];\n util.merge(layer, layerConfig[zlevel], true);\n }\n }\n }\n };\n CanvasPainter.prototype.delLayer = function (zlevel) {\n var layers = this._layers;\n var zlevelList = this._zlevelList;\n var layer = layers[zlevel];\n if (!layer) {\n return;\n }\n layer.dom.parentNode.removeChild(layer.dom);\n delete layers[zlevel];\n zlevelList.splice(util.indexOf(zlevelList, zlevel), 1);\n };\n CanvasPainter.prototype.resize = function (width, height) {\n if (!this._domRoot.style) {\n if (width == null || height == null) {\n return;\n }\n this._width = width;\n this._height = height;\n this.getLayer(CANVAS_ZLEVEL).resize(width, height);\n }\n else {\n var domRoot = this._domRoot;\n domRoot.style.display = 'none';\n var opts = this._opts;\n var root = this.root;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n width = getSize(root, 0, opts);\n height = getSize(root, 1, opts);\n domRoot.style.display = '';\n if (this._width !== width || height !== this._height) {\n domRoot.style.width = width + 'px';\n domRoot.style.height = height + 'px';\n for (var id in this._layers) {\n if (this._layers.hasOwnProperty(id)) {\n this._layers[id].resize(width, height);\n }\n }\n this.refresh(true);\n }\n this._width = width;\n this._height = height;\n }\n return this;\n };\n CanvasPainter.prototype.clearLayer = function (zlevel) {\n var layer = this._layers[zlevel];\n if (layer) {\n layer.clear();\n }\n };\n CanvasPainter.prototype.dispose = function () {\n this.root.innerHTML = '';\n this.root =\n this.storage =\n this._domRoot =\n this._layers = null;\n };\n CanvasPainter.prototype.getRenderedCanvas = function (opts) {\n opts = opts || {};\n if (this._singleCanvas && !this._compositeManually) {\n return this._layers[CANVAS_ZLEVEL].dom;\n }\n var imageLayer = new Layer('image', this, opts.pixelRatio || this.dpr);\n imageLayer.initContext();\n imageLayer.clear(false, opts.backgroundColor || this._backgroundColor);\n var ctx = imageLayer.ctx;\n if (opts.pixelRatio <= this.dpr) {\n this.refresh();\n var width_1 = imageLayer.dom.width;\n var height_1 = imageLayer.dom.height;\n this.eachLayer(function (layer) {\n if (layer.__builtin__) {\n ctx.drawImage(layer.dom, 0, 0, width_1, height_1);\n }\n else if (layer.renderToCanvas) {\n ctx.save();\n layer.renderToCanvas(ctx);\n ctx.restore();\n }\n });\n }\n else {\n var scope = {\n inHover: false,\n viewWidth: this._width,\n viewHeight: this._height\n };\n var displayList = this.storage.getDisplayList(true);\n for (var i = 0, len = displayList.length; i < len; i++) {\n var el = displayList[i];\n brush(ctx, el, scope, i === len - 1);\n }\n }\n return imageLayer.dom;\n };\n CanvasPainter.prototype.getWidth = function () {\n return this._width;\n };\n CanvasPainter.prototype.getHeight = function () {\n return this._height;\n };\n return CanvasPainter;\n}());\nexport default CanvasPainter;\n;\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CanvasPainter from 'zrender/lib/canvas/Painter.js';\nexport function install(registers) {\n registers.registerPainter('canvas', CanvasPainter);\n}","import { isAroundZero } from './helper.js';\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI = Math.PI;\nvar PI2 = Math.PI * 2;\nvar degree = 180 / PI;\nvar SVGPathRebuilder = (function () {\n function SVGPathRebuilder() {\n }\n SVGPathRebuilder.prototype.reset = function (precision) {\n this._start = true;\n this._d = [];\n this._str = '';\n this._p = Math.pow(10, precision || 4);\n };\n SVGPathRebuilder.prototype.moveTo = function (x, y) {\n this._add('M', x, y);\n };\n SVGPathRebuilder.prototype.lineTo = function (x, y) {\n this._add('L', x, y);\n };\n SVGPathRebuilder.prototype.bezierCurveTo = function (x, y, x2, y2, x3, y3) {\n this._add('C', x, y, x2, y2, x3, y3);\n };\n SVGPathRebuilder.prototype.quadraticCurveTo = function (x, y, x2, y2) {\n this._add('Q', x, y, x2, y2);\n };\n SVGPathRebuilder.prototype.arc = function (cx, cy, r, startAngle, endAngle, anticlockwise) {\n this.ellipse(cx, cy, r, r, 0, startAngle, endAngle, anticlockwise);\n };\n SVGPathRebuilder.prototype.ellipse = function (cx, cy, rx, ry, psi, startAngle, endAngle, anticlockwise) {\n var dTheta = endAngle - startAngle;\n var clockwise = !anticlockwise;\n var dThetaPositive = Math.abs(dTheta);\n var isCircle = isAroundZero(dThetaPositive - PI2)\n || (clockwise ? dTheta >= PI2 : -dTheta >= PI2);\n var unifiedTheta = dTheta > 0 ? dTheta % PI2 : (dTheta % PI2 + PI2);\n var large = false;\n if (isCircle) {\n large = true;\n }\n else if (isAroundZero(dThetaPositive)) {\n large = false;\n }\n else {\n large = (unifiedTheta >= PI) === !!clockwise;\n }\n var x0 = cx + rx * mathCos(startAngle);\n var y0 = cy + ry * mathSin(startAngle);\n if (this._start) {\n this._add('M', x0, y0);\n }\n var xRot = Math.round(psi * degree);\n if (isCircle) {\n var p = 1 / this._p;\n var dTheta_1 = (clockwise ? 1 : -1) * (PI2 - p);\n this._add('A', rx, ry, xRot, 1, +clockwise, cx + rx * mathCos(startAngle + dTheta_1), cy + ry * mathSin(startAngle + dTheta_1));\n if (p > 1e-2) {\n this._add('A', rx, ry, xRot, 0, +clockwise, x0, y0);\n }\n }\n else {\n var x = cx + rx * mathCos(endAngle);\n var y = cy + ry * mathSin(endAngle);\n this._add('A', rx, ry, xRot, +large, +clockwise, x, y);\n }\n };\n SVGPathRebuilder.prototype.rect = function (x, y, w, h) {\n this._add('M', x, y);\n this._add('l', w, 0);\n this._add('l', 0, h);\n this._add('l', -w, 0);\n this._add('Z');\n };\n SVGPathRebuilder.prototype.closePath = function () {\n if (this._d.length > 0) {\n this._add('Z');\n }\n };\n SVGPathRebuilder.prototype._add = function (cmd, a, b, c, d, e, f, g, h) {\n var vals = [];\n var p = this._p;\n for (var i = 1; i < arguments.length; i++) {\n var val = arguments[i];\n if (isNaN(val)) {\n this._invalid = true;\n return;\n }\n vals.push(Math.round(val * p) / p);\n }\n this._d.push(cmd + vals.join(' '));\n this._start = cmd === 'Z';\n };\n SVGPathRebuilder.prototype.generateStr = function () {\n this._str = this._invalid ? '' : this._d.join('');\n this._d = [];\n };\n SVGPathRebuilder.prototype.getStr = function () {\n return this._str;\n };\n return SVGPathRebuilder;\n}());\nexport default SVGPathRebuilder;\n","import { DEFAULT_PATH_STYLE } from '../graphic/Path.js';\nimport ZRImage from '../graphic/Image.js';\nimport { getLineDash } from '../canvas/dashStyle.js';\nimport { map } from '../core/util.js';\nimport { normalizeColor } from './helper.js';\nvar NONE = 'none';\nvar mathRound = Math.round;\nfunction pathHasFill(style) {\n var fill = style.fill;\n return fill != null && fill !== NONE;\n}\nfunction pathHasStroke(style) {\n var stroke = style.stroke;\n return stroke != null && stroke !== NONE;\n}\nvar strokeProps = ['lineCap', 'miterLimit', 'lineJoin'];\nvar svgStrokeProps = map(strokeProps, function (prop) { return \"stroke-\" + prop.toLowerCase(); });\nexport default function mapStyleToAttrs(updateAttr, style, el, forceUpdate) {\n var opacity = style.opacity == null ? 1 : style.opacity;\n if (el instanceof ZRImage) {\n updateAttr('opacity', opacity);\n return;\n }\n if (pathHasFill(style)) {\n var fill = normalizeColor(style.fill);\n updateAttr('fill', fill.color);\n var fillOpacity = style.fillOpacity != null\n ? style.fillOpacity * fill.opacity * opacity\n : fill.opacity * opacity;\n if (forceUpdate || fillOpacity < 1) {\n updateAttr('fill-opacity', fillOpacity);\n }\n }\n else {\n updateAttr('fill', NONE);\n }\n if (pathHasStroke(style)) {\n var stroke = normalizeColor(style.stroke);\n updateAttr('stroke', stroke.color);\n var strokeScale = style.strokeNoScale\n ? el.getLineScale()\n : 1;\n var strokeWidth = (strokeScale ? (style.lineWidth || 0) / strokeScale : 0);\n var strokeOpacity = style.strokeOpacity != null\n ? style.strokeOpacity * stroke.opacity * opacity\n : stroke.opacity * opacity;\n var strokeFirst = style.strokeFirst;\n if (forceUpdate || strokeWidth !== 1) {\n updateAttr('stroke-width', strokeWidth);\n }\n if (forceUpdate || strokeFirst) {\n updateAttr('paint-order', strokeFirst ? 'stroke' : 'fill');\n }\n if (forceUpdate || strokeOpacity < 1) {\n updateAttr('stroke-opacity', strokeOpacity);\n }\n if (style.lineDash) {\n var _a = getLineDash(el), lineDash = _a[0], lineDashOffset = _a[1];\n if (lineDash) {\n lineDashOffset = mathRound(lineDashOffset || 0);\n updateAttr('stroke-dasharray', lineDash.join(','));\n if (lineDashOffset || forceUpdate) {\n updateAttr('stroke-dashoffset', lineDashOffset);\n }\n }\n }\n else if (forceUpdate) {\n updateAttr('stroke-dasharray', NONE);\n }\n for (var i = 0; i < strokeProps.length; i++) {\n var propName = strokeProps[i];\n if (forceUpdate || style[propName] !== DEFAULT_PATH_STYLE[propName]) {\n var val = style[propName] || DEFAULT_PATH_STYLE[propName];\n val && updateAttr(svgStrokeProps[i], val);\n }\n }\n }\n else if (forceUpdate) {\n updateAttr('stroke', NONE);\n }\n}\n","import { keys, map } from '../core/util.js';\nimport { encodeHTML } from '../core/dom.js';\nexport var SVGNS = 'http://www.w3.org/2000/svg';\nexport var XLINKNS = 'http://www.w3.org/1999/xlink';\nexport var XMLNS = 'http://www.w3.org/2000/xmlns/';\nexport var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';\nexport var META_DATA_PREFIX = 'ecmeta_';\nexport function createElement(name) {\n return document.createElementNS(SVGNS, name);\n}\n;\nexport function createVNode(tag, key, attrs, children, text) {\n return {\n tag: tag,\n attrs: attrs || {},\n children: children,\n text: text,\n key: key\n };\n}\nfunction createElementOpen(name, attrs) {\n var attrsStr = [];\n if (attrs) {\n for (var key in attrs) {\n var val = attrs[key];\n var part = key;\n if (val === false) {\n continue;\n }\n else if (val !== true && val != null) {\n part += \"=\\\"\" + val + \"\\\"\";\n }\n attrsStr.push(part);\n }\n }\n return \"<\" + name + \" \" + attrsStr.join(' ') + \">\";\n}\nfunction createElementClose(name) {\n return \"\";\n}\nexport function vNodeToString(el, opts) {\n opts = opts || {};\n var S = opts.newline ? '\\n' : '';\n function convertElToString(el) {\n var children = el.children, tag = el.tag, attrs = el.attrs, text = el.text;\n return createElementOpen(tag, attrs)\n + (tag !== 'style' ? encodeHTML(text) : text || '')\n + (children ? \"\" + S + map(children, function (child) { return convertElToString(child); }).join(S) + S : '')\n + createElementClose(tag);\n }\n return convertElToString(el);\n}\nexport function getCssString(selectorNodes, animationNodes, opts) {\n opts = opts || {};\n var S = opts.newline ? '\\n' : '';\n var bracketBegin = \" {\" + S;\n var bracketEnd = S + \"}\";\n var selectors = map(keys(selectorNodes), function (className) {\n return className + bracketBegin + map(keys(selectorNodes[className]), function (attrName) {\n return attrName + \":\" + selectorNodes[className][attrName] + \";\";\n }).join(S) + bracketEnd;\n }).join(S);\n var animations = map(keys(animationNodes), function (animationName) {\n return \"@keyframes \" + animationName + bracketBegin + map(keys(animationNodes[animationName]), function (percent) {\n return percent + bracketBegin + map(keys(animationNodes[animationName][percent]), function (attrName) {\n var val = animationNodes[animationName][percent][attrName];\n if (attrName === 'd') {\n val = \"path(\\\"\" + val + \"\\\")\";\n }\n return attrName + \":\" + val + \";\";\n }).join(S) + bracketEnd;\n }).join(S) + bracketEnd;\n }).join(S);\n if (!selectors && !animations) {\n return '';\n }\n return [''].join(S);\n}\nexport function createBrushScope(zrId) {\n return {\n zrId: zrId,\n shadowCache: {},\n patternCache: {},\n gradientCache: {},\n clipPathCache: {},\n defs: {},\n cssNodes: {},\n cssAnims: {},\n cssStyleCache: {},\n cssAnimIdx: 0,\n shadowIdx: 0,\n gradientIdx: 0,\n patternIdx: 0,\n clipPathIdx: 0\n };\n}\nexport function createSVGVNode(width, height, children, useViewBox) {\n return createVNode('svg', 'root', {\n 'width': width,\n 'height': height,\n 'xmlns': SVGNS,\n 'xmlns:xlink': XLINKNS,\n 'version': '1.1',\n 'baseProfile': 'full',\n 'viewBox': useViewBox ? \"0 0 \" + width + \" \" + height : false\n }, children);\n}\n","var cssClassIdx = 0;\nexport function getClassId() {\n return cssClassIdx++;\n}\n","import { copyTransform } from '../core/Transformable.js';\nimport { createBrushScope } from './core.js';\nimport SVGPathRebuilder from './SVGPathRebuilder.js';\nimport PathProxy from '../core/PathProxy.js';\nimport { getPathPrecision, getSRTTransformString } from './helper.js';\nimport { each, extend, filter, isNumber, isString, keys } from '../core/util.js';\nimport CompoundPath from '../graphic/CompoundPath.js';\nimport { createCubicEasingFunc } from '../animation/cubicEasing.js';\nimport { getClassId } from './cssClassId.js';\nexport var EASING_MAP = {\n cubicIn: '0.32,0,0.67,0',\n cubicOut: '0.33,1,0.68,1',\n cubicInOut: '0.65,0,0.35,1',\n quadraticIn: '0.11,0,0.5,0',\n quadraticOut: '0.5,1,0.89,1',\n quadraticInOut: '0.45,0,0.55,1',\n quarticIn: '0.5,0,0.75,0',\n quarticOut: '0.25,1,0.5,1',\n quarticInOut: '0.76,0,0.24,1',\n quinticIn: '0.64,0,0.78,0',\n quinticOut: '0.22,1,0.36,1',\n quinticInOut: '0.83,0,0.17,1',\n sinusoidalIn: '0.12,0,0.39,0',\n sinusoidalOut: '0.61,1,0.88,1',\n sinusoidalInOut: '0.37,0,0.63,1',\n exponentialIn: '0.7,0,0.84,0',\n exponentialOut: '0.16,1,0.3,1',\n exponentialInOut: '0.87,0,0.13,1',\n circularIn: '0.55,0,1,0.45',\n circularOut: '0,0.55,0.45,1',\n circularInOut: '0.85,0,0.15,1'\n};\nvar transformOriginKey = 'transform-origin';\nfunction buildPathString(el, kfShape, path) {\n var shape = extend({}, el.shape);\n extend(shape, kfShape);\n el.buildPath(path, shape);\n var svgPathBuilder = new SVGPathRebuilder();\n svgPathBuilder.reset(getPathPrecision(el));\n path.rebuildPath(svgPathBuilder, 1);\n svgPathBuilder.generateStr();\n return svgPathBuilder.getStr();\n}\nfunction setTransformOrigin(target, transform) {\n var originX = transform.originX, originY = transform.originY;\n if (originX || originY) {\n target[transformOriginKey] = originX + \"px \" + originY + \"px\";\n }\n}\nexport var ANIMATE_STYLE_MAP = {\n fill: 'fill',\n opacity: 'opacity',\n lineWidth: 'stroke-width',\n lineDashOffset: 'stroke-dashoffset'\n};\nfunction addAnimation(cssAnim, scope) {\n var animationName = scope.zrId + '-ani-' + scope.cssAnimIdx++;\n scope.cssAnims[animationName] = cssAnim;\n return animationName;\n}\nfunction createCompoundPathCSSAnimation(el, attrs, scope) {\n var paths = el.shape.paths;\n var composedAnim = {};\n var cssAnimationCfg;\n var cssAnimationName;\n each(paths, function (path) {\n var subScope = createBrushScope(scope.zrId);\n subScope.animation = true;\n createCSSAnimation(path, {}, subScope, true);\n var cssAnims = subScope.cssAnims;\n var cssNodes = subScope.cssNodes;\n var animNames = keys(cssAnims);\n var len = animNames.length;\n if (!len) {\n return;\n }\n cssAnimationName = animNames[len - 1];\n var lastAnim = cssAnims[cssAnimationName];\n for (var percent in lastAnim) {\n var kf = lastAnim[percent];\n composedAnim[percent] = composedAnim[percent] || { d: '' };\n composedAnim[percent].d += kf.d || '';\n }\n for (var className in cssNodes) {\n var val = cssNodes[className].animation;\n if (val.indexOf(cssAnimationName) >= 0) {\n cssAnimationCfg = val;\n }\n }\n });\n if (!cssAnimationCfg) {\n return;\n }\n attrs.d = false;\n var animationName = addAnimation(composedAnim, scope);\n return cssAnimationCfg.replace(cssAnimationName, animationName);\n}\nfunction getEasingFunc(easing) {\n return isString(easing)\n ? EASING_MAP[easing]\n ? \"cubic-bezier(\" + EASING_MAP[easing] + \")\"\n : createCubicEasingFunc(easing) ? easing : ''\n : '';\n}\nexport function createCSSAnimation(el, attrs, scope, onlyShape) {\n var animators = el.animators;\n var len = animators.length;\n var cssAnimations = [];\n if (el instanceof CompoundPath) {\n var animationCfg = createCompoundPathCSSAnimation(el, attrs, scope);\n if (animationCfg) {\n cssAnimations.push(animationCfg);\n }\n else if (!len) {\n return;\n }\n }\n else if (!len) {\n return;\n }\n var groupAnimators = {};\n for (var i = 0; i < len; i++) {\n var animator = animators[i];\n var cfgArr = [animator.getMaxTime() / 1000 + 's'];\n var easing = getEasingFunc(animator.getClip().easing);\n var delay = animator.getDelay();\n if (easing) {\n cfgArr.push(easing);\n }\n else {\n cfgArr.push('linear');\n }\n if (delay) {\n cfgArr.push(delay / 1000 + 's');\n }\n if (animator.getLoop()) {\n cfgArr.push('infinite');\n }\n var cfg = cfgArr.join(' ');\n groupAnimators[cfg] = groupAnimators[cfg] || [cfg, []];\n groupAnimators[cfg][1].push(animator);\n }\n function createSingleCSSAnimation(groupAnimator) {\n var animators = groupAnimator[1];\n var len = animators.length;\n var transformKfs = {};\n var shapeKfs = {};\n var finalKfs = {};\n var animationTimingFunctionAttrName = 'animation-timing-function';\n function saveAnimatorTrackToCssKfs(animator, cssKfs, toCssAttrName) {\n var tracks = animator.getTracks();\n var maxTime = animator.getMaxTime();\n for (var k = 0; k < tracks.length; k++) {\n var track = tracks[k];\n if (track.needsAnimate()) {\n var kfs = track.keyframes;\n var attrName = track.propName;\n toCssAttrName && (attrName = toCssAttrName(attrName));\n if (attrName) {\n for (var i = 0; i < kfs.length; i++) {\n var kf = kfs[i];\n var percent = Math.round(kf.time / maxTime * 100) + '%';\n var kfEasing = getEasingFunc(kf.easing);\n var rawValue = kf.rawValue;\n if (isString(rawValue) || isNumber(rawValue)) {\n cssKfs[percent] = cssKfs[percent] || {};\n cssKfs[percent][attrName] = kf.rawValue;\n if (kfEasing) {\n cssKfs[percent][animationTimingFunctionAttrName] = kfEasing;\n }\n }\n }\n }\n }\n }\n }\n for (var i = 0; i < len; i++) {\n var animator = animators[i];\n var targetProp = animator.targetName;\n if (!targetProp) {\n !onlyShape && saveAnimatorTrackToCssKfs(animator, transformKfs);\n }\n else if (targetProp === 'shape') {\n saveAnimatorTrackToCssKfs(animator, shapeKfs);\n }\n }\n for (var percent in transformKfs) {\n var transform = {};\n copyTransform(transform, el);\n extend(transform, transformKfs[percent]);\n var str = getSRTTransformString(transform);\n var timingFunction = transformKfs[percent][animationTimingFunctionAttrName];\n finalKfs[percent] = str ? {\n transform: str\n } : {};\n setTransformOrigin(finalKfs[percent], transform);\n if (timingFunction) {\n finalKfs[percent][animationTimingFunctionAttrName] = timingFunction;\n }\n }\n ;\n var path;\n var canAnimateShape = true;\n for (var percent in shapeKfs) {\n finalKfs[percent] = finalKfs[percent] || {};\n var isFirst = !path;\n var timingFunction = shapeKfs[percent][animationTimingFunctionAttrName];\n if (isFirst) {\n path = new PathProxy();\n }\n var len_1 = path.len();\n path.reset();\n finalKfs[percent].d = buildPathString(el, shapeKfs[percent], path);\n var newLen = path.len();\n if (!isFirst && len_1 !== newLen) {\n canAnimateShape = false;\n break;\n }\n if (timingFunction) {\n finalKfs[percent][animationTimingFunctionAttrName] = timingFunction;\n }\n }\n ;\n if (!canAnimateShape) {\n for (var percent in finalKfs) {\n delete finalKfs[percent].d;\n }\n }\n if (!onlyShape) {\n for (var i = 0; i < len; i++) {\n var animator = animators[i];\n var targetProp = animator.targetName;\n if (targetProp === 'style') {\n saveAnimatorTrackToCssKfs(animator, finalKfs, function (propName) { return ANIMATE_STYLE_MAP[propName]; });\n }\n }\n }\n var percents = keys(finalKfs);\n var allTransformOriginSame = true;\n var transformOrigin;\n for (var i = 1; i < percents.length; i++) {\n var p0 = percents[i - 1];\n var p1 = percents[i];\n if (finalKfs[p0][transformOriginKey] !== finalKfs[p1][transformOriginKey]) {\n allTransformOriginSame = false;\n break;\n }\n transformOrigin = finalKfs[p0][transformOriginKey];\n }\n if (allTransformOriginSame && transformOrigin) {\n for (var percent in finalKfs) {\n if (finalKfs[percent][transformOriginKey]) {\n delete finalKfs[percent][transformOriginKey];\n }\n }\n attrs[transformOriginKey] = transformOrigin;\n }\n if (filter(percents, function (percent) { return keys(finalKfs[percent]).length > 0; }).length) {\n var animationName = addAnimation(finalKfs, scope);\n return animationName + \" \" + groupAnimator[0] + \" both\";\n }\n }\n for (var key in groupAnimators) {\n var animationCfg = createSingleCSSAnimation(groupAnimators[key]);\n if (animationCfg) {\n cssAnimations.push(animationCfg);\n }\n }\n if (cssAnimations.length) {\n var className = scope.zrId + '-cls-' + getClassId();\n scope.cssNodes['.' + className] = {\n animation: cssAnimations.join(',')\n };\n attrs[\"class\"] = className;\n }\n}\n","import { liftColor } from '../tool/color.js';\nimport { getClassId } from './cssClassId.js';\nexport function createCSSEmphasis(el, attrs, scope) {\n if (!el.ignore) {\n if (el.isSilent()) {\n var style = {\n 'pointer-events': 'none'\n };\n setClassAttribute(style, attrs, scope, true);\n }\n else {\n var emphasisStyle = el.states.emphasis && el.states.emphasis.style\n ? el.states.emphasis.style\n : {};\n var fill = emphasisStyle.fill;\n if (!fill) {\n var normalFill = el.style && el.style.fill;\n var selectFill = el.states.select\n && el.states.select.style\n && el.states.select.style.fill;\n var fromFill = el.currentStates.indexOf('select') >= 0\n ? (selectFill || normalFill)\n : normalFill;\n if (fromFill) {\n fill = liftColor(fromFill);\n }\n }\n var lineWidth = emphasisStyle.lineWidth;\n if (lineWidth) {\n var scaleX = (!emphasisStyle.strokeNoScale && el.transform)\n ? el.transform[0]\n : 1;\n lineWidth = lineWidth / scaleX;\n }\n var style = {\n cursor: 'pointer'\n };\n if (fill) {\n style.fill = fill;\n }\n if (emphasisStyle.stroke) {\n style.stroke = emphasisStyle.stroke;\n }\n if (lineWidth) {\n style['stroke-width'] = lineWidth;\n }\n setClassAttribute(style, attrs, scope, true);\n }\n }\n}\nfunction setClassAttribute(style, attrs, scope, withHover) {\n var styleKey = JSON.stringify(style);\n var className = scope.cssStyleCache[styleKey];\n if (!className) {\n className = scope.zrId + '-cls-' + getClassId();\n scope.cssStyleCache[styleKey] = className;\n scope.cssNodes['.' + className + (withHover ? ':hover' : '')] = style;\n }\n attrs[\"class\"] = attrs[\"class\"] ? (attrs[\"class\"] + ' ' + className) : className;\n}\n","import { adjustTextY, getIdURL, getMatrixStr, getPathPrecision, getShadowKey, getSRTTransformString, hasShadow, isAroundZero, isGradient, isImagePattern, isLinearGradient, isPattern, isRadialGradient, normalizeColor, round4, TEXT_ALIGN_TO_ANCHOR } from './helper.js';\nimport Path from '../graphic/Path.js';\nimport ZRImage from '../graphic/Image.js';\nimport { getLineHeight } from '../contain/text.js';\nimport TSpan from '../graphic/TSpan.js';\nimport SVGPathRebuilder from './SVGPathRebuilder.js';\nimport mapStyleToAttrs from './mapStyleToAttrs.js';\nimport { createVNode, vNodeToString, META_DATA_PREFIX } from './core.js';\nimport { assert, clone, isFunction, isString, logError, map, retrieve2 } from '../core/util.js';\nimport { createOrUpdateImage } from '../graphic/helper/image.js';\nimport { createCSSAnimation } from './cssAnimation.js';\nimport { hasSeparateFont, parseFontSize } from '../graphic/Text.js';\nimport { DEFAULT_FONT, DEFAULT_FONT_FAMILY } from '../core/platform.js';\nimport { createCSSEmphasis } from './cssEmphasis.js';\nimport { getElementSSRData } from '../zrender.js';\nvar round = Math.round;\nfunction isImageLike(val) {\n return val && isString(val.src);\n}\nfunction isCanvasLike(val) {\n return val && isFunction(val.toDataURL);\n}\nfunction setStyleAttrs(attrs, style, el, scope) {\n mapStyleToAttrs(function (key, val) {\n var isFillStroke = key === 'fill' || key === 'stroke';\n if (isFillStroke && isGradient(val)) {\n setGradient(style, attrs, key, scope);\n }\n else if (isFillStroke && isPattern(val)) {\n setPattern(el, attrs, key, scope);\n }\n else if (isFillStroke && val === 'none') {\n attrs[key] = 'transparent';\n }\n else {\n attrs[key] = val;\n }\n }, style, el, false);\n setShadow(el, attrs, scope);\n}\nfunction setMetaData(attrs, el) {\n var metaData = getElementSSRData(el);\n if (metaData) {\n metaData.each(function (val, key) {\n val != null && (attrs[(META_DATA_PREFIX + key).toLowerCase()] = val + '');\n });\n if (el.isSilent()) {\n attrs[META_DATA_PREFIX + 'silent'] = 'true';\n }\n }\n}\nfunction noRotateScale(m) {\n return isAroundZero(m[0] - 1)\n && isAroundZero(m[1])\n && isAroundZero(m[2])\n && isAroundZero(m[3] - 1);\n}\nfunction noTranslate(m) {\n return isAroundZero(m[4]) && isAroundZero(m[5]);\n}\nfunction setTransform(attrs, m, compress) {\n if (m && !(noTranslate(m) && noRotateScale(m))) {\n var mul = compress ? 10 : 1e4;\n attrs.transform = noRotateScale(m)\n ? \"translate(\" + round(m[4] * mul) / mul + \" \" + round(m[5] * mul) / mul + \")\" : getMatrixStr(m);\n }\n}\nfunction convertPolyShape(shape, attrs, mul) {\n var points = shape.points;\n var strArr = [];\n for (var i = 0; i < points.length; i++) {\n strArr.push(round(points[i][0] * mul) / mul);\n strArr.push(round(points[i][1] * mul) / mul);\n }\n attrs.points = strArr.join(' ');\n}\nfunction validatePolyShape(shape) {\n return !shape.smooth;\n}\nfunction createAttrsConvert(desc) {\n var normalizedDesc = map(desc, function (item) {\n return (typeof item === 'string' ? [item, item] : item);\n });\n return function (shape, attrs, mul) {\n for (var i = 0; i < normalizedDesc.length; i++) {\n var item = normalizedDesc[i];\n var val = shape[item[0]];\n if (val != null) {\n attrs[item[1]] = round(val * mul) / mul;\n }\n }\n };\n}\nvar builtinShapesDef = {\n circle: [createAttrsConvert(['cx', 'cy', 'r'])],\n polyline: [convertPolyShape, validatePolyShape],\n polygon: [convertPolyShape, validatePolyShape]\n};\nfunction hasShapeAnimation(el) {\n var animators = el.animators;\n for (var i = 0; i < animators.length; i++) {\n if (animators[i].targetName === 'shape') {\n return true;\n }\n }\n return false;\n}\nexport function brushSVGPath(el, scope) {\n var style = el.style;\n var shape = el.shape;\n var builtinShpDef = builtinShapesDef[el.type];\n var attrs = {};\n var needsAnimate = scope.animation;\n var svgElType = 'path';\n var strokePercent = el.style.strokePercent;\n var precision = (scope.compress && getPathPrecision(el)) || 4;\n if (builtinShpDef\n && !scope.willUpdate\n && !(builtinShpDef[1] && !builtinShpDef[1](shape))\n && !(needsAnimate && hasShapeAnimation(el))\n && !(strokePercent < 1)) {\n svgElType = el.type;\n var mul = Math.pow(10, precision);\n builtinShpDef[0](shape, attrs, mul);\n }\n else {\n var needBuildPath = !el.path || el.shapeChanged();\n if (!el.path) {\n el.createPathProxy();\n }\n var path = el.path;\n if (needBuildPath) {\n path.beginPath();\n el.buildPath(path, el.shape);\n el.pathUpdated();\n }\n var pathVersion = path.getVersion();\n var elExt = el;\n var svgPathBuilder = elExt.__svgPathBuilder;\n if (elExt.__svgPathVersion !== pathVersion\n || !svgPathBuilder\n || strokePercent !== elExt.__svgPathStrokePercent) {\n if (!svgPathBuilder) {\n svgPathBuilder = elExt.__svgPathBuilder = new SVGPathRebuilder();\n }\n svgPathBuilder.reset(precision);\n path.rebuildPath(svgPathBuilder, strokePercent);\n svgPathBuilder.generateStr();\n elExt.__svgPathVersion = pathVersion;\n elExt.__svgPathStrokePercent = strokePercent;\n }\n attrs.d = svgPathBuilder.getStr();\n }\n setTransform(attrs, el.transform);\n setStyleAttrs(attrs, style, el, scope);\n setMetaData(attrs, el);\n scope.animation && createCSSAnimation(el, attrs, scope);\n scope.emphasis && createCSSEmphasis(el, attrs, scope);\n return createVNode(svgElType, el.id + '', attrs);\n}\nexport function brushSVGImage(el, scope) {\n var style = el.style;\n var image = style.image;\n if (image && !isString(image)) {\n if (isImageLike(image)) {\n image = image.src;\n }\n else if (isCanvasLike(image)) {\n image = image.toDataURL();\n }\n }\n if (!image) {\n return;\n }\n var x = style.x || 0;\n var y = style.y || 0;\n var dw = style.width;\n var dh = style.height;\n var attrs = {\n href: image,\n width: dw,\n height: dh\n };\n if (x) {\n attrs.x = x;\n }\n if (y) {\n attrs.y = y;\n }\n setTransform(attrs, el.transform);\n setStyleAttrs(attrs, style, el, scope);\n setMetaData(attrs, el);\n scope.animation && createCSSAnimation(el, attrs, scope);\n return createVNode('image', el.id + '', attrs);\n}\n;\nexport function brushSVGTSpan(el, scope) {\n var style = el.style;\n var text = style.text;\n text != null && (text += '');\n if (!text || isNaN(style.x) || isNaN(style.y)) {\n return;\n }\n var font = style.font || DEFAULT_FONT;\n var x = style.x || 0;\n var y = adjustTextY(style.y || 0, getLineHeight(font), style.textBaseline);\n var textAlign = TEXT_ALIGN_TO_ANCHOR[style.textAlign]\n || style.textAlign;\n var attrs = {\n 'dominant-baseline': 'central',\n 'text-anchor': textAlign\n };\n if (hasSeparateFont(style)) {\n var separatedFontStr = '';\n var fontStyle = style.fontStyle;\n var fontSize = parseFontSize(style.fontSize);\n if (!parseFloat(fontSize)) {\n return;\n }\n var fontFamily = style.fontFamily || DEFAULT_FONT_FAMILY;\n var fontWeight = style.fontWeight;\n separatedFontStr += \"font-size:\" + fontSize + \";font-family:\" + fontFamily + \";\";\n if (fontStyle && fontStyle !== 'normal') {\n separatedFontStr += \"font-style:\" + fontStyle + \";\";\n }\n if (fontWeight && fontWeight !== 'normal') {\n separatedFontStr += \"font-weight:\" + fontWeight + \";\";\n }\n attrs.style = separatedFontStr;\n }\n else {\n attrs.style = \"font: \" + font;\n }\n if (text.match(/\\s/)) {\n attrs['xml:space'] = 'preserve';\n }\n if (x) {\n attrs.x = x;\n }\n if (y) {\n attrs.y = y;\n }\n setTransform(attrs, el.transform);\n setStyleAttrs(attrs, style, el, scope);\n setMetaData(attrs, el);\n scope.animation && createCSSAnimation(el, attrs, scope);\n return createVNode('text', el.id + '', attrs, undefined, text);\n}\nexport function brush(el, scope) {\n if (el instanceof Path) {\n return brushSVGPath(el, scope);\n }\n else if (el instanceof ZRImage) {\n return brushSVGImage(el, scope);\n }\n else if (el instanceof TSpan) {\n return brushSVGTSpan(el, scope);\n }\n}\nfunction setShadow(el, attrs, scope) {\n var style = el.style;\n if (hasShadow(style)) {\n var shadowKey = getShadowKey(el);\n var shadowCache = scope.shadowCache;\n var shadowId = shadowCache[shadowKey];\n if (!shadowId) {\n var globalScale = el.getGlobalScale();\n var scaleX = globalScale[0];\n var scaleY = globalScale[1];\n if (!scaleX || !scaleY) {\n return;\n }\n var offsetX = style.shadowOffsetX || 0;\n var offsetY = style.shadowOffsetY || 0;\n var blur_1 = style.shadowBlur;\n var _a = normalizeColor(style.shadowColor), opacity = _a.opacity, color = _a.color;\n var stdDx = blur_1 / 2 / scaleX;\n var stdDy = blur_1 / 2 / scaleY;\n var stdDeviation = stdDx + ' ' + stdDy;\n shadowId = scope.zrId + '-s' + scope.shadowIdx++;\n scope.defs[shadowId] = createVNode('filter', shadowId, {\n 'id': shadowId,\n 'x': '-100%',\n 'y': '-100%',\n 'width': '300%',\n 'height': '300%'\n }, [\n createVNode('feDropShadow', '', {\n 'dx': offsetX / scaleX,\n 'dy': offsetY / scaleY,\n 'stdDeviation': stdDeviation,\n 'flood-color': color,\n 'flood-opacity': opacity\n })\n ]);\n shadowCache[shadowKey] = shadowId;\n }\n attrs.filter = getIdURL(shadowId);\n }\n}\nexport function setGradient(style, attrs, target, scope) {\n var val = style[target];\n var gradientTag;\n var gradientAttrs = {\n 'gradientUnits': val.global\n ? 'userSpaceOnUse'\n : 'objectBoundingBox'\n };\n if (isLinearGradient(val)) {\n gradientTag = 'linearGradient';\n gradientAttrs.x1 = val.x;\n gradientAttrs.y1 = val.y;\n gradientAttrs.x2 = val.x2;\n gradientAttrs.y2 = val.y2;\n }\n else if (isRadialGradient(val)) {\n gradientTag = 'radialGradient';\n gradientAttrs.cx = retrieve2(val.x, 0.5);\n gradientAttrs.cy = retrieve2(val.y, 0.5);\n gradientAttrs.r = retrieve2(val.r, 0.5);\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logError('Illegal gradient type.');\n }\n return;\n }\n var colors = val.colorStops;\n var colorStops = [];\n for (var i = 0, len = colors.length; i < len; ++i) {\n var offset = round4(colors[i].offset) * 100 + '%';\n var stopColor = colors[i].color;\n var _a = normalizeColor(stopColor), color = _a.color, opacity = _a.opacity;\n var stopsAttrs = {\n 'offset': offset\n };\n stopsAttrs['stop-color'] = color;\n if (opacity < 1) {\n stopsAttrs['stop-opacity'] = opacity;\n }\n colorStops.push(createVNode('stop', i + '', stopsAttrs));\n }\n var gradientVNode = createVNode(gradientTag, '', gradientAttrs, colorStops);\n var gradientKey = vNodeToString(gradientVNode);\n var gradientCache = scope.gradientCache;\n var gradientId = gradientCache[gradientKey];\n if (!gradientId) {\n gradientId = scope.zrId + '-g' + scope.gradientIdx++;\n gradientCache[gradientKey] = gradientId;\n gradientAttrs.id = gradientId;\n scope.defs[gradientId] = createVNode(gradientTag, gradientId, gradientAttrs, colorStops);\n }\n attrs[target] = getIdURL(gradientId);\n}\nexport function setPattern(el, attrs, target, scope) {\n var val = el.style[target];\n var boundingRect = el.getBoundingRect();\n var patternAttrs = {};\n var repeat = val.repeat;\n var noRepeat = repeat === 'no-repeat';\n var repeatX = repeat === 'repeat-x';\n var repeatY = repeat === 'repeat-y';\n var child;\n if (isImagePattern(val)) {\n var imageWidth_1 = val.imageWidth;\n var imageHeight_1 = val.imageHeight;\n var imageSrc = void 0;\n var patternImage = val.image;\n if (isString(patternImage)) {\n imageSrc = patternImage;\n }\n else if (isImageLike(patternImage)) {\n imageSrc = patternImage.src;\n }\n else if (isCanvasLike(patternImage)) {\n imageSrc = patternImage.toDataURL();\n }\n if (typeof Image === 'undefined') {\n var errMsg = 'Image width/height must been given explictly in svg-ssr renderer.';\n assert(imageWidth_1, errMsg);\n assert(imageHeight_1, errMsg);\n }\n else if (imageWidth_1 == null || imageHeight_1 == null) {\n var setSizeToVNode_1 = function (vNode, img) {\n if (vNode) {\n var svgEl = vNode.elm;\n var width = imageWidth_1 || img.width;\n var height = imageHeight_1 || img.height;\n if (vNode.tag === 'pattern') {\n if (repeatX) {\n height = 1;\n width /= boundingRect.width;\n }\n else if (repeatY) {\n width = 1;\n height /= boundingRect.height;\n }\n }\n vNode.attrs.width = width;\n vNode.attrs.height = height;\n if (svgEl) {\n svgEl.setAttribute('width', width);\n svgEl.setAttribute('height', height);\n }\n }\n };\n var createdImage = createOrUpdateImage(imageSrc, null, el, function (img) {\n noRepeat || setSizeToVNode_1(patternVNode, img);\n setSizeToVNode_1(child, img);\n });\n if (createdImage && createdImage.width && createdImage.height) {\n imageWidth_1 = imageWidth_1 || createdImage.width;\n imageHeight_1 = imageHeight_1 || createdImage.height;\n }\n }\n child = createVNode('image', 'img', {\n href: imageSrc,\n width: imageWidth_1,\n height: imageHeight_1\n });\n patternAttrs.width = imageWidth_1;\n patternAttrs.height = imageHeight_1;\n }\n else if (val.svgElement) {\n child = clone(val.svgElement);\n patternAttrs.width = val.svgWidth;\n patternAttrs.height = val.svgHeight;\n }\n if (!child) {\n return;\n }\n var patternWidth;\n var patternHeight;\n if (noRepeat) {\n patternWidth = patternHeight = 1;\n }\n else if (repeatX) {\n patternHeight = 1;\n patternWidth = patternAttrs.width / boundingRect.width;\n }\n else if (repeatY) {\n patternWidth = 1;\n patternHeight = patternAttrs.height / boundingRect.height;\n }\n else {\n patternAttrs.patternUnits = 'userSpaceOnUse';\n }\n if (patternWidth != null && !isNaN(patternWidth)) {\n patternAttrs.width = patternWidth;\n }\n if (patternHeight != null && !isNaN(patternHeight)) {\n patternAttrs.height = patternHeight;\n }\n var patternTransform = getSRTTransformString(val);\n patternTransform && (patternAttrs.patternTransform = patternTransform);\n var patternVNode = createVNode('pattern', '', patternAttrs, [child]);\n var patternKey = vNodeToString(patternVNode);\n var patternCache = scope.patternCache;\n var patternId = patternCache[patternKey];\n if (!patternId) {\n patternId = scope.zrId + '-p' + scope.patternIdx++;\n patternCache[patternKey] = patternId;\n patternAttrs.id = patternId;\n patternVNode = scope.defs[patternId] = createVNode('pattern', patternId, patternAttrs, [child]);\n }\n attrs[target] = getIdURL(patternId);\n}\nexport function setClipPath(clipPath, attrs, scope) {\n var clipPathCache = scope.clipPathCache, defs = scope.defs;\n var clipPathId = clipPathCache[clipPath.id];\n if (!clipPathId) {\n clipPathId = scope.zrId + '-c' + scope.clipPathIdx++;\n var clipPathAttrs = {\n id: clipPathId\n };\n clipPathCache[clipPath.id] = clipPathId;\n defs[clipPathId] = createVNode('clipPath', clipPathId, clipPathAttrs, [brushSVGPath(clipPath, scope)]);\n }\n attrs['clip-path'] = getIdURL(clipPathId);\n}\n","export function createTextNode(text) {\n return document.createTextNode(text);\n}\nexport function createComment(text) {\n return document.createComment(text);\n}\nexport function insertBefore(parentNode, newNode, referenceNode) {\n parentNode.insertBefore(newNode, referenceNode);\n}\nexport function removeChild(node, child) {\n node.removeChild(child);\n}\nexport function appendChild(node, child) {\n node.appendChild(child);\n}\nexport function parentNode(node) {\n return node.parentNode;\n}\nexport function nextSibling(node) {\n return node.nextSibling;\n}\nexport function tagName(elm) {\n return elm.tagName;\n}\nexport function setTextContent(node, text) {\n node.textContent = text;\n}\nexport function getTextContent(node) {\n return node.textContent;\n}\nexport function isElement(node) {\n return node.nodeType === 1;\n}\nexport function isText(node) {\n return node.nodeType === 3;\n}\nexport function isComment(node) {\n return node.nodeType === 8;\n}\n","import { isArray, isObject } from '../core/util.js';\nimport { createElement, createVNode, XMLNS, XML_NAMESPACE, XLINKNS } from './core.js';\nimport * as api from './domapi.js';\nvar colonChar = 58;\nvar xChar = 120;\nvar emptyNode = createVNode('', '');\nfunction isUndef(s) {\n return s === undefined;\n}\nfunction isDef(s) {\n return s !== undefined;\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n var map = {};\n for (var i = beginIdx; i <= endIdx; ++i) {\n var key = children[i].key;\n if (key !== undefined) {\n if (process.env.NODE_ENV !== 'production') {\n if (map[key] != null) {\n console.error(\"Duplicate key \" + key);\n }\n }\n map[key] = i;\n }\n }\n return map;\n}\nfunction sameVnode(vnode1, vnode2) {\n var isSameKey = vnode1.key === vnode2.key;\n var isSameTag = vnode1.tag === vnode2.tag;\n return isSameTag && isSameKey;\n}\nfunction createElm(vnode) {\n var i;\n var children = vnode.children;\n var tag = vnode.tag;\n if (isDef(tag)) {\n var elm = (vnode.elm = createElement(tag));\n updateAttrs(emptyNode, vnode);\n if (isArray(children)) {\n for (i = 0; i < children.length; ++i) {\n var ch = children[i];\n if (ch != null) {\n api.appendChild(elm, createElm(ch));\n }\n }\n }\n else if (isDef(vnode.text) && !isObject(vnode.text)) {\n api.appendChild(elm, api.createTextNode(vnode.text));\n }\n }\n else {\n vnode.elm = api.createTextNode(vnode.text);\n }\n return vnode.elm;\n}\nfunction addVnodes(parentElm, before, vnodes, startIdx, endIdx) {\n for (; startIdx <= endIdx; ++startIdx) {\n var ch = vnodes[startIdx];\n if (ch != null) {\n api.insertBefore(parentElm, createElm(ch), before);\n }\n }\n}\nfunction removeVnodes(parentElm, vnodes, startIdx, endIdx) {\n for (; startIdx <= endIdx; ++startIdx) {\n var ch = vnodes[startIdx];\n if (ch != null) {\n if (isDef(ch.tag)) {\n var parent_1 = api.parentNode(ch.elm);\n api.removeChild(parent_1, ch.elm);\n }\n else {\n api.removeChild(parentElm, ch.elm);\n }\n }\n }\n}\nexport function updateAttrs(oldVnode, vnode) {\n var key;\n var elm = vnode.elm;\n var oldAttrs = oldVnode && oldVnode.attrs || {};\n var attrs = vnode.attrs || {};\n if (oldAttrs === attrs) {\n return;\n }\n for (key in attrs) {\n var cur = attrs[key];\n var old = oldAttrs[key];\n if (old !== cur) {\n if (cur === true) {\n elm.setAttribute(key, '');\n }\n else if (cur === false) {\n elm.removeAttribute(key);\n }\n else {\n if (key === 'style') {\n elm.style.cssText = cur;\n }\n else if (key.charCodeAt(0) !== xChar) {\n elm.setAttribute(key, cur);\n }\n else if (key === 'xmlns:xlink' || key === 'xmlns') {\n elm.setAttributeNS(XMLNS, key, cur);\n }\n else if (key.charCodeAt(3) === colonChar) {\n elm.setAttributeNS(XML_NAMESPACE, key, cur);\n }\n else if (key.charCodeAt(5) === colonChar) {\n elm.setAttributeNS(XLINKNS, key, cur);\n }\n else {\n elm.setAttribute(key, cur);\n }\n }\n }\n }\n for (key in oldAttrs) {\n if (!(key in attrs)) {\n elm.removeAttribute(key);\n }\n }\n}\nfunction updateChildren(parentElm, oldCh, newCh) {\n var oldStartIdx = 0;\n var newStartIdx = 0;\n var oldEndIdx = oldCh.length - 1;\n var oldStartVnode = oldCh[0];\n var oldEndVnode = oldCh[oldEndIdx];\n var newEndIdx = newCh.length - 1;\n var newStartVnode = newCh[0];\n var newEndVnode = newCh[newEndIdx];\n var oldKeyToIdx;\n var idxInOld;\n var elmToMove;\n var before;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n oldStartVnode = oldCh[++oldStartIdx];\n }\n else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n }\n else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n }\n else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldStartVnode, newStartVnode)) {\n patchVnode(oldStartVnode, newStartVnode);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else if (sameVnode(oldEndVnode, newEndVnode)) {\n patchVnode(oldEndVnode, newEndVnode);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldStartVnode, newEndVnode)) {\n patchVnode(oldStartVnode, newEndVnode);\n api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm));\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldEndVnode, newStartVnode)) {\n patchVnode(oldEndVnode, newStartVnode);\n api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else {\n if (isUndef(oldKeyToIdx)) {\n oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n }\n idxInOld = oldKeyToIdx[newStartVnode.key];\n if (isUndef(idxInOld)) {\n api.insertBefore(parentElm, createElm(newStartVnode), oldStartVnode.elm);\n }\n else {\n elmToMove = oldCh[idxInOld];\n if (elmToMove.tag !== newStartVnode.tag) {\n api.insertBefore(parentElm, createElm(newStartVnode), oldStartVnode.elm);\n }\n else {\n patchVnode(elmToMove, newStartVnode);\n oldCh[idxInOld] = undefined;\n api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);\n }\n }\n newStartVnode = newCh[++newStartIdx];\n }\n }\n if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) {\n if (oldStartIdx > oldEndIdx) {\n before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm;\n addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx);\n }\n else {\n removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n }\n }\n}\nfunction patchVnode(oldVnode, vnode) {\n var elm = (vnode.elm = oldVnode.elm);\n var oldCh = oldVnode.children;\n var ch = vnode.children;\n if (oldVnode === vnode) {\n return;\n }\n updateAttrs(oldVnode, vnode);\n if (isUndef(vnode.text)) {\n if (isDef(oldCh) && isDef(ch)) {\n if (oldCh !== ch) {\n updateChildren(elm, oldCh, ch);\n }\n }\n else if (isDef(ch)) {\n if (isDef(oldVnode.text)) {\n api.setTextContent(elm, '');\n }\n addVnodes(elm, null, ch, 0, ch.length - 1);\n }\n else if (isDef(oldCh)) {\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n }\n else if (isDef(oldVnode.text)) {\n api.setTextContent(elm, '');\n }\n }\n else if (oldVnode.text !== vnode.text) {\n if (isDef(oldCh)) {\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n }\n api.setTextContent(elm, vnode.text);\n }\n}\nexport default function patch(oldVnode, vnode) {\n if (sameVnode(oldVnode, vnode)) {\n patchVnode(oldVnode, vnode);\n }\n else {\n var elm = oldVnode.elm;\n var parent_2 = api.parentNode(elm);\n createElm(vnode);\n if (parent_2 !== null) {\n api.insertBefore(parent_2, vnode.elm, api.nextSibling(elm));\n removeVnodes(parent_2, [oldVnode], 0, 0);\n }\n }\n return vnode;\n}\n","import { brush, setClipPath, setGradient, setPattern } from './graphic.js';\nimport { createElement, createVNode, vNodeToString, getCssString, createBrushScope, createSVGVNode } from './core.js';\nimport { normalizeColor, encodeBase64, isGradient, isPattern } from './helper.js';\nimport { extend, keys, logError, map, noop, retrieve2 } from '../core/util.js';\nimport patch, { updateAttrs } from './patch.js';\nimport { getSize } from '../canvas/helper.js';\nvar svgId = 0;\nvar SVGPainter = (function () {\n function SVGPainter(root, storage, opts) {\n this.type = 'svg';\n this.refreshHover = createMethodNotSupport('refreshHover');\n this.configLayer = createMethodNotSupport('configLayer');\n this.storage = storage;\n this._opts = opts = extend({}, opts);\n this.root = root;\n this._id = 'zr' + svgId++;\n this._oldVNode = createSVGVNode(opts.width, opts.height);\n if (root && !opts.ssr) {\n var viewport = this._viewport = document.createElement('div');\n viewport.style.cssText = 'position:relative;overflow:hidden';\n var svgDom = this._svgDom = this._oldVNode.elm = createElement('svg');\n updateAttrs(null, this._oldVNode);\n viewport.appendChild(svgDom);\n root.appendChild(viewport);\n }\n this.resize(opts.width, opts.height);\n }\n SVGPainter.prototype.getType = function () {\n return this.type;\n };\n SVGPainter.prototype.getViewportRoot = function () {\n return this._viewport;\n };\n SVGPainter.prototype.getViewportRootOffset = function () {\n var viewportRoot = this.getViewportRoot();\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n };\n SVGPainter.prototype.getSvgDom = function () {\n return this._svgDom;\n };\n SVGPainter.prototype.refresh = function () {\n if (this.root) {\n var vnode = this.renderToVNode({\n willUpdate: true\n });\n vnode.attrs.style = 'position:absolute;left:0;top:0;user-select:none';\n patch(this._oldVNode, vnode);\n this._oldVNode = vnode;\n }\n };\n SVGPainter.prototype.renderOneToVNode = function (el) {\n return brush(el, createBrushScope(this._id));\n };\n SVGPainter.prototype.renderToVNode = function (opts) {\n opts = opts || {};\n var list = this.storage.getDisplayList(true);\n var width = this._width;\n var height = this._height;\n var scope = createBrushScope(this._id);\n scope.animation = opts.animation;\n scope.willUpdate = opts.willUpdate;\n scope.compress = opts.compress;\n scope.emphasis = opts.emphasis;\n var children = [];\n var bgVNode = this._bgVNode = createBackgroundVNode(width, height, this._backgroundColor, scope);\n bgVNode && children.push(bgVNode);\n var mainVNode = !opts.compress\n ? (this._mainVNode = createVNode('g', 'main', {}, [])) : null;\n this._paintList(list, scope, mainVNode ? mainVNode.children : children);\n mainVNode && children.push(mainVNode);\n var defs = map(keys(scope.defs), function (id) { return scope.defs[id]; });\n if (defs.length) {\n children.push(createVNode('defs', 'defs', {}, defs));\n }\n if (opts.animation) {\n var animationCssStr = getCssString(scope.cssNodes, scope.cssAnims, { newline: true });\n if (animationCssStr) {\n var styleNode = createVNode('style', 'stl', {}, [], animationCssStr);\n children.push(styleNode);\n }\n }\n return createSVGVNode(width, height, children, opts.useViewBox);\n };\n SVGPainter.prototype.renderToString = function (opts) {\n opts = opts || {};\n return vNodeToString(this.renderToVNode({\n animation: retrieve2(opts.cssAnimation, true),\n emphasis: retrieve2(opts.cssEmphasis, true),\n willUpdate: false,\n compress: true,\n useViewBox: retrieve2(opts.useViewBox, true)\n }), { newline: true });\n };\n SVGPainter.prototype.setBackgroundColor = function (backgroundColor) {\n this._backgroundColor = backgroundColor;\n };\n SVGPainter.prototype.getSvgRoot = function () {\n return this._mainVNode && this._mainVNode.elm;\n };\n SVGPainter.prototype._paintList = function (list, scope, out) {\n var listLen = list.length;\n var clipPathsGroupsStack = [];\n var clipPathsGroupsStackDepth = 0;\n var currentClipPathGroup;\n var prevClipPaths;\n var clipGroupNodeIdx = 0;\n for (var i = 0; i < listLen; i++) {\n var displayable = list[i];\n if (!displayable.invisible) {\n var clipPaths = displayable.__clipPaths;\n var len = clipPaths && clipPaths.length || 0;\n var prevLen = prevClipPaths && prevClipPaths.length || 0;\n var lca = void 0;\n for (lca = Math.max(len - 1, prevLen - 1); lca >= 0; lca--) {\n if (clipPaths && prevClipPaths\n && clipPaths[lca] === prevClipPaths[lca]) {\n break;\n }\n }\n for (var i_1 = prevLen - 1; i_1 > lca; i_1--) {\n clipPathsGroupsStackDepth--;\n currentClipPathGroup = clipPathsGroupsStack[clipPathsGroupsStackDepth - 1];\n }\n for (var i_2 = lca + 1; i_2 < len; i_2++) {\n var groupAttrs = {};\n setClipPath(clipPaths[i_2], groupAttrs, scope);\n var g = createVNode('g', 'clip-g-' + clipGroupNodeIdx++, groupAttrs, []);\n (currentClipPathGroup ? currentClipPathGroup.children : out).push(g);\n clipPathsGroupsStack[clipPathsGroupsStackDepth++] = g;\n currentClipPathGroup = g;\n }\n prevClipPaths = clipPaths;\n var ret = brush(displayable, scope);\n if (ret) {\n (currentClipPathGroup ? currentClipPathGroup.children : out).push(ret);\n }\n }\n }\n };\n SVGPainter.prototype.resize = function (width, height) {\n var opts = this._opts;\n var root = this.root;\n var viewport = this._viewport;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n if (root && viewport) {\n viewport.style.display = 'none';\n width = getSize(root, 0, opts);\n height = getSize(root, 1, opts);\n viewport.style.display = '';\n }\n if (this._width !== width || this._height !== height) {\n this._width = width;\n this._height = height;\n if (viewport) {\n var viewportStyle = viewport.style;\n viewportStyle.width = width + 'px';\n viewportStyle.height = height + 'px';\n }\n if (!isPattern(this._backgroundColor)) {\n var svgDom = this._svgDom;\n if (svgDom) {\n svgDom.setAttribute('width', width);\n svgDom.setAttribute('height', height);\n }\n var bgEl = this._bgVNode && this._bgVNode.elm;\n if (bgEl) {\n bgEl.setAttribute('width', width);\n bgEl.setAttribute('height', height);\n }\n }\n else {\n this.refresh();\n }\n }\n };\n SVGPainter.prototype.getWidth = function () {\n return this._width;\n };\n SVGPainter.prototype.getHeight = function () {\n return this._height;\n };\n SVGPainter.prototype.dispose = function () {\n if (this.root) {\n this.root.innerHTML = '';\n }\n this._svgDom =\n this._viewport =\n this.storage =\n this._oldVNode =\n this._bgVNode =\n this._mainVNode = null;\n };\n SVGPainter.prototype.clear = function () {\n if (this._svgDom) {\n this._svgDom.innerHTML = null;\n }\n this._oldVNode = null;\n };\n SVGPainter.prototype.toDataURL = function (base64) {\n var str = this.renderToString();\n var prefix = 'data:image/svg+xml;';\n if (base64) {\n str = encodeBase64(str);\n return str && prefix + 'base64,' + str;\n }\n return prefix + 'charset=UTF-8,' + encodeURIComponent(str);\n };\n return SVGPainter;\n}());\nfunction createMethodNotSupport(method) {\n return function () {\n if (process.env.NODE_ENV !== 'production') {\n logError('In SVG mode painter not support method \"' + method + '\"');\n }\n };\n}\nfunction createBackgroundVNode(width, height, backgroundColor, scope) {\n var bgVNode;\n if (backgroundColor && backgroundColor !== 'none') {\n bgVNode = createVNode('rect', 'bg', {\n width: width,\n height: height,\n x: '0',\n y: '0'\n });\n if (isGradient(backgroundColor)) {\n setGradient({ fill: backgroundColor }, bgVNode.attrs, 'fill', scope);\n }\n else if (isPattern(backgroundColor)) {\n setPattern({\n style: {\n fill: backgroundColor\n },\n dirty: noop,\n getBoundingRect: function () { return ({ width: width, height: height }); }\n }, bgVNode.attrs, 'fill', scope);\n }\n else {\n var _a = normalizeColor(backgroundColor), color = _a.color, opacity = _a.opacity;\n bgVNode.attrs.fill = color;\n opacity < 1 && (bgVNode.attrs['fill-opacity'] = opacity);\n }\n }\n return bgVNode;\n}\nexport default SVGPainter;\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SVGPainter from 'zrender/lib/svg/Painter.js';\nexport function install(registers) {\n registers.registerPainter('svg', SVGPainter);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { Group } from '../../util/graphic.js';\nvar LineSeriesModel = /** @class */function (_super) {\n __extends(LineSeriesModel, _super);\n function LineSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LineSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n LineSeriesModel.prototype.getInitialData = function (option) {\n if (process.env.NODE_ENV !== 'production') {\n var coordSys = option.coordinateSystem;\n if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {\n throw new Error('Line not support coordinateSystem besides cartesian and polar');\n }\n }\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n LineSeriesModel.prototype.getLegendIcon = function (opt) {\n var group = new Group();\n var line = createSymbol('line', 0, opt.itemHeight / 2, opt.itemWidth, 0, opt.lineStyle.stroke, false);\n group.add(line);\n line.setStyle(opt.lineStyle);\n var visualType = this.getData().getVisual('symbol');\n var visualRotate = this.getData().getVisual('symbolRotate');\n var symbolType = visualType === 'none' ? 'circle' : visualType;\n // Symbol size is 80% when there is a line\n var size = opt.itemHeight * 0.8;\n var symbol = createSymbol(symbolType, (opt.itemWidth - size) / 2, (opt.itemHeight - size) / 2, size, size, opt.itemStyle.fill);\n group.add(symbol);\n symbol.setStyle(opt.itemStyle);\n var symbolRotate = opt.iconRotate === 'inherit' ? visualRotate : opt.iconRotate || 0;\n symbol.rotation = symbolRotate * Math.PI / 180;\n symbol.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symbolType.indexOf('empty') > -1) {\n symbol.style.stroke = symbol.style.fill;\n symbol.style.fill = '#fff';\n symbol.style.lineWidth = 2;\n }\n return group;\n };\n LineSeriesModel.type = 'series.line';\n LineSeriesModel.dependencies = ['grid', 'polar'];\n LineSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 3,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n clip: true,\n label: {\n position: 'top'\n },\n // itemStyle: {\n // },\n endLabel: {\n show: false,\n valueAnimation: true,\n distance: 8\n },\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n emphasis: {\n scale: true\n },\n // areaStyle: {\n // origin of areaStyle. Valid values:\n // `'auto'/null/undefined`: from axisLine to data\n // `'start'`: from min to data\n // `'end'`: from data to max\n // origin: 'auto'\n // },\n // false, 'start', 'end', 'middle'\n step: false,\n // Disabled if step is true\n smooth: false,\n smoothMonotone: null,\n symbol: 'emptyCircle',\n symbolSize: 4,\n symbolRotate: null,\n showSymbol: true,\n // `false`: follow the label interval strategy.\n // `true`: show all symbols.\n // `'auto'`: If possible, show all symbols, otherwise\n // follow the label interval strategy.\n showAllSymbol: 'auto',\n // Whether to connect break point.\n connectNulls: false,\n // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.\n sampling: 'none',\n animationEasing: 'linear',\n // Disable progressive\n progressive: 0,\n hoverLayerThreshold: Infinity,\n universalTransition: {\n divideShape: 'clone'\n },\n triggerLineEvent: false\n };\n return LineSeriesModel;\n}(SeriesModel);\nexport default LineSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieveRawValue } from '../../data/helper/dataProvider.js';\nimport { isArray } from 'zrender/lib/core/util.js';\n/**\n * @return label string. Not null/undefined\n */\nexport function getDefaultLabel(data, dataIndex) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n var len = labelDims.length;\n // Simple optimization (in lots of cases, label dims length is 1)\n if (len === 1) {\n var rawVal = retrieveRawValue(data, dataIndex, labelDims[0]);\n return rawVal != null ? rawVal + '' : null;\n } else if (len) {\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n vals.push(retrieveRawValue(data, dataIndex, labelDims[i]));\n }\n return vals.join(' ');\n }\n}\nexport function getDefaultInterpolatedLabel(data, interpolatedValue) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n if (!isArray(interpolatedValue)) {\n return interpolatedValue + '';\n }\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n var dimIndex = data.getDimensionIndex(labelDims[i]);\n if (dimIndex >= 0) {\n vals.push(interpolatedValue[dimIndex]);\n }\n }\n return vals.join(' ');\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis } from '../../util/states.js';\nimport { getDefaultLabel } from './labelHelper.js';\nimport { extend } from 'zrender/lib/core/util.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar Symbol = /** @class */function (_super) {\n __extends(Symbol, _super);\n function Symbol(data, idx, seriesScope, opts) {\n var _this = _super.call(this) || this;\n _this.updateData(data, idx, seriesScope, opts);\n return _this;\n }\n Symbol.prototype._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) {\n // Remove paths created before\n this.removeAll();\n // let symbolPath = createSymbol(\n // symbolType, -0.5, -0.5, 1, 1, color\n // );\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4150.\n var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect);\n symbolPath.attr({\n z2: 100,\n culling: true,\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n });\n // Rewrite drift method\n symbolPath.drift = driftSymbol;\n this._symbolType = symbolType;\n this.add(symbolPath);\n };\n /**\n * Stop animation\n * @param {boolean} toLastFrame\n */\n Symbol.prototype.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(null, toLastFrame);\n };\n Symbol.prototype.getSymbolType = function () {\n return this._symbolType;\n };\n /**\n * FIXME:\n * Caution: This method breaks the encapsulation of this module,\n * but it indeed brings convenience. So do not use the method\n * unless you detailedly know all the implements of `Symbol`,\n * especially animation.\n *\n * Get symbol path element.\n */\n Symbol.prototype.getSymbolPath = function () {\n return this.childAt(0);\n };\n /**\n * Highlight symbol\n */\n Symbol.prototype.highlight = function () {\n enterEmphasis(this.childAt(0));\n };\n /**\n * Downplay symbol\n */\n Symbol.prototype.downplay = function () {\n leaveEmphasis(this.childAt(0));\n };\n /**\n * @param {number} zlevel\n * @param {number} z\n */\n Symbol.prototype.setZ = function (zlevel, z) {\n var symbolPath = this.childAt(0);\n symbolPath.zlevel = zlevel;\n symbolPath.z = z;\n };\n Symbol.prototype.setDraggable = function (draggable, hasCursorOption) {\n var symbolPath = this.childAt(0);\n symbolPath.draggable = draggable;\n symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor;\n };\n /**\n * Update symbol properties\n */\n Symbol.prototype.updateData = function (data, idx, seriesScope, opts) {\n this.silent = false;\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var seriesModel = data.hostModel;\n var symbolSize = Symbol.getSymbolSize(data, idx);\n var isInit = symbolType !== this._symbolType;\n var disableAnimation = opts && opts.disableAnimation;\n if (isInit) {\n var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect');\n this._createSymbol(symbolType, data, idx, symbolSize, keepAspect);\n } else {\n var symbolPath = this.childAt(0);\n symbolPath.silent = false;\n var target = {\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n };\n disableAnimation ? symbolPath.attr(target) : graphic.updateProps(symbolPath, target, seriesModel, idx);\n saveOldStyle(symbolPath);\n }\n this._updateCommon(data, idx, symbolSize, seriesScope, opts);\n if (isInit) {\n var symbolPath = this.childAt(0);\n if (!disableAnimation) {\n var target = {\n scaleX: this._sizeX,\n scaleY: this._sizeY,\n style: {\n // Always fadeIn. Because it has fadeOut animation when symbol is removed..\n opacity: symbolPath.style.opacity\n }\n };\n symbolPath.scaleX = symbolPath.scaleY = 0;\n symbolPath.style.opacity = 0;\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n }\n if (disableAnimation) {\n // Must stop leave transition manually if don't call initProps or updateProps.\n this.childAt(0).stopAnimation('leave');\n }\n };\n Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) {\n var symbolPath = this.childAt(0);\n var seriesModel = data.hostModel;\n var emphasisItemStyle;\n var blurItemStyle;\n var selectItemStyle;\n var focus;\n var blurScope;\n var emphasisDisabled;\n var labelStatesModels;\n var hoverScale;\n var cursorStyle;\n if (seriesScope) {\n emphasisItemStyle = seriesScope.emphasisItemStyle;\n blurItemStyle = seriesScope.blurItemStyle;\n selectItemStyle = seriesScope.selectItemStyle;\n focus = seriesScope.focus;\n blurScope = seriesScope.blurScope;\n labelStatesModels = seriesScope.labelStatesModels;\n hoverScale = seriesScope.hoverScale;\n cursorStyle = seriesScope.cursorStyle;\n emphasisDisabled = seriesScope.emphasisDisabled;\n }\n if (!seriesScope || data.hasItemOption) {\n var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n selectItemStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n blurItemStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n emphasisDisabled = emphasisModel.get('disabled');\n labelStatesModels = getLabelStatesModels(itemModel);\n hoverScale = emphasisModel.getShallow('scale');\n cursorStyle = itemModel.getShallow('cursor');\n }\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize);\n if (symbolOffset) {\n symbolPath.x = symbolOffset[0];\n symbolPath.y = symbolOffset[1];\n }\n cursorStyle && symbolPath.attr('cursor', cursorStyle);\n var symbolStyle = data.getItemVisual(idx, 'style');\n var visualColor = symbolStyle.fill;\n if (symbolPath instanceof ZRImage) {\n var pathStyle = symbolPath.style;\n symbolPath.useStyle(extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolStyle));\n } else {\n if (symbolPath.__isEmptyBrush) {\n // fill and stroke will be swapped if it's empty.\n // So we cloned a new style to avoid it affecting the original style in visual storage.\n // TODO Better implementation. No empty logic!\n symbolPath.useStyle(extend({}, symbolStyle));\n } else {\n symbolPath.useStyle(symbolStyle);\n }\n // Disable decal because symbol scale will been applied on the decal.\n symbolPath.style.decal = null;\n symbolPath.setColor(visualColor, opts && opts.symbolInnerColor);\n symbolPath.style.strokeNoScale = true;\n }\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = this._z2;\n if (liftZ != null) {\n if (z2Origin == null) {\n this._z2 = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n } else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n this._z2 = null;\n }\n var useNameLabel = opts && opts.useNameLabel;\n setLabelStyle(symbolPath, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n inheritColor: visualColor,\n defaultOpacity: symbolStyle.opacity\n });\n // Do not execute util needed.\n function getLabelDefaultText(idx) {\n return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx);\n }\n this._sizeX = symbolSize[0] / 2;\n this._sizeY = symbolSize[1] / 2;\n var emphasisState = symbolPath.ensureState('emphasis');\n emphasisState.style = emphasisItemStyle;\n symbolPath.ensureState('select').style = selectItemStyle;\n symbolPath.ensureState('blur').style = blurItemStyle;\n // null / undefined / true means to use default strategy.\n // 0 / false / negative number / NaN / Infinity means no scale.\n var scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY)\n // PENDING: restrict hoverScale > 1? It seems unreasonable to scale down\n : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1;\n // always set scale to allow resetting\n emphasisState.scaleX = this._sizeX * scaleRatio;\n emphasisState.scaleY = this._sizeY * scaleRatio;\n this.setSymbolScale(1);\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Symbol.prototype.setSymbolScale = function (scale) {\n this.scaleX = this.scaleY = scale;\n };\n Symbol.prototype.fadeOut = function (cb, seriesModel, opt) {\n var symbolPath = this.childAt(0);\n var dataIndex = getECData(this).dataIndex;\n var animationOpt = opt && opt.animation;\n // Avoid mistaken hover when fading out\n this.silent = symbolPath.silent = true;\n // Not show text when animating\n if (opt && opt.fadeLabel) {\n var textContent = symbolPath.getTextContent();\n if (textContent) {\n graphic.removeElement(textContent, {\n style: {\n opacity: 0\n }\n }, seriesModel, {\n dataIndex: dataIndex,\n removeOpt: animationOpt,\n cb: function () {\n symbolPath.removeTextContent();\n }\n });\n }\n } else {\n symbolPath.removeTextContent();\n }\n graphic.removeElement(symbolPath, {\n style: {\n opacity: 0\n },\n scaleX: 0,\n scaleY: 0\n }, seriesModel, {\n dataIndex: dataIndex,\n cb: cb,\n removeOpt: animationOpt\n });\n };\n Symbol.getSymbolSize = function (data, idx) {\n return normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n };\n return Symbol;\n}(graphic.Group);\nfunction driftSymbol(dx, dy) {\n this.parent.drift(dx, dy);\n}\nexport default Symbol;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport SymbolClz from './Symbol.js';\nimport { isObject } from 'zrender/lib/core/util.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nfunction symbolNeedsDraw(data, point, idx, opt) {\n return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt.isIgnore && opt.isIgnore(idx))\n // We do not set clipShape on group, because it will cut part of\n // the symbol element shape. We use the same clip shape here as\n // the line clip.\n && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none';\n}\nfunction normalizeUpdateOpt(opt) {\n if (opt != null && !isObject(opt)) {\n opt = {\n isIgnore: opt\n };\n }\n return opt || {};\n}\nfunction makeSeriesScope(data) {\n var seriesModel = data.hostModel;\n var emphasisModel = seriesModel.getModel('emphasis');\n return {\n emphasisItemStyle: emphasisModel.getModel('itemStyle').getItemStyle(),\n blurItemStyle: seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(),\n selectItemStyle: seriesModel.getModel(['select', 'itemStyle']).getItemStyle(),\n focus: emphasisModel.get('focus'),\n blurScope: emphasisModel.get('blurScope'),\n emphasisDisabled: emphasisModel.get('disabled'),\n hoverScale: emphasisModel.get('scale'),\n labelStatesModels: getLabelStatesModels(seriesModel),\n cursorStyle: seriesModel.get('cursor')\n };\n}\nvar SymbolDraw = /** @class */function () {\n function SymbolDraw(SymbolCtor) {\n this.group = new graphic.Group();\n this._SymbolCtor = SymbolCtor || SymbolClz;\n }\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.updateData = function (data, opt) {\n // Remove progressive els.\n this._progressiveEls = null;\n opt = normalizeUpdateOpt(opt);\n var group = this.group;\n var seriesModel = data.hostModel;\n var oldData = this._data;\n var SymbolCtor = this._SymbolCtor;\n var disableAnimation = opt.disableAnimation;\n var seriesScope = makeSeriesScope(data);\n var symbolUpdateOpt = {\n disableAnimation: disableAnimation\n };\n var getSymbolPoint = opt.getSymbolPoint || function (idx) {\n return data.getItemLayout(idx);\n };\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldData) {\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n var point = getSymbolPoint(newIdx);\n if (symbolNeedsDraw(data, point, newIdx, opt)) {\n var symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n var point = getSymbolPoint(newIdx);\n if (!symbolNeedsDraw(data, point, newIdx, opt)) {\n group.remove(symbolEl);\n return;\n }\n var newSymbolType = data.getItemVisual(newIdx, 'symbol') || 'circle';\n var oldSymbolType = symbolEl && symbolEl.getSymbolType && symbolEl.getSymbolType();\n if (!symbolEl\n // Create a new if symbol type changed.\n || oldSymbolType && oldSymbolType !== newSymbolType) {\n group.remove(symbolEl);\n symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n } else {\n symbolEl.updateData(data, newIdx, seriesScope, symbolUpdateOpt);\n var target = {\n x: point[0],\n y: point[1]\n };\n disableAnimation ? symbolEl.attr(target) : graphic.updateProps(symbolEl, target, seriesModel);\n }\n // Add back\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && el.fadeOut(function () {\n group.remove(el);\n }, seriesModel);\n }).execute();\n this._getSymbolPoint = getSymbolPoint;\n this._data = data;\n };\n ;\n SymbolDraw.prototype.updateLayout = function () {\n var _this = this;\n var data = this._data;\n if (data) {\n // Not use animation\n data.eachItemGraphicEl(function (el, idx) {\n var point = _this._getSymbolPoint(idx);\n el.setPosition(point);\n el.markRedraw();\n });\n }\n };\n ;\n SymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._seriesScope = makeSeriesScope(data);\n this._data = null;\n this.group.removeAll();\n };\n ;\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {\n // Clear\n this._progressiveEls = [];\n opt = normalizeUpdateOpt(opt);\n function updateIncrementalAndHover(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var point = data.getItemLayout(idx);\n if (symbolNeedsDraw(data, point, idx, opt)) {\n var el = new this._SymbolCtor(data, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n el.setPosition(point);\n this.group.add(el);\n data.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n SymbolDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n SymbolDraw.prototype.remove = function (enableAnimation) {\n var group = this.group;\n var data = this._data;\n // Incremental model do not have this._data.\n if (data && enableAnimation) {\n data.eachItemGraphicEl(function (el) {\n el.fadeOut(function () {\n group.remove(el);\n }, data.hostModel);\n });\n } else {\n group.removeAll();\n }\n };\n ;\n return SymbolDraw;\n}();\nexport default SymbolDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isDimensionStacked } from '../../data/helper/dataStackHelper.js';\nimport { isNumber, map } from 'zrender/lib/core/util.js';\nexport function prepareDataCoordInfo(coordSys, data, valueOrigin) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueStart = getValueStart(valueAxis, valueOrigin);\n var baseAxisDim = baseAxis.dim;\n var valueAxisDim = valueAxis.dim;\n var valueDim = data.mapDimension(valueAxisDim);\n var baseDim = data.mapDimension(baseAxisDim);\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var dims = map(coordSys.dimensions, function (coordDim) {\n return data.mapDimension(coordDim);\n });\n var stacked = false;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0] /* , dims[1] */)) {\n // jshint ignore:line\n stacked = true;\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1] /* , dims[0] */)) {\n // jshint ignore:line\n stacked = true;\n dims[1] = stackResultDim;\n }\n return {\n dataDimsForPoint: dims,\n valueStart: valueStart,\n valueAxisDim: valueAxisDim,\n baseAxisDim: baseAxisDim,\n stacked: !!stacked,\n valueDim: valueDim,\n baseDim: baseDim,\n baseDataOffset: baseDataOffset,\n stackedOverDimension: data.getCalculationInfo('stackedOverDimension')\n };\n}\nfunction getValueStart(valueAxis, valueOrigin) {\n var valueStart = 0;\n var extent = valueAxis.scale.getExtent();\n if (valueOrigin === 'start') {\n valueStart = extent[0];\n } else if (valueOrigin === 'end') {\n valueStart = extent[1];\n }\n // If origin is specified as a number, use it as\n // valueStart directly\n else if (isNumber(valueOrigin) && !isNaN(valueOrigin)) {\n valueStart = valueOrigin;\n }\n // auto\n else {\n // Both positive\n if (extent[0] > 0) {\n valueStart = extent[0];\n }\n // Both negative\n else if (extent[1] < 0) {\n valueStart = extent[1];\n }\n // If is one positive, and one negative, onZero shall be true\n }\n\n return valueStart;\n}\nexport function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) {\n var value = NaN;\n if (dataCoordInfo.stacked) {\n value = data.get(data.getCalculationInfo('stackedOverDimension'), idx);\n }\n if (isNaN(value)) {\n value = dataCoordInfo.valueStart;\n }\n var baseDataOffset = dataCoordInfo.baseDataOffset;\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx);\n stackedData[1 - baseDataOffset] = value;\n return coordSys.dataToPoint(stackedData);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nfunction diffData(oldData, newData) {\n var diffResult = [];\n newData.diff(oldData).add(function (idx) {\n diffResult.push({\n cmd: '+',\n idx: idx\n });\n }).update(function (newIdx, oldIdx) {\n diffResult.push({\n cmd: '=',\n idx: oldIdx,\n idx1: newIdx\n });\n }).remove(function (idx) {\n diffResult.push({\n cmd: '-',\n idx: idx\n });\n }).execute();\n return diffResult;\n}\nexport default function lineAnimationDiff(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) {\n var diff = diffData(oldData, newData);\n // let newIdList = newData.mapArray(newData.getId);\n // let oldIdList = oldData.mapArray(oldData.getId);\n // convertToIntId(newIdList, oldIdList);\n // // FIXME One data ?\n // diff = arrayDiff(oldIdList, newIdList);\n var currPoints = [];\n var nextPoints = [];\n // Points for stacking base line\n var currStackedPoints = [];\n var nextStackedPoints = [];\n var status = [];\n var sortedIndices = [];\n var rawIndices = [];\n var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin);\n // const oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin);\n var oldPoints = oldData.getLayout('points') || [];\n var newPoints = newData.getLayout('points') || [];\n for (var i = 0; i < diff.length; i++) {\n var diffItem = diff[i];\n var pointAdded = true;\n var oldIdx2 = void 0;\n var newIdx2 = void 0;\n // FIXME, animation is not so perfect when dataZoom window moves fast\n // Which is in case remvoing or add more than one data in the tail or head\n switch (diffItem.cmd) {\n case '=':\n oldIdx2 = diffItem.idx * 2;\n newIdx2 = diffItem.idx1 * 2;\n var currentX = oldPoints[oldIdx2];\n var currentY = oldPoints[oldIdx2 + 1];\n var nextX = newPoints[newIdx2];\n var nextY = newPoints[newIdx2 + 1];\n // If previous data is NaN, use next point directly\n if (isNaN(currentX) || isNaN(currentY)) {\n currentX = nextX;\n currentY = nextY;\n }\n currPoints.push(currentX, currentY);\n nextPoints.push(nextX, nextY);\n currStackedPoints.push(oldStackedOnPoints[oldIdx2], oldStackedOnPoints[oldIdx2 + 1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(diffItem.idx1));\n break;\n case '+':\n var newIdx = diffItem.idx;\n var newDataDimsForPoint = newDataOldCoordInfo.dataDimsForPoint;\n var oldPt = oldCoordSys.dataToPoint([newData.get(newDataDimsForPoint[0], newIdx), newData.get(newDataDimsForPoint[1], newIdx)]);\n newIdx2 = newIdx * 2;\n currPoints.push(oldPt[0], oldPt[1]);\n nextPoints.push(newPoints[newIdx2], newPoints[newIdx2 + 1]);\n var stackedOnPoint = getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, newIdx);\n currStackedPoints.push(stackedOnPoint[0], stackedOnPoint[1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(newIdx));\n break;\n case '-':\n pointAdded = false;\n }\n // Original indices\n if (pointAdded) {\n status.push(diffItem);\n sortedIndices.push(sortedIndices.length);\n }\n }\n // Diff result may be crossed if all items are changed\n // Sort by data index\n sortedIndices.sort(function (a, b) {\n return rawIndices[a] - rawIndices[b];\n });\n var len = currPoints.length;\n var sortedCurrPoints = createFloat32Array(len);\n var sortedNextPoints = createFloat32Array(len);\n var sortedCurrStackedPoints = createFloat32Array(len);\n var sortedNextStackedPoints = createFloat32Array(len);\n var sortedStatus = [];\n for (var i = 0; i < sortedIndices.length; i++) {\n var idx = sortedIndices[i];\n var i2 = i * 2;\n var idx2 = idx * 2;\n sortedCurrPoints[i2] = currPoints[idx2];\n sortedCurrPoints[i2 + 1] = currPoints[idx2 + 1];\n sortedNextPoints[i2] = nextPoints[idx2];\n sortedNextPoints[i2 + 1] = nextPoints[idx2 + 1];\n sortedCurrStackedPoints[i2] = currStackedPoints[idx2];\n sortedCurrStackedPoints[i2 + 1] = currStackedPoints[idx2 + 1];\n sortedNextStackedPoints[i2] = nextStackedPoints[idx2];\n sortedNextStackedPoints[i2 + 1] = nextStackedPoints[idx2 + 1];\n sortedStatus[i] = status[idx];\n }\n return {\n current: sortedCurrPoints,\n next: sortedNextPoints,\n stackedOnCurrent: sortedCurrStackedPoints,\n stackedOnNext: sortedNextStackedPoints,\n status: sortedStatus\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// Poly path support NaN point\nimport Path from 'zrender/lib/graphic/Path.js';\nimport PathProxy from 'zrender/lib/core/PathProxy.js';\nimport { cubicRootAt, cubicAt } from 'zrender/lib/core/curve.js';\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nfunction isPointNull(x, y) {\n return isNaN(x) || isNaN(y);\n}\n/**\n * Draw smoothed line in non-monotone, in may cause undesired curve in extreme\n * situations. This should be used when points are non-monotone neither in x or\n * y dimension.\n */\nfunction drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n if (idx >= allLen || idx < 0) {\n break;\n }\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n break;\n }\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY;\n // Ignore tiny segment.\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1];\n // Ignore duplicate point\n while (nextX === x && nextY === y && k < segLen) {\n k++;\n nextIdx += dir;\n idx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n x = points[idx * 2];\n y = points[idx * 2 + 1];\n dx = x - prevX;\n dy = y - prevY;\n }\n var tmpK = k + 1;\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0;\n // Is last point\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n var dir_1 = vx > 0 ? 1 : -1;\n cpx1 = x - dir_1 * lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + dir_1 * lenNextSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n var dir_2 = vy > 0 ? 1 : -1;\n cpx1 = x;\n cpy1 = y - dir_2 * lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + dir_2 * lenNextSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n // Use ratio of seg length\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg);\n // cp0 of next segment\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg;\n // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y));\n // Reclaculate cp1 based on the adjusted cp0 of next seg.\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg;\n // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y));\n // Adjust next cp0 again.\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n prevX = x;\n prevY = y;\n idx += dir;\n }\n return k;\n}\nvar ECPolylineShape = /** @class */function () {\n function ECPolylineShape() {\n this.smooth = 0;\n this.smoothConstraint = true;\n }\n return ECPolylineShape;\n}();\nvar ECPolyline = /** @class */function (_super) {\n __extends(ECPolyline, _super);\n function ECPolyline(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-polyline';\n return _this;\n }\n ECPolyline.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n ECPolyline.prototype.getDefaultShape = function () {\n return new ECPolylineShape();\n };\n ECPolyline.prototype.buildPath = function (ctx, shape) {\n var points = shape.points;\n var i = 0;\n var len = points.length / 2;\n // const result = getBoundingBox(points, shape.smoothConstraint);\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n for (; i < len; i++) {\n if (!isPointNull(points[i * 2], points[i * 2 + 1])) {\n break;\n }\n }\n }\n while (i < len) {\n i += drawSegment(ctx, points, i, len, len, 1, shape.smooth, shape.smoothMonotone, shape.connectNulls) + 1;\n }\n };\n ECPolyline.prototype.getPointOn = function (xOrY, dim) {\n if (!this.path) {\n this.createPathProxy();\n this.buildPath(this.path, this.shape);\n }\n var path = this.path;\n var data = path.data;\n var CMD = PathProxy.CMD;\n var x0;\n var y0;\n var isDimX = dim === 'x';\n var roots = [];\n for (var i = 0; i < data.length;) {\n var cmd = data[i++];\n var x = void 0;\n var y = void 0;\n var x2 = void 0;\n var y2 = void 0;\n var x3 = void 0;\n var y3 = void 0;\n var t = void 0;\n switch (cmd) {\n case CMD.M:\n x0 = data[i++];\n y0 = data[i++];\n break;\n case CMD.L:\n x = data[i++];\n y = data[i++];\n t = isDimX ? (xOrY - x0) / (x - x0) : (xOrY - y0) / (y - y0);\n if (t <= 1 && t >= 0) {\n var val = isDimX ? (y - y0) * t + y0 : (x - x0) * t + x0;\n return isDimX ? [xOrY, val] : [val, xOrY];\n }\n x0 = x;\n y0 = y;\n break;\n case CMD.C:\n x = data[i++];\n y = data[i++];\n x2 = data[i++];\n y2 = data[i++];\n x3 = data[i++];\n y3 = data[i++];\n var nRoot = isDimX ? cubicRootAt(x0, x, x2, x3, xOrY, roots) : cubicRootAt(y0, y, y2, y3, xOrY, roots);\n if (nRoot > 0) {\n for (var i_1 = 0; i_1 < nRoot; i_1++) {\n var t_1 = roots[i_1];\n if (t_1 <= 1 && t_1 >= 0) {\n var val = isDimX ? cubicAt(y0, y, y2, y3, t_1) : cubicAt(x0, x, x2, x3, t_1);\n return isDimX ? [xOrY, val] : [val, xOrY];\n }\n }\n }\n x0 = x3;\n y0 = y3;\n break;\n }\n }\n };\n return ECPolyline;\n}(Path);\nexport { ECPolyline };\nvar ECPolygonShape = /** @class */function (_super) {\n __extends(ECPolygonShape, _super);\n function ECPolygonShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ECPolygonShape;\n}(ECPolylineShape);\nvar ECPolygon = /** @class */function (_super) {\n __extends(ECPolygon, _super);\n function ECPolygon(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-polygon';\n return _this;\n }\n ECPolygon.prototype.getDefaultShape = function () {\n return new ECPolygonShape();\n };\n ECPolygon.prototype.buildPath = function (ctx, shape) {\n var points = shape.points;\n var stackedOnPoints = shape.stackedOnPoints;\n var i = 0;\n var len = points.length / 2;\n var smoothMonotone = shape.smoothMonotone;\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n for (; i < len; i++) {\n if (!isPointNull(points[i * 2], points[i * 2 + 1])) {\n break;\n }\n }\n }\n while (i < len) {\n var k = drawSegment(ctx, points, i, len, len, 1, shape.smooth, smoothMonotone, shape.connectNulls);\n drawSegment(ctx, stackedOnPoints, i + k - 1, k, len, -1, shape.stackedOnSmooth, smoothMonotone, shape.connectNulls);\n i += k + 1;\n ctx.closePath();\n }\n };\n return ECPolygon;\n}(Path);\nexport { ECPolygon };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport { round } from '../../util/number.js';\nimport { isFunction } from 'zrender/lib/core/util.js';\nfunction createGridClipPath(cartesian, hasAnimation, seriesModel, done, during) {\n var rect = cartesian.getArea();\n var x = rect.x;\n var y = rect.y;\n var width = rect.width;\n var height = rect.height;\n var lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;\n // Expand the clip path a bit to avoid the border is clipped and looks thinner\n x -= lineWidth / 2;\n y -= lineWidth / 2;\n width += lineWidth;\n height += lineWidth;\n // fix: https://github.com/apache/incubator-echarts/issues/11369\n width = Math.ceil(width);\n if (x !== Math.floor(x)) {\n x = Math.floor(x);\n // if no extra 1px on `width`, it will still be clipped since `x` is floored\n width++;\n }\n var clipPath = new graphic.Rect({\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n }\n });\n if (hasAnimation) {\n var baseAxis = cartesian.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isAxisInversed = baseAxis.inverse;\n if (isHorizontal) {\n if (isAxisInversed) {\n clipPath.shape.x += width;\n }\n clipPath.shape.width = 0;\n } else {\n if (!isAxisInversed) {\n clipPath.shape.y += height;\n }\n clipPath.shape.height = 0;\n }\n var duringCb = isFunction(during) ? function (percent) {\n during(percent, clipPath);\n } : null;\n graphic.initProps(clipPath, {\n shape: {\n width: width,\n height: height,\n x: x,\n y: y\n }\n }, seriesModel, null, done, duringCb);\n }\n return clipPath;\n}\nfunction createPolarClipPath(polar, hasAnimation, seriesModel) {\n var sectorArea = polar.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n var r0 = round(sectorArea.r0, 1);\n var r = round(sectorArea.r, 1);\n var clipPath = new graphic.Sector({\n shape: {\n cx: round(polar.cx, 1),\n cy: round(polar.cy, 1),\n r0: r0,\n r: r,\n startAngle: sectorArea.startAngle,\n endAngle: sectorArea.endAngle,\n clockwise: sectorArea.clockwise\n }\n });\n if (hasAnimation) {\n var isRadial = polar.getBaseAxis().dim === 'angle';\n if (isRadial) {\n clipPath.shape.endAngle = sectorArea.startAngle;\n } else {\n clipPath.shape.r = r0;\n }\n graphic.initProps(clipPath, {\n shape: {\n endAngle: sectorArea.endAngle,\n r: r\n }\n }, seriesModel);\n }\n return clipPath;\n}\nfunction createClipPath(coordSys, hasAnimation, seriesModel, done, during) {\n if (!coordSys) {\n return null;\n } else if (coordSys.type === 'polar') {\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n } else if (coordSys.type === 'cartesian2d') {\n return createGridClipPath(coordSys, hasAnimation, seriesModel, done, during);\n }\n return null;\n}\nexport { createGridClipPath, createPolarClipPath, createClipPath };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function isCoordinateSystemType(coordSys, type) {\n return coordSys.type === type;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// FIXME step not support polar\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport SymbolClz from '../helper/Symbol.js';\nimport lineAnimationDiff from './lineAnimationDiff.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as modelUtil from '../../util/model.js';\nimport { ECPolyline, ECPolygon } from './poly.js';\nimport ChartView from '../../view/Chart.js';\nimport { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createGridClipPath, createPolarClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { setStatesStylesFromModel, setStatesFlag, toggleHoverEmphasis, SPECIAL_STATES } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels, labelInner } from '../../label/labelStyle.js';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nimport { convertToColorString } from '../../util/format.js';\nimport { lerp } from 'zrender/lib/tool/color.js';\nfunction isPointsSame(points1, points2) {\n if (points1.length !== points2.length) {\n return;\n }\n for (var i = 0; i < points1.length; i++) {\n if (points1[i] !== points2[i]) {\n return;\n }\n }\n return true;\n}\nfunction bboxFromPoints(points) {\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (!isNaN(x)) {\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n }\n if (!isNaN(y)) {\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n }\n return [[minX, minY], [maxX, maxY]];\n}\nfunction getBoundingDiff(points1, points2) {\n var _a = bboxFromPoints(points1),\n min1 = _a[0],\n max1 = _a[1];\n var _b = bboxFromPoints(points2),\n min2 = _b[0],\n max2 = _b[1];\n // Get a max value from each corner of two boundings.\n return Math.max(Math.abs(min1[0] - min2[0]), Math.abs(min1[1] - min2[1]), Math.abs(max1[0] - max2[0]), Math.abs(max1[1] - max2[1]));\n}\nfunction getSmooth(smooth) {\n return zrUtil.isNumber(smooth) ? smooth : smooth ? 0.5 : 0;\n}\nfunction getStackedOnPoints(coordSys, data, dataCoordInfo) {\n if (!dataCoordInfo.valueDim) {\n return [];\n }\n var len = data.count();\n var points = createFloat32Array(len * 2);\n for (var idx = 0; idx < len; idx++) {\n var pt = getStackedOnPoint(dataCoordInfo, coordSys, data, idx);\n points[idx * 2] = pt[0];\n points[idx * 2 + 1] = pt[1];\n }\n return points;\n}\nfunction turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {\n var baseAxis = coordSys.getBaseAxis();\n var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1;\n var stepPoints = [];\n var i = 0;\n var stepPt = [];\n var pt = [];\n var nextPt = [];\n var filteredPoints = [];\n if (connectNulls) {\n for (i = 0; i < points.length; i += 2) {\n if (!isNaN(points[i]) && !isNaN(points[i + 1])) {\n filteredPoints.push(points[i], points[i + 1]);\n }\n }\n points = filteredPoints;\n }\n for (i = 0; i < points.length - 2; i += 2) {\n nextPt[0] = points[i + 2];\n nextPt[1] = points[i + 3];\n pt[0] = points[i];\n pt[1] = points[i + 1];\n stepPoints.push(pt[0], pt[1]);\n switch (stepTurnAt) {\n case 'end':\n stepPt[baseIndex] = nextPt[baseIndex];\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n break;\n case 'middle':\n var middle = (pt[baseIndex] + nextPt[baseIndex]) / 2;\n var stepPt2 = [];\n stepPt[baseIndex] = stepPt2[baseIndex] = middle;\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPt2[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n stepPoints.push(stepPt2[0], stepPt2[1]);\n break;\n default:\n // default is start\n stepPt[baseIndex] = pt[baseIndex];\n stepPt[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n }\n }\n // Last points\n stepPoints.push(points[i++], points[i++]);\n return stepPoints;\n}\n/**\n * Clip color stops to edge. Avoid creating too large gradients.\n * Which may lead to blurry when GPU acceleration is enabled. See #15680\n *\n * The stops has been sorted from small to large.\n */\nfunction clipColorStops(colorStops, maxSize) {\n var newColorStops = [];\n var len = colorStops.length;\n // coord will always < 0 in prevOutOfRangeColorStop.\n var prevOutOfRangeColorStop;\n var prevInRangeColorStop;\n function lerpStop(stop0, stop1, clippedCoord) {\n var coord0 = stop0.coord;\n var p = (clippedCoord - coord0) / (stop1.coord - coord0);\n var color = lerp(p, [stop0.color, stop1.color]);\n return {\n coord: clippedCoord,\n color: color\n };\n }\n for (var i = 0; i < len; i++) {\n var stop_1 = colorStops[i];\n var coord = stop_1.coord;\n if (coord < 0) {\n prevOutOfRangeColorStop = stop_1;\n } else if (coord > maxSize) {\n if (prevInRangeColorStop) {\n newColorStops.push(lerpStop(prevInRangeColorStop, stop_1, maxSize));\n } else if (prevOutOfRangeColorStop) {\n // If there are two stops and coord range is between these two stops\n newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0), lerpStop(prevOutOfRangeColorStop, stop_1, maxSize));\n }\n // All following stop will be out of range. So just ignore them.\n break;\n } else {\n if (prevOutOfRangeColorStop) {\n newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0));\n // Reset\n prevOutOfRangeColorStop = null;\n }\n newColorStops.push(stop_1);\n prevInRangeColorStop = stop_1;\n }\n }\n return newColorStops;\n}\nfunction getVisualGradient(data, coordSys, api) {\n var visualMetaList = data.getVisual('visualMeta');\n if (!visualMetaList || !visualMetaList.length || !data.count()) {\n // When data.count() is 0, gradient range can not be calculated.\n return;\n }\n if (coordSys.type !== 'cartesian2d') {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Visual map on line style is only supported on cartesian2d.');\n }\n return;\n }\n var coordDim;\n var visualMeta;\n for (var i = visualMetaList.length - 1; i >= 0; i--) {\n var dimInfo = data.getDimensionInfo(visualMetaList[i].dimension);\n coordDim = dimInfo && dimInfo.coordDim;\n // Can only be x or y\n if (coordDim === 'x' || coordDim === 'y') {\n visualMeta = visualMetaList[i];\n break;\n }\n }\n if (!visualMeta) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Visual map on line style only support x or y dimension.');\n }\n return;\n }\n // If the area to be rendered is bigger than area defined by LinearGradient,\n // the canvas spec prescribes that the color of the first stop and the last\n // stop should be used. But if two stops are added at offset 0, in effect\n // browsers use the color of the second stop to render area outside\n // LinearGradient. So we can only infinitesimally extend area defined in\n // LinearGradient to render `outerColors`.\n var axis = coordSys.getAxis(coordDim);\n // dataToCoord mapping may not be linear, but must be monotonic.\n var colorStops = zrUtil.map(visualMeta.stops, function (stop) {\n // offset will be calculated later.\n return {\n coord: axis.toGlobalCoord(axis.dataToCoord(stop.value)),\n color: stop.color\n };\n });\n var stopLen = colorStops.length;\n var outerColors = visualMeta.outerColors.slice();\n if (stopLen && colorStops[0].coord > colorStops[stopLen - 1].coord) {\n colorStops.reverse();\n outerColors.reverse();\n }\n var colorStopsInRange = clipColorStops(colorStops, coordDim === 'x' ? api.getWidth() : api.getHeight());\n var inRangeStopLen = colorStopsInRange.length;\n if (!inRangeStopLen && stopLen) {\n // All stops are out of range. All will be the same color.\n return colorStops[0].coord < 0 ? outerColors[1] ? outerColors[1] : colorStops[stopLen - 1].color : outerColors[0] ? outerColors[0] : colorStops[0].color;\n }\n var tinyExtent = 10; // Arbitrary value: 10px\n var minCoord = colorStopsInRange[0].coord - tinyExtent;\n var maxCoord = colorStopsInRange[inRangeStopLen - 1].coord + tinyExtent;\n var coordSpan = maxCoord - minCoord;\n if (coordSpan < 1e-3) {\n return 'transparent';\n }\n zrUtil.each(colorStopsInRange, function (stop) {\n stop.offset = (stop.coord - minCoord) / coordSpan;\n });\n colorStopsInRange.push({\n // NOTE: inRangeStopLen may still be 0 if stoplen is zero.\n offset: inRangeStopLen ? colorStopsInRange[inRangeStopLen - 1].offset : 0.5,\n color: outerColors[1] || 'transparent'\n });\n colorStopsInRange.unshift({\n offset: inRangeStopLen ? colorStopsInRange[0].offset : 0.5,\n color: outerColors[0] || 'transparent'\n });\n var gradient = new graphic.LinearGradient(0, 0, 0, 0, colorStopsInRange, true);\n gradient[coordDim] = minCoord;\n gradient[coordDim + '2'] = maxCoord;\n return gradient;\n}\nfunction getIsIgnoreFunc(seriesModel, data, coordSys) {\n var showAllSymbol = seriesModel.get('showAllSymbol');\n var isAuto = showAllSymbol === 'auto';\n if (showAllSymbol && !isAuto) {\n return;\n }\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n if (!categoryAxis) {\n return;\n }\n // Note that category label interval strategy might bring some weird effect\n // in some scenario: users may wonder why some of the symbols are not\n // displayed. So we show all symbols as possible as we can.\n if (isAuto\n // Simplify the logic, do not determine label overlap here.\n && canShowAllSymbolForCategory(categoryAxis, data)) {\n return;\n }\n // Otherwise follow the label interval strategy on category axis.\n var categoryDataDim = data.mapDimension(categoryAxis.dim);\n var labelMap = {};\n zrUtil.each(categoryAxis.getViewLabels(), function (labelItem) {\n var ordinalNumber = categoryAxis.scale.getRawOrdinalNumber(labelItem.tickValue);\n labelMap[ordinalNumber] = 1;\n });\n return function (dataIndex) {\n return !labelMap.hasOwnProperty(data.get(categoryDataDim, dataIndex));\n };\n}\nfunction canShowAllSymbolForCategory(categoryAxis, data) {\n // In most cases, line is monotonous on category axis, and the label size\n // is close with each other. So we check the symbol size and some of the\n // label size alone with the category axis to estimate whether all symbol\n // can be shown without overlap.\n var axisExtent = categoryAxis.getExtent();\n var availSize = Math.abs(axisExtent[1] - axisExtent[0]) / categoryAxis.scale.count();\n isNaN(availSize) && (availSize = 0); // 0/0 is NaN.\n // Sampling some points, max 5.\n var dataLen = data.count();\n var step = Math.max(1, Math.round(dataLen / 5));\n for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) {\n if (SymbolClz.getSymbolSize(data, dataIndex\n // Only for cartesian, where `isHorizontal` exists.\n )[categoryAxis.isHorizontal() ? 1 : 0]\n // Empirical number\n * 1.5 > availSize) {\n return false;\n }\n }\n return true;\n}\nfunction isPointNull(x, y) {\n return isNaN(x) || isNaN(y);\n}\nfunction getLastIndexNotNull(points) {\n var len = points.length / 2;\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n return len - 1;\n}\nfunction getPointAtIndex(points, idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n}\nfunction getIndexRange(points, xOrY, dim) {\n var len = points.length / 2;\n var dimIdx = dim === 'x' ? 0 : 1;\n var a;\n var b;\n var prevIndex = 0;\n var nextIndex = -1;\n for (var i = 0; i < len; i++) {\n b = points[i * 2 + dimIdx];\n if (isNaN(b) || isNaN(points[i * 2 + 1 - dimIdx])) {\n continue;\n }\n if (i === 0) {\n a = b;\n continue;\n }\n if (a <= xOrY && b >= xOrY || a >= xOrY && b <= xOrY) {\n nextIndex = i;\n break;\n }\n prevIndex = i;\n a = b;\n }\n return {\n range: [prevIndex, nextIndex],\n t: (xOrY - a) / (b - a)\n };\n}\nfunction anyStateShowEndLabel(seriesModel) {\n if (seriesModel.get(['endLabel', 'show'])) {\n return true;\n }\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n if (seriesModel.get([SPECIAL_STATES[i], 'endLabel', 'show'])) {\n return true;\n }\n }\n return false;\n}\nfunction createLineClipPath(lineView, coordSys, hasAnimation, seriesModel) {\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n var endLabelModel_1 = seriesModel.getModel('endLabel');\n var valueAnimation_1 = endLabelModel_1.get('valueAnimation');\n var data_1 = seriesModel.getData();\n var labelAnimationRecord_1 = {\n lastFrameIndex: 0\n };\n var during = anyStateShowEndLabel(seriesModel) ? function (percent, clipRect) {\n lineView._endLabelOnDuring(percent, clipRect, data_1, labelAnimationRecord_1, valueAnimation_1, endLabelModel_1, coordSys);\n } : null;\n var isHorizontal = coordSys.getBaseAxis().isHorizontal();\n var clipPath = createGridClipPath(coordSys, hasAnimation, seriesModel, function () {\n var endLabel = lineView._endLabel;\n if (endLabel && hasAnimation) {\n if (labelAnimationRecord_1.originalX != null) {\n endLabel.attr({\n x: labelAnimationRecord_1.originalX,\n y: labelAnimationRecord_1.originalY\n });\n }\n }\n }, during);\n // Expand clip shape to avoid clipping when line value exceeds axis\n if (!seriesModel.get('clip', true)) {\n var rectShape = clipPath.shape;\n var expandSize = Math.max(rectShape.width, rectShape.height);\n if (isHorizontal) {\n rectShape.y -= expandSize;\n rectShape.height += expandSize * 2;\n } else {\n rectShape.x -= expandSize;\n rectShape.width += expandSize * 2;\n }\n }\n // Set to the final frame. To make sure label layout is right.\n if (during) {\n during(1, clipPath);\n }\n return clipPath;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n if (seriesModel.get(['endLabel', 'show'])) {\n console.warn('endLabel is not supported for lines in polar systems.');\n }\n }\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n }\n}\nfunction getEndLabelStateSpecified(endLabelModel, coordSys) {\n var baseAxis = coordSys.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isBaseInversed = baseAxis.inverse;\n var align = isHorizontal ? isBaseInversed ? 'right' : 'left' : 'center';\n var verticalAlign = isHorizontal ? 'middle' : isBaseInversed ? 'top' : 'bottom';\n return {\n normal: {\n align: endLabelModel.get('align') || align,\n verticalAlign: endLabelModel.get('verticalAlign') || verticalAlign\n }\n };\n}\nvar LineView = /** @class */function (_super) {\n __extends(LineView, _super);\n function LineView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LineView.prototype.init = function () {\n var lineGroup = new graphic.Group();\n var symbolDraw = new SymbolDraw();\n this.group.add(symbolDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineGroup = lineGroup;\n };\n LineView.prototype.render = function (seriesModel, ecModel, api) {\n var _this = this;\n var coordSys = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var lineStyleModel = seriesModel.getModel('lineStyle');\n var areaStyleModel = seriesModel.getModel('areaStyle');\n var points = data.getLayout('points') || [];\n var isCoordSysPolar = coordSys.type === 'polar';\n var prevCoordSys = this._coordSys;\n var symbolDraw = this._symbolDraw;\n var polyline = this._polyline;\n var polygon = this._polygon;\n var lineGroup = this._lineGroup;\n var hasAnimation = !ecModel.ssr && seriesModel.get('animation');\n var isAreaChart = !areaStyleModel.isEmpty();\n var valueOrigin = areaStyleModel.get('origin');\n var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);\n var stackedOnPoints = isAreaChart && getStackedOnPoints(coordSys, data, dataCoordInfo);\n var showSymbol = seriesModel.get('showSymbol');\n var connectNulls = seriesModel.get('connectNulls');\n var isIgnoreFunc = showSymbol && !isCoordSysPolar && getIsIgnoreFunc(seriesModel, data, coordSys);\n // Remove temporary symbols\n var oldData = this._data;\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n // Remove previous created symbols if showSymbol changed to false\n if (!showSymbol) {\n symbolDraw.remove();\n }\n group.add(lineGroup);\n // FIXME step not support polar\n var step = !isCoordSysPolar ? seriesModel.get('step') : false;\n var clipShapeForSymbol;\n if (coordSys && coordSys.getArea && seriesModel.get('clip', true)) {\n clipShapeForSymbol = coordSys.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n // See #7913 and `test/dataZoom-clip.html`.\n if (clipShapeForSymbol.width != null) {\n clipShapeForSymbol.x -= 0.1;\n clipShapeForSymbol.y -= 0.1;\n clipShapeForSymbol.width += 0.2;\n clipShapeForSymbol.height += 0.2;\n } else if (clipShapeForSymbol.r0) {\n clipShapeForSymbol.r0 -= 0.5;\n clipShapeForSymbol.r += 0.5;\n }\n }\n this._clipShapeForSymbol = clipShapeForSymbol;\n var visualColor = getVisualGradient(data, coordSys, api) || data.getVisual('style')[data.getVisual('drawType')];\n // Initialization animation or coordinate system changed\n if (!(polyline && prevCoordSys.type === coordSys.type && step === this._step)) {\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol,\n disableAnimation: true,\n getSymbolPoint: function (idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n }\n });\n hasAnimation && this._initSymbolLabelAnimation(data, coordSys, clipShapeForSymbol);\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step, connectNulls);\n if (stackedOnPoints) {\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);\n }\n }\n polyline = this._newPolyline(points);\n if (isAreaChart) {\n polygon = this._newPolygon(points, stackedOnPoints);\n } // If areaStyle is removed\n else if (polygon) {\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n // NOTE: Must update _endLabel before setClipPath.\n if (!isCoordSysPolar) {\n this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor));\n }\n lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel));\n } else {\n if (isAreaChart && !polygon) {\n // If areaStyle is added\n polygon = this._newPolygon(points, stackedOnPoints);\n } else if (polygon && !isAreaChart) {\n // If areaStyle is removed\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n // NOTE: Must update _endLabel before setClipPath.\n if (!isCoordSysPolar) {\n this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor));\n }\n // Update clipPath\n var oldClipPath = lineGroup.getClipPath();\n if (oldClipPath) {\n var newClipPath = createLineClipPath(this, coordSys, false, seriesModel);\n graphic.initProps(oldClipPath, {\n shape: newClipPath.shape\n }, seriesModel);\n } else {\n lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel));\n }\n // Always update, or it is wrong in the case turning on legend\n // because points are not changed.\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol,\n disableAnimation: true,\n getSymbolPoint: function (idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n }\n });\n // In the case data zoom triggered refreshing frequently\n // Data may not change if line has a category axis. So it should animate nothing.\n if (!isPointsSame(this._stackedOnPoints, stackedOnPoints) || !isPointsSame(this._points, points)) {\n if (hasAnimation) {\n this._doUpdateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls);\n } else {\n // Not do it in update with animation\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step, connectNulls);\n if (stackedOnPoints) {\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);\n }\n }\n polyline.setShape({\n points: points\n });\n polygon && polygon.setShape({\n points: points,\n stackedOnPoints: stackedOnPoints\n });\n }\n }\n }\n var emphasisModel = seriesModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var emphasisDisabled = emphasisModel.get('disabled');\n polyline.useStyle(zrUtil.defaults(\n // Use color in lineStyle first\n lineStyleModel.getLineStyle(), {\n fill: 'none',\n stroke: visualColor,\n lineJoin: 'bevel'\n }));\n setStatesStylesFromModel(polyline, seriesModel, 'lineStyle');\n if (polyline.style.lineWidth > 0 && seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder') {\n var emphasisLineStyle = polyline.getState('emphasis').style;\n emphasisLineStyle.lineWidth = +polyline.style.lineWidth + 1;\n }\n // Needs seriesIndex for focus\n getECData(polyline).seriesIndex = seriesModel.seriesIndex;\n toggleHoverEmphasis(polyline, focus, blurScope, emphasisDisabled);\n var smooth = getSmooth(seriesModel.get('smooth'));\n var smoothMonotone = seriesModel.get('smoothMonotone');\n polyline.setShape({\n smooth: smooth,\n smoothMonotone: smoothMonotone,\n connectNulls: connectNulls\n });\n if (polygon) {\n var stackedOnSeries = data.getCalculationInfo('stackedOnSeries');\n var stackedOnSmooth = 0;\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: visualColor,\n opacity: 0.7,\n lineJoin: 'bevel',\n decal: data.getVisual('style').decal\n }));\n if (stackedOnSeries) {\n stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth'));\n }\n polygon.setShape({\n smooth: smooth,\n stackedOnSmooth: stackedOnSmooth,\n smoothMonotone: smoothMonotone,\n connectNulls: connectNulls\n });\n setStatesStylesFromModel(polygon, seriesModel, 'areaStyle');\n // Needs seriesIndex for focus\n getECData(polygon).seriesIndex = seriesModel.seriesIndex;\n toggleHoverEmphasis(polygon, focus, blurScope, emphasisDisabled);\n }\n var changePolyState = function (toState) {\n _this._changePolyState(toState);\n };\n data.eachItemGraphicEl(function (el) {\n // Switch polyline / polygon state if element changed its state.\n el && (el.onHoverStateChange = changePolyState);\n });\n this._polyline.onHoverStateChange = changePolyState;\n this._data = data;\n // Save the coordinate system for transition animation when data changed\n this._coordSys = coordSys;\n this._stackedOnPoints = stackedOnPoints;\n this._points = points;\n this._step = step;\n this._valueOrigin = valueOrigin;\n if (seriesModel.get('triggerLineEvent')) {\n this.packEventData(seriesModel, polyline);\n polygon && this.packEventData(seriesModel, polygon);\n }\n };\n LineView.prototype.packEventData = function (seriesModel, el) {\n getECData(el).eventData = {\n componentType: 'series',\n componentSubType: 'line',\n componentIndex: seriesModel.componentIndex,\n seriesIndex: seriesModel.seriesIndex,\n seriesName: seriesModel.name,\n seriesType: 'line'\n };\n };\n LineView.prototype.highlight = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n this._changePolyState('emphasis');\n if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) {\n var points = data.getLayout('points');\n var symbol = data.getItemGraphicEl(dataIndex);\n if (!symbol) {\n // Create a temporary symbol if it is not exists\n var x = points[dataIndex * 2];\n var y = points[dataIndex * 2 + 1];\n if (isNaN(x) || isNaN(y)) {\n // Null data\n return;\n }\n // fix #11360: shouldn't draw symbol outside clipShapeForSymbol\n if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(x, y)) {\n return;\n }\n var zlevel = seriesModel.get('zlevel') || 0;\n var z = seriesModel.get('z') || 0;\n symbol = new SymbolClz(data, dataIndex);\n symbol.x = x;\n symbol.y = y;\n symbol.setZ(zlevel, z);\n // ensure label text of the temporary symbol is in front of line and area polygon\n var symbolLabel = symbol.getSymbolPath().getTextContent();\n if (symbolLabel) {\n symbolLabel.zlevel = zlevel;\n symbolLabel.z = z;\n symbolLabel.z2 = this._polyline.z2 + 1;\n }\n symbol.__temp = true;\n data.setItemGraphicEl(dataIndex, symbol);\n // Stop scale animation\n symbol.stopSymbolAnimation(true);\n this.group.add(symbol);\n }\n symbol.highlight();\n } else {\n // Highlight whole series\n ChartView.prototype.highlight.call(this, seriesModel, ecModel, api, payload);\n }\n };\n LineView.prototype.downplay = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n this._changePolyState('normal');\n if (dataIndex != null && dataIndex >= 0) {\n var symbol = data.getItemGraphicEl(dataIndex);\n if (symbol) {\n if (symbol.__temp) {\n data.setItemGraphicEl(dataIndex, null);\n this.group.remove(symbol);\n } else {\n symbol.downplay();\n }\n }\n } else {\n // FIXME\n // can not downplay completely.\n // Downplay whole series\n ChartView.prototype.downplay.call(this, seriesModel, ecModel, api, payload);\n }\n };\n LineView.prototype._changePolyState = function (toState) {\n var polygon = this._polygon;\n setStatesFlag(this._polyline, toState);\n polygon && setStatesFlag(polygon, toState);\n };\n LineView.prototype._newPolyline = function (points) {\n var polyline = this._polyline;\n // Remove previous created polyline\n if (polyline) {\n this._lineGroup.remove(polyline);\n }\n polyline = new ECPolyline({\n shape: {\n points: points\n },\n segmentIgnoreThreshold: 2,\n z2: 10\n });\n this._lineGroup.add(polyline);\n this._polyline = polyline;\n return polyline;\n };\n LineView.prototype._newPolygon = function (points, stackedOnPoints) {\n var polygon = this._polygon;\n // Remove previous created polygon\n if (polygon) {\n this._lineGroup.remove(polygon);\n }\n polygon = new ECPolygon({\n shape: {\n points: points,\n stackedOnPoints: stackedOnPoints\n },\n segmentIgnoreThreshold: 2\n });\n this._lineGroup.add(polygon);\n this._polygon = polygon;\n return polygon;\n };\n LineView.prototype._initSymbolLabelAnimation = function (data, coordSys, clipShape) {\n var isHorizontalOrRadial;\n var isCoordSysPolar;\n var baseAxis = coordSys.getBaseAxis();\n var isAxisInverse = baseAxis.inverse;\n if (coordSys.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n isCoordSysPolar = false;\n } else if (coordSys.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n isCoordSysPolar = true;\n }\n var seriesModel = data.hostModel;\n var seriesDuration = seriesModel.get('animationDuration');\n if (zrUtil.isFunction(seriesDuration)) {\n seriesDuration = seriesDuration(null);\n }\n var seriesDelay = seriesModel.get('animationDelay') || 0;\n var seriesDelayValue = zrUtil.isFunction(seriesDelay) ? seriesDelay(null) : seriesDelay;\n data.eachItemGraphicEl(function (symbol, idx) {\n var el = symbol;\n if (el) {\n var point = [symbol.x, symbol.y];\n var start = void 0;\n var end = void 0;\n var current = void 0;\n if (clipShape) {\n if (isCoordSysPolar) {\n var polarClip = clipShape;\n var coord = coordSys.pointToCoord(point);\n if (isHorizontalOrRadial) {\n start = polarClip.startAngle;\n end = polarClip.endAngle;\n current = -coord[1] / 180 * Math.PI;\n } else {\n start = polarClip.r0;\n end = polarClip.r;\n current = coord[0];\n }\n } else {\n var gridClip = clipShape;\n if (isHorizontalOrRadial) {\n start = gridClip.x;\n end = gridClip.x + gridClip.width;\n current = symbol.x;\n } else {\n start = gridClip.y + gridClip.height;\n end = gridClip.y;\n current = symbol.y;\n }\n }\n }\n var ratio = end === start ? 0 : (current - start) / (end - start);\n if (isAxisInverse) {\n ratio = 1 - ratio;\n }\n var delay = zrUtil.isFunction(seriesDelay) ? seriesDelay(idx) : seriesDuration * ratio + seriesDelayValue;\n var symbolPath = el.getSymbolPath();\n var text = symbolPath.getTextContent();\n el.attr({\n scaleX: 0,\n scaleY: 0\n });\n el.animateTo({\n scaleX: 1,\n scaleY: 1\n }, {\n duration: 200,\n setToFinal: true,\n delay: delay\n });\n if (text) {\n text.animateFrom({\n style: {\n opacity: 0\n }\n }, {\n duration: 300,\n delay: delay\n });\n }\n symbolPath.disableLabelAnimation = true;\n }\n });\n };\n LineView.prototype._initOrUpdateEndLabel = function (seriesModel, coordSys, inheritColor) {\n var endLabelModel = seriesModel.getModel('endLabel');\n if (anyStateShowEndLabel(seriesModel)) {\n var data_2 = seriesModel.getData();\n var polyline = this._polyline;\n // series may be filtered.\n var points = data_2.getLayout('points');\n if (!points) {\n polyline.removeTextContent();\n this._endLabel = null;\n return;\n }\n var endLabel = this._endLabel;\n if (!endLabel) {\n endLabel = this._endLabel = new graphic.Text({\n z2: 200 // should be higher than item symbol\n });\n\n endLabel.ignoreClip = true;\n polyline.setTextContent(this._endLabel);\n polyline.disableLabelAnimation = true;\n }\n // Find last non-NaN data to display data\n var dataIndex = getLastIndexNotNull(points);\n if (dataIndex >= 0) {\n setLabelStyle(polyline, getLabelStatesModels(seriesModel, 'endLabel'), {\n inheritColor: inheritColor,\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: function (dataIndex, opt, interpolatedValue) {\n return interpolatedValue != null ? getDefaultInterpolatedLabel(data_2, interpolatedValue) : getDefaultLabel(data_2, dataIndex);\n },\n enableTextSetter: true\n }, getEndLabelStateSpecified(endLabelModel, coordSys));\n polyline.textConfig.position = null;\n }\n } else if (this._endLabel) {\n this._polyline.removeTextContent();\n this._endLabel = null;\n }\n };\n LineView.prototype._endLabelOnDuring = function (percent, clipRect, data, animationRecord, valueAnimation, endLabelModel, coordSys) {\n var endLabel = this._endLabel;\n var polyline = this._polyline;\n if (endLabel) {\n // NOTE: Don't remove percent < 1. percent === 1 means the first frame during render.\n // The label is not prepared at this time.\n if (percent < 1 && animationRecord.originalX == null) {\n animationRecord.originalX = endLabel.x;\n animationRecord.originalY = endLabel.y;\n }\n var points = data.getLayout('points');\n var seriesModel = data.hostModel;\n var connectNulls = seriesModel.get('connectNulls');\n var precision = endLabelModel.get('precision');\n var distance = endLabelModel.get('distance') || 0;\n var baseAxis = coordSys.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isBaseInversed = baseAxis.inverse;\n var clipShape = clipRect.shape;\n var xOrY = isBaseInversed ? isHorizontal ? clipShape.x : clipShape.y + clipShape.height : isHorizontal ? clipShape.x + clipShape.width : clipShape.y;\n var distanceX = (isHorizontal ? distance : 0) * (isBaseInversed ? -1 : 1);\n var distanceY = (isHorizontal ? 0 : -distance) * (isBaseInversed ? -1 : 1);\n var dim = isHorizontal ? 'x' : 'y';\n var dataIndexRange = getIndexRange(points, xOrY, dim);\n var indices = dataIndexRange.range;\n var diff = indices[1] - indices[0];\n var value = void 0;\n if (diff >= 1) {\n // diff > 1 && connectNulls, which is on the null data.\n if (diff > 1 && !connectNulls) {\n var pt = getPointAtIndex(points, indices[0]);\n endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n valueAnimation && (value = seriesModel.getRawValue(indices[0]));\n } else {\n var pt = polyline.getPointOn(xOrY, dim);\n pt && endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n var startValue = seriesModel.getRawValue(indices[0]);\n var endValue = seriesModel.getRawValue(indices[1]);\n valueAnimation && (value = modelUtil.interpolateRawValues(data, precision, startValue, endValue, dataIndexRange.t));\n }\n animationRecord.lastFrameIndex = indices[0];\n } else {\n // If diff <= 0, which is the range is not found(Include NaN)\n // Choose the first point or last point.\n var idx = percent === 1 || animationRecord.lastFrameIndex > 0 ? indices[0] : 0;\n var pt = getPointAtIndex(points, idx);\n valueAnimation && (value = seriesModel.getRawValue(idx));\n endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n }\n if (valueAnimation) {\n var inner = labelInner(endLabel);\n if (typeof inner.setLabelText === 'function') {\n inner.setLabelText(value);\n }\n }\n }\n };\n /**\n * @private\n */\n // FIXME Two value axis\n LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls) {\n var polyline = this._polyline;\n var polygon = this._polygon;\n var seriesModel = data.hostModel;\n var diff = lineAnimationDiff(this._data, data, this._stackedOnPoints, stackedOnPoints, this._coordSys, coordSys, this._valueOrigin, valueOrigin);\n var current = diff.current;\n var stackedOnCurrent = diff.stackedOnCurrent;\n var next = diff.next;\n var stackedOnNext = diff.stackedOnNext;\n if (step) {\n // TODO If stacked series is not step\n current = turnPointsIntoStep(diff.current, coordSys, step, connectNulls);\n stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step, connectNulls);\n next = turnPointsIntoStep(diff.next, coordSys, step, connectNulls);\n stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step, connectNulls);\n }\n // Don't apply animation if diff is large.\n // For better result and avoid memory explosion problems like\n // https://github.com/apache/incubator-echarts/issues/12229\n if (getBoundingDiff(current, next) > 3000 || polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000) {\n polyline.stopAnimation();\n polyline.setShape({\n points: next\n });\n if (polygon) {\n polygon.stopAnimation();\n polygon.setShape({\n points: next,\n stackedOnPoints: stackedOnNext\n });\n }\n return;\n }\n polyline.shape.__points = diff.current;\n polyline.shape.points = current;\n var target = {\n shape: {\n points: next\n }\n };\n // Also animate the original points.\n // If points reference is changed when turning into step line.\n if (diff.current !== current) {\n target.shape.__points = diff.next;\n }\n // Stop previous animation.\n polyline.stopAnimation();\n graphic.updateProps(polyline, target, seriesModel);\n if (polygon) {\n polygon.setShape({\n // Reuse the points with polyline.\n points: current,\n stackedOnPoints: stackedOnCurrent\n });\n polygon.stopAnimation();\n graphic.updateProps(polygon, {\n shape: {\n stackedOnPoints: stackedOnNext\n }\n }, seriesModel);\n // If use attr directly in updateProps.\n if (polyline.shape.points !== polygon.shape.points) {\n polygon.shape.points = polyline.shape.points;\n }\n }\n var updatedDataInfo = [];\n var diffStatus = diff.status;\n for (var i = 0; i < diffStatus.length; i++) {\n var cmd = diffStatus[i].cmd;\n if (cmd === '=') {\n var el = data.getItemGraphicEl(diffStatus[i].idx1);\n if (el) {\n updatedDataInfo.push({\n el: el,\n ptIdx: i // Index of points\n });\n }\n }\n }\n\n if (polyline.animators && polyline.animators.length) {\n polyline.animators[0].during(function () {\n polygon && polygon.dirtyShape();\n var points = polyline.shape.__points;\n for (var i = 0; i < updatedDataInfo.length; i++) {\n var el = updatedDataInfo[i].el;\n var offset = updatedDataInfo[i].ptIdx * 2;\n el.x = points[offset];\n el.y = points[offset + 1];\n el.markRedraw();\n }\n });\n }\n };\n LineView.prototype.remove = function (ecModel) {\n var group = this.group;\n var oldData = this._data;\n this._lineGroup.removeAll();\n this._symbolDraw.remove(true);\n // Remove temporary created elements when highlighting\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;\n };\n LineView.type = 'line';\n return LineView;\n}(ChartView);\nexport default LineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { map } from 'zrender/lib/core/util.js';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nimport { createFloat32Array } from '../util/vendor.js';\nexport default function pointsLayout(seriesType, forceStoreInTypedArray) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var useTypedArray = forceStoreInTypedArray || pipelineContext.large;\n if (!coordSys) {\n return;\n }\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0])) {\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1])) {\n dims[1] = stackResultDim;\n }\n var store = data.getStore();\n var dimIdx0 = data.getDimensionIndex(dims[0]);\n var dimIdx1 = data.getDimensionIndex(dims[1]);\n return dimLen && {\n progress: function (params, data) {\n var segCount = params.end - params.start;\n var points = useTypedArray && createFloat32Array(segCount * dimLen);\n var tmpIn = [];\n var tmpOut = [];\n for (var i = params.start, offset = 0; i < params.end; i++) {\n var point = void 0;\n if (dimLen === 1) {\n var x = store.get(dimIdx0, i);\n // NOTE: Make sure the second parameter is null to use default strategy.\n point = coordSys.dataToPoint(x, null, tmpOut);\n } else {\n tmpIn[0] = store.get(dimIdx0, i);\n tmpIn[1] = store.get(dimIdx1, i);\n // Let coordinate system to handle the NaN data.\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n if (useTypedArray) {\n points[offset++] = point[0];\n points[offset++] = point[1];\n } else {\n data.setItemLayout(i, point.slice());\n }\n }\n useTypedArray && data.setLayout('points', points);\n }\n };\n }\n };\n}\n;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\nvar samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n }\n // Return NaN if count is 0\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(min) ? min : NaN;\n },\n minmax: function (frame) {\n var turningPointAbsoluteValue = -Infinity;\n var turningPointOriginalValue = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n var originalValue = frame[i];\n var absoluteValue = Math.abs(originalValue);\n if (absoluteValue > turningPointAbsoluteValue) {\n turningPointAbsoluteValue = absoluteValue;\n turningPointOriginalValue = originalValue;\n }\n }\n return isFinite(turningPointOriginalValue) ? turningPointOriginalValue : NaN;\n },\n // TODO\n // Median\n nearest: function (frame) {\n return frame[0];\n }\n};\nvar indexSampler = function (frame) {\n return Math.round(frame.length / 2);\n};\nexport default function dataSample(seriesType) {\n return {\n seriesType: seriesType,\n // FIXME:TS never used, so comment it\n // modifyOutputEnd: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem;\n var count = data.count();\n // Only cartesian2d support down sampling. Disable it when there is few data.\n if (count > 10 && coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent();\n var dpr = api.getDevicePixelRatio();\n // Coordinste system has been resized\n var size = Math.abs(extent[1] - extent[0]) * (dpr || 1);\n var rate = Math.round(count / size);\n if (isFinite(rate) && rate > 1) {\n if (sampling === 'lttb') {\n seriesModel.setData(data.lttbDownSample(data.mapDimension(valueAxis.dim), 1 / rate));\n }\n var sampler = void 0;\n if (isString(sampling)) {\n sampler = samplers[sampling];\n } else if (isFunction(sampling)) {\n sampler = sampling;\n }\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler));\n }\n }\n }\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LineSeries from './LineSeries.js';\nimport LineView from './LineView.js';\n// In case developer forget to include grid component\nimport layoutPoints from '../../layout/points.js';\nimport dataSample from '../../processor/dataSample.js';\nexport function install(registers) {\n registers.registerChartView(LineView);\n registers.registerSeriesModel(LineSeries);\n registers.registerLayout(layoutPoints('line', true));\n registers.registerVisual({\n seriesType: 'line',\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n // Visual coding for legend\n var lineStyle = seriesModel.getModel('lineStyle').getLineStyle();\n if (lineStyle && !lineStyle.stroke) {\n // Fill in visual should be palette color if\n // has color callback\n lineStyle.stroke = data.getVisual('style').fill;\n }\n data.setVisual('legendLineStyle', lineStyle);\n }\n });\n // Down sample after filter\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('line'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { each } from 'zrender/lib/core/util.js';\nvar BaseBarSeriesModel = /** @class */function (_super) {\n __extends(BaseBarSeriesModel, _super);\n function BaseBarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BaseBarSeriesModel.type;\n return _this;\n }\n BaseBarSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n BaseBarSeriesModel.prototype.getMarkerPosition = function (value, dims, startingAtTick) {\n var coordSys = this.coordinateSystem;\n if (coordSys && coordSys.clampData) {\n // PENDING if clamp ?\n var clampData_1 = coordSys.clampData(value);\n var pt_1 = coordSys.dataToPoint(clampData_1);\n if (startingAtTick) {\n each(coordSys.getAxes(), function (axis, idx) {\n // If axis type is category, use tick coords instead\n if (axis.type === 'category' && dims != null) {\n var tickCoords = axis.getTicksCoords();\n var alignTicksWithLabel = axis.getTickModel().get('alignWithLabel');\n var targetTickId = clampData_1[idx];\n // The index of rightmost tick of markArea is 1 larger than x1/y1 index\n var isEnd = dims[idx] === 'x1' || dims[idx] === 'y1';\n if (isEnd && !alignTicksWithLabel) {\n targetTickId += 1;\n }\n // The only contains one tick, tickCoords is\n // like [{coord: 0, tickValue: 0}, {coord: 0}]\n // to the length should always be larger than 1\n if (tickCoords.length < 2) {\n return;\n } else if (tickCoords.length === 2) {\n // The left value and right value of the axis are\n // the same. coord is 0 in both items. Use the max\n // value of the axis as the coord\n pt_1[idx] = axis.toGlobalCoord(axis.getExtent()[isEnd ? 1 : 0]);\n return;\n }\n var leftCoord = void 0;\n var coord = void 0;\n var stepTickValue = 1;\n for (var i = 0; i < tickCoords.length; i++) {\n var tickCoord = tickCoords[i].coord;\n // The last item of tickCoords doesn't contain\n // tickValue\n var tickValue = i === tickCoords.length - 1 ? tickCoords[i - 1].tickValue + stepTickValue : tickCoords[i].tickValue;\n if (tickValue === targetTickId) {\n coord = tickCoord;\n break;\n } else if (tickValue < targetTickId) {\n leftCoord = tickCoord;\n } else if (leftCoord != null && tickValue > targetTickId) {\n coord = (tickCoord + leftCoord) / 2;\n break;\n }\n if (i === 1) {\n // Here we assume the step of category axes is\n // the same\n stepTickValue = tickValue - tickCoords[0].tickValue;\n }\n }\n if (coord == null) {\n if (!leftCoord) {\n // targetTickId is smaller than all tick ids in the\n // visible area, use the leftmost tick coord\n coord = tickCoords[0].coord;\n } else if (leftCoord) {\n // targetTickId is larger than all tick ids in the\n // visible area, use the rightmost tick coord\n coord = tickCoords[tickCoords.length - 1].coord;\n }\n }\n pt_1[idx] = axis.toGlobalCoord(coord);\n }\n });\n } else {\n var data = this.getData();\n var offset = data.getLayout('offset');\n var size = data.getLayout('size');\n var offsetIndex = coordSys.getBaseAxis().isHorizontal() ? 0 : 1;\n pt_1[offsetIndex] += offset + size / 2;\n }\n return pt_1;\n }\n return [NaN, NaN];\n };\n BaseBarSeriesModel.type = 'series.__base_bar__';\n BaseBarSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n // stack: null\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n barMinHeight: 0,\n barMinAngle: 0,\n // cursor: null,\n large: false,\n largeThreshold: 400,\n progressive: 3e3,\n progressiveChunkMode: 'mod'\n };\n return BaseBarSeriesModel;\n}(SeriesModel);\nSeriesModel.registerClass(BaseBarSeriesModel);\nexport default BaseBarSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseBarSeriesModel from './BaseBarSeries.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar BarSeriesModel = /** @class */function (_super) {\n __extends(BarSeriesModel, _super);\n function BarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BarSeriesModel.type;\n return _this;\n }\n BarSeriesModel.prototype.getInitialData = function () {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true,\n createInvertedIndices: !!this.get('realtimeSort', true) || null\n });\n };\n /**\n * @override\n */\n BarSeriesModel.prototype.getProgressive = function () {\n // Do not support progressive in normal mode.\n return this.get('large') ? this.get('progressive') : false;\n };\n /**\n * @override\n */\n BarSeriesModel.prototype.getProgressiveThreshold = function () {\n // Do not support progressive in normal mode.\n var progressiveThreshold = this.get('progressiveThreshold');\n var largeThreshold = this.get('largeThreshold');\n if (largeThreshold > progressiveThreshold) {\n progressiveThreshold = largeThreshold;\n }\n return progressiveThreshold;\n };\n BarSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.rect(data.getItemLayout(dataIndex));\n };\n BarSeriesModel.type = 'series.bar';\n BarSeriesModel.dependencies = ['grid', 'polar'];\n BarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeriesModel.defaultOption, {\n // If clipped\n // Only available on cartesian2d\n clip: true,\n roundCap: false,\n showBackground: false,\n backgroundStyle: {\n color: 'rgba(180, 180, 180, 0.2)',\n borderColor: null,\n borderWidth: 0,\n borderType: 'solid',\n borderRadius: 0,\n shadowBlur: 0,\n shadowColor: null,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n realtimeSort: false\n });\n return BarSeriesModel;\n}(BaseBarSeriesModel);\nexport default BarSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { Path } from '../graphic.js';\n/**\n * Sausage: similar to sector, but have half circle on both sides\n */\nvar SausageShape = /** @class */function () {\n function SausageShape() {\n this.cx = 0;\n this.cy = 0;\n this.r0 = 0;\n this.r = 0;\n this.startAngle = 0;\n this.endAngle = Math.PI * 2;\n this.clockwise = true;\n }\n return SausageShape;\n}();\nvar SausagePath = /** @class */function (_super) {\n __extends(SausagePath, _super);\n function SausagePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'sausage';\n return _this;\n }\n SausagePath.prototype.getDefaultShape = function () {\n return new SausageShape();\n };\n SausagePath.prototype.buildPath = function (ctx, shape) {\n var cx = shape.cx;\n var cy = shape.cy;\n var r0 = Math.max(shape.r0 || 0, 0);\n var r = Math.max(shape.r, 0);\n var dr = (r - r0) * 0.5;\n var rCenter = r0 + dr;\n var startAngle = shape.startAngle;\n var endAngle = shape.endAngle;\n var clockwise = shape.clockwise;\n var PI2 = Math.PI * 2;\n var lessThanCircle = clockwise ? endAngle - startAngle < PI2 : startAngle - endAngle < PI2;\n if (!lessThanCircle) {\n // Normalize angles\n startAngle = endAngle - (clockwise ? PI2 : -PI2);\n }\n var unitStartX = Math.cos(startAngle);\n var unitStartY = Math.sin(startAngle);\n var unitEndX = Math.cos(endAngle);\n var unitEndY = Math.sin(endAngle);\n if (lessThanCircle) {\n ctx.moveTo(unitStartX * r0 + cx, unitStartY * r0 + cy);\n ctx.arc(unitStartX * rCenter + cx, unitStartY * rCenter + cy, dr, -Math.PI + startAngle, startAngle, !clockwise);\n } else {\n ctx.moveTo(unitStartX * r + cx, unitStartY * r + cy);\n }\n ctx.arc(cx, cy, r, startAngle, endAngle, !clockwise);\n ctx.arc(unitEndX * rCenter + cx, unitEndY * rCenter + cy, dr, endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise);\n if (r0 !== 0) {\n ctx.arc(cx, cy, r0, endAngle, startAngle, clockwise);\n }\n // ctx.closePath();\n };\n\n return SausagePath;\n}(Path);\nexport default SausagePath;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { calculateTextPosition } from 'zrender/lib/contain/text.js';\nimport { isArray, isNumber } from 'zrender/lib/core/util.js';\nexport function createSectorCalculateTextPosition(positionMapping, opts) {\n opts = opts || {};\n var isRoundCap = opts.isRoundCap;\n return function (out, opts, boundingRect) {\n var textPosition = opts.position;\n if (!textPosition || textPosition instanceof Array) {\n return calculateTextPosition(out, opts, boundingRect);\n }\n var mappedSectorPosition = positionMapping(textPosition);\n var distance = opts.distance != null ? opts.distance : 5;\n var sector = this.shape;\n var cx = sector.cx;\n var cy = sector.cy;\n var r = sector.r;\n var r0 = sector.r0;\n var middleR = (r + r0) / 2;\n var startAngle = sector.startAngle;\n var endAngle = sector.endAngle;\n var middleAngle = (startAngle + endAngle) / 2;\n var extraDist = isRoundCap ? Math.abs(r - r0) / 2 : 0;\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n // base position: top-left\n var x = cx + r * mathCos(startAngle);\n var y = cy + r * mathSin(startAngle);\n var textAlign = 'left';\n var textVerticalAlign = 'top';\n switch (mappedSectorPosition) {\n case 'startArc':\n x = cx + (r0 - distance) * mathCos(middleAngle);\n y = cy + (r0 - distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'top';\n break;\n case 'insideStartArc':\n x = cx + (r0 + distance) * mathCos(middleAngle);\n y = cy + (r0 + distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'startAngle':\n x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, distance + extraDist, false);\n y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, distance + extraDist, false);\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n case 'insideStartAngle':\n x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, -distance + extraDist, false);\n y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, -distance + extraDist, false);\n textAlign = 'left';\n textVerticalAlign = 'middle';\n break;\n case 'middle':\n x = cx + middleR * mathCos(middleAngle);\n y = cy + middleR * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'middle';\n break;\n case 'endArc':\n x = cx + (r + distance) * mathCos(middleAngle);\n y = cy + (r + distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'insideEndArc':\n x = cx + (r - distance) * mathCos(middleAngle);\n y = cy + (r - distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'top';\n break;\n case 'endAngle':\n x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, distance + extraDist, true);\n y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, distance + extraDist, true);\n textAlign = 'left';\n textVerticalAlign = 'middle';\n break;\n case 'insideEndAngle':\n x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, -distance + extraDist, true);\n y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, -distance + extraDist, true);\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n default:\n return calculateTextPosition(out, opts, boundingRect);\n }\n out = out || {};\n out.x = x;\n out.y = y;\n out.align = textAlign;\n out.verticalAlign = textVerticalAlign;\n return out;\n };\n}\nexport function setSectorTextRotation(sector, textPosition, positionMapping, rotateType) {\n if (isNumber(rotateType)) {\n // user-set rotation\n sector.setTextConfig({\n rotation: rotateType\n });\n return;\n } else if (isArray(textPosition)) {\n // user-set position, use 0 as auto rotation\n sector.setTextConfig({\n rotation: 0\n });\n return;\n }\n var shape = sector.shape;\n var startAngle = shape.clockwise ? shape.startAngle : shape.endAngle;\n var endAngle = shape.clockwise ? shape.endAngle : shape.startAngle;\n var middleAngle = (startAngle + endAngle) / 2;\n var anchorAngle;\n var mappedSectorPosition = positionMapping(textPosition);\n switch (mappedSectorPosition) {\n case 'startArc':\n case 'insideStartArc':\n case 'middle':\n case 'insideEndArc':\n case 'endArc':\n anchorAngle = middleAngle;\n break;\n case 'startAngle':\n case 'insideStartAngle':\n anchorAngle = startAngle;\n break;\n case 'endAngle':\n case 'insideEndAngle':\n anchorAngle = endAngle;\n break;\n default:\n sector.setTextConfig({\n rotation: 0\n });\n return;\n }\n var rotate = Math.PI * 1.5 - anchorAngle;\n /**\n * TODO: labels with rotate > Math.PI / 2 should be rotate another\n * half round flipped to increase readability. However, only middle\n * position supports this for now, because in other positions, the\n * anchor point is not at the center of the text, so the positions\n * after rotating is not as expected.\n */\n if (mappedSectorPosition === 'middle' && rotate > Math.PI / 2 && rotate < Math.PI * 1.5) {\n rotate -= Math.PI;\n }\n sector.setTextConfig({\n rotation: rotate\n });\n}\nfunction adjustAngleDistanceX(angle, distance, isEnd) {\n return distance * Math.sin(angle) * (isEnd ? -1 : 1);\n}\nfunction adjustAngleDistanceY(angle, distance, isEnd) {\n return distance * Math.cos(angle) * (isEnd ? 1 : -1);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray, map } from 'zrender/lib/core/util.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nexport function getSectorCornerRadius(model, shape, zeroIfNull) {\n var cornerRadius = model.get('borderRadius');\n if (cornerRadius == null) {\n return zeroIfNull ? {\n cornerRadius: 0\n } : null;\n }\n if (!isArray(cornerRadius)) {\n cornerRadius = [cornerRadius, cornerRadius, cornerRadius, cornerRadius];\n }\n var dr = Math.abs(shape.r || 0 - shape.r0 || 0);\n return {\n cornerRadius: map(cornerRadius, function (cr) {\n return parsePercent(cr, dr);\n })\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Path from 'zrender/lib/graphic/Path.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport { extend, each, map } from 'zrender/lib/core/util.js';\nimport { Rect, Sector, updateProps, initProps, removeElementWithFadeOut, traverseElements } from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels, setLabelValueAnimation, labelInner } from '../../label/labelStyle.js';\nimport { throttle } from '../../util/throttle.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport Sausage from '../../util/shape/sausage.js';\nimport ChartView from '../../view/Chart.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper.js';\nimport { warn } from '../../util/log.js';\nimport { createSectorCalculateTextPosition, setSectorTextRotation } from '../../label/sectorLabel.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nfunction getClipArea(coord, data) {\n var coordSysClipArea = coord.getArea && coord.getArea();\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var baseAxis = coord.getBaseAxis();\n // When boundaryGap is false or using time axis. bar may exceed the grid.\n // We should not clip this part.\n // See test/bar2.html\n if (baseAxis.type !== 'category' || !baseAxis.onBand) {\n var expandWidth = data.getLayout('bandWidth');\n if (baseAxis.isHorizontal()) {\n coordSysClipArea.x -= expandWidth;\n coordSysClipArea.width += expandWidth * 2;\n } else {\n coordSysClipArea.y -= expandWidth;\n coordSysClipArea.height += expandWidth * 2;\n }\n }\n }\n return coordSysClipArea;\n}\nvar BarView = /** @class */function (_super) {\n __extends(BarView, _super);\n function BarView() {\n var _this = _super.call(this) || this;\n _this.type = BarView.type;\n _this._isFirstFrame = true;\n return _this;\n }\n BarView.prototype.render = function (seriesModel, ecModel, api, payload) {\n this._model = seriesModel;\n this._removeOnRenderedListener(api);\n this._updateDrawMode(seriesModel);\n var coordinateSystemType = seriesModel.get('coordinateSystem');\n if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') {\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n this._isLargeDraw ? this._renderLarge(seriesModel, ecModel, api) : this._renderNormal(seriesModel, ecModel, api, payload);\n } else if (process.env.NODE_ENV !== 'production') {\n warn('Only cartesian2d and polar supported for bar.');\n }\n };\n BarView.prototype.incrementalPrepareRender = function (seriesModel) {\n this._clear();\n this._updateDrawMode(seriesModel);\n // incremental also need to clip, otherwise might be overlow.\n // But must not set clip in each frame, otherwise all of the children will be marked redraw.\n this._updateLargeClip(seriesModel);\n };\n BarView.prototype.incrementalRender = function (params, seriesModel) {\n // Reset\n this._progressiveEls = [];\n // Do not support progressive in normal mode.\n this._incrementalRenderLarge(params, seriesModel);\n };\n BarView.prototype.eachRendered = function (cb) {\n traverseElements(this._progressiveEls || this.group, cb);\n };\n BarView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n this._clear();\n }\n };\n BarView.prototype._renderNormal = function (seriesModel, ecModel, api, payload) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n var coord = seriesModel.coordinateSystem;\n var baseAxis = coord.getBaseAxis();\n var isHorizontalOrRadial;\n if (coord.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n } else if (coord.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n }\n var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null;\n var realtimeSortCfg = shouldRealtimeSort(seriesModel, coord);\n if (realtimeSortCfg) {\n this._enableRealtimeSort(realtimeSortCfg, data, api);\n }\n var needsClip = seriesModel.get('clip', true) || realtimeSortCfg;\n var coordSysClipArea = getClipArea(coord, data);\n // If there is clipPath created in large mode. Remove it.\n group.removeClipPath();\n // We don't use clipPath in normal mode because we needs a perfect animation\n // And don't want the label are clipped.\n var roundCap = seriesModel.get('roundCap', true);\n var drawBackground = seriesModel.get('showBackground', true);\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var barBorderRadius = backgroundModel.get('borderRadius') || 0;\n var bgEls = [];\n var oldBgEls = this._backgroundEls;\n var isInitSort = payload && payload.isInitSort;\n var isChangeOrder = payload && payload.type === 'changeAxisOrder';\n function createBackground(dataIndex) {\n var bgLayout = getLayout[coord.type](data, dataIndex);\n var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);\n bgEl.useStyle(backgroundModel.getItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n } else {\n bgEl.setShape('cornerRadius', barBorderRadius);\n }\n bgEls[dataIndex] = bgEl;\n return bgEl;\n }\n ;\n data.diff(oldData).add(function (dataIndex) {\n var itemModel = data.getItemModel(dataIndex);\n var layout = getLayout[coord.type](data, dataIndex, itemModel);\n if (drawBackground) {\n createBackground(dataIndex);\n }\n // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in \"axisProxy\".\n if (!data.hasValue(dataIndex) || !isValidLayout[coord.type](layout)) {\n return;\n }\n var isClipped = false;\n if (needsClip) {\n // Clip will modify the layout params.\n // And return a boolean to determine if the shape are fully clipped.\n isClipped = clip[coord.type](coordSysClipArea, layout);\n }\n var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap);\n if (realtimeSortCfg) {\n /**\n * Force label animation because even if the element is\n * ignored because it's clipped, it may not be clipped after\n * changing order. Then, if not using forceLabelAnimation,\n * the label animation was never started, in which case,\n * the label will be the final value and doesn't have label\n * animation.\n */\n el.forceLabelAnimation = true;\n }\n updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n if (isInitSort) {\n el.attr({\n shape: layout\n });\n } else if (realtimeSortCfg) {\n updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, dataIndex, isHorizontalOrRadial, false, false);\n } else {\n initProps(el, {\n shape: layout\n }, seriesModel, dataIndex);\n }\n data.setItemGraphicEl(dataIndex, el);\n group.add(el);\n el.ignore = isClipped;\n }).update(function (newIndex, oldIndex) {\n var itemModel = data.getItemModel(newIndex);\n var layout = getLayout[coord.type](data, newIndex, itemModel);\n if (drawBackground) {\n var bgEl = void 0;\n if (oldBgEls.length === 0) {\n bgEl = createBackground(oldIndex);\n } else {\n bgEl = oldBgEls[oldIndex];\n bgEl.useStyle(backgroundModel.getItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n } else {\n bgEl.setShape('cornerRadius', barBorderRadius);\n }\n bgEls[newIndex] = bgEl;\n }\n var bgLayout = getLayout[coord.type](data, newIndex);\n var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);\n updateProps(bgEl, {\n shape: shape\n }, animationModel, newIndex);\n }\n var el = oldData.getItemGraphicEl(oldIndex);\n if (!data.hasValue(newIndex) || !isValidLayout[coord.type](layout)) {\n group.remove(el);\n return;\n }\n var isClipped = false;\n if (needsClip) {\n isClipped = clip[coord.type](coordSysClipArea, layout);\n if (isClipped) {\n group.remove(el);\n }\n }\n if (!el) {\n el = elementCreator[coord.type](seriesModel, data, newIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, !!el, roundCap);\n } else {\n saveOldStyle(el);\n }\n if (realtimeSortCfg) {\n el.forceLabelAnimation = true;\n }\n if (isChangeOrder) {\n var textEl = el.getTextContent();\n if (textEl) {\n var labelInnerStore = labelInner(textEl);\n if (labelInnerStore.prevValue != null) {\n /**\n * Set preValue to be value so that no new label\n * should be started, otherwise, it will take a full\n * `animationDurationUpdate` time to finish the\n * animation, which is not expected.\n */\n labelInnerStore.prevValue = labelInnerStore.value;\n }\n }\n }\n // Not change anything if only order changed.\n // Especially not change label.\n else {\n updateStyle(el, data, newIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n }\n if (isInitSort) {\n el.attr({\n shape: layout\n });\n } else if (realtimeSortCfg) {\n updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, newIndex, isHorizontalOrRadial, true, isChangeOrder);\n } else {\n updateProps(el, {\n shape: layout\n }, seriesModel, newIndex, null);\n }\n data.setItemGraphicEl(newIndex, el);\n el.ignore = isClipped;\n group.add(el);\n }).remove(function (dataIndex) {\n var el = oldData.getItemGraphicEl(dataIndex);\n el && removeElementWithFadeOut(el, seriesModel, dataIndex);\n }).execute();\n var bgGroup = this._backgroundGroup || (this._backgroundGroup = new Group());\n bgGroup.removeAll();\n for (var i = 0; i < bgEls.length; ++i) {\n bgGroup.add(bgEls[i]);\n }\n group.add(bgGroup);\n this._backgroundEls = bgEls;\n this._data = data;\n };\n BarView.prototype._renderLarge = function (seriesModel, ecModel, api) {\n this._clear();\n createLarge(seriesModel, this.group);\n this._updateLargeClip(seriesModel);\n };\n BarView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n this._removeBackground();\n createLarge(seriesModel, this.group, this._progressiveEls, true);\n };\n BarView.prototype._updateLargeClip = function (seriesModel) {\n // Use clipPath in large mode.\n var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);\n var group = this.group;\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n };\n BarView.prototype._enableRealtimeSort = function (realtimeSortCfg, data, api) {\n var _this = this;\n // If no data in the first frame, wait for data to initSort\n if (!data.count()) {\n return;\n }\n var baseAxis = realtimeSortCfg.baseAxis;\n if (this._isFirstFrame) {\n this._dispatchInitSort(data, realtimeSortCfg, api);\n this._isFirstFrame = false;\n } else {\n var orderMapping_1 = function (idx) {\n var el = data.getItemGraphicEl(idx);\n var shape = el && el.shape;\n return shape &&\n // The result should be consistent with the initial sort by data value.\n // Do not support the case that both positive and negative exist.\n Math.abs(baseAxis.isHorizontal() ? shape.height : shape.width)\n // If data is NaN, shape.xxx may be NaN, so use || 0 here in case\n || 0;\n };\n this._onRendered = function () {\n _this._updateSortWithinSameData(data, orderMapping_1, baseAxis, api);\n };\n api.getZr().on('rendered', this._onRendered);\n }\n };\n BarView.prototype._dataSort = function (data, baseAxis, orderMapping) {\n var info = [];\n data.each(data.mapDimension(baseAxis.dim), function (ordinalNumber, dataIdx) {\n var mappedValue = orderMapping(dataIdx);\n mappedValue = mappedValue == null ? NaN : mappedValue;\n info.push({\n dataIndex: dataIdx,\n mappedValue: mappedValue,\n ordinalNumber: ordinalNumber\n });\n });\n info.sort(function (a, b) {\n // If NaN, it will be treated as min val.\n return b.mappedValue - a.mappedValue;\n });\n return {\n ordinalNumbers: map(info, function (item) {\n return item.ordinalNumber;\n })\n };\n };\n BarView.prototype._isOrderChangedWithinSameData = function (data, orderMapping, baseAxis) {\n var scale = baseAxis.scale;\n var ordinalDataDim = data.mapDimension(baseAxis.dim);\n var lastValue = Number.MAX_VALUE;\n for (var tickNum = 0, len = scale.getOrdinalMeta().categories.length; tickNum < len; ++tickNum) {\n var rawIdx = data.rawIndexOf(ordinalDataDim, scale.getRawOrdinalNumber(tickNum));\n var value = rawIdx < 0\n // If some tick have no bar, the tick will be treated as min.\n ? Number.MIN_VALUE\n // PENDING: if dataZoom on baseAxis exits, is it a performance issue?\n : orderMapping(data.indexOfRawIndex(rawIdx));\n if (value > lastValue) {\n return true;\n }\n lastValue = value;\n }\n return false;\n };\n /*\n * Consider the case when A and B changed order, whose representing\n * bars are both out of sight, we don't wish to trigger reorder action\n * as long as the order in the view doesn't change.\n */\n BarView.prototype._isOrderDifferentInView = function (orderInfo, baseAxis) {\n var scale = baseAxis.scale;\n var extent = scale.getExtent();\n var tickNum = Math.max(0, extent[0]);\n var tickMax = Math.min(extent[1], scale.getOrdinalMeta().categories.length - 1);\n for (; tickNum <= tickMax; ++tickNum) {\n if (orderInfo.ordinalNumbers[tickNum] !== scale.getRawOrdinalNumber(tickNum)) {\n return true;\n }\n }\n };\n BarView.prototype._updateSortWithinSameData = function (data, orderMapping, baseAxis, api) {\n if (!this._isOrderChangedWithinSameData(data, orderMapping, baseAxis)) {\n return;\n }\n var sortInfo = this._dataSort(data, baseAxis, orderMapping);\n if (this._isOrderDifferentInView(sortInfo, baseAxis)) {\n this._removeOnRenderedListener(api);\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n axisId: baseAxis.index,\n sortInfo: sortInfo\n });\n }\n };\n BarView.prototype._dispatchInitSort = function (data, realtimeSortCfg, api) {\n var baseAxis = realtimeSortCfg.baseAxis;\n var sortResult = this._dataSort(data, baseAxis, function (dataIdx) {\n return data.get(data.mapDimension(realtimeSortCfg.otherAxis.dim), dataIdx);\n });\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n isInitSort: true,\n axisId: baseAxis.index,\n sortInfo: sortResult\n });\n };\n BarView.prototype.remove = function (ecModel, api) {\n this._clear(this._model);\n this._removeOnRenderedListener(api);\n };\n BarView.prototype.dispose = function (ecModel, api) {\n this._removeOnRenderedListener(api);\n };\n BarView.prototype._removeOnRenderedListener = function (api) {\n if (this._onRendered) {\n api.getZr().off('rendered', this._onRendered);\n this._onRendered = null;\n }\n };\n BarView.prototype._clear = function (model) {\n var group = this.group;\n var data = this._data;\n if (model && model.isAnimationEnabled() && data && !this._isLargeDraw) {\n this._removeBackground();\n this._backgroundEls = [];\n data.eachItemGraphicEl(function (el) {\n removeElementWithFadeOut(el, model, getECData(el).dataIndex);\n });\n } else {\n group.removeAll();\n }\n this._data = null;\n this._isFirstFrame = true;\n };\n BarView.prototype._removeBackground = function () {\n this.group.remove(this._backgroundGroup);\n this._backgroundGroup = null;\n };\n BarView.type = 'bar';\n return BarView;\n}(ChartView);\nvar clip = {\n cartesian2d: function (coordSysBoundingRect, layout) {\n var signWidth = layout.width < 0 ? -1 : 1;\n var signHeight = layout.height < 0 ? -1 : 1;\n // Needs positive width and height\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n var coordSysX2 = coordSysBoundingRect.x + coordSysBoundingRect.width;\n var coordSysY2 = coordSysBoundingRect.y + coordSysBoundingRect.height;\n var x = mathMax(layout.x, coordSysBoundingRect.x);\n var x2 = mathMin(layout.x + layout.width, coordSysX2);\n var y = mathMax(layout.y, coordSysBoundingRect.y);\n var y2 = mathMin(layout.y + layout.height, coordSysY2);\n var xClipped = x2 < x;\n var yClipped = y2 < y;\n // When xClipped or yClipped, the element will be marked as `ignore`.\n // But we should also place the element at the edge of the coord sys bounding rect.\n // Because if data changed and the bar shows again, its transition animation\n // will begin at this place.\n layout.x = xClipped && x > coordSysX2 ? x2 : x;\n layout.y = yClipped && y > coordSysY2 ? y2 : y;\n layout.width = xClipped ? 0 : x2 - x;\n layout.height = yClipped ? 0 : y2 - y;\n // Reverse back\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n return xClipped || yClipped;\n },\n polar: function (coordSysClipArea, layout) {\n var signR = layout.r0 <= layout.r ? 1 : -1;\n // Make sure r is larger than r0\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\n }\n var r = mathMin(layout.r, coordSysClipArea.r);\n var r0 = mathMax(layout.r0, coordSysClipArea.r0);\n layout.r = r;\n layout.r0 = r0;\n var clipped = r - r0 < 0;\n // Reverse back\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\n }\n return clipped;\n }\n};\nvar elementCreator = {\n cartesian2d: function (seriesModel, data, newIndex, layout, isHorizontal, animationModel, axisModel, isUpdate, roundCap) {\n var rect = new Rect({\n shape: extend({}, layout),\n z2: 1\n });\n rect.__dataIndex = newIndex;\n rect.name = 'item';\n if (animationModel) {\n var rectShape = rect.shape;\n var animateProperty = isHorizontal ? 'height' : 'width';\n rectShape[animateProperty] = 0;\n }\n return rect;\n },\n polar: function (seriesModel, data, newIndex, layout, isRadial, animationModel, axisModel, isUpdate, roundCap) {\n var ShapeClass = !isRadial && roundCap ? Sausage : Sector;\n var sector = new ShapeClass({\n shape: layout,\n z2: 1\n });\n sector.name = 'item';\n var positionMap = createPolarPositionMapping(isRadial);\n sector.calculateTextPosition = createSectorCalculateTextPosition(positionMap, {\n isRoundCap: ShapeClass === Sausage\n });\n // Animation\n if (animationModel) {\n var sectorShape = sector.shape;\n var animateProperty = isRadial ? 'r' : 'endAngle';\n var animateTarget = {};\n sectorShape[animateProperty] = isRadial ? layout.r0 : layout.startAngle;\n animateTarget[animateProperty] = layout[animateProperty];\n (isUpdate ? updateProps : initProps)(sector, {\n shape: animateTarget\n // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue\n }, animationModel);\n }\n return sector;\n }\n};\nfunction shouldRealtimeSort(seriesModel, coordSys) {\n var realtimeSortOption = seriesModel.get('realtimeSort', true);\n var baseAxis = coordSys.getBaseAxis();\n if (process.env.NODE_ENV !== 'production') {\n if (realtimeSortOption) {\n if (baseAxis.type !== 'category') {\n warn('`realtimeSort` will not work because this bar series is not based on a category axis.');\n }\n if (coordSys.type !== 'cartesian2d') {\n warn('`realtimeSort` will not work because this bar series is not on cartesian2d.');\n }\n }\n }\n if (realtimeSortOption && baseAxis.type === 'category' && coordSys.type === 'cartesian2d') {\n return {\n baseAxis: baseAxis,\n otherAxis: coordSys.getOtherAxis(baseAxis)\n };\n }\n}\nfunction updateRealtimeAnimation(realtimeSortCfg, seriesAnimationModel, el, layout, newIndex, isHorizontal, isUpdate, isChangeOrder) {\n var seriesTarget;\n var axisTarget;\n if (isHorizontal) {\n axisTarget = {\n x: layout.x,\n width: layout.width\n };\n seriesTarget = {\n y: layout.y,\n height: layout.height\n };\n } else {\n axisTarget = {\n y: layout.y,\n height: layout.height\n };\n seriesTarget = {\n x: layout.x,\n width: layout.width\n };\n }\n if (!isChangeOrder) {\n // Keep the original growth animation if only axis order changed.\n // Not start a new animation.\n (isUpdate ? updateProps : initProps)(el, {\n shape: seriesTarget\n }, seriesAnimationModel, newIndex, null);\n }\n var axisAnimationModel = seriesAnimationModel ? realtimeSortCfg.baseAxis.model : null;\n (isUpdate ? updateProps : initProps)(el, {\n shape: axisTarget\n }, axisAnimationModel, newIndex);\n}\nfunction checkPropertiesNotValid(obj, props) {\n for (var i = 0; i < props.length; i++) {\n if (!isFinite(obj[props[i]])) {\n return true;\n }\n }\n return false;\n}\nvar rectPropties = ['x', 'y', 'width', 'height'];\nvar polarPropties = ['cx', 'cy', 'r', 'startAngle', 'endAngle'];\nvar isValidLayout = {\n cartesian2d: function (layout) {\n return !checkPropertiesNotValid(layout, rectPropties);\n },\n polar: function (layout) {\n return !checkPropertiesNotValid(layout, polarPropties);\n }\n};\nvar getLayout = {\n // itemModel is only used to get borderWidth, which is not needed\n // when calculating bar background layout.\n cartesian2d: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;\n // fix layout with lineWidth\n var signX = layout.width > 0 ? 1 : -1;\n var signY = layout.height > 0 ? 1 : -1;\n return {\n x: layout.x + signX * fixedLineWidth / 2,\n y: layout.y + signY * fixedLineWidth / 2,\n width: layout.width - signX * fixedLineWidth,\n height: layout.height - signY * fixedLineWidth\n };\n },\n polar: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n return {\n cx: layout.cx,\n cy: layout.cy,\n r0: layout.r0,\n r: layout.r,\n startAngle: layout.startAngle,\n endAngle: layout.endAngle,\n clockwise: layout.clockwise\n };\n }\n};\nfunction isZeroOnPolar(layout) {\n return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle;\n}\nfunction createPolarPositionMapping(isRadial) {\n return function (isRadial) {\n var arcOrAngle = isRadial ? 'Arc' : 'Angle';\n return function (position) {\n switch (position) {\n case 'start':\n case 'insideStart':\n case 'end':\n case 'insideEnd':\n return position + arcOrAngle;\n default:\n return position;\n }\n };\n }(isRadial);\n}\nfunction updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, isPolar) {\n var style = data.getItemVisual(dataIndex, 'style');\n if (!isPolar) {\n var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0;\n el.setShape('r', borderRadius);\n } else if (!seriesModel.get('roundCap')) {\n var sectorShape = el.shape;\n var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true);\n extend(sectorShape, cornerRadius);\n el.setShape(sectorShape);\n }\n el.useStyle(style);\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && el.attr('cursor', cursorStyle);\n var labelPositionOutside = isPolar ? isHorizontalOrRadial ? layout.r >= layout.r0 ? 'endArc' : 'startArc' : layout.endAngle >= layout.startAngle ? 'endAngle' : 'startAngle' : isHorizontalOrRadial ? layout.height >= 0 ? 'bottom' : 'top' : layout.width >= 0 ? 'right' : 'left';\n var labelStatesModels = getLabelStatesModels(itemModel);\n setLabelStyle(el, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: getDefaultLabel(seriesModel.getData(), dataIndex),\n inheritColor: style.fill,\n defaultOpacity: style.opacity,\n defaultOutsidePosition: labelPositionOutside\n });\n var label = el.getTextContent();\n if (isPolar && label) {\n var position = itemModel.get(['label', 'position']);\n el.textConfig.inside = position === 'middle' ? true : null;\n setSectorTextRotation(el, position === 'outside' ? labelPositionOutside : position, createPolarPositionMapping(isHorizontalOrRadial), itemModel.get(['label', 'rotate']));\n }\n setLabelValueAnimation(label, labelStatesModels, seriesModel.getRawValue(dataIndex), function (value) {\n return getDefaultInterpolatedLabel(data, value);\n });\n var emphasisModel = itemModel.getModel(['emphasis']);\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n setStatesStylesFromModel(el, itemModel);\n if (isZeroOnPolar(layout)) {\n el.style.fill = 'none';\n el.style.stroke = 'none';\n each(el.states, function (state) {\n if (state.style) {\n state.style.fill = state.style.stroke = 'none';\n }\n });\n }\n}\n// In case width or height are too small.\nfunction getLineWidth(itemModel, rawLayout) {\n // Has no border.\n var borderColor = itemModel.get(['itemStyle', 'borderColor']);\n if (!borderColor || borderColor === 'none') {\n return 0;\n }\n var lineWidth = itemModel.get(['itemStyle', 'borderWidth']) || 0;\n // width or height may be NaN for empty data\n var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width);\n var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height);\n return Math.min(lineWidth, width, height);\n}\nvar LagePathShape = /** @class */function () {\n function LagePathShape() {}\n return LagePathShape;\n}();\nvar LargePath = /** @class */function (_super) {\n __extends(LargePath, _super);\n function LargePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'largeBar';\n return _this;\n }\n LargePath.prototype.getDefaultShape = function () {\n return new LagePathShape();\n };\n LargePath.prototype.buildPath = function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n var baseDimIdx = this.baseDimIdx;\n var valueDimIdx = 1 - this.baseDimIdx;\n var startPoint = [];\n var size = [];\n var barWidth = this.barWidth;\n for (var i = 0; i < points.length; i += 3) {\n size[baseDimIdx] = barWidth;\n size[valueDimIdx] = points[i + 2];\n startPoint[baseDimIdx] = points[i + baseDimIdx];\n startPoint[valueDimIdx] = points[i + valueDimIdx];\n ctx.rect(startPoint[0], startPoint[1], size[0], size[1]);\n }\n };\n return LargePath;\n}(Path);\nfunction createLarge(seriesModel, group, progressiveEls, incremental) {\n // TODO support polar\n var data = seriesModel.getData();\n var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0;\n var largeDataIndices = data.getLayout('largeDataIndices');\n var barWidth = data.getLayout('size');\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var bgPoints = data.getLayout('largeBackgroundPoints');\n if (bgPoints) {\n var bgEl = new LargePath({\n shape: {\n points: bgPoints\n },\n incremental: !!incremental,\n silent: true,\n z2: 0\n });\n bgEl.baseDimIdx = baseDimIdx;\n bgEl.largeDataIndices = largeDataIndices;\n bgEl.barWidth = barWidth;\n bgEl.useStyle(backgroundModel.getItemStyle());\n group.add(bgEl);\n progressiveEls && progressiveEls.push(bgEl);\n }\n var el = new LargePath({\n shape: {\n points: data.getLayout('largePoints')\n },\n incremental: !!incremental,\n ignoreCoarsePointer: true,\n z2: 1\n });\n el.baseDimIdx = baseDimIdx;\n el.largeDataIndices = largeDataIndices;\n el.barWidth = barWidth;\n group.add(el);\n el.useStyle(data.getVisual('style'));\n // Enable tooltip and user mouse/touch event handlers.\n getECData(el).seriesIndex = seriesModel.seriesIndex;\n if (!seriesModel.get('silent')) {\n el.on('mousedown', largePathUpdateDataIndex);\n el.on('mousemove', largePathUpdateDataIndex);\n }\n progressiveEls && progressiveEls.push(el);\n}\n// Use throttle to avoid frequently traverse to find dataIndex.\nvar largePathUpdateDataIndex = throttle(function (event) {\n var largePath = this;\n var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY);\n getECData(largePath).dataIndex = dataIndex >= 0 ? dataIndex : null;\n}, 30, false);\nfunction largePathFindDataIndex(largePath, x, y) {\n var baseDimIdx = largePath.baseDimIdx;\n var valueDimIdx = 1 - baseDimIdx;\n var points = largePath.shape.points;\n var largeDataIndices = largePath.largeDataIndices;\n var startPoint = [];\n var size = [];\n var barWidth = largePath.barWidth;\n for (var i = 0, len = points.length / 3; i < len; i++) {\n var ii = i * 3;\n size[baseDimIdx] = barWidth;\n size[valueDimIdx] = points[ii + 2];\n startPoint[baseDimIdx] = points[ii + baseDimIdx];\n startPoint[valueDimIdx] = points[ii + valueDimIdx];\n if (size[valueDimIdx] < 0) {\n startPoint[valueDimIdx] += size[valueDimIdx];\n size[valueDimIdx] = -size[valueDimIdx];\n }\n if (x >= startPoint[0] && x <= startPoint[0] + size[0] && y >= startPoint[1] && y <= startPoint[1] + size[1]) {\n return largeDataIndices[i];\n }\n }\n return -1;\n}\nfunction createBackgroundShape(isHorizontalOrRadial, layout, coord) {\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var rectShape = layout;\n var coordLayout = coord.getArea();\n return {\n x: isHorizontalOrRadial ? rectShape.x : coordLayout.x,\n y: isHorizontalOrRadial ? coordLayout.y : rectShape.y,\n width: isHorizontalOrRadial ? rectShape.width : coordLayout.width,\n height: isHorizontalOrRadial ? coordLayout.height : rectShape.height\n };\n } else {\n var coordLayout = coord.getArea();\n var sectorShape = layout;\n return {\n cx: coordLayout.cx,\n cy: coordLayout.cy,\n r0: isHorizontalOrRadial ? coordLayout.r0 : sectorShape.r0,\n r: isHorizontalOrRadial ? coordLayout.r : sectorShape.r,\n startAngle: isHorizontalOrRadial ? sectorShape.startAngle : 0,\n endAngle: isHorizontalOrRadial ? sectorShape.endAngle : Math.PI * 2\n };\n }\n}\nfunction createBackgroundEl(coord, isHorizontalOrRadial, layout) {\n var ElementClz = coord.type === 'polar' ? Sector : Rect;\n return new ElementClz({\n shape: createBackgroundShape(isHorizontalOrRadial, layout, coord),\n silent: true,\n z2: 0\n });\n}\nexport default BarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { layout, createProgressiveLayout } from '../../layout/barGrid.js';\nimport dataSample from '../../processor/dataSample.js';\nimport BarSeries from './BarSeries.js';\nimport BarView from './BarView.js';\nexport function install(registers) {\n registers.registerChartView(BarView);\n registers.registerSeriesModel(BarSeries);\n registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar'));\n // Do layout after other overall layout, which can prepare some information.\n registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('bar'));\n // Down sample after filter\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('bar'));\n /**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n registers.registerAction({\n type: 'changeAxisOrder',\n event: 'changeAxisOrder',\n update: 'update'\n }, function (payload, ecModel) {\n var componentType = payload.componentType || 'series';\n ecModel.eachComponent({\n mainType: componentType,\n query: payload\n }, function (componentModel) {\n if (payload.sortInfo) {\n componentModel.axis.setCategorySortInfo(payload.sortInfo);\n }\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parsePercent, linearMap } from '../../util/number.js';\nimport * as layout from '../../util/layout.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { normalizeArcAngles } from 'zrender/lib/core/PathProxy.js';\nimport { makeInner } from '../../util/model.js';\nvar PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\nexport function getBasicPieLayout(seriesModel, api) {\n var viewRect = getViewRect(seriesModel, api);\n // center can be string or number when coordinateSystem is specified\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n var width = parsePercent(viewRect.width, api.getWidth());\n var height = parsePercent(viewRect.height, api.getHeight());\n var size = Math.min(width, height);\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var cx;\n var cy;\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys) {\n // percentage is not allowed when coordinate system is specified\n var point = coordSys.dataToPoint(center);\n cx = point[0] || 0;\n cy = point[1] || 0;\n } else {\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n cx = parsePercent(center[0], width) + viewRect.x;\n cy = parsePercent(center[1], height) + viewRect.y;\n }\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r\n };\n}\nexport default function pieLayout(seriesType, ecModel, api) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var viewRect = getViewRect(seriesModel, api);\n var _a = getBasicPieLayout(seriesModel, api),\n cx = _a.cx,\n cy = _a.cy,\n r = _a.r,\n r0 = _a.r0;\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var endAngle = seriesModel.get('endAngle');\n var padAngle = seriesModel.get('padAngle') * RADIAN;\n endAngle = endAngle === 'auto' ? startAngle - PI2 : -endAngle * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var minAndPadAngle = minAngle + padAngle;\n var validDataCount = 0;\n data.each(valueDim, function (value) {\n !isNaN(value) && validDataCount++;\n });\n var sum = data.getSum(valueDim);\n // Sum may be 0\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var clockwise = seriesModel.get('clockwise');\n var roseType = seriesModel.get('roseType');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum');\n // [0...max]\n var extent = data.getDataExtent(valueDim);\n extent[0] = 0;\n var dir = clockwise ? 1 : -1;\n var angles = [startAngle, endAngle];\n var halfPadAngle = dir * padAngle / 2;\n normalizeArcAngles(angles, !clockwise);\n startAngle = angles[0], endAngle = angles[1];\n var layoutData = getSeriesLayoutData(seriesModel);\n layoutData.startAngle = startAngle;\n layoutData.endAngle = endAngle;\n layoutData.clockwise = clockwise;\n var angleRange = Math.abs(endAngle - startAngle);\n // In the case some sector angle is smaller than minAngle\n var restAngle = angleRange;\n var valueSumLargerThanMinAngle = 0;\n var currentAngle = startAngle;\n data.setLayout({\n viewRect: viewRect,\n r: r\n });\n data.each(valueDim, function (value, idx) {\n var angle;\n if (isNaN(value)) {\n data.setItemLayout(idx, {\n angle: NaN,\n startAngle: NaN,\n endAngle: NaN,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? NaN : r\n });\n return;\n }\n // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样?\n if (roseType !== 'area') {\n angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n } else {\n angle = angleRange / validDataCount;\n }\n if (angle < minAndPadAngle) {\n angle = minAndPadAngle;\n restAngle -= minAndPadAngle;\n } else {\n valueSumLargerThanMinAngle += value;\n }\n var endAngle = currentAngle + dir * angle;\n // calculate display angle\n var actualStartAngle = 0;\n var actualEndAngle = 0;\n if (padAngle > angle) {\n actualStartAngle = currentAngle + dir * angle / 2;\n actualEndAngle = actualStartAngle;\n } else {\n actualStartAngle = currentAngle + halfPadAngle;\n actualEndAngle = endAngle - halfPadAngle;\n }\n data.setItemLayout(idx, {\n angle: angle,\n startAngle: actualStartAngle,\n endAngle: actualEndAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? linearMap(value, extent, [r0, r]) : r\n });\n currentAngle = endAngle;\n });\n // Some sector is constrained by minAngle and padAngle\n // Rest sectors needs recalculate angle\n if (restAngle < PI2 && validDataCount) {\n // Average the angle if rest angle is not enough after all angles is\n // Constrained by minAngle and padAngle\n if (restAngle <= 1e-3) {\n var angle_1 = angleRange / validDataCount;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout_1 = data.getItemLayout(idx);\n layout_1.angle = angle_1;\n var actualStartAngle = 0;\n var actualEndAngle = 0;\n if (angle_1 < padAngle) {\n actualStartAngle = startAngle + dir * (idx + 1 / 2) * angle_1;\n actualEndAngle = actualStartAngle;\n } else {\n actualStartAngle = startAngle + dir * idx * angle_1 + halfPadAngle;\n actualEndAngle = startAngle + dir * (idx + 1) * angle_1 - halfPadAngle;\n }\n layout_1.startAngle = actualStartAngle;\n layout_1.endAngle = actualEndAngle;\n }\n });\n } else {\n unitRadian = restAngle / valueSumLargerThanMinAngle;\n currentAngle = startAngle;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout_2 = data.getItemLayout(idx);\n var angle = layout_2.angle === minAndPadAngle ? minAndPadAngle : value * unitRadian;\n var actualStartAngle = 0;\n var actualEndAngle = 0;\n if (angle < padAngle) {\n actualStartAngle = currentAngle + dir * angle / 2;\n actualEndAngle = actualStartAngle;\n } else {\n actualStartAngle = currentAngle + halfPadAngle;\n actualEndAngle = currentAngle + dir * angle - halfPadAngle;\n }\n layout_2.startAngle = actualStartAngle;\n layout_2.endAngle = actualEndAngle;\n currentAngle += dir * angle;\n }\n });\n }\n }\n });\n}\nexport var getSeriesLayoutData = makeInner();","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function dataFilter(seriesType) {\n return {\n seriesType: seriesType,\n reset: function (seriesModel, ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (!legendModels || !legendModels.length) {\n return;\n }\n var data = seriesModel.getData();\n data.filterSelf(function (idx) {\n var name = data.getName(idx);\n // If in any legend component the status is not selected.\n for (var i = 0; i < legendModels.length; i++) {\n // @ts-ignore FIXME: LegendModel\n if (!legendModels[i].isSelected(name)) {\n return false;\n }\n }\n return true;\n });\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME emphasis label position is not same with normal label position\nimport { parsePercent } from '../../util/number.js';\nimport { Point } from '../../util/graphic.js';\nimport { each, isNumber } from 'zrender/lib/core/util.js';\nimport { limitTurnAngle, limitSurfaceAngle } from '../../label/labelGuideHelper.js';\nimport { shiftLayoutOnY } from '../../label/labelLayoutHelper.js';\nvar RADIAN = Math.PI / 180;\nfunction adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight, viewLeft, viewTop, farthestX) {\n if (list.length < 2) {\n return;\n }\n ;\n function recalculateXOnSemiToAlignOnEllipseCurve(semi) {\n var rB = semi.rB;\n var rB2 = rB * rB;\n for (var i = 0; i < semi.list.length; i++) {\n var item = semi.list[i];\n var dy = Math.abs(item.label.y - cy);\n // horizontal r is always same with original r because x is not changed.\n var rA = r + item.len;\n var rA2 = rA * rA;\n // Use ellipse implicit function to calculate x\n var dx = Math.sqrt((1 - Math.abs(dy * dy / rB2)) * rA2);\n var newX = cx + (dx + item.len2) * dir;\n var deltaX = newX - item.label.x;\n var newTargetWidth = item.targetTextWidth - deltaX * dir;\n // text x is changed, so need to recalculate width.\n constrainTextWidth(item, newTargetWidth, true);\n item.label.x = newX;\n }\n }\n // Adjust X based on the shifted y. Make tight labels aligned on an ellipse curve.\n function recalculateX(items) {\n // Extremes of\n var topSemi = {\n list: [],\n maxY: 0\n };\n var bottomSemi = {\n list: [],\n maxY: 0\n };\n for (var i = 0; i < items.length; i++) {\n if (items[i].labelAlignTo !== 'none') {\n continue;\n }\n var item = items[i];\n var semi = item.label.y > cy ? bottomSemi : topSemi;\n var dy = Math.abs(item.label.y - cy);\n if (dy >= semi.maxY) {\n var dx = item.label.x - cx - item.len2 * dir;\n // horizontal r is always same with original r because x is not changed.\n var rA = r + item.len;\n // Canculate rB based on the topest / bottemest label.\n var rB = Math.abs(dx) < rA ? Math.sqrt(dy * dy / (1 - dx * dx / rA / rA)) : rA;\n semi.rB = rB;\n semi.maxY = dy;\n }\n semi.list.push(item);\n }\n recalculateXOnSemiToAlignOnEllipseCurve(topSemi);\n recalculateXOnSemiToAlignOnEllipseCurve(bottomSemi);\n }\n var len = list.length;\n for (var i = 0; i < len; i++) {\n if (list[i].position === 'outer' && list[i].labelAlignTo === 'labelLine') {\n var dx = list[i].label.x - farthestX;\n list[i].linePoints[1][0] += dx;\n list[i].label.x = farthestX;\n }\n }\n if (shiftLayoutOnY(list, viewTop, viewTop + viewHeight)) {\n recalculateX(list);\n }\n}\nfunction avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop) {\n var leftList = [];\n var rightList = [];\n var leftmostX = Number.MAX_VALUE;\n var rightmostX = -Number.MAX_VALUE;\n for (var i = 0; i < labelLayoutList.length; i++) {\n var label = labelLayoutList[i].label;\n if (isPositionCenter(labelLayoutList[i])) {\n continue;\n }\n if (label.x < cx) {\n leftmostX = Math.min(leftmostX, label.x);\n leftList.push(labelLayoutList[i]);\n } else {\n rightmostX = Math.max(rightmostX, label.x);\n rightList.push(labelLayoutList[i]);\n }\n }\n for (var i = 0; i < labelLayoutList.length; i++) {\n var layout = labelLayoutList[i];\n if (!isPositionCenter(layout) && layout.linePoints) {\n if (layout.labelStyleWidth != null) {\n continue;\n }\n var label = layout.label;\n var linePoints = layout.linePoints;\n var targetTextWidth = void 0;\n if (layout.labelAlignTo === 'edge') {\n if (label.x < cx) {\n targetTextWidth = linePoints[2][0] - layout.labelDistance - viewLeft - layout.edgeDistance;\n } else {\n targetTextWidth = viewLeft + viewWidth - layout.edgeDistance - linePoints[2][0] - layout.labelDistance;\n }\n } else if (layout.labelAlignTo === 'labelLine') {\n if (label.x < cx) {\n targetTextWidth = leftmostX - viewLeft - layout.bleedMargin;\n } else {\n targetTextWidth = viewLeft + viewWidth - rightmostX - layout.bleedMargin;\n }\n } else {\n if (label.x < cx) {\n targetTextWidth = label.x - viewLeft - layout.bleedMargin;\n } else {\n targetTextWidth = viewLeft + viewWidth - label.x - layout.bleedMargin;\n }\n }\n layout.targetTextWidth = targetTextWidth;\n constrainTextWidth(layout, targetTextWidth);\n }\n }\n adjustSingleSide(rightList, cx, cy, r, 1, viewWidth, viewHeight, viewLeft, viewTop, rightmostX);\n adjustSingleSide(leftList, cx, cy, r, -1, viewWidth, viewHeight, viewLeft, viewTop, leftmostX);\n for (var i = 0; i < labelLayoutList.length; i++) {\n var layout = labelLayoutList[i];\n if (!isPositionCenter(layout) && layout.linePoints) {\n var label = layout.label;\n var linePoints = layout.linePoints;\n var isAlignToEdge = layout.labelAlignTo === 'edge';\n var padding = label.style.padding;\n var paddingH = padding ? padding[1] + padding[3] : 0;\n // textRect.width already contains paddingH if bgColor is set\n var extraPaddingH = label.style.backgroundColor ? 0 : paddingH;\n var realTextWidth = layout.rect.width + extraPaddingH;\n var dist = linePoints[1][0] - linePoints[2][0];\n if (isAlignToEdge) {\n if (label.x < cx) {\n linePoints[2][0] = viewLeft + layout.edgeDistance + realTextWidth + layout.labelDistance;\n } else {\n linePoints[2][0] = viewLeft + viewWidth - layout.edgeDistance - realTextWidth - layout.labelDistance;\n }\n } else {\n if (label.x < cx) {\n linePoints[2][0] = label.x + layout.labelDistance;\n } else {\n linePoints[2][0] = label.x - layout.labelDistance;\n }\n linePoints[1][0] = linePoints[2][0] + dist;\n }\n linePoints[1][1] = linePoints[2][1] = label.y;\n }\n }\n}\n/**\n * Set max width of each label, and then wrap each label to the max width.\n *\n * @param layout label layout\n * @param availableWidth max width for the label to display\n * @param forceRecalculate recaculate the text layout even if the current width\n * is smaller than `availableWidth`. This is useful when the text was previously\n * wrapped by calling `constrainTextWidth` but now `availableWidth` changed, in\n * which case, previous wrapping should be redo.\n */\nfunction constrainTextWidth(layout, availableWidth, forceRecalculate) {\n if (forceRecalculate === void 0) {\n forceRecalculate = false;\n }\n if (layout.labelStyleWidth != null) {\n // User-defined style.width has the highest priority.\n return;\n }\n var label = layout.label;\n var style = label.style;\n var textRect = layout.rect;\n var bgColor = style.backgroundColor;\n var padding = style.padding;\n var paddingH = padding ? padding[1] + padding[3] : 0;\n var overflow = style.overflow;\n // textRect.width already contains paddingH if bgColor is set\n var oldOuterWidth = textRect.width + (bgColor ? 0 : paddingH);\n if (availableWidth < oldOuterWidth || forceRecalculate) {\n var oldHeight = textRect.height;\n if (overflow && overflow.match('break')) {\n // Temporarily set background to be null to calculate\n // the bounding box without background.\n label.setStyle('backgroundColor', null);\n // Set constraining width\n label.setStyle('width', availableWidth - paddingH);\n // This is the real bounding box of the text without padding.\n var innerRect = label.getBoundingRect();\n label.setStyle('width', Math.ceil(innerRect.width));\n label.setStyle('backgroundColor', bgColor);\n } else {\n var availableInnerWidth = availableWidth - paddingH;\n var newWidth = availableWidth < oldOuterWidth\n // Current text is too wide, use `availableWidth` as max width.\n ? availableInnerWidth :\n // Current available width is enough, but the text may have\n // already been wrapped with a smaller available width.\n forceRecalculate ? availableInnerWidth > layout.unconstrainedWidth\n // Current available is larger than text width,\n // so don't constrain width (otherwise it may have\n // empty space in the background).\n ? null\n // Current available is smaller than text width, so\n // use the current available width as constraining\n // width.\n : availableInnerWidth\n // Current available width is enough, so no need to\n // constrain.\n : null;\n label.setStyle('width', newWidth);\n }\n var newRect = label.getBoundingRect();\n textRect.width = newRect.width;\n var margin = (label.style.margin || 0) + 2.1;\n textRect.height = newRect.height + margin;\n textRect.y -= (textRect.height - oldHeight) / 2;\n }\n}\nfunction isPositionCenter(sectorShape) {\n // Not change x for center label\n return sectorShape.position === 'center';\n}\nexport default function pieLabelLayout(seriesModel) {\n var data = seriesModel.getData();\n var labelLayoutList = [];\n var cx;\n var cy;\n var hasLabelRotate = false;\n var minShowLabelRadian = (seriesModel.get('minShowLabelAngle') || 0) * RADIAN;\n var viewRect = data.getLayout('viewRect');\n var r = data.getLayout('r');\n var viewWidth = viewRect.width;\n var viewLeft = viewRect.x;\n var viewTop = viewRect.y;\n var viewHeight = viewRect.height;\n function setNotShow(el) {\n el.ignore = true;\n }\n function isLabelShown(label) {\n if (!label.ignore) {\n return true;\n }\n for (var key in label.states) {\n if (label.states[key].ignore === false) {\n return true;\n }\n }\n return false;\n }\n data.each(function (idx) {\n var sector = data.getItemGraphicEl(idx);\n var sectorShape = sector.shape;\n var label = sector.getTextContent();\n var labelLine = sector.getTextGuideLine();\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label');\n // Use position in normal or emphasis\n var labelPosition = labelModel.get('position') || itemModel.get(['emphasis', 'label', 'position']);\n var labelDistance = labelModel.get('distanceToLabelLine');\n var labelAlignTo = labelModel.get('alignTo');\n var edgeDistance = parsePercent(labelModel.get('edgeDistance'), viewWidth);\n var bleedMargin = labelModel.get('bleedMargin');\n var labelLineModel = itemModel.getModel('labelLine');\n var labelLineLen = labelLineModel.get('length');\n labelLineLen = parsePercent(labelLineLen, viewWidth);\n var labelLineLen2 = labelLineModel.get('length2');\n labelLineLen2 = parsePercent(labelLineLen2, viewWidth);\n if (Math.abs(sectorShape.endAngle - sectorShape.startAngle) < minShowLabelRadian) {\n each(label.states, setNotShow);\n label.ignore = true;\n if (labelLine) {\n each(labelLine.states, setNotShow);\n labelLine.ignore = true;\n }\n return;\n }\n if (!isLabelShown(label)) {\n return;\n }\n var midAngle = (sectorShape.startAngle + sectorShape.endAngle) / 2;\n var nx = Math.cos(midAngle);\n var ny = Math.sin(midAngle);\n var textX;\n var textY;\n var linePoints;\n var textAlign;\n cx = sectorShape.cx;\n cy = sectorShape.cy;\n var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner';\n if (labelPosition === 'center') {\n textX = sectorShape.cx;\n textY = sectorShape.cy;\n textAlign = 'center';\n } else {\n var x1 = (isLabelInside ? (sectorShape.r + sectorShape.r0) / 2 * nx : sectorShape.r * nx) + cx;\n var y1 = (isLabelInside ? (sectorShape.r + sectorShape.r0) / 2 * ny : sectorShape.r * ny) + cy;\n textX = x1 + nx * 3;\n textY = y1 + ny * 3;\n if (!isLabelInside) {\n // For roseType\n var x2 = x1 + nx * (labelLineLen + r - sectorShape.r);\n var y2 = y1 + ny * (labelLineLen + r - sectorShape.r);\n var x3 = x2 + (nx < 0 ? -1 : 1) * labelLineLen2;\n var y3 = y2;\n if (labelAlignTo === 'edge') {\n // Adjust textX because text align of edge is opposite\n textX = nx < 0 ? viewLeft + edgeDistance : viewLeft + viewWidth - edgeDistance;\n } else {\n textX = x3 + (nx < 0 ? -labelDistance : labelDistance);\n }\n textY = y3;\n linePoints = [[x1, y1], [x2, y2], [x3, y3]];\n }\n textAlign = isLabelInside ? 'center' : labelAlignTo === 'edge' ? nx > 0 ? 'right' : 'left' : nx > 0 ? 'left' : 'right';\n }\n var PI = Math.PI;\n var labelRotate = 0;\n var rotate = labelModel.get('rotate');\n if (isNumber(rotate)) {\n labelRotate = rotate * (PI / 180);\n } else if (labelPosition === 'center') {\n labelRotate = 0;\n } else if (rotate === 'radial' || rotate === true) {\n var radialAngle = nx < 0 ? -midAngle + PI : -midAngle;\n labelRotate = radialAngle;\n } else if (rotate === 'tangential' && labelPosition !== 'outside' && labelPosition !== 'outer') {\n var rad = Math.atan2(nx, ny);\n if (rad < 0) {\n rad = PI * 2 + rad;\n }\n var isDown = ny > 0;\n if (isDown) {\n rad = PI + rad;\n }\n labelRotate = rad - PI;\n }\n hasLabelRotate = !!labelRotate;\n label.x = textX;\n label.y = textY;\n label.rotation = labelRotate;\n label.setStyle({\n verticalAlign: 'middle'\n });\n // Not sectorShape the inside label\n if (!isLabelInside) {\n var textRect = label.getBoundingRect().clone();\n textRect.applyTransform(label.getComputedTransform());\n // Text has a default 1px stroke. Exclude this.\n var margin = (label.style.margin || 0) + 2.1;\n textRect.y -= margin / 2;\n textRect.height += margin;\n labelLayoutList.push({\n label: label,\n labelLine: labelLine,\n position: labelPosition,\n len: labelLineLen,\n len2: labelLineLen2,\n minTurnAngle: labelLineModel.get('minTurnAngle'),\n maxSurfaceAngle: labelLineModel.get('maxSurfaceAngle'),\n surfaceNormal: new Point(nx, ny),\n linePoints: linePoints,\n textAlign: textAlign,\n labelDistance: labelDistance,\n labelAlignTo: labelAlignTo,\n edgeDistance: edgeDistance,\n bleedMargin: bleedMargin,\n rect: textRect,\n unconstrainedWidth: textRect.width,\n labelStyleWidth: label.style.width\n });\n } else {\n label.setStyle({\n align: textAlign\n });\n var selectState = label.states.select;\n if (selectState) {\n selectState.x += label.x;\n selectState.y += label.y;\n }\n }\n sector.setTextConfig({\n inside: isLabelInside\n });\n });\n if (!hasLabelRotate && seriesModel.get('avoidLabelOverlap')) {\n avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop);\n }\n for (var i = 0; i < labelLayoutList.length; i++) {\n var layout = labelLayoutList[i];\n var label = layout.label;\n var labelLine = layout.labelLine;\n var notShowLabel = isNaN(label.x) || isNaN(label.y);\n if (label) {\n label.setStyle({\n align: layout.textAlign\n });\n if (notShowLabel) {\n each(label.states, setNotShow);\n label.ignore = true;\n }\n var selectState = label.states.select;\n if (selectState) {\n selectState.x += label.x;\n selectState.y += label.y;\n }\n }\n if (labelLine) {\n var linePoints = layout.linePoints;\n if (notShowLabel || !linePoints) {\n each(labelLine.states, setNotShow);\n labelLine.ignore = true;\n } else {\n limitTurnAngle(linePoints, layout.minTurnAngle);\n limitSurfaceAngle(linePoints, layout.surfaceNormal, layout.maxSurfaceAngle);\n labelLine.setShape({\n points: linePoints\n });\n // Set the anchor to the midpoint of sector\n label.__hostTarget.textGuideLineConfig = {\n anchor: new Point(linePoints[0][0], linePoints[0][1])\n };\n }\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { extend, retrieve3 } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport ChartView from '../../view/Chart.js';\nimport labelLayout from './labelLayout.js';\nimport { setLabelLineStyle, getLabelLineStatesModels } from '../../label/labelGuideHelper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { getBasicPieLayout, getSeriesLayoutData } from './pieLayout.js';\n/**\n * Piece of pie including Sector, Label, LabelLine\n */\nvar PiePiece = /** @class */function (_super) {\n __extends(PiePiece, _super);\n function PiePiece(data, idx, startAngle) {\n var _this = _super.call(this) || this;\n _this.z2 = 2;\n var text = new graphic.Text();\n _this.setTextContent(text);\n _this.updateData(data, idx, startAngle, true);\n return _this;\n }\n PiePiece.prototype.updateData = function (data, idx, startAngle, firstCreate) {\n var sector = this;\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n var layout = data.getItemLayout(idx);\n // cornerRadius & innerCornerRadius doesn't exist in the item layout. Use `0` if null value is specified.\n // see `setItemLayout` in `pieLayout.ts`.\n var sectorShape = extend(getSectorCornerRadius(itemModel.getModel('itemStyle'), layout, true), layout);\n // Ignore NaN data.\n if (isNaN(sectorShape.startAngle)) {\n // Use NaN shape to avoid drawing shape.\n sector.setShape(sectorShape);\n return;\n }\n if (firstCreate) {\n sector.setShape(sectorShape);\n var animationType = seriesModel.getShallow('animationType');\n if (seriesModel.ecModel.ssr) {\n // Use scale animation in SSR mode(opacity?)\n // Because CSS SVG animation doesn't support very customized shape animation.\n graphic.initProps(sector, {\n scaleX: 0,\n scaleY: 0\n }, seriesModel, {\n dataIndex: idx,\n isFrom: true\n });\n sector.originX = sectorShape.cx;\n sector.originY = sectorShape.cy;\n } else if (animationType === 'scale') {\n sector.shape.r = layout.r0;\n graphic.initProps(sector, {\n shape: {\n r: layout.r\n }\n }, seriesModel, idx);\n }\n // Expansion\n else {\n if (startAngle != null) {\n sector.setShape({\n startAngle: startAngle,\n endAngle: startAngle\n });\n graphic.initProps(sector, {\n shape: {\n startAngle: layout.startAngle,\n endAngle: layout.endAngle\n }\n }, seriesModel, idx);\n } else {\n sector.shape.endAngle = layout.startAngle;\n graphic.updateProps(sector, {\n shape: {\n endAngle: layout.endAngle\n }\n }, seriesModel, idx);\n }\n }\n } else {\n saveOldStyle(sector);\n // Transition animation from the old shape\n graphic.updateProps(sector, {\n shape: sectorShape\n }, seriesModel, idx);\n }\n sector.useStyle(data.getItemVisual(idx, 'style'));\n setStatesStylesFromModel(sector, itemModel);\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var offset = seriesModel.get('selectedOffset');\n var dx = Math.cos(midAngle) * offset;\n var dy = Math.sin(midAngle) * offset;\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && sector.attr('cursor', cursorStyle);\n this._updateLabel(seriesModel, data, idx);\n sector.ensureState('emphasis').shape = extend({\n r: layout.r + (emphasisModel.get('scale') ? emphasisModel.get('scaleSize') || 0 : 0)\n }, getSectorCornerRadius(emphasisModel.getModel('itemStyle'), layout));\n extend(sector.ensureState('select'), {\n x: dx,\n y: dy,\n shape: getSectorCornerRadius(itemModel.getModel(['select', 'itemStyle']), layout)\n });\n extend(sector.ensureState('blur'), {\n shape: getSectorCornerRadius(itemModel.getModel(['blur', 'itemStyle']), layout)\n });\n var labelLine = sector.getTextGuideLine();\n var labelText = sector.getTextContent();\n labelLine && extend(labelLine.ensureState('select'), {\n x: dx,\n y: dy\n });\n // TODO: needs dx, dy in zrender?\n extend(labelText.ensureState('select'), {\n x: dx,\n y: dy\n });\n toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n };\n PiePiece.prototype._updateLabel = function (seriesModel, data, idx) {\n var sector = this;\n var itemModel = data.getItemModel(idx);\n var labelLineModel = itemModel.getModel('labelLine');\n var style = data.getItemVisual(idx, 'style');\n var visualColor = style && style.fill;\n var visualOpacity = style && style.opacity;\n setLabelStyle(sector, getLabelStatesModels(itemModel), {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n inheritColor: visualColor,\n defaultOpacity: visualOpacity,\n defaultText: seriesModel.getFormattedLabel(idx, 'normal') || data.getName(idx)\n });\n var labelText = sector.getTextContent();\n // Set textConfig on sector.\n sector.setTextConfig({\n // reset position, rotation\n position: null,\n rotation: null\n });\n // Make sure update style on labelText after setLabelStyle.\n // Because setLabelStyle will replace a new style on it.\n labelText.attr({\n z2: 10\n });\n var labelPosition = seriesModel.get(['label', 'position']);\n if (labelPosition !== 'outside' && labelPosition !== 'outer') {\n sector.removeTextGuideLine();\n } else {\n var polyline = this.getTextGuideLine();\n if (!polyline) {\n polyline = new graphic.Polyline();\n this.setTextGuideLine(polyline);\n }\n // Default use item visual color\n setLabelLineStyle(this, getLabelLineStatesModels(itemModel), {\n stroke: visualColor,\n opacity: retrieve3(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1)\n });\n }\n };\n return PiePiece;\n}(graphic.Sector);\n// Pie view\nvar PieView = /** @class */function (_super) {\n __extends(PieView, _super);\n function PieView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.ignoreLabelLineUpdate = true;\n return _this;\n }\n PieView.prototype.render = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var startAngle;\n // First render\n if (!oldData && data.count() > 0) {\n var shape = data.getItemLayout(0);\n for (var s = 1; isNaN(shape && shape.startAngle) && s < data.count(); ++s) {\n shape = data.getItemLayout(s);\n }\n if (shape) {\n startAngle = shape.startAngle;\n }\n }\n // remove empty-circle if it exists\n if (this._emptyCircleSector) {\n group.remove(this._emptyCircleSector);\n }\n // when all data are filtered, show lightgray empty circle\n if (data.count() === 0 && seriesModel.get('showEmptyCircle')) {\n var layoutData = getSeriesLayoutData(seriesModel);\n var sector = new graphic.Sector({\n shape: extend(getBasicPieLayout(seriesModel, api), layoutData)\n });\n sector.useStyle(seriesModel.getModel('emptyCircleStyle').getItemStyle());\n this._emptyCircleSector = sector;\n group.add(sector);\n }\n data.diff(oldData).add(function (idx) {\n var piePiece = new PiePiece(data, idx, startAngle);\n data.setItemGraphicEl(idx, piePiece);\n group.add(piePiece);\n }).update(function (newIdx, oldIdx) {\n var piePiece = oldData.getItemGraphicEl(oldIdx);\n piePiece.updateData(data, newIdx, startAngle);\n piePiece.off('click');\n group.add(piePiece);\n data.setItemGraphicEl(newIdx, piePiece);\n }).remove(function (idx) {\n var piePiece = oldData.getItemGraphicEl(idx);\n graphic.removeElementWithFadeOut(piePiece, seriesModel, idx);\n }).execute();\n labelLayout(seriesModel);\n // Always use initial animation.\n if (seriesModel.get('animationTypeUpdate') !== 'expansion') {\n this._data = data;\n }\n };\n PieView.prototype.dispose = function () {};\n PieView.prototype.containPoint = function (point, seriesModel) {\n var data = seriesModel.getData();\n var itemLayout = data.getItemLayout(0);\n if (itemLayout) {\n var dx = point[0] - itemLayout.cx;\n var dy = point[1] - itemLayout.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n return radius <= itemLayout.r && radius >= itemLayout.r0;\n }\n };\n PieView.type = 'pie';\n return PieView;\n}(ChartView);\nexport default PieView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport { extend, isArray } from 'zrender/lib/core/util.js';\n/**\n * [Usage]:\n * (1)\n * createListSimply(seriesModel, ['value']);\n * (2)\n * createListSimply(seriesModel, {\n * coordDimensions: ['value'],\n * dimensionsCount: 5\n * });\n */\nexport default function createSeriesDataSimply(seriesModel, opt, nameList) {\n opt = isArray(opt) && {\n coordDimensions: opt\n } || extend({\n encodeDefine: seriesModel.getEncode()\n }, opt);\n var source = seriesModel.getSource();\n var dimensions = prepareSeriesDataSchema(source, opt).dimensions;\n var list = new SeriesData(dimensions, seriesModel);\n list.initData(source, nameList);\n return list;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * LegendVisualProvider is an bridge that pick encoded color from data and\n * provide to the legend component.\n */\nvar LegendVisualProvider = /** @class */function () {\n function LegendVisualProvider(\n // Function to get data after filtered. It stores all the encoding info\n getDataWithEncodedVisual,\n // Function to get raw data before filtered.\n getRawData) {\n this._getDataWithEncodedVisual = getDataWithEncodedVisual;\n this._getRawData = getRawData;\n }\n LegendVisualProvider.prototype.getAllNames = function () {\n var rawData = this._getRawData();\n // We find the name from the raw data. In case it's filtered by the legend component.\n // Normally, the name can be found in rawData, but can't be found in filtered data will display as gray.\n return rawData.mapArray(rawData.getName);\n };\n LegendVisualProvider.prototype.containName = function (name) {\n var rawData = this._getRawData();\n return rawData.indexOfName(name) >= 0;\n };\n LegendVisualProvider.prototype.indexOfName = function (name) {\n // Only get data when necessary.\n // Because LegendVisualProvider constructor may be new in the stage that data is not prepared yet.\n // Invoking Series#getData immediately will throw an error.\n var dataWithEncodedVisual = this._getDataWithEncodedVisual();\n return dataWithEncodedVisual.indexOfName(name);\n };\n LegendVisualProvider.prototype.getItemVisual = function (dataIndex, key) {\n // Get encoded visual properties from final filtered data.\n var dataWithEncodedVisual = this._getDataWithEncodedVisual();\n return dataWithEncodedVisual.getItemVisual(dataIndex, key);\n };\n return LegendVisualProvider;\n}();\nexport default LegendVisualProvider;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport { getPercentSeats } from '../../util/number.js';\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport SeriesModel from '../../model/Series.js';\nvar innerData = modelUtil.makeInner();\nvar PieSeriesModel = /** @class */function (_super) {\n __extends(PieSeriesModel, _super);\n function PieSeriesModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @overwrite\n */\n PieSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n this._defaultLabelLine(option);\n };\n /**\n * @overwrite\n */\n PieSeriesModel.prototype.mergeOption = function () {\n _super.prototype.mergeOption.apply(this, arguments);\n };\n /**\n * @overwrite\n */\n PieSeriesModel.prototype.getInitialData = function () {\n return createSeriesDataSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n };\n /**\n * @overwrite\n */\n PieSeriesModel.prototype.getDataParams = function (dataIndex) {\n var data = this.getData();\n // update seats when data is changed\n var dataInner = innerData(data);\n var seats = dataInner.seats;\n if (!seats) {\n var valueList_1 = [];\n data.each(data.mapDimension('value'), function (value) {\n valueList_1.push(value);\n });\n seats = dataInner.seats = getPercentSeats(valueList_1, data.hostModel.get('percentPrecision'));\n }\n var params = _super.prototype.getDataParams.call(this, dataIndex);\n // seats may be empty when sum is 0\n params.percent = seats[dataIndex] || 0;\n params.$vars.push('percent');\n return params;\n };\n PieSeriesModel.prototype._defaultLabelLine = function (option) {\n // Extend labelLine emphasis\n modelUtil.defaultEmphasis(option, 'labelLine', ['show']);\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine;\n // Not show label line if `label.normal.show = false`\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\n };\n PieSeriesModel.type = 'series.pie';\n PieSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n colorBy: 'data',\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n endAngle: 'auto',\n padAngle: 0,\n // 最小角度改为0\n minAngle: 0,\n // If the angle of a sector less than `minShowLabelAngle`,\n // the label will not be displayed.\n minShowLabelAngle: 0,\n // 选中时扇区偏移量\n selectedOffset: 10,\n // 选择模式,默认关闭,可选single,multiple\n // selectedMode: false,\n // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)\n // roseType: null,\n percentPrecision: 2,\n // If still show when all data zero.\n stillShowZeroSum: true,\n // cursor: null,\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n width: null,\n height: null,\n label: {\n // color: 'inherit',\n // If rotate around circle\n rotate: 0,\n show: true,\n overflow: 'truncate',\n // 'outer', 'inside', 'center'\n position: 'outer',\n // 'none', 'labelLine', 'edge'. Works only when position is 'outer'\n alignTo: 'none',\n // Closest distance between label and chart edge.\n // Works only position is 'outer' and alignTo is 'edge'.\n edgeDistance: '25%',\n // Works only position is 'outer' and alignTo is not 'edge'.\n bleedMargin: 10,\n // Distance between text and label line.\n distanceToLabelLine: 5\n // formatter: 标签文本格式器,同 tooltip.formatter,不支持异步回调\n // 默认使用全局文本样式,详见 textStyle\n // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数\n },\n\n // Enabled when label.normal.position is 'outer'\n labelLine: {\n show: true,\n // 引导线两段中的第一段长度\n length: 15,\n // 引导线两段中的第二段长度\n length2: 15,\n smooth: false,\n minTurnAngle: 90,\n maxSurfaceAngle: 90,\n lineStyle: {\n // color: 各异,\n width: 1,\n type: 'solid'\n }\n },\n itemStyle: {\n borderWidth: 1,\n borderJoin: 'round'\n },\n showEmptyCircle: true,\n emptyCircleStyle: {\n color: 'lightgray',\n opacity: 1\n },\n labelLayout: {\n // Hide the overlapped label.\n hideOverlap: true\n },\n emphasis: {\n scale: true,\n scaleSize: 5\n },\n // If use strategy to avoid label overlapping\n avoidLabelOverlap: true,\n // Animation type. Valid values: expansion, scale\n animationType: 'expansion',\n animationDuration: 1000,\n // Animation type when update. Valid values: transition, expansion\n animationTypeUpdate: 'transition',\n animationEasingUpdate: 'cubicInOut',\n animationDurationUpdate: 500,\n animationEasing: 'cubicInOut'\n };\n return PieSeriesModel;\n}(SeriesModel);\nexport default PieSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isNumber } from 'zrender/lib/core/util.js';\nexport default function negativeDataFilter(seriesType) {\n return {\n seriesType: seriesType,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n data.filterSelf(function (idx) {\n // handle negative value condition\n var valueDim = data.mapDimension('value');\n var curValue = data.get(valueDim, idx);\n if (isNumber(curValue) && !isNaN(curValue) && curValue < 0) {\n return false;\n }\n return true;\n });\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createLegacyDataSelectAction } from '../../legacy/dataSelectAction.js';\nimport pieLayout from '../pie/pieLayout.js';\nimport dataFilter from '../../processor/dataFilter.js';\nimport { curry } from 'zrender/lib/core/util.js';\nimport PieView from './PieView.js';\nimport PieSeriesModel from './PieSeries.js';\nimport negativeDataFilter from '../../processor/negativeDataFilter.js';\nexport function install(registers) {\n registers.registerChartView(PieView);\n registers.registerSeriesModel(PieSeriesModel);\n createLegacyDataSelectAction('pie', registers.registerAction);\n registers.registerLayout(curry(pieLayout, 'pie'));\n registers.registerProcessor(dataFilter('pie'));\n registers.registerProcessor(negativeDataFilter('pie'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nvar ScatterSeriesModel = /** @class */function (_super) {\n __extends(ScatterSeriesModel, _super);\n function ScatterSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScatterSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n ScatterSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n ScatterSeriesModel.prototype.getProgressive = function () {\n var progressive = this.option.progressive;\n if (progressive == null) {\n // PENDING\n return this.option.large ? 5e3 : this.get('progressive');\n }\n return progressive;\n };\n ScatterSeriesModel.prototype.getProgressiveThreshold = function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n if (progressiveThreshold == null) {\n // PENDING\n return this.option.large ? 1e4 : this.get('progressiveThreshold');\n }\n return progressiveThreshold;\n };\n ScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.point(data.getItemLayout(dataIndex));\n };\n ScatterSeriesModel.prototype.getZLevelKey = function () {\n // Each progressive series has individual key.\n return this.getData().count() > this.getProgressiveThreshold() ? this.id : '';\n };\n ScatterSeriesModel.type = 'series.scatter';\n ScatterSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar'];\n ScatterSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n symbolSize: 10,\n // symbolRotate: null, // 图形旋转控制\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n // cursor: null,\n itemStyle: {\n opacity: 0.8\n // color: 各异\n },\n\n emphasis: {\n scale: true\n },\n // If clip the overflow graphics\n // Works on cartesian / polar series\n clip: true,\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n universalTransition: {\n divideShape: 'clone'\n }\n // progressive: null\n };\n\n return ScatterSeriesModel;\n}(SeriesModel);\nexport default ScatterSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global Float32Array */\n// TODO Batch by color\nimport * as graphic from '../../util/graphic.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { getECData } from '../../util/innerStore.js';\nvar BOOST_SIZE_THRESHOLD = 4;\nvar LargeSymbolPathShape = /** @class */function () {\n function LargeSymbolPathShape() {}\n return LargeSymbolPathShape;\n}();\nvar LargeSymbolPath = /** @class */function (_super) {\n __extends(LargeSymbolPath, _super);\n function LargeSymbolPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this._off = 0;\n _this.hoverDataIdx = -1;\n return _this;\n }\n LargeSymbolPath.prototype.getDefaultShape = function () {\n return new LargeSymbolPathShape();\n };\n LargeSymbolPath.prototype.reset = function () {\n this.notClear = false;\n this._off = 0;\n };\n LargeSymbolPath.prototype.buildPath = function (path, shape) {\n var points = shape.points;\n var size = shape.size;\n var symbolProxy = this.symbolProxy;\n var symbolProxyShape = symbolProxy.shape;\n var ctx = path.getContext ? path.getContext() : path;\n var canBoost = ctx && size[0] < BOOST_SIZE_THRESHOLD;\n var softClipShape = this.softClipShape;\n var i;\n // Do draw in afterBrush.\n if (canBoost) {\n this._ctx = ctx;\n return;\n }\n this._ctx = null;\n for (i = this._off; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n if (softClipShape && !softClipShape.contain(x, y)) {\n continue;\n }\n symbolProxyShape.x = x - size[0] / 2;\n symbolProxyShape.y = y - size[1] / 2;\n symbolProxyShape.width = size[0];\n symbolProxyShape.height = size[1];\n symbolProxy.buildPath(path, symbolProxyShape, true);\n }\n if (this.incremental) {\n this._off = i;\n this.notClear = true;\n }\n };\n LargeSymbolPath.prototype.afterBrush = function () {\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var ctx = this._ctx;\n var softClipShape = this.softClipShape;\n var i;\n if (!ctx) {\n return;\n }\n // PENDING If style or other canvas status changed?\n for (i = this._off; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n if (softClipShape && !softClipShape.contain(x, y)) {\n continue;\n }\n // fillRect is faster than building a rect path and draw.\n // And it support light globalCompositeOperation.\n ctx.fillRect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]);\n }\n if (this.incremental) {\n this._off = i;\n this.notClear = true;\n }\n };\n LargeSymbolPath.prototype.findDataIndex = function (x, y) {\n // TODO ???\n // Consider transform\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var w = Math.max(size[0], 4);\n var h = Math.max(size[1], 4);\n // Not consider transform\n // Treat each element as a rect\n // top down traverse\n for (var idx = points.length / 2 - 1; idx >= 0; idx--) {\n var i = idx * 2;\n var x0 = points[i] - w / 2;\n var y0 = points[i + 1] - h / 2;\n if (x >= x0 && y >= y0 && x <= x0 + w && y <= y0 + h) {\n return idx;\n }\n }\n return -1;\n };\n LargeSymbolPath.prototype.contain = function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n x = localPos[0];\n y = localPos[1];\n if (rect.contain(x, y)) {\n // Cache found data index.\n var dataIdx = this.hoverDataIdx = this.findDataIndex(x, y);\n return dataIdx >= 0;\n }\n this.hoverDataIdx = -1;\n return false;\n };\n LargeSymbolPath.prototype.getBoundingRect = function () {\n // Ignore stroke for large symbol draw.\n var rect = this._rect;\n if (!rect) {\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var w = size[0];\n var h = size[1];\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n rect = this._rect = new graphic.BoundingRect(minX - w / 2, minY - h / 2, maxX - minX + w, maxY - minY + h);\n }\n return rect;\n };\n return LargeSymbolPath;\n}(graphic.Path);\nvar LargeSymbolDraw = /** @class */function () {\n function LargeSymbolDraw() {\n this.group = new graphic.Group();\n }\n /**\n * Update symbols draw by new data\n */\n LargeSymbolDraw.prototype.updateData = function (data, opt) {\n this._clear();\n var symbolEl = this._create();\n symbolEl.setShape({\n points: data.getLayout('points')\n });\n this._setCommon(symbolEl, data, opt);\n };\n LargeSymbolDraw.prototype.updateLayout = function (data) {\n var points = data.getLayout('points');\n this.group.eachChild(function (child) {\n if (child.startIndex != null) {\n var len = (child.endIndex - child.startIndex) * 2;\n var byteOffset = child.startIndex * 4 * 2;\n points = new Float32Array(points.buffer, byteOffset, len);\n }\n child.setShape('points', points);\n // Reset draw cursor.\n child.reset();\n });\n };\n LargeSymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._clear();\n };\n LargeSymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {\n var lastAdded = this._newAdded[0];\n var points = data.getLayout('points');\n var oldPoints = lastAdded && lastAdded.shape.points;\n // Merging the exists. Each element has 1e4 points.\n // Consider the performance balance between too much elements and too much points in one shape(may affect hover optimization)\n if (oldPoints && oldPoints.length < 2e4) {\n var oldLen = oldPoints.length;\n var newPoints = new Float32Array(oldLen + points.length);\n // Concat two array\n newPoints.set(oldPoints);\n newPoints.set(points, oldLen);\n // Update endIndex\n lastAdded.endIndex = taskParams.end;\n lastAdded.setShape({\n points: newPoints\n });\n } else {\n // Clear\n this._newAdded = [];\n var symbolEl = this._create();\n symbolEl.startIndex = taskParams.start;\n symbolEl.endIndex = taskParams.end;\n symbolEl.incremental = true;\n symbolEl.setShape({\n points: points\n });\n this._setCommon(symbolEl, data, opt);\n }\n };\n LargeSymbolDraw.prototype.eachRendered = function (cb) {\n this._newAdded[0] && cb(this._newAdded[0]);\n };\n LargeSymbolDraw.prototype._create = function () {\n var symbolEl = new LargeSymbolPath({\n cursor: 'default'\n });\n symbolEl.ignoreCoarsePointer = true;\n this.group.add(symbolEl);\n this._newAdded.push(symbolEl);\n return symbolEl;\n };\n LargeSymbolDraw.prototype._setCommon = function (symbolEl, data, opt) {\n var hostModel = data.hostModel;\n opt = opt || {};\n var size = data.getVisual('symbolSize');\n symbolEl.setShape('size', size instanceof Array ? size : [size, size]);\n symbolEl.softClipShape = opt.clipShape || null;\n // Create symbolProxy to build path for each data\n symbolEl.symbolProxy = createSymbol(data.getVisual('symbol'), 0, 0, 0, 0);\n // Use symbolProxy setColor method\n symbolEl.setColor = symbolEl.symbolProxy.setColor;\n var extrudeShadow = symbolEl.shape.size[0] < BOOST_SIZE_THRESHOLD;\n symbolEl.useStyle(\n // Draw shadow when doing fillRect is extremely slow.\n hostModel.getModel('itemStyle').getItemStyle(extrudeShadow ? ['color', 'shadowBlur', 'shadowColor'] : ['color']));\n var globalStyle = data.getVisual('style');\n var visualColor = globalStyle && globalStyle.fill;\n if (visualColor) {\n symbolEl.setColor(visualColor);\n }\n var ecData = getECData(symbolEl);\n // Enable tooltip\n // PENDING May have performance issue when path is extremely large\n ecData.seriesIndex = hostModel.seriesIndex;\n symbolEl.on('mousemove', function (e) {\n ecData.dataIndex = null;\n var dataIndex = symbolEl.hoverDataIdx;\n if (dataIndex >= 0) {\n // Provide dataIndex for tooltip\n ecData.dataIndex = dataIndex + (symbolEl.startIndex || 0);\n }\n });\n };\n LargeSymbolDraw.prototype.remove = function () {\n this._clear();\n };\n LargeSymbolDraw.prototype._clear = function () {\n this._newAdded = [];\n this.group.removeAll();\n };\n return LargeSymbolDraw;\n}();\nexport default LargeSymbolDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport LargeSymbolDraw from '../helper/LargeSymbolDraw.js';\nimport pointsLayout from '../../layout/points.js';\nimport ChartView from '../../view/Chart.js';\nvar ScatterView = /** @class */function (_super) {\n __extends(ScatterView, _super);\n function ScatterView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScatterView.type;\n return _this;\n }\n ScatterView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n symbolDraw.updateData(data, {\n // TODO\n // If this parameter should be a shape or a bounding volume\n // shape will be more general.\n // But bounding volume like bounding rect will be much faster in the contain calculation\n clipShape: this._getClipShape(seriesModel)\n });\n this._finished = true;\n };\n ScatterView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n symbolDraw.incrementalPrepareUpdate(data);\n this._finished = false;\n };\n ScatterView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) {\n this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), {\n clipShape: this._getClipShape(seriesModel)\n });\n this._finished = taskParams.end === seriesModel.getData().count();\n };\n ScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n // Must mark group dirty and make sure the incremental layer will be cleared\n // PENDING\n this.group.dirty();\n if (!this._finished || data.count() > 1e4) {\n return {\n update: true\n };\n } else {\n var res = pointsLayout('').reset(seriesModel, ecModel, api);\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count(),\n count: data.count()\n }, data);\n }\n this._symbolDraw.updateLayout(data);\n }\n };\n ScatterView.prototype.eachRendered = function (cb) {\n this._symbolDraw && this._symbolDraw.eachRendered(cb);\n };\n ScatterView.prototype._getClipShape = function (seriesModel) {\n if (!seriesModel.get('clip', true)) {\n return;\n }\n var coordSys = seriesModel.coordinateSystem;\n // PENDING make `0.1` configurable, for example, `clipTolerance`?\n return coordSys && coordSys.getArea && coordSys.getArea(.1);\n };\n ScatterView.prototype._updateSymbolDraw = function (data, seriesModel) {\n var symbolDraw = this._symbolDraw;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n if (!symbolDraw || isLargeDraw !== this._isLargeDraw) {\n symbolDraw && symbolDraw.remove();\n symbolDraw = this._symbolDraw = isLargeDraw ? new LargeSymbolDraw() : new SymbolDraw();\n this._isLargeDraw = isLargeDraw;\n this.group.removeAll();\n }\n this.group.add(symbolDraw.group);\n return symbolDraw;\n };\n ScatterView.prototype.remove = function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(true);\n this._symbolDraw = null;\n };\n ScatterView.prototype.dispose = function () {};\n ScatterView.type = 'scatter';\n return ScatterView;\n}(ChartView);\nexport default ScatterView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar GridModel = /** @class */function (_super) {\n __extends(GridModel, _super);\n function GridModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridModel.type = 'grid';\n GridModel.dependencies = ['xAxis', 'yAxis'];\n GridModel.layoutMode = 'box';\n GridModel.defaultOption = {\n show: false,\n // zlevel: 0,\n z: 0,\n left: '10%',\n top: 60,\n right: '10%',\n bottom: 70,\n // If grid size contain label\n containLabel: false,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n backgroundColor: 'rgba(0,0,0,0)',\n borderWidth: 1,\n borderColor: '#ccc'\n };\n return GridModel;\n}(ComponentModel);\nexport default GridModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar CartesianAxisModel = /** @class */function (_super) {\n __extends(CartesianAxisModel, _super);\n function CartesianAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CartesianAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('grid', SINGLE_REFERRING).models[0];\n };\n CartesianAxisModel.type = 'cartesian2dAxis';\n return CartesianAxisModel;\n}(ComponentModel);\nexport { CartesianAxisModel };\nzrUtil.mixin(CartesianAxisModel, AxisModelCommonMixin);\nexport default CartesianAxisModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar defaultOption = {\n show: true,\n // zlevel: 0,\n z: 0,\n // Inverse the axis.\n inverse: false,\n // Axis name displayed.\n name: '',\n // 'start' | 'middle' | 'end'\n nameLocation: 'end',\n // By degree. By default auto rotate by nameLocation.\n nameRotate: null,\n nameTruncate: {\n maxWidth: null,\n ellipsis: '...',\n placeholder: '.'\n },\n // Use global text style by default.\n nameTextStyle: {},\n // The gap between axisName and axisLine.\n nameGap: 15,\n // Default `false` to support tooltip.\n silent: false,\n // Default `false` to avoid legacy user event listener fail.\n triggerEvent: false,\n tooltip: {\n show: false\n },\n axisPointer: {},\n axisLine: {\n show: true,\n onZero: true,\n onZeroAxisIndex: null,\n lineStyle: {\n color: '#6E7079',\n width: 1,\n type: 'solid'\n },\n // The arrow at both ends the the axis.\n symbol: ['none', 'none'],\n symbolSize: [10, 15]\n },\n axisTick: {\n show: true,\n // Whether axisTick is inside the grid or outside the grid.\n inside: false,\n // The length of axisTick.\n length: 5,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n // Whether axisLabel is inside the grid or outside the grid.\n inside: false,\n rotate: 0,\n // true | false | null/undefined (auto)\n showMinLabel: null,\n // true | false | null/undefined (auto)\n showMaxLabel: null,\n margin: 8,\n // formatter: null,\n fontSize: 12\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: ['#E0E6F1'],\n width: 1,\n type: 'solid'\n }\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)']\n }\n }\n};\nvar categoryAxis = zrUtil.merge({\n // The gap at both ends of the axis. For categoryAxis, boolean.\n boundaryGap: true,\n // Set false to faster category collection.\n deduplication: null,\n // splitArea: {\n // show: false\n // },\n splitLine: {\n show: false\n },\n axisTick: {\n // If tick is align with label when boundaryGap is true\n alignWithLabel: false,\n interval: 'auto'\n },\n axisLabel: {\n interval: 'auto'\n }\n}, defaultOption);\nvar valueAxis = zrUtil.merge({\n boundaryGap: [0, 0],\n axisLine: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n axisTick: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n // TODO\n // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]\n splitNumber: 5,\n minorTick: {\n // Minor tick, not available for cateogry axis.\n show: false,\n // Split number of minor ticks. The value should be in range of (0, 100)\n splitNumber: 5,\n // Length of minor tick\n length: 3,\n // Line style\n lineStyle: {\n // Default to be same with axisTick\n }\n },\n minorSplitLine: {\n show: false,\n lineStyle: {\n color: '#F4F7FD',\n width: 1\n }\n }\n}, defaultOption);\nvar timeAxis = zrUtil.merge({\n splitNumber: 6,\n axisLabel: {\n // To eliminate labels that are not nice\n showMinLabel: false,\n showMaxLabel: false,\n rich: {\n primary: {\n fontWeight: 'bold'\n }\n }\n },\n splitLine: {\n show: false\n }\n}, valueAxis);\nvar logAxis = zrUtil.defaults({\n logBase: 10\n}, valueAxis);\nexport default {\n category: categoryAxis,\n value: valueAxis,\n time: timeAxis,\n log: logAxis\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport var AXIS_TYPES = {\n value: 1,\n category: 1,\n time: 1,\n log: 1\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport axisDefault from './axisDefault.js';\nimport { getLayoutParams, mergeLayoutParam, fetchLayoutMode } from '../util/layout.js';\nimport OrdinalMeta from '../data/OrdinalMeta.js';\nimport { AXIS_TYPES } from './axisCommonTypes.js';\nimport { each, merge } from 'zrender/lib/core/util.js';\n/**\n * Generate sub axis model class\n * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ...\n */\nexport default function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) {\n each(AXIS_TYPES, function (v, axisType) {\n var defaultOption = merge(merge({}, axisDefault[axisType], true), extraDefaultOption, true);\n var AxisModel = /** @class */function (_super) {\n __extends(AxisModel, _super);\n function AxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = axisName + 'Axis.' + axisType;\n return _this;\n }\n AxisModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n merge(option, themeModel.get(axisType + 'Axis'));\n merge(option, this.getDefaultOption());\n option.type = getAxisType(option);\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n AxisModel.prototype.optionUpdated = function () {\n var thisOption = this.option;\n if (thisOption.type === 'category') {\n this.__ordinalMeta = OrdinalMeta.createByAxisModel(this);\n }\n };\n /**\n * Should not be called before all of 'getInitailData' finished.\n * Because categories are collected during initializing data.\n */\n AxisModel.prototype.getCategories = function (rawData) {\n var option = this.option;\n // FIXME\n // warning if called before all of 'getInitailData' finished.\n if (option.type === 'category') {\n if (rawData) {\n return option.data;\n }\n return this.__ordinalMeta.categories;\n }\n };\n AxisModel.prototype.getOrdinalMeta = function () {\n return this.__ordinalMeta;\n };\n AxisModel.type = axisName + 'Axis.' + axisType;\n AxisModel.defaultOption = defaultOption;\n return AxisModel;\n }(BaseAxisModelClass);\n registers.registerComponentModel(AxisModel);\n });\n registers.registerSubTypeDefaulter(axisName + 'Axis', getAxisType);\n}\nfunction getAxisType(option) {\n // Default axis with data is category axis\n return option.type || (option.data ? 'category' : 'value');\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar Cartesian = /** @class */function () {\n function Cartesian(name) {\n this.type = 'cartesian';\n this._dimList = [];\n this._axes = {};\n this.name = name || '';\n }\n Cartesian.prototype.getAxis = function (dim) {\n return this._axes[dim];\n };\n Cartesian.prototype.getAxes = function () {\n return zrUtil.map(this._dimList, function (dim) {\n return this._axes[dim];\n }, this);\n };\n Cartesian.prototype.getAxesByScale = function (scaleType) {\n scaleType = scaleType.toLowerCase();\n return zrUtil.filter(this.getAxes(), function (axis) {\n return axis.scale.type === scaleType;\n });\n };\n Cartesian.prototype.addAxis = function (axis) {\n var dim = axis.dim;\n this._axes[dim] = axis;\n this._dimList.push(dim);\n };\n return Cartesian;\n}();\n;\nexport default Cartesian;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Cartesian from './Cartesian.js';\nimport { invert } from 'zrender/lib/core/matrix.js';\nimport { applyTransform } from 'zrender/lib/core/vector.js';\nexport var cartesian2DDimensions = ['x', 'y'];\nfunction canCalculateAffineTransform(scale) {\n return scale.type === 'interval' || scale.type === 'time';\n}\nvar Cartesian2D = /** @class */function (_super) {\n __extends(Cartesian2D, _super);\n function Cartesian2D() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'cartesian2d';\n _this.dimensions = cartesian2DDimensions;\n return _this;\n }\n /**\n * Calculate an affine transform matrix if two axes are time or value.\n * It's mainly for accelartion on the large time series data.\n */\n Cartesian2D.prototype.calcAffineTransform = function () {\n this._transform = this._invTransform = null;\n var xAxisScale = this.getAxis('x').scale;\n var yAxisScale = this.getAxis('y').scale;\n if (!canCalculateAffineTransform(xAxisScale) || !canCalculateAffineTransform(yAxisScale)) {\n return;\n }\n var xScaleExtent = xAxisScale.getExtent();\n var yScaleExtent = yAxisScale.getExtent();\n var start = this.dataToPoint([xScaleExtent[0], yScaleExtent[0]]);\n var end = this.dataToPoint([xScaleExtent[1], yScaleExtent[1]]);\n var xScaleSpan = xScaleExtent[1] - xScaleExtent[0];\n var yScaleSpan = yScaleExtent[1] - yScaleExtent[0];\n if (!xScaleSpan || !yScaleSpan) {\n return;\n }\n // Accelerate data to point calculation on the special large time series data.\n var scaleX = (end[0] - start[0]) / xScaleSpan;\n var scaleY = (end[1] - start[1]) / yScaleSpan;\n var translateX = start[0] - xScaleExtent[0] * scaleX;\n var translateY = start[1] - yScaleExtent[0] * scaleY;\n var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY];\n this._invTransform = invert([], m);\n };\n /**\n * Base axis will be used on stacking.\n */\n Cartesian2D.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x');\n };\n Cartesian2D.prototype.containPoint = function (point) {\n var axisX = this.getAxis('x');\n var axisY = this.getAxis('y');\n return axisX.contain(axisX.toLocalCoord(point[0])) && axisY.contain(axisY.toLocalCoord(point[1]));\n };\n Cartesian2D.prototype.containData = function (data) {\n return this.getAxis('x').containData(data[0]) && this.getAxis('y').containData(data[1]);\n };\n Cartesian2D.prototype.containZone = function (data1, data2) {\n var zoneDiag1 = this.dataToPoint(data1);\n var zoneDiag2 = this.dataToPoint(data2);\n var area = this.getArea();\n var zone = new BoundingRect(zoneDiag1[0], zoneDiag1[1], zoneDiag2[0] - zoneDiag1[0], zoneDiag2[1] - zoneDiag1[1]);\n return area.intersect(zone);\n };\n Cartesian2D.prototype.dataToPoint = function (data, clamp, out) {\n out = out || [];\n var xVal = data[0];\n var yVal = data[1];\n // Fast path\n if (this._transform\n // It's supported that if data is like `[Inifity, 123]`, where only Y pixel calculated.\n && xVal != null && isFinite(xVal) && yVal != null && isFinite(yVal)) {\n return applyTransform(out, data, this._transform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(xVal, clamp));\n out[1] = yAxis.toGlobalCoord(yAxis.dataToCoord(yVal, clamp));\n return out;\n };\n Cartesian2D.prototype.clampData = function (data, out) {\n var xScale = this.getAxis('x').scale;\n var yScale = this.getAxis('y').scale;\n var xAxisExtent = xScale.getExtent();\n var yAxisExtent = yScale.getExtent();\n var x = xScale.parse(data[0]);\n var y = yScale.parse(data[1]);\n out = out || [];\n out[0] = Math.min(Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x), Math.max(xAxisExtent[0], xAxisExtent[1]));\n out[1] = Math.min(Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y), Math.max(yAxisExtent[0], yAxisExtent[1]));\n return out;\n };\n Cartesian2D.prototype.pointToData = function (point, clamp) {\n var out = [];\n if (this._invTransform) {\n return applyTransform(out, point, this._invTransform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.coordToData(xAxis.toLocalCoord(point[0]), clamp);\n out[1] = yAxis.coordToData(yAxis.toLocalCoord(point[1]), clamp);\n return out;\n };\n Cartesian2D.prototype.getOtherAxis = function (axis) {\n return this.getAxis(axis.dim === 'x' ? 'y' : 'x');\n };\n /**\n * Get rect area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Cartesian2D.prototype.getArea = function (tolerance) {\n tolerance = tolerance || 0;\n var xExtent = this.getAxis('x').getGlobalExtent();\n var yExtent = this.getAxis('y').getGlobalExtent();\n var x = Math.min(xExtent[0], xExtent[1]) - tolerance;\n var y = Math.min(yExtent[0], yExtent[1]) - tolerance;\n var width = Math.max(xExtent[0], xExtent[1]) - x + tolerance;\n var height = Math.max(yExtent[0], yExtent[1]) - y + tolerance;\n return new BoundingRect(x, y, width, height);\n };\n return Cartesian2D;\n}(Cartesian);\n;\nexport default Cartesian2D;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar Axis2D = /** @class */function (_super) {\n __extends(Axis2D, _super);\n function Axis2D(dim, scale, coordExtent, axisType, position) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n /**\n * Index of axis, can be used as key\n * Injected outside.\n */\n _this.index = 0;\n _this.type = axisType || 'value';\n _this.position = position || 'bottom';\n return _this;\n }\n Axis2D.prototype.isHorizontal = function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n };\n /**\n * Each item cooresponds to this.getExtent(), which\n * means globalExtent[0] may greater than globalExtent[1],\n * unless `asc` is input.\n *\n * @param {boolean} [asc]\n * @return {Array.}\n */\n Axis2D.prototype.getGlobalExtent = function (asc) {\n var ret = this.getExtent();\n ret[0] = this.toGlobalCoord(ret[0]);\n ret[1] = this.toGlobalCoord(ret[1]);\n asc && ret[0] > ret[1] && ret.reverse();\n return ret;\n };\n Axis2D.prototype.pointToData = function (point, clamp) {\n return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp);\n };\n /**\n * Set ordinalSortInfo\n * @param info new OrdinalSortInfo\n */\n Axis2D.prototype.setCategorySortInfo = function (info) {\n if (this.type !== 'category') {\n return false;\n }\n this.model.option.categorySortInfo = info;\n this.scale.setSortInfo(info);\n };\n return Axis2D;\n}(Axis);\nexport default Axis2D;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Can only be called after coordinate system creation stage.\n * (Can be called before coordinate system update stage).\n */\nexport function layout(gridModel, axisModel, opt) {\n opt = opt || {};\n var grid = gridModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0];\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n var rect = grid.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {\n left: 0,\n right: 1,\n top: 0,\n bottom: 1,\n onZero: 2\n };\n var axisOffset = axisModel.get('offset') || 0;\n var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset];\n if (otherAxisOnZeroOf) {\n var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0));\n posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]);\n }\n // Axis position\n layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]];\n // Axis rotation\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1);\n // Tick and label direction, x y is axisDim\n var dirMap = {\n top: -1,\n bottom: 1,\n left: -1,\n right: 1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];\n layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0;\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n if (zrUtil.retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n }\n // Special label rotation\n var labelRotate = axisModel.get(['axisLabel', 'rotate']);\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate;\n // Over splitLine and splitArea\n layout.z2 = 1;\n return layout;\n}\nexport function isCartesian2DSeries(seriesModel) {\n return seriesModel.get('coordinateSystem') === 'cartesian2d';\n}\nexport function findAxisModels(seriesModel) {\n var axisModelMap = {\n xAxisModel: null,\n yAxisModel: null\n };\n zrUtil.each(axisModelMap, function (v, key) {\n var axisType = key.replace(/Model$/, '');\n var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!axisModel) {\n throw new Error(axisType + ' \"' + zrUtil.retrieve3(seriesModel.get(axisType + 'Index'), seriesModel.get(axisType + 'Id'), 0) + '\" not found');\n }\n }\n axisModelMap[key] = axisModel;\n });\n return axisModelMap;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getPrecisionSafe, round } from '../util/number.js';\nimport IntervalScale from '../scale/Interval.js';\nimport { getScaleExtent } from './axisHelper.js';\nimport { warn } from '../util/log.js';\nimport { increaseInterval, isValueNice } from '../scale/helper.js';\nvar mathLog = Math.log;\nexport function alignScaleTicks(scale, axisModel, alignToScale) {\n var intervalScaleProto = IntervalScale.prototype;\n // NOTE: There is a precondition for log scale here:\n // In log scale we store _interval and _extent of exponent value.\n // So if we use the method of InternalScale to set/get these data.\n // It process the exponent value, which is linear and what we want here.\n var alignToTicks = intervalScaleProto.getTicks.call(alignToScale);\n var alignToNicedTicks = intervalScaleProto.getTicks.call(alignToScale, true);\n var alignToSplitNumber = alignToTicks.length - 1;\n var alignToInterval = intervalScaleProto.getInterval.call(alignToScale);\n var scaleExtent = getScaleExtent(scale, axisModel);\n var rawExtent = scaleExtent.extent;\n var isMinFixed = scaleExtent.fixMin;\n var isMaxFixed = scaleExtent.fixMax;\n if (scale.type === 'log') {\n var logBase = mathLog(scale.base);\n rawExtent = [mathLog(rawExtent[0]) / logBase, mathLog(rawExtent[1]) / logBase];\n }\n scale.setExtent(rawExtent[0], rawExtent[1]);\n scale.calcNiceExtent({\n splitNumber: alignToSplitNumber,\n fixMin: isMinFixed,\n fixMax: isMaxFixed\n });\n var extent = intervalScaleProto.getExtent.call(scale);\n // Need to update the rawExtent.\n // Because value in rawExtent may be not parsed. e.g. 'dataMin', 'dataMax'\n if (isMinFixed) {\n rawExtent[0] = extent[0];\n }\n if (isMaxFixed) {\n rawExtent[1] = extent[1];\n }\n var interval = intervalScaleProto.getInterval.call(scale);\n var min = rawExtent[0];\n var max = rawExtent[1];\n if (isMinFixed && isMaxFixed) {\n // User set min, max, divide to get new interval\n interval = (max - min) / alignToSplitNumber;\n } else if (isMinFixed) {\n max = rawExtent[0] + interval * alignToSplitNumber;\n // User set min, expand extent on the other side\n while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1])) {\n interval = increaseInterval(interval);\n max = rawExtent[0] + interval * alignToSplitNumber;\n }\n } else if (isMaxFixed) {\n // User set max, expand extent on the other side\n min = rawExtent[1] - interval * alignToSplitNumber;\n while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0])) {\n interval = increaseInterval(interval);\n min = rawExtent[1] - interval * alignToSplitNumber;\n }\n } else {\n var nicedSplitNumber = scale.getTicks().length - 1;\n if (nicedSplitNumber > alignToSplitNumber) {\n interval = increaseInterval(interval);\n }\n var range = interval * alignToSplitNumber;\n max = Math.ceil(rawExtent[1] / interval) * interval;\n min = round(max - range);\n // Not change the result that crossing zero.\n if (min < 0 && rawExtent[0] >= 0) {\n min = 0;\n max = round(range);\n } else if (max > 0 && rawExtent[1] <= 0) {\n max = 0;\n min = -round(range);\n }\n }\n // Adjust min, max based on the extent of alignTo. When min or max is set in alignTo scale\n var t0 = (alignToTicks[0].value - alignToNicedTicks[0].value) / alignToInterval;\n var t1 = (alignToTicks[alignToSplitNumber].value - alignToNicedTicks[alignToSplitNumber].value) / alignToInterval;\n // NOTE: Must in setExtent -> setInterval -> setNiceExtent order.\n intervalScaleProto.setExtent.call(scale, min + interval * t0, max + interval * t1);\n intervalScaleProto.setInterval.call(scale, interval);\n if (t0 || t1) {\n intervalScaleProto.setNiceExtent.call(scale, min + interval, max - interval);\n }\n if (process.env.NODE_ENV !== 'production') {\n var ticks = intervalScaleProto.getTicks.call(scale);\n if (ticks[1] && (!isValueNice(interval) || getPrecisionSafe(ticks[1].value) > getPrecisionSafe(interval))) {\n warn(\n // eslint-disable-next-line\n \"The ticks may be not readable when set min: \" + axisModel.get('min') + \", max: \" + axisModel.get('max') + \" and alignTicks: true\");\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Grid is a region which contains at most 4 cartesian systems\n *\n * TODO Default cartesian\n */\nimport { isObject, each, indexOf, retrieve3, keys } from 'zrender/lib/core/util.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport { createScaleByModel, ifAxisCrossZero, niceScaleExtent, estimateLabelUnionRect, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\nimport Cartesian2D, { cartesian2DDimensions } from './Cartesian2D.js';\nimport Axis2D from './Axis2D.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { isCartesian2DSeries, findAxisModels } from './cartesianAxisHelper.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\nimport { alignScaleTicks } from '../axisAlignTicks.js';\nvar Grid = /** @class */function () {\n function Grid(gridModel, ecModel, api) {\n // FIXME:TS where used (different from registered type 'cartesian2d')?\n this.type = 'grid';\n this._coordsMap = {};\n this._coordsList = [];\n this._axesMap = {};\n this._axesList = [];\n this.axisPointerEnabled = true;\n this.dimensions = cartesian2DDimensions;\n this._initCartesian(gridModel, ecModel, api);\n this.model = gridModel;\n }\n Grid.prototype.getRect = function () {\n return this._rect;\n };\n Grid.prototype.update = function (ecModel, api) {\n var axesMap = this._axesMap;\n this._updateScale(ecModel, this.model);\n function updateAxisTicks(axes) {\n var alignTo;\n // Axis is added in order of axisIndex.\n var axesIndices = keys(axes);\n var len = axesIndices.length;\n if (!len) {\n return;\n }\n var axisNeedsAlign = [];\n // Process once and calculate the ticks for those don't use alignTicks.\n for (var i = len - 1; i >= 0; i--) {\n var idx = +axesIndices[i]; // Convert to number.\n var axis = axes[idx];\n var model = axis.model;\n var scale = axis.scale;\n if (\n // Only value and log axis without interval support alignTicks.\n isIntervalOrLogScale(scale) && model.get('alignTicks') && model.get('interval') == null) {\n axisNeedsAlign.push(axis);\n } else {\n niceScaleExtent(scale, model);\n if (isIntervalOrLogScale(scale)) {\n // Can only align to interval or log axis.\n alignTo = axis;\n }\n }\n }\n ;\n // All axes has set alignTicks. Pick the first one.\n // PENDING. Should we find the axis that both set interval, min, max and align to this one?\n if (axisNeedsAlign.length) {\n if (!alignTo) {\n alignTo = axisNeedsAlign.pop();\n niceScaleExtent(alignTo.scale, alignTo.model);\n }\n each(axisNeedsAlign, function (axis) {\n alignScaleTicks(axis.scale, axis.model, alignTo.scale);\n });\n }\n }\n updateAxisTicks(axesMap.x);\n updateAxisTicks(axesMap.y);\n // Key: axisDim_axisIndex, value: boolean, whether onZero target.\n var onZeroRecords = {};\n each(axesMap.x, function (xAxis) {\n fixAxisOnZero(axesMap, 'y', xAxis, onZeroRecords);\n });\n each(axesMap.y, function (yAxis) {\n fixAxisOnZero(axesMap, 'x', yAxis, onZeroRecords);\n });\n // Resize again if containLabel is enabled\n // FIXME It may cause getting wrong grid size in data processing stage\n this.resize(this.model, api);\n };\n /**\n * Resize the grid\n */\n Grid.prototype.resize = function (gridModel, api, ignoreContainLabel) {\n var boxLayoutParams = gridModel.getBoxLayoutParams();\n var isContainLabel = !ignoreContainLabel && gridModel.get('containLabel');\n var gridRect = getLayoutRect(boxLayoutParams, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._rect = gridRect;\n var axesList = this._axesList;\n adjustAxes();\n // Minus label size\n if (isContainLabel) {\n each(axesList, function (axis) {\n if (!axis.model.get(['axisLabel', 'inside'])) {\n var labelUnionRect = estimateLabelUnionRect(axis);\n if (labelUnionRect) {\n var dim = axis.isHorizontal() ? 'height' : 'width';\n var margin = axis.model.get(['axisLabel', 'margin']);\n gridRect[dim] -= labelUnionRect[dim] + margin;\n if (axis.position === 'top') {\n gridRect.y += labelUnionRect.height + margin;\n } else if (axis.position === 'left') {\n gridRect.x += labelUnionRect.width + margin;\n }\n }\n }\n });\n adjustAxes();\n }\n each(this._coordsList, function (coord) {\n // Calculate affine matrix to accelerate the data to point transform.\n // If all the axes scales are time or value.\n coord.calcAffineTransform();\n });\n function adjustAxes() {\n each(axesList, function (axis) {\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, gridRect.width] : [0, gridRect.height];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n updateAxisTransform(axis, isHorizontal ? gridRect.x : gridRect.y);\n });\n }\n };\n Grid.prototype.getAxis = function (dim, axisIndex) {\n var axesMapOnDim = this._axesMap[dim];\n if (axesMapOnDim != null) {\n return axesMapOnDim[axisIndex || 0];\n }\n };\n Grid.prototype.getAxes = function () {\n return this._axesList.slice();\n };\n Grid.prototype.getCartesian = function (xAxisIndex, yAxisIndex) {\n if (xAxisIndex != null && yAxisIndex != null) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n return this._coordsMap[key];\n }\n if (isObject(xAxisIndex)) {\n yAxisIndex = xAxisIndex.yAxisIndex;\n xAxisIndex = xAxisIndex.xAxisIndex;\n }\n for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) {\n if (coordList[i].getAxis('x').index === xAxisIndex || coordList[i].getAxis('y').index === yAxisIndex) {\n return coordList[i];\n }\n }\n };\n Grid.prototype.getCartesians = function () {\n return this._coordsList.slice();\n };\n /**\n * @implements\n */\n Grid.prototype.convertToPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null;\n };\n /**\n * @implements\n */\n Grid.prototype.convertFromPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.pointToData(value) : target.axis ? target.axis.coordToData(target.axis.toLocalCoord(value)) : null;\n };\n Grid.prototype._findConvertTarget = function (finder) {\n var seriesModel = finder.seriesModel;\n var xAxisModel = finder.xAxisModel || seriesModel && seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0];\n var yAxisModel = finder.yAxisModel || seriesModel && seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0];\n var gridModel = finder.gridModel;\n var coordsList = this._coordsList;\n var cartesian;\n var axis;\n if (seriesModel) {\n cartesian = seriesModel.coordinateSystem;\n indexOf(coordsList, cartesian) < 0 && (cartesian = null);\n } else if (xAxisModel && yAxisModel) {\n cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n } else if (xAxisModel) {\n axis = this.getAxis('x', xAxisModel.componentIndex);\n } else if (yAxisModel) {\n axis = this.getAxis('y', yAxisModel.componentIndex);\n }\n // Lowest priority.\n else if (gridModel) {\n var grid = gridModel.coordinateSystem;\n if (grid === this) {\n cartesian = this._coordsList[0];\n }\n }\n return {\n cartesian: cartesian,\n axis: axis\n };\n };\n /**\n * @implements\n */\n Grid.prototype.containPoint = function (point) {\n var coord = this._coordsList[0];\n if (coord) {\n return coord.containPoint(point);\n }\n };\n /**\n * Initialize cartesian coordinate systems\n */\n Grid.prototype._initCartesian = function (gridModel, ecModel, api) {\n var _this = this;\n var grid = this;\n var axisPositionUsed = {\n left: false,\n right: false,\n top: false,\n bottom: false\n };\n var axesMap = {\n x: {},\n y: {}\n };\n var axesCount = {\n x: 0,\n y: 0\n };\n // Create axis\n ecModel.eachComponent('xAxis', createAxisCreator('x'), this);\n ecModel.eachComponent('yAxis', createAxisCreator('y'), this);\n if (!axesCount.x || !axesCount.y) {\n // Roll back when there no either x or y axis\n this._axesMap = {};\n this._axesList = [];\n return;\n }\n this._axesMap = axesMap;\n // Create cartesian2d\n each(axesMap.x, function (xAxis, xAxisIndex) {\n each(axesMap.y, function (yAxis, yAxisIndex) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n var cartesian = new Cartesian2D(key);\n cartesian.master = _this;\n cartesian.model = gridModel;\n _this._coordsMap[key] = cartesian;\n _this._coordsList.push(cartesian);\n cartesian.addAxis(xAxis);\n cartesian.addAxis(yAxis);\n });\n });\n function createAxisCreator(dimName) {\n return function (axisModel, idx) {\n if (!isAxisUsedInTheGrid(axisModel, gridModel)) {\n return;\n }\n var axisPosition = axisModel.get('position');\n if (dimName === 'x') {\n // Fix position\n if (axisPosition !== 'top' && axisPosition !== 'bottom') {\n // Default bottom of X\n axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom';\n }\n } else {\n // Fix position\n if (axisPosition !== 'left' && axisPosition !== 'right') {\n // Default left of Y\n axisPosition = axisPositionUsed.left ? 'right' : 'left';\n }\n }\n axisPositionUsed[axisPosition] = true;\n var axis = new Axis2D(dimName, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisPosition);\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n // Inject axis into axisModel\n axisModel.axis = axis;\n // Inject axisModel into axis\n axis.model = axisModel;\n // Inject grid info axis\n axis.grid = grid;\n // Index of axis, can be used as key\n axis.index = idx;\n grid._axesList.push(axis);\n axesMap[dimName][idx] = axis;\n axesCount[dimName]++;\n };\n }\n };\n /**\n * Update cartesian properties from series.\n */\n Grid.prototype._updateScale = function (ecModel, gridModel) {\n // Reset scale\n each(this._axesList, function (axis) {\n axis.scale.setExtent(Infinity, -Infinity);\n if (axis.type === 'category') {\n var categorySortInfo = axis.model.get('categorySortInfo');\n axis.scale.setSortInfo(categorySortInfo);\n }\n });\n ecModel.eachSeries(function (seriesModel) {\n if (isCartesian2DSeries(seriesModel)) {\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n if (!isAxisUsedInTheGrid(xAxisModel, gridModel) || !isAxisUsedInTheGrid(yAxisModel, gridModel)) {\n return;\n }\n var cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n var data = seriesModel.getData();\n var xAxis = cartesian.getAxis('x');\n var yAxis = cartesian.getAxis('y');\n unionExtent(data, xAxis);\n unionExtent(data, yAxis);\n }\n }, this);\n function unionExtent(data, axis) {\n each(getDataDimensionsOnAxis(data, axis.dim), function (dim) {\n axis.scale.unionExtentFromData(data, dim);\n });\n }\n };\n /**\n * @param dim 'x' or 'y' or 'auto' or null/undefined\n */\n Grid.prototype.getTooltipAxes = function (dim) {\n var baseAxes = [];\n var otherAxes = [];\n each(this.getCartesians(), function (cartesian) {\n var baseAxis = dim != null && dim !== 'auto' ? cartesian.getAxis(dim) : cartesian.getBaseAxis();\n var otherAxis = cartesian.getOtherAxis(baseAxis);\n indexOf(baseAxes, baseAxis) < 0 && baseAxes.push(baseAxis);\n indexOf(otherAxes, otherAxis) < 0 && otherAxes.push(otherAxis);\n });\n return {\n baseAxes: baseAxes,\n otherAxes: otherAxes\n };\n };\n Grid.create = function (ecModel, api) {\n var grids = [];\n ecModel.eachComponent('grid', function (gridModel, idx) {\n var grid = new Grid(gridModel, ecModel, api);\n grid.name = 'grid_' + idx;\n // dataSampling requires axis extent, so resize\n // should be performed in create stage.\n grid.resize(gridModel, api, true);\n gridModel.coordinateSystem = grid;\n grids.push(grid);\n });\n // Inject the coordinateSystems into seriesModel\n ecModel.eachSeries(function (seriesModel) {\n if (!isCartesian2DSeries(seriesModel)) {\n return;\n }\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n var gridModel = xAxisModel.getCoordSysModel();\n if (process.env.NODE_ENV !== 'production') {\n if (!gridModel) {\n throw new Error('Grid \"' + retrieve3(xAxisModel.get('gridIndex'), xAxisModel.get('gridId'), 0) + '\" not found');\n }\n if (xAxisModel.getCoordSysModel() !== yAxisModel.getCoordSysModel()) {\n throw new Error('xAxis and yAxis must use the same grid');\n }\n }\n var grid = gridModel.coordinateSystem;\n seriesModel.coordinateSystem = grid.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n });\n return grids;\n };\n // For deciding which dimensions to use when creating list data\n Grid.dimensions = cartesian2DDimensions;\n return Grid;\n}();\n/**\n * Check if the axis is used in the specified grid.\n */\nfunction isAxisUsedInTheGrid(axisModel, gridModel) {\n return axisModel.getCoordSysModel() === gridModel;\n}\nfunction fixAxisOnZero(axesMap, otherAxisDim, axis,\n// Key: see `getOnZeroRecordKey`\nonZeroRecords) {\n axis.getAxesOnZeroOf = function () {\n // TODO: onZero of multiple axes.\n return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : [];\n };\n // onZero can not be enabled in these two situations:\n // 1. When any other axis is a category axis.\n // 2. When no axis is cross 0 point.\n var otherAxes = axesMap[otherAxisDim];\n var otherAxisOnZeroOf;\n var axisModel = axis.model;\n var onZero = axisModel.get(['axisLine', 'onZero']);\n var onZeroAxisIndex = axisModel.get(['axisLine', 'onZeroAxisIndex']);\n if (!onZero) {\n return;\n }\n // If target axis is specified.\n if (onZeroAxisIndex != null) {\n if (canOnZeroToAxis(otherAxes[onZeroAxisIndex])) {\n otherAxisOnZeroOf = otherAxes[onZeroAxisIndex];\n }\n } else {\n // Find the first available other axis.\n for (var idx in otherAxes) {\n if (otherAxes.hasOwnProperty(idx) && canOnZeroToAxis(otherAxes[idx])\n // Consider that two Y axes on one value axis,\n // if both onZero, the two Y axes overlap.\n && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]) {\n otherAxisOnZeroOf = otherAxes[idx];\n break;\n }\n }\n }\n if (otherAxisOnZeroOf) {\n onZeroRecords[getOnZeroRecordKey(otherAxisOnZeroOf)] = true;\n }\n function getOnZeroRecordKey(axis) {\n return axis.dim + '_' + axis.index;\n }\n}\nfunction canOnZeroToAxis(axis) {\n return axis && axis.type !== 'category' && axis.type !== 'time' && ifAxisCrossZero(axis);\n}\nfunction updateAxisTransform(axis, coordBase) {\n var axisExtent = axis.getExtent();\n var axisExtentSum = axisExtent[0] + axisExtent[1];\n // Fast transform\n axis.toGlobalCoord = axis.dim === 'x' ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n axis.toLocalCoord = axis.dim === 'x' ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n}\nexport default Grid;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieve, defaults, extend, each, isObject, map, isString, isNumber, isFunction, retrieve2 } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport { isRadianAroundZero, remRadian } from '../../util/number.js';\nimport { createSymbol, normalizeSymbolOffset } from '../../util/symbol.js';\nimport * as matrixUtil from 'zrender/lib/core/matrix.js';\nimport { applyTransform as v2ApplyTransform } from 'zrender/lib/core/vector.js';\nimport { shouldShowAllLabels } from '../../coord/axisHelper.js';\nimport { prepareLayoutList, hideOverlap } from '../../label/labelLayoutHelper.js';\nvar PI = Math.PI;\n/**\n * A final axis is translated and rotated from a \"standard axis\".\n * So opt.position and opt.rotation is required.\n *\n * A standard axis is and axis from [0, 0] to [0, axisExtent[1]],\n * for example: (0, 0) ------------> (0, 50)\n *\n * nameDirection or tickDirection or labelDirection is 1 means tick\n * or label is below the standard axis, whereas is -1 means above\n * the standard axis. labelOffset means offset between label and axis,\n * which is useful when 'onZero', where axisLabel is in the grid and\n * label in outside grid.\n *\n * Tips: like always,\n * positive rotation represents anticlockwise, and negative rotation\n * represents clockwise.\n * The direction of position coordinate is the same as the direction\n * of screen coordinate.\n *\n * Do not need to consider axis 'inverse', which is auto processed by\n * axis extent.\n */\nvar AxisBuilder = /** @class */function () {\n function AxisBuilder(axisModel, opt) {\n this.group = new graphic.Group();\n this.opt = opt;\n this.axisModel = axisModel;\n // Default value\n defaults(opt, {\n labelOffset: 0,\n nameDirection: 1,\n tickDirection: 1,\n labelDirection: 1,\n silent: true,\n handleAutoShown: function () {\n return true;\n }\n });\n // FIXME Not use a separate text group?\n var transformGroup = new graphic.Group({\n x: opt.position[0],\n y: opt.position[1],\n rotation: opt.rotation\n });\n // this.group.add(transformGroup);\n // this._transformGroup = transformGroup;\n transformGroup.updateTransform();\n this._transformGroup = transformGroup;\n }\n AxisBuilder.prototype.hasBuilder = function (name) {\n return !!builders[name];\n };\n AxisBuilder.prototype.add = function (name) {\n builders[name](this.opt, this.axisModel, this.group, this._transformGroup);\n };\n AxisBuilder.prototype.getGroup = function () {\n return this.group;\n };\n AxisBuilder.innerTextLayout = function (axisRotation, textRotation, direction) {\n var rotationDiff = remRadian(textRotation - axisRotation);\n var textAlign;\n var textVerticalAlign;\n if (isRadianAroundZero(rotationDiff)) {\n // Label is parallel with axis line.\n textVerticalAlign = direction > 0 ? 'top' : 'bottom';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI)) {\n // Label is inverse parallel with axis line.\n textVerticalAlign = direction > 0 ? 'bottom' : 'top';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff > 0 && rotationDiff < PI) {\n textAlign = direction > 0 ? 'right' : 'left';\n } else {\n textAlign = direction > 0 ? 'left' : 'right';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n };\n AxisBuilder.makeAxisEventDataBase = function (axisModel) {\n var eventData = {\n componentType: axisModel.mainType,\n componentIndex: axisModel.componentIndex\n };\n eventData[axisModel.mainType + 'Index'] = axisModel.componentIndex;\n return eventData;\n };\n AxisBuilder.isLabelSilent = function (axisModel) {\n var tooltipOpt = axisModel.get('tooltip');\n return axisModel.get('silent')\n // Consider mouse cursor, add these restrictions.\n || !(axisModel.get('triggerEvent') || tooltipOpt && tooltipOpt.show);\n };\n return AxisBuilder;\n}();\n;\nvar builders = {\n axisLine: function (opt, axisModel, group, transformGroup) {\n var shown = axisModel.get(['axisLine', 'show']);\n if (shown === 'auto' && opt.handleAutoShown) {\n shown = opt.handleAutoShown('axisLine');\n }\n if (!shown) {\n return;\n }\n var extent = axisModel.axis.getExtent();\n var matrix = transformGroup.transform;\n var pt1 = [extent[0], 0];\n var pt2 = [extent[1], 0];\n var inverse = pt1[0] > pt2[0];\n if (matrix) {\n v2ApplyTransform(pt1, pt1, matrix);\n v2ApplyTransform(pt2, pt2, matrix);\n }\n var lineStyle = extend({\n lineCap: 'round'\n }, axisModel.getModel(['axisLine', 'lineStyle']).getLineStyle());\n var line = new graphic.Line({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: lineStyle,\n strokeContainThreshold: opt.strokeContainThreshold || 5,\n silent: true,\n z2: 1\n });\n graphic.subPixelOptimizeLine(line.shape, line.style.lineWidth);\n line.anid = 'line';\n group.add(line);\n var arrows = axisModel.get(['axisLine', 'symbol']);\n if (arrows != null) {\n var arrowSize = axisModel.get(['axisLine', 'symbolSize']);\n if (isString(arrows)) {\n // Use the same arrow for start and end point\n arrows = [arrows, arrows];\n }\n if (isString(arrowSize) || isNumber(arrowSize)) {\n // Use the same size for width and height\n arrowSize = [arrowSize, arrowSize];\n }\n var arrowOffset = normalizeSymbolOffset(axisModel.get(['axisLine', 'symbolOffset']) || 0, arrowSize);\n var symbolWidth_1 = arrowSize[0];\n var symbolHeight_1 = arrowSize[1];\n each([{\n rotate: opt.rotation + Math.PI / 2,\n offset: arrowOffset[0],\n r: 0\n }, {\n rotate: opt.rotation - Math.PI / 2,\n offset: arrowOffset[1],\n r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))\n }], function (point, index) {\n if (arrows[index] !== 'none' && arrows[index] != null) {\n var symbol = createSymbol(arrows[index], -symbolWidth_1 / 2, -symbolHeight_1 / 2, symbolWidth_1, symbolHeight_1, lineStyle.stroke, true);\n // Calculate arrow position with offset\n var r = point.r + point.offset;\n var pt = inverse ? pt2 : pt1;\n symbol.attr({\n rotation: point.rotate,\n x: pt[0] + r * Math.cos(opt.rotation),\n y: pt[1] - r * Math.sin(opt.rotation),\n silent: true,\n z2: 11\n });\n group.add(symbol);\n }\n });\n }\n },\n axisTickLabel: function (opt, axisModel, group, transformGroup) {\n var ticksEls = buildAxisMajorTicks(group, transformGroup, axisModel, opt);\n var labelEls = buildAxisLabel(group, transformGroup, axisModel, opt);\n fixMinMaxLabelShow(axisModel, labelEls, ticksEls);\n buildAxisMinorTicks(group, transformGroup, axisModel, opt.tickDirection);\n // This bit fixes the label overlap issue for the time chart.\n // See https://github.com/apache/echarts/issues/14266 for more.\n if (axisModel.get(['axisLabel', 'hideOverlap'])) {\n var labelList = prepareLayoutList(map(labelEls, function (label) {\n return {\n label: label,\n priority: label.z2,\n defaultAttr: {\n ignore: label.ignore\n }\n };\n }));\n hideOverlap(labelList);\n }\n },\n axisName: function (opt, axisModel, group, transformGroup) {\n var name = retrieve(opt.axisName, axisModel.get('name'));\n if (!name) {\n return;\n }\n var nameLocation = axisModel.get('nameLocation');\n var nameDirection = opt.nameDirection;\n var textStyleModel = axisModel.getModel('nameTextStyle');\n var gap = axisModel.get('nameGap') || 0;\n var extent = axisModel.axis.getExtent();\n var gapSignal = extent[0] > extent[1] ? -1 : 1;\n var pos = [nameLocation === 'start' ? extent[0] - gapSignal * gap : nameLocation === 'end' ? extent[1] + gapSignal * gap : (extent[0] + extent[1]) / 2,\n // Reuse labelOffset.\n isNameLocationCenter(nameLocation) ? opt.labelOffset + nameDirection * gap : 0];\n var labelLayout;\n var nameRotation = axisModel.get('nameRotate');\n if (nameRotation != null) {\n nameRotation = nameRotation * PI / 180; // To radian.\n }\n\n var axisNameAvailableWidth;\n if (isNameLocationCenter(nameLocation)) {\n labelLayout = AxisBuilder.innerTextLayout(opt.rotation, nameRotation != null ? nameRotation : opt.rotation,\n // Adapt to axis.\n nameDirection);\n } else {\n labelLayout = endTextLayout(opt.rotation, nameLocation, nameRotation || 0, extent);\n axisNameAvailableWidth = opt.axisNameAvailableWidth;\n if (axisNameAvailableWidth != null) {\n axisNameAvailableWidth = Math.abs(axisNameAvailableWidth / Math.sin(labelLayout.rotation));\n !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null);\n }\n }\n var textFont = textStyleModel.getFont();\n var truncateOpt = axisModel.get('nameTruncate', true) || {};\n var ellipsis = truncateOpt.ellipsis;\n var maxWidth = retrieve(opt.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth);\n var textEl = new graphic.Text({\n x: pos[0],\n y: pos[1],\n rotation: labelLayout.rotation,\n silent: AxisBuilder.isLabelSilent(axisModel),\n style: createTextStyle(textStyleModel, {\n text: name,\n font: textFont,\n overflow: 'truncate',\n width: maxWidth,\n ellipsis: ellipsis,\n fill: textStyleModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']),\n align: textStyleModel.get('align') || labelLayout.textAlign,\n verticalAlign: textStyleModel.get('verticalAlign') || labelLayout.textVerticalAlign\n }),\n z2: 1\n });\n graphic.setTooltipConfig({\n el: textEl,\n componentModel: axisModel,\n itemName: name\n });\n textEl.__fullText = name;\n // Id for animation\n textEl.anid = 'name';\n if (axisModel.get('triggerEvent')) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisName';\n eventData.name = name;\n getECData(textEl).eventData = eventData;\n }\n // FIXME\n transformGroup.add(textEl);\n textEl.updateTransform();\n group.add(textEl);\n textEl.decomposeTransform();\n }\n};\nfunction endTextLayout(rotation, textPosition, textRotate, extent) {\n var rotationDiff = remRadian(textRotate - rotation);\n var textAlign;\n var textVerticalAlign;\n var inverse = extent[0] > extent[1];\n var onLeft = textPosition === 'start' && !inverse || textPosition !== 'start' && inverse;\n if (isRadianAroundZero(rotationDiff - PI / 2)) {\n textVerticalAlign = onLeft ? 'bottom' : 'top';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI * 1.5)) {\n textVerticalAlign = onLeft ? 'top' : 'bottom';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff < PI * 1.5 && rotationDiff > PI / 2) {\n textAlign = onLeft ? 'left' : 'right';\n } else {\n textAlign = onLeft ? 'right' : 'left';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n}\nfunction fixMinMaxLabelShow(axisModel, labelEls, tickEls) {\n if (shouldShowAllLabels(axisModel.axis)) {\n return;\n }\n // If min or max are user set, we need to check\n // If the tick on min(max) are overlap on their neighbour tick\n // If they are overlapped, we need to hide the min(max) tick label\n var showMinLabel = axisModel.get(['axisLabel', 'showMinLabel']);\n var showMaxLabel = axisModel.get(['axisLabel', 'showMaxLabel']);\n // FIXME\n // Have not consider onBand yet, where tick els is more than label els.\n labelEls = labelEls || [];\n tickEls = tickEls || [];\n var firstLabel = labelEls[0];\n var nextLabel = labelEls[1];\n var lastLabel = labelEls[labelEls.length - 1];\n var prevLabel = labelEls[labelEls.length - 2];\n var firstTick = tickEls[0];\n var nextTick = tickEls[1];\n var lastTick = tickEls[tickEls.length - 1];\n var prevTick = tickEls[tickEls.length - 2];\n if (showMinLabel === false) {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n } else if (isTwoLabelOverlapped(firstLabel, nextLabel)) {\n if (showMinLabel) {\n ignoreEl(nextLabel);\n ignoreEl(nextTick);\n } else {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n }\n }\n if (showMaxLabel === false) {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n } else if (isTwoLabelOverlapped(prevLabel, lastLabel)) {\n if (showMaxLabel) {\n ignoreEl(prevLabel);\n ignoreEl(prevTick);\n } else {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n }\n }\n}\nfunction ignoreEl(el) {\n el && (el.ignore = true);\n}\nfunction isTwoLabelOverlapped(current, next) {\n // current and next has the same rotation.\n var firstRect = current && current.getBoundingRect().clone();\n var nextRect = next && next.getBoundingRect().clone();\n if (!firstRect || !nextRect) {\n return;\n }\n // When checking intersect of two rotated labels, we use mRotationBack\n // to avoid that boundingRect is enlarge when using `boundingRect.applyTransform`.\n var mRotationBack = matrixUtil.identity([]);\n matrixUtil.rotate(mRotationBack, mRotationBack, -current.rotation);\n firstRect.applyTransform(matrixUtil.mul([], mRotationBack, current.getLocalTransform()));\n nextRect.applyTransform(matrixUtil.mul([], mRotationBack, next.getLocalTransform()));\n return firstRect.intersect(nextRect);\n}\nfunction isNameLocationCenter(nameLocation) {\n return nameLocation === 'middle' || nameLocation === 'center';\n}\nfunction createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, anidPrefix) {\n var tickEls = [];\n var pt1 = [];\n var pt2 = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = ticksCoords[i].coord;\n pt1[0] = tickCoord;\n pt1[1] = 0;\n pt2[0] = tickCoord;\n pt2[1] = tickEndCoord;\n if (tickTransform) {\n v2ApplyTransform(pt1, pt1, tickTransform);\n v2ApplyTransform(pt2, pt2, tickTransform);\n }\n // Tick line, Not use group transform to have better line draw\n var tickEl = new graphic.Line({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: tickLineStyle,\n z2: 2,\n autoBatch: true,\n silent: true\n });\n graphic.subPixelOptimizeLine(tickEl.shape, tickEl.style.lineWidth);\n tickEl.anid = anidPrefix + '_' + ticksCoords[i].tickValue;\n tickEls.push(tickEl);\n }\n return tickEls;\n}\nfunction buildAxisMajorTicks(group, transformGroup, axisModel, opt) {\n var axis = axisModel.axis;\n var tickModel = axisModel.getModel('axisTick');\n var shown = tickModel.get('show');\n if (shown === 'auto' && opt.handleAutoShown) {\n shown = opt.handleAutoShown('axisTick');\n }\n if (!shown || axis.scale.isBlank()) {\n return;\n }\n var lineStyleModel = tickModel.getModel('lineStyle');\n var tickEndCoord = opt.tickDirection * tickModel.get('length');\n var ticksCoords = axis.getTicksCoords();\n var ticksEls = createTicks(ticksCoords, transformGroup.transform, tickEndCoord, defaults(lineStyleModel.getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }), 'ticks');\n for (var i = 0; i < ticksEls.length; i++) {\n group.add(ticksEls[i]);\n }\n return ticksEls;\n}\nfunction buildAxisMinorTicks(group, transformGroup, axisModel, tickDirection) {\n var axis = axisModel.axis;\n var minorTickModel = axisModel.getModel('minorTick');\n if (!minorTickModel.get('show') || axis.scale.isBlank()) {\n return;\n }\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var lineStyleModel = minorTickModel.getModel('lineStyle');\n var tickEndCoord = tickDirection * minorTickModel.get('length');\n var minorTickLineStyle = defaults(lineStyleModel.getLineStyle(), defaults(axisModel.getModel('axisTick').getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }));\n for (var i = 0; i < minorTicksCoords.length; i++) {\n var minorTicksEls = createTicks(minorTicksCoords[i], transformGroup.transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i);\n for (var k = 0; k < minorTicksEls.length; k++) {\n group.add(minorTicksEls[k]);\n }\n }\n}\nfunction buildAxisLabel(group, transformGroup, axisModel, opt) {\n var axis = axisModel.axis;\n var show = retrieve(opt.axisLabelShow, axisModel.get(['axisLabel', 'show']));\n if (!show || axis.scale.isBlank()) {\n return;\n }\n var labelModel = axisModel.getModel('axisLabel');\n var labelMargin = labelModel.get('margin');\n var labels = axis.getViewLabels();\n // Special label rotate.\n var labelRotation = (retrieve(opt.labelRotate, labelModel.get('rotate')) || 0) * PI / 180;\n var labelLayout = AxisBuilder.innerTextLayout(opt.rotation, labelRotation, opt.labelDirection);\n var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true);\n var labelEls = [];\n var silent = AxisBuilder.isLabelSilent(axisModel);\n var triggerEvent = axisModel.get('triggerEvent');\n each(labels, function (labelItem, index) {\n var tickValue = axis.scale.type === 'ordinal' ? axis.scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue;\n var formattedLabel = labelItem.formattedLabel;\n var rawLabel = labelItem.rawLabel;\n var itemLabelModel = labelModel;\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n itemLabelModel = new Model(rawCategoryItem.textStyle, labelModel, axisModel.ecModel);\n }\n }\n var textColor = itemLabelModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']);\n var tickCoord = axis.dataToCoord(tickValue);\n var align = itemLabelModel.getShallow('align', true) || labelLayout.textAlign;\n var alignMin = retrieve2(itemLabelModel.getShallow('alignMinLabel', true), align);\n var alignMax = retrieve2(itemLabelModel.getShallow('alignMaxLabel', true), align);\n var verticalAlign = itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign;\n var verticalAlignMin = retrieve2(itemLabelModel.getShallow('verticalAlignMinLabel', true), verticalAlign);\n var verticalAlignMax = retrieve2(itemLabelModel.getShallow('verticalAlignMaxLabel', true), verticalAlign);\n var textEl = new graphic.Text({\n x: tickCoord,\n y: opt.labelOffset + opt.labelDirection * labelMargin,\n rotation: labelLayout.rotation,\n silent: silent,\n z2: 10 + (labelItem.level || 0),\n style: createTextStyle(itemLabelModel, {\n text: formattedLabel,\n align: index === 0 ? alignMin : index === labels.length - 1 ? alignMax : align,\n verticalAlign: index === 0 ? verticalAlignMin : index === labels.length - 1 ? verticalAlignMax : verticalAlign,\n fill: isFunction(textColor) ? textColor(\n // (1) In category axis with data zoom, tick is not the original\n // index of axis.data. So tick should not be exposed to user\n // in category axis.\n // (2) Compatible with previous version, which always use formatted label as\n // input. But in interval scale the formatted label is like '223,445', which\n // maked user replace ','. So we modify it to return original val but remain\n // it as 'string' to avoid error in replacing.\n axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor\n })\n });\n textEl.anid = 'label_' + tickValue;\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = rawLabel;\n eventData.tickIndex = index;\n if (axis.type === 'category') {\n eventData.dataIndex = tickValue;\n }\n getECData(textEl).eventData = eventData;\n }\n // FIXME\n transformGroup.add(textEl);\n textEl.updateTransform();\n labelEls.push(textEl);\n group.add(textEl);\n textEl.decomposeTransform();\n });\n return labelEls;\n}\nexport default AxisBuilder;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport Model from '../../model/Model.js';\nimport { each, curry, clone, defaults, isArray, indexOf } from 'zrender/lib/core/util.js';\n// Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n// allAxesInfo should be updated when setOption performed.\nexport function collect(ecModel, api) {\n var result = {\n /**\n * key: makeKey(axis.model)\n * value: {\n * axis,\n * coordSys,\n * axisPointerModel,\n * triggerTooltip,\n * triggerEmphasis,\n * involveSeries,\n * snap,\n * seriesModels,\n * seriesDataCount\n * }\n */\n axesInfo: {},\n seriesInvolved: false,\n /**\n * key: makeKey(coordSys.model)\n * value: Object: key makeKey(axis.model), value: axisInfo\n */\n coordSysAxesInfo: {},\n coordSysMap: {}\n };\n collectAxesInfo(result, ecModel, api);\n // Check seriesInvolved for performance, in case too many series in some chart.\n result.seriesInvolved && collectSeriesInfo(result, ecModel);\n return result;\n}\nfunction collectAxesInfo(result, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var globalAxisPointerModel = ecModel.getComponent('axisPointer');\n // links can only be set on global.\n var linksOption = globalAxisPointerModel.get('link', true) || [];\n var linkGroups = [];\n // Collect axes info.\n each(api.getCoordinateSystems(), function (coordSys) {\n // Some coordinate system do not support axes, like geo.\n if (!coordSys.axisPointerEnabled) {\n return;\n }\n var coordSysKey = makeKey(coordSys.model);\n var axesInfoInCoordSys = result.coordSysAxesInfo[coordSysKey] = {};\n result.coordSysMap[coordSysKey] = coordSys;\n // Set tooltip (like 'cross') is a convenient way to show axisPointer\n // for user. So we enable setting tooltip on coordSys model.\n var coordSysModel = coordSys.model;\n var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel);\n each(coordSys.getAxes(), curry(saveTooltipAxisInfo, false, null));\n // If axis tooltip used, choose tooltip axis for each coordSys.\n // Notice this case: coordSys is `grid` but not `cartesian2D` here.\n if (coordSys.getTooltipAxes && globalTooltipModel\n // If tooltip.showContent is set as false, tooltip will not\n // show but axisPointer will show as normal.\n && baseTooltipModel.get('show')) {\n // Compatible with previous logic. But series.tooltip.trigger: 'axis'\n // or series.data[n].tooltip.trigger: 'axis' are not support any more.\n var triggerAxis = baseTooltipModel.get('trigger') === 'axis';\n var cross = baseTooltipModel.get(['axisPointer', 'type']) === 'cross';\n var tooltipAxes = coordSys.getTooltipAxes(baseTooltipModel.get(['axisPointer', 'axis']));\n if (triggerAxis || cross) {\n each(tooltipAxes.baseAxes, curry(saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis));\n }\n if (cross) {\n each(tooltipAxes.otherAxes, curry(saveTooltipAxisInfo, 'cross', false));\n }\n }\n // fromTooltip: true | false | 'cross'\n // triggerTooltip: true | false | null\n function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) {\n var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel);\n var axisPointerShow = axisPointerModel.get('show');\n if (!axisPointerShow || axisPointerShow === 'auto' && !fromTooltip && !isHandleTrigger(axisPointerModel)) {\n return;\n }\n if (triggerTooltip == null) {\n triggerTooltip = axisPointerModel.get('triggerTooltip');\n }\n axisPointerModel = fromTooltip ? makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) : axisPointerModel;\n var snap = axisPointerModel.get('snap');\n var triggerEmphasis = axisPointerModel.get('triggerEmphasis');\n var axisKey = makeKey(axis.model);\n var involveSeries = triggerTooltip || snap || axis.type === 'category';\n // If result.axesInfo[key] exist, override it (tooltip has higher priority).\n var axisInfo = result.axesInfo[axisKey] = {\n key: axisKey,\n axis: axis,\n coordSys: coordSys,\n axisPointerModel: axisPointerModel,\n triggerTooltip: triggerTooltip,\n triggerEmphasis: triggerEmphasis,\n involveSeries: involveSeries,\n snap: snap,\n useHandle: isHandleTrigger(axisPointerModel),\n seriesModels: [],\n linkGroup: null\n };\n axesInfoInCoordSys[axisKey] = axisInfo;\n result.seriesInvolved = result.seriesInvolved || involveSeries;\n var groupIndex = getLinkGroupIndex(linksOption, axis);\n if (groupIndex != null) {\n var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = {\n axesInfo: {}\n });\n linkGroup.axesInfo[axisKey] = axisInfo;\n linkGroup.mapper = linksOption[groupIndex].mapper;\n axisInfo.linkGroup = linkGroup;\n }\n }\n });\n}\nfunction makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) {\n var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer');\n var fields = ['type', 'snap', 'lineStyle', 'shadowStyle', 'label', 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z'];\n var volatileOption = {};\n each(fields, function (field) {\n volatileOption[field] = clone(tooltipAxisPointerModel.get(field));\n });\n // category axis do not auto snap, otherwise some tick that do not\n // has value can not be hovered. value/time/log axis default snap if\n // triggered from tooltip and trigger tooltip.\n volatileOption.snap = axis.type !== 'category' && !!triggerTooltip;\n // Compatible with previous behavior, tooltip axis does not show label by default.\n // Only these properties can be overridden from tooltip to axisPointer.\n if (tooltipAxisPointerModel.get('type') === 'cross') {\n volatileOption.type = 'line';\n }\n var labelOption = volatileOption.label || (volatileOption.label = {});\n // Follow the convention, do not show label when triggered by tooltip by default.\n labelOption.show == null && (labelOption.show = false);\n if (fromTooltip === 'cross') {\n // When 'cross', both axes show labels.\n var tooltipAxisPointerLabelShow = tooltipAxisPointerModel.get(['label', 'show']);\n labelOption.show = tooltipAxisPointerLabelShow != null ? tooltipAxisPointerLabelShow : true;\n // If triggerTooltip, this is a base axis, which should better not use cross style\n // (cross style is dashed by default)\n if (!triggerTooltip) {\n var crossStyle = volatileOption.lineStyle = tooltipAxisPointerModel.get('crossStyle');\n crossStyle && defaults(labelOption, crossStyle.textStyle);\n }\n }\n return axis.model.getModel('axisPointer', new Model(volatileOption, globalAxisPointerModel, ecModel));\n}\nfunction collectSeriesInfo(result, ecModel) {\n // Prepare data for axis trigger\n ecModel.eachSeries(function (seriesModel) {\n // Notice this case: this coordSys is `cartesian2D` but not `grid`.\n var coordSys = seriesModel.coordinateSystem;\n var seriesTooltipTrigger = seriesModel.get(['tooltip', 'trigger'], true);\n var seriesTooltipShow = seriesModel.get(['tooltip', 'show'], true);\n if (!coordSys || seriesTooltipTrigger === 'none' || seriesTooltipTrigger === false || seriesTooltipTrigger === 'item' || seriesTooltipShow === false || seriesModel.get(['axisPointer', 'show'], true) === false) {\n return;\n }\n each(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) {\n var axis = axisInfo.axis;\n if (coordSys.getAxis(axis.dim) === axis) {\n axisInfo.seriesModels.push(seriesModel);\n axisInfo.seriesDataCount == null && (axisInfo.seriesDataCount = 0);\n axisInfo.seriesDataCount += seriesModel.getData().count();\n }\n });\n });\n}\n/**\n * For example:\n * {\n * axisPointer: {\n * links: [{\n * xAxisIndex: [2, 4],\n * yAxisIndex: 'all'\n * }, {\n * xAxisId: ['a5', 'a7'],\n * xAxisName: 'xxx'\n * }]\n * }\n * }\n */\nfunction getLinkGroupIndex(linksOption, axis) {\n var axisModel = axis.model;\n var dim = axis.dim;\n for (var i = 0; i < linksOption.length; i++) {\n var linkOption = linksOption[i] || {};\n if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id) || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex) || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)) {\n return i;\n }\n }\n}\nfunction checkPropInLink(linkPropValue, axisPropValue) {\n return linkPropValue === 'all' || isArray(linkPropValue) && indexOf(linkPropValue, axisPropValue) >= 0 || linkPropValue === axisPropValue;\n}\nexport function fixValue(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n if (!axisInfo) {\n return;\n }\n var axisPointerModel = axisInfo.axisPointerModel;\n var scale = axisInfo.axis.scale;\n var option = axisPointerModel.option;\n var status = axisPointerModel.get('status');\n var value = axisPointerModel.get('value');\n // Parse init value for category and time axis.\n if (value != null) {\n value = scale.parse(value);\n }\n var useHandle = isHandleTrigger(axisPointerModel);\n // If `handle` used, `axisPointer` will always be displayed, so value\n // and status should be initialized.\n if (status == null) {\n option.status = useHandle ? 'show' : 'hide';\n }\n var extent = scale.getExtent().slice();\n extent[0] > extent[1] && extent.reverse();\n if (\n // Pick a value on axis when initializing.\n value == null\n // If both `handle` and `dataZoom` are used, value may be out of axis extent,\n // where we should re-pick a value to keep `handle` displaying normally.\n || value > extent[1]) {\n // Make handle displayed on the end of the axis when init, which looks better.\n value = extent[1];\n }\n if (value < extent[0]) {\n value = extent[0];\n }\n option.value = value;\n if (useHandle) {\n option.status = axisInfo.axis.scale.isBlank() ? 'hide' : 'show';\n }\n}\nexport function getAxisInfo(axisModel) {\n var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo;\n return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)];\n}\nexport function getAxisPointerModel(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n return axisInfo && axisInfo.axisPointerModel;\n}\nfunction isHandleTrigger(axisPointerModel) {\n return !!axisPointerModel.get(['handle', 'show']);\n}\n/**\n * @param {module:echarts/model/Model} model\n * @return {string} unique key\n */\nexport function makeKey(model) {\n return model.type + '||' + model.id;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as axisPointerModelHelper from '../axisPointer/modelHelper.js';\nimport ComponentView from '../../view/Component.js';\nvar axisPointerClazz = {};\n/**\n * Base class of AxisView.\n */\nvar AxisView = /** @class */function (_super) {\n __extends(AxisView, _super);\n function AxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisView.type;\n return _this;\n }\n /**\n * @override\n */\n AxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n // FIXME\n // This process should proformed after coordinate systems updated\n // (axis scale updated), and should be performed each time update.\n // So put it here temporarily, although it is not appropriate to\n // put a model-writing procedure in `view`.\n this.axisPointerClass && axisPointerModelHelper.fixValue(axisModel);\n _super.prototype.render.apply(this, arguments);\n this._doUpdateAxisPointerClass(axisModel, api, true);\n };\n /**\n * Action handler.\n */\n AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) {\n this._doUpdateAxisPointerClass(axisModel, api, false);\n };\n /**\n * @override\n */\n AxisView.prototype.remove = function (ecModel, api) {\n var axisPointer = this._axisPointer;\n axisPointer && axisPointer.remove(api);\n };\n /**\n * @override\n */\n AxisView.prototype.dispose = function (ecModel, api) {\n this._disposeAxisPointer(api);\n _super.prototype.dispose.apply(this, arguments);\n };\n AxisView.prototype._doUpdateAxisPointerClass = function (axisModel, api, forceRender) {\n var Clazz = AxisView.getAxisPointerClass(this.axisPointerClass);\n if (!Clazz) {\n return;\n }\n var axisPointerModel = axisPointerModelHelper.getAxisPointerModel(axisModel);\n axisPointerModel ? (this._axisPointer || (this._axisPointer = new Clazz())).render(axisModel, axisPointerModel, api, forceRender) : this._disposeAxisPointer(api);\n };\n AxisView.prototype._disposeAxisPointer = function (api) {\n this._axisPointer && this._axisPointer.dispose(api);\n this._axisPointer = null;\n };\n AxisView.registerAxisPointerClass = function (type, clazz) {\n if (process.env.NODE_ENV !== 'production') {\n if (axisPointerClazz[type]) {\n throw new Error('axisPointer ' + type + ' exists');\n }\n }\n axisPointerClazz[type] = clazz;\n };\n ;\n AxisView.getAxisPointerClass = function (type) {\n return type && axisPointerClazz[type];\n };\n ;\n AxisView.type = 'axis';\n return AxisView;\n}(ComponentView);\nexport default AxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nexport function rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n // TODO: TYPE\n var splitAreaModel = axisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var gridRect = gridModel.coordinateSystem.getRect();\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitAreaModel,\n clamp: true\n });\n if (!ticksCoords.length) {\n return;\n }\n // For Making appropriate splitArea animation, the color and anid\n // should be corresponding to previous one if possible.\n var areaColorsLen = areaColors.length;\n var lastSplitAreaColors = inner(axisView).splitAreaColors;\n var newSplitAreaColors = zrUtil.createHashMap();\n var colorIndex = 0;\n if (lastSplitAreaColors) {\n for (var i = 0; i < ticksCoords.length; i++) {\n var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);\n if (cIndex != null) {\n colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen;\n break;\n }\n }\n }\n var prev = axis.toGlobalCoord(ticksCoords[0].coord);\n var areaStyle = areaStyleModel.getAreaStyle();\n areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors];\n for (var i = 1; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n var x = void 0;\n var y = void 0;\n var width = void 0;\n var height = void 0;\n if (axis.isHorizontal()) {\n x = prev;\n y = gridRect.y;\n width = tickCoord - x;\n height = gridRect.height;\n prev = x + width;\n } else {\n x = gridRect.x;\n y = prev;\n width = gridRect.width;\n height = tickCoord - y;\n prev = y + height;\n }\n var tickValue = ticksCoords[i - 1].tickValue;\n tickValue != null && newSplitAreaColors.set(tickValue, colorIndex);\n axisGroup.add(new graphic.Rect({\n anid: tickValue != null ? 'area_' + tickValue : null,\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n },\n style: zrUtil.defaults({\n fill: areaColors[colorIndex]\n }, areaStyle),\n autoBatch: true,\n silent: true\n }));\n colorIndex = (colorIndex + 1) % areaColorsLen;\n }\n inner(axisView).splitAreaColors = newSplitAreaColors;\n}\nexport function rectCoordAxisHandleRemove(axisView) {\n inner(axisView).splitAreaColors = null;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport AxisView from './AxisView.js';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitArea', 'splitLine', 'minorSplitLine'];\nvar CartesianAxisView = /** @class */function (_super) {\n __extends(CartesianAxisView, _super);\n function CartesianAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianAxisView.type;\n _this.axisPointerClass = 'CartesianAxisPointer';\n return _this;\n }\n /**\n * @override\n */\n CartesianAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n if (!axisModel.get('show')) {\n return;\n }\n var gridModel = axisModel.getCoordSysModel();\n var layout = cartesianAxisHelper.layout(gridModel, axisModel);\n var axisBuilder = new AxisBuilder(axisModel, zrUtil.extend({\n handleAutoShown: function (elementType) {\n var cartesians = gridModel.coordinateSystem.getCartesians();\n for (var i = 0; i < cartesians.length; i++) {\n if (isIntervalOrLogScale(cartesians[i].getOtherAxis(axisModel.axis).scale)) {\n // Still show axis tick or axisLine if other axis is value / log\n return true;\n }\n }\n // Not show axisTick or axisLine if other axis is category / time\n return false;\n }\n }, layout));\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this._axisGroup.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this._axisGroup, axisModel, gridModel);\n }\n }, this);\n // THIS is a special case for bar racing chart.\n // Update the axis label from the natural initial layout to\n // sorted layout should has no animation.\n var isInitialSortFromBarRacing = payload && payload.type === 'changeAxisOrder' && payload.isInitSort;\n if (!isInitialSortFromBarRacing) {\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n }\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n CartesianAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n CartesianAxisView.type = 'cartesianAxis';\n return CartesianAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var colorIndex = lineCount++ % lineColors.length;\n var tickValue = ticksCoords[i].tickValue;\n var line = new graphic.Line({\n anid: tickValue != null ? 'line_' + ticksCoords[i].tickValue : null,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: zrUtil.defaults({\n stroke: lineColors[colorIndex]\n }, lineStyle),\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n },\n minorSplitLine: function (axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n var minorSplitLineModel = axisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var line = new graphic.Line({\n anid: 'minor_line_' + minorTicksCoords[i][k].tickValue,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: lineStyle,\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n }\n },\n splitArea: function (axisView, axisGroup, axisModel, gridModel) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel);\n }\n};\nvar CartesianXAxisView = /** @class */function (_super) {\n __extends(CartesianXAxisView, _super);\n function CartesianXAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianXAxisView.type = 'xAxis';\n return CartesianXAxisView;\n}(CartesianAxisView);\nexport { CartesianXAxisView };\nvar CartesianYAxisView = /** @class */function (_super) {\n __extends(CartesianYAxisView, _super);\n function CartesianYAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianYAxisView.type = 'yAxis';\n return CartesianYAxisView;\n}(CartesianAxisView);\nexport { CartesianYAxisView };\nexport default CartesianAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport GridModel from '../../coord/cartesian/GridModel.js';\nimport { Rect } from '../../util/graphic.js';\nimport { defaults } from 'zrender/lib/core/util.js';\nimport { CartesianAxisModel } from '../../coord/cartesian/AxisModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport Grid from '../../coord/cartesian/Grid.js';\nimport { CartesianXAxisView, CartesianYAxisView } from '../axis/CartesianAxisView.js';\n// Grid view\nvar GridView = /** @class */function (_super) {\n __extends(GridView, _super);\n function GridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'grid';\n return _this;\n }\n GridView.prototype.render = function (gridModel, ecModel) {\n this.group.removeAll();\n if (gridModel.get('show')) {\n this.group.add(new Rect({\n shape: gridModel.coordinateSystem.getRect(),\n style: defaults({\n fill: gridModel.get('backgroundColor')\n }, gridModel.getItemStyle()),\n silent: true,\n z2: -1\n }));\n }\n };\n GridView.type = 'grid';\n return GridView;\n}(ComponentView);\nvar extraOption = {\n // gridIndex: 0,\n // gridId: '',\n offset: 0\n};\nexport function install(registers) {\n registers.registerComponentView(GridView);\n registers.registerComponentModel(GridModel);\n registers.registerCoordinateSystem('cartesian2d', Grid);\n axisModelCreator(registers, 'x', CartesianAxisModel, extraOption);\n axisModelCreator(registers, 'y', CartesianAxisModel, extraOption);\n registers.registerComponentView(CartesianXAxisView);\n registers.registerComponentView(CartesianYAxisView);\n registers.registerPreprocessor(function (option) {\n // Only create grid when need\n if (option.xAxis && option.yAxis && !option.grid) {\n option.grid = {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport ScatterSeriesModel from './ScatterSeries.js';\nimport ScatterView from './ScatterView.js';\nimport { install as installGridSimple } from '../../component/grid/installSimple.js';\nimport layoutPoints from '../../layout/points.js';\nexport function install(registers) {\n // In case developer forget to include grid component\n use(installGridSimple);\n registers.registerSeriesModel(ScatterSeriesModel);\n registers.registerChartView(ScatterView);\n registers.registerLayout(layoutPoints('scatter'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function radarLayout(ecModel) {\n ecModel.eachSeriesByType('radar', function (seriesModel) {\n var data = seriesModel.getData();\n var points = [];\n var coordSys = seriesModel.coordinateSystem;\n if (!coordSys) {\n return;\n }\n var axes = coordSys.getIndicatorAxes();\n zrUtil.each(axes, function (axis, axisIndex) {\n data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) {\n points[dataIndex] = points[dataIndex] || [];\n var point = coordSys.dataToPoint(val, axisIndex);\n points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys);\n });\n });\n // Close polygon\n data.each(function (idx) {\n // TODO\n // Is it appropriate to connect to the next data when some data is missing?\n // Or, should trade it like `connectNull` in line chart?\n var firstPoint = zrUtil.find(points[idx], function (point) {\n return isValidPoint(point);\n }) || getValueMissingPoint(coordSys);\n // Copy the first actual point to the end of the array\n points[idx].push(firstPoint.slice());\n data.setItemLayout(idx, points[idx]);\n });\n });\n}\nfunction isValidPoint(point) {\n return !isNaN(point[0]) && !isNaN(point[1]);\n}\nfunction getValueMissingPoint(coordSys) {\n // It is error-prone to input [NaN, NaN] into polygon, polygon.\n // (probably cause problem when refreshing or animating)\n return [coordSys.cx, coordSys.cy];\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\n// Backward compat for radar chart in 2\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function radarBackwardCompat(option) {\n var polarOptArr = option.polar;\n if (polarOptArr) {\n if (!zrUtil.isArray(polarOptArr)) {\n polarOptArr = [polarOptArr];\n }\n var polarNotRadar_1 = [];\n zrUtil.each(polarOptArr, function (polarOpt, idx) {\n if (polarOpt.indicator) {\n if (polarOpt.type && !polarOpt.shape) {\n polarOpt.shape = polarOpt.type;\n }\n option.radar = option.radar || [];\n if (!zrUtil.isArray(option.radar)) {\n option.radar = [option.radar];\n }\n option.radar.push(polarOpt);\n } else {\n polarNotRadar_1.push(polarOpt);\n }\n });\n option.polar = polarNotRadar_1;\n }\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'radar' && seriesOpt.polarIndex) {\n seriesOpt.radarIndex = seriesOpt.polarIndex;\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as symbolUtil from '../../util/symbol.js';\nimport ChartView from '../../view/Chart.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar RadarView = /** @class */function (_super) {\n __extends(RadarView, _super);\n function RadarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarView.type;\n return _this;\n }\n RadarView.prototype.render = function (seriesModel, ecModel, api) {\n var polar = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n function createSymbol(data, idx) {\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n if (symbolType === 'none') {\n return;\n }\n var symbolSize = symbolUtil.normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var symbolPath = symbolUtil.createSymbol(symbolType, -1, -1, 2, 2);\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate') || 0;\n symbolPath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 100,\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2,\n rotation: symbolRotate * Math.PI / 180 || 0\n });\n return symbolPath;\n }\n function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) {\n // Simply rerender all\n symbolGroup.removeAll();\n for (var i = 0; i < newPoints.length - 1; i++) {\n var symbolPath = createSymbol(data, idx);\n if (symbolPath) {\n symbolPath.__dimIdx = i;\n if (oldPoints[i]) {\n symbolPath.setPosition(oldPoints[i]);\n graphic[isInit ? 'initProps' : 'updateProps'](symbolPath, {\n x: newPoints[i][0],\n y: newPoints[i][1]\n }, seriesModel, idx);\n } else {\n symbolPath.setPosition(newPoints[i]);\n }\n symbolGroup.add(symbolPath);\n }\n }\n }\n function getInitialPoints(points) {\n return zrUtil.map(points, function (pt) {\n return [polar.cx, polar.cy];\n });\n }\n data.diff(oldData).add(function (idx) {\n var points = data.getItemLayout(idx);\n if (!points) {\n return;\n }\n var polygon = new graphic.Polygon();\n var polyline = new graphic.Polyline();\n var target = {\n shape: {\n points: points\n }\n };\n polygon.shape.points = getInitialPoints(points);\n polyline.shape.points = getInitialPoints(points);\n graphic.initProps(polygon, target, seriesModel, idx);\n graphic.initProps(polyline, target, seriesModel, idx);\n var itemGroup = new graphic.Group();\n var symbolGroup = new graphic.Group();\n itemGroup.add(polyline);\n itemGroup.add(polygon);\n itemGroup.add(symbolGroup);\n updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true);\n data.setItemGraphicEl(idx, itemGroup);\n }).update(function (newIdx, oldIdx) {\n var itemGroup = oldData.getItemGraphicEl(oldIdx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n var target = {\n shape: {\n points: data.getItemLayout(newIdx)\n }\n };\n if (!target.shape.points) {\n return;\n }\n updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false);\n saveOldStyle(polygon);\n saveOldStyle(polyline);\n graphic.updateProps(polyline, target, seriesModel);\n graphic.updateProps(polygon, target, seriesModel);\n data.setItemGraphicEl(newIdx, itemGroup);\n }).remove(function (idx) {\n group.remove(oldData.getItemGraphicEl(idx));\n }).execute();\n data.eachItemGraphicEl(function (itemGroup, idx) {\n var itemModel = data.getItemModel(idx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n // Radar uses the visual encoded from itemStyle.\n var itemStyle = data.getItemVisual(idx, 'style');\n var color = itemStyle.fill;\n group.add(itemGroup);\n polyline.useStyle(zrUtil.defaults(itemModel.getModel('lineStyle').getLineStyle(), {\n fill: 'none',\n stroke: color\n }));\n setStatesStylesFromModel(polyline, itemModel, 'lineStyle');\n setStatesStylesFromModel(polygon, itemModel, 'areaStyle');\n var areaStyleModel = itemModel.getModel('areaStyle');\n var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty();\n polygon.ignore = polygonIgnore;\n zrUtil.each(['emphasis', 'select', 'blur'], function (stateName) {\n var stateModel = itemModel.getModel([stateName, 'areaStyle']);\n var stateIgnore = stateModel.isEmpty() && stateModel.parentModel.isEmpty();\n // Won't be ignore if normal state is not ignore.\n polygon.ensureState(stateName).ignore = stateIgnore && polygonIgnore;\n });\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: color,\n opacity: 0.7,\n decal: itemStyle.decal\n }));\n var emphasisModel = itemModel.getModel('emphasis');\n var itemHoverStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n symbolGroup.eachChild(function (symbolPath) {\n if (symbolPath instanceof ZRImage) {\n var pathStyle = symbolPath.style;\n symbolPath.useStyle(zrUtil.extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, itemStyle));\n } else {\n symbolPath.useStyle(itemStyle);\n symbolPath.setColor(color);\n symbolPath.style.strokeNoScale = true;\n }\n var pathEmphasisState = symbolPath.ensureState('emphasis');\n pathEmphasisState.style = zrUtil.clone(itemHoverStyle);\n var defaultText = data.getStore().get(data.getDimensionIndex(symbolPath.__dimIdx), idx);\n (defaultText == null || isNaN(defaultText)) && (defaultText = '');\n setLabelStyle(symbolPath, getLabelStatesModels(itemModel), {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n labelDimIndex: symbolPath.__dimIdx,\n defaultText: defaultText,\n inheritColor: color,\n defaultOpacity: itemStyle.opacity\n });\n });\n toggleHoverEmphasis(itemGroup, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n });\n this._data = data;\n };\n RadarView.prototype.remove = function () {\n this.group.removeAll();\n this._data = null;\n };\n RadarView.type = 'radar';\n return RadarView;\n}(ChartView);\nexport default RadarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport { createTooltipMarkup, retrieveVisualColorForTooltipMarker } from '../../component/tooltip/tooltipMarkup.js';\nvar RadarSeriesModel = /** @class */function (_super) {\n __extends(RadarSeriesModel, _super);\n function RadarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n // Overwrite\n RadarSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n };\n RadarSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesDataSimply(this, {\n generateCoord: 'indicator_',\n generateCoordCount: Infinity\n });\n };\n RadarSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var coordSys = this.coordinateSystem;\n var indicatorAxes = coordSys.getIndicatorAxes();\n var name = this.getData().getName(dataIndex);\n var nameToDisplay = name === '' ? this.name : name;\n var markerColor = retrieveVisualColorForTooltipMarker(this, dataIndex);\n return createTooltipMarkup('section', {\n header: nameToDisplay,\n sortBlocks: true,\n blocks: zrUtil.map(indicatorAxes, function (axis) {\n var val = data.get(data.mapDimension(axis.dim), dataIndex);\n return createTooltipMarkup('nameValue', {\n markerType: 'subItem',\n markerColor: markerColor,\n name: axis.name,\n value: val,\n sortParam: val\n });\n })\n });\n };\n RadarSeriesModel.prototype.getTooltipPosition = function (dataIndex) {\n if (dataIndex != null) {\n var data_1 = this.getData();\n var coordSys = this.coordinateSystem;\n var values = data_1.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data_1.mapDimension(dim);\n }), dataIndex);\n for (var i = 0, len = values.length; i < len; i++) {\n if (!isNaN(values[i])) {\n var indicatorAxes = coordSys.getIndicatorAxes();\n return coordSys.coordToPoint(indicatorAxes[i].dataToCoord(values[i]), i);\n }\n }\n }\n };\n RadarSeriesModel.type = 'series.radar';\n RadarSeriesModel.dependencies = ['radar'];\n RadarSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n colorBy: 'data',\n coordinateSystem: 'radar',\n legendHoverLink: true,\n radarIndex: 0,\n lineStyle: {\n width: 2,\n type: 'solid',\n join: 'round'\n },\n label: {\n position: 'top'\n },\n // areaStyle: {\n // },\n // itemStyle: {}\n symbolSize: 8\n // symbolRotate: null\n };\n\n return RadarSeriesModel;\n}(SeriesModel);\nexport default RadarSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport axisDefault from '../axisDefault.js';\nimport Model from '../../model/Model.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport ComponentModel from '../../model/Component.js';\nvar valueAxisDefault = axisDefault.value;\nfunction defaultsShow(opt, show) {\n return zrUtil.defaults({\n show: show\n }, opt);\n}\nvar RadarModel = /** @class */function (_super) {\n __extends(RadarModel, _super);\n function RadarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarModel.type;\n return _this;\n }\n RadarModel.prototype.optionUpdated = function () {\n var boundaryGap = this.get('boundaryGap');\n var splitNumber = this.get('splitNumber');\n var scale = this.get('scale');\n var axisLine = this.get('axisLine');\n var axisTick = this.get('axisTick');\n // let axisType = this.get('axisType');\n var axisLabel = this.get('axisLabel');\n var nameTextStyle = this.get('axisName');\n var showName = this.get(['axisName', 'show']);\n var nameFormatter = this.get(['axisName', 'formatter']);\n var nameGap = this.get('axisNameGap');\n var triggerEvent = this.get('triggerEvent');\n var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {\n // PENDING\n if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {\n indicatorOpt.min = 0;\n } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n var iNameTextStyle = nameTextStyle;\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({\n color: indicatorOpt.color\n }, nameTextStyle);\n }\n // Use same configuration\n var innerIndicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {\n boundaryGap: boundaryGap,\n splitNumber: splitNumber,\n scale: scale,\n axisLine: axisLine,\n axisTick: axisTick,\n // axisType: axisType,\n axisLabel: axisLabel,\n // Compatible with 2 and use text\n name: indicatorOpt.text,\n showName: showName,\n nameLocation: 'end',\n nameGap: nameGap,\n // min: 0,\n nameTextStyle: iNameTextStyle,\n triggerEvent: triggerEvent\n }, false);\n if (zrUtil.isString(nameFormatter)) {\n var indName = innerIndicatorOpt.name;\n innerIndicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n } else if (zrUtil.isFunction(nameFormatter)) {\n innerIndicatorOpt.name = nameFormatter(innerIndicatorOpt.name, innerIndicatorOpt);\n }\n var model = new Model(innerIndicatorOpt, null, this.ecModel);\n zrUtil.mixin(model, AxisModelCommonMixin.prototype);\n // For triggerEvent.\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n return model;\n }, this);\n this._indicatorModels = indicatorModels;\n };\n RadarModel.prototype.getIndicatorModels = function () {\n return this._indicatorModels;\n };\n RadarModel.type = 'radar';\n RadarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '75%',\n startAngle: 90,\n axisName: {\n show: true\n // formatter: null\n // textStyle: {}\n },\n\n boundaryGap: [0, 0],\n splitNumber: 5,\n axisNameGap: 15,\n scale: false,\n // Polygon or circle\n shape: 'polygon',\n axisLine: zrUtil.merge({\n lineStyle: {\n color: '#bbb'\n }\n }, valueAxisDefault.axisLine),\n axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),\n axisTick: defaultsShow(valueAxisDefault.axisTick, false),\n // axisType: 'value',\n splitLine: defaultsShow(valueAxisDefault.splitLine, true),\n splitArea: defaultsShow(valueAxisDefault.splitArea, true),\n // {text, min, max}\n indicator: []\n };\n return RadarModel;\n}(ComponentModel);\nexport default RadarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nimport * as graphic from '../../util/graphic.js';\nimport ComponentView from '../../view/Component.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar RadarView = /** @class */function (_super) {\n __extends(RadarView, _super);\n function RadarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarView.type;\n return _this;\n }\n RadarView.prototype.render = function (radarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n this._buildAxes(radarModel);\n this._buildSplitLineAndArea(radarModel);\n };\n RadarView.prototype._buildAxes = function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n var axisBuilders = zrUtil.map(indicatorAxes, function (indicatorAxis) {\n var axisName = indicatorAxis.model.get('showName') ? indicatorAxis.name : ''; // hide name\n var axisBuilder = new AxisBuilder(indicatorAxis.model, {\n axisName: axisName,\n position: [radar.cx, radar.cy],\n rotation: indicatorAxis.angle,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1\n });\n return axisBuilder;\n });\n zrUtil.each(axisBuilders, function (axisBuilder) {\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this.group.add(axisBuilder.getGroup());\n }, this);\n };\n RadarView.prototype._buildSplitLineAndArea = function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n if (!indicatorAxes.length) {\n return;\n }\n var shape = radarModel.get('shape');\n var splitLineModel = radarModel.getModel('splitLine');\n var splitAreaModel = radarModel.getModel('splitArea');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var showSplitLine = splitLineModel.get('show');\n var showSplitArea = splitAreaModel.get('show');\n var splitLineColors = lineStyleModel.get('color');\n var splitAreaColors = areaStyleModel.get('color');\n var splitLineColorsArr = zrUtil.isArray(splitLineColors) ? splitLineColors : [splitLineColors];\n var splitAreaColorsArr = zrUtil.isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors];\n var splitLines = [];\n var splitAreas = [];\n function getColorIndex(areaOrLine, areaOrLineColorList, idx) {\n var colorIndex = idx % areaOrLineColorList.length;\n areaOrLine[colorIndex] = areaOrLine[colorIndex] || [];\n return colorIndex;\n }\n if (shape === 'circle') {\n var ticksRadius = indicatorAxes[0].getTicksCoords();\n var cx = radar.cx;\n var cy = radar.cy;\n for (var i = 0; i < ticksRadius.length; i++) {\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i);\n splitLines[colorIndex].push(new graphic.Circle({\n shape: {\n cx: cx,\n cy: cy,\n r: ticksRadius[i].coord\n }\n }));\n }\n if (showSplitArea && i < ticksRadius.length - 1) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i);\n splitAreas[colorIndex].push(new graphic.Ring({\n shape: {\n cx: cx,\n cy: cy,\n r0: ticksRadius[i].coord,\n r: ticksRadius[i + 1].coord\n }\n }));\n }\n }\n }\n // Polyyon\n else {\n var realSplitNumber_1;\n var axesTicksPoints = zrUtil.map(indicatorAxes, function (indicatorAxis, idx) {\n var ticksCoords = indicatorAxis.getTicksCoords();\n realSplitNumber_1 = realSplitNumber_1 == null ? ticksCoords.length - 1 : Math.min(ticksCoords.length - 1, realSplitNumber_1);\n return zrUtil.map(ticksCoords, function (tickCoord) {\n return radar.coordToPoint(tickCoord.coord, idx);\n });\n });\n var prevPoints = [];\n for (var i = 0; i <= realSplitNumber_1; i++) {\n var points = [];\n for (var j = 0; j < indicatorAxes.length; j++) {\n points.push(axesTicksPoints[j][i]);\n }\n // Close\n if (points[0]) {\n points.push(points[0].slice());\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Can\\'t draw value axis ' + i);\n }\n }\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i);\n splitLines[colorIndex].push(new graphic.Polyline({\n shape: {\n points: points\n }\n }));\n }\n if (showSplitArea && prevPoints) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i - 1);\n splitAreas[colorIndex].push(new graphic.Polygon({\n shape: {\n points: points.concat(prevPoints)\n }\n }));\n }\n prevPoints = points.slice().reverse();\n }\n }\n var lineStyle = lineStyleModel.getLineStyle();\n var areaStyle = areaStyleModel.getAreaStyle();\n // Add splitArea before splitLine\n zrUtil.each(splitAreas, function (splitAreas, idx) {\n this.group.add(graphic.mergePath(splitAreas, {\n style: zrUtil.defaults({\n stroke: 'none',\n fill: splitAreaColorsArr[idx % splitAreaColorsArr.length]\n }, areaStyle),\n silent: true\n }));\n }, this);\n zrUtil.each(splitLines, function (splitLines, idx) {\n this.group.add(graphic.mergePath(splitLines, {\n style: zrUtil.defaults({\n fill: 'none',\n stroke: splitLineColorsArr[idx % splitLineColorsArr.length]\n }, lineStyle),\n silent: true\n }));\n }, this);\n };\n RadarView.type = 'radar';\n return RadarView;\n}(ComponentView);\nexport default RadarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar IndicatorAxis = /** @class */function (_super) {\n __extends(IndicatorAxis, _super);\n function IndicatorAxis(dim, scale, radiusExtent) {\n var _this = _super.call(this, dim, scale, radiusExtent) || this;\n _this.type = 'value';\n _this.angle = 0;\n _this.name = '';\n return _this;\n }\n return IndicatorAxis;\n}(Axis);\nexport default IndicatorAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO clockwise\nimport IndicatorAxis from './IndicatorAxis.js';\nimport IntervalScale from '../../scale/Interval.js';\nimport * as numberUtil from '../../util/number.js';\nimport { map, each, isString, isNumber } from 'zrender/lib/core/util.js';\nimport { alignScaleTicks } from '../axisAlignTicks.js';\nvar Radar = /** @class */function () {\n function Radar(radarModel, ecModel, api) {\n /**\n *\n * Radar dimensions\n */\n this.dimensions = [];\n this._model = radarModel;\n this._indicatorAxes = map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, new IntervalScale()\n // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()\n );\n\n indicatorAxis.name = indicatorModel.get('name');\n // Inject model and axis\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n }\n Radar.prototype.getIndicatorAxes = function () {\n return this._indicatorAxes;\n };\n Radar.prototype.dataToPoint = function (value, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex);\n };\n // TODO: API should be coordToPoint([coord, indicatorIndex])\n Radar.prototype.coordToPoint = function (coord, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n var angle = indicatorAxis.angle;\n var x = this.cx + coord * Math.cos(angle);\n var y = this.cy - coord * Math.sin(angle);\n return [x, y];\n };\n Radar.prototype.pointToData = function (pt) {\n var dx = pt[0] - this.cx;\n var dy = pt[1] - this.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx);\n // Find the closest angle\n // FIXME index can calculated directly\n var minRadianDiff = Infinity;\n var closestAxis;\n var closestAxisIdx = -1;\n for (var i = 0; i < this._indicatorAxes.length; i++) {\n var indicatorAxis = this._indicatorAxes[i];\n var diff = Math.abs(radian - indicatorAxis.angle);\n if (diff < minRadianDiff) {\n closestAxis = indicatorAxis;\n closestAxisIdx = i;\n minRadianDiff = diff;\n }\n }\n return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))];\n };\n Radar.prototype.resize = function (radarModel, api) {\n var center = radarModel.get('center');\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n var viewSize = Math.min(viewWidth, viewHeight) / 2;\n this.cx = numberUtil.parsePercent(center[0], viewWidth);\n this.cy = numberUtil.parsePercent(center[1], viewHeight);\n this.startAngle = radarModel.get('startAngle') * Math.PI / 180;\n // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`\n var radius = radarModel.get('radius');\n if (isString(radius) || isNumber(radius)) {\n radius = [0, radius];\n }\n this.r0 = numberUtil.parsePercent(radius[0], viewSize);\n this.r = numberUtil.parsePercent(radius[1], viewSize);\n each(this._indicatorAxes, function (indicatorAxis, idx) {\n indicatorAxis.setExtent(this.r0, this.r);\n var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length;\n // Normalize to [-PI, PI]\n angle = Math.atan2(Math.sin(angle), Math.cos(angle));\n indicatorAxis.angle = angle;\n }, this);\n };\n Radar.prototype.update = function (ecModel, api) {\n var indicatorAxes = this._indicatorAxes;\n var radarModel = this._model;\n each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.setExtent(Infinity, -Infinity);\n });\n ecModel.eachSeriesByType('radar', function (radarSeries, idx) {\n if (radarSeries.get('coordinateSystem') !== 'radar'\n // @ts-ignore\n || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) {\n return;\n }\n var data = radarSeries.getData();\n each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim));\n });\n }, this);\n var splitNumber = radarModel.get('splitNumber');\n var dummyScale = new IntervalScale();\n dummyScale.setExtent(0, splitNumber);\n dummyScale.setInterval(1);\n // Force all the axis fixing the maxSplitNumber.\n each(indicatorAxes, function (indicatorAxis, idx) {\n alignScaleTicks(indicatorAxis.scale, indicatorAxis.model, dummyScale);\n });\n };\n Radar.prototype.convertToPixel = function (ecModel, finder, value) {\n console.warn('Not implemented.');\n return null;\n };\n Radar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n console.warn('Not implemented.');\n return null;\n };\n Radar.prototype.containPoint = function (point) {\n console.warn('Not implemented.');\n return false;\n };\n Radar.create = function (ecModel, api) {\n var radarList = [];\n ecModel.eachComponent('radar', function (radarModel) {\n var radar = new Radar(radarModel, ecModel, api);\n radarList.push(radar);\n radarModel.coordinateSystem = radar;\n });\n ecModel.eachSeriesByType('radar', function (radarSeries) {\n if (radarSeries.get('coordinateSystem') === 'radar') {\n // Inject coordinate system\n // @ts-ignore\n radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0];\n }\n });\n return radarList;\n };\n /**\n * Radar dimensions is based on the data\n */\n Radar.dimensions = [];\n return Radar;\n}();\nexport default Radar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport RadarModel from '../../coord/radar/RadarModel.js';\nimport RadarView from './RadarView.js';\nimport Radar from '../../coord/radar/Radar.js';\nexport function install(registers) {\n registers.registerCoordinateSystem('radar', Radar);\n registers.registerComponentModel(RadarModel);\n registers.registerComponentView(RadarView);\n registers.registerVisual({\n seriesType: 'radar',\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n // itemVisual symbol is for selected data\n data.each(function (idx) {\n data.setItemVisual(idx, 'legendIcon', 'roundRect');\n });\n // visual is for unselected data\n data.setVisual('legendIcon', 'roundRect');\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport radarLayout from '../radar/radarLayout.js';\nimport dataFilter from '../../processor/dataFilter.js';\nimport backwardCompat from '../radar/backwardCompat.js';\nimport RadarView from './RadarView.js';\nimport RadarSeriesModel from './RadarSeries.js';\nimport { install as installRadarComponent } from '../../component/radar/install.js';\nexport function install(registers) {\n use(installRadarComponent);\n registers.registerChartView(RadarView);\n registers.registerSeriesModel(RadarSeriesModel);\n registers.registerLayout(radarLayout);\n registers.registerProcessor(dataFilter('radar'));\n registers.registerPreprocessor(backwardCompat);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as echarts from '../../core/echarts.js';\nimport { noop } from 'zrender/lib/core/util.js';\nvar ATTR = '\\0_ec_interaction_mutex';\nexport function take(zr, resourceKey, userKey) {\n var store = getStore(zr);\n store[resourceKey] = userKey;\n}\nexport function release(zr, resourceKey, userKey) {\n var store = getStore(zr);\n var uKey = store[resourceKey];\n if (uKey === userKey) {\n store[resourceKey] = null;\n }\n}\nexport function isTaken(zr, resourceKey) {\n return !!getStore(zr)[resourceKey];\n}\nfunction getStore(zr) {\n return zr[ATTR] || (zr[ATTR] = {});\n}\n/**\n * payload: {\n * type: 'takeGlobalCursor',\n * key: 'dataZoomSelect', or 'brush', or ...,\n * If no userKey, release global cursor.\n * }\n */\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'takeGlobalCursor',\n event: 'globalCursorTaken',\n update: 'update'\n}, noop);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as interactionMutex from './interactionMutex.js';\nimport { isString, bind, defaults, clone } from 'zrender/lib/core/util.js';\n;\nvar RoamController = /** @class */function (_super) {\n __extends(RoamController, _super);\n function RoamController(zr) {\n var _this = _super.call(this) || this;\n _this._zr = zr;\n // Avoid two roamController bind the same handler\n var mousedownHandler = bind(_this._mousedownHandler, _this);\n var mousemoveHandler = bind(_this._mousemoveHandler, _this);\n var mouseupHandler = bind(_this._mouseupHandler, _this);\n var mousewheelHandler = bind(_this._mousewheelHandler, _this);\n var pinchHandler = bind(_this._pinchHandler, _this);\n /**\n * Notice: only enable needed types. For example, if 'zoom'\n * is not needed, 'zoom' should not be enabled, otherwise\n * default mousewheel behaviour (scroll page) will be disabled.\n */\n _this.enable = function (controlType, opt) {\n // Disable previous first\n this.disable();\n this._opt = defaults(clone(opt) || {}, {\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n // By default, wheel do not trigger move.\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true\n });\n if (controlType == null) {\n controlType = true;\n }\n if (controlType === true || controlType === 'move' || controlType === 'pan') {\n zr.on('mousedown', mousedownHandler);\n zr.on('mousemove', mousemoveHandler);\n zr.on('mouseup', mouseupHandler);\n }\n if (controlType === true || controlType === 'scale' || controlType === 'zoom') {\n zr.on('mousewheel', mousewheelHandler);\n zr.on('pinch', pinchHandler);\n }\n };\n _this.disable = function () {\n zr.off('mousedown', mousedownHandler);\n zr.off('mousemove', mousemoveHandler);\n zr.off('mouseup', mouseupHandler);\n zr.off('mousewheel', mousewheelHandler);\n zr.off('pinch', pinchHandler);\n };\n return _this;\n }\n RoamController.prototype.isDragging = function () {\n return this._dragging;\n };\n RoamController.prototype.isPinching = function () {\n return this._pinching;\n };\n RoamController.prototype.setPointerChecker = function (pointerChecker) {\n this.pointerChecker = pointerChecker;\n };\n RoamController.prototype.dispose = function () {\n this.disable();\n };\n RoamController.prototype._mousedownHandler = function (e) {\n if (eventTool.isMiddleOrRightButtonOnMouseUpDown(e)) {\n return;\n }\n var el = e.target;\n while (el) {\n if (el.draggable) {\n return;\n }\n // check if host is draggable\n el = el.__hostTarget || el.parent;\n }\n var x = e.offsetX;\n var y = e.offsetY;\n // Only check on mosedown, but not mousemove.\n // Mouse can be out of target when mouse moving.\n if (this.pointerChecker && this.pointerChecker(e, x, y)) {\n this._x = x;\n this._y = y;\n this._dragging = true;\n }\n };\n RoamController.prototype._mousemoveHandler = function (e) {\n if (!this._dragging || !isAvailableBehavior('moveOnMouseMove', e, this._opt) || e.gestureEvent === 'pinch' || interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n var x = e.offsetX;\n var y = e.offsetY;\n var oldX = this._x;\n var oldY = this._y;\n var dx = x - oldX;\n var dy = y - oldY;\n this._x = x;\n this._y = y;\n this._opt.preventDefaultMouseMove && eventTool.stop(e.event);\n trigger(this, 'pan', 'moveOnMouseMove', e, {\n dx: dx,\n dy: dy,\n oldX: oldX,\n oldY: oldY,\n newX: x,\n newY: y,\n isAvailableBehavior: null\n });\n };\n RoamController.prototype._mouseupHandler = function (e) {\n if (!eventTool.isMiddleOrRightButtonOnMouseUpDown(e)) {\n this._dragging = false;\n }\n };\n RoamController.prototype._mousewheelHandler = function (e) {\n var shouldZoom = isAvailableBehavior('zoomOnMouseWheel', e, this._opt);\n var shouldMove = isAvailableBehavior('moveOnMouseWheel', e, this._opt);\n var wheelDelta = e.wheelDelta;\n var absWheelDeltaDelta = Math.abs(wheelDelta);\n var originX = e.offsetX;\n var originY = e.offsetY;\n // wheelDelta maybe -0 in chrome mac.\n if (wheelDelta === 0 || !shouldZoom && !shouldMove) {\n return;\n }\n // If both `shouldZoom` and `shouldMove` is true, trigger\n // their event both, and the final behavior is determined\n // by event listener themselves.\n if (shouldZoom) {\n // Convenience:\n // Mac and VM Windows on Mac: scroll up: zoom out.\n // Windows: scroll up: zoom in.\n // FIXME: Should do more test in different environment.\n // wheelDelta is too complicated in difference nvironment\n // (https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel),\n // although it has been normallized by zrender.\n // wheelDelta of mouse wheel is bigger than touch pad.\n var factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1;\n var scale = wheelDelta > 0 ? factor : 1 / factor;\n checkPointerAndTrigger(this, 'zoom', 'zoomOnMouseWheel', e, {\n scale: scale,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n if (shouldMove) {\n // FIXME: Should do more test in different environment.\n var absDelta = Math.abs(wheelDelta);\n // wheelDelta of mouse wheel is bigger than touch pad.\n var scrollDelta = (wheelDelta > 0 ? 1 : -1) * (absDelta > 3 ? 0.4 : absDelta > 1 ? 0.15 : 0.05);\n checkPointerAndTrigger(this, 'scrollMove', 'moveOnMouseWheel', e, {\n scrollDelta: scrollDelta,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n };\n RoamController.prototype._pinchHandler = function (e) {\n if (interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1;\n checkPointerAndTrigger(this, 'zoom', null, e, {\n scale: scale,\n originX: e.pinchX,\n originY: e.pinchY,\n isAvailableBehavior: null\n });\n };\n return RoamController;\n}(Eventful);\nfunction checkPointerAndTrigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n if (controller.pointerChecker && controller.pointerChecker(e, contollerEvent.originX, contollerEvent.originY)) {\n // When mouse is out of roamController rect,\n // default befavoius should not be be disabled, otherwise\n // page sliding is disabled, contrary to expectation.\n eventTool.stop(e.event);\n trigger(controller, eventName, behaviorToCheck, e, contollerEvent);\n }\n}\nfunction trigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n // Also provide behavior checker for event listener, for some case that\n // multiple components share one listener.\n contollerEvent.isAvailableBehavior = bind(isAvailableBehavior, null, behaviorToCheck, e);\n // TODO should not have type issue.\n controller.trigger(eventName, contollerEvent);\n}\n// settings: {\n// zoomOnMouseWheel\n// moveOnMouseMove\n// moveOnMouseWheel\n// }\n// The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\nfunction isAvailableBehavior(behaviorToCheck, e, settings) {\n var setting = settings[behaviorToCheck];\n return !behaviorToCheck || setting && (!isString(setting) || e.event[setting + 'Key']);\n}\nexport default RoamController;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * For geo and graph.\n */\nexport function updateViewOnPan(controllerHost, dx, dy) {\n var target = controllerHost.target;\n target.x += dx;\n target.y += dy;\n target.dirty();\n}\n/**\n * For geo and graph.\n */\nexport function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) {\n var target = controllerHost.target;\n var zoomLimit = controllerHost.zoomLimit;\n var newZoom = controllerHost.zoom = controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n var zoomScale = newZoom / controllerHost.zoom;\n controllerHost.zoom = newZoom;\n // Keep the mouse center when scaling\n target.x -= (zoomX - target.x) * (zoomScale - 1);\n target.y -= (zoomY - target.y) * (zoomScale - 1);\n target.scaleX *= zoomScale;\n target.scaleY *= zoomScale;\n target.dirty();\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar IRRELEVANT_EXCLUDES = {\n 'axisPointer': 1,\n 'tooltip': 1,\n 'brush': 1\n};\n/**\n * Avoid that: mouse click on a elements that is over geo or graph,\n * but roam is triggered.\n */\nexport function onIrrelevantElement(e, api, targetCoordSysModel) {\n var model = api.getComponentByElement(e.topTarget);\n // If model is axisModel, it works only if it is injected with coordinateSystem.\n var coordSys = model && model.coordinateSystem;\n return model && model !== targetCoordSysModel && !IRRELEVANT_EXCLUDES.hasOwnProperty(model.mainType) && coordSys && coordSys.model !== targetCoordSysModel;\n}","import { isString } from '../core/util.js';\nexport function parseXML(svg) {\n if (isString(svg)) {\n var parser = new DOMParser();\n svg = parser.parseFromString(svg, 'text/xml');\n }\n var svgNode = svg;\n if (svgNode.nodeType === 9) {\n svgNode = svgNode.firstChild;\n }\n while (svgNode.nodeName.toLowerCase() !== 'svg' || svgNode.nodeType !== 1) {\n svgNode = svgNode.nextSibling;\n }\n return svgNode;\n}\n","import Group from '../graphic/Group.js';\nimport ZRImage from '../graphic/Image.js';\nimport Circle from '../graphic/shape/Circle.js';\nimport Rect from '../graphic/shape/Rect.js';\nimport Ellipse from '../graphic/shape/Ellipse.js';\nimport Line from '../graphic/shape/Line.js';\nimport Polygon from '../graphic/shape/Polygon.js';\nimport Polyline from '../graphic/shape/Polyline.js';\nimport * as matrix from '../core/matrix.js';\nimport { createFromString } from './path.js';\nimport { defaults, trim, each, map, keys, hasOwn } from '../core/util.js';\nimport LinearGradient from '../graphic/LinearGradient.js';\nimport RadialGradient from '../graphic/RadialGradient.js';\nimport TSpan from '../graphic/TSpan.js';\nimport { parseXML } from './parseXML.js';\n;\nvar nodeParsers;\nvar INHERITABLE_STYLE_ATTRIBUTES_MAP = {\n 'fill': 'fill',\n 'stroke': 'stroke',\n 'stroke-width': 'lineWidth',\n 'opacity': 'opacity',\n 'fill-opacity': 'fillOpacity',\n 'stroke-opacity': 'strokeOpacity',\n 'stroke-dasharray': 'lineDash',\n 'stroke-dashoffset': 'lineDashOffset',\n 'stroke-linecap': 'lineCap',\n 'stroke-linejoin': 'lineJoin',\n 'stroke-miterlimit': 'miterLimit',\n 'font-family': 'fontFamily',\n 'font-size': 'fontSize',\n 'font-style': 'fontStyle',\n 'font-weight': 'fontWeight',\n 'text-anchor': 'textAlign',\n 'visibility': 'visibility',\n 'display': 'display'\n};\nvar INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS = keys(INHERITABLE_STYLE_ATTRIBUTES_MAP);\nvar SELF_STYLE_ATTRIBUTES_MAP = {\n 'alignment-baseline': 'textBaseline',\n 'stop-color': 'stopColor'\n};\nvar SELF_STYLE_ATTRIBUTES_MAP_KEYS = keys(SELF_STYLE_ATTRIBUTES_MAP);\nvar SVGParser = (function () {\n function SVGParser() {\n this._defs = {};\n this._root = null;\n }\n SVGParser.prototype.parse = function (xml, opt) {\n opt = opt || {};\n var svg = parseXML(xml);\n if (process.env.NODE_ENV !== 'production') {\n if (!svg) {\n throw new Error('Illegal svg');\n }\n }\n this._defsUsePending = [];\n var root = new Group();\n this._root = root;\n var named = [];\n var viewBox = svg.getAttribute('viewBox') || '';\n var width = parseFloat((svg.getAttribute('width') || opt.width));\n var height = parseFloat((svg.getAttribute('height') || opt.height));\n isNaN(width) && (width = null);\n isNaN(height) && (height = null);\n parseAttributes(svg, root, null, true, false);\n var child = svg.firstChild;\n while (child) {\n this._parseNode(child, root, named, null, false, false);\n child = child.nextSibling;\n }\n applyDefs(this._defs, this._defsUsePending);\n this._defsUsePending = [];\n var viewBoxRect;\n var viewBoxTransform;\n if (viewBox) {\n var viewBoxArr = splitNumberSequence(viewBox);\n if (viewBoxArr.length >= 4) {\n viewBoxRect = {\n x: parseFloat((viewBoxArr[0] || 0)),\n y: parseFloat((viewBoxArr[1] || 0)),\n width: parseFloat(viewBoxArr[2]),\n height: parseFloat(viewBoxArr[3])\n };\n }\n }\n if (viewBoxRect && width != null && height != null) {\n viewBoxTransform = makeViewBoxTransform(viewBoxRect, { x: 0, y: 0, width: width, height: height });\n if (!opt.ignoreViewBox) {\n var elRoot = root;\n root = new Group();\n root.add(elRoot);\n elRoot.scaleX = elRoot.scaleY = viewBoxTransform.scale;\n elRoot.x = viewBoxTransform.x;\n elRoot.y = viewBoxTransform.y;\n }\n }\n if (!opt.ignoreRootClip && width != null && height != null) {\n root.setClipPath(new Rect({\n shape: { x: 0, y: 0, width: width, height: height }\n }));\n }\n return {\n root: root,\n width: width,\n height: height,\n viewBoxRect: viewBoxRect,\n viewBoxTransform: viewBoxTransform,\n named: named\n };\n };\n SVGParser.prototype._parseNode = function (xmlNode, parentGroup, named, namedFrom, isInDefs, isInText) {\n var nodeName = xmlNode.nodeName.toLowerCase();\n var el;\n var namedFromForSub = namedFrom;\n if (nodeName === 'defs') {\n isInDefs = true;\n }\n if (nodeName === 'text') {\n isInText = true;\n }\n if (nodeName === 'defs' || nodeName === 'switch') {\n el = parentGroup;\n }\n else {\n if (!isInDefs) {\n var parser_1 = nodeParsers[nodeName];\n if (parser_1 && hasOwn(nodeParsers, nodeName)) {\n el = parser_1.call(this, xmlNode, parentGroup);\n var nameAttr = xmlNode.getAttribute('name');\n if (nameAttr) {\n var newNamed = {\n name: nameAttr,\n namedFrom: null,\n svgNodeTagLower: nodeName,\n el: el\n };\n named.push(newNamed);\n if (nodeName === 'g') {\n namedFromForSub = newNamed;\n }\n }\n else if (namedFrom) {\n named.push({\n name: namedFrom.name,\n namedFrom: namedFrom,\n svgNodeTagLower: nodeName,\n el: el\n });\n }\n parentGroup.add(el);\n }\n }\n var parser = paintServerParsers[nodeName];\n if (parser && hasOwn(paintServerParsers, nodeName)) {\n var def = parser.call(this, xmlNode);\n var id = xmlNode.getAttribute('id');\n if (id) {\n this._defs[id] = def;\n }\n }\n }\n if (el && el.isGroup) {\n var child = xmlNode.firstChild;\n while (child) {\n if (child.nodeType === 1) {\n this._parseNode(child, el, named, namedFromForSub, isInDefs, isInText);\n }\n else if (child.nodeType === 3 && isInText) {\n this._parseText(child, el);\n }\n child = child.nextSibling;\n }\n }\n };\n SVGParser.prototype._parseText = function (xmlNode, parentGroup) {\n var text = new TSpan({\n style: {\n text: xmlNode.textContent\n },\n silent: true,\n x: this._textX || 0,\n y: this._textY || 0\n });\n inheritStyle(parentGroup, text);\n parseAttributes(xmlNode, text, this._defsUsePending, false, false);\n applyTextAlignment(text, parentGroup);\n var textStyle = text.style;\n var fontSize = textStyle.fontSize;\n if (fontSize && fontSize < 9) {\n textStyle.fontSize = 9;\n text.scaleX *= fontSize / 9;\n text.scaleY *= fontSize / 9;\n }\n var font = (textStyle.fontSize || textStyle.fontFamily) && [\n textStyle.fontStyle,\n textStyle.fontWeight,\n (textStyle.fontSize || 12) + 'px',\n textStyle.fontFamily || 'sans-serif'\n ].join(' ');\n textStyle.font = font;\n var rect = text.getBoundingRect();\n this._textX += rect.width;\n parentGroup.add(text);\n return text;\n };\n SVGParser.internalField = (function () {\n nodeParsers = {\n 'g': function (xmlNode, parentGroup) {\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, false);\n return g;\n },\n 'rect': function (xmlNode, parentGroup) {\n var rect = new Rect();\n inheritStyle(parentGroup, rect);\n parseAttributes(xmlNode, rect, this._defsUsePending, false, false);\n rect.setShape({\n x: parseFloat(xmlNode.getAttribute('x') || '0'),\n y: parseFloat(xmlNode.getAttribute('y') || '0'),\n width: parseFloat(xmlNode.getAttribute('width') || '0'),\n height: parseFloat(xmlNode.getAttribute('height') || '0')\n });\n rect.silent = true;\n return rect;\n },\n 'circle': function (xmlNode, parentGroup) {\n var circle = new Circle();\n inheritStyle(parentGroup, circle);\n parseAttributes(xmlNode, circle, this._defsUsePending, false, false);\n circle.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || '0'),\n cy: parseFloat(xmlNode.getAttribute('cy') || '0'),\n r: parseFloat(xmlNode.getAttribute('r') || '0')\n });\n circle.silent = true;\n return circle;\n },\n 'line': function (xmlNode, parentGroup) {\n var line = new Line();\n inheritStyle(parentGroup, line);\n parseAttributes(xmlNode, line, this._defsUsePending, false, false);\n line.setShape({\n x1: parseFloat(xmlNode.getAttribute('x1') || '0'),\n y1: parseFloat(xmlNode.getAttribute('y1') || '0'),\n x2: parseFloat(xmlNode.getAttribute('x2') || '0'),\n y2: parseFloat(xmlNode.getAttribute('y2') || '0')\n });\n line.silent = true;\n return line;\n },\n 'ellipse': function (xmlNode, parentGroup) {\n var ellipse = new Ellipse();\n inheritStyle(parentGroup, ellipse);\n parseAttributes(xmlNode, ellipse, this._defsUsePending, false, false);\n ellipse.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || '0'),\n cy: parseFloat(xmlNode.getAttribute('cy') || '0'),\n rx: parseFloat(xmlNode.getAttribute('rx') || '0'),\n ry: parseFloat(xmlNode.getAttribute('ry') || '0')\n });\n ellipse.silent = true;\n return ellipse;\n },\n 'polygon': function (xmlNode, parentGroup) {\n var pointsStr = xmlNode.getAttribute('points');\n var pointsArr;\n if (pointsStr) {\n pointsArr = parsePoints(pointsStr);\n }\n var polygon = new Polygon({\n shape: {\n points: pointsArr || []\n },\n silent: true\n });\n inheritStyle(parentGroup, polygon);\n parseAttributes(xmlNode, polygon, this._defsUsePending, false, false);\n return polygon;\n },\n 'polyline': function (xmlNode, parentGroup) {\n var pointsStr = xmlNode.getAttribute('points');\n var pointsArr;\n if (pointsStr) {\n pointsArr = parsePoints(pointsStr);\n }\n var polyline = new Polyline({\n shape: {\n points: pointsArr || []\n },\n silent: true\n });\n inheritStyle(parentGroup, polyline);\n parseAttributes(xmlNode, polyline, this._defsUsePending, false, false);\n return polyline;\n },\n 'image': function (xmlNode, parentGroup) {\n var img = new ZRImage();\n inheritStyle(parentGroup, img);\n parseAttributes(xmlNode, img, this._defsUsePending, false, false);\n img.setStyle({\n image: xmlNode.getAttribute('xlink:href') || xmlNode.getAttribute('href'),\n x: +xmlNode.getAttribute('x'),\n y: +xmlNode.getAttribute('y'),\n width: +xmlNode.getAttribute('width'),\n height: +xmlNode.getAttribute('height')\n });\n img.silent = true;\n return img;\n },\n 'text': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x') || '0';\n var y = xmlNode.getAttribute('y') || '0';\n var dx = xmlNode.getAttribute('dx') || '0';\n var dy = xmlNode.getAttribute('dy') || '0';\n this._textX = parseFloat(x) + parseFloat(dx);\n this._textY = parseFloat(y) + parseFloat(dy);\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, true);\n return g;\n },\n 'tspan': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x');\n var y = xmlNode.getAttribute('y');\n if (x != null) {\n this._textX = parseFloat(x);\n }\n if (y != null) {\n this._textY = parseFloat(y);\n }\n var dx = xmlNode.getAttribute('dx') || '0';\n var dy = xmlNode.getAttribute('dy') || '0';\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, true);\n this._textX += parseFloat(dx);\n this._textY += parseFloat(dy);\n return g;\n },\n 'path': function (xmlNode, parentGroup) {\n var d = xmlNode.getAttribute('d') || '';\n var path = createFromString(d);\n inheritStyle(parentGroup, path);\n parseAttributes(xmlNode, path, this._defsUsePending, false, false);\n path.silent = true;\n return path;\n }\n };\n })();\n return SVGParser;\n}());\nvar paintServerParsers = {\n 'lineargradient': function (xmlNode) {\n var x1 = parseInt(xmlNode.getAttribute('x1') || '0', 10);\n var y1 = parseInt(xmlNode.getAttribute('y1') || '0', 10);\n var x2 = parseInt(xmlNode.getAttribute('x2') || '10', 10);\n var y2 = parseInt(xmlNode.getAttribute('y2') || '0', 10);\n var gradient = new LinearGradient(x1, y1, x2, y2);\n parsePaintServerUnit(xmlNode, gradient);\n parseGradientColorStops(xmlNode, gradient);\n return gradient;\n },\n 'radialgradient': function (xmlNode) {\n var cx = parseInt(xmlNode.getAttribute('cx') || '0', 10);\n var cy = parseInt(xmlNode.getAttribute('cy') || '0', 10);\n var r = parseInt(xmlNode.getAttribute('r') || '0', 10);\n var gradient = new RadialGradient(cx, cy, r);\n parsePaintServerUnit(xmlNode, gradient);\n parseGradientColorStops(xmlNode, gradient);\n return gradient;\n }\n};\nfunction parsePaintServerUnit(xmlNode, gradient) {\n var gradientUnits = xmlNode.getAttribute('gradientUnits');\n if (gradientUnits === 'userSpaceOnUse') {\n gradient.global = true;\n }\n}\nfunction parseGradientColorStops(xmlNode, gradient) {\n var stop = xmlNode.firstChild;\n while (stop) {\n if (stop.nodeType === 1\n && stop.nodeName.toLocaleLowerCase() === 'stop') {\n var offsetStr = stop.getAttribute('offset');\n var offset = void 0;\n if (offsetStr && offsetStr.indexOf('%') > 0) {\n offset = parseInt(offsetStr, 10) / 100;\n }\n else if (offsetStr) {\n offset = parseFloat(offsetStr);\n }\n else {\n offset = 0;\n }\n var styleVals = {};\n parseInlineStyle(stop, styleVals, styleVals);\n var stopColor = styleVals.stopColor\n || stop.getAttribute('stop-color')\n || '#000000';\n gradient.colorStops.push({\n offset: offset,\n color: stopColor\n });\n }\n stop = stop.nextSibling;\n }\n}\nfunction inheritStyle(parent, child) {\n if (parent && parent.__inheritedStyle) {\n if (!child.__inheritedStyle) {\n child.__inheritedStyle = {};\n }\n defaults(child.__inheritedStyle, parent.__inheritedStyle);\n }\n}\nfunction parsePoints(pointsString) {\n var list = splitNumberSequence(pointsString);\n var points = [];\n for (var i = 0; i < list.length; i += 2) {\n var x = parseFloat(list[i]);\n var y = parseFloat(list[i + 1]);\n points.push([x, y]);\n }\n return points;\n}\nfunction parseAttributes(xmlNode, el, defsUsePending, onlyInlineStyle, isTextGroup) {\n var disp = el;\n var inheritedStyle = disp.__inheritedStyle = disp.__inheritedStyle || {};\n var selfStyle = {};\n if (xmlNode.nodeType === 1) {\n parseTransformAttribute(xmlNode, el);\n parseInlineStyle(xmlNode, inheritedStyle, selfStyle);\n if (!onlyInlineStyle) {\n parseAttributeStyle(xmlNode, inheritedStyle, selfStyle);\n }\n }\n disp.style = disp.style || {};\n if (inheritedStyle.fill != null) {\n disp.style.fill = getFillStrokeStyle(disp, 'fill', inheritedStyle.fill, defsUsePending);\n }\n if (inheritedStyle.stroke != null) {\n disp.style.stroke = getFillStrokeStyle(disp, 'stroke', inheritedStyle.stroke, defsUsePending);\n }\n each([\n 'lineWidth', 'opacity', 'fillOpacity', 'strokeOpacity', 'miterLimit', 'fontSize'\n ], function (propName) {\n if (inheritedStyle[propName] != null) {\n disp.style[propName] = parseFloat(inheritedStyle[propName]);\n }\n });\n each([\n 'lineDashOffset', 'lineCap', 'lineJoin', 'fontWeight', 'fontFamily', 'fontStyle', 'textAlign'\n ], function (propName) {\n if (inheritedStyle[propName] != null) {\n disp.style[propName] = inheritedStyle[propName];\n }\n });\n if (isTextGroup) {\n disp.__selfStyle = selfStyle;\n }\n if (inheritedStyle.lineDash) {\n disp.style.lineDash = map(splitNumberSequence(inheritedStyle.lineDash), function (str) {\n return parseFloat(str);\n });\n }\n if (inheritedStyle.visibility === 'hidden' || inheritedStyle.visibility === 'collapse') {\n disp.invisible = true;\n }\n if (inheritedStyle.display === 'none') {\n disp.ignore = true;\n }\n}\nfunction applyTextAlignment(text, parentGroup) {\n var parentSelfStyle = parentGroup.__selfStyle;\n if (parentSelfStyle) {\n var textBaseline = parentSelfStyle.textBaseline;\n var zrTextBaseline = textBaseline;\n if (!textBaseline || textBaseline === 'auto') {\n zrTextBaseline = 'alphabetic';\n }\n else if (textBaseline === 'baseline') {\n zrTextBaseline = 'alphabetic';\n }\n else if (textBaseline === 'before-edge' || textBaseline === 'text-before-edge') {\n zrTextBaseline = 'top';\n }\n else if (textBaseline === 'after-edge' || textBaseline === 'text-after-edge') {\n zrTextBaseline = 'bottom';\n }\n else if (textBaseline === 'central' || textBaseline === 'mathematical') {\n zrTextBaseline = 'middle';\n }\n text.style.textBaseline = zrTextBaseline;\n }\n var parentInheritedStyle = parentGroup.__inheritedStyle;\n if (parentInheritedStyle) {\n var textAlign = parentInheritedStyle.textAlign;\n var zrTextAlign = textAlign;\n if (textAlign) {\n if (textAlign === 'middle') {\n zrTextAlign = 'center';\n }\n text.style.textAlign = zrTextAlign;\n }\n }\n}\nvar urlRegex = /^url\\(\\s*#(.*?)\\)/;\nfunction getFillStrokeStyle(el, method, str, defsUsePending) {\n var urlMatch = str && str.match(urlRegex);\n if (urlMatch) {\n var url = trim(urlMatch[1]);\n defsUsePending.push([el, method, url]);\n return;\n }\n if (str === 'none') {\n str = null;\n }\n return str;\n}\nfunction applyDefs(defs, defsUsePending) {\n for (var i = 0; i < defsUsePending.length; i++) {\n var item = defsUsePending[i];\n item[0].style[item[1]] = defs[item[2]];\n }\n}\nvar numberReg = /-?([0-9]*\\.)?[0-9]+([eE]-?[0-9]+)?/g;\nfunction splitNumberSequence(rawStr) {\n return rawStr.match(numberReg) || [];\n}\nvar transformRegex = /(translate|scale|rotate|skewX|skewY|matrix)\\(([\\-\\s0-9\\.eE,]*)\\)/g;\nvar DEGREE_TO_ANGLE = Math.PI / 180;\nfunction parseTransformAttribute(xmlNode, node) {\n var transform = xmlNode.getAttribute('transform');\n if (transform) {\n transform = transform.replace(/,/g, ' ');\n var transformOps_1 = [];\n var mt = null;\n transform.replace(transformRegex, function (str, type, value) {\n transformOps_1.push(type, value);\n return '';\n });\n for (var i = transformOps_1.length - 1; i > 0; i -= 2) {\n var value = transformOps_1[i];\n var type = transformOps_1[i - 1];\n var valueArr = splitNumberSequence(value);\n mt = mt || matrix.create();\n switch (type) {\n case 'translate':\n matrix.translate(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || '0')]);\n break;\n case 'scale':\n matrix.scale(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || valueArr[0])]);\n break;\n case 'rotate':\n matrix.rotate(mt, mt, -parseFloat(valueArr[0]) * DEGREE_TO_ANGLE, [\n parseFloat(valueArr[1] || '0'),\n parseFloat(valueArr[2] || '0')\n ]);\n break;\n case 'skewX':\n var sx = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE);\n matrix.mul(mt, [1, 0, sx, 1, 0, 0], mt);\n break;\n case 'skewY':\n var sy = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE);\n matrix.mul(mt, [1, sy, 0, 1, 0, 0], mt);\n break;\n case 'matrix':\n mt[0] = parseFloat(valueArr[0]);\n mt[1] = parseFloat(valueArr[1]);\n mt[2] = parseFloat(valueArr[2]);\n mt[3] = parseFloat(valueArr[3]);\n mt[4] = parseFloat(valueArr[4]);\n mt[5] = parseFloat(valueArr[5]);\n break;\n }\n }\n node.setLocalTransform(mt);\n }\n}\nvar styleRegex = /([^\\s:;]+)\\s*:\\s*([^:;]+)/g;\nfunction parseInlineStyle(xmlNode, inheritableStyleResult, selfStyleResult) {\n var style = xmlNode.getAttribute('style');\n if (!style) {\n return;\n }\n styleRegex.lastIndex = 0;\n var styleRegResult;\n while ((styleRegResult = styleRegex.exec(style)) != null) {\n var svgStlAttr = styleRegResult[1];\n var zrInheritableStlAttr = hasOwn(INHERITABLE_STYLE_ATTRIBUTES_MAP, svgStlAttr)\n ? INHERITABLE_STYLE_ATTRIBUTES_MAP[svgStlAttr]\n : null;\n if (zrInheritableStlAttr) {\n inheritableStyleResult[zrInheritableStlAttr] = styleRegResult[2];\n }\n var zrSelfStlAttr = hasOwn(SELF_STYLE_ATTRIBUTES_MAP, svgStlAttr)\n ? SELF_STYLE_ATTRIBUTES_MAP[svgStlAttr]\n : null;\n if (zrSelfStlAttr) {\n selfStyleResult[zrSelfStlAttr] = styleRegResult[2];\n }\n }\n}\nfunction parseAttributeStyle(xmlNode, inheritableStyleResult, selfStyleResult) {\n for (var i = 0; i < INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) {\n var svgAttrName = INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[i];\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n inheritableStyleResult[INHERITABLE_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue;\n }\n }\n for (var i = 0; i < SELF_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) {\n var svgAttrName = SELF_STYLE_ATTRIBUTES_MAP_KEYS[i];\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n selfStyleResult[SELF_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue;\n }\n }\n}\nexport function makeViewBoxTransform(viewBoxRect, boundingRect) {\n var scaleX = boundingRect.width / viewBoxRect.width;\n var scaleY = boundingRect.height / viewBoxRect.height;\n var scale = Math.min(scaleX, scaleY);\n return {\n scale: scale,\n x: -(viewBoxRect.x + viewBoxRect.width / 2) * scale + (boundingRect.x + boundingRect.width / 2),\n y: -(viewBoxRect.y + viewBoxRect.height / 2) * scale + (boundingRect.y + boundingRect.height / 2)\n };\n}\nexport function parseSVG(xml, opt) {\n var parser = new SVGParser();\n return parser.parse(xml, opt);\n}\nexport { parseXML };\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseSVG, makeViewBoxTransform } from 'zrender/lib/tool/parseSVG.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport Rect from 'zrender/lib/graphic/shape/Rect.js';\nimport { assert, createHashMap, each } from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { parseXML } from 'zrender/lib/tool/parseXML.js';\nimport { GeoSVGRegion } from './Region.js';\n/**\n * \"region available\" means that: enable users to set attribute `name=\"xxx\"` on those tags\n * to make it be a region.\n * 1. region styles and its label styles can be defined in echarts opton:\n * ```js\n * geo: {\n * regions: [{\n * name: 'xxx',\n * itemStyle: { ... },\n * label: { ... }\n * }, {\n * ...\n * },\n * ...]\n * };\n * ```\n * 2. name can be duplicated in different SVG tag. All of the tags with the same name share\n * a region option. For exampel if there are two representing two lung lobes. They have\n * no common parents but both of them need to display label \"lung\" inside.\n */\nvar REGION_AVAILABLE_SVG_TAG_MAP = createHashMap(['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path',\n// are also enabled because some SVG might paint text itself,\n// but still need to trigger events or tooltip.\n'text', 'tspan',\n// is also enabled because this case: if multiple tags share one name\n// and need label displayed, every tags will display the name, which is not\n// expected. So we can put them into a . Thereby only one label\n// displayed and located based on the bounding rect of the .\n'g']);\nvar GeoSVGResource = /** @class */function () {\n function GeoSVGResource(mapName, svg) {\n this.type = 'geoSVG';\n // All used graphics. key: hostKey, value: root\n this._usedGraphicMap = createHashMap();\n // All unused graphics.\n this._freedGraphics = [];\n this._mapName = mapName;\n // Only perform parse to XML object here, which might be time\n // consiming for large SVG.\n // Although convert XML to zrender element is also time consiming,\n // if we do it here, the clone of zrender elements has to be\n // required. So we do it once for each geo instance, util real\n // performance issues call for optimizing it.\n this._parsedXML = parseXML(svg);\n }\n GeoSVGResource.prototype.load = function /* nameMap: NameMap */\n () {\n // In the \"load\" stage, graphic need to be built to\n // get boundingRect for geo coordinate system.\n var firstGraphic = this._firstGraphic;\n // Create the return data structure only when first graphic created.\n // Because they will be used in geo coordinate system update stage,\n // and `regions` will be mounted at `geo` coordinate system,\n // in which there is no \"view\" info, so that it should better not to\n // make references to graphic elements.\n if (!firstGraphic) {\n firstGraphic = this._firstGraphic = this._buildGraphic(this._parsedXML);\n this._freedGraphics.push(firstGraphic);\n this._boundingRect = this._firstGraphic.boundingRect.clone();\n // PENDING: `nameMap` will not be supported until some real requirement come.\n // if (nameMap) {\n // named = applyNameMap(named, nameMap);\n // }\n var _a = createRegions(firstGraphic.named),\n regions = _a.regions,\n regionsMap = _a.regionsMap;\n this._regions = regions;\n this._regionsMap = regionsMap;\n }\n return {\n boundingRect: this._boundingRect,\n regions: this._regions,\n regionsMap: this._regionsMap\n };\n };\n GeoSVGResource.prototype._buildGraphic = function (svgXML) {\n var result;\n var rootFromParse;\n try {\n result = svgXML && parseSVG(svgXML, {\n ignoreViewBox: true,\n ignoreRootClip: true\n }) || {};\n rootFromParse = result.root;\n assert(rootFromParse != null);\n } catch (e) {\n throw new Error('Invalid svg format\\n' + e.message);\n }\n // Note: we keep the covenant that the root has no transform. So always add an extra root.\n var root = new Group();\n root.add(rootFromParse);\n root.isGeoSVGGraphicRoot = true;\n // [THE_RULE_OF_VIEWPORT_AND_VIEWBOX]\n //\n // Consider: ``\n // - the `width/height` we call it `svgWidth/svgHeight` for short.\n // - `(0, 0, svgWidth, svgHeight)` defines the viewport of the SVG, or say,\n // \"viewport boundingRect\", or `boundingRect` for short.\n // - `viewBox` defines the transform from the real content ot the viewport.\n // `viewBox` has the same unit as the content of SVG.\n // If `viewBox` exists, a transform is defined, so the unit of `svgWidth/svgHeight` become\n // different from the content of SVG. Otherwise, they are the same.\n //\n // If both `svgWidth/svgHeight/viewBox` are specified in a SVG file, the transform rule will be:\n // 0. `boundingRect` is `(0, 0, svgWidth, svgHeight)`. Set it to Geo['_rect'] (View['_rect']).\n // 1. Make a transform from `viewBox` to `boundingRect`.\n // Note: only support `preserveAspectRatio 'xMidYMid'` here. That is, this transform will preserve\n // the aspect ratio.\n // 2. Make a transform from boundingRect to Geo['_viewRect'] (View['_viewRect'])\n // (`Geo`/`View` will do this job).\n // Note: this transform might not preserve aspect radio, which depending on how users specify\n // viewRect in echarts option (e.g., `geo.left/top/width/height` will not preserve aspect ratio,\n // but `geo.layoutCenter/layoutSize` will preserve aspect ratio).\n //\n // If `svgWidth/svgHeight` not specified, we use `viewBox` as the `boundingRect` to make the SVG\n // layout look good.\n //\n // If neither `svgWidth/svgHeight` nor `viewBox` are not specified, we calculate the boundingRect\n // of the SVG content and use them to make SVG layout look good.\n var svgWidth = result.width;\n var svgHeight = result.height;\n var viewBoxRect = result.viewBoxRect;\n var boundingRect = this._boundingRect;\n if (!boundingRect) {\n var bRectX = void 0;\n var bRectY = void 0;\n var bRectWidth = void 0;\n var bRectHeight = void 0;\n if (svgWidth != null) {\n bRectX = 0;\n bRectWidth = svgWidth;\n } else if (viewBoxRect) {\n bRectX = viewBoxRect.x;\n bRectWidth = viewBoxRect.width;\n }\n if (svgHeight != null) {\n bRectY = 0;\n bRectHeight = svgHeight;\n } else if (viewBoxRect) {\n bRectY = viewBoxRect.y;\n bRectHeight = viewBoxRect.height;\n }\n // If both viewBox and svgWidth/svgHeight not specified,\n // we have to determine how to layout those element to make them look good.\n if (bRectX == null || bRectY == null) {\n var calculatedBoundingRect = rootFromParse.getBoundingRect();\n if (bRectX == null) {\n bRectX = calculatedBoundingRect.x;\n bRectWidth = calculatedBoundingRect.width;\n }\n if (bRectY == null) {\n bRectY = calculatedBoundingRect.y;\n bRectHeight = calculatedBoundingRect.height;\n }\n }\n boundingRect = this._boundingRect = new BoundingRect(bRectX, bRectY, bRectWidth, bRectHeight);\n }\n if (viewBoxRect) {\n var viewBoxTransform = makeViewBoxTransform(viewBoxRect, boundingRect);\n // Only support `preserveAspectRatio 'xMidYMid'`\n rootFromParse.scaleX = rootFromParse.scaleY = viewBoxTransform.scale;\n rootFromParse.x = viewBoxTransform.x;\n rootFromParse.y = viewBoxTransform.y;\n }\n // SVG needs to clip based on `viewBox`. And some SVG files really rely on this feature.\n // They do not strictly confine all of the content inside a display rect, but deliberately\n // use a `viewBox` to define a displayable rect.\n // PENDING:\n // The drawback of the `setClipPath` here is: the region label (genereted by echarts) near the\n // edge might also be clipped, because region labels are put as `textContent` of the SVG path.\n root.setClipPath(new Rect({\n shape: boundingRect.plain()\n }));\n var named = [];\n each(result.named, function (namedItem) {\n if (REGION_AVAILABLE_SVG_TAG_MAP.get(namedItem.svgNodeTagLower) != null) {\n named.push(namedItem);\n setSilent(namedItem.el);\n }\n });\n return {\n root: root,\n boundingRect: boundingRect,\n named: named\n };\n };\n /**\n * Consider:\n * (1) One graphic element can not be shared by different `geoView` running simultaneously.\n * Notice, also need to consider multiple echarts instances share a `mapRecord`.\n * (2) Converting SVG to graphic elements is time consuming.\n * (3) In the current architecture, `load` should be called frequently to get boundingRect,\n * and it is called without view info.\n * So we maintain graphic elements in this module, and enables `view` to use/return these\n * graphics from/to the pool with it's uid.\n */\n GeoSVGResource.prototype.useGraphic = function (hostKey /* , nameMap: NameMap */) {\n var usedRootMap = this._usedGraphicMap;\n var svgGraphic = usedRootMap.get(hostKey);\n if (svgGraphic) {\n return svgGraphic;\n }\n svgGraphic = this._freedGraphics.pop()\n // use the first boundingRect to avoid duplicated boundingRect calculation.\n || this._buildGraphic(this._parsedXML);\n usedRootMap.set(hostKey, svgGraphic);\n // PENDING: `nameMap` will not be supported until some real requirement come.\n // `nameMap` can only be obtained from echarts option.\n // The original `named` must not be modified.\n // if (nameMap) {\n // svgGraphic = extend({}, svgGraphic);\n // svgGraphic.named = applyNameMap(svgGraphic.named, nameMap);\n // }\n return svgGraphic;\n };\n GeoSVGResource.prototype.freeGraphic = function (hostKey) {\n var usedRootMap = this._usedGraphicMap;\n var svgGraphic = usedRootMap.get(hostKey);\n if (svgGraphic) {\n usedRootMap.removeKey(hostKey);\n this._freedGraphics.push(svgGraphic);\n }\n };\n return GeoSVGResource;\n}();\nexport { GeoSVGResource };\nfunction setSilent(el) {\n // Only named element has silent: false, other elements should\n // act as background and has no user interaction.\n el.silent = false;\n // text|tspan will be converted to group.\n if (el.isGroup) {\n el.traverse(function (child) {\n child.silent = false;\n });\n }\n}\nfunction createRegions(named) {\n var regions = [];\n var regionsMap = createHashMap();\n // Create resions only for the first graphic.\n each(named, function (namedItem) {\n // Region has feature to calculate center for tooltip or other features.\n // If there is a , the center should be the center of the\n // bounding rect of the g.\n if (namedItem.namedFrom != null) {\n return;\n }\n var region = new GeoSVGRegion(namedItem.name, namedItem.el);\n // PENDING: if `nameMap` supported, this region can not be mounted on\n // `this`, but can only be created each time `load()` called.\n regions.push(region);\n // PENDING: if multiple tag named with the same name, only one will be\n // found by `_regionsMap`. `_regionsMap` is used to find a coordinate\n // by name. We use `region.getCenter()` as the coordinate.\n regionsMap.set(namedItem.name, region);\n });\n return {\n regions: regions,\n regionsMap: regionsMap\n };\n}\n// PENDING: `nameMap` will not be supported until some real requirement come.\n// /**\n// * Use the alias in geoNameMap.\n// * The input `named` must not be modified.\n// */\n// function applyNameMap(\n// named: GeoSVGGraphicRecord['named'],\n// nameMap: NameMap\n// ): GeoSVGGraphicRecord['named'] {\n// const result = [] as GeoSVGGraphicRecord['named'];\n// for (let i = 0; i < named.length; i++) {\n// let regionGraphic = named[i];\n// const name = regionGraphic.name;\n// if (nameMap && nameMap.hasOwnProperty(name)) {\n// regionGraphic = extend({}, regionGraphic);\n// regionGraphic.name = name;\n// }\n// result.push(regionGraphic);\n// }\n// return result;\n// }","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 南海诸岛\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { GeoJSONRegion } from '../Region.js';\nvar geoCoord = [126, 25];\nvar nanhaiName = '南海诸岛';\nvar points = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];\nfor (var i = 0; i < points.length; i++) {\n for (var k = 0; k < points[i].length; k++) {\n points[i][k][0] /= 10.5;\n points[i][k][1] /= -10.5 / 0.75;\n points[i][k][0] += geoCoord[0];\n points[i][k][1] += geoCoord[1];\n }\n}\nexport default function fixNanhai(mapType, regions) {\n if (mapType === 'china') {\n for (var i = 0; i < regions.length; i++) {\n // Already exists.\n if (regions[i].name === nanhaiName) {\n return;\n }\n }\n regions.push(new GeoJSONRegion(nanhaiName, zrUtil.map(points, function (exterior) {\n return {\n type: 'polygon',\n exterior: exterior\n };\n }), geoCoord));\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar coordsOffsetMap = {\n '南海诸岛': [32, 80],\n // 全国\n '广东': [0, -10],\n '香港': [10, 5],\n '澳门': [-10, 10],\n // '北京': [-10, 0],\n '天津': [5, 5]\n};\nexport default function fixTextCoords(mapType, region) {\n if (mapType === 'china') {\n var coordFix = coordsOffsetMap[region.name];\n if (coordFix) {\n var cp = region.getCenter();\n cp[0] += coordFix[0] / 10.5;\n cp[1] += -coordFix[1] / (10.5 / 0.75);\n region.setCenter(cp);\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 钓鱼岛\n// let Region = require('../Region');\n// let zrUtil = require('zrender/lib/core/util');\n// let geoCoord = [126, 25];\nvar points = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];\nexport default function fixDiaoyuIsland(mapType, region) {\n if (mapType === 'china' && region.name === '台湾') {\n region.geometries.push({\n type: 'polygon',\n exterior: points[0]\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isString, createHashMap, hasOwn } from 'zrender/lib/core/util.js';\nimport parseGeoJson from './parseGeoJson.js';\n// Built-in GEO fixer.\nimport fixNanhai from './fix/nanhai.js';\nimport fixTextCoord from './fix/textCoord.js';\nimport fixDiaoyuIsland from './fix/diaoyuIsland.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nvar DEFAULT_NAME_PROPERTY = 'name';\nvar GeoJSONResource = /** @class */function () {\n function GeoJSONResource(mapName, geoJSON, specialAreas) {\n this.type = 'geoJSON';\n this._parsedMap = createHashMap();\n this._mapName = mapName;\n this._specialAreas = specialAreas;\n // PENDING: delay the parse to the first usage to rapid up the FMP?\n this._geoJSON = parseInput(geoJSON);\n }\n /**\n * @param nameMap can be null/undefined\n * @param nameProperty can be null/undefined\n */\n GeoJSONResource.prototype.load = function (nameMap, nameProperty) {\n nameProperty = nameProperty || DEFAULT_NAME_PROPERTY;\n var parsed = this._parsedMap.get(nameProperty);\n if (!parsed) {\n var rawRegions = this._parseToRegions(nameProperty);\n parsed = this._parsedMap.set(nameProperty, {\n regions: rawRegions,\n boundingRect: calculateBoundingRect(rawRegions)\n });\n }\n var regionsMap = createHashMap();\n var finalRegions = [];\n each(parsed.regions, function (region) {\n var regionName = region.name;\n // Try use the alias in geoNameMap\n if (nameMap && hasOwn(nameMap, regionName)) {\n region = region.cloneShallow(regionName = nameMap[regionName]);\n }\n finalRegions.push(region);\n regionsMap.set(regionName, region);\n });\n return {\n regions: finalRegions,\n boundingRect: parsed.boundingRect || new BoundingRect(0, 0, 0, 0),\n regionsMap: regionsMap\n };\n };\n GeoJSONResource.prototype._parseToRegions = function (nameProperty) {\n var mapName = this._mapName;\n var geoJSON = this._geoJSON;\n var rawRegions;\n // https://jsperf.com/try-catch-performance-overhead\n try {\n rawRegions = geoJSON ? parseGeoJson(geoJSON, nameProperty) : [];\n } catch (e) {\n throw new Error('Invalid geoJson format\\n' + e.message);\n }\n fixNanhai(mapName, rawRegions);\n each(rawRegions, function (region) {\n var regionName = region.name;\n fixTextCoord(mapName, region);\n fixDiaoyuIsland(mapName, region);\n // Some area like Alaska in USA map needs to be tansformed\n // to look better\n var specialArea = this._specialAreas && this._specialAreas[regionName];\n if (specialArea) {\n region.transformTo(specialArea.left, specialArea.top, specialArea.width, specialArea.height);\n }\n }, this);\n return rawRegions;\n };\n /**\n * Only for exporting to users.\n * **MUST NOT** used internally.\n */\n GeoJSONResource.prototype.getMapForUser = function () {\n return {\n // For backward compatibility, use geoJson\n // PENDING: it has been returning them without clone.\n // do we need to avoid outsite modification?\n geoJson: this._geoJSON,\n geoJSON: this._geoJSON,\n specialAreas: this._specialAreas\n };\n };\n return GeoJSONResource;\n}();\nexport { GeoJSONResource };\nfunction calculateBoundingRect(regions) {\n var rect;\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect();\n rect = rect || regionRect.clone();\n rect.union(regionRect);\n }\n return rect;\n}\nfunction parseInput(source) {\n return !isString(source) ? source : typeof JSON !== 'undefined' && JSON.parse ? JSON.parse(source) : new Function('return (' + source + ');')();\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap } from 'zrender/lib/core/util.js';\nimport { GeoSVGResource } from './GeoSVGResource.js';\nimport { GeoJSONResource } from './GeoJSONResource.js';\nvar storage = createHashMap();\nexport default {\n /**\n * Compatible with previous `echarts.registerMap`.\n *\n * @usage\n * ```js\n *\n * echarts.registerMap('USA', geoJson, specialAreas);\n *\n * echarts.registerMap('USA', {\n * geoJson: geoJson,\n * specialAreas: {...}\n * });\n * echarts.registerMap('USA', {\n * geoJSON: geoJson,\n * specialAreas: {...}\n * });\n *\n * echarts.registerMap('airport', {\n * svg: svg\n * }\n * ```\n *\n * Note:\n * Do not support that register multiple geoJSON or SVG\n * one map name. Because different geoJSON and SVG have\n * different unit. It's not easy to make sure how those\n * units are mapping/normalize.\n * If intending to use multiple geoJSON or SVG, we can\n * use multiple geo coordinate system.\n */\n registerMap: function (mapName, rawDef, rawSpecialAreas) {\n if (rawDef.svg) {\n var resource = new GeoSVGResource(mapName, rawDef.svg);\n storage.set(mapName, resource);\n } else {\n // Recommend:\n // echarts.registerMap('eu', { geoJSON: xxx, specialAreas: xxx });\n // Backward compatibility:\n // echarts.registerMap('eu', geoJSON, specialAreas);\n // echarts.registerMap('eu', { geoJson: xxx, specialAreas: xxx });\n var geoJSON = rawDef.geoJson || rawDef.geoJSON;\n if (geoJSON && !rawDef.features) {\n rawSpecialAreas = rawDef.specialAreas;\n } else {\n geoJSON = rawDef;\n }\n var resource = new GeoJSONResource(mapName, geoJSON, rawSpecialAreas);\n storage.set(mapName, resource);\n }\n },\n getGeoResource: function (mapName) {\n return storage.get(mapName);\n },\n /**\n * Only for exporting to users.\n * **MUST NOT** used internally.\n */\n getMapForUser: function (mapName) {\n var resource = storage.get(mapName);\n // Do not support return SVG until some real requirement come.\n return resource && resource.type === 'geoJSON' && resource.getMapForUser();\n },\n load: function (mapName, nameMap, nameProperty) {\n var resource = storage.get(mapName);\n if (!resource) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.');\n }\n return;\n }\n return resource.load(nameMap, nameProperty);\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport RoamController from './RoamController.js';\nimport * as roamHelper from '../../component/helper/roamHelper.js';\nimport { onIrrelevantElement } from '../../component/helper/cursorHelper.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, enableComponentHighDownFeatures, setDefaultStateProxy } from '../../util/states.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nimport { getUID } from '../../util/component.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { makeInner } from '../../util/model.js';\n/**\n * Only these tags enable use `itemStyle` if they are named in SVG.\n * Other tags like might not suitable for `itemStyle`.\n * They will not be considered to be styled until some requirements come.\n */\nvar OPTION_STYLE_ENABLED_TAGS = ['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path'];\nvar OPTION_STYLE_ENABLED_TAG_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS);\nvar STATE_TRIGGER_TAG_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g']));\nvar LABEL_HOST_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g']));\nvar mapLabelRaw = makeInner();\nfunction getFixedItemStyle(model) {\n var itemStyle = model.getItemStyle();\n var areaColor = model.get('areaColor');\n // If user want the color not to be changed when hover,\n // they should both set areaColor and color to be null.\n if (areaColor != null) {\n itemStyle.fill = areaColor;\n }\n return itemStyle;\n}\n// Only stroke can be used for line.\n// Using fill in style if stroke not exits.\n// TODO Not sure yet. Perhaps a separate `lineStyle`?\nfunction fixLineStyle(styleHost) {\n var style = styleHost.style;\n if (style) {\n style.stroke = style.stroke || style.fill;\n style.fill = null;\n }\n}\nvar MapDraw = /** @class */function () {\n function MapDraw(api) {\n var group = new graphic.Group();\n this.uid = getUID('ec_map_draw');\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: group\n };\n this.group = group;\n group.add(this._regionsGroup = new graphic.Group());\n group.add(this._svgGroup = new graphic.Group());\n }\n MapDraw.prototype.draw = function (mapOrGeoModel, ecModel, api, fromView, payload) {\n var isGeo = mapOrGeoModel.mainType === 'geo';\n // Map series has data. GEO model that controlled by map series\n // will be assigned with map data. Other GEO model has no data.\n var data = mapOrGeoModel.getData && mapOrGeoModel.getData();\n isGeo && ecModel.eachComponent({\n mainType: 'series',\n subType: 'map'\n }, function (mapSeries) {\n if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) {\n data = mapSeries.getData();\n }\n });\n var geo = mapOrGeoModel.coordinateSystem;\n var regionsGroup = this._regionsGroup;\n var group = this.group;\n var transformInfo = geo.getTransformInfo();\n var transformInfoRaw = transformInfo.raw;\n var transformInfoRoam = transformInfo.roam;\n // No animation when first draw or in action\n var isFirstDraw = !regionsGroup.childAt(0) || payload;\n if (isFirstDraw) {\n group.x = transformInfoRoam.x;\n group.y = transformInfoRoam.y;\n group.scaleX = transformInfoRoam.scaleX;\n group.scaleY = transformInfoRoam.scaleY;\n group.dirty();\n } else {\n graphic.updateProps(group, transformInfoRoam, mapOrGeoModel);\n }\n var isVisualEncodedByVisualMap = data && data.getVisual('visualMeta') && data.getVisual('visualMeta').length > 0;\n var viewBuildCtx = {\n api: api,\n geo: geo,\n mapOrGeoModel: mapOrGeoModel,\n data: data,\n isVisualEncodedByVisualMap: isVisualEncodedByVisualMap,\n isGeo: isGeo,\n transformInfoRaw: transformInfoRaw\n };\n if (geo.resourceType === 'geoJSON') {\n this._buildGeoJSON(viewBuildCtx);\n } else if (geo.resourceType === 'geoSVG') {\n this._buildSVG(viewBuildCtx);\n }\n this._updateController(mapOrGeoModel, ecModel, api);\n this._updateMapSelectHandler(mapOrGeoModel, regionsGroup, api, fromView);\n };\n MapDraw.prototype._buildGeoJSON = function (viewBuildCtx) {\n var regionsGroupByName = this._regionsGroupByName = zrUtil.createHashMap();\n var regionsInfoByName = zrUtil.createHashMap();\n var regionsGroup = this._regionsGroup;\n var transformInfoRaw = viewBuildCtx.transformInfoRaw;\n var mapOrGeoModel = viewBuildCtx.mapOrGeoModel;\n var data = viewBuildCtx.data;\n var projection = viewBuildCtx.geo.projection;\n var projectionStream = projection && projection.stream;\n function transformPoint(point, project) {\n if (project) {\n // projection may return null point.\n point = project(point);\n }\n return point && [point[0] * transformInfoRaw.scaleX + transformInfoRaw.x, point[1] * transformInfoRaw.scaleY + transformInfoRaw.y];\n }\n ;\n function transformPolygonPoints(inPoints) {\n var outPoints = [];\n // If projectionStream is provided. Use it instead of single point project.\n var project = !projectionStream && projection && projection.project;\n for (var i = 0; i < inPoints.length; ++i) {\n var newPt = transformPoint(inPoints[i], project);\n newPt && outPoints.push(newPt);\n }\n return outPoints;\n }\n function getPolyShape(points) {\n return {\n shape: {\n points: transformPolygonPoints(points)\n }\n };\n }\n regionsGroup.removeAll();\n // Only when the resource is GeoJSON, there is `geo.regions`.\n zrUtil.each(viewBuildCtx.geo.regions, function (region) {\n var regionName = region.name;\n // Consider in GeoJson properties.name may be duplicated, for example,\n // there is multiple region named \"United Kindom\" or \"France\" (so many\n // colonies). And it is not appropriate to merge them in geo, which\n // will make them share the same label and bring trouble in label\n // location calculation.\n var regionGroup = regionsGroupByName.get(regionName);\n var _a = regionsInfoByName.get(regionName) || {},\n dataIdx = _a.dataIdx,\n regionModel = _a.regionModel;\n if (!regionGroup) {\n regionGroup = regionsGroupByName.set(regionName, new graphic.Group());\n regionsGroup.add(regionGroup);\n dataIdx = data ? data.indexOfName(regionName) : null;\n regionModel = viewBuildCtx.isGeo ? mapOrGeoModel.getRegionModel(regionName) : data ? data.getItemModel(dataIdx) : null;\n regionsInfoByName.set(regionName, {\n dataIdx: dataIdx,\n regionModel: regionModel\n });\n }\n var polygonSubpaths = [];\n var polylineSubpaths = [];\n zrUtil.each(region.geometries, function (geometry) {\n // Polygon and MultiPolygon\n if (geometry.type === 'polygon') {\n var polys = [geometry.exterior].concat(geometry.interiors || []);\n if (projectionStream) {\n polys = projectPolys(polys, projectionStream);\n }\n zrUtil.each(polys, function (poly) {\n polygonSubpaths.push(new graphic.Polygon(getPolyShape(poly)));\n });\n }\n // LineString and MultiLineString\n else {\n var points = geometry.points;\n if (projectionStream) {\n points = projectPolys(points, projectionStream, true);\n }\n zrUtil.each(points, function (points) {\n polylineSubpaths.push(new graphic.Polyline(getPolyShape(points)));\n });\n }\n });\n var centerPt = transformPoint(region.getCenter(), projection && projection.project);\n function createCompoundPath(subpaths, isLine) {\n if (!subpaths.length) {\n return;\n }\n var compoundPath = new graphic.CompoundPath({\n culling: true,\n segmentIgnoreThreshold: 1,\n shape: {\n paths: subpaths\n }\n });\n regionGroup.add(compoundPath);\n applyOptionStyleForRegion(viewBuildCtx, compoundPath, dataIdx, regionModel);\n resetLabelForRegion(viewBuildCtx, compoundPath, regionName, regionModel, mapOrGeoModel, dataIdx, centerPt);\n if (isLine) {\n fixLineStyle(compoundPath);\n zrUtil.each(compoundPath.states, fixLineStyle);\n }\n }\n createCompoundPath(polygonSubpaths);\n createCompoundPath(polylineSubpaths, true);\n });\n // Ensure children have been added to `regionGroup` before calling them.\n regionsGroupByName.each(function (regionGroup, regionName) {\n var _a = regionsInfoByName.get(regionName),\n dataIdx = _a.dataIdx,\n regionModel = _a.regionModel;\n resetEventTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel, dataIdx);\n resetTooltipForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);\n resetStateTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);\n }, this);\n };\n MapDraw.prototype._buildSVG = function (viewBuildCtx) {\n var mapName = viewBuildCtx.geo.map;\n var transformInfoRaw = viewBuildCtx.transformInfoRaw;\n this._svgGroup.x = transformInfoRaw.x;\n this._svgGroup.y = transformInfoRaw.y;\n this._svgGroup.scaleX = transformInfoRaw.scaleX;\n this._svgGroup.scaleY = transformInfoRaw.scaleY;\n if (this._svgResourceChanged(mapName)) {\n this._freeSVG();\n this._useSVG(mapName);\n }\n var svgDispatcherMap = this._svgDispatcherMap = zrUtil.createHashMap();\n var focusSelf = false;\n zrUtil.each(this._svgGraphicRecord.named, function (namedItem) {\n // Note that we also allow different elements have the same name.\n // For example, a glyph of a city and the label of the city have\n // the same name and their tooltip info can be defined in a single\n // region option.\n var regionName = namedItem.name;\n var mapOrGeoModel = viewBuildCtx.mapOrGeoModel;\n var data = viewBuildCtx.data;\n var svgNodeTagLower = namedItem.svgNodeTagLower;\n var el = namedItem.el;\n var dataIdx = data ? data.indexOfName(regionName) : null;\n var regionModel = mapOrGeoModel.getRegionModel(regionName);\n if (OPTION_STYLE_ENABLED_TAG_MAP.get(svgNodeTagLower) != null && el instanceof Displayable) {\n applyOptionStyleForRegion(viewBuildCtx, el, dataIdx, regionModel);\n }\n if (el instanceof Displayable) {\n el.culling = true;\n }\n // We do not know how the SVG like so we'd better not to change z2.\n // Otherwise it might bring some unexpected result. For example,\n // an area hovered that make some inner city can not be clicked.\n el.z2EmphasisLift = 0;\n // If self named:\n if (!namedItem.namedFrom) {\n // label should batter to be displayed based on the center of \n // if it is named rather than displayed on each child.\n if (LABEL_HOST_MAP.get(svgNodeTagLower) != null) {\n resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx, null);\n }\n resetEventTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx);\n resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel);\n if (STATE_TRIGGER_TAG_MAP.get(svgNodeTagLower) != null) {\n var focus_1 = resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel);\n if (focus_1 === 'self') {\n focusSelf = true;\n }\n var els = svgDispatcherMap.get(regionName) || svgDispatcherMap.set(regionName, []);\n els.push(el);\n }\n }\n }, this);\n this._enableBlurEntireSVG(focusSelf, viewBuildCtx);\n };\n MapDraw.prototype._enableBlurEntireSVG = function (focusSelf, viewBuildCtx) {\n // It's a little complicated to support blurring the entire geoSVG in series-map.\n // So do not support it until some requirements come.\n // At present, in series-map, only regions can be blurred.\n if (focusSelf && viewBuildCtx.isGeo) {\n var blurStyle = viewBuildCtx.mapOrGeoModel.getModel(['blur', 'itemStyle']).getItemStyle();\n // Only support `opacity` here. Because not sure that other props are suitable for\n // all of the elements generated by SVG (especially for Text/TSpan/Image/... ).\n var opacity_1 = blurStyle.opacity;\n this._svgGraphicRecord.root.traverse(function (el) {\n if (!el.isGroup) {\n // PENDING: clear those settings to SVG elements when `_freeSVG`.\n // (Currently it happen not to be needed.)\n setDefaultStateProxy(el);\n var style = el.ensureState('blur').style || {};\n // Do not overwrite the region style that already set from region option.\n if (style.opacity == null && opacity_1 != null) {\n style.opacity = opacity_1;\n }\n // If `ensureState('blur').style = {}`, there will be default opacity.\n // Enable `stateTransition` (animation).\n el.ensureState('emphasis');\n }\n });\n }\n };\n MapDraw.prototype.remove = function () {\n this._regionsGroup.removeAll();\n this._regionsGroupByName = null;\n this._svgGroup.removeAll();\n this._freeSVG();\n this._controller.dispose();\n this._controllerHost = null;\n };\n MapDraw.prototype.findHighDownDispatchers = function (name, geoModel) {\n if (name == null) {\n return [];\n }\n var geo = geoModel.coordinateSystem;\n if (geo.resourceType === 'geoJSON') {\n var regionsGroupByName = this._regionsGroupByName;\n if (regionsGroupByName) {\n var regionGroup = regionsGroupByName.get(name);\n return regionGroup ? [regionGroup] : [];\n }\n } else if (geo.resourceType === 'geoSVG') {\n return this._svgDispatcherMap && this._svgDispatcherMap.get(name) || [];\n }\n };\n MapDraw.prototype._svgResourceChanged = function (mapName) {\n return this._svgMapName !== mapName;\n };\n MapDraw.prototype._useSVG = function (mapName) {\n var resource = geoSourceManager.getGeoResource(mapName);\n if (resource && resource.type === 'geoSVG') {\n var svgGraphic = resource.useGraphic(this.uid);\n this._svgGroup.add(svgGraphic.root);\n this._svgGraphicRecord = svgGraphic;\n this._svgMapName = mapName;\n }\n };\n MapDraw.prototype._freeSVG = function () {\n var mapName = this._svgMapName;\n if (mapName == null) {\n return;\n }\n var resource = geoSourceManager.getGeoResource(mapName);\n if (resource && resource.type === 'geoSVG') {\n resource.freeGraphic(this.uid);\n }\n this._svgGraphicRecord = null;\n this._svgDispatcherMap = null;\n this._svgGroup.removeAll();\n this._svgMapName = null;\n };\n MapDraw.prototype._updateController = function (mapOrGeoModel, ecModel, api) {\n var geo = mapOrGeoModel.coordinateSystem;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n // @ts-ignore FIXME:TS\n controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit');\n controllerHost.zoom = geo.getZoom();\n // roamType is will be set default true if it is null\n // @ts-ignore FIXME:TS\n controller.enable(mapOrGeoModel.get('roam') || false);\n var mainType = mapOrGeoModel.mainType;\n function makeActionBase() {\n var action = {\n type: 'geoRoam',\n componentType: mainType\n };\n action[mainType + 'Id'] = mapOrGeoModel.id;\n return action;\n }\n controller.off('pan').on('pan', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n dx: e.dx,\n dy: e.dy,\n animation: {\n duration: 0\n }\n }));\n }, this);\n controller.off('zoom').on('zoom', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n totalZoom: controllerHost.zoom,\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY,\n animation: {\n duration: 0\n }\n }));\n }, this);\n controller.setPointerChecker(function (e, x, y) {\n return geo.containPoint([x, y]) && !onIrrelevantElement(e, api, mapOrGeoModel);\n });\n };\n /**\n * FIXME: this is a temporarily workaround.\n * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like\n * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries`\n * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified\n * props will have no chance to be restored.\n * Note: This reset should be after `clearStates` in `renderSeries` because `useStates` in\n * `renderSeries` will cache the modified `ignore` to `el._normalState`.\n * TODO:\n * Use clone/immutable in `LabelManager`?\n */\n MapDraw.prototype.resetForLabelLayout = function () {\n this.group.traverse(function (el) {\n var label = el.getTextContent();\n if (label) {\n label.ignore = mapLabelRaw(label).ignore;\n }\n });\n };\n MapDraw.prototype._updateMapSelectHandler = function (mapOrGeoModel, regionsGroup, api, fromView) {\n var mapDraw = this;\n regionsGroup.off('mousedown');\n regionsGroup.off('click');\n // @ts-ignore FIXME:TS resolve type conflict\n if (mapOrGeoModel.get('selectedMode')) {\n regionsGroup.on('mousedown', function () {\n mapDraw._mouseDownFlag = true;\n });\n regionsGroup.on('click', function (e) {\n if (!mapDraw._mouseDownFlag) {\n return;\n }\n mapDraw._mouseDownFlag = false;\n });\n }\n };\n return MapDraw;\n}();\n;\nfunction applyOptionStyleForRegion(viewBuildCtx, el, dataIndex, regionModel) {\n // All of the path are using `itemStyle`, because\n // (1) Some SVG also use fill on polyline (The different between\n // polyline and polygon is \"open\" or \"close\" but not fill or not).\n // (2) For the common props like opacity, if some use itemStyle\n // and some use `lineStyle`, it might confuse users.\n // (3) Most SVG use , where can not detect whether to draw a \"line\"\n // or a filled shape, so use `itemStyle` for .\n var normalStyleModel = regionModel.getModel('itemStyle');\n var emphasisStyleModel = regionModel.getModel(['emphasis', 'itemStyle']);\n var blurStyleModel = regionModel.getModel(['blur', 'itemStyle']);\n var selectStyleModel = regionModel.getModel(['select', 'itemStyle']);\n // NOTE: DON'T use 'style' in visual when drawing map.\n // This component is used for drawing underlying map for both geo component and map series.\n var normalStyle = getFixedItemStyle(normalStyleModel);\n var emphasisStyle = getFixedItemStyle(emphasisStyleModel);\n var selectStyle = getFixedItemStyle(selectStyleModel);\n var blurStyle = getFixedItemStyle(blurStyleModel);\n // Update the itemStyle if has data visual\n var data = viewBuildCtx.data;\n if (data) {\n // Only visual color of each item will be used. It can be encoded by visualMap\n // But visual color of series is used in symbol drawing\n // Visual color for each series is for the symbol draw\n var style = data.getItemVisual(dataIndex, 'style');\n var decal = data.getItemVisual(dataIndex, 'decal');\n if (viewBuildCtx.isVisualEncodedByVisualMap && style.fill) {\n normalStyle.fill = style.fill;\n }\n if (decal) {\n normalStyle.decal = createOrUpdatePatternFromDecal(decal, viewBuildCtx.api);\n }\n }\n // SVG text, tspan and image can be named but not supporeted\n // to be styled by region option yet.\n el.setStyle(normalStyle);\n el.style.strokeNoScale = true;\n el.ensureState('emphasis').style = emphasisStyle;\n el.ensureState('select').style = selectStyle;\n el.ensureState('blur').style = blurStyle;\n // Enable blur\n setDefaultStateProxy(el);\n}\nfunction resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel,\n// Exist only if `viewBuildCtx.data` exists.\ndataIdx,\n// If labelXY not provided, use `textConfig.position: 'inside'`\nlabelXY) {\n var data = viewBuildCtx.data;\n var isGeo = viewBuildCtx.isGeo;\n var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx));\n var itemLayout = data && data.getItemLayout(dataIdx);\n // In the following cases label will be drawn\n // 1. In map series and data value is NaN\n // 2. In geo component\n // 3. Region has no series legendIcon, which will be add a showLabel flag in mapSymbolLayout\n if (isGeo || isDataNaN || itemLayout && itemLayout.showLabel) {\n var query = !isGeo ? dataIdx : regionName;\n var labelFetcher = void 0;\n // Consider dataIdx not found.\n if (!data || dataIdx >= 0) {\n labelFetcher = mapOrGeoModel;\n }\n var specifiedTextOpt = labelXY ? {\n normal: {\n align: 'center',\n verticalAlign: 'middle'\n }\n } : null;\n // Caveat: must be called after `setDefaultStateProxy(el);` called.\n // because textContent will be assign with `el.stateProxy` inside.\n setLabelStyle(el, getLabelStatesModels(regionModel), {\n labelFetcher: labelFetcher,\n labelDataIndex: query,\n defaultText: regionName\n }, specifiedTextOpt);\n var textEl = el.getTextContent();\n if (textEl) {\n mapLabelRaw(textEl).ignore = textEl.ignore;\n if (el.textConfig && labelXY) {\n // Compute a relative offset based on the el bounding rect.\n var rect = el.getBoundingRect().clone();\n // Need to make sure the percent position base on the same rect in normal and\n // emphasis state. Otherwise if using boundingRect of el, but the emphasis state\n // has borderWidth (even 0.5px), the text position will be changed obviously\n // if the position is very big like ['1234%', '1345%'].\n el.textConfig.layoutRect = rect;\n el.textConfig.position = [(labelXY[0] - rect.x) / rect.width * 100 + '%', (labelXY[1] - rect.y) / rect.height * 100 + '%'];\n }\n }\n // PENDING:\n // If labelLayout is enabled (test/label-layout.html), el.dataIndex should be specified.\n // But el.dataIndex is also used to determine whether user event should be triggered,\n // where el.seriesIndex or el.dataModel must be specified. At present for a single el\n // there is not case that \"only label layout enabled but user event disabled\", so here\n // we depends `resetEventTriggerForRegion` to do the job of setting `el.dataIndex`.\n el.disableLabelAnimation = true;\n } else {\n el.removeTextContent();\n el.removeTextConfig();\n el.disableLabelAnimation = null;\n }\n}\nfunction resetEventTriggerForRegion(viewBuildCtx, eventTrigger, regionName, regionModel, mapOrGeoModel,\n// Exist only if `viewBuildCtx.data` exists.\ndataIdx) {\n // setItemGraphicEl, setHoverStyle after all polygons and labels\n // are added to the regionGroup\n if (viewBuildCtx.data) {\n // FIXME: when series-map use a SVG map, and there are duplicated name specified\n // on different SVG elements, after `data.setItemGraphicEl(...)`:\n // (1) all of them will be mounted with `dataIndex`, `seriesIndex`, so that tooltip\n // can be triggered only mouse hover. That's correct.\n // (2) only the last element will be kept in `data`, so that if trigger tooltip\n // by `dispatchAction`, only the last one can be found and triggered. That might be\n // not correct. We will fix it in future if anyone demanding that.\n viewBuildCtx.data.setItemGraphicEl(dataIdx, eventTrigger);\n }\n // series-map will not trigger \"geoselectchange\" no matter it is\n // based on a declared geo component. Because series-map will\n // trigger \"selectchange\". If it trigger both the two events,\n // If users call `chart.dispatchAction({type: 'toggleSelect'})`,\n // it not easy to also fire event \"geoselectchanged\".\n else {\n // Package custom mouse event for geo component\n getECData(eventTrigger).eventData = {\n componentType: 'geo',\n componentIndex: mapOrGeoModel.componentIndex,\n geoIndex: mapOrGeoModel.componentIndex,\n name: regionName,\n region: regionModel && regionModel.option || {}\n };\n }\n}\nfunction resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) {\n if (!viewBuildCtx.data) {\n graphic.setTooltipConfig({\n el: el,\n componentModel: mapOrGeoModel,\n itemName: regionName,\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n itemTooltipOption: regionModel.get('tooltip')\n });\n }\n}\nfunction resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) {\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n el.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode');\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n var emphasisModel = regionModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n toggleHoverEmphasis(el, focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n if (viewBuildCtx.isGeo) {\n enableComponentHighDownFeatures(el, mapOrGeoModel, regionName);\n }\n return focus;\n}\nfunction projectPolys(rings,\n// Polygons include exterior and interiors. Or polylines.\ncreateStream, isLine) {\n var polygons = [];\n var curPoly;\n function startPolygon() {\n curPoly = [];\n }\n function endPolygon() {\n if (curPoly.length) {\n polygons.push(curPoly);\n curPoly = [];\n }\n }\n var stream = createStream({\n polygonStart: startPolygon,\n polygonEnd: endPolygon,\n lineStart: startPolygon,\n lineEnd: endPolygon,\n point: function (x, y) {\n // May have NaN values from stream.\n if (isFinite(x) && isFinite(y)) {\n curPoly.push([x, y]);\n }\n },\n sphere: function () {}\n });\n !isLine && stream.polygonStart();\n zrUtil.each(rings, function (ring) {\n stream.lineStart();\n for (var i = 0; i < ring.length; i++) {\n stream.point(ring[i][0], ring[i][1]);\n }\n stream.lineEnd();\n });\n !isLine && stream.polygonEnd();\n return polygons;\n}\nexport default MapDraw;\n// @ts-ignore FIXME:TS fix the \"compatible with each other\"?","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport MapDraw from '../../component/helper/MapDraw.js';\nimport ChartView from '../../view/Chart.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { setStatesFlag, Z2_EMPHASIS_LIFT } from '../../util/states.js';\nvar MapView = /** @class */function (_super) {\n __extends(MapView, _super);\n function MapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MapView.type;\n return _this;\n }\n MapView.prototype.render = function (mapModel, ecModel, api, payload) {\n // Not render if it is an toggleSelect action from self\n if (payload && payload.type === 'mapToggleSelect' && payload.from === this.uid) {\n return;\n }\n var group = this.group;\n group.removeAll();\n if (mapModel.getHostGeoModel()) {\n return;\n }\n if (this._mapDraw && payload && payload.type === 'geoRoam') {\n this._mapDraw.resetForLabelLayout();\n }\n // Not update map if it is an roam action from self\n if (!(payload && payload.type === 'geoRoam' && payload.componentType === 'series' && payload.seriesId === mapModel.id)) {\n if (mapModel.needsDrawMap) {\n var mapDraw = this._mapDraw || new MapDraw(api);\n group.add(mapDraw.group);\n mapDraw.draw(mapModel, ecModel, api, this, payload);\n this._mapDraw = mapDraw;\n } else {\n // Remove drawn map\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n }\n } else {\n var mapDraw = this._mapDraw;\n mapDraw && group.add(mapDraw.group);\n }\n mapModel.get('showLegendSymbol') && ecModel.getComponent('legend') && this._renderSymbols(mapModel, ecModel, api);\n };\n MapView.prototype.remove = function () {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n this.group.removeAll();\n };\n MapView.prototype.dispose = function () {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n };\n MapView.prototype._renderSymbols = function (mapModel, ecModel, api) {\n var originalData = mapModel.originalData;\n var group = this.group;\n originalData.each(originalData.mapDimension('value'), function (value, originalDataIndex) {\n if (isNaN(value)) {\n return;\n }\n var layout = originalData.getItemLayout(originalDataIndex);\n if (!layout || !layout.point) {\n // Not exists in map\n return;\n }\n var point = layout.point;\n var offset = layout.offset;\n var circle = new graphic.Circle({\n style: {\n // Because the special of map draw.\n // Which needs statistic of multiple series and draw on one map.\n // And each series also need a symbol with legend color\n //\n // Layout and visual are put one the different data\n // TODO\n fill: mapModel.getData().getVisual('style').fill\n },\n shape: {\n cx: point[0] + offset * 9,\n cy: point[1],\n r: 3\n },\n silent: true,\n // Do not overlap the first series, on which labels are displayed.\n z2: 8 + (!offset ? Z2_EMPHASIS_LIFT + 1 : 0)\n });\n // Only the series that has the first value on the same region is in charge of rendering the label.\n // But consider the case:\n // series: [\n // {id: 'X', type: 'map', map: 'm', {data: [{name: 'A', value: 11}, {name: 'B', {value: 22}]},\n // {id: 'Y', type: 'map', map: 'm', {data: [{name: 'A', value: 21}, {name: 'C', {value: 33}]}\n // ]\n // The offset `0` of item `A` is at series `X`, but of item `C` is at series `Y`.\n // For backward compatibility, we follow the rule that render label `A` by the\n // settings on series `X` but render label `C` by the settings on series `Y`.\n if (!offset) {\n var fullData = mapModel.mainSeries.getData();\n var name_1 = originalData.getName(originalDataIndex);\n var fullIndex_1 = fullData.indexOfName(name_1);\n var itemModel = originalData.getItemModel(originalDataIndex);\n var labelModel = itemModel.getModel('label');\n var regionGroup = fullData.getItemGraphicEl(fullIndex_1);\n // `getFormattedLabel` needs to use `getData` inside. Here\n // `mapModel.getData()` is shallow cloned from `mainSeries.getData()`.\n // FIXME\n // If this is not the `mainSeries`, the item model (like label formatter)\n // set on original data item will never get. But it has been working\n // like that from the beginning, and this scenario is rarely encountered.\n // So it won't be fixed until we have to.\n setLabelStyle(circle, getLabelStatesModels(itemModel), {\n labelFetcher: {\n getFormattedLabel: function (idx, state) {\n return mapModel.getFormattedLabel(fullIndex_1, state);\n }\n },\n defaultText: name_1\n });\n circle.disableLabelAnimation = true;\n if (!labelModel.get('position')) {\n circle.setTextConfig({\n position: 'bottom'\n });\n }\n regionGroup.onHoverStateChange = function (toState) {\n setStatesFlag(circle, toState);\n };\n }\n group.add(circle);\n });\n };\n MapView.type = 'map';\n return MapView;\n}(ChartView);\nexport default MapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport SeriesModel from '../../model/Series.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport { createSymbol } from '../../util/symbol.js';\nvar MapSeries = /** @class */function (_super) {\n __extends(MapSeries, _super);\n function MapSeries() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MapSeries.type;\n // Only first map series of same mapType will drawMap.\n _this.needsDrawMap = false;\n // Group of all map series with same mapType\n _this.seriesGroup = [];\n _this.getTooltipPosition = function (dataIndex) {\n if (dataIndex != null) {\n var name_1 = this.getData().getName(dataIndex);\n var geo = this.coordinateSystem;\n var region = geo.getRegion(name_1);\n return region && geo.dataToPoint(region.getCenter());\n }\n };\n return _this;\n }\n MapSeries.prototype.getInitialData = function (option) {\n var data = createSeriesDataSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n var dataNameMap = zrUtil.createHashMap();\n var toAppendNames = [];\n for (var i = 0, len = data.count(); i < len; i++) {\n var name_2 = data.getName(i);\n dataNameMap.set(name_2, true);\n }\n var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);\n zrUtil.each(geoSource.regions, function (region) {\n var name = region.name;\n if (!dataNameMap.get(name)) {\n toAppendNames.push(name);\n }\n });\n // Complete data with missing regions. The consequent processes (like visual\n // map and render) can not be performed without a \"full data\". For example,\n // find `dataIndex` by name.\n data.appendValues([], toAppendNames);\n return data;\n };\n /**\n * If no host geo model, return null, which means using a\n * inner exclusive geo model.\n */\n MapSeries.prototype.getHostGeoModel = function () {\n var geoIndex = this.option.geoIndex;\n return geoIndex != null ? this.ecModel.getComponent('geo', geoIndex) : null;\n };\n MapSeries.prototype.getMapType = function () {\n return (this.getHostGeoModel() || this).option.map;\n };\n // _fillOption(option, mapName) {\n // Shallow clone\n // option = zrUtil.extend({}, option);\n // option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap);\n // return option;\n // }\n MapSeries.prototype.getRawValue = function (dataIndex) {\n // Use value stored in data instead because it is calculated from multiple series\n // FIXME Provide all value of multiple series ?\n var data = this.getData();\n return data.get(data.mapDimension('value'), dataIndex);\n };\n /**\n * Get model of region\n */\n MapSeries.prototype.getRegionModel = function (regionName) {\n var data = this.getData();\n return data.getItemModel(data.indexOfName(regionName));\n };\n /**\n * Map tooltip formatter\n */\n MapSeries.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n // FIXME orignalData and data is a bit confusing\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var name = data.getName(dataIndex);\n var seriesGroup = this.seriesGroup;\n var seriesNames = [];\n for (var i = 0; i < seriesGroup.length; i++) {\n var otherIndex = seriesGroup[i].originalData.indexOfName(name);\n var valueDim = data.mapDimension('value');\n if (!isNaN(seriesGroup[i].originalData.get(valueDim, otherIndex))) {\n seriesNames.push(seriesGroup[i].name);\n }\n }\n return createTooltipMarkup('section', {\n header: seriesNames.join(', '),\n noHeader: !seriesNames.length,\n blocks: [createTooltipMarkup('nameValue', {\n name: name,\n value: value\n })]\n });\n };\n MapSeries.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n MapSeries.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n MapSeries.prototype.getLegendIcon = function (opt) {\n var iconType = opt.icon || 'roundRect';\n var icon = createSymbol(iconType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill);\n icon.setStyle(opt.itemStyle);\n // Map do not use itemStyle.borderWidth as border width\n icon.style.stroke = 'none';\n // No rotation because no series visual symbol for map\n if (iconType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = '#fff';\n icon.style.lineWidth = 2;\n }\n return icon;\n };\n MapSeries.type = 'series.map';\n MapSeries.dependencies = ['geo'];\n MapSeries.layoutMode = 'box';\n MapSeries.defaultOption = {\n // 一级层叠\n // zlevel: 0,\n // 二级层叠\n z: 2,\n coordinateSystem: 'geo',\n // map should be explicitly specified since ec3.\n map: '',\n // If `geoIndex` is not specified, a exclusive geo will be\n // created. Otherwise use the specified geo component, and\n // `map` and `mapType` are ignored.\n // geoIndex: 0,\n // 'center' | 'left' | 'right' | 'x%' | {number}\n left: 'center',\n // 'center' | 'top' | 'bottom' | 'x%' | {number}\n top: 'center',\n // right\n // bottom\n // width:\n // height\n // Aspect is width / height. Inited to be geoJson bbox aspect\n // This parameter is used for scale this aspect\n // Default value:\n // for geoSVG source: 1,\n // for geoJSON source: 0.75.\n aspectScale: null,\n // Layout with center and size\n // If you want to put map in a fixed size box with right aspect ratio\n // This two properties may be more convenient.\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n showLegendSymbol: true,\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ],\n // higher priority than center and zoom\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n selectedMode: true,\n label: {\n show: false,\n color: '#000'\n },\n // scaleLimit: null,\n itemStyle: {\n borderWidth: 0.5,\n borderColor: '#444',\n areaColor: '#eee'\n },\n emphasis: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n areaColor: 'rgba(255,215,0,0.8)'\n }\n },\n select: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n color: 'rgba(255,215,0,0.8)'\n }\n },\n nameProperty: 'name'\n };\n return MapSeries;\n}(SeriesModel);\nexport default MapSeries;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\n// FIXME 公用?\nfunction dataStatistics(datas, statisticType) {\n var dataNameMap = {};\n zrUtil.each(datas, function (data) {\n data.each(data.mapDimension('value'), function (value, idx) {\n // Add prefix to avoid conflict with Object.prototype.\n var mapKey = 'ec-' + data.getName(idx);\n dataNameMap[mapKey] = dataNameMap[mapKey] || [];\n if (!isNaN(value)) {\n dataNameMap[mapKey].push(value);\n }\n });\n });\n return datas[0].map(datas[0].mapDimension('value'), function (value, idx) {\n var mapKey = 'ec-' + datas[0].getName(idx);\n var sum = 0;\n var min = Infinity;\n var max = -Infinity;\n var len = dataNameMap[mapKey].length;\n for (var i = 0; i < len; i++) {\n min = Math.min(min, dataNameMap[mapKey][i]);\n max = Math.max(max, dataNameMap[mapKey][i]);\n sum += dataNameMap[mapKey][i];\n }\n var result;\n if (statisticType === 'min') {\n result = min;\n } else if (statisticType === 'max') {\n result = max;\n } else if (statisticType === 'average') {\n result = sum / len;\n } else {\n result = sum;\n }\n return len === 0 ? NaN : result;\n });\n}\nexport default function mapDataStatistic(ecModel) {\n var seriesGroups = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n var hostGeoModel = seriesModel.getHostGeoModel();\n var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType();\n (seriesGroups[key] = seriesGroups[key] || []).push(seriesModel);\n });\n zrUtil.each(seriesGroups, function (seriesList, key) {\n var data = dataStatistics(zrUtil.map(seriesList, function (seriesModel) {\n return seriesModel.getData();\n }), seriesList[0].get('mapValueCalculation'));\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].originalData = seriesList[i].getData();\n }\n // FIXME Put where?\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].seriesGroup = seriesList;\n seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel();\n seriesList[i].setData(data.cloneShallow());\n seriesList[i].mainSeries = seriesList[0];\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function mapSymbolLayout(ecModel) {\n var processedMapType = {};\n ecModel.eachSeriesByType('map', function (mapSeries) {\n var mapType = mapSeries.getMapType();\n if (mapSeries.getHostGeoModel() || processedMapType[mapType]) {\n return;\n }\n var mapSymbolOffsets = {};\n zrUtil.each(mapSeries.seriesGroup, function (subMapSeries) {\n var geo = subMapSeries.coordinateSystem;\n var data = subMapSeries.originalData;\n if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) {\n data.each(data.mapDimension('value'), function (value, idx) {\n var name = data.getName(idx);\n var region = geo.getRegion(name);\n // If input series.data is [11, 22, '-'/null/undefined, 44],\n // it will be filled with NaN: [11, 22, NaN, 44] and NaN will\n // not be drawn. So here must validate if value is NaN.\n if (!region || isNaN(value)) {\n return;\n }\n var offset = mapSymbolOffsets[name] || 0;\n var point = geo.dataToPoint(region.getCenter());\n mapSymbolOffsets[name] = offset + 1;\n data.setItemLayout(idx, {\n point: point,\n offset: offset\n });\n });\n }\n });\n // Show label of those region not has legendIcon (which is offset 0)\n var data = mapSeries.getData();\n data.each(function (idx) {\n var name = data.getName(idx);\n var layout = data.getItemLayout(idx) || {};\n layout.showLabel = !mapSymbolOffsets[name];\n data.setItemLayout(idx, layout);\n });\n processedMapType[mapType] = true;\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Simple view coordinate system\n * Mapping given x, y to transformd view x, y\n */\nimport * as vector from 'zrender/lib/core/vector.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Transformable from 'zrender/lib/core/Transformable.js';\nimport { parsePercent } from '../util/number.js';\nvar v2ApplyTransform = vector.applyTransform;\nvar View = /** @class */function (_super) {\n __extends(View, _super);\n function View(name) {\n var _this = _super.call(this) || this;\n _this.type = 'view';\n _this.dimensions = ['x', 'y'];\n /**\n * Represents the transform brought by roam/zoom.\n * If `View['_viewRect']` applies roam transform,\n * we can get the final displayed rect.\n */\n _this._roamTransformable = new Transformable();\n /**\n * Represents the transform from `View['_rect']` to `View['_viewRect']`.\n */\n _this._rawTransformable = new Transformable();\n _this.name = name;\n return _this;\n }\n View.prototype.setBoundingRect = function (x, y, width, height) {\n this._rect = new BoundingRect(x, y, width, height);\n return this._rect;\n };\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n View.prototype.getBoundingRect = function () {\n return this._rect;\n };\n View.prototype.setViewRect = function (x, y, width, height) {\n this._transformTo(x, y, width, height);\n this._viewRect = new BoundingRect(x, y, width, height);\n };\n /**\n * Transformed to particular position and size\n */\n View.prototype._transformTo = function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var rawTransform = this._rawTransformable;\n rawTransform.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n var rawParent = rawTransform.parent;\n rawTransform.parent = null;\n rawTransform.decomposeTransform();\n rawTransform.parent = rawParent;\n this._updateTransform();\n };\n /**\n * Set center of view\n */\n View.prototype.setCenter = function (centerCoord, api) {\n if (!centerCoord) {\n return;\n }\n this._center = [parsePercent(centerCoord[0], api.getWidth()), parsePercent(centerCoord[1], api.getHeight())];\n this._updateCenterAndZoom();\n };\n View.prototype.setZoom = function (zoom) {\n zoom = zoom || 1;\n var zoomLimit = this.zoomLimit;\n if (zoomLimit) {\n if (zoomLimit.max != null) {\n zoom = Math.min(zoomLimit.max, zoom);\n }\n if (zoomLimit.min != null) {\n zoom = Math.max(zoomLimit.min, zoom);\n }\n }\n this._zoom = zoom;\n this._updateCenterAndZoom();\n };\n /**\n * Get default center without roam\n */\n View.prototype.getDefaultCenter = function () {\n // Rect before any transform\n var rawRect = this.getBoundingRect();\n var cx = rawRect.x + rawRect.width / 2;\n var cy = rawRect.y + rawRect.height / 2;\n return [cx, cy];\n };\n View.prototype.getCenter = function () {\n return this._center || this.getDefaultCenter();\n };\n View.prototype.getZoom = function () {\n return this._zoom || 1;\n };\n View.prototype.getRoamTransform = function () {\n return this._roamTransformable.getLocalTransform();\n };\n /**\n * Remove roam\n */\n View.prototype._updateCenterAndZoom = function () {\n // Must update after view transform updated\n var rawTransformMatrix = this._rawTransformable.getLocalTransform();\n var roamTransform = this._roamTransformable;\n var defaultCenter = this.getDefaultCenter();\n var center = this.getCenter();\n var zoom = this.getZoom();\n center = vector.applyTransform([], center, rawTransformMatrix);\n defaultCenter = vector.applyTransform([], defaultCenter, rawTransformMatrix);\n roamTransform.originX = center[0];\n roamTransform.originY = center[1];\n roamTransform.x = defaultCenter[0] - center[0];\n roamTransform.y = defaultCenter[1] - center[1];\n roamTransform.scaleX = roamTransform.scaleY = zoom;\n this._updateTransform();\n };\n /**\n * Update transform props on `this` based on the current\n * `this._roamTransformable` and `this._rawTransformable`.\n */\n View.prototype._updateTransform = function () {\n var roamTransformable = this._roamTransformable;\n var rawTransformable = this._rawTransformable;\n rawTransformable.parent = roamTransformable;\n roamTransformable.updateTransform();\n rawTransformable.updateTransform();\n matrix.copy(this.transform || (this.transform = []), rawTransformable.transform || matrix.create());\n this._rawTransform = rawTransformable.getLocalTransform();\n this.invTransform = this.invTransform || [];\n matrix.invert(this.invTransform, this.transform);\n this.decomposeTransform();\n };\n View.prototype.getTransformInfo = function () {\n var rawTransformable = this._rawTransformable;\n var roamTransformable = this._roamTransformable;\n // Because roamTransformabel has `originX/originY` modified,\n // but the caller of `getTransformInfo` can not handle `originX/originY`,\n // so need to recalculate them.\n var dummyTransformable = new Transformable();\n dummyTransformable.transform = roamTransformable.transform;\n dummyTransformable.decomposeTransform();\n return {\n roam: {\n x: dummyTransformable.x,\n y: dummyTransformable.y,\n scaleX: dummyTransformable.scaleX,\n scaleY: dummyTransformable.scaleY\n },\n raw: {\n x: rawTransformable.x,\n y: rawTransformable.y,\n scaleX: rawTransformable.scaleX,\n scaleY: rawTransformable.scaleY\n }\n };\n };\n View.prototype.getViewRect = function () {\n return this._viewRect;\n };\n /**\n * Get view rect after roam transform\n */\n View.prototype.getViewRectAfterRoam = function () {\n var rect = this.getBoundingRect().clone();\n rect.applyTransform(this.transform);\n return rect;\n };\n /**\n * Convert a single (lon, lat) data item to (x, y) point.\n */\n View.prototype.dataToPoint = function (data, noRoam, out) {\n var transform = noRoam ? this._rawTransform : this.transform;\n out = out || [];\n return transform ? v2ApplyTransform(out, data, transform) : vector.copy(out, data);\n };\n /**\n * Convert a (x, y) point to (lon, lat) data\n */\n View.prototype.pointToData = function (point) {\n var invTransform = this.invTransform;\n return invTransform ? v2ApplyTransform([], point, invTransform) : [point[0], point[1]];\n };\n View.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n View.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n /**\n * @implements\n */\n View.prototype.containPoint = function (point) {\n return this.getViewRectAfterRoam().contain(point[0], point[1]);\n };\n View.dimensions = ['x', 'y'];\n return View;\n}(Transformable);\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n return seriesModel ? seriesModel.coordinateSystem : null; // e.g., graph.\n}\n\nexport default View;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport View from '../View.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { warn } from '../../util/log.js';\nvar GEO_DEFAULT_PARAMS = {\n 'geoJSON': {\n aspectScale: 0.75,\n invertLongitute: true\n },\n 'geoSVG': {\n aspectScale: 1,\n invertLongitute: false\n }\n};\nexport var geo2DDimensions = ['lng', 'lat'];\nvar Geo = /** @class */function (_super) {\n __extends(Geo, _super);\n function Geo(name, map, opt) {\n var _this = _super.call(this, name) || this;\n _this.dimensions = geo2DDimensions;\n _this.type = 'geo';\n // Only store specified name coord via `addGeoCoord`.\n _this._nameCoordMap = zrUtil.createHashMap();\n _this.map = map;\n var projection = opt.projection;\n var source = geoSourceManager.load(map, opt.nameMap, opt.nameProperty);\n var resource = geoSourceManager.getGeoResource(map);\n var resourceType = _this.resourceType = resource ? resource.type : null;\n var regions = _this.regions = source.regions;\n var defaultParams = GEO_DEFAULT_PARAMS[resource.type];\n _this._regionsMap = source.regionsMap;\n _this.regions = source.regions;\n if (process.env.NODE_ENV !== 'production' && projection) {\n // Do some check\n if (resourceType === 'geoSVG') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Map \" + map + \" with SVG source can't use projection. Only GeoJSON source supports projection.\");\n }\n projection = null;\n }\n if (!(projection.project && projection.unproject)) {\n if (process.env.NODE_ENV !== 'production') {\n warn('project and unproject must be both provided in the projeciton.');\n }\n projection = null;\n }\n }\n _this.projection = projection;\n var boundingRect;\n if (projection) {\n // Can't reuse the raw bounding rect\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect(projection);\n boundingRect = boundingRect || regionRect.clone();\n boundingRect.union(regionRect);\n }\n } else {\n boundingRect = source.boundingRect;\n }\n _this.setBoundingRect(boundingRect.x, boundingRect.y, boundingRect.width, boundingRect.height);\n // aspectScale and invertLongitute actually is the parameters default raw projection.\n // So we ignore them if projection is given.\n // Ignore default aspect scale if projection exits.\n _this.aspectScale = projection ? 1 : zrUtil.retrieve2(opt.aspectScale, defaultParams.aspectScale);\n // Not invert longitude if projection exits.\n _this._invertLongitute = projection ? false : defaultParams.invertLongitute;\n return _this;\n }\n Geo.prototype._transformTo = function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var invertLongitute = this._invertLongitute;\n rect = rect.clone();\n if (invertLongitute) {\n // Longitude is inverted.\n rect.y = -rect.y - rect.height;\n }\n var rawTransformable = this._rawTransformable;\n rawTransformable.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n var rawParent = rawTransformable.parent;\n rawTransformable.parent = null;\n rawTransformable.decomposeTransform();\n rawTransformable.parent = rawParent;\n if (invertLongitute) {\n rawTransformable.scaleY = -rawTransformable.scaleY;\n }\n this._updateTransform();\n };\n Geo.prototype.getRegion = function (name) {\n return this._regionsMap.get(name);\n };\n Geo.prototype.getRegionByCoord = function (coord) {\n var regions = this.regions;\n for (var i = 0; i < regions.length; i++) {\n var region = regions[i];\n if (region.type === 'geoJSON' && region.contain(coord)) {\n return regions[i];\n }\n }\n };\n /**\n * Add geoCoord for indexing by name\n */\n Geo.prototype.addGeoCoord = function (name, geoCoord) {\n this._nameCoordMap.set(name, geoCoord);\n };\n /**\n * Get geoCoord by name\n */\n Geo.prototype.getGeoCoord = function (name) {\n var region = this._regionsMap.get(name);\n // Calculate center only on demand.\n return this._nameCoordMap.get(name) || region && region.getCenter();\n };\n Geo.prototype.dataToPoint = function (data, noRoam, out) {\n if (zrUtil.isString(data)) {\n // Map area name to geoCoord\n data = this.getGeoCoord(data);\n }\n if (data) {\n var projection = this.projection;\n if (projection) {\n // projection may return null point.\n data = projection.project(data);\n }\n return data && this.projectedToPoint(data, noRoam, out);\n }\n };\n Geo.prototype.pointToData = function (point) {\n var projection = this.projection;\n if (projection) {\n // projection may return null point.\n point = projection.unproject(point);\n }\n return point && this.pointToProjected(point);\n };\n /**\n * Point to projected data. Same with pointToData when projection is used.\n */\n Geo.prototype.pointToProjected = function (point) {\n return _super.prototype.pointToData.call(this, point);\n };\n Geo.prototype.projectedToPoint = function (projected, noRoam, out) {\n return _super.prototype.dataToPoint.call(this, projected, noRoam, out);\n };\n Geo.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n Geo.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n return Geo;\n}(View);\n;\nzrUtil.mixin(Geo, View);\nfunction getCoordSys(finder) {\n var geoModel = finder.geoModel;\n var seriesModel = finder.seriesModel;\n return geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map series.\n || (seriesModel.getReferringComponents('geo', SINGLE_REFERRING).models[0] || {}).coordinateSystem : null;\n}\nexport default Geo;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Geo, { geo2DDimensions } from './Geo.js';\nimport * as layout from '../../util/layout.js';\nimport * as numberUtil from '../../util/number.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport * as vector from 'zrender/lib/core/vector.js';\n/**\n * Resize method bound to the geo\n */\nfunction resizeGeo(geoModel, api) {\n var boundingCoords = geoModel.get('boundingCoords');\n if (boundingCoords != null) {\n var leftTop_1 = boundingCoords[0];\n var rightBottom_1 = boundingCoords[1];\n if (!(isFinite(leftTop_1[0]) && isFinite(leftTop_1[1]) && isFinite(rightBottom_1[0]) && isFinite(rightBottom_1[1]))) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Invalid boundingCoords');\n }\n } else {\n // Sample around the lng/lat rect and use projection to calculate actual bounding rect.\n var projection_1 = this.projection;\n if (projection_1) {\n var xMin = leftTop_1[0];\n var yMin = leftTop_1[1];\n var xMax = rightBottom_1[0];\n var yMax = rightBottom_1[1];\n leftTop_1 = [Infinity, Infinity];\n rightBottom_1 = [-Infinity, -Infinity];\n // TODO better way?\n var sampleLine = function (x0, y0, x1, y1) {\n var dx = x1 - x0;\n var dy = y1 - y0;\n for (var i = 0; i <= 100; i++) {\n var p = i / 100;\n var pt = projection_1.project([x0 + dx * p, y0 + dy * p]);\n vector.min(leftTop_1, leftTop_1, pt);\n vector.max(rightBottom_1, rightBottom_1, pt);\n }\n };\n // Top\n sampleLine(xMin, yMin, xMax, yMin);\n // Right\n sampleLine(xMax, yMin, xMax, yMax);\n // Bottom\n sampleLine(xMax, yMax, xMin, yMax);\n // Left\n sampleLine(xMin, yMax, xMax, yMin);\n }\n this.setBoundingRect(leftTop_1[0], leftTop_1[1], rightBottom_1[0] - leftTop_1[0], rightBottom_1[1] - leftTop_1[1]);\n }\n }\n var rect = this.getBoundingRect();\n var centerOption = geoModel.get('layoutCenter');\n var sizeOption = geoModel.get('layoutSize');\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n var aspect = rect.width / rect.height * this.aspectScale;\n var useCenterAndSize = false;\n var center;\n var size;\n if (centerOption && sizeOption) {\n center = [numberUtil.parsePercent(centerOption[0], viewWidth), numberUtil.parsePercent(centerOption[1], viewHeight)];\n size = numberUtil.parsePercent(sizeOption, Math.min(viewWidth, viewHeight));\n if (!isNaN(center[0]) && !isNaN(center[1]) && !isNaN(size)) {\n useCenterAndSize = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.');\n }\n }\n }\n var viewRect;\n if (useCenterAndSize) {\n viewRect = {};\n if (aspect > 1) {\n // Width is same with size\n viewRect.width = size;\n viewRect.height = size / aspect;\n } else {\n viewRect.height = size;\n viewRect.width = size * aspect;\n }\n viewRect.y = center[1] - viewRect.height / 2;\n viewRect.x = center[0] - viewRect.width / 2;\n } else {\n // Use left/top/width/height\n var boxLayoutOption = geoModel.getBoxLayoutParams();\n boxLayoutOption.aspect = aspect;\n viewRect = layout.getLayoutRect(boxLayoutOption, {\n width: viewWidth,\n height: viewHeight\n });\n }\n this.setViewRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);\n this.setCenter(geoModel.get('center'), api);\n this.setZoom(geoModel.get('zoom'));\n}\n// Back compat for ECharts2, where the coord map is set on map series:\n// {type: 'map', geoCoord: {'cityA': [116.46,39.92], 'cityA': [119.12,24.61]}},\nfunction setGeoCoords(geo, model) {\n zrUtil.each(model.get('geoCoord'), function (geoCoord, name) {\n geo.addGeoCoord(name, geoCoord);\n });\n}\nvar GeoCreator = /** @class */function () {\n function GeoCreator() {\n // For deciding which dimensions to use when creating list data\n this.dimensions = geo2DDimensions;\n }\n GeoCreator.prototype.create = function (ecModel, api) {\n var geoList = [];\n function getCommonGeoProperties(model) {\n return {\n nameProperty: model.get('nameProperty'),\n aspectScale: model.get('aspectScale'),\n projection: model.get('projection')\n };\n }\n // FIXME Create each time may be slow\n ecModel.eachComponent('geo', function (geoModel, idx) {\n var mapName = geoModel.get('map');\n var geo = new Geo(mapName + idx, mapName, zrUtil.extend({\n nameMap: geoModel.get('nameMap')\n }, getCommonGeoProperties(geoModel)));\n geo.zoomLimit = geoModel.get('scaleLimit');\n geoList.push(geo);\n // setGeoCoords(geo, geoModel);\n geoModel.coordinateSystem = geo;\n geo.model = geoModel;\n // Inject resize method\n geo.resize = resizeGeo;\n geo.resize(geoModel, api);\n });\n ecModel.eachSeries(function (seriesModel) {\n var coordSys = seriesModel.get('coordinateSystem');\n if (coordSys === 'geo') {\n var geoIndex = seriesModel.get('geoIndex') || 0;\n seriesModel.coordinateSystem = geoList[geoIndex];\n }\n });\n // If has map series\n var mapModelGroupBySeries = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n if (!seriesModel.getHostGeoModel()) {\n var mapType = seriesModel.getMapType();\n mapModelGroupBySeries[mapType] = mapModelGroupBySeries[mapType] || [];\n mapModelGroupBySeries[mapType].push(seriesModel);\n }\n });\n zrUtil.each(mapModelGroupBySeries, function (mapSeries, mapType) {\n var nameMapList = zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('nameMap');\n });\n var geo = new Geo(mapType, mapType, zrUtil.extend({\n nameMap: zrUtil.mergeAll(nameMapList)\n }, getCommonGeoProperties(mapSeries[0])));\n geo.zoomLimit = zrUtil.retrieve.apply(null, zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('scaleLimit');\n }));\n geoList.push(geo);\n // Inject resize method\n geo.resize = resizeGeo;\n geo.resize(mapSeries[0], api);\n zrUtil.each(mapSeries, function (singleMapSeries) {\n singleMapSeries.coordinateSystem = geo;\n setGeoCoords(geo, singleMapSeries);\n });\n });\n return geoList;\n };\n /**\n * Fill given regions array\n */\n GeoCreator.prototype.getFilledRegions = function (originRegionArr, mapName, nameMap, nameProperty) {\n // Not use the original\n var regionsArr = (originRegionArr || []).slice();\n var dataNameMap = zrUtil.createHashMap();\n for (var i = 0; i < regionsArr.length; i++) {\n dataNameMap.set(regionsArr[i].name, regionsArr[i]);\n }\n var source = geoSourceManager.load(mapName, nameMap, nameProperty);\n zrUtil.each(source.regions, function (region) {\n var name = region.name;\n !dataNameMap.get(name) && regionsArr.push({\n name: name\n });\n });\n return regionsArr;\n };\n return GeoCreator;\n}();\nvar geoCreator = new GeoCreator();\nexport default geoCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nimport Model from '../../model/Model.js';\nimport geoCreator from './geoCreator.js';\nimport geoSourceManager from './geoSourceManager.js';\n;\nvar GeoModel = /** @class */function (_super) {\n __extends(GeoModel, _super);\n function GeoModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GeoModel.type;\n return _this;\n }\n GeoModel.prototype.init = function (option, parentModel, ecModel) {\n var source = geoSourceManager.getGeoResource(option.map);\n if (source && source.type === 'geoJSON') {\n var itemStyle = option.itemStyle = option.itemStyle || {};\n if (!('color' in itemStyle)) {\n itemStyle.color = '#eee';\n }\n }\n this.mergeDefaultAndTheme(option, ecModel);\n // Default label emphasis `show`\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n };\n GeoModel.prototype.optionUpdated = function () {\n var _this = this;\n var option = this.option;\n option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap, option.nameProperty);\n var selectedMap = {};\n this._optionModelMap = zrUtil.reduce(option.regions || [], function (optionModelMap, regionOpt) {\n var regionName = regionOpt.name;\n if (regionName) {\n optionModelMap.set(regionName, new Model(regionOpt, _this, _this.ecModel));\n if (regionOpt.selected) {\n selectedMap[regionName] = true;\n }\n }\n return optionModelMap;\n }, zrUtil.createHashMap());\n if (!option.selectedMap) {\n option.selectedMap = selectedMap;\n }\n };\n /**\n * Get model of region.\n */\n GeoModel.prototype.getRegionModel = function (name) {\n return this._optionModelMap.get(name) || new Model(null, this, this.ecModel);\n };\n /**\n * Format label\n * @param name Region name\n */\n GeoModel.prototype.getFormattedLabel = function (name, status) {\n var regionModel = this.getRegionModel(name);\n var formatter = status === 'normal' ? regionModel.get(['label', 'formatter']) : regionModel.get(['emphasis', 'label', 'formatter']);\n var params = {\n name: name\n };\n if (zrUtil.isFunction(formatter)) {\n params.status = status;\n return formatter(params);\n } else if (zrUtil.isString(formatter)) {\n return formatter.replace('{a}', name != null ? name : '');\n }\n };\n GeoModel.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n GeoModel.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n // PENGING If selectedMode is null ?\n GeoModel.prototype.select = function (name) {\n var option = this.option;\n var selectedMode = option.selectedMode;\n if (!selectedMode) {\n return;\n }\n if (selectedMode !== 'multiple') {\n option.selectedMap = null;\n }\n var selectedMap = option.selectedMap || (option.selectedMap = {});\n selectedMap[name] = true;\n };\n GeoModel.prototype.unSelect = function (name) {\n var selectedMap = this.option.selectedMap;\n if (selectedMap) {\n selectedMap[name] = false;\n }\n };\n GeoModel.prototype.toggleSelected = function (name) {\n this[this.isSelected(name) ? 'unSelect' : 'select'](name);\n };\n GeoModel.prototype.isSelected = function (name) {\n var selectedMap = this.option.selectedMap;\n return !!(selectedMap && selectedMap[name]);\n };\n GeoModel.type = 'geo';\n GeoModel.layoutMode = 'box';\n GeoModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n show: true,\n left: 'center',\n top: 'center',\n // Default value:\n // for geoSVG source: 1,\n // for geoJSON source: 0.75.\n aspectScale: null,\n // /// Layout with center and size\n // If you want to put map in a fixed size box with right aspect ratio\n // This two properties may be more convenient\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n silent: false,\n // Map type\n map: '',\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ]\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n // selectedMode: false\n label: {\n show: false,\n color: '#000'\n },\n itemStyle: {\n borderWidth: 0.5,\n borderColor: '#444'\n // Default color:\n // + geoJSON: #eee\n // + geoSVG: null (use SVG original `fill`)\n // color: '#eee'\n },\n\n emphasis: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n color: 'rgba(255,215,0,0.8)'\n }\n },\n select: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n color: 'rgba(255,215,0,0.8)'\n }\n },\n regions: []\n // tooltip: {\n // show: false\n // }\n };\n\n return GeoModel;\n}(ComponentModel);\nexport default GeoModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction getCenterCoord(view, point) {\n // Use projected coord as center because it's linear.\n return view.pointToProjected ? view.pointToProjected(point) : view.pointToData(point);\n}\nexport function updateCenterAndZoom(view, payload, zoomLimit, api) {\n var previousZoom = view.getZoom();\n var center = view.getCenter();\n var zoom = payload.zoom;\n var point = view.projectedToPoint ? view.projectedToPoint(center) : view.dataToPoint(center);\n if (payload.dx != null && payload.dy != null) {\n point[0] -= payload.dx;\n point[1] -= payload.dy;\n view.setCenter(getCenterCoord(view, point), api);\n }\n if (zoom != null) {\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom;\n }\n // Zoom on given point(originX, originY)\n view.scaleX *= zoom;\n view.scaleY *= zoom;\n var fixX = (payload.originX - view.x) * (zoom - 1);\n var fixY = (payload.originY - view.y) * (zoom - 1);\n view.x -= fixX;\n view.y -= fixY;\n view.updateTransform();\n // Get the new center\n view.setCenter(getCenterCoord(view, point), api);\n view.setZoom(zoom * previousZoom);\n }\n return {\n center: view.getCenter(),\n zoom: view.getZoom()\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MapDraw from '../helper/MapDraw.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { findEventDispatcher } from '../../util/event.js';\nvar GeoView = /** @class */function (_super) {\n __extends(GeoView, _super);\n function GeoView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GeoView.type;\n _this.focusBlurEnabled = true;\n return _this;\n }\n GeoView.prototype.init = function (ecModel, api) {\n this._api = api;\n };\n GeoView.prototype.render = function (geoModel, ecModel, api, payload) {\n this._model = geoModel;\n if (!geoModel.get('show')) {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n return;\n }\n if (!this._mapDraw) {\n this._mapDraw = new MapDraw(api);\n }\n var mapDraw = this._mapDraw;\n mapDraw.draw(geoModel, ecModel, api, this, payload);\n mapDraw.group.on('click', this._handleRegionClick, this);\n mapDraw.group.silent = geoModel.get('silent');\n this.group.add(mapDraw.group);\n this.updateSelectStatus(geoModel, ecModel, api);\n };\n GeoView.prototype._handleRegionClick = function (e) {\n var eventData;\n findEventDispatcher(e.target, function (current) {\n return (eventData = getECData(current).eventData) != null;\n }, true);\n if (eventData) {\n this._api.dispatchAction({\n type: 'geoToggleSelect',\n geoId: this._model.id,\n name: eventData.name\n });\n }\n };\n GeoView.prototype.updateSelectStatus = function (model, ecModel, api) {\n var _this = this;\n this._mapDraw.group.traverse(function (node) {\n var eventData = getECData(node).eventData;\n if (eventData) {\n _this._model.isSelected(eventData.name) ? api.enterSelect(node) : api.leaveSelect(node);\n // No need to traverse children.\n return true;\n }\n });\n };\n GeoView.prototype.findHighDownDispatchers = function (name) {\n return this._mapDraw && this._mapDraw.findHighDownDispatchers(name, this._model);\n };\n GeoView.prototype.dispose = function () {\n this._mapDraw && this._mapDraw.remove();\n };\n GeoView.type = 'geo';\n return GeoView;\n}(ComponentView);\nexport default GeoView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport GeoModel from '../../coord/geo/GeoModel.js';\nimport geoCreator from '../../coord/geo/geoCreator.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport { updateCenterAndZoom } from '../../action/roamHelper.js';\nimport GeoView from './GeoView.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nfunction registerMap(mapName, geoJson, specialAreas) {\n geoSourceManager.registerMap(mapName, geoJson, specialAreas);\n}\nexport function install(registers) {\n registers.registerCoordinateSystem('geo', geoCreator);\n registers.registerComponentModel(GeoModel);\n registers.registerComponentView(GeoView);\n registers.registerImpl('registerMap', registerMap);\n registers.registerImpl('getMap', function (mapName) {\n return geoSourceManager.getMapForUser(mapName);\n });\n function makeAction(method, actionInfo) {\n actionInfo.update = 'geo:updateSelectStatus';\n registers.registerAction(actionInfo, function (payload, ecModel) {\n var selected = {};\n var allSelected = [];\n ecModel.eachComponent({\n mainType: 'geo',\n query: payload\n }, function (geoModel) {\n geoModel[method](payload.name);\n var geo = geoModel.coordinateSystem;\n each(geo.regions, function (region) {\n selected[region.name] = geoModel.isSelected(region.name) || false;\n });\n // Notice: there might be duplicated name in different regions.\n var names = [];\n each(selected, function (v, name) {\n selected[name] && names.push(name);\n });\n allSelected.push({\n geoIndex: geoModel.componentIndex,\n // Use singular, the same naming convention as the event `selectchanged`.\n name: names\n });\n });\n return {\n selected: selected,\n allSelected: allSelected,\n name: payload.name\n };\n });\n }\n makeAction('toggleSelected', {\n type: 'geoToggleSelect',\n event: 'geoselectchanged'\n });\n makeAction('select', {\n type: 'geoSelect',\n event: 'geoselected'\n });\n makeAction('unSelect', {\n type: 'geoUnSelect',\n event: 'geounselected'\n });\n /**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n registers.registerAction({\n type: 'geoRoam',\n event: 'geoRoam',\n update: 'updateTransform'\n }, function (payload, ecModel, api) {\n var componentType = payload.componentType || 'series';\n ecModel.eachComponent({\n mainType: componentType,\n query: payload\n }, function (componentModel) {\n var geo = componentModel.coordinateSystem;\n if (geo.type !== 'geo') {\n return;\n }\n var res = updateCenterAndZoom(geo, payload, componentModel.get('scaleLimit'), api);\n componentModel.setCenter && componentModel.setCenter(res.center);\n componentModel.setZoom && componentModel.setZoom(res.zoom);\n // All map series with same `map` use the same geo coordinate system\n // So the center and zoom must be in sync. Include the series not selected by legend\n if (componentType === 'series') {\n each(componentModel.seriesGroup, function (seriesModel) {\n seriesModel.setCenter(res.center);\n seriesModel.setZoom(res.zoom);\n });\n }\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport MapView from './MapView.js';\nimport MapSeries from './MapSeries.js';\nimport mapDataStatistic from './mapDataStatistic.js';\nimport mapSymbolLayout from './mapSymbolLayout.js';\nimport { createLegacyDataSelectAction } from '../../legacy/dataSelectAction.js';\nimport { install as installGeo } from '../../component/geo/install.js';\nexport function install(registers) {\n use(installGeo);\n registers.registerChartView(MapView);\n registers.registerSeriesModel(MapSeries);\n registers.registerLayout(mapSymbolLayout);\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, mapDataStatistic);\n createLegacyDataSelectAction('map', registers.registerAction);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/*\n* A third-party license is embedded for some of the code in this file:\n* The tree layoutHelper implementation was originally copied from\n* \"d3.js\"(https://github.com/d3/d3-hierarchy) with\n* some modifications made for this project.\n* (see more details in the comment of the specific method below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the licence of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\n/**\n * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing\n * the tree.\n */\nimport * as layout from '../../util/layout.js';\n/**\n * Initialize all computational message for following algorithm.\n */\nexport function init(inRoot) {\n var root = inRoot;\n root.hierNode = {\n defaultAncestor: null,\n ancestor: root,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: 0,\n thread: null\n };\n var nodes = [root];\n var node;\n var children;\n while (node = nodes.pop()) {\n // jshint ignore:line\n children = node.children;\n if (node.isExpand && children.length) {\n var n = children.length;\n for (var i = n - 1; i >= 0; i--) {\n var child = children[i];\n child.hierNode = {\n defaultAncestor: null,\n ancestor: child,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: i,\n thread: null\n };\n nodes.push(child);\n }\n }\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes a preliminary x coordinate for node. Before that, this function is\n * applied recursively to the children of node, as well as the function\n * apportion(). After spacing out the children by calling executeShifts(), the\n * node is placed to the midpoint of its outermost children.\n */\nexport function firstWalk(node, separation) {\n var children = node.isExpand ? node.children : [];\n var siblings = node.parentNode.children;\n var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null;\n if (children.length) {\n executeShifts(node);\n var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2;\n if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n node.hierNode.modifier = node.hierNode.prelim - midPoint;\n } else {\n node.hierNode.prelim = midPoint;\n }\n } else if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n }\n node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation);\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes all real x-coordinates by summing up the modifiers recursively.\n */\nexport function secondWalk(node) {\n var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier;\n node.setLayout({\n x: nodeX\n }, true);\n node.hierNode.modifier += node.parentNode.hierNode.modifier;\n}\nexport function separation(cb) {\n return arguments.length ? cb : defaultSeparation;\n}\n/**\n * Transform the common coordinate to radial coordinate.\n */\nexport function radialCoordinate(rad, r) {\n rad -= Math.PI / 2;\n return {\n x: r * Math.cos(rad),\n y: r * Math.sin(rad)\n };\n}\n/**\n * Get the layout position of the whole view.\n */\nexport function getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n/**\n * All other shifts, applied to the smaller subtrees between w- and w+, are\n * performed by this function.\n *\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\nfunction executeShifts(node) {\n var children = node.children;\n var n = children.length;\n var shift = 0;\n var change = 0;\n while (--n >= 0) {\n var child = children[n];\n child.hierNode.prelim += shift;\n child.hierNode.modifier += shift;\n change += child.hierNode.change;\n shift += child.hierNode.shift + change;\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * The core of the algorithm. Here, a new subtree is combined with the\n * previous subtrees. Threads are used to traverse the inside and outside\n * contours of the left and right subtree up to the highest common level.\n * Whenever two nodes of the inside contours conflict, we compute the left\n * one of the greatest uncommon ancestors using the function nextAncestor()\n * and call moveSubtree() to shift the subtree and prepare the shifts of\n * smaller subtrees. Finally, we add a new thread (if necessary).\n */\nfunction apportion(subtreeV, subtreeW, ancestor, separation) {\n if (subtreeW) {\n var nodeOutRight = subtreeV;\n var nodeInRight = subtreeV;\n var nodeOutLeft = nodeInRight.parentNode.children[0];\n var nodeInLeft = subtreeW;\n var sumOutRight = nodeOutRight.hierNode.modifier;\n var sumInRight = nodeInRight.hierNode.modifier;\n var sumOutLeft = nodeOutLeft.hierNode.modifier;\n var sumInLeft = nodeInLeft.hierNode.modifier;\n while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) {\n nodeOutRight = nextRight(nodeOutRight);\n nodeOutLeft = nextLeft(nodeOutLeft);\n nodeOutRight.hierNode.ancestor = subtreeV;\n var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight);\n if (shift > 0) {\n moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift);\n sumInRight += shift;\n sumOutRight += shift;\n }\n sumInLeft += nodeInLeft.hierNode.modifier;\n sumInRight += nodeInRight.hierNode.modifier;\n sumOutRight += nodeOutRight.hierNode.modifier;\n sumOutLeft += nodeOutLeft.hierNode.modifier;\n }\n if (nodeInLeft && !nextRight(nodeOutRight)) {\n nodeOutRight.hierNode.thread = nodeInLeft;\n nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight;\n }\n if (nodeInRight && !nextLeft(nodeOutLeft)) {\n nodeOutLeft.hierNode.thread = nodeInRight;\n nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft;\n ancestor = subtreeV;\n }\n }\n return ancestor;\n}\n/**\n * This function is used to traverse the right contour of a subtree.\n * It returns the rightmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n */\nfunction nextRight(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread;\n}\n/**\n * This function is used to traverse the left contour of a subtree (or a subforest).\n * It returns the leftmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n */\nfunction nextLeft(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[0] : node.hierNode.thread;\n}\n/**\n * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor.\n * Otherwise, returns the specified ancestor.\n */\nfunction nextAncestor(nodeInLeft, node, ancestor) {\n return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Shifts the current subtree rooted at wr.\n * This is done by increasing prelim(w+) and modifier(w+) by shift.\n */\nfunction moveSubtree(wl, wr, shift) {\n var change = shift / (wr.hierNode.i - wl.hierNode.i);\n wr.hierNode.change -= change;\n wr.hierNode.shift += shift;\n wr.hierNode.modifier += shift;\n wr.hierNode.prelim += shift;\n wl.hierNode.change += change;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\nfunction defaultSeparation(node1, node2) {\n return node1.parentNode === node2.parentNode ? 1 : 2;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport SymbolClz from '../helper/Symbol.js';\nimport { radialCoordinate } from './layoutHelper.js';\nimport * as bbox from 'zrender/lib/core/bbox.js';\nimport View from '../../coord/View.js';\nimport * as roamHelper from '../../component/helper/roamHelper.js';\nimport RoamController from '../../component/helper/RoamController.js';\nimport { onIrrelevantElement } from '../../component/helper/cursorHelper.js';\nimport { parsePercent } from '../../util/number.js';\nimport ChartView from '../../view/Chart.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { setStatesStylesFromModel, setStatesFlag, setDefaultStateProxy, HOVER_STATE_BLUR } from '../../util/states.js';\nvar TreeEdgeShape = /** @class */function () {\n function TreeEdgeShape() {\n this.parentPoint = [];\n this.childPoints = [];\n }\n return TreeEdgeShape;\n}();\nvar TreePath = /** @class */function (_super) {\n __extends(TreePath, _super);\n function TreePath(opts) {\n return _super.call(this, opts) || this;\n }\n TreePath.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n TreePath.prototype.getDefaultShape = function () {\n return new TreeEdgeShape();\n };\n TreePath.prototype.buildPath = function (ctx, shape) {\n var childPoints = shape.childPoints;\n var childLen = childPoints.length;\n var parentPoint = shape.parentPoint;\n var firstChildPos = childPoints[0];\n var lastChildPos = childPoints[childLen - 1];\n if (childLen === 1) {\n ctx.moveTo(parentPoint[0], parentPoint[1]);\n ctx.lineTo(firstChildPos[0], firstChildPos[1]);\n return;\n }\n var orient = shape.orient;\n var forkDim = orient === 'TB' || orient === 'BT' ? 0 : 1;\n var otherDim = 1 - forkDim;\n var forkPosition = parsePercent(shape.forkPosition, 1);\n var tmpPoint = [];\n tmpPoint[forkDim] = parentPoint[forkDim];\n tmpPoint[otherDim] = parentPoint[otherDim] + (lastChildPos[otherDim] - parentPoint[otherDim]) * forkPosition;\n ctx.moveTo(parentPoint[0], parentPoint[1]);\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n ctx.moveTo(firstChildPos[0], firstChildPos[1]);\n tmpPoint[forkDim] = firstChildPos[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n tmpPoint[forkDim] = lastChildPos[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n ctx.lineTo(lastChildPos[0], lastChildPos[1]);\n for (var i = 1; i < childLen - 1; i++) {\n var point = childPoints[i];\n ctx.moveTo(point[0], point[1]);\n tmpPoint[forkDim] = point[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n }\n };\n return TreePath;\n}(Path);\nvar TreeView = /** @class */function (_super) {\n __extends(TreeView, _super);\n function TreeView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TreeView.type;\n _this._mainGroup = new graphic.Group();\n return _this;\n }\n TreeView.prototype.init = function (ecModel, api) {\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: this.group\n };\n this.group.add(this._mainGroup);\n };\n TreeView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var layoutInfo = seriesModel.layoutInfo;\n var group = this._mainGroup;\n var layout = seriesModel.get('layout');\n if (layout === 'radial') {\n group.x = layoutInfo.x + layoutInfo.width / 2;\n group.y = layoutInfo.y + layoutInfo.height / 2;\n } else {\n group.x = layoutInfo.x;\n group.y = layoutInfo.y;\n }\n this._updateViewCoordSys(seriesModel, api);\n this._updateController(seriesModel, ecModel, api);\n var oldData = this._data;\n data.diff(oldData).add(function (newIdx) {\n if (symbolNeedsDraw(data, newIdx)) {\n // Create node and edge\n updateNode(data, newIdx, null, group, seriesModel);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n if (!symbolNeedsDraw(data, newIdx)) {\n symbolEl && removeNode(oldData, oldIdx, symbolEl, group, seriesModel);\n return;\n }\n // Update node and edge\n updateNode(data, newIdx, symbolEl, group, seriesModel);\n }).remove(function (oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n // When remove a collapsed node of subtree, since the collapsed\n // node haven't been initialized with a symbol element,\n // you can't found it's symbol element through index.\n // so if we want to remove the symbol element we should insure\n // that the symbol element is not null.\n if (symbolEl) {\n removeNode(oldData, oldIdx, symbolEl, group, seriesModel);\n }\n }).execute();\n this._nodeScaleRatio = seriesModel.get('nodeScaleRatio');\n this._updateNodeAndLinkScale(seriesModel);\n if (seriesModel.get('expandAndCollapse') === true) {\n data.eachItemGraphicEl(function (el, dataIndex) {\n el.off('click').on('click', function () {\n api.dispatchAction({\n type: 'treeExpandAndCollapse',\n seriesId: seriesModel.id,\n dataIndex: dataIndex\n });\n });\n });\n }\n this._data = data;\n };\n TreeView.prototype._updateViewCoordSys = function (seriesModel, api) {\n var data = seriesModel.getData();\n var points = [];\n data.each(function (idx) {\n var layout = data.getItemLayout(idx);\n if (layout && !isNaN(layout.x) && !isNaN(layout.y)) {\n points.push([+layout.x, +layout.y]);\n }\n });\n var min = [];\n var max = [];\n bbox.fromPoints(points, min, max);\n // If don't Store min max when collapse the root node after roam,\n // the root node will disappear.\n var oldMin = this._min;\n var oldMax = this._max;\n // If width or height is 0\n if (max[0] - min[0] === 0) {\n min[0] = oldMin ? oldMin[0] : min[0] - 1;\n max[0] = oldMax ? oldMax[0] : max[0] + 1;\n }\n if (max[1] - min[1] === 0) {\n min[1] = oldMin ? oldMin[1] : min[1] - 1;\n max[1] = oldMax ? oldMax[1] : max[1] + 1;\n }\n var viewCoordSys = seriesModel.coordinateSystem = new View();\n viewCoordSys.zoomLimit = seriesModel.get('scaleLimit');\n viewCoordSys.setBoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n viewCoordSys.setCenter(seriesModel.get('center'), api);\n viewCoordSys.setZoom(seriesModel.get('zoom'));\n // Here we use viewCoordSys just for computing the 'position' and 'scale' of the group\n this.group.attr({\n x: viewCoordSys.x,\n y: viewCoordSys.y,\n scaleX: viewCoordSys.scaleX,\n scaleY: viewCoordSys.scaleY\n });\n this._min = min;\n this._max = max;\n };\n TreeView.prototype._updateController = function (seriesModel, ecModel, api) {\n var _this = this;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n var group = this.group;\n controller.setPointerChecker(function (e, x, y) {\n var rect = group.getBoundingRect();\n rect.applyTransform(group.transform);\n return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel);\n });\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n controller.off('pan').off('zoom').on('pan', function (e) {\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'treeRoam',\n dx: e.dx,\n dy: e.dy\n });\n }).on('zoom', function (e) {\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'treeRoam',\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n });\n _this._updateNodeAndLinkScale(seriesModel);\n // Only update label layout on zoom\n api.updateLabelLayout();\n });\n };\n TreeView.prototype._updateNodeAndLinkScale = function (seriesModel) {\n var data = seriesModel.getData();\n var nodeScale = this._getNodeGlobalScale(seriesModel);\n data.eachItemGraphicEl(function (el, idx) {\n el.setSymbolScale(nodeScale);\n });\n };\n TreeView.prototype._getNodeGlobalScale = function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type !== 'view') {\n return 1;\n }\n var nodeScaleRatio = this._nodeScaleRatio;\n var groupZoom = coordSys.scaleX || 1;\n // Scale node when zoom changes\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n return nodeScale / groupZoom;\n };\n TreeView.prototype.dispose = function () {\n this._controller && this._controller.dispose();\n this._controllerHost = null;\n };\n TreeView.prototype.remove = function () {\n this._mainGroup.removeAll();\n this._data = null;\n };\n TreeView.type = 'tree';\n return TreeView;\n}(ChartView);\nfunction symbolNeedsDraw(data, dataIndex) {\n var layout = data.getItemLayout(dataIndex);\n return layout && !isNaN(layout.x) && !isNaN(layout.y);\n}\nfunction updateNode(data, dataIndex, symbolEl, group, seriesModel) {\n var isInit = !symbolEl;\n var node = data.tree.getNodeByDataIndex(dataIndex);\n var itemModel = node.getModel();\n var visualColor = node.getVisual('style').fill;\n var symbolInnerColor = node.isExpand === false && node.children.length !== 0 ? visualColor : '#fff';\n var virtualRoot = data.tree.root;\n var source = node.parentNode === virtualRoot ? node : node.parentNode || node;\n var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex);\n var sourceLayout = source.getLayout();\n var sourceOldLayout = sourceSymbolEl ? {\n x: sourceSymbolEl.__oldX,\n y: sourceSymbolEl.__oldY,\n rawX: sourceSymbolEl.__radialOldRawX,\n rawY: sourceSymbolEl.__radialOldRawY\n } : sourceLayout;\n var targetLayout = node.getLayout();\n if (isInit) {\n symbolEl = new SymbolClz(data, dataIndex, null, {\n symbolInnerColor: symbolInnerColor,\n useNameLabel: true\n });\n symbolEl.x = sourceOldLayout.x;\n symbolEl.y = sourceOldLayout.y;\n } else {\n symbolEl.updateData(data, dataIndex, null, {\n symbolInnerColor: symbolInnerColor,\n useNameLabel: true\n });\n }\n symbolEl.__radialOldRawX = symbolEl.__radialRawX;\n symbolEl.__radialOldRawY = symbolEl.__radialRawY;\n symbolEl.__radialRawX = targetLayout.rawX;\n symbolEl.__radialRawY = targetLayout.rawY;\n group.add(symbolEl);\n data.setItemGraphicEl(dataIndex, symbolEl);\n symbolEl.__oldX = symbolEl.x;\n symbolEl.__oldY = symbolEl.y;\n graphic.updateProps(symbolEl, {\n x: targetLayout.x,\n y: targetLayout.y\n }, seriesModel);\n var symbolPath = symbolEl.getSymbolPath();\n if (seriesModel.get('layout') === 'radial') {\n var realRoot = virtualRoot.children[0];\n var rootLayout = realRoot.getLayout();\n var length_1 = realRoot.children.length;\n var rad = void 0;\n var isLeft = void 0;\n if (targetLayout.x === rootLayout.x && node.isExpand === true && realRoot.children.length) {\n var center = {\n x: (realRoot.children[0].getLayout().x + realRoot.children[length_1 - 1].getLayout().x) / 2,\n y: (realRoot.children[0].getLayout().y + realRoot.children[length_1 - 1].getLayout().y) / 2\n };\n rad = Math.atan2(center.y - rootLayout.y, center.x - rootLayout.x);\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n isLeft = center.x < rootLayout.x;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n } else {\n rad = Math.atan2(targetLayout.y - rootLayout.y, targetLayout.x - rootLayout.x);\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n if (node.children.length === 0 || node.children.length !== 0 && node.isExpand === false) {\n isLeft = targetLayout.x < rootLayout.x;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n } else {\n isLeft = targetLayout.x > rootLayout.x;\n if (!isLeft) {\n rad = rad - Math.PI;\n }\n }\n }\n var textPosition = isLeft ? 'left' : 'right';\n var normalLabelModel = itemModel.getModel('label');\n var rotate = normalLabelModel.get('rotate');\n var labelRotateRadian = rotate * (Math.PI / 180);\n var textContent = symbolPath.getTextContent();\n if (textContent) {\n symbolPath.setTextConfig({\n position: normalLabelModel.get('position') || textPosition,\n rotation: rotate == null ? -rad : labelRotateRadian,\n origin: 'center'\n });\n textContent.setStyle('verticalAlign', 'middle');\n }\n }\n // Handle status\n var focus = itemModel.get(['emphasis', 'focus']);\n var focusDataIndices = focus === 'relative' ? zrUtil.concatArray(node.getAncestorsIndices(), node.getDescendantIndices()) : focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : null;\n if (focusDataIndices) {\n // Modify the focus to data indices.\n getECData(symbolEl).focus = focusDataIndices;\n }\n drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group);\n if (symbolEl.__edge) {\n symbolEl.onHoverStateChange = function (toState) {\n if (toState !== 'blur') {\n // NOTE: Ensure the parent elements will been blurred firstly.\n // According to the return of getAncestorsIndices and getDescendantIndices\n // TODO: A bit tricky.\n var parentEl = node.parentNode && data.getItemGraphicEl(node.parentNode.dataIndex);\n if (!(parentEl && parentEl.hoverState === HOVER_STATE_BLUR)) {\n setStatesFlag(symbolEl.__edge, toState);\n }\n }\n };\n }\n}\nfunction drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group) {\n var itemModel = node.getModel();\n var edgeShape = seriesModel.get('edgeShape');\n var layout = seriesModel.get('layout');\n var orient = seriesModel.getOrient();\n var curvature = seriesModel.get(['lineStyle', 'curveness']);\n var edgeForkPosition = seriesModel.get('edgeForkPosition');\n var lineStyle = itemModel.getModel('lineStyle').getLineStyle();\n var edge = symbolEl.__edge;\n // curve edge from node -> parent\n // polyline edge from node -> children\n if (edgeShape === 'curve') {\n if (node.parentNode && node.parentNode !== virtualRoot) {\n if (!edge) {\n edge = symbolEl.__edge = new graphic.BezierCurve({\n shape: getEdgeShape(layout, orient, curvature, sourceOldLayout, sourceOldLayout)\n });\n }\n graphic.updateProps(edge, {\n shape: getEdgeShape(layout, orient, curvature, sourceLayout, targetLayout)\n }, seriesModel);\n }\n } else if (edgeShape === 'polyline') {\n if (layout === 'orthogonal') {\n if (node !== virtualRoot && node.children && node.children.length !== 0 && node.isExpand === true) {\n var children = node.children;\n var childPoints = [];\n for (var i = 0; i < children.length; i++) {\n var childLayout = children[i].getLayout();\n childPoints.push([childLayout.x, childLayout.y]);\n }\n if (!edge) {\n edge = symbolEl.__edge = new TreePath({\n shape: {\n parentPoint: [targetLayout.x, targetLayout.y],\n childPoints: [[targetLayout.x, targetLayout.y]],\n orient: orient,\n forkPosition: edgeForkPosition\n }\n });\n }\n graphic.updateProps(edge, {\n shape: {\n parentPoint: [targetLayout.x, targetLayout.y],\n childPoints: childPoints\n }\n }, seriesModel);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('The polyline edgeShape can only be used in orthogonal layout');\n }\n }\n }\n // show all edge when edgeShape is 'curve', filter node `isExpand` is false when edgeShape is 'polyline'\n if (edge && !(edgeShape === 'polyline' && !node.isExpand)) {\n edge.useStyle(zrUtil.defaults({\n strokeNoScale: true,\n fill: null\n }, lineStyle));\n setStatesStylesFromModel(edge, itemModel, 'lineStyle');\n setDefaultStateProxy(edge);\n group.add(edge);\n }\n}\nfunction removeNodeEdge(node, data, group, seriesModel, removeAnimationOpt) {\n var virtualRoot = data.tree.root;\n var _a = getSourceNode(virtualRoot, node),\n source = _a.source,\n sourceLayout = _a.sourceLayout;\n var symbolEl = data.getItemGraphicEl(node.dataIndex);\n if (!symbolEl) {\n return;\n }\n var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex);\n var sourceEdge = sourceSymbolEl.__edge;\n // 1. when expand the sub tree, delete the children node should delete the edge of\n // the source at the same time. because the polyline edge shape is only owned by the source.\n // 2.when the node is the only children of the source, delete the node should delete the edge of\n // the source at the same time. the same reason as above.\n var edge = symbolEl.__edge || (source.isExpand === false || source.children.length === 1 ? sourceEdge : undefined);\n var edgeShape = seriesModel.get('edgeShape');\n var layoutOpt = seriesModel.get('layout');\n var orient = seriesModel.get('orient');\n var curvature = seriesModel.get(['lineStyle', 'curveness']);\n if (edge) {\n if (edgeShape === 'curve') {\n graphic.removeElement(edge, {\n shape: getEdgeShape(layoutOpt, orient, curvature, sourceLayout, sourceLayout),\n style: {\n opacity: 0\n }\n }, seriesModel, {\n cb: function () {\n group.remove(edge);\n },\n removeOpt: removeAnimationOpt\n });\n } else if (edgeShape === 'polyline' && seriesModel.get('layout') === 'orthogonal') {\n graphic.removeElement(edge, {\n shape: {\n parentPoint: [sourceLayout.x, sourceLayout.y],\n childPoints: [[sourceLayout.x, sourceLayout.y]]\n },\n style: {\n opacity: 0\n }\n }, seriesModel, {\n cb: function () {\n group.remove(edge);\n },\n removeOpt: removeAnimationOpt\n });\n }\n }\n}\nfunction getSourceNode(virtualRoot, node) {\n var source = node.parentNode === virtualRoot ? node : node.parentNode || node;\n var sourceLayout;\n while (sourceLayout = source.getLayout(), sourceLayout == null) {\n source = source.parentNode === virtualRoot ? source : source.parentNode || source;\n }\n return {\n source: source,\n sourceLayout: sourceLayout\n };\n}\nfunction removeNode(data, dataIndex, symbolEl, group, seriesModel) {\n var node = data.tree.getNodeByDataIndex(dataIndex);\n var virtualRoot = data.tree.root;\n var sourceLayout = getSourceNode(virtualRoot, node).sourceLayout;\n // Use same duration and easing with update to have more consistent animation.\n var removeAnimationOpt = {\n duration: seriesModel.get('animationDurationUpdate'),\n easing: seriesModel.get('animationEasingUpdate')\n };\n graphic.removeElement(symbolEl, {\n x: sourceLayout.x + 1,\n y: sourceLayout.y + 1\n }, seriesModel, {\n cb: function () {\n group.remove(symbolEl);\n data.setItemGraphicEl(dataIndex, null);\n },\n removeOpt: removeAnimationOpt\n });\n symbolEl.fadeOut(null, data.hostModel, {\n fadeLabel: true,\n animation: removeAnimationOpt\n });\n // remove edge as parent node\n node.children.forEach(function (childNode) {\n removeNodeEdge(childNode, data, group, seriesModel, removeAnimationOpt);\n });\n // remove edge as child node\n removeNodeEdge(node, data, group, seriesModel, removeAnimationOpt);\n}\nfunction getEdgeShape(layoutOpt, orient, curvature, sourceLayout, targetLayout) {\n var cpx1;\n var cpy1;\n var cpx2;\n var cpy2;\n var x1;\n var x2;\n var y1;\n var y2;\n if (layoutOpt === 'radial') {\n x1 = sourceLayout.rawX;\n y1 = sourceLayout.rawY;\n x2 = targetLayout.rawX;\n y2 = targetLayout.rawY;\n var radialCoor1 = radialCoordinate(x1, y1);\n var radialCoor2 = radialCoordinate(x1, y1 + (y2 - y1) * curvature);\n var radialCoor3 = radialCoordinate(x2, y2 + (y1 - y2) * curvature);\n var radialCoor4 = radialCoordinate(x2, y2);\n return {\n x1: radialCoor1.x || 0,\n y1: radialCoor1.y || 0,\n x2: radialCoor4.x || 0,\n y2: radialCoor4.y || 0,\n cpx1: radialCoor2.x || 0,\n cpy1: radialCoor2.y || 0,\n cpx2: radialCoor3.x || 0,\n cpy2: radialCoor3.y || 0\n };\n } else {\n x1 = sourceLayout.x;\n y1 = sourceLayout.y;\n x2 = targetLayout.x;\n y2 = targetLayout.y;\n if (orient === 'LR' || orient === 'RL') {\n cpx1 = x1 + (x2 - x1) * curvature;\n cpy1 = y1;\n cpx2 = x2 + (x1 - x2) * curvature;\n cpy2 = y2;\n }\n if (orient === 'TB' || orient === 'BT') {\n cpx1 = x1;\n cpy1 = y1 + (y2 - y1) * curvature;\n cpx2 = x2;\n cpy2 = y2 + (y1 - y2) * curvature;\n }\n }\n return {\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n cpx1: cpx1,\n cpy1: cpy1,\n cpx2: cpx2,\n cpy2: cpy2\n };\n}\nexport default TreeView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Link lists and struct (graph or tree)\n */\nimport { curry, each, assert, extend, map, keys } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nfunction linkSeriesData(opt) {\n var mainData = opt.mainData;\n var datas = opt.datas;\n if (!datas) {\n datas = {\n main: mainData\n };\n opt.datasAttr = {\n main: 'data'\n };\n }\n opt.datas = opt.mainData = null;\n linkAll(mainData, datas, opt);\n // Porxy data original methods.\n each(datas, function (data) {\n each(mainData.TRANSFERABLE_METHODS, function (methodName) {\n data.wrapMethod(methodName, curry(transferInjection, opt));\n });\n });\n // Beyond transfer, additional features should be added to `cloneShallow`.\n mainData.wrapMethod('cloneShallow', curry(cloneShallowInjection, opt));\n // Only mainData trigger change, because struct.update may trigger\n // another changable methods, which may bring about dead lock.\n each(mainData.CHANGABLE_METHODS, function (methodName) {\n mainData.wrapMethod(methodName, curry(changeInjection, opt));\n });\n // Make sure datas contains mainData.\n assert(datas[mainData.dataType] === mainData);\n}\nfunction transferInjection(opt, res) {\n if (isMainData(this)) {\n // Transfer datas to new main data.\n var datas = extend({}, inner(this).datas);\n datas[this.dataType] = res;\n linkAll(res, datas, opt);\n } else {\n // Modify the reference in main data to point newData.\n linkSingle(res, this.dataType, inner(this).mainData, opt);\n }\n return res;\n}\nfunction changeInjection(opt, res) {\n opt.struct && opt.struct.update();\n return res;\n}\nfunction cloneShallowInjection(opt, res) {\n // cloneShallow, which brings about some fragilities, may be inappropriate\n // to be exposed as an API. So for implementation simplicity we can make\n // the restriction that cloneShallow of not-mainData should not be invoked\n // outside, but only be invoked here.\n each(inner(res).datas, function (data, dataType) {\n data !== res && linkSingle(data.cloneShallow(), dataType, res, opt);\n });\n return res;\n}\n/**\n * Supplement method to List.\n *\n * @public\n * @param [dataType] If not specified, return mainData.\n */\nfunction getLinkedData(dataType) {\n var mainData = inner(this).mainData;\n return dataType == null || mainData == null ? mainData : inner(mainData).datas[dataType];\n}\n/**\n * Get list of all linked data\n */\nfunction getLinkedDataAll() {\n var mainData = inner(this).mainData;\n return mainData == null ? [{\n data: mainData\n }] : map(keys(inner(mainData).datas), function (type) {\n return {\n type: type,\n data: inner(mainData).datas[type]\n };\n });\n}\nfunction isMainData(data) {\n return inner(data).mainData === data;\n}\nfunction linkAll(mainData, datas, opt) {\n inner(mainData).datas = {};\n each(datas, function (data, dataType) {\n linkSingle(data, dataType, mainData, opt);\n });\n}\nfunction linkSingle(data, dataType, mainData, opt) {\n inner(mainData).datas[dataType] = data;\n inner(data).mainData = mainData;\n data.dataType = dataType;\n if (opt.struct) {\n data[opt.structAttr] = opt.struct;\n opt.struct[opt.datasAttr[dataType]] = data;\n }\n // Supplement method.\n data.getLinkedData = getLinkedData;\n data.getLinkedDataAll = getLinkedDataAll;\n}\nexport default linkSeriesData;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Tree data structure\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport linkSeriesData from './helper/linkSeriesData.js';\nimport SeriesData from './SeriesData.js';\nimport prepareSeriesDataSchema from './helper/createDimensions.js';\nimport { convertOptionIdName } from '../util/model.js';\nvar TreeNode = /** @class */function () {\n function TreeNode(name, hostTree) {\n this.depth = 0;\n this.height = 0;\n /**\n * Reference to list item.\n * Do not persistent dataIndex outside,\n * besause it may be changed by list.\n * If dataIndex -1,\n * this node is logical deleted (filtered) in list.\n */\n this.dataIndex = -1;\n this.children = [];\n this.viewChildren = [];\n this.isExpand = false;\n this.name = name || '';\n this.hostTree = hostTree;\n }\n /**\n * The node is removed.\n */\n TreeNode.prototype.isRemoved = function () {\n return this.dataIndex < 0;\n };\n TreeNode.prototype.eachNode = function (options, cb, context) {\n if (zrUtil.isFunction(options)) {\n context = cb;\n cb = options;\n options = null;\n }\n options = options || {};\n if (zrUtil.isString(options)) {\n options = {\n order: options\n };\n }\n var order = options.order || 'preorder';\n var children = this[options.attr || 'children'];\n var suppressVisitSub;\n order === 'preorder' && (suppressVisitSub = cb.call(context, this));\n for (var i = 0; !suppressVisitSub && i < children.length; i++) {\n children[i].eachNode(options, cb, context);\n }\n order === 'postorder' && cb.call(context, this);\n };\n /**\n * Update depth and height of this subtree.\n */\n TreeNode.prototype.updateDepthAndHeight = function (depth) {\n var height = 0;\n this.depth = depth;\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n child.updateDepthAndHeight(depth + 1);\n if (child.height > height) {\n height = child.height;\n }\n }\n this.height = height + 1;\n };\n TreeNode.prototype.getNodeById = function (id) {\n if (this.getId() === id) {\n return this;\n }\n for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].getNodeById(id);\n if (res) {\n return res;\n }\n }\n };\n TreeNode.prototype.contains = function (node) {\n if (node === this) {\n return true;\n }\n for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].contains(node);\n if (res) {\n return res;\n }\n }\n };\n /**\n * @param includeSelf Default false.\n * @return order: [root, child, grandchild, ...]\n */\n TreeNode.prototype.getAncestors = function (includeSelf) {\n var ancestors = [];\n var node = includeSelf ? this : this.parentNode;\n while (node) {\n ancestors.push(node);\n node = node.parentNode;\n }\n ancestors.reverse();\n return ancestors;\n };\n TreeNode.prototype.getAncestorsIndices = function () {\n var indices = [];\n var currNode = this;\n while (currNode) {\n indices.push(currNode.dataIndex);\n currNode = currNode.parentNode;\n }\n indices.reverse();\n return indices;\n };\n TreeNode.prototype.getDescendantIndices = function () {\n var indices = [];\n this.eachNode(function (childNode) {\n indices.push(childNode.dataIndex);\n });\n return indices;\n };\n TreeNode.prototype.getValue = function (dimension) {\n var data = this.hostTree.data;\n return data.getStore().get(data.getDimensionIndex(dimension || 'value'), this.dataIndex);\n };\n TreeNode.prototype.setLayout = function (layout, merge) {\n this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge);\n };\n /**\n * @return {Object} layout\n */\n TreeNode.prototype.getLayout = function () {\n return this.hostTree.data.getItemLayout(this.dataIndex);\n };\n // @depcrecated\n // getModel(path: S): Model\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n TreeNode.prototype.getModel = function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n var hostTree = this.hostTree;\n var itemModel = hostTree.data.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n };\n // TODO: TYPE More specific model\n TreeNode.prototype.getLevelModel = function () {\n return (this.hostTree.levelModels || [])[this.depth];\n };\n TreeNode.prototype.setVisual = function (key, value) {\n this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value);\n };\n /**\n * Get item visual\n * FIXME: make return type better\n */\n TreeNode.prototype.getVisual = function (key) {\n return this.hostTree.data.getItemVisual(this.dataIndex, key);\n };\n TreeNode.prototype.getRawIndex = function () {\n return this.hostTree.data.getRawIndex(this.dataIndex);\n };\n TreeNode.prototype.getId = function () {\n return this.hostTree.data.getId(this.dataIndex);\n };\n /**\n * index in parent's children\n */\n TreeNode.prototype.getChildIndex = function () {\n if (this.parentNode) {\n var children = this.parentNode.children;\n for (var i = 0; i < children.length; ++i) {\n if (children[i] === this) {\n return i;\n }\n }\n return -1;\n }\n return -1;\n };\n /**\n * if this is an ancestor of another node\n *\n * @param node another node\n * @return if is ancestor\n */\n TreeNode.prototype.isAncestorOf = function (node) {\n var parent = node.parentNode;\n while (parent) {\n if (parent === this) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n };\n /**\n * if this is an descendant of another node\n *\n * @param node another node\n * @return if is descendant\n */\n TreeNode.prototype.isDescendantOf = function (node) {\n return node !== this && node.isAncestorOf(this);\n };\n return TreeNode;\n}();\nexport { TreeNode };\n;\nvar Tree = /** @class */function () {\n function Tree(hostModel) {\n this.type = 'tree';\n this._nodes = [];\n this.hostModel = hostModel;\n }\n Tree.prototype.eachNode = function (options, cb, context) {\n this.root.eachNode(options, cb, context);\n };\n Tree.prototype.getNodeByDataIndex = function (dataIndex) {\n var rawIndex = this.data.getRawIndex(dataIndex);\n return this._nodes[rawIndex];\n };\n Tree.prototype.getNodeById = function (name) {\n return this.root.getNodeById(name);\n };\n /**\n * Update item available by list,\n * when list has been performed options like 'filterSelf' or 'map'.\n */\n Tree.prototype.update = function () {\n var data = this.data;\n var nodes = this._nodes;\n for (var i = 0, len = nodes.length; i < len; i++) {\n nodes[i].dataIndex = -1;\n }\n for (var i = 0, len = data.count(); i < len; i++) {\n nodes[data.getRawIndex(i)].dataIndex = i;\n }\n };\n /**\n * Clear all layouts\n */\n Tree.prototype.clearLayouts = function () {\n this.data.clearItemLayouts();\n };\n /**\n * data node format:\n * {\n * name: ...\n * value: ...\n * children: [\n * {\n * name: ...\n * value: ...\n * children: ...\n * },\n * ...\n * ]\n * }\n */\n Tree.createTree = function (dataRoot, hostModel, beforeLink) {\n var tree = new Tree(hostModel);\n var listData = [];\n var dimMax = 1;\n buildHierarchy(dataRoot);\n function buildHierarchy(dataNode, parentNode) {\n var value = dataNode.value;\n dimMax = Math.max(dimMax, zrUtil.isArray(value) ? value.length : 1);\n listData.push(dataNode);\n var node = new TreeNode(convertOptionIdName(dataNode.name, ''), tree);\n parentNode ? addChild(node, parentNode) : tree.root = node;\n tree._nodes.push(node);\n var children = dataNode.children;\n if (children) {\n for (var i = 0; i < children.length; i++) {\n buildHierarchy(children[i], node);\n }\n }\n }\n tree.root.updateDepthAndHeight(0);\n var dimensions = prepareSeriesDataSchema(listData, {\n coordDimensions: ['value'],\n dimensionsCount: dimMax\n }).dimensions;\n var list = new SeriesData(dimensions, hostModel);\n list.initData(listData);\n beforeLink && beforeLink(list);\n linkSeriesData({\n mainData: list,\n struct: tree,\n structAttr: 'tree'\n });\n tree.update();\n return tree;\n };\n return Tree;\n}();\n/**\n * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote,\n * so this function is not ready and not necessary to be public.\n */\nfunction addChild(child, node) {\n var children = node.children;\n if (child.parentNode === node) {\n return;\n }\n children.push(child);\n child.parentNode = node;\n}\nexport default Tree;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport function retrieveTargetInfo(payload, validPayloadTypes, seriesModel) {\n if (payload && zrUtil.indexOf(validPayloadTypes, payload.type) >= 0) {\n var root = seriesModel.getData().tree.root;\n var targetNode = payload.targetNode;\n if (zrUtil.isString(targetNode)) {\n targetNode = root.getNodeById(targetNode);\n }\n if (targetNode && root.contains(targetNode)) {\n return {\n node: targetNode\n };\n }\n var targetNodeId = payload.targetNodeId;\n if (targetNodeId != null && (targetNode = root.getNodeById(targetNodeId))) {\n return {\n node: targetNode\n };\n }\n }\n}\n// Not includes the given node at the last item.\nexport function getPathToRoot(node) {\n var path = [];\n while (node) {\n node = node.parentNode;\n node && path.push(node);\n }\n return path.reverse();\n}\nexport function aboveViewRoot(viewRoot, node) {\n var viewPath = getPathToRoot(viewRoot);\n return zrUtil.indexOf(viewPath, node) >= 0;\n}\n// From root to the input node (the input node will be included).\nexport function wrapTreePathInfo(node, seriesModel) {\n var treePathInfo = [];\n while (node) {\n var nodeDataIndex = node.dataIndex;\n treePathInfo.push({\n name: node.name,\n dataIndex: nodeDataIndex,\n value: seriesModel.getRawValue(nodeDataIndex)\n });\n node = node.parentNode;\n }\n treePathInfo.reverse();\n return treePathInfo;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport Tree from '../../data/Tree.js';\nimport Model from '../../model/Model.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nvar TreeSeriesModel = /** @class */function (_super) {\n __extends(TreeSeriesModel, _super);\n function TreeSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hasSymbolVisual = true;\n // Do it self.\n _this.ignoreStyleOnData = true;\n return _this;\n }\n /**\n * Init a tree data structure from data in option series\n */\n TreeSeriesModel.prototype.getInitialData = function (option) {\n // create a virtual root\n var root = {\n name: option.name,\n children: option.data\n };\n var leaves = option.leaves || {};\n var leavesModel = new Model(leaves, this, this.ecModel);\n var tree = Tree.createTree(root, this, beforeLink);\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n if (!(node && node.children.length && node.isExpand)) {\n model.parentModel = leavesModel;\n }\n return model;\n });\n }\n var treeDepth = 0;\n tree.eachNode('preorder', function (node) {\n if (node.depth > treeDepth) {\n treeDepth = node.depth;\n }\n });\n var expandAndCollapse = option.expandAndCollapse;\n var expandTreeDepth = expandAndCollapse && option.initialTreeDepth >= 0 ? option.initialTreeDepth : treeDepth;\n tree.root.eachNode('preorder', function (node) {\n var item = node.hostTree.data.getRawDataItem(node.dataIndex);\n // Add item.collapsed != null, because users can collapse node original in the series.data.\n node.isExpand = item && item.collapsed != null ? !item.collapsed : node.depth <= expandTreeDepth;\n });\n return tree.data;\n };\n /**\n * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'.\n * @returns {string} orient\n */\n TreeSeriesModel.prototype.getOrient = function () {\n var orient = this.get('orient');\n if (orient === 'horizontal') {\n orient = 'LR';\n } else if (orient === 'vertical') {\n orient = 'TB';\n }\n return orient;\n };\n TreeSeriesModel.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n TreeSeriesModel.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n TreeSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var tree = this.getData().tree;\n var realRoot = tree.root.children[0];\n var node = tree.getNodeByDataIndex(dataIndex);\n var value = node.getValue();\n var name = node.name;\n while (node && node !== realRoot) {\n name = node.parentNode.name + '.' + name;\n node = node.parentNode;\n }\n return createTooltipMarkup('nameValue', {\n name: name,\n value: value,\n noValue: isNaN(value) || value == null\n });\n };\n // Add tree path to tooltip param\n TreeSeriesModel.prototype.getDataParams = function (dataIndex) {\n var params = _super.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treeAncestors = wrapTreePathInfo(node, this);\n params.collapsed = !node.isExpand;\n return params;\n };\n TreeSeriesModel.type = 'series.tree';\n // can support the position parameters 'left', 'top','right','bottom', 'width',\n // 'height' in the setOption() with 'merge' mode normal.\n TreeSeriesModel.layoutMode = 'box';\n TreeSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n // the position of the whole view\n left: '12%',\n top: '12%',\n right: '12%',\n bottom: '12%',\n // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'\n layout: 'orthogonal',\n // value can be 'polyline'\n edgeShape: 'curve',\n edgeForkPosition: '50%',\n // true | false | 'move' | 'scale', see module:component/helper/RoamController.\n roam: false,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.4,\n // Default on center of graph\n center: null,\n zoom: 1,\n orient: 'LR',\n symbol: 'emptyCircle',\n symbolSize: 7,\n expandAndCollapse: true,\n initialTreeDepth: 2,\n lineStyle: {\n color: '#ccc',\n width: 1.5,\n curveness: 0.5\n },\n itemStyle: {\n color: 'lightsteelblue',\n // borderColor: '#c23531',\n borderWidth: 1.5\n },\n label: {\n show: true\n },\n animationEasing: 'linear',\n animationDuration: 700,\n animationDurationUpdate: 500\n };\n return TreeSeriesModel;\n}(SeriesModel);\nexport default TreeSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Traverse the tree from bottom to top and do something\n */\nfunction eachAfter(root, callback, separation) {\n var nodes = [root];\n var next = [];\n var node;\n while (node = nodes.pop()) {\n // jshint ignore:line\n next.push(node);\n if (node.isExpand) {\n var children = node.children;\n if (children.length) {\n for (var i = 0; i < children.length; i++) {\n nodes.push(children[i]);\n }\n }\n }\n }\n while (node = next.pop()) {\n // jshint ignore:line\n callback(node, separation);\n }\n}\n/**\n * Traverse the tree from top to bottom and do something\n */\nfunction eachBefore(root, callback) {\n var nodes = [root];\n var node;\n while (node = nodes.pop()) {\n // jshint ignore:line\n callback(node);\n if (node.isExpand) {\n var children = node.children;\n if (children.length) {\n for (var i = children.length - 1; i >= 0; i--) {\n nodes.push(children[i]);\n }\n }\n }\n }\n}\nexport { eachAfter, eachBefore };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { eachAfter, eachBefore } from './traversalHelper.js';\nimport { init, firstWalk, secondWalk, separation as sep, radialCoordinate, getViewRect } from './layoutHelper.js';\nexport default function treeLayout(ecModel, api) {\n ecModel.eachSeriesByType('tree', function (seriesModel) {\n commonLayout(seriesModel, api);\n });\n}\nfunction commonLayout(seriesModel, api) {\n var layoutInfo = getViewRect(seriesModel, api);\n seriesModel.layoutInfo = layoutInfo;\n var layout = seriesModel.get('layout');\n var width = 0;\n var height = 0;\n var separation = null;\n if (layout === 'radial') {\n width = 2 * Math.PI;\n height = Math.min(layoutInfo.height, layoutInfo.width) / 2;\n separation = sep(function (node1, node2) {\n return (node1.parentNode === node2.parentNode ? 1 : 2) / node1.depth;\n });\n } else {\n width = layoutInfo.width;\n height = layoutInfo.height;\n separation = sep();\n }\n var virtualRoot = seriesModel.getData().tree.root;\n var realRoot = virtualRoot.children[0];\n if (realRoot) {\n init(virtualRoot);\n eachAfter(realRoot, firstWalk, separation);\n virtualRoot.hierNode.modifier = -realRoot.hierNode.prelim;\n eachBefore(realRoot, secondWalk);\n var left_1 = realRoot;\n var right_1 = realRoot;\n var bottom_1 = realRoot;\n eachBefore(realRoot, function (node) {\n var x = node.getLayout().x;\n if (x < left_1.getLayout().x) {\n left_1 = node;\n }\n if (x > right_1.getLayout().x) {\n right_1 = node;\n }\n if (node.depth > bottom_1.depth) {\n bottom_1 = node;\n }\n });\n var delta = left_1 === right_1 ? 1 : separation(left_1, right_1) / 2;\n var tx_1 = delta - left_1.getLayout().x;\n var kx_1 = 0;\n var ky_1 = 0;\n var coorX_1 = 0;\n var coorY_1 = 0;\n if (layout === 'radial') {\n kx_1 = width / (right_1.getLayout().x + delta + tx_1);\n // here we use (node.depth - 1), bucause the real root's depth is 1\n ky_1 = height / (bottom_1.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorX_1 = (node.getLayout().x + tx_1) * kx_1;\n coorY_1 = (node.depth - 1) * ky_1;\n var finalCoor = radialCoordinate(coorX_1, coorY_1);\n node.setLayout({\n x: finalCoor.x,\n y: finalCoor.y,\n rawX: coorX_1,\n rawY: coorY_1\n }, true);\n });\n } else {\n var orient_1 = seriesModel.getOrient();\n if (orient_1 === 'RL' || orient_1 === 'LR') {\n ky_1 = height / (right_1.getLayout().x + delta + tx_1);\n kx_1 = width / (bottom_1.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorY_1 = (node.getLayout().x + tx_1) * ky_1;\n coorX_1 = orient_1 === 'LR' ? (node.depth - 1) * kx_1 : width - (node.depth - 1) * kx_1;\n node.setLayout({\n x: coorX_1,\n y: coorY_1\n }, true);\n });\n } else if (orient_1 === 'TB' || orient_1 === 'BT') {\n kx_1 = width / (right_1.getLayout().x + delta + tx_1);\n ky_1 = height / (bottom_1.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorX_1 = (node.getLayout().x + tx_1) * kx_1;\n coorY_1 = orient_1 === 'TB' ? (node.depth - 1) * ky_1 : height - (node.depth - 1) * ky_1;\n node.setLayout({\n x: coorX_1,\n y: coorY_1\n }, true);\n });\n }\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend } from 'zrender/lib/core/util.js';\nexport default function treeVisual(ecModel) {\n ecModel.eachSeriesByType('tree', function (seriesModel) {\n var data = seriesModel.getData();\n var tree = data.tree;\n tree.eachNode(function (node) {\n var model = node.getModel();\n // TODO Optimize\n var style = model.getModel('itemStyle').getItemStyle();\n var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style');\n extend(existsStyle, style);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { updateCenterAndZoom } from '../../action/roamHelper.js';\nexport function installTreeAction(registers) {\n registers.registerAction({\n type: 'treeExpandAndCollapse',\n event: 'treeExpandAndCollapse',\n update: 'update'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'tree',\n query: payload\n }, function (seriesModel) {\n var dataIndex = payload.dataIndex;\n var tree = seriesModel.getData().tree;\n var node = tree.getNodeByDataIndex(dataIndex);\n node.isExpand = !node.isExpand;\n });\n });\n registers.registerAction({\n type: 'treeRoam',\n event: 'treeRoam',\n // Here we set 'none' instead of 'update', because roam action\n // just need to update the transform matrix without having to recalculate\n // the layout. So don't need to go through the whole update process, such\n // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.\n update: 'none'\n }, function (payload, ecModel, api) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'tree',\n query: payload\n }, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var res = updateCenterAndZoom(coordSys, payload, undefined, api);\n seriesModel.setCenter && seriesModel.setCenter(res.center);\n seriesModel.setZoom && seriesModel.setZoom(res.zoom);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport TreeView from './TreeView.js';\nimport TreeSeriesModel from './TreeSeries.js';\nimport treeLayout from './treeLayout.js';\nimport treeVisual from './treeVisual.js';\nimport { installTreeAction } from './treeAction.js';\nexport function install(registers) {\n registers.registerChartView(TreeView);\n registers.registerSeriesModel(TreeSeriesModel);\n registers.registerLayout(treeLayout);\n registers.registerVisual(treeVisual);\n installTreeAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as helper from '../helper/treeHelper.js';\nimport { noop } from 'zrender/lib/core/util.js';\nvar actionTypes = ['treemapZoomToNode', 'treemapRender', 'treemapMove'];\nexport function installTreemapAction(registers) {\n for (var i = 0; i < actionTypes.length; i++) {\n registers.registerAction({\n type: actionTypes[i],\n update: 'updateView'\n }, noop);\n }\n registers.registerAction({\n type: 'treemapRootToNode',\n update: 'updateView'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n }, handleRootToNode);\n function handleRootToNode(model, index) {\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, model);\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n if (originViewRoot) {\n payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown';\n }\n model.resetViewRoot(targetInfo.node);\n }\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getDecalFromPalette } from '../../model/mixin/palette.js';\nexport default function enableAriaDecalForTree(seriesModel) {\n var data = seriesModel.getData();\n var tree = data.tree;\n var decalPaletteScope = {};\n tree.eachNode(function (node) {\n // Use decal of level 1 node\n var current = node;\n while (current && current.depth > 1) {\n current = current.parentNode;\n }\n var decal = getDecalFromPalette(seriesModel.ecModel, current.name || current.dataIndex + '', decalPaletteScope);\n node.setVisual('decal', decal);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesModel from '../../model/Series.js';\nimport Tree from '../../data/Tree.js';\nimport Model from '../../model/Model.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nimport { normalizeToArray } from '../../util/model.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport enableAriaDecalForTree from '../helper/enableAriaDecalForTree.js';\nvar TreemapSeriesModel = /** @class */function (_super) {\n __extends(TreemapSeriesModel, _super);\n function TreemapSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TreemapSeriesModel.type;\n _this.preventUsingHoverLayer = true;\n return _this;\n }\n /**\n * @override\n */\n TreemapSeriesModel.prototype.getInitialData = function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levels = option.levels || [];\n // Used in \"visual priority\" in `treemapVisual.js`.\n // This way is a little tricky, must satisfy the precondition:\n // 1. There is no `treeNode.getModel('itemStyle.xxx')` used.\n // 2. The `Model.prototype.getModel()` will not use any clone-like way.\n var designatedVisualItemStyle = this.designatedVisualItemStyle = {};\n var designatedVisualModel = new Model({\n itemStyle: designatedVisualItemStyle\n }, this, ecModel);\n levels = option.levels = setDefault(levels, ecModel);\n var levelModels = zrUtil.map(levels || [], function (levelDefine) {\n return new Model(levelDefine, designatedVisualModel, ecModel);\n }, this);\n // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n var tree = Tree.createTree(root, this, beforeLink);\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = node ? levelModels[node.depth] : null;\n // If no levelModel, we also need `designatedVisualModel`.\n model.parentModel = levelModel || designatedVisualModel;\n return model;\n });\n }\n return tree.data;\n };\n TreemapSeriesModel.prototype.optionUpdated = function () {\n this.resetViewRoot();\n };\n /**\n * @override\n * @param {number} dataIndex\n * @param {boolean} [mutipleSeries=false]\n */\n TreemapSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var name = data.getName(dataIndex);\n return createTooltipMarkup('nameValue', {\n name: name,\n value: value\n });\n };\n /**\n * Add tree path to tooltip param\n *\n * @override\n * @param {number} dataIndex\n * @return {Object}\n */\n TreemapSeriesModel.prototype.getDataParams = function (dataIndex) {\n var params = _super.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treeAncestors = wrapTreePathInfo(node, this);\n // compatitable the previous code.\n params.treePathInfo = params.treeAncestors;\n return params;\n };\n /**\n * @public\n * @param {Object} layoutInfo {\n * x: containerGroup x\n * y: containerGroup y\n * width: containerGroup width\n * height: containerGroup height\n * }\n */\n TreemapSeriesModel.prototype.setLayoutInfo = function (layoutInfo) {\n /**\n * @readOnly\n * @type {Object}\n */\n this.layoutInfo = this.layoutInfo || {};\n zrUtil.extend(this.layoutInfo, layoutInfo);\n };\n /**\n * @param {string} id\n * @return {number} index\n */\n TreemapSeriesModel.prototype.mapIdToIndex = function (id) {\n // A feature is implemented:\n // index is monotone increasing with the sequence of\n // input id at the first time.\n // This feature can make sure that each data item and its\n // mapped color have the same index between data list and\n // color list at the beginning, which is useful for user\n // to adjust data-color mapping.\n /**\n * @private\n * @type {Object}\n */\n var idIndexMap = this._idIndexMap;\n if (!idIndexMap) {\n idIndexMap = this._idIndexMap = zrUtil.createHashMap();\n /**\n * @private\n * @type {number}\n */\n this._idIndexMapCount = 0;\n }\n var index = idIndexMap.get(id);\n if (index == null) {\n idIndexMap.set(id, index = this._idIndexMapCount++);\n }\n return index;\n };\n TreemapSeriesModel.prototype.getViewRoot = function () {\n return this._viewRoot;\n };\n TreemapSeriesModel.prototype.resetViewRoot = function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n };\n TreemapSeriesModel.prototype.enableAriaDecal = function () {\n enableAriaDecalForTree(this);\n };\n TreemapSeriesModel.type = 'series.treemap';\n TreemapSeriesModel.layoutMode = 'box';\n TreemapSeriesModel.defaultOption = {\n // Disable progressive rendering\n progressive: 0,\n // size: ['80%', '80%'], // deprecated, compatible with ec2.\n left: 'center',\n top: 'middle',\n width: '80%',\n height: '80%',\n sort: true,\n clipWindow: 'origin',\n squareRatio: 0.5 * (1 + Math.sqrt(5)),\n leafDepth: null,\n drillDownIcon: '▶',\n // to align specialized icon. ▷▶❒❐▼✚\n zoomToNodeRatio: 0.32 * 0.32,\n scaleLimit: null,\n roam: true,\n nodeClick: 'zoomToNode',\n animation: true,\n animationDurationUpdate: 900,\n animationEasing: 'quinticInOut',\n breadcrumb: {\n show: true,\n height: 22,\n left: 'center',\n top: 'bottom',\n // right\n // bottom\n emptyItemWidth: 25,\n itemStyle: {\n color: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#fff'\n }\n },\n emphasis: {\n itemStyle: {\n color: 'rgba(0,0,0,0.9)' // '#5793f3',\n }\n }\n },\n\n label: {\n show: true,\n // Do not use textDistance, for ellipsis rect just the same as treemap node rect.\n distance: 0,\n padding: 5,\n position: 'inside',\n // formatter: null,\n color: '#fff',\n overflow: 'truncate'\n // align\n // verticalAlign\n },\n\n upperLabel: {\n show: false,\n position: [0, '50%'],\n height: 20,\n // formatter: null,\n // color: '#fff',\n overflow: 'truncate',\n // align: null,\n verticalAlign: 'middle'\n },\n itemStyle: {\n color: null,\n colorAlpha: null,\n colorSaturation: null,\n borderWidth: 0,\n gapWidth: 0,\n borderColor: '#fff',\n borderColorSaturation: null // If specified, borderColor will be ineffective, and the\n // border color is evaluated by color of current node and\n // borderColorSaturation.\n },\n\n emphasis: {\n upperLabel: {\n show: true,\n position: [0, '50%'],\n overflow: 'truncate',\n verticalAlign: 'middle'\n }\n },\n visualDimension: 0,\n visualMin: null,\n visualMax: null,\n color: [],\n // level[n].color (if necessary).\n // + Specify color list of each level. level[0].color would be global\n // color list if not specified. (see method `setDefault`).\n // + But set as a empty array to forbid fetch color from global palette\n // when using nodeModel.get('color'), otherwise nodes on deep level\n // will always has color palette set and are not able to inherit color\n // from parent node.\n // + TreemapSeries.color can not be set as 'none', otherwise effect\n // legend color fetching (see seriesColor.js).\n colorAlpha: null,\n colorSaturation: null,\n colorMappingBy: 'index',\n visibleMin: 10,\n // be rendered. Only works when sort is 'asc' or 'desc'.\n childrenVisibleMin: null,\n // grandchildren will not show.\n // Why grandchildren? If not grandchildren but children,\n // some siblings show children and some not,\n // the appearance may be mess and not consistent,\n levels: [] // Each item: {\n // visibleMin, itemStyle, visualDimension, label\n // }\n };\n\n return TreemapSeriesModel;\n}(SeriesModel);\n/**\n * @param {Object} dataNode\n */\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value;\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n }\n // Value should not less than 0.\n if (thisValue < 0) {\n thisValue = 0;\n }\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\n/**\n * set default to level configuration\n */\nfunction setDefault(levels, ecModel) {\n var globalColorList = normalizeToArray(ecModel.get('color'));\n var globalDecalList = normalizeToArray(ecModel.get(['aria', 'decal', 'decals']));\n if (!globalColorList) {\n return;\n }\n levels = levels || [];\n var hasColorDefine;\n var hasDecalDefine;\n zrUtil.each(levels, function (levelDefine) {\n var model = new Model(levelDefine);\n var modelColor = model.get('color');\n var modelDecal = model.get('decal');\n if (model.get(['itemStyle', 'color']) || modelColor && modelColor !== 'none') {\n hasColorDefine = true;\n }\n if (model.get(['itemStyle', 'decal']) || modelDecal && modelDecal !== 'none') {\n hasDecalDefine = true;\n }\n });\n var level0 = levels[0] || (levels[0] = {});\n if (!hasColorDefine) {\n level0.color = globalColorList.slice();\n }\n if (!hasDecalDefine && globalDecalList) {\n level0.decal = globalDecalList.slice();\n }\n return levels;\n}\nexport default TreemapSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport * as layout from '../../util/layout.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nimport { curry, defaults } from 'zrender/lib/core/util.js';\nimport { convertOptionIdName } from '../../util/model.js';\nimport { toggleHoverEmphasis, Z2_EMPHASIS_LIFT } from '../../util/states.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nvar TEXT_PADDING = 8;\nvar ITEM_GAP = 8;\nvar ARRAY_LENGTH = 5;\nvar Breadcrumb = /** @class */function () {\n function Breadcrumb(containerGroup) {\n this.group = new graphic.Group();\n containerGroup.add(this.group);\n }\n Breadcrumb.prototype.render = function (seriesModel, api, targetNode, onSelect) {\n var model = seriesModel.getModel('breadcrumb');\n var thisGroup = this.group;\n thisGroup.removeAll();\n if (!model.get('show') || !targetNode) {\n return;\n }\n var normalStyleModel = model.getModel('itemStyle');\n var emphasisModel = model.getModel('emphasis');\n var textStyleModel = normalStyleModel.getModel('textStyle');\n var emphasisTextStyleModel = emphasisModel.getModel(['itemStyle', 'textStyle']);\n var layoutParam = {\n pos: {\n left: model.get('left'),\n right: model.get('right'),\n top: model.get('top'),\n bottom: model.get('bottom')\n },\n box: {\n width: api.getWidth(),\n height: api.getHeight()\n },\n emptyItemWidth: model.get('emptyItemWidth'),\n totalWidth: 0,\n renderList: []\n };\n this._prepare(targetNode, layoutParam, textStyleModel);\n this._renderContent(seriesModel, layoutParam, normalStyleModel, emphasisModel, textStyleModel, emphasisTextStyleModel, onSelect);\n layout.positionElement(thisGroup, layoutParam.pos, layoutParam.box);\n };\n /**\n * Prepare render list and total width\n * @private\n */\n Breadcrumb.prototype._prepare = function (targetNode, layoutParam, textStyleModel) {\n for (var node = targetNode; node; node = node.parentNode) {\n var text = convertOptionIdName(node.getModel().get('name'), '');\n var textRect = textStyleModel.getTextRect(text);\n var itemWidth = Math.max(textRect.width + TEXT_PADDING * 2, layoutParam.emptyItemWidth);\n layoutParam.totalWidth += itemWidth + ITEM_GAP;\n layoutParam.renderList.push({\n node: node,\n text: text,\n width: itemWidth\n });\n }\n };\n /**\n * @private\n */\n Breadcrumb.prototype._renderContent = function (seriesModel, layoutParam, normalStyleModel, emphasisModel, textStyleModel, emphasisTextStyleModel, onSelect) {\n // Start rendering.\n var lastX = 0;\n var emptyItemWidth = layoutParam.emptyItemWidth;\n var height = seriesModel.get(['breadcrumb', 'height']);\n var availableSize = layout.getAvailableSize(layoutParam.pos, layoutParam.box);\n var totalWidth = layoutParam.totalWidth;\n var renderList = layoutParam.renderList;\n var emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n for (var i = renderList.length - 1; i >= 0; i--) {\n var item = renderList[i];\n var itemNode = item.node;\n var itemWidth = item.width;\n var text = item.text;\n // Hdie text and shorten width if necessary.\n if (totalWidth > availableSize.width) {\n totalWidth -= itemWidth - emptyItemWidth;\n itemWidth = emptyItemWidth;\n text = null;\n }\n var el = new graphic.Polygon({\n shape: {\n points: makeItemPoints(lastX, 0, itemWidth, height, i === renderList.length - 1, i === 0)\n },\n style: defaults(normalStyleModel.getItemStyle(), {\n lineJoin: 'bevel'\n }),\n textContent: new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: text\n })\n }),\n textConfig: {\n position: 'inside'\n },\n z2: Z2_EMPHASIS_LIFT * 1e4,\n onclick: curry(onSelect, itemNode)\n });\n el.disableLabelAnimation = true;\n el.getTextContent().ensureState('emphasis').style = createTextStyle(emphasisTextStyleModel, {\n text: text\n });\n el.ensureState('emphasis').style = emphasisItemStyle;\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n this.group.add(el);\n packEventData(el, seriesModel, itemNode);\n lastX += itemWidth + ITEM_GAP;\n }\n };\n Breadcrumb.prototype.remove = function () {\n this.group.removeAll();\n };\n return Breadcrumb;\n}();\nfunction makeItemPoints(x, y, itemWidth, itemHeight, head, tail) {\n var points = [[head ? x : x - ARRAY_LENGTH, y], [x + itemWidth, y], [x + itemWidth, y + itemHeight], [head ? x : x - ARRAY_LENGTH, y + itemHeight]];\n !tail && points.splice(2, 0, [x + itemWidth + ARRAY_LENGTH, y + itemHeight / 2]);\n !head && points.push([x, y + itemHeight / 2]);\n return points;\n}\n// Package custom mouse event.\nfunction packEventData(el, seriesModel, itemNode) {\n getECData(el).eventData = {\n componentType: 'series',\n componentSubType: 'treemap',\n componentIndex: seriesModel.componentIndex,\n seriesIndex: seriesModel.seriesIndex,\n seriesName: seriesModel.name,\n seriesType: 'treemap',\n selfType: 'breadcrumb',\n nodeData: {\n dataIndex: itemNode && itemNode.dataIndex,\n name: itemNode && itemNode.name\n },\n treePathInfo: itemNode && wrapTreePathInfo(itemNode, seriesModel)\n };\n}\nexport default Breadcrumb;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Animate multiple elements with a single done-callback.\n *\n * @example\n * animation\n * .createWrap()\n * .add(el1, {x: 10, y: 10})\n * .add(el2, {shape: {width: 500}, style: {fill: 'red'}}, 400)\n * .done(function () { // done })\n * .start('cubicOut');\n */\nvar AnimationWrap = /** @class */function () {\n function AnimationWrap() {\n this._storage = [];\n this._elExistsMap = {};\n }\n /**\n * Caution: a el can only be added once, otherwise 'done'\n * might not be called. This method checks this (by el.id),\n * suppresses adding and returns false when existing el found.\n *\n * @return Whether adding succeeded.\n */\n AnimationWrap.prototype.add = function (el, target, duration, delay, easing) {\n if (this._elExistsMap[el.id]) {\n return false;\n }\n this._elExistsMap[el.id] = true;\n this._storage.push({\n el: el,\n target: target,\n duration: duration,\n delay: delay,\n easing: easing\n });\n return true;\n };\n /**\n * Only execute when animation done/aborted.\n */\n AnimationWrap.prototype.finished = function (callback) {\n this._finishedCallback = callback;\n return this;\n };\n /**\n * Will stop exist animation firstly.\n */\n AnimationWrap.prototype.start = function () {\n var _this = this;\n var count = this._storage.length;\n var checkTerminate = function () {\n count--;\n if (count <= 0) {\n // Guard.\n _this._storage.length = 0;\n _this._elExistsMap = {};\n _this._finishedCallback && _this._finishedCallback();\n }\n };\n for (var i = 0, len = this._storage.length; i < len; i++) {\n var item = this._storage[i];\n item.el.animateTo(item.target, {\n duration: item.duration,\n delay: item.delay,\n easing: item.easing,\n setToFinal: true,\n done: checkTerminate,\n aborted: checkTerminate\n });\n }\n return this;\n };\n return AnimationWrap;\n}();\nexport function createWrap() {\n return new AnimationWrap();\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { bind, each, indexOf, curry, extend, normalizeCssArray, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isHighDownDispatcher, setAsHighDownDispatcher, setDefaultStateProxy, enableHoverFocus, Z2_EMPHASIS_LIFT } from '../../util/states.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport * as helper from '../helper/treeHelper.js';\nimport Breadcrumb from './Breadcrumb.js';\nimport RoamController from '../../component/helper/RoamController.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as animationUtil from '../../util/animation.js';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper.js';\nimport ChartView from '../../view/Chart.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { makeInner, convertOptionIdName } from '../../util/model.js';\nimport { windowOpen } from '../../util/format.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nvar Group = graphic.Group;\nvar Rect = graphic.Rect;\nvar DRAG_THRESHOLD = 3;\nvar PATH_LABEL_NOAMAL = 'label';\nvar PATH_UPPERLABEL_NORMAL = 'upperLabel';\n// Should larger than emphasis states lift z\nvar Z2_BASE = Z2_EMPHASIS_LIFT * 10; // Should bigger than every z2.\nvar Z2_BG = Z2_EMPHASIS_LIFT * 2;\nvar Z2_CONTENT = Z2_EMPHASIS_LIFT * 3;\nvar getStateItemStyle = makeStyleMapper([['fill', 'color'],\n// `borderColor` and `borderWidth` has been occupied,\n// so use `stroke` to indicate the stroke of the rect.\n['stroke', 'strokeColor'], ['lineWidth', 'strokeWidth'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']\n// Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n// So do not transfer decal directly.\n]);\n\nvar getItemStyleNormal = function (model) {\n // Normal style props should include emphasis style props.\n var itemStyle = getStateItemStyle(model);\n // Clear styles set by emphasis.\n itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null;\n return itemStyle;\n};\nvar inner = makeInner();\nvar TreemapView = /** @class */function (_super) {\n __extends(TreemapView, _super);\n function TreemapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TreemapView.type;\n _this._state = 'ready';\n _this._storage = createStorage();\n return _this;\n }\n /**\n * @override\n */\n TreemapView.prototype.render = function (seriesModel, ecModel, api, payload) {\n var models = ecModel.findComponents({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n });\n if (indexOf(models, seriesModel) < 0) {\n return;\n }\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var payloadType = payload && payload.type;\n var layoutInfo = seriesModel.layoutInfo;\n var isInit = !this._oldTree;\n var thisStorage = this._storage;\n // Mark new root when action is treemapRootToNode.\n var reRoot = payloadType === 'treemapRootToNode' && targetInfo && thisStorage ? {\n rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()],\n direction: payload.direction\n } : null;\n var containerGroup = this._giveContainerGroup(layoutInfo);\n var hasAnimation = seriesModel.get('animation');\n var renderResult = this._doRender(containerGroup, seriesModel, reRoot);\n hasAnimation && !isInit && (!payloadType || payloadType === 'treemapZoomToNode' || payloadType === 'treemapRootToNode') ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot) : renderResult.renderFinally();\n this._resetController(api);\n this._renderBreadcrumb(seriesModel, api, targetInfo);\n };\n TreemapView.prototype._giveContainerGroup = function (layoutInfo) {\n var containerGroup = this._containerGroup;\n if (!containerGroup) {\n // FIXME\n // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。\n containerGroup = this._containerGroup = new Group();\n this._initEvents(containerGroup);\n this.group.add(containerGroup);\n }\n containerGroup.x = layoutInfo.x;\n containerGroup.y = layoutInfo.y;\n return containerGroup;\n };\n TreemapView.prototype._doRender = function (containerGroup, seriesModel, reRoot) {\n var thisTree = seriesModel.getData().tree;\n var oldTree = this._oldTree;\n // Clear last shape records.\n var lastsForAnimation = createStorage();\n var thisStorage = createStorage();\n var oldStorage = this._storage;\n var willInvisibleEls = [];\n function doRenderNode(thisNode, oldNode, parentGroup, depth) {\n return renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth);\n }\n // Notice: When thisTree and oldTree are the same tree (see list.cloneShallow),\n // the oldTree is actually losted, so we cannot find all of the old graphic\n // elements from tree. So we use this strategy: make element storage, move\n // from old storage to new storage, clear old storage.\n dualTravel(thisTree.root ? [thisTree.root] : [], oldTree && oldTree.root ? [oldTree.root] : [], containerGroup, thisTree === oldTree || !oldTree, 0);\n // Process all removing.\n var willDeleteEls = clearStorage(oldStorage);\n this._oldTree = thisTree;\n this._storage = thisStorage;\n if (this._controllerHost) {\n var _oldRootLayout = this.seriesModel.layoutInfo;\n var rootLayout = thisTree.root.getLayout();\n if (rootLayout.width === _oldRootLayout.width && rootLayout.height === _oldRootLayout.height) {\n this._controllerHost.zoom = 1;\n }\n }\n return {\n lastsForAnimation: lastsForAnimation,\n willDeleteEls: willDeleteEls,\n renderFinally: renderFinally\n };\n function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, depth) {\n // When 'render' is triggered by action,\n // 'this' and 'old' may be the same tree,\n // we use rawIndex in that case.\n if (sameTree) {\n oldViewChildren = thisViewChildren;\n each(thisViewChildren, function (child, index) {\n !child.isRemoved() && processNode(index, index);\n });\n }\n // Diff hierarchically (diff only in each subtree, but not whole).\n // because, consistency of view is important.\n else {\n new DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey).add(processNode).update(processNode).remove(curry(processNode, null)).execute();\n }\n function getKey(node) {\n // Identify by name or raw index.\n return node.getId();\n }\n function processNode(newIndex, oldIndex) {\n var thisNode = newIndex != null ? thisViewChildren[newIndex] : null;\n var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null;\n var group = doRenderNode(thisNode, oldNode, parentGroup, depth);\n group && dualTravel(thisNode && thisNode.viewChildren || [], oldNode && oldNode.viewChildren || [], group, sameTree, depth + 1);\n }\n }\n function clearStorage(storage) {\n var willDeleteEls = createStorage();\n storage && each(storage, function (store, storageName) {\n var delEls = willDeleteEls[storageName];\n each(store, function (el) {\n el && (delEls.push(el), inner(el).willDelete = true);\n });\n });\n return willDeleteEls;\n }\n function renderFinally() {\n each(willDeleteEls, function (els) {\n each(els, function (el) {\n el.parent && el.parent.remove(el);\n });\n });\n each(willInvisibleEls, function (el) {\n el.invisible = true;\n // Setting invisible is for optimizing, so no need to set dirty,\n // just mark as invisible.\n el.dirty();\n });\n }\n };\n TreemapView.prototype._doAnimation = function (containerGroup, renderResult, seriesModel, reRoot) {\n var durationOption = seriesModel.get('animationDurationUpdate');\n var easingOption = seriesModel.get('animationEasing');\n // TODO: do not support function until necessary.\n var duration = (isFunction(durationOption) ? 0 : durationOption) || 0;\n var easing = (isFunction(easingOption) ? null : easingOption) || 'cubicOut';\n var animationWrap = animationUtil.createWrap();\n // Make delete animations.\n each(renderResult.willDeleteEls, function (store, storageName) {\n each(store, function (el, rawIndex) {\n if (el.invisible) {\n return;\n }\n var parent = el.parent; // Always has parent, and parent is nodeGroup.\n var target;\n var innerStore = inner(parent);\n if (reRoot && reRoot.direction === 'drillDown') {\n target = parent === reRoot.rootNodeGroup\n // This is the content element of view root.\n // Only `content` will enter this branch, because\n // `background` and `nodeGroup` will not be deleted.\n ? {\n shape: {\n x: 0,\n y: 0,\n width: innerStore.nodeWidth,\n height: innerStore.nodeHeight\n },\n style: {\n opacity: 0\n }\n }\n // Others.\n : {\n style: {\n opacity: 0\n }\n };\n } else {\n var targetX = 0;\n var targetY = 0;\n if (!innerStore.willDelete) {\n // Let node animate to right-bottom corner, cooperating with fadeout,\n // which is appropriate for user understanding.\n // Divided by 2 for reRoot rolling up effect.\n targetX = innerStore.nodeWidth / 2;\n targetY = innerStore.nodeHeight / 2;\n }\n target = storageName === 'nodeGroup' ? {\n x: targetX,\n y: targetY,\n style: {\n opacity: 0\n }\n } : {\n shape: {\n x: targetX,\n y: targetY,\n width: 0,\n height: 0\n },\n style: {\n opacity: 0\n }\n };\n }\n // TODO: do not support delay until necessary.\n target && animationWrap.add(el, target, duration, 0, easing);\n });\n });\n // Make other animations\n each(this._storage, function (store, storageName) {\n each(store, function (el, rawIndex) {\n var last = renderResult.lastsForAnimation[storageName][rawIndex];\n var target = {};\n if (!last) {\n return;\n }\n if (el instanceof graphic.Group) {\n if (last.oldX != null) {\n target.x = el.x;\n target.y = el.y;\n el.x = last.oldX;\n el.y = last.oldY;\n }\n } else {\n if (last.oldShape) {\n target.shape = extend({}, el.shape);\n el.setShape(last.oldShape);\n }\n if (last.fadein) {\n el.setStyle('opacity', 0);\n target.style = {\n opacity: 1\n };\n }\n // When animation is stopped for succedent animation starting,\n // el.style.opacity might not be 1\n else if (el.style.opacity !== 1) {\n target.style = {\n opacity: 1\n };\n }\n }\n animationWrap.add(el, target, duration, 0, easing);\n });\n }, this);\n this._state = 'animating';\n animationWrap.finished(bind(function () {\n this._state = 'ready';\n renderResult.renderFinally();\n }, this)).start();\n };\n TreemapView.prototype._resetController = function (api) {\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n if (!controllerHost) {\n this._controllerHost = {\n target: this.group\n };\n controllerHost = this._controllerHost;\n }\n // Init controller.\n if (!controller) {\n controller = this._controller = new RoamController(api.getZr());\n controller.enable(this.seriesModel.get('roam'));\n controllerHost.zoomLimit = this.seriesModel.get('scaleLimit');\n controllerHost.zoom = this.seriesModel.get('zoom');\n controller.on('pan', bind(this._onPan, this));\n controller.on('zoom', bind(this._onZoom, this));\n }\n var rect = new BoundingRect(0, 0, api.getWidth(), api.getHeight());\n controller.setPointerChecker(function (e, x, y) {\n return rect.contain(x, y);\n });\n };\n TreemapView.prototype._clearController = function () {\n var controller = this._controller;\n this._controllerHost = null;\n if (controller) {\n controller.dispose();\n controller = null;\n }\n };\n TreemapView.prototype._onPan = function (e) {\n if (this._state !== 'animating' && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)) {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n if (!root) {\n return;\n }\n var rootLayout = root.getLayout();\n if (!rootLayout) {\n return;\n }\n this.api.dispatchAction({\n type: 'treemapMove',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rootLayout.x + e.dx,\n y: rootLayout.y + e.dy,\n width: rootLayout.width,\n height: rootLayout.height\n }\n });\n }\n };\n TreemapView.prototype._onZoom = function (e) {\n var mouseX = e.originX;\n var mouseY = e.originY;\n var zoomDelta = e.scale;\n if (this._state !== 'animating') {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n if (!root) {\n return;\n }\n var rootLayout = root.getLayout();\n if (!rootLayout) {\n return;\n }\n var rect = new BoundingRect(rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height);\n // scaleLimit\n var zoomLimit = null;\n var _controllerHost = this._controllerHost;\n zoomLimit = _controllerHost.zoomLimit;\n var newZoom = _controllerHost.zoom = _controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n var zoomScale = newZoom / _controllerHost.zoom;\n _controllerHost.zoom = newZoom;\n var layoutInfo = this.seriesModel.layoutInfo;\n // Transform mouse coord from global to containerGroup.\n mouseX -= layoutInfo.x;\n mouseY -= layoutInfo.y;\n // Scale root bounding rect.\n var m = matrix.create();\n matrix.translate(m, m, [-mouseX, -mouseY]);\n matrix.scale(m, m, [zoomScale, zoomScale]);\n matrix.translate(m, m, [mouseX, mouseY]);\n rect.applyTransform(m);\n this.api.dispatchAction({\n type: 'treemapRender',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n }\n };\n TreemapView.prototype._initEvents = function (containerGroup) {\n var _this = this;\n containerGroup.on('click', function (e) {\n if (_this._state !== 'ready') {\n return;\n }\n var nodeClick = _this.seriesModel.get('nodeClick', true);\n if (!nodeClick) {\n return;\n }\n var targetInfo = _this.findTarget(e.offsetX, e.offsetY);\n if (!targetInfo) {\n return;\n }\n var node = targetInfo.node;\n if (node.getLayout().isLeafRoot) {\n _this._rootToNode(targetInfo);\n } else {\n if (nodeClick === 'zoomToNode') {\n _this._zoomToNode(targetInfo);\n } else if (nodeClick === 'link') {\n var itemModel = node.hostTree.data.getItemModel(node.dataIndex);\n var link = itemModel.get('link', true);\n var linkTarget = itemModel.get('target', true) || 'blank';\n link && windowOpen(link, linkTarget);\n }\n }\n }, this);\n };\n TreemapView.prototype._renderBreadcrumb = function (seriesModel, api, targetInfo) {\n var _this = this;\n if (!targetInfo) {\n targetInfo = seriesModel.get('leafDepth', true) != null ? {\n node: seriesModel.getViewRoot()\n }\n // FIXME\n // better way?\n // Find breadcrumb tail on center of containerGroup.\n : this.findTarget(api.getWidth() / 2, api.getHeight() / 2);\n if (!targetInfo) {\n targetInfo = {\n node: seriesModel.getData().tree.root\n };\n }\n }\n (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group))).render(seriesModel, api, targetInfo.node, function (node) {\n if (_this._state !== 'animating') {\n helper.aboveViewRoot(seriesModel.getViewRoot(), node) ? _this._rootToNode({\n node: node\n }) : _this._zoomToNode({\n node: node\n });\n }\n });\n };\n /**\n * @override\n */\n TreemapView.prototype.remove = function () {\n this._clearController();\n this._containerGroup && this._containerGroup.removeAll();\n this._storage = createStorage();\n this._state = 'ready';\n this._breadcrumb && this._breadcrumb.remove();\n };\n TreemapView.prototype.dispose = function () {\n this._clearController();\n };\n TreemapView.prototype._zoomToNode = function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapZoomToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n };\n TreemapView.prototype._rootToNode = function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapRootToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n };\n /**\n * @public\n * @param {number} x Global coord x.\n * @param {number} y Global coord y.\n * @return {Object} info If not found, return undefined;\n * @return {number} info.node Target node.\n * @return {number} info.offsetX x refer to target node.\n * @return {number} info.offsetY y refer to target node.\n */\n TreemapView.prototype.findTarget = function (x, y) {\n var targetInfo;\n var viewRoot = this.seriesModel.getViewRoot();\n viewRoot.eachNode({\n attr: 'viewChildren',\n order: 'preorder'\n }, function (node) {\n var bgEl = this._storage.background[node.getRawIndex()];\n // If invisible, there might be no element.\n if (bgEl) {\n var point = bgEl.transformCoordToLocal(x, y);\n var shape = bgEl.shape;\n // For performance consideration, don't use 'getBoundingRect'.\n if (shape.x <= point[0] && point[0] <= shape.x + shape.width && shape.y <= point[1] && point[1] <= shape.y + shape.height) {\n targetInfo = {\n node: node,\n offsetX: point[0],\n offsetY: point[1]\n };\n } else {\n return false; // Suppress visit subtree.\n }\n }\n }, this);\n return targetInfo;\n };\n TreemapView.type = 'treemap';\n return TreemapView;\n}(ChartView);\n/**\n * @inner\n */\nfunction createStorage() {\n return {\n nodeGroup: [],\n background: [],\n content: []\n };\n}\n/**\n * @inner\n * @return Return undefined means do not travel further.\n */\nfunction renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) {\n // Whether under viewRoot.\n if (!thisNode) {\n // Deleting nodes will be performed finally. This method just find\n // element from old storage, or create new element, set them to new\n // storage, and set styles.\n return;\n }\n // -------------------------------------------------------------------\n // Start of closure variables available in \"Procedures in renderNode\".\n var thisLayout = thisNode.getLayout();\n var data = seriesModel.getData();\n var nodeModel = thisNode.getModel();\n // Only for enabling highlight/downplay. Clear firstly.\n // Because some node will not be rendered.\n data.setItemGraphicEl(thisNode.dataIndex, null);\n if (!thisLayout || !thisLayout.isInView) {\n return;\n }\n var thisWidth = thisLayout.width;\n var thisHeight = thisLayout.height;\n var borderWidth = thisLayout.borderWidth;\n var thisInvisible = thisLayout.invisible;\n var thisRawIndex = thisNode.getRawIndex();\n var oldRawIndex = oldNode && oldNode.getRawIndex();\n var thisViewChildren = thisNode.viewChildren;\n var upperHeight = thisLayout.upperHeight;\n var isParent = thisViewChildren && thisViewChildren.length;\n var itemStyleNormalModel = nodeModel.getModel('itemStyle');\n var itemStyleEmphasisModel = nodeModel.getModel(['emphasis', 'itemStyle']);\n var itemStyleBlurModel = nodeModel.getModel(['blur', 'itemStyle']);\n var itemStyleSelectModel = nodeModel.getModel(['select', 'itemStyle']);\n var borderRadius = itemStyleNormalModel.get('borderRadius') || 0;\n // End of closure ariables available in \"Procedures in renderNode\".\n // -----------------------------------------------------------------\n // Node group\n var group = giveGraphic('nodeGroup', Group);\n if (!group) {\n return;\n }\n parentGroup.add(group);\n // x,y are not set when el is above view root.\n group.x = thisLayout.x || 0;\n group.y = thisLayout.y || 0;\n group.markRedraw();\n inner(group).nodeWidth = thisWidth;\n inner(group).nodeHeight = thisHeight;\n if (thisLayout.isAboveViewRoot) {\n return group;\n }\n // Background\n var bg = giveGraphic('background', Rect, depth, Z2_BG);\n bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight);\n var emphasisModel = nodeModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var isDisabled = emphasisModel.get('disabled');\n var focusOrIndices = focus === 'ancestor' ? thisNode.getAncestorsIndices() : focus === 'descendant' ? thisNode.getDescendantIndices() : focus;\n // No children, render content.\n if (isParent) {\n // Because of the implementation about \"traverse\" in graphic hover style, we\n // can not set hover listener on the \"group\" of non-leaf node. Otherwise the\n // hover event from the descendents will be listenered.\n if (isHighDownDispatcher(group)) {\n setAsHighDownDispatcher(group, false);\n }\n if (bg) {\n setAsHighDownDispatcher(bg, !isDisabled);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, bg);\n enableHoverFocus(bg, focusOrIndices, blurScope);\n }\n } else {\n var content = giveGraphic('content', Rect, depth, Z2_CONTENT);\n content && renderContent(group, content);\n bg.disableMorphing = true;\n if (bg && isHighDownDispatcher(bg)) {\n setAsHighDownDispatcher(bg, false);\n }\n setAsHighDownDispatcher(group, !isDisabled);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, group);\n enableHoverFocus(group, focusOrIndices, blurScope);\n }\n return group;\n // ----------------------------\n // | Procedures in renderNode |\n // ----------------------------\n function renderBackground(group, bg, useUpperLabel) {\n var ecData = getECData(bg);\n // For tooltip.\n ecData.dataIndex = thisNode.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n bg.setShape({\n x: 0,\n y: 0,\n width: thisWidth,\n height: thisHeight,\n r: borderRadius\n });\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(bg);\n } else {\n bg.invisible = false;\n var style = thisNode.getVisual('style');\n var visualBorderColor = style.stroke;\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualBorderColor;\n var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel);\n emphasisStyle.fill = itemStyleEmphasisModel.get('borderColor');\n var blurStyle = getStateItemStyle(itemStyleBlurModel);\n blurStyle.fill = itemStyleBlurModel.get('borderColor');\n var selectStyle = getStateItemStyle(itemStyleSelectModel);\n selectStyle.fill = itemStyleSelectModel.get('borderColor');\n if (useUpperLabel) {\n var upperLabelWidth = thisWidth - 2 * borderWidth;\n prepareText(\n // PENDING: convert ZRColor to ColorString for text.\n bg, visualBorderColor, style.opacity, {\n x: borderWidth,\n y: 0,\n width: upperLabelWidth,\n height: upperHeight\n });\n }\n // For old bg.\n else {\n bg.removeTextContent();\n }\n bg.setStyle(normalStyle);\n bg.ensureState('emphasis').style = emphasisStyle;\n bg.ensureState('blur').style = blurStyle;\n bg.ensureState('select').style = selectStyle;\n setDefaultStateProxy(bg);\n }\n group.add(bg);\n }\n function renderContent(group, content) {\n var ecData = getECData(content);\n // For tooltip.\n ecData.dataIndex = thisNode.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);\n var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);\n content.culling = true;\n content.setShape({\n x: borderWidth,\n y: borderWidth,\n width: contentWidth,\n height: contentHeight,\n r: borderRadius\n });\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(content);\n } else {\n content.invisible = false;\n var nodeStyle = thisNode.getVisual('style');\n var visualColor = nodeStyle.fill;\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualColor;\n normalStyle.decal = nodeStyle.decal;\n var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel);\n var blurStyle = getStateItemStyle(itemStyleBlurModel);\n var selectStyle = getStateItemStyle(itemStyleSelectModel);\n // PENDING: convert ZRColor to ColorString for text.\n prepareText(content, visualColor, nodeStyle.opacity, null);\n content.setStyle(normalStyle);\n content.ensureState('emphasis').style = emphasisStyle;\n content.ensureState('blur').style = blurStyle;\n content.ensureState('select').style = selectStyle;\n setDefaultStateProxy(content);\n }\n group.add(content);\n }\n function processInvisible(element) {\n // Delay invisible setting utill animation finished,\n // avoid element vanish suddenly before animation.\n !element.invisible && willInvisibleEls.push(element);\n }\n function prepareText(rectEl, visualColor, visualOpacity,\n // Can be null/undefined\n upperLabelRect) {\n var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL);\n var defaultText = convertOptionIdName(nodeModel.get('name'), null);\n var isShow = normalLabelModel.getShallow('show');\n setLabelStyle(rectEl, getLabelStatesModels(nodeModel, upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL), {\n defaultText: isShow ? defaultText : null,\n inheritColor: visualColor,\n defaultOpacity: visualOpacity,\n labelFetcher: seriesModel,\n labelDataIndex: thisNode.dataIndex\n });\n var textEl = rectEl.getTextContent();\n if (!textEl) {\n return;\n }\n var textStyle = textEl.style;\n var textPadding = normalizeCssArray(textStyle.padding || 0);\n if (upperLabelRect) {\n rectEl.setTextConfig({\n layoutRect: upperLabelRect\n });\n textEl.disableLabelLayout = true;\n }\n textEl.beforeUpdate = function () {\n var width = Math.max((upperLabelRect ? upperLabelRect.width : rectEl.shape.width) - textPadding[1] - textPadding[3], 0);\n var height = Math.max((upperLabelRect ? upperLabelRect.height : rectEl.shape.height) - textPadding[0] - textPadding[2], 0);\n if (textStyle.width !== width || textStyle.height !== height) {\n textEl.setStyle({\n width: width,\n height: height\n });\n }\n };\n textStyle.truncateMinChar = 2;\n textStyle.lineOverflow = 'truncate';\n addDrillDownIcon(textStyle, upperLabelRect, thisLayout);\n var textEmphasisState = textEl.getState('emphasis');\n addDrillDownIcon(textEmphasisState ? textEmphasisState.style : null, upperLabelRect, thisLayout);\n }\n function addDrillDownIcon(style, upperLabelRect, thisLayout) {\n var text = style ? style.text : null;\n if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {\n var iconChar = seriesModel.get('drillDownIcon', true);\n style.text = iconChar ? iconChar + ' ' + text : text;\n }\n }\n function giveGraphic(storageName, Ctor, depth, z) {\n var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];\n var lasts = lastsForAnimation[storageName];\n if (element) {\n // Remove from oldStorage\n oldStorage[storageName][oldRawIndex] = null;\n prepareAnimationWhenHasOld(lasts, element);\n }\n // If invisible and no old element, do not create new element (for optimizing).\n else if (!thisInvisible) {\n element = new Ctor();\n if (element instanceof Displayable) {\n element.z2 = calculateZ2(depth, z);\n }\n prepareAnimationWhenNoOld(lasts, element);\n }\n // Set to thisStorage\n return thisStorage[storageName][thisRawIndex] = element;\n }\n function prepareAnimationWhenHasOld(lasts, element) {\n var lastCfg = lasts[thisRawIndex] = {};\n if (element instanceof Group) {\n lastCfg.oldX = element.x;\n lastCfg.oldY = element.y;\n } else {\n lastCfg.oldShape = extend({}, element.shape);\n }\n }\n // If a element is new, we need to find the animation start point carefully,\n // otherwise it will looks strange when 'zoomToNode'.\n function prepareAnimationWhenNoOld(lasts, element) {\n var lastCfg = lasts[thisRawIndex] = {};\n var parentNode = thisNode.parentNode;\n var isGroup = element instanceof graphic.Group;\n if (parentNode && (!reRoot || reRoot.direction === 'drillDown')) {\n var parentOldX = 0;\n var parentOldY = 0;\n // New nodes appear from right-bottom corner in 'zoomToNode' animation.\n // For convenience, get old bounding rect from background.\n var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()];\n if (!reRoot && parentOldBg && parentOldBg.oldShape) {\n parentOldX = parentOldBg.oldShape.width;\n parentOldY = parentOldBg.oldShape.height;\n }\n // When no parent old shape found, its parent is new too,\n // so we can just use {x:0, y:0}.\n if (isGroup) {\n lastCfg.oldX = 0;\n lastCfg.oldY = parentOldY;\n } else {\n lastCfg.oldShape = {\n x: parentOldX,\n y: parentOldY,\n width: 0,\n height: 0\n };\n }\n }\n // Fade in, user can be aware that these nodes are new.\n lastCfg.fadein = !isGroup;\n }\n}\n// We cannot set all background with the same z, because the behaviour of\n// drill down and roll up differ background creation sequence from tree\n// hierarchy sequence, which cause lower background elements to overlap\n// upper ones. So we calculate z based on depth.\n// Moreover, we try to shrink down z interval to [0, 1] to avoid that\n// treemap with large z overlaps other components.\nfunction calculateZ2(depth, z2InLevel) {\n return depth * Z2_BASE + z2InLevel;\n}\nexport default TreemapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as zrColor from 'zrender/lib/tool/color.js';\nimport { linearMap } from '../util/number.js';\nimport { warn } from '../util/log.js';\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar CATEGORY_DEFAULT_VISUAL_INDEX = -1;\nvar VisualMapping = /** @class */function () {\n function VisualMapping(option) {\n var mappingMethod = option.mappingMethod;\n var visualType = option.type;\n var thisOption = this.option = zrUtil.clone(option);\n this.type = visualType;\n this.mappingMethod = mappingMethod;\n this._normalizeData = normalizers[mappingMethod];\n var visualHandler = VisualMapping.visualHandlers[visualType];\n this.applyVisual = visualHandler.applyVisual;\n this.getColorMapper = visualHandler.getColorMapper;\n this._normalizedToVisual = visualHandler._normalizedToVisual[mappingMethod];\n if (mappingMethod === 'piecewise') {\n normalizeVisualRange(thisOption);\n preprocessForPiecewise(thisOption);\n } else if (mappingMethod === 'category') {\n thisOption.categories ? preprocessForSpecifiedCategory(thisOption)\n // categories is ordinal when thisOption.categories not specified,\n // which need no more preprocess except normalize visual.\n : normalizeVisualRange(thisOption, true);\n } else {\n // mappingMethod === 'linear' or 'fixed'\n zrUtil.assert(mappingMethod !== 'linear' || thisOption.dataExtent);\n normalizeVisualRange(thisOption);\n }\n }\n VisualMapping.prototype.mapValueToVisual = function (value) {\n var normalized = this._normalizeData(value);\n return this._normalizedToVisual(normalized, value);\n };\n VisualMapping.prototype.getNormalizer = function () {\n return zrUtil.bind(this._normalizeData, this);\n };\n /**\n * List available visual types.\n *\n * @public\n * @return {Array.}\n */\n VisualMapping.listVisualTypes = function () {\n return zrUtil.keys(VisualMapping.visualHandlers);\n };\n // /**\n // * @public\n // */\n // static addVisualHandler(name, handler) {\n // visualHandlers[name] = handler;\n // }\n /**\n * @public\n */\n VisualMapping.isValidType = function (visualType) {\n return VisualMapping.visualHandlers.hasOwnProperty(visualType);\n };\n /**\n * Convenient method.\n * Visual can be Object or Array or primary type.\n */\n VisualMapping.eachVisual = function (visual, callback, context) {\n if (zrUtil.isObject(visual)) {\n zrUtil.each(visual, callback, context);\n } else {\n callback.call(context, visual);\n }\n };\n VisualMapping.mapVisual = function (visual, callback, context) {\n var isPrimary;\n var newVisual = zrUtil.isArray(visual) ? [] : zrUtil.isObject(visual) ? {} : (isPrimary = true, null);\n VisualMapping.eachVisual(visual, function (v, key) {\n var newVal = callback.call(context, v, key);\n isPrimary ? newVisual = newVal : newVisual[key] = newVal;\n });\n return newVisual;\n };\n /**\n * Retrieve visual properties from given object.\n */\n VisualMapping.retrieveVisuals = function (obj) {\n var ret = {};\n var hasVisual;\n obj && each(VisualMapping.visualHandlers, function (h, visualType) {\n if (obj.hasOwnProperty(visualType)) {\n ret[visualType] = obj[visualType];\n hasVisual = true;\n }\n });\n return hasVisual ? ret : null;\n };\n /**\n * Give order to visual types, considering colorSaturation, colorAlpha depends on color.\n *\n * @public\n * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...}\n * IF Array, like: ['color', 'symbol', 'colorSaturation']\n * @return {Array.} Sorted visual types.\n */\n VisualMapping.prepareVisualTypes = function (visualTypes) {\n if (zrUtil.isArray(visualTypes)) {\n visualTypes = visualTypes.slice();\n } else if (isObject(visualTypes)) {\n var types_1 = [];\n each(visualTypes, function (item, type) {\n types_1.push(type);\n });\n visualTypes = types_1;\n } else {\n return [];\n }\n visualTypes.sort(function (type1, type2) {\n // color should be front of colorSaturation, colorAlpha, ...\n // symbol and symbolSize do not matter.\n return type2 === 'color' && type1 !== 'color' && type1.indexOf('color') === 0 ? 1 : -1;\n });\n return visualTypes;\n };\n /**\n * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'.\n * Other visuals are only depends on themself.\n */\n VisualMapping.dependsOn = function (visualType1, visualType2) {\n return visualType2 === 'color' ? !!(visualType1 && visualType1.indexOf(visualType2) === 0) : visualType1 === visualType2;\n };\n /**\n * @param value\n * @param pieceList [{value: ..., interval: [min, max]}, ...]\n * Always from small to big.\n * @param findClosestWhenOutside Default to be false\n * @return index\n */\n VisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) {\n var possibleI;\n var abs = Infinity;\n // value has the higher priority.\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var pieceValue = pieceList[i].value;\n if (pieceValue != null) {\n if (pieceValue === value\n // FIXME\n // It is supposed to compare value according to value type of dimension,\n // but currently value type can exactly be string or number.\n // Compromise for numeric-like string (like '12'), especially\n // in the case that visualMap.categories is ['22', '33'].\n || zrUtil.isString(pieceValue) && pieceValue === value + '') {\n return i;\n }\n findClosestWhenOutside && updatePossible(pieceValue, i);\n }\n }\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var piece = pieceList[i];\n var interval = piece.interval;\n var close_1 = piece.close;\n if (interval) {\n if (interval[0] === -Infinity) {\n if (littleThan(close_1[1], value, interval[1])) {\n return i;\n }\n } else if (interval[1] === Infinity) {\n if (littleThan(close_1[0], interval[0], value)) {\n return i;\n }\n } else if (littleThan(close_1[0], interval[0], value) && littleThan(close_1[1], value, interval[1])) {\n return i;\n }\n findClosestWhenOutside && updatePossible(interval[0], i);\n findClosestWhenOutside && updatePossible(interval[1], i);\n }\n }\n if (findClosestWhenOutside) {\n return value === Infinity ? pieceList.length - 1 : value === -Infinity ? 0 : possibleI;\n }\n function updatePossible(val, index) {\n var newAbs = Math.abs(val - value);\n if (newAbs < abs) {\n abs = newAbs;\n possibleI = index;\n }\n }\n };\n VisualMapping.visualHandlers = {\n color: {\n applyVisual: makeApplyVisual('color'),\n getColorMapper: function () {\n var thisOption = this.option;\n return zrUtil.bind(thisOption.mappingMethod === 'category' ? function (value, isNormalized) {\n !isNormalized && (value = this._normalizeData(value));\n return doMapCategory.call(this, value);\n } : function (value, isNormalized, out) {\n // If output rgb array\n // which will be much faster and useful in pixel manipulation\n var returnRGBArray = !!out;\n !isNormalized && (value = this._normalizeData(value));\n out = zrColor.fastLerp(value, thisOption.parsedVisual, out);\n return returnRGBArray ? out : zrColor.stringify(out, 'rgba');\n }, this);\n },\n _normalizedToVisual: {\n linear: function (normalized) {\n return zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n colorHue: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, value);\n }),\n colorSaturation: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, value);\n }),\n colorLightness: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, null, value);\n }),\n colorAlpha: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyAlpha(color, value);\n }),\n decal: {\n applyVisual: makeApplyVisual('decal'),\n _normalizedToVisual: {\n linear: null,\n category: doMapCategory,\n piecewise: null,\n fixed: null\n }\n },\n opacity: {\n applyVisual: makeApplyVisual('opacity'),\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n },\n liftZ: {\n applyVisual: makeApplyVisual('liftZ'),\n _normalizedToVisual: {\n linear: doMapFixed,\n category: doMapFixed,\n piecewise: doMapFixed,\n fixed: doMapFixed\n }\n },\n symbol: {\n applyVisual: function (value, getter, setter) {\n var symbolCfg = this.mapValueToVisual(value);\n setter('symbol', symbolCfg);\n },\n _normalizedToVisual: {\n linear: doMapToArray,\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = doMapToArray.call(this, normalized);\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n symbolSize: {\n applyVisual: makeApplyVisual('symbolSize'),\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n }\n };\n return VisualMapping;\n}();\nfunction preprocessForPiecewise(thisOption) {\n var pieceList = thisOption.pieceList;\n thisOption.hasSpecialVisual = false;\n zrUtil.each(pieceList, function (piece, index) {\n piece.originIndex = index;\n // piece.visual is \"result visual value\" but not\n // a visual range, so it does not need to be normalized.\n if (piece.visual != null) {\n thisOption.hasSpecialVisual = true;\n }\n });\n}\nfunction preprocessForSpecifiedCategory(thisOption) {\n // Hash categories.\n var categories = thisOption.categories;\n var categoryMap = thisOption.categoryMap = {};\n var visual = thisOption.visual;\n each(categories, function (cate, index) {\n categoryMap[cate] = index;\n });\n // Process visual map input.\n if (!zrUtil.isArray(visual)) {\n var visualArr_1 = [];\n if (zrUtil.isObject(visual)) {\n each(visual, function (v, cate) {\n var index = categoryMap[cate];\n visualArr_1[index != null ? index : CATEGORY_DEFAULT_VISUAL_INDEX] = v;\n });\n } else {\n // Is primary type, represents default visual.\n visualArr_1[CATEGORY_DEFAULT_VISUAL_INDEX] = visual;\n }\n visual = setVisualToOption(thisOption, visualArr_1);\n }\n // Remove categories that has no visual,\n // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX.\n for (var i = categories.length - 1; i >= 0; i--) {\n if (visual[i] == null) {\n delete categoryMap[categories[i]];\n categories.pop();\n }\n }\n}\nfunction normalizeVisualRange(thisOption, isCategory) {\n var visual = thisOption.visual;\n var visualArr = [];\n if (zrUtil.isObject(visual)) {\n each(visual, function (v) {\n visualArr.push(v);\n });\n } else if (visual != null) {\n visualArr.push(visual);\n }\n var doNotNeedPair = {\n color: 1,\n symbol: 1\n };\n if (!isCategory && visualArr.length === 1 && !doNotNeedPair.hasOwnProperty(thisOption.type)) {\n // Do not care visualArr.length === 0, which is illegal.\n visualArr[1] = visualArr[0];\n }\n setVisualToOption(thisOption, visualArr);\n}\nfunction makePartialColorVisualHandler(applyValue) {\n return {\n applyVisual: function (value, getter, setter) {\n // Only used in HSL\n var colorChannel = this.mapValueToVisual(value);\n // Must not be array value\n setter('color', applyValue(getter('color'), colorChannel));\n },\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n };\n}\nfunction doMapToArray(normalized) {\n var visual = this.option.visual;\n return visual[Math.round(linearMap(normalized, [0, 1], [0, visual.length - 1], true))] || {}; // TODO {}?\n}\n\nfunction makeApplyVisual(visualType) {\n return function (value, getter, setter) {\n setter(visualType, this.mapValueToVisual(value));\n };\n}\nfunction doMapCategory(normalized) {\n var visual = this.option.visual;\n return visual[this.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX ? normalized % visual.length : normalized];\n}\nfunction doMapFixed() {\n // visual will be convert to array.\n return this.option.visual[0];\n}\n/**\n * Create mapped to numeric visual\n */\nfunction createNormalizedToNumericVisual(sourceExtent) {\n return {\n linear: function (normalized) {\n return linearMap(normalized, sourceExtent, this.option.visual, true);\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = linearMap(normalized, sourceExtent, this.option.visual, true);\n }\n return result;\n },\n fixed: doMapFixed\n };\n}\nfunction getSpecifiedVisual(value) {\n var thisOption = this.option;\n var pieceList = thisOption.pieceList;\n if (thisOption.hasSpecialVisual) {\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList);\n var piece = pieceList[pieceIndex];\n if (piece && piece.visual) {\n return piece.visual[this.type];\n }\n }\n}\nfunction setVisualToOption(thisOption, visualArr) {\n thisOption.visual = visualArr;\n if (thisOption.type === 'color') {\n thisOption.parsedVisual = zrUtil.map(visualArr, function (item) {\n var color = zrColor.parse(item);\n if (!color && process.env.NODE_ENV !== 'production') {\n warn(\"'\" + item + \"' is an illegal color, fallback to '#000000'\", true);\n }\n return color || [0, 0, 0, 1];\n });\n }\n return visualArr;\n}\n/**\n * Normalizers by mapping methods.\n */\nvar normalizers = {\n linear: function (value) {\n return linearMap(value, this.option.dataExtent, [0, 1], true);\n },\n piecewise: function (value) {\n var pieceList = this.option.pieceList;\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList, true);\n if (pieceIndex != null) {\n return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true);\n }\n },\n category: function (value) {\n var index = this.option.categories ? this.option.categoryMap[value] : value; // ordinal value\n return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index;\n },\n fixed: zrUtil.noop\n};\nfunction littleThan(close, a, b) {\n return close ? a <= b : a < b;\n}\nexport default VisualMapping;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport { each, extend, isArray } from 'zrender/lib/core/util.js';\nimport { modifyHSL, modifyAlpha } from 'zrender/lib/tool/color.js';\nimport { makeInner } from '../../util/model.js';\nvar ITEM_STYLE_NORMAL = 'itemStyle';\nvar inner = makeInner();\nexport default {\n seriesType: 'treemap',\n reset: function (seriesModel) {\n var tree = seriesModel.getData().tree;\n var root = tree.root;\n if (root.isRemoved()) {\n return;\n }\n travelTree(root,\n // Visual should calculate from tree root but not view root.\n {}, seriesModel.getViewRoot().getAncestors(), seriesModel);\n }\n};\nfunction travelTree(node, designatedVisual, viewRootAncestors, seriesModel) {\n var nodeModel = node.getModel();\n var nodeLayout = node.getLayout();\n var data = node.hostTree.data;\n // Optimize\n if (!nodeLayout || nodeLayout.invisible || !nodeLayout.isInView) {\n return;\n }\n var nodeItemStyleModel = nodeModel.getModel(ITEM_STYLE_NORMAL);\n var visuals = buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel);\n var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style');\n // calculate border color\n var borderColor = nodeItemStyleModel.get('borderColor');\n var borderColorSaturation = nodeItemStyleModel.get('borderColorSaturation');\n var thisNodeColor;\n if (borderColorSaturation != null) {\n // For performance, do not always execute 'calculateColor'.\n thisNodeColor = calculateColor(visuals);\n borderColor = calculateBorderColor(borderColorSaturation, thisNodeColor);\n }\n existsStyle.stroke = borderColor;\n var viewChildren = node.viewChildren;\n if (!viewChildren || !viewChildren.length) {\n thisNodeColor = calculateColor(visuals);\n // Apply visual to this node.\n existsStyle.fill = thisNodeColor;\n } else {\n var mapping_1 = buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren);\n // Designate visual to children.\n each(viewChildren, function (child, index) {\n // If higher than viewRoot, only ancestors of viewRoot is needed to visit.\n if (child.depth >= viewRootAncestors.length || child === viewRootAncestors[child.depth]) {\n var childVisual = mapVisual(nodeModel, visuals, child, index, mapping_1, seriesModel);\n travelTree(child, childVisual, viewRootAncestors, seriesModel);\n }\n });\n }\n}\nfunction buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel) {\n var visuals = extend({}, designatedVisual);\n var designatedVisualItemStyle = seriesModel.designatedVisualItemStyle;\n each(['color', 'colorAlpha', 'colorSaturation'], function (visualName) {\n // Priority: thisNode > thisLevel > parentNodeDesignated > seriesModel\n designatedVisualItemStyle[visualName] = designatedVisual[visualName];\n var val = nodeItemStyleModel.get(visualName);\n designatedVisualItemStyle[visualName] = null;\n val != null && (visuals[visualName] = val);\n });\n return visuals;\n}\nfunction calculateColor(visuals) {\n var color = getValueVisualDefine(visuals, 'color');\n if (color) {\n var colorAlpha = getValueVisualDefine(visuals, 'colorAlpha');\n var colorSaturation = getValueVisualDefine(visuals, 'colorSaturation');\n if (colorSaturation) {\n color = modifyHSL(color, null, null, colorSaturation);\n }\n if (colorAlpha) {\n color = modifyAlpha(color, colorAlpha);\n }\n return color;\n }\n}\nfunction calculateBorderColor(borderColorSaturation, thisNodeColor) {\n return thisNodeColor != null\n // Can only be string\n ? modifyHSL(thisNodeColor, null, null, borderColorSaturation) : null;\n}\nfunction getValueVisualDefine(visuals, name) {\n var value = visuals[name];\n if (value != null && value !== 'none') {\n return value;\n }\n}\nfunction buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren) {\n if (!viewChildren || !viewChildren.length) {\n return;\n }\n var rangeVisual = getRangeVisual(nodeModel, 'color') || visuals.color != null && visuals.color !== 'none' && (getRangeVisual(nodeModel, 'colorAlpha') || getRangeVisual(nodeModel, 'colorSaturation'));\n if (!rangeVisual) {\n return;\n }\n var visualMin = nodeModel.get('visualMin');\n var visualMax = nodeModel.get('visualMax');\n var dataExtent = nodeLayout.dataExtent.slice();\n visualMin != null && visualMin < dataExtent[0] && (dataExtent[0] = visualMin);\n visualMax != null && visualMax > dataExtent[1] && (dataExtent[1] = visualMax);\n var colorMappingBy = nodeModel.get('colorMappingBy');\n var opt = {\n type: rangeVisual.name,\n dataExtent: dataExtent,\n visual: rangeVisual.range\n };\n if (opt.type === 'color' && (colorMappingBy === 'index' || colorMappingBy === 'id')) {\n opt.mappingMethod = 'category';\n opt.loop = true;\n // categories is ordinal, so do not set opt.categories.\n } else {\n opt.mappingMethod = 'linear';\n }\n var mapping = new VisualMapping(opt);\n inner(mapping).drColorMappingBy = colorMappingBy;\n return mapping;\n}\n// Notice: If we don't have the attribute 'colorRange', but only use\n// attribute 'color' to represent both concepts of 'colorRange' and 'color',\n// (It means 'colorRange' when 'color' is Array, means 'color' when not array),\n// this problem will be encountered:\n// If a level-1 node doesn't have children, and its siblings have children,\n// and colorRange is set on level-1, then the node cannot be colored.\n// So we separate 'colorRange' and 'color' to different attributes.\nfunction getRangeVisual(nodeModel, name) {\n // 'colorRange', 'colorARange', 'colorSRange'.\n // If not exists on this node, fetch from levels and series.\n var range = nodeModel.get(name);\n return isArray(range) && range.length ? {\n name: name,\n range: range\n } : null;\n}\nfunction mapVisual(nodeModel, visuals, child, index, mapping, seriesModel) {\n var childVisuals = extend({}, visuals);\n if (mapping) {\n // Only support color, colorAlpha, colorSaturation.\n var mappingType = mapping.type;\n var colorMappingBy = mappingType === 'color' && inner(mapping).drColorMappingBy;\n var value = colorMappingBy === 'index' ? index : colorMappingBy === 'id' ? seriesModel.mapIdToIndex(child.getId()) : child.getValue(nodeModel.get('visualDimension'));\n childVisuals[mappingType] = mapping.mapValueToVisual(value);\n }\n return childVisuals;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/*\n* A third-party license is embedded for some of the code in this file:\n* The treemap layout implementation was originally copied from\n* \"d3.js\" with some modifications made for this project.\n* (See more details in the comment of the method \"squarify\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { parsePercent, MAX_SAFE_INTEGER } from '../../util/number.js';\nimport * as layout from '../../util/layout.js';\nimport * as helper from '../helper/treeHelper.js';\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar retrieveValue = zrUtil.retrieve;\nvar each = zrUtil.each;\nvar PATH_BORDER_WIDTH = ['itemStyle', 'borderWidth'];\nvar PATH_GAP_WIDTH = ['itemStyle', 'gapWidth'];\nvar PATH_UPPER_LABEL_SHOW = ['upperLabel', 'show'];\nvar PATH_UPPER_LABEL_HEIGHT = ['upperLabel', 'height'];\n;\n/**\n * @public\n */\nexport default {\n seriesType: 'treemap',\n reset: function (seriesModel, ecModel, api, payload) {\n // Layout result in each node:\n // {x, y, width, height, area, borderWidth}\n var ecWidth = api.getWidth();\n var ecHeight = api.getHeight();\n var seriesOption = seriesModel.option;\n var layoutInfo = layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n var size = seriesOption.size || []; // Compatible with ec2.\n var containerWidth = parsePercent(retrieveValue(layoutInfo.width, size[0]), ecWidth);\n var containerHeight = parsePercent(retrieveValue(layoutInfo.height, size[1]), ecHeight);\n // Fetch payload info.\n var payloadType = payload && payload.type;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var rootRect = payloadType === 'treemapRender' || payloadType === 'treemapMove' ? payload.rootRect : null;\n var viewRoot = seriesModel.getViewRoot();\n var viewAbovePath = helper.getPathToRoot(viewRoot);\n if (payloadType !== 'treemapMove') {\n var rootSize = payloadType === 'treemapZoomToNode' ? estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) : rootRect ? [rootRect.width, rootRect.height] : [containerWidth, containerHeight];\n var sort_1 = seriesOption.sort;\n if (sort_1 && sort_1 !== 'asc' && sort_1 !== 'desc') {\n // Default to be desc order.\n sort_1 = 'desc';\n }\n var options = {\n squareRatio: seriesOption.squareRatio,\n sort: sort_1,\n leafDepth: seriesOption.leafDepth\n };\n // layout should be cleared because using updateView but not update.\n viewRoot.hostTree.clearLayouts();\n // TODO\n // optimize: if out of view clip, do not layout.\n // But take care that if do not render node out of view clip,\n // how to calculate start po\n var viewRootLayout_1 = {\n x: 0,\n y: 0,\n width: rootSize[0],\n height: rootSize[1],\n area: rootSize[0] * rootSize[1]\n };\n viewRoot.setLayout(viewRootLayout_1);\n squarify(viewRoot, options, false, 0);\n // Supplement layout.\n viewRootLayout_1 = viewRoot.getLayout();\n each(viewAbovePath, function (node, index) {\n var childValue = (viewAbovePath[index + 1] || viewRoot).getValue();\n node.setLayout(zrUtil.extend({\n dataExtent: [childValue, childValue],\n borderWidth: 0,\n upperHeight: 0\n }, viewRootLayout_1));\n });\n }\n var treeRoot = seriesModel.getData().tree.root;\n treeRoot.setLayout(calculateRootPosition(layoutInfo, rootRect, targetInfo), true);\n seriesModel.setLayoutInfo(layoutInfo);\n // FIXME\n // 现在没有clip功能,暂时取ec高宽。\n prunning(treeRoot,\n // Transform to base element coordinate system.\n new BoundingRect(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight), viewAbovePath, viewRoot, 0);\n }\n};\n/**\n * Layout treemap with squarify algorithm.\n * The original presentation of this algorithm\n * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk\n * .\n * The implementation of this algorithm was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @protected\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Object} options\n * @param {string} options.sort 'asc' or 'desc'\n * @param {number} options.squareRatio\n * @param {boolean} hideChildren\n * @param {number} depth\n */\nfunction squarify(node, options, hideChildren, depth) {\n var width;\n var height;\n if (node.isRemoved()) {\n return;\n }\n var thisLayout = node.getLayout();\n width = thisLayout.width;\n height = thisLayout.height;\n // Considering border and gap\n var nodeModel = node.getModel();\n var borderWidth = nodeModel.get(PATH_BORDER_WIDTH);\n var halfGapWidth = nodeModel.get(PATH_GAP_WIDTH) / 2;\n var upperLabelHeight = getUpperLabelHeight(nodeModel);\n var upperHeight = Math.max(borderWidth, upperLabelHeight);\n var layoutOffset = borderWidth - halfGapWidth;\n var layoutOffsetUpper = upperHeight - halfGapWidth;\n node.setLayout({\n borderWidth: borderWidth,\n upperHeight: upperHeight,\n upperLabelHeight: upperLabelHeight\n }, true);\n width = mathMax(width - 2 * layoutOffset, 0);\n height = mathMax(height - layoutOffset - layoutOffsetUpper, 0);\n var totalArea = width * height;\n var viewChildren = initChildren(node, nodeModel, totalArea, options, hideChildren, depth);\n if (!viewChildren.length) {\n return;\n }\n var rect = {\n x: layoutOffset,\n y: layoutOffsetUpper,\n width: width,\n height: height\n };\n var rowFixedLength = mathMin(width, height);\n var best = Infinity; // the best row score so far\n var row = [];\n row.area = 0;\n for (var i = 0, len = viewChildren.length; i < len;) {\n var child = viewChildren[i];\n row.push(child);\n row.area += child.getLayout().area;\n var score = worst(row, rowFixedLength, options.squareRatio);\n // continue with this orientation\n if (score <= best) {\n i++;\n best = score;\n }\n // abort, and try a different orientation\n else {\n row.area -= row.pop().getLayout().area;\n position(row, rowFixedLength, rect, halfGapWidth, false);\n rowFixedLength = mathMin(rect.width, rect.height);\n row.length = row.area = 0;\n best = Infinity;\n }\n }\n if (row.length) {\n position(row, rowFixedLength, rect, halfGapWidth, true);\n }\n if (!hideChildren) {\n var childrenVisibleMin = nodeModel.get('childrenVisibleMin');\n if (childrenVisibleMin != null && totalArea < childrenVisibleMin) {\n hideChildren = true;\n }\n }\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n squarify(viewChildren[i], options, hideChildren, depth + 1);\n }\n}\n/**\n * Set area to each child, and calculate data extent for visual coding.\n */\nfunction initChildren(node, nodeModel, totalArea, options, hideChildren, depth) {\n var viewChildren = node.children || [];\n var orderBy = options.sort;\n orderBy !== 'asc' && orderBy !== 'desc' && (orderBy = null);\n var overLeafDepth = options.leafDepth != null && options.leafDepth <= depth;\n // leafDepth has higher priority.\n if (hideChildren && !overLeafDepth) {\n return node.viewChildren = [];\n }\n // Sort children, order by desc.\n viewChildren = zrUtil.filter(viewChildren, function (child) {\n return !child.isRemoved();\n });\n sort(viewChildren, orderBy);\n var info = statistic(nodeModel, viewChildren, orderBy);\n if (info.sum === 0) {\n return node.viewChildren = [];\n }\n info.sum = filterByThreshold(nodeModel, totalArea, info.sum, orderBy, viewChildren);\n if (info.sum === 0) {\n return node.viewChildren = [];\n }\n // Set area to each child.\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n var area = viewChildren[i].getValue() / info.sum * totalArea;\n // Do not use setLayout({...}, true), because it is needed to clear last layout.\n viewChildren[i].setLayout({\n area: area\n });\n }\n if (overLeafDepth) {\n viewChildren.length && node.setLayout({\n isLeafRoot: true\n }, true);\n viewChildren.length = 0;\n }\n node.viewChildren = viewChildren;\n node.setLayout({\n dataExtent: info.dataExtent\n }, true);\n return viewChildren;\n}\n/**\n * Consider 'visibleMin'. Modify viewChildren and get new sum.\n */\nfunction filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) {\n // visibleMin is not supported yet when no option.sort.\n if (!orderBy) {\n return sum;\n }\n var visibleMin = nodeModel.get('visibleMin');\n var len = orderedChildren.length;\n var deletePoint = len;\n // Always travel from little value to big value.\n for (var i = len - 1; i >= 0; i--) {\n var value = orderedChildren[orderBy === 'asc' ? len - i - 1 : i].getValue();\n if (value / sum * totalArea < visibleMin) {\n deletePoint = i;\n sum -= value;\n }\n }\n orderBy === 'asc' ? orderedChildren.splice(0, len - deletePoint) : orderedChildren.splice(deletePoint, len - deletePoint);\n return sum;\n}\n/**\n * Sort\n */\nfunction sort(viewChildren, orderBy) {\n if (orderBy) {\n viewChildren.sort(function (a, b) {\n var diff = orderBy === 'asc' ? a.getValue() - b.getValue() : b.getValue() - a.getValue();\n return diff === 0 ? orderBy === 'asc' ? a.dataIndex - b.dataIndex : b.dataIndex - a.dataIndex : diff;\n });\n }\n return viewChildren;\n}\n/**\n * Statistic\n */\nfunction statistic(nodeModel, children, orderBy) {\n // Calculate sum.\n var sum = 0;\n for (var i = 0, len = children.length; i < len; i++) {\n sum += children[i].getValue();\n }\n // Statistic data extent for latter visual coding.\n // Notice: data extent should be calculate based on raw children\n // but not filtered view children, otherwise visual mapping will not\n // be stable when zoom (where children is filtered by visibleMin).\n var dimension = nodeModel.get('visualDimension');\n var dataExtent;\n // The same as area dimension.\n if (!children || !children.length) {\n dataExtent = [NaN, NaN];\n } else if (dimension === 'value' && orderBy) {\n dataExtent = [children[children.length - 1].getValue(), children[0].getValue()];\n orderBy === 'asc' && dataExtent.reverse();\n }\n // Other dimension.\n else {\n dataExtent = [Infinity, -Infinity];\n each(children, function (child) {\n var value = child.getValue(dimension);\n value < dataExtent[0] && (dataExtent[0] = value);\n value > dataExtent[1] && (dataExtent[1] = value);\n });\n }\n return {\n sum: sum,\n dataExtent: dataExtent\n };\n}\n/**\n * Computes the score for the specified row,\n * as the worst aspect ratio.\n */\nfunction worst(row, rowFixedLength, ratio) {\n var areaMax = 0;\n var areaMin = Infinity;\n for (var i = 0, area = void 0, len = row.length; i < len; i++) {\n area = row[i].getLayout().area;\n if (area) {\n area < areaMin && (areaMin = area);\n area > areaMax && (areaMax = area);\n }\n }\n var squareArea = row.area * row.area;\n var f = rowFixedLength * rowFixedLength * ratio;\n return squareArea ? mathMax(f * areaMax / squareArea, squareArea / (f * areaMin)) : Infinity;\n}\n/**\n * Positions the specified row of nodes. Modifies `rect`.\n */\nfunction position(row, rowFixedLength, rect, halfGapWidth, flush) {\n // When rowFixedLength === rect.width,\n // it is horizontal subdivision,\n // rowFixedLength is the width of the subdivision,\n // rowOtherLength is the height of the subdivision,\n // and nodes will be positioned from left to right.\n // wh[idx0WhenH] means: when horizontal,\n // wh[idx0WhenH] => wh[0] => 'width'.\n // xy[idx1WhenH] => xy[1] => 'y'.\n var idx0WhenH = rowFixedLength === rect.width ? 0 : 1;\n var idx1WhenH = 1 - idx0WhenH;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var last = rect[xy[idx0WhenH]];\n var rowOtherLength = rowFixedLength ? row.area / rowFixedLength : 0;\n if (flush || rowOtherLength > rect[wh[idx1WhenH]]) {\n rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow\n }\n\n for (var i = 0, rowLen = row.length; i < rowLen; i++) {\n var node = row[i];\n var nodeLayout = {};\n var step = rowOtherLength ? node.getLayout().area / rowOtherLength : 0;\n var wh1 = nodeLayout[wh[idx1WhenH]] = mathMax(rowOtherLength - 2 * halfGapWidth, 0);\n // We use Math.max/min to avoid negative width/height when considering gap width.\n var remain = rect[xy[idx0WhenH]] + rect[wh[idx0WhenH]] - last;\n var modWH = i === rowLen - 1 || remain < step ? remain : step;\n var wh0 = nodeLayout[wh[idx0WhenH]] = mathMax(modWH - 2 * halfGapWidth, 0);\n nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + mathMin(halfGapWidth, wh1 / 2);\n nodeLayout[xy[idx0WhenH]] = last + mathMin(halfGapWidth, wh0 / 2);\n last += modWH;\n node.setLayout(nodeLayout, true);\n }\n rect[xy[idx1WhenH]] += rowOtherLength;\n rect[wh[idx1WhenH]] -= rowOtherLength;\n}\n// Return [containerWidth, containerHeight] as default.\nfunction estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) {\n // If targetInfo.node exists, we zoom to the node,\n // so estimate whole width and height by target node.\n var currNode = (targetInfo || {}).node;\n var defaultSize = [containerWidth, containerHeight];\n if (!currNode || currNode === viewRoot) {\n return defaultSize;\n }\n var parent;\n var viewArea = containerWidth * containerHeight;\n var area = viewArea * seriesModel.option.zoomToNodeRatio;\n while (parent = currNode.parentNode) {\n // jshint ignore:line\n var sum = 0;\n var siblings = parent.children;\n for (var i = 0, len = siblings.length; i < len; i++) {\n sum += siblings[i].getValue();\n }\n var currNodeValue = currNode.getValue();\n if (currNodeValue === 0) {\n return defaultSize;\n }\n area *= sum / currNodeValue;\n // Considering border, suppose aspect ratio is 1.\n var parentModel = parent.getModel();\n var borderWidth = parentModel.get(PATH_BORDER_WIDTH);\n var upperHeight = Math.max(borderWidth, getUpperLabelHeight(parentModel));\n area += 4 * borderWidth * borderWidth + (3 * borderWidth + upperHeight) * Math.pow(area, 0.5);\n area > MAX_SAFE_INTEGER && (area = MAX_SAFE_INTEGER);\n currNode = parent;\n }\n area < viewArea && (area = viewArea);\n var scale = Math.pow(area / viewArea, 0.5);\n return [containerWidth * scale, containerHeight * scale];\n}\n// Root position based on coord of containerGroup\nfunction calculateRootPosition(layoutInfo, rootRect, targetInfo) {\n if (rootRect) {\n return {\n x: rootRect.x,\n y: rootRect.y\n };\n }\n var defaultPosition = {\n x: 0,\n y: 0\n };\n if (!targetInfo) {\n return defaultPosition;\n }\n // If targetInfo is fetched by 'retrieveTargetInfo',\n // old tree and new tree are the same tree,\n // so the node still exists and we can visit it.\n var targetNode = targetInfo.node;\n var layout = targetNode.getLayout();\n if (!layout) {\n return defaultPosition;\n }\n // Transform coord from local to container.\n var targetCenter = [layout.width / 2, layout.height / 2];\n var node = targetNode;\n while (node) {\n var nodeLayout = node.getLayout();\n targetCenter[0] += nodeLayout.x;\n targetCenter[1] += nodeLayout.y;\n node = node.parentNode;\n }\n return {\n x: layoutInfo.width / 2 - targetCenter[0],\n y: layoutInfo.height / 2 - targetCenter[1]\n };\n}\n// Mark nodes visible for prunning when visual coding and rendering.\n// Prunning depends on layout and root position, so we have to do it after layout.\nfunction prunning(node, clipRect, viewAbovePath, viewRoot, depth) {\n var nodeLayout = node.getLayout();\n var nodeInViewAbovePath = viewAbovePath[depth];\n var isAboveViewRoot = nodeInViewAbovePath && nodeInViewAbovePath === node;\n if (nodeInViewAbovePath && !isAboveViewRoot || depth === viewAbovePath.length && node !== viewRoot) {\n return;\n }\n node.setLayout({\n // isInView means: viewRoot sub tree + viewAbovePath\n isInView: true,\n // invisible only means: outside view clip so that the node can not\n // see but still layout for animation preparation but not render.\n invisible: !isAboveViewRoot && !clipRect.intersect(nodeLayout),\n isAboveViewRoot: isAboveViewRoot\n }, true);\n // Transform to child coordinate.\n var childClipRect = new BoundingRect(clipRect.x - nodeLayout.x, clipRect.y - nodeLayout.y, clipRect.width, clipRect.height);\n each(node.viewChildren || [], function (child) {\n prunning(child, childClipRect, viewAbovePath, viewRoot, depth + 1);\n });\n}\nfunction getUpperLabelHeight(model) {\n return model.get(PATH_UPPER_LABEL_SHOW) ? model.get(PATH_UPPER_LABEL_HEIGHT) : 0;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { installTreemapAction } from './treemapAction.js';\nimport TreemapSeriesModel from './TreemapSeries.js';\nimport TreemapView from './TreemapView.js';\nimport treemapVisual from './treemapVisual.js';\nimport treemapLayout from './treemapLayout.js';\nexport function install(registers) {\n registers.registerSeriesModel(TreemapSeriesModel);\n registers.registerChartView(TreemapView);\n registers.registerVisual(treemapVisual);\n registers.registerLayout(treemapLayout);\n installTreemapAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isNumber } from 'zrender/lib/core/util.js';\nexport default function categoryFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (!legendModels || !legendModels.length) {\n return;\n }\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var categoriesData = graphSeries.getCategoriesData();\n var graph = graphSeries.getGraph();\n var data = graph.data;\n var categoryNames = categoriesData.mapArray(categoriesData.getName);\n data.filterSelf(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n if (category != null) {\n if (isNumber(category)) {\n category = categoryNames[category];\n }\n // If in any legend component the status is not selected.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(category)) {\n return false;\n }\n }\n }\n return true;\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend, isString } from 'zrender/lib/core/util.js';\nexport default function categoryVisual(ecModel) {\n var paletteScope = {};\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var categoriesData = seriesModel.getCategoriesData();\n var data = seriesModel.getData();\n var categoryNameIdxMap = {};\n categoriesData.each(function (idx) {\n var name = categoriesData.getName(idx);\n // Add prefix to avoid conflict with Object.prototype.\n categoryNameIdxMap['ec-' + name] = idx;\n var itemModel = categoriesData.getItemModel(idx);\n var style = itemModel.getModel('itemStyle').getItemStyle();\n if (!style.fill) {\n // Get color from palette.\n style.fill = seriesModel.getColorFromPalette(name, paletteScope);\n }\n categoriesData.setItemVisual(idx, 'style', style);\n var symbolVisualList = ['symbol', 'symbolSize', 'symbolKeepAspect'];\n for (var i = 0; i < symbolVisualList.length; i++) {\n var symbolVisual = itemModel.getShallow(symbolVisualList[i], true);\n if (symbolVisual != null) {\n categoriesData.setItemVisual(idx, symbolVisualList[i], symbolVisual);\n }\n }\n });\n // Assign category color to visual\n if (categoriesData.count()) {\n data.each(function (idx) {\n var model = data.getItemModel(idx);\n var categoryIdx = model.getShallow('category');\n if (categoryIdx != null) {\n if (isString(categoryIdx)) {\n categoryIdx = categoryNameIdxMap['ec-' + categoryIdx];\n }\n var categoryStyle = categoriesData.getItemVisual(categoryIdx, 'style');\n var style = data.ensureUniqueItemVisual(idx, 'style');\n extend(style, categoryStyle);\n var visualList = ['symbol', 'symbolSize', 'symbolKeepAspect'];\n for (var i = 0; i < visualList.length; i++) {\n data.setItemVisual(idx, visualList[i], categoriesData.getItemVisual(categoryIdx, visualList[i]));\n }\n }\n });\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend } from 'zrender/lib/core/util.js';\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n return a;\n}\nexport default function graphEdgeVisual(ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var edgeData = seriesModel.getEdgeData();\n var symbolType = normalize(seriesModel.get('edgeSymbol'));\n var symbolSize = normalize(seriesModel.get('edgeSymbolSize'));\n // const colorQuery = ['lineStyle', 'color'] as const;\n // const opacityQuery = ['lineStyle', 'opacity'] as const;\n edgeData.setVisual('fromSymbol', symbolType && symbolType[0]);\n edgeData.setVisual('toSymbol', symbolType && symbolType[1]);\n edgeData.setVisual('fromSymbolSize', symbolSize && symbolSize[0]);\n edgeData.setVisual('toSymbolSize', symbolSize && symbolSize[1]);\n edgeData.setVisual('style', seriesModel.getModel('lineStyle').getLineStyle());\n edgeData.each(function (idx) {\n var itemModel = edgeData.getItemModel(idx);\n var edge = graph.getEdgeByIndex(idx);\n var symbolType = normalize(itemModel.getShallow('symbol', true));\n var symbolSize = normalize(itemModel.getShallow('symbolSize', true));\n // Edge visual must after node visual\n var style = itemModel.getModel('lineStyle').getLineStyle();\n var existsStyle = edgeData.ensureUniqueItemVisual(idx, 'style');\n extend(existsStyle, style);\n switch (existsStyle.stroke) {\n case 'source':\n {\n var nodeStyle = edge.node1.getVisual('style');\n existsStyle.stroke = nodeStyle && nodeStyle.fill;\n break;\n }\n case 'target':\n {\n var nodeStyle = edge.node2.getVisual('style');\n existsStyle.stroke = nodeStyle && nodeStyle.fill;\n break;\n }\n }\n symbolType[0] && edge.setVisual('fromSymbol', symbolType[0]);\n symbolType[1] && edge.setVisual('toSymbol', symbolType[1]);\n symbolSize[0] && edge.setVisual('fromSymbolSize', symbolSize[0]);\n symbolSize[1] && edge.setVisual('toSymbolSize', symbolSize[1]);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar KEY_DELIMITER = '-->';\n/**\n * params handler\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @returns {*}\n */\nvar getAutoCurvenessParams = function (seriesModel) {\n return seriesModel.get('autoCurveness') || null;\n};\n/**\n * Generate a list of edge curvatures, 20 is the default\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param {number} appendLength\n * @return 20 => [0, -0.2, 0.2, -0.4, 0.4, -0.6, 0.6, -0.8, 0.8, -1, 1, -1.2, 1.2, -1.4, 1.4, -1.6, 1.6, -1.8, 1.8, -2]\n */\nvar createCurveness = function (seriesModel, appendLength) {\n var autoCurvenessParmas = getAutoCurvenessParams(seriesModel);\n var length = 20;\n var curvenessList = [];\n // handler the function set\n if (zrUtil.isNumber(autoCurvenessParmas)) {\n length = autoCurvenessParmas;\n } else if (zrUtil.isArray(autoCurvenessParmas)) {\n seriesModel.__curvenessList = autoCurvenessParmas;\n return;\n }\n // append length\n if (appendLength > length) {\n length = appendLength;\n }\n // make sure the length is even\n var len = length % 2 ? length + 2 : length + 3;\n curvenessList = [];\n for (var i = 0; i < len; i++) {\n curvenessList.push((i % 2 ? i + 1 : i) / 10 * (i % 2 ? -1 : 1));\n }\n seriesModel.__curvenessList = curvenessList;\n};\n/**\n * Create different cache key data in the positive and negative directions, in order to set the curvature later\n * @param {number|string|module:echarts/data/Graph.Node} n1\n * @param {number|string|module:echarts/data/Graph.Node} n2\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @returns {string} key\n */\nvar getKeyOfEdges = function (n1, n2, seriesModel) {\n var source = [n1.id, n1.dataIndex].join('.');\n var target = [n2.id, n2.dataIndex].join('.');\n return [seriesModel.uid, source, target].join(KEY_DELIMITER);\n};\n/**\n * get opposite key\n * @param {string} key\n * @returns {string}\n */\nvar getOppositeKey = function (key) {\n var keys = key.split(KEY_DELIMITER);\n return [keys[0], keys[2], keys[1]].join(KEY_DELIMITER);\n};\n/**\n * get edgeMap with key\n * @param edge\n * @param {module:echarts/model/SeriesModel} seriesModel\n */\nvar getEdgeFromMap = function (edge, seriesModel) {\n var key = getKeyOfEdges(edge.node1, edge.node2, seriesModel);\n return seriesModel.__edgeMap[key];\n};\n/**\n * calculate all cases total length\n * @param edge\n * @param seriesModel\n * @returns {number}\n */\nvar getTotalLengthBetweenNodes = function (edge, seriesModel) {\n var len = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node1, edge.node2, seriesModel), seriesModel);\n var lenV = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node2, edge.node1, seriesModel), seriesModel);\n return len + lenV;\n};\n/**\n *\n * @param key\n */\nvar getEdgeMapLengthWithKey = function (key, seriesModel) {\n var edgeMap = seriesModel.__edgeMap;\n return edgeMap[key] ? edgeMap[key].length : 0;\n};\n/**\n * Count the number of edges between the same two points, used to obtain the curvature table and the parity of the edge\n * @see /graph/GraphSeries.js@getInitialData\n * @param {module:echarts/model/SeriesModel} seriesModel\n */\nexport function initCurvenessList(seriesModel) {\n if (!getAutoCurvenessParams(seriesModel)) {\n return;\n }\n seriesModel.__curvenessList = [];\n seriesModel.__edgeMap = {};\n // calc the array of curveness List\n createCurveness(seriesModel);\n}\n/**\n * set edgeMap with key\n * @param {number|string|module:echarts/data/Graph.Node} n1\n * @param {number|string|module:echarts/data/Graph.Node} n2\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param {number} index\n */\nexport function createEdgeMapForCurveness(n1, n2, seriesModel, index) {\n if (!getAutoCurvenessParams(seriesModel)) {\n return;\n }\n var key = getKeyOfEdges(n1, n2, seriesModel);\n var edgeMap = seriesModel.__edgeMap;\n var oppositeEdges = edgeMap[getOppositeKey(key)];\n // set direction\n if (edgeMap[key] && !oppositeEdges) {\n edgeMap[key].isForward = true;\n } else if (oppositeEdges && edgeMap[key]) {\n oppositeEdges.isForward = true;\n edgeMap[key].isForward = false;\n }\n edgeMap[key] = edgeMap[key] || [];\n edgeMap[key].push(index);\n}\n/**\n * get curvature for edge\n * @param edge\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param index\n */\nexport function getCurvenessForEdge(edge, seriesModel, index, needReverse) {\n var autoCurvenessParams = getAutoCurvenessParams(seriesModel);\n var isArrayParam = zrUtil.isArray(autoCurvenessParams);\n if (!autoCurvenessParams) {\n return null;\n }\n var edgeArray = getEdgeFromMap(edge, seriesModel);\n if (!edgeArray) {\n return null;\n }\n var edgeIndex = -1;\n for (var i = 0; i < edgeArray.length; i++) {\n if (edgeArray[i] === index) {\n edgeIndex = i;\n break;\n }\n }\n // if totalLen is Longer createCurveness\n var totalLen = getTotalLengthBetweenNodes(edge, seriesModel);\n createCurveness(seriesModel, totalLen);\n edge.lineStyle = edge.lineStyle || {};\n // if is opposite edge, must set curvenss to opposite number\n var curKey = getKeyOfEdges(edge.node1, edge.node2, seriesModel);\n var curvenessList = seriesModel.__curvenessList;\n // if pass array no need parity\n var parityCorrection = isArrayParam ? 0 : totalLen % 2 ? 0 : 1;\n if (!edgeArray.isForward) {\n // the opposite edge show outside\n var oppositeKey = getOppositeKey(curKey);\n var len = getEdgeMapLengthWithKey(oppositeKey, seriesModel);\n var resValue = curvenessList[edgeIndex + len + parityCorrection];\n // isNeedReverse, simple, force type need reverse the curveness in the junction of the forword and the opposite\n if (needReverse) {\n // set as array may make the parity handle with the len of opposite\n if (isArrayParam) {\n if (autoCurvenessParams && autoCurvenessParams[0] === 0) {\n return (len + parityCorrection) % 2 ? resValue : -resValue;\n } else {\n return ((len % 2 ? 0 : 1) + parityCorrection) % 2 ? resValue : -resValue;\n }\n } else {\n return (len + parityCorrection) % 2 ? resValue : -resValue;\n }\n } else {\n return curvenessList[edgeIndex + len + parityCorrection];\n }\n } else {\n return curvenessList[parityCorrection + edgeIndex];\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper.js';\nexport function simpleLayout(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n var graph = seriesModel.getGraph();\n graph.eachNode(function (node) {\n var model = node.getModel();\n node.setLayout([+model.get('x'), +model.get('y')]);\n });\n simpleLayoutEdge(graph, seriesModel);\n}\nexport function simpleLayoutEdge(graph, seriesModel) {\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, seriesModel, index, true), 0);\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var points = [p1, p2];\n if (+curveness) {\n points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]);\n }\n edge.setLayout(points);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each } from 'zrender/lib/core/util.js';\nimport { simpleLayout, simpleLayoutEdge } from './simpleLayoutHelper.js';\nexport default function graphSimpleLayout(ecModel, api) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var layout = seriesModel.get('layout');\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n var data_1 = seriesModel.getData();\n var dimensions_1 = [];\n each(coordSys.dimensions, function (coordDim) {\n dimensions_1 = dimensions_1.concat(data_1.mapDimensionsAll(coordDim));\n });\n for (var dataIndex = 0; dataIndex < data_1.count(); dataIndex++) {\n var value = [];\n var hasValue = false;\n for (var i = 0; i < dimensions_1.length; i++) {\n var val = data_1.get(dimensions_1[i], dataIndex);\n if (!isNaN(val)) {\n hasValue = true;\n }\n value.push(val);\n }\n if (hasValue) {\n data_1.setItemLayout(dataIndex, coordSys.dataToPoint(value));\n } else {\n // Also {Array.}, not undefined to avoid if...else... statement\n data_1.setItemLayout(dataIndex, [NaN, NaN]);\n }\n }\n simpleLayoutEdge(data_1.graph, seriesModel);\n } else if (!layout || layout === 'none') {\n simpleLayout(seriesModel);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function getNodeGlobalScale(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type !== 'view') {\n return 1;\n }\n var nodeScaleRatio = seriesModel.option.nodeScaleRatio;\n var groupZoom = coordSys.scaleX;\n // Scale node when zoom changes\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n return nodeScale / groupZoom;\n}\nexport function getSymbolSize(node) {\n var symbolSize = node.getVisual('symbolSize');\n if (symbolSize instanceof Array) {\n symbolSize = (symbolSize[0] + symbolSize[1]) / 2;\n }\n return +symbolSize;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport { getSymbolSize, getNodeGlobalScale } from './graphHelper.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper.js';\nvar PI = Math.PI;\nvar _symbolRadiansHalf = [];\n/**\n * `basedOn` can be:\n * 'value':\n * This layout is not accurate and have same bad case. For example,\n * if the min value is very smaller than the max value, the nodes\n * with the min value probably overlap even though there is enough\n * space to layout them. So we only use this approach in the as the\n * init layout of the force layout.\n * FIXME\n * Probably we do not need this method any more but use\n * `basedOn: 'symbolSize'` in force layout if\n * delay its init operations to GraphView.\n * 'symbolSize':\n * This approach work only if all of the symbol size calculated.\n * That is, the progressive rendering is not applied to graph.\n * FIXME\n * If progressive rendering is applied to graph some day,\n * probably we have to use `basedOn: 'value'`.\n */\nexport function circularLayout(seriesModel, basedOn, draggingNode, pointer) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n var rect = coordSys.getBoundingRect();\n var nodeData = seriesModel.getData();\n var graph = nodeData.graph;\n var cx = rect.width / 2 + rect.x;\n var cy = rect.height / 2 + rect.y;\n var r = Math.min(rect.width, rect.height) / 2;\n var count = nodeData.count();\n nodeData.setLayout({\n cx: cx,\n cy: cy\n });\n if (!count) {\n return;\n }\n if (draggingNode) {\n var _a = coordSys.pointToData(pointer),\n tempX = _a[0],\n tempY = _a[1];\n var v = [tempX - cx, tempY - cy];\n vec2.normalize(v, v);\n vec2.scale(v, v, r);\n draggingNode.setLayout([cx + v[0], cy + v[1]], true);\n var circularRotateLabel = seriesModel.get(['circular', 'rotateLabel']);\n rotateNodeLabel(draggingNode, circularRotateLabel, cx, cy);\n }\n _layoutNodesBasedOn[basedOn](seriesModel, graph, nodeData, r, cx, cy, count);\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), getCurvenessForEdge(edge, seriesModel, index), 0);\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var cp1;\n var x12 = (p1[0] + p2[0]) / 2;\n var y12 = (p1[1] + p2[1]) / 2;\n if (+curveness) {\n curveness *= 3;\n cp1 = [cx * curveness + x12 * (1 - curveness), cy * curveness + y12 * (1 - curveness)];\n }\n edge.setLayout([p1, p2, cp1]);\n });\n}\nvar _layoutNodesBasedOn = {\n value: function (seriesModel, graph, nodeData, r, cx, cy, count) {\n var angle = 0;\n var sum = nodeData.getSum('value');\n var unitAngle = Math.PI * 2 / (sum || count);\n graph.eachNode(function (node) {\n var value = node.getValue('value');\n var radianHalf = unitAngle * (sum ? value : 1) / 2;\n angle += radianHalf;\n node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += radianHalf;\n });\n },\n symbolSize: function (seriesModel, graph, nodeData, r, cx, cy, count) {\n var sumRadian = 0;\n _symbolRadiansHalf.length = count;\n var nodeScale = getNodeGlobalScale(seriesModel);\n graph.eachNode(function (node) {\n var symbolSize = getSymbolSize(node);\n // Normally this case will not happen, but we still add\n // some the defensive code (2px is an arbitrary value).\n isNaN(symbolSize) && (symbolSize = 2);\n symbolSize < 0 && (symbolSize = 0);\n symbolSize *= nodeScale;\n var symbolRadianHalf = Math.asin(symbolSize / 2 / r);\n // when `symbolSize / 2` is bigger than `r`.\n isNaN(symbolRadianHalf) && (symbolRadianHalf = PI / 2);\n _symbolRadiansHalf[node.dataIndex] = symbolRadianHalf;\n sumRadian += symbolRadianHalf * 2;\n });\n var halfRemainRadian = (2 * PI - sumRadian) / count / 2;\n var angle = 0;\n graph.eachNode(function (node) {\n var radianHalf = halfRemainRadian + _symbolRadiansHalf[node.dataIndex];\n angle += radianHalf;\n // init circular layout for\n // 1. layout undefined node\n // 2. not fixed node\n (!node.getLayout() || !node.getLayout().fixed) && node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += radianHalf;\n });\n }\n};\nexport function rotateNodeLabel(node, circularRotateLabel, cx, cy) {\n var el = node.getGraphicEl();\n // need to check if el exists. '-' value may not create node element.\n if (!el) {\n return;\n }\n var nodeModel = node.getModel();\n var labelRotate = nodeModel.get(['label', 'rotate']) || 0;\n var symbolPath = el.getSymbolPath();\n if (circularRotateLabel) {\n var pos = node.getLayout();\n var rad = Math.atan2(pos[1] - cy, pos[0] - cx);\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n var isLeft = pos[0] < cx;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n var textPosition = isLeft ? 'left' : 'right';\n symbolPath.setTextConfig({\n rotation: -rad,\n position: textPosition,\n origin: 'center'\n });\n var emphasisState = symbolPath.ensureState('emphasis');\n zrUtil.extend(emphasisState.textConfig || (emphasisState.textConfig = {}), {\n position: textPosition\n });\n } else {\n symbolPath.setTextConfig({\n rotation: labelRotate *= Math.PI / 180\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { circularLayout } from './circularLayoutHelper.js';\nexport default function graphCircularLayout(ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n if (seriesModel.get('layout') === 'circular') {\n circularLayout(seriesModel, 'symbolSize');\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/*\n* A third-party license is embedded for some of the code in this file:\n* Some formulas were originally copied from \"d3.js\" with some\n* modifications made for this project.\n* (See more details in the comment of the method \"step\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\nimport * as vec2 from 'zrender/lib/core/vector.js';\nvar scaleAndAdd = vec2.scaleAndAdd;\n// function adjacentNode(n, e) {\n// return e.n1 === n ? e.n2 : e.n1;\n// }\nexport function forceLayout(inNodes, inEdges, opts) {\n var nodes = inNodes;\n var edges = inEdges;\n var rect = opts.rect;\n var width = rect.width;\n var height = rect.height;\n var center = [rect.x + width / 2, rect.y + height / 2];\n // let scale = opts.scale || 1;\n var gravity = opts.gravity == null ? 0.1 : opts.gravity;\n // for (let i = 0; i < edges.length; i++) {\n // let e = edges[i];\n // let n1 = e.n1;\n // let n2 = e.n2;\n // n1.edges = n1.edges || [];\n // n2.edges = n2.edges || [];\n // n1.edges.push(e);\n // n2.edges.push(e);\n // }\n // Init position\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n if (!n.p) {\n n.p = vec2.create(width * (Math.random() - 0.5) + center[0], height * (Math.random() - 0.5) + center[1]);\n }\n n.pp = vec2.clone(n.p);\n n.edges = null;\n }\n // Formula in 'Graph Drawing by Force-directed Placement'\n // let k = scale * Math.sqrt(width * height / nodes.length);\n // let k2 = k * k;\n var initialFriction = opts.friction == null ? 0.6 : opts.friction;\n var friction = initialFriction;\n var beforeStepCallback;\n var afterStepCallback;\n return {\n warmUp: function () {\n friction = initialFriction * 0.8;\n },\n setFixed: function (idx) {\n nodes[idx].fixed = true;\n },\n setUnfixed: function (idx) {\n nodes[idx].fixed = false;\n },\n /**\n * Before step hook\n */\n beforeStep: function (cb) {\n beforeStepCallback = cb;\n },\n /**\n * After step hook\n */\n afterStep: function (cb) {\n afterStepCallback = cb;\n },\n /**\n * Some formulas were originally copied from \"d3.js\"\n * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js\n * with some modifications made for this project.\n * See the license statement at the head of this file.\n */\n step: function (cb) {\n beforeStepCallback && beforeStepCallback(nodes, edges);\n var v12 = [];\n var nLen = nodes.length;\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n if (e.ignoreForceLayout) {\n continue;\n }\n var n1 = e.n1;\n var n2 = e.n2;\n vec2.sub(v12, n2.p, n1.p);\n var d = vec2.len(v12) - e.d;\n var w = n2.w / (n1.w + n2.w);\n if (isNaN(w)) {\n w = 0;\n }\n vec2.normalize(v12, v12);\n !n1.fixed && scaleAndAdd(n1.p, n1.p, v12, w * d * friction);\n !n2.fixed && scaleAndAdd(n2.p, n2.p, v12, -(1 - w) * d * friction);\n }\n // Gravity\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n if (!n.fixed) {\n vec2.sub(v12, center, n.p);\n // let d = vec2.len(v12);\n // vec2.scale(v12, v12, 1 / d);\n // let gravityFactor = gravity;\n scaleAndAdd(n.p, n.p, v12, gravity * friction);\n }\n }\n // Repulsive\n // PENDING\n for (var i = 0; i < nLen; i++) {\n var n1 = nodes[i];\n for (var j = i + 1; j < nLen; j++) {\n var n2 = nodes[j];\n vec2.sub(v12, n2.p, n1.p);\n var d = vec2.len(v12);\n if (d === 0) {\n // Random repulse\n vec2.set(v12, Math.random() - 0.5, Math.random() - 0.5);\n d = 1;\n }\n var repFact = (n1.rep + n2.rep) / d / d;\n !n1.fixed && scaleAndAdd(n1.pp, n1.pp, v12, repFact);\n !n2.fixed && scaleAndAdd(n2.pp, n2.pp, v12, -repFact);\n }\n }\n var v = [];\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n if (!n.fixed) {\n vec2.sub(v, n.p, n.pp);\n scaleAndAdd(n.p, n.p, v, friction);\n vec2.copy(n.pp, n.p);\n }\n }\n friction = friction * 0.992;\n var finished = friction < 0.01;\n afterStepCallback && afterStepCallback(nodes, edges, finished);\n cb && cb(finished);\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { forceLayout } from './forceHelper.js';\nimport { simpleLayout } from './simpleLayoutHelper.js';\nimport { circularLayout } from './circularLayoutHelper.js';\nimport { linearMap } from '../../util/number.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper.js';\nexport default function graphForceLayout(ecModel) {\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var coordSys = graphSeries.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n if (graphSeries.get('layout') === 'force') {\n var preservedPoints_1 = graphSeries.preservedPoints || {};\n var graph_1 = graphSeries.getGraph();\n var nodeData_1 = graph_1.data;\n var edgeData = graph_1.edgeData;\n var forceModel = graphSeries.getModel('force');\n var initLayout = forceModel.get('initLayout');\n if (graphSeries.preservedPoints) {\n nodeData_1.each(function (idx) {\n var id = nodeData_1.getId(idx);\n nodeData_1.setItemLayout(idx, preservedPoints_1[id] || [NaN, NaN]);\n });\n } else if (!initLayout || initLayout === 'none') {\n simpleLayout(graphSeries);\n } else if (initLayout === 'circular') {\n circularLayout(graphSeries, 'value');\n }\n var nodeDataExtent_1 = nodeData_1.getDataExtent('value');\n var edgeDataExtent_1 = edgeData.getDataExtent('value');\n // let edgeDataExtent = edgeData.getDataExtent('value');\n var repulsion = forceModel.get('repulsion');\n var edgeLength = forceModel.get('edgeLength');\n var repulsionArr_1 = zrUtil.isArray(repulsion) ? repulsion : [repulsion, repulsion];\n var edgeLengthArr_1 = zrUtil.isArray(edgeLength) ? edgeLength : [edgeLength, edgeLength];\n // Larger value has smaller length\n edgeLengthArr_1 = [edgeLengthArr_1[1], edgeLengthArr_1[0]];\n var nodes_1 = nodeData_1.mapArray('value', function (value, idx) {\n var point = nodeData_1.getItemLayout(idx);\n var rep = linearMap(value, nodeDataExtent_1, repulsionArr_1);\n if (isNaN(rep)) {\n rep = (repulsionArr_1[0] + repulsionArr_1[1]) / 2;\n }\n return {\n w: rep,\n rep: rep,\n fixed: nodeData_1.getItemModel(idx).get('fixed'),\n p: !point || isNaN(point[0]) || isNaN(point[1]) ? null : point\n };\n });\n var edges = edgeData.mapArray('value', function (value, idx) {\n var edge = graph_1.getEdgeByIndex(idx);\n var d = linearMap(value, edgeDataExtent_1, edgeLengthArr_1);\n if (isNaN(d)) {\n d = (edgeLengthArr_1[0] + edgeLengthArr_1[1]) / 2;\n }\n var edgeModel = edge.getModel();\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, graphSeries, idx, true), 0);\n return {\n n1: nodes_1[edge.node1.dataIndex],\n n2: nodes_1[edge.node2.dataIndex],\n d: d,\n curveness: curveness,\n ignoreForceLayout: edgeModel.get('ignoreForceLayout')\n };\n });\n // let coordSys = graphSeries.coordinateSystem;\n var rect = coordSys.getBoundingRect();\n var forceInstance = forceLayout(nodes_1, edges, {\n rect: rect,\n gravity: forceModel.get('gravity'),\n friction: forceModel.get('friction')\n });\n forceInstance.beforeStep(function (nodes, edges) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n if (nodes[i].fixed) {\n // Write back to layout instance\n vec2.copy(nodes[i].p, graph_1.getNodeByIndex(i).getLayout());\n }\n }\n });\n forceInstance.afterStep(function (nodes, edges, stopped) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n if (!nodes[i].fixed) {\n graph_1.getNodeByIndex(i).setLayout(nodes[i].p);\n }\n preservedPoints_1[nodeData_1.getId(i)] = nodes[i].p;\n }\n for (var i = 0, l = edges.length; i < l; i++) {\n var e = edges[i];\n var edge = graph_1.getEdgeByIndex(i);\n var p1 = e.n1.p;\n var p2 = e.n2.p;\n var points = edge.getLayout();\n points = points ? points.slice() : [];\n points[0] = points[0] || [];\n points[1] = points[1] || [];\n vec2.copy(points[0], p1);\n vec2.copy(points[1], p2);\n if (+e.curveness) {\n points[2] = [(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * e.curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * e.curveness];\n }\n edge.setLayout(points);\n }\n });\n graphSeries.forceLayout = forceInstance;\n graphSeries.preservedPoints = preservedPoints_1;\n // Step to get the layout\n forceInstance.step();\n } else {\n // Remove prev injected forceLayout instance\n graphSeries.forceLayout = null;\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME Where to create the simple view coordinate system\nimport View from '../../coord/View.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport * as bbox from 'zrender/lib/core/bbox.js';\nimport { extend } from 'zrender/lib/core/util.js';\nfunction getViewRect(seriesModel, api, aspect) {\n var option = extend(seriesModel.getBoxLayoutParams(), {\n aspect: aspect\n });\n return getLayoutRect(option, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\nexport default function createViewCoordSys(ecModel, api) {\n var viewList = [];\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var coordSysType = seriesModel.get('coordinateSystem');\n if (!coordSysType || coordSysType === 'view') {\n var data_1 = seriesModel.getData();\n var positions = data_1.mapArray(function (idx) {\n var itemModel = data_1.getItemModel(idx);\n return [+itemModel.get('x'), +itemModel.get('y')];\n });\n var min = [];\n var max = [];\n bbox.fromPoints(positions, min, max);\n // If width or height is 0\n if (max[0] - min[0] === 0) {\n max[0] += 1;\n min[0] -= 1;\n }\n if (max[1] - min[1] === 0) {\n max[1] += 1;\n min[1] -= 1;\n }\n var aspect = (max[0] - min[0]) / (max[1] - min[1]);\n // FIXME If get view rect after data processed?\n var viewRect = getViewRect(seriesModel, api, aspect);\n // Position may be NaN, use view rect instead\n if (isNaN(aspect)) {\n min = [viewRect.x, viewRect.y];\n max = [viewRect.x + viewRect.width, viewRect.y + viewRect.height];\n }\n var bbWidth = max[0] - min[0];\n var bbHeight = max[1] - min[1];\n var viewWidth = viewRect.width;\n var viewHeight = viewRect.height;\n var viewCoordSys = seriesModel.coordinateSystem = new View();\n viewCoordSys.zoomLimit = seriesModel.get('scaleLimit');\n viewCoordSys.setBoundingRect(min[0], min[1], bbWidth, bbHeight);\n viewCoordSys.setViewRect(viewRect.x, viewRect.y, viewWidth, viewHeight);\n // Update roam info\n viewCoordSys.setCenter(seriesModel.get('center'), api);\n viewCoordSys.setZoom(seriesModel.get('zoom'));\n viewList.push(viewCoordSys);\n }\n });\n return viewList;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Line path for bezier and straight line draw\n */\nimport * as graphic from '../../util/graphic.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nvar straightLineProto = graphic.Line.prototype;\nvar bezierCurveProto = graphic.BezierCurve.prototype;\nvar StraightLineShape = /** @class */function () {\n function StraightLineShape() {\n // Start point\n this.x1 = 0;\n this.y1 = 0;\n // End point\n this.x2 = 0;\n this.y2 = 0;\n this.percent = 1;\n }\n return StraightLineShape;\n}();\nvar CurveShape = /** @class */function (_super) {\n __extends(CurveShape, _super);\n function CurveShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return CurveShape;\n}(StraightLineShape);\nfunction isStraightLine(shape) {\n return isNaN(+shape.cpx1) || isNaN(+shape.cpy1);\n}\nvar ECLinePath = /** @class */function (_super) {\n __extends(ECLinePath, _super);\n function ECLinePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-line';\n return _this;\n }\n ECLinePath.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n ECLinePath.prototype.getDefaultShape = function () {\n return new StraightLineShape();\n };\n ECLinePath.prototype.buildPath = function (ctx, shape) {\n if (isStraightLine(shape)) {\n straightLineProto.buildPath.call(this, ctx, shape);\n } else {\n bezierCurveProto.buildPath.call(this, ctx, shape);\n }\n };\n ECLinePath.prototype.pointAt = function (t) {\n if (isStraightLine(this.shape)) {\n return straightLineProto.pointAt.call(this, t);\n } else {\n return bezierCurveProto.pointAt.call(this, t);\n }\n };\n ECLinePath.prototype.tangentAt = function (t) {\n var shape = this.shape;\n var p = isStraightLine(shape) ? [shape.x2 - shape.x1, shape.y2 - shape.y1] : bezierCurveProto.tangentAt.call(this, t);\n return vec2.normalize(p, p);\n };\n return ECLinePath;\n}(graphic.Path);\nexport default ECLinePath;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { isArray, each } from 'zrender/lib/core/util.js';\nimport * as vector from 'zrender/lib/core/vector.js';\nimport * as symbolUtil from '../../util/symbol.js';\nimport ECLinePath from './LinePath.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, enterEmphasis, leaveEmphasis, SPECIAL_STATES } from '../../util/states.js';\nimport { getLabelStatesModels, setLabelStyle } from '../../label/labelStyle.js';\nimport { round } from '../../util/number.js';\nvar SYMBOL_CATEGORIES = ['fromSymbol', 'toSymbol'];\nfunction makeSymbolTypeKey(symbolCategory) {\n return '_' + symbolCategory + 'Type';\n}\nfunction makeSymbolTypeValue(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n if (!symbolType || symbolType === 'none') {\n return symbolType;\n }\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n var symbolOffset = lineData.getItemVisual(idx, name + 'Offset');\n var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect');\n var symbolSizeArr = symbolUtil.normalizeSymbolSize(symbolSize);\n var symbolOffsetArr = symbolUtil.normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);\n return symbolType + symbolSizeArr + symbolOffsetArr + (symbolRotate || '') + (symbolKeepAspect || '');\n}\n/**\n * @inner\n */\nfunction createSymbol(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n if (!symbolType || symbolType === 'none') {\n return;\n }\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n var symbolOffset = lineData.getItemVisual(idx, name + 'Offset');\n var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect');\n var symbolSizeArr = symbolUtil.normalizeSymbolSize(symbolSize);\n var symbolOffsetArr = symbolUtil.normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);\n var symbolPath = symbolUtil.createSymbol(symbolType, -symbolSizeArr[0] / 2 + symbolOffsetArr[0], -symbolSizeArr[1] / 2 + symbolOffsetArr[1], symbolSizeArr[0], symbolSizeArr[1], null, symbolKeepAspect);\n symbolPath.__specifiedRotation = symbolRotate == null || isNaN(symbolRotate) ? void 0 : +symbolRotate * Math.PI / 180 || 0;\n symbolPath.name = name;\n return symbolPath;\n}\nfunction createLine(points) {\n var line = new ECLinePath({\n name: 'line',\n subPixelOptimize: true\n });\n setLinePoints(line.shape, points);\n return line;\n}\nfunction setLinePoints(targetShape, points) {\n targetShape.x1 = points[0][0];\n targetShape.y1 = points[0][1];\n targetShape.x2 = points[1][0];\n targetShape.y2 = points[1][1];\n targetShape.percent = 1;\n var cp1 = points[2];\n if (cp1) {\n targetShape.cpx1 = cp1[0];\n targetShape.cpy1 = cp1[1];\n } else {\n targetShape.cpx1 = NaN;\n targetShape.cpy1 = NaN;\n }\n}\nvar Line = /** @class */function (_super) {\n __extends(Line, _super);\n function Line(lineData, idx, seriesScope) {\n var _this = _super.call(this) || this;\n _this._createLine(lineData, idx, seriesScope);\n return _this;\n }\n Line.prototype._createLine = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var linePoints = lineData.getItemLayout(idx);\n var line = createLine(linePoints);\n line.shape.percent = 0;\n graphic.initProps(line, {\n shape: {\n percent: 1\n }\n }, seriesModel, idx);\n this.add(line);\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = createSymbol(symbolCategory, lineData, idx);\n // symbols must added after line to make sure\n // it will be updated after line#update.\n // Or symbol position and rotation update in line#beforeUpdate will be one frame slow\n this.add(symbol);\n this[makeSymbolTypeKey(symbolCategory)] = makeSymbolTypeValue(symbolCategory, lineData, idx);\n }, this);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n // TODO More strict on the List type in parameters?\n Line.prototype.updateData = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var linePoints = lineData.getItemLayout(idx);\n var target = {\n shape: {}\n };\n setLinePoints(target.shape, linePoints);\n graphic.updateProps(line, target, seriesModel, idx);\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbolType = makeSymbolTypeValue(symbolCategory, lineData, idx);\n var key = makeSymbolTypeKey(symbolCategory);\n // Symbol changed\n if (this[key] !== symbolType) {\n this.remove(this.childOfName(symbolCategory));\n var symbol = createSymbol(symbolCategory, lineData, idx);\n this.add(symbol);\n }\n this[key] = symbolType;\n }, this);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n ;\n Line.prototype.getLinePath = function () {\n return this.childAt(0);\n };\n Line.prototype._updateCommonStl = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle;\n var blurLineStyle = seriesScope && seriesScope.blurLineStyle;\n var selectLineStyle = seriesScope && seriesScope.selectLineStyle;\n var labelStatesModels = seriesScope && seriesScope.labelStatesModels;\n var emphasisDisabled = seriesScope && seriesScope.emphasisDisabled;\n var focus = seriesScope && seriesScope.focus;\n var blurScope = seriesScope && seriesScope.blurScope;\n // Optimization for large dataset\n if (!seriesScope || lineData.hasItemOption) {\n var itemModel = lineData.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle();\n blurLineStyle = itemModel.getModel(['blur', 'lineStyle']).getLineStyle();\n selectLineStyle = itemModel.getModel(['select', 'lineStyle']).getLineStyle();\n emphasisDisabled = emphasisModel.get('disabled');\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n labelStatesModels = getLabelStatesModels(itemModel);\n }\n var lineStyle = lineData.getItemVisual(idx, 'style');\n var visualColor = lineStyle.stroke;\n line.useStyle(lineStyle);\n line.style.fill = null;\n line.style.strokeNoScale = true;\n line.ensureState('emphasis').style = emphasisLineStyle;\n line.ensureState('blur').style = blurLineStyle;\n line.ensureState('select').style = selectLineStyle;\n // Update symbol\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = this.childOfName(symbolCategory);\n if (symbol) {\n // Share opacity and color with line.\n symbol.setColor(visualColor);\n symbol.style.opacity = lineStyle.opacity;\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n var stateName = SPECIAL_STATES[i];\n var lineState = line.getState(stateName);\n if (lineState) {\n var lineStateStyle = lineState.style || {};\n var state = symbol.ensureState(stateName);\n var stateStyle = state.style || (state.style = {});\n if (lineStateStyle.stroke != null) {\n stateStyle[symbol.__isEmptyBrush ? 'stroke' : 'fill'] = lineStateStyle.stroke;\n }\n if (lineStateStyle.opacity != null) {\n stateStyle.opacity = lineStateStyle.opacity;\n }\n }\n }\n symbol.markRedraw();\n }\n }, this);\n var rawVal = seriesModel.getRawValue(idx);\n setLabelStyle(this, labelStatesModels, {\n labelDataIndex: idx,\n labelFetcher: {\n getFormattedLabel: function (dataIndex, stateName) {\n return seriesModel.getFormattedLabel(dataIndex, stateName, lineData.dataType);\n }\n },\n inheritColor: visualColor || '#000',\n defaultOpacity: lineStyle.opacity,\n defaultText: (rawVal == null ? lineData.getName(idx) : isFinite(rawVal) ? round(rawVal) : rawVal) + ''\n });\n var label = this.getTextContent();\n // Always set `textStyle` even if `normalStyle.text` is null, because default\n // values have to be set on `normalStyle`.\n if (label) {\n var labelNormalModel = labelStatesModels.normal;\n label.__align = label.style.align;\n label.__verticalAlign = label.style.verticalAlign;\n // 'start', 'middle', 'end'\n label.__position = labelNormalModel.get('position') || 'middle';\n var distance = labelNormalModel.get('distance');\n if (!isArray(distance)) {\n distance = [distance, distance];\n }\n label.__labelDistance = distance;\n }\n this.setTextConfig({\n position: null,\n local: true,\n inside: false // Can't be inside for stroke element.\n });\n\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Line.prototype.highlight = function () {\n enterEmphasis(this);\n };\n Line.prototype.downplay = function () {\n leaveEmphasis(this);\n };\n Line.prototype.updateLayout = function (lineData, idx) {\n this.setLinePoints(lineData.getItemLayout(idx));\n };\n Line.prototype.setLinePoints = function (points) {\n var linePath = this.childOfName('line');\n setLinePoints(linePath.shape, points);\n linePath.dirty();\n };\n Line.prototype.beforeUpdate = function () {\n var lineGroup = this;\n var symbolFrom = lineGroup.childOfName('fromSymbol');\n var symbolTo = lineGroup.childOfName('toSymbol');\n var label = lineGroup.getTextContent();\n // Quick reject\n if (!symbolFrom && !symbolTo && (!label || label.ignore)) {\n return;\n }\n var invScale = 1;\n var parentNode = this.parent;\n while (parentNode) {\n if (parentNode.scaleX) {\n invScale /= parentNode.scaleX;\n }\n parentNode = parentNode.parent;\n }\n var line = lineGroup.childOfName('line');\n // If line not changed\n // FIXME Parent scale changed\n if (!this.__dirty && !line.__dirty) {\n return;\n }\n var percent = line.shape.percent;\n var fromPos = line.pointAt(0);\n var toPos = line.pointAt(percent);\n var d = vector.sub([], toPos, fromPos);\n vector.normalize(d, d);\n function setSymbolRotation(symbol, percent) {\n // Fix #12388\n // when symbol is set to be 'arrow' in markLine,\n // symbolRotate value will be ignored, and compulsively use tangent angle.\n // rotate by default if symbol rotation is not specified\n var specifiedRotation = symbol.__specifiedRotation;\n if (specifiedRotation == null) {\n var tangent = line.tangentAt(percent);\n symbol.attr('rotation', (percent === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(tangent[1], tangent[0]));\n } else {\n symbol.attr('rotation', specifiedRotation);\n }\n }\n if (symbolFrom) {\n symbolFrom.setPosition(fromPos);\n setSymbolRotation(symbolFrom, 0);\n symbolFrom.scaleX = symbolFrom.scaleY = invScale * percent;\n symbolFrom.markRedraw();\n }\n if (symbolTo) {\n symbolTo.setPosition(toPos);\n setSymbolRotation(symbolTo, 1);\n symbolTo.scaleX = symbolTo.scaleY = invScale * percent;\n symbolTo.markRedraw();\n }\n if (label && !label.ignore) {\n label.x = label.y = 0;\n label.originX = label.originY = 0;\n var textAlign = void 0;\n var textVerticalAlign = void 0;\n var distance = label.__labelDistance;\n var distanceX = distance[0] * invScale;\n var distanceY = distance[1] * invScale;\n var halfPercent = percent / 2;\n var tangent = line.tangentAt(halfPercent);\n var n = [tangent[1], -tangent[0]];\n var cp = line.pointAt(halfPercent);\n if (n[1] > 0) {\n n[0] = -n[0];\n n[1] = -n[1];\n }\n var dir = tangent[0] < 0 ? -1 : 1;\n if (label.__position !== 'start' && label.__position !== 'end') {\n var rotation = -Math.atan2(tangent[1], tangent[0]);\n if (toPos[0] < fromPos[0]) {\n rotation = Math.PI + rotation;\n }\n label.rotation = rotation;\n }\n var dy = void 0;\n switch (label.__position) {\n case 'insideStartTop':\n case 'insideMiddleTop':\n case 'insideEndTop':\n case 'middle':\n dy = -distanceY;\n textVerticalAlign = 'bottom';\n break;\n case 'insideStartBottom':\n case 'insideMiddleBottom':\n case 'insideEndBottom':\n dy = distanceY;\n textVerticalAlign = 'top';\n break;\n default:\n dy = 0;\n textVerticalAlign = 'middle';\n }\n switch (label.__position) {\n case 'end':\n label.x = d[0] * distanceX + toPos[0];\n label.y = d[1] * distanceY + toPos[1];\n textAlign = d[0] > 0.8 ? 'left' : d[0] < -0.8 ? 'right' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'top' : d[1] < -0.8 ? 'bottom' : 'middle';\n break;\n case 'start':\n label.x = -d[0] * distanceX + fromPos[0];\n label.y = -d[1] * distanceY + fromPos[1];\n textAlign = d[0] > 0.8 ? 'right' : d[0] < -0.8 ? 'left' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'bottom' : d[1] < -0.8 ? 'top' : 'middle';\n break;\n case 'insideStartTop':\n case 'insideStart':\n case 'insideStartBottom':\n label.x = distanceX * dir + fromPos[0];\n label.y = fromPos[1] + dy;\n textAlign = tangent[0] < 0 ? 'right' : 'left';\n label.originX = -distanceX * dir;\n label.originY = -dy;\n break;\n case 'insideMiddleTop':\n case 'insideMiddle':\n case 'insideMiddleBottom':\n case 'middle':\n label.x = cp[0];\n label.y = cp[1] + dy;\n textAlign = 'center';\n label.originY = -dy;\n break;\n case 'insideEndTop':\n case 'insideEnd':\n case 'insideEndBottom':\n label.x = -distanceX * dir + toPos[0];\n label.y = toPos[1] + dy;\n textAlign = tangent[0] >= 0 ? 'right' : 'left';\n label.originX = distanceX * dir;\n label.originY = -dy;\n break;\n }\n label.scaleX = label.scaleY = invScale;\n label.setStyle({\n // Use the user specified text align and baseline first\n verticalAlign: label.__verticalAlign || textVerticalAlign,\n align: label.__align || textAlign\n });\n }\n };\n return Line;\n}(graphic.Group);\nexport default Line;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport LineGroup from './Line.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nvar LineDraw = /** @class */function () {\n function LineDraw(LineCtor) {\n this.group = new graphic.Group();\n this._LineCtor = LineCtor || LineGroup;\n }\n LineDraw.prototype.updateData = function (lineData) {\n var _this = this;\n // Remove progressive els.\n this._progressiveEls = null;\n var lineDraw = this;\n var group = lineDraw.group;\n var oldLineData = lineDraw._lineData;\n lineDraw._lineData = lineData;\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldLineData) {\n group.removeAll();\n }\n var seriesScope = makeSeriesScope(lineData);\n lineData.diff(oldLineData).add(function (idx) {\n _this._doAdd(lineData, idx, seriesScope);\n }).update(function (newIdx, oldIdx) {\n _this._doUpdate(oldLineData, lineData, oldIdx, newIdx, seriesScope);\n }).remove(function (idx) {\n group.remove(oldLineData.getItemGraphicEl(idx));\n }).execute();\n };\n ;\n LineDraw.prototype.updateLayout = function () {\n var lineData = this._lineData;\n // Do not support update layout in incremental mode.\n if (!lineData) {\n return;\n }\n lineData.eachItemGraphicEl(function (el, idx) {\n el.updateLayout(lineData, idx);\n }, this);\n };\n ;\n LineDraw.prototype.incrementalPrepareUpdate = function (lineData) {\n this._seriesScope = makeSeriesScope(lineData);\n this._lineData = null;\n this.group.removeAll();\n };\n ;\n LineDraw.prototype.incrementalUpdate = function (taskParams, lineData) {\n this._progressiveEls = [];\n function updateIncrementalAndHover(el) {\n if (!el.isGroup && !isEffectObject(el)) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var itemLayout = lineData.getItemLayout(idx);\n if (lineNeedsDraw(itemLayout)) {\n var el = new this._LineCtor(lineData, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n this.group.add(el);\n lineData.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n LineDraw.prototype.remove = function () {\n this.group.removeAll();\n };\n ;\n LineDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n LineDraw.prototype._doAdd = function (lineData, idx, seriesScope) {\n var itemLayout = lineData.getItemLayout(idx);\n if (!lineNeedsDraw(itemLayout)) {\n return;\n }\n var el = new this._LineCtor(lineData, idx, seriesScope);\n lineData.setItemGraphicEl(idx, el);\n this.group.add(el);\n };\n LineDraw.prototype._doUpdate = function (oldLineData, newLineData, oldIdx, newIdx, seriesScope) {\n var itemEl = oldLineData.getItemGraphicEl(oldIdx);\n if (!lineNeedsDraw(newLineData.getItemLayout(newIdx))) {\n this.group.remove(itemEl);\n return;\n }\n if (!itemEl) {\n itemEl = new this._LineCtor(newLineData, newIdx, seriesScope);\n } else {\n itemEl.updateData(newLineData, newIdx, seriesScope);\n }\n newLineData.setItemGraphicEl(newIdx, itemEl);\n this.group.add(itemEl);\n };\n return LineDraw;\n}();\nfunction isEffectObject(el) {\n return el.animators && el.animators.length > 0;\n}\nfunction makeSeriesScope(lineData) {\n var hostModel = lineData.hostModel;\n var emphasisModel = hostModel.getModel('emphasis');\n return {\n lineStyle: hostModel.getModel('lineStyle').getLineStyle(),\n emphasisLineStyle: emphasisModel.getModel(['lineStyle']).getLineStyle(),\n blurLineStyle: hostModel.getModel(['blur', 'lineStyle']).getLineStyle(),\n selectLineStyle: hostModel.getModel(['select', 'lineStyle']).getLineStyle(),\n emphasisDisabled: emphasisModel.get('disabled'),\n blurScope: emphasisModel.get('blurScope'),\n focus: emphasisModel.get('focus'),\n labelStatesModels: getLabelStatesModels(hostModel)\n };\n}\nfunction isPointNaN(pt) {\n return isNaN(pt[0]) || isNaN(pt[1]);\n}\nfunction lineNeedsDraw(pts) {\n return pts && !isPointNaN(pts[0]) && !isPointNaN(pts[1]);\n}\nexport default LineDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as curveTool from 'zrender/lib/core/curve.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport { getSymbolSize } from './graphHelper.js';\nvar v1 = [];\nvar v2 = [];\nvar v3 = [];\nvar quadraticAt = curveTool.quadraticAt;\nvar v2DistSquare = vec2.distSquare;\nvar mathAbs = Math.abs;\nfunction intersectCurveCircle(curvePoints, center, radius) {\n var p0 = curvePoints[0];\n var p1 = curvePoints[1];\n var p2 = curvePoints[2];\n var d = Infinity;\n var t;\n var radiusSquare = radius * radius;\n var interval = 0.1;\n for (var _t = 0.1; _t <= 0.9; _t += 0.1) {\n v1[0] = quadraticAt(p0[0], p1[0], p2[0], _t);\n v1[1] = quadraticAt(p0[1], p1[1], p2[1], _t);\n var diff = mathAbs(v2DistSquare(v1, center) - radiusSquare);\n if (diff < d) {\n d = diff;\n t = _t;\n }\n }\n // Assume the segment is monotone,Find root through Bisection method\n // At most 32 iteration\n for (var i = 0; i < 32; i++) {\n // let prev = t - interval;\n var next = t + interval;\n // v1[0] = quadraticAt(p0[0], p1[0], p2[0], prev);\n // v1[1] = quadraticAt(p0[1], p1[1], p2[1], prev);\n v2[0] = quadraticAt(p0[0], p1[0], p2[0], t);\n v2[1] = quadraticAt(p0[1], p1[1], p2[1], t);\n v3[0] = quadraticAt(p0[0], p1[0], p2[0], next);\n v3[1] = quadraticAt(p0[1], p1[1], p2[1], next);\n var diff = v2DistSquare(v2, center) - radiusSquare;\n if (mathAbs(diff) < 1e-2) {\n break;\n }\n // let prevDiff = v2DistSquare(v1, center) - radiusSquare;\n var nextDiff = v2DistSquare(v3, center) - radiusSquare;\n interval /= 2;\n if (diff < 0) {\n if (nextDiff >= 0) {\n t = t + interval;\n } else {\n t = t - interval;\n }\n } else {\n if (nextDiff >= 0) {\n t = t - interval;\n } else {\n t = t + interval;\n }\n }\n }\n return t;\n}\n// Adjust edge to avoid\nexport default function adjustEdge(graph, scale) {\n var tmp0 = [];\n var quadraticSubdivide = curveTool.quadraticSubdivide;\n var pts = [[], [], []];\n var pts2 = [[], []];\n var v = [];\n scale /= 2;\n graph.eachEdge(function (edge, idx) {\n var linePoints = edge.getLayout();\n var fromSymbol = edge.getVisual('fromSymbol');\n var toSymbol = edge.getVisual('toSymbol');\n if (!linePoints.__original) {\n linePoints.__original = [vec2.clone(linePoints[0]), vec2.clone(linePoints[1])];\n if (linePoints[2]) {\n linePoints.__original.push(vec2.clone(linePoints[2]));\n }\n }\n var originalPoints = linePoints.__original;\n // Quadratic curve\n if (linePoints[2] != null) {\n vec2.copy(pts[0], originalPoints[0]);\n vec2.copy(pts[1], originalPoints[2]);\n vec2.copy(pts[2], originalPoints[1]);\n if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n var t = intersectCurveCircle(pts, originalPoints[0], symbolSize * scale);\n // Subdivide and get the second\n quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0);\n pts[0][0] = tmp0[3];\n pts[1][0] = tmp0[4];\n quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0);\n pts[0][1] = tmp0[3];\n pts[1][1] = tmp0[4];\n }\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n var t = intersectCurveCircle(pts, originalPoints[1], symbolSize * scale);\n // Subdivide and get the first\n quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0);\n pts[1][0] = tmp0[1];\n pts[2][0] = tmp0[2];\n quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0);\n pts[1][1] = tmp0[1];\n pts[2][1] = tmp0[2];\n }\n // Copy back to layout\n vec2.copy(linePoints[0], pts[0]);\n vec2.copy(linePoints[1], pts[2]);\n vec2.copy(linePoints[2], pts[1]);\n }\n // Line\n else {\n vec2.copy(pts2[0], originalPoints[0]);\n vec2.copy(pts2[1], originalPoints[1]);\n vec2.sub(v, pts2[1], pts2[0]);\n vec2.normalize(v, v);\n if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n vec2.scaleAndAdd(pts2[0], pts2[0], v, symbolSize * scale);\n }\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n vec2.scaleAndAdd(pts2[1], pts2[1], v, -symbolSize * scale);\n }\n vec2.copy(linePoints[0], pts2[0]);\n vec2.copy(linePoints[1], pts2[1]);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport LineDraw from '../helper/LineDraw.js';\nimport RoamController from '../../component/helper/RoamController.js';\nimport * as roamHelper from '../../component/helper/roamHelper.js';\nimport { onIrrelevantElement } from '../../component/helper/cursorHelper.js';\nimport * as graphic from '../../util/graphic.js';\nimport adjustEdge from './adjustEdge.js';\nimport { getNodeGlobalScale } from './graphHelper.js';\nimport ChartView from '../../view/Chart.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { simpleLayoutEdge } from './simpleLayoutHelper.js';\nimport { circularLayout, rotateNodeLabel } from './circularLayoutHelper.js';\nfunction isViewCoordSys(coordSys) {\n return coordSys.type === 'view';\n}\nvar GraphView = /** @class */function (_super) {\n __extends(GraphView, _super);\n function GraphView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphView.type;\n return _this;\n }\n GraphView.prototype.init = function (ecModel, api) {\n var symbolDraw = new SymbolDraw();\n var lineDraw = new LineDraw();\n var group = this.group;\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: group\n };\n group.add(symbolDraw.group);\n group.add(lineDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineDraw = lineDraw;\n this._firstRender = true;\n };\n GraphView.prototype.render = function (seriesModel, ecModel, api) {\n var _this = this;\n var coordSys = seriesModel.coordinateSystem;\n this._model = seriesModel;\n var symbolDraw = this._symbolDraw;\n var lineDraw = this._lineDraw;\n var group = this.group;\n if (isViewCoordSys(coordSys)) {\n var groupNewProp = {\n x: coordSys.x,\n y: coordSys.y,\n scaleX: coordSys.scaleX,\n scaleY: coordSys.scaleY\n };\n if (this._firstRender) {\n group.attr(groupNewProp);\n } else {\n graphic.updateProps(group, groupNewProp, seriesModel);\n }\n }\n // Fix edge contact point with node\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n var data = seriesModel.getData();\n symbolDraw.updateData(data);\n var edgeData = seriesModel.getEdgeData();\n // TODO: TYPE\n lineDraw.updateData(edgeData);\n this._updateNodeAndLinkScale();\n this._updateController(seriesModel, ecModel, api);\n clearTimeout(this._layoutTimeout);\n var forceLayout = seriesModel.forceLayout;\n var layoutAnimation = seriesModel.get(['force', 'layoutAnimation']);\n if (forceLayout) {\n this._startForceLayoutIteration(forceLayout, layoutAnimation);\n }\n var layout = seriesModel.get('layout');\n data.graph.eachNode(function (node) {\n var idx = node.dataIndex;\n var el = node.getGraphicEl();\n var itemModel = node.getModel();\n if (!el) {\n return;\n }\n // Update draggable\n el.off('drag').off('dragend');\n var draggable = itemModel.get('draggable');\n if (draggable) {\n el.on('drag', function (e) {\n switch (layout) {\n case 'force':\n forceLayout.warmUp();\n !_this._layouting && _this._startForceLayoutIteration(forceLayout, layoutAnimation);\n forceLayout.setFixed(idx);\n // Write position back to layout\n data.setItemLayout(idx, [el.x, el.y]);\n break;\n case 'circular':\n data.setItemLayout(idx, [el.x, el.y]);\n // mark node fixed\n node.setLayout({\n fixed: true\n }, true);\n // recalculate circular layout\n circularLayout(seriesModel, 'symbolSize', node, [e.offsetX, e.offsetY]);\n _this.updateLayout(seriesModel);\n break;\n case 'none':\n default:\n data.setItemLayout(idx, [el.x, el.y]);\n // update edge\n simpleLayoutEdge(seriesModel.getGraph(), seriesModel);\n _this.updateLayout(seriesModel);\n break;\n }\n }).on('dragend', function () {\n if (forceLayout) {\n forceLayout.setUnfixed(idx);\n }\n });\n }\n el.setDraggable(draggable, !!itemModel.get('cursor'));\n var focus = itemModel.get(['emphasis', 'focus']);\n if (focus === 'adjacency') {\n getECData(el).focus = node.getAdjacentDataIndices();\n }\n });\n data.graph.eachEdge(function (edge) {\n var el = edge.getGraphicEl();\n var focus = edge.getModel().get(['emphasis', 'focus']);\n if (!el) {\n return;\n }\n if (focus === 'adjacency') {\n getECData(el).focus = {\n edge: [edge.dataIndex],\n node: [edge.node1.dataIndex, edge.node2.dataIndex]\n };\n }\n });\n var circularRotateLabel = seriesModel.get('layout') === 'circular' && seriesModel.get(['circular', 'rotateLabel']);\n var cx = data.getLayout('cx');\n var cy = data.getLayout('cy');\n data.graph.eachNode(function (node) {\n rotateNodeLabel(node, circularRotateLabel, cx, cy);\n });\n this._firstRender = false;\n };\n GraphView.prototype.dispose = function () {\n this.remove();\n this._controller && this._controller.dispose();\n this._controllerHost = null;\n };\n GraphView.prototype._startForceLayoutIteration = function (forceLayout, layoutAnimation) {\n var self = this;\n (function step() {\n forceLayout.step(function (stopped) {\n self.updateLayout(self._model);\n (self._layouting = !stopped) && (layoutAnimation ? self._layoutTimeout = setTimeout(step, 16) : step());\n });\n })();\n };\n GraphView.prototype._updateController = function (seriesModel, ecModel, api) {\n var _this = this;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n var group = this.group;\n controller.setPointerChecker(function (e, x, y) {\n var rect = group.getBoundingRect();\n rect.applyTransform(group.transform);\n return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel);\n });\n if (!isViewCoordSys(seriesModel.coordinateSystem)) {\n controller.disable();\n return;\n }\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n controller.off('pan').off('zoom').on('pan', function (e) {\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'graphRoam',\n dx: e.dx,\n dy: e.dy\n });\n }).on('zoom', function (e) {\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'graphRoam',\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n });\n _this._updateNodeAndLinkScale();\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n _this._lineDraw.updateLayout();\n // Only update label layout on zoom\n api.updateLabelLayout();\n });\n };\n GraphView.prototype._updateNodeAndLinkScale = function () {\n var seriesModel = this._model;\n var data = seriesModel.getData();\n var nodeScale = getNodeGlobalScale(seriesModel);\n data.eachItemGraphicEl(function (el, idx) {\n el && el.setSymbolScale(nodeScale);\n });\n };\n GraphView.prototype.updateLayout = function (seriesModel) {\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n this._symbolDraw.updateLayout();\n this._lineDraw.updateLayout();\n };\n GraphView.prototype.remove = function () {\n clearTimeout(this._layoutTimeout);\n this._layouting = false;\n this._layoutTimeout = null;\n this._symbolDraw && this._symbolDraw.remove();\n this._lineDraw && this._lineDraw.remove();\n };\n GraphView.type = 'graph';\n return GraphView;\n}(ChartView);\nexport default GraphView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\n// id may be function name of Object, add a prefix to avoid this problem.\nfunction generateNodeKey(id) {\n return '_EC_' + id;\n}\nvar Graph = /** @class */function () {\n function Graph(directed) {\n this.type = 'graph';\n this.nodes = [];\n this.edges = [];\n this._nodesMap = {};\n /**\n * @type {Object.}\n * @private\n */\n this._edgesMap = {};\n this._directed = directed || false;\n }\n /**\n * If is directed graph\n */\n Graph.prototype.isDirected = function () {\n return this._directed;\n };\n ;\n /**\n * Add a new node\n */\n Graph.prototype.addNode = function (id, dataIndex) {\n id = id == null ? '' + dataIndex : '' + id;\n var nodesMap = this._nodesMap;\n if (nodesMap[generateNodeKey(id)]) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Graph nodes have duplicate name or id');\n }\n return;\n }\n var node = new GraphNode(id, dataIndex);\n node.hostGraph = this;\n this.nodes.push(node);\n nodesMap[generateNodeKey(id)] = node;\n return node;\n };\n ;\n /**\n * Get node by data index\n */\n Graph.prototype.getNodeByIndex = function (dataIndex) {\n var rawIdx = this.data.getRawIndex(dataIndex);\n return this.nodes[rawIdx];\n };\n ;\n /**\n * Get node by id\n */\n Graph.prototype.getNodeById = function (id) {\n return this._nodesMap[generateNodeKey(id)];\n };\n ;\n /**\n * Add a new edge\n */\n Graph.prototype.addEdge = function (n1, n2, dataIndex) {\n var nodesMap = this._nodesMap;\n var edgesMap = this._edgesMap;\n // PENDING\n if (zrUtil.isNumber(n1)) {\n n1 = this.nodes[n1];\n }\n if (zrUtil.isNumber(n2)) {\n n2 = this.nodes[n2];\n }\n if (!(n1 instanceof GraphNode)) {\n n1 = nodesMap[generateNodeKey(n1)];\n }\n if (!(n2 instanceof GraphNode)) {\n n2 = nodesMap[generateNodeKey(n2)];\n }\n if (!n1 || !n2) {\n return;\n }\n var key = n1.id + '-' + n2.id;\n var edge = new GraphEdge(n1, n2, dataIndex);\n edge.hostGraph = this;\n if (this._directed) {\n n1.outEdges.push(edge);\n n2.inEdges.push(edge);\n }\n n1.edges.push(edge);\n if (n1 !== n2) {\n n2.edges.push(edge);\n }\n this.edges.push(edge);\n edgesMap[key] = edge;\n return edge;\n };\n ;\n /**\n * Get edge by data index\n */\n Graph.prototype.getEdgeByIndex = function (dataIndex) {\n var rawIdx = this.edgeData.getRawIndex(dataIndex);\n return this.edges[rawIdx];\n };\n ;\n /**\n * Get edge by two linked nodes\n */\n Graph.prototype.getEdge = function (n1, n2) {\n if (n1 instanceof GraphNode) {\n n1 = n1.id;\n }\n if (n2 instanceof GraphNode) {\n n2 = n2.id;\n }\n var edgesMap = this._edgesMap;\n if (this._directed) {\n return edgesMap[n1 + '-' + n2];\n } else {\n return edgesMap[n1 + '-' + n2] || edgesMap[n2 + '-' + n1];\n }\n };\n ;\n /**\n * Iterate all nodes\n */\n Graph.prototype.eachNode = function (cb, context) {\n var nodes = this.nodes;\n var len = nodes.length;\n for (var i = 0; i < len; i++) {\n if (nodes[i].dataIndex >= 0) {\n cb.call(context, nodes[i], i);\n }\n }\n };\n ;\n /**\n * Iterate all edges\n */\n Graph.prototype.eachEdge = function (cb, context) {\n var edges = this.edges;\n var len = edges.length;\n for (var i = 0; i < len; i++) {\n if (edges[i].dataIndex >= 0 && edges[i].node1.dataIndex >= 0 && edges[i].node2.dataIndex >= 0) {\n cb.call(context, edges[i], i);\n }\n }\n };\n ;\n /**\n * Breadth first traverse\n * Return true to stop traversing\n */\n Graph.prototype.breadthFirstTraverse = function (cb, startNode, direction, context) {\n if (!(startNode instanceof GraphNode)) {\n startNode = this._nodesMap[generateNodeKey(startNode)];\n }\n if (!startNode) {\n return;\n }\n var edgeType = direction === 'out' ? 'outEdges' : direction === 'in' ? 'inEdges' : 'edges';\n for (var i = 0; i < this.nodes.length; i++) {\n this.nodes[i].__visited = false;\n }\n if (cb.call(context, startNode, null)) {\n return;\n }\n var queue = [startNode];\n while (queue.length) {\n var currentNode = queue.shift();\n var edges = currentNode[edgeType];\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n var otherNode = e.node1 === currentNode ? e.node2 : e.node1;\n if (!otherNode.__visited) {\n if (cb.call(context, otherNode, currentNode)) {\n // Stop traversing\n return;\n }\n queue.push(otherNode);\n otherNode.__visited = true;\n }\n }\n }\n };\n ;\n // TODO\n // depthFirstTraverse(\n // cb, startNode, direction, context\n // ) {\n // };\n // Filter update\n Graph.prototype.update = function () {\n var data = this.data;\n var edgeData = this.edgeData;\n var nodes = this.nodes;\n var edges = this.edges;\n for (var i = 0, len = nodes.length; i < len; i++) {\n nodes[i].dataIndex = -1;\n }\n for (var i = 0, len = data.count(); i < len; i++) {\n nodes[data.getRawIndex(i)].dataIndex = i;\n }\n edgeData.filterSelf(function (idx) {\n var edge = edges[edgeData.getRawIndex(idx)];\n return edge.node1.dataIndex >= 0 && edge.node2.dataIndex >= 0;\n });\n // Update edge\n for (var i = 0, len = edges.length; i < len; i++) {\n edges[i].dataIndex = -1;\n }\n for (var i = 0, len = edgeData.count(); i < len; i++) {\n edges[edgeData.getRawIndex(i)].dataIndex = i;\n }\n };\n ;\n /**\n * @return {module:echarts/data/Graph}\n */\n Graph.prototype.clone = function () {\n var graph = new Graph(this._directed);\n var nodes = this.nodes;\n var edges = this.edges;\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(nodes[i].id, nodes[i].dataIndex);\n }\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n graph.addEdge(e.node1.id, e.node2.id, e.dataIndex);\n }\n return graph;\n };\n ;\n return Graph;\n}();\nvar GraphNode = /** @class */function () {\n function GraphNode(id, dataIndex) {\n this.inEdges = [];\n this.outEdges = [];\n this.edges = [];\n this.dataIndex = -1;\n this.id = id == null ? '' : id;\n this.dataIndex = dataIndex == null ? -1 : dataIndex;\n }\n /**\n * @return {number}\n */\n GraphNode.prototype.degree = function () {\n return this.edges.length;\n };\n /**\n * @return {number}\n */\n GraphNode.prototype.inDegree = function () {\n return this.inEdges.length;\n };\n /**\n * @return {number}\n */\n GraphNode.prototype.outDegree = function () {\n return this.outEdges.length;\n };\n GraphNode.prototype.getModel = function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n var graph = this.hostGraph;\n var itemModel = graph.data.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n };\n GraphNode.prototype.getAdjacentDataIndices = function () {\n var dataIndices = {\n edge: [],\n node: []\n };\n for (var i = 0; i < this.edges.length; i++) {\n var adjacentEdge = this.edges[i];\n if (adjacentEdge.dataIndex < 0) {\n continue;\n }\n dataIndices.edge.push(adjacentEdge.dataIndex);\n dataIndices.node.push(adjacentEdge.node1.dataIndex, adjacentEdge.node2.dataIndex);\n }\n return dataIndices;\n };\n GraphNode.prototype.getTrajectoryDataIndices = function () {\n var connectedEdgesMap = zrUtil.createHashMap();\n var connectedNodesMap = zrUtil.createHashMap();\n for (var i = 0; i < this.edges.length; i++) {\n var adjacentEdge = this.edges[i];\n if (adjacentEdge.dataIndex < 0) {\n continue;\n }\n connectedEdgesMap.set(adjacentEdge.dataIndex, true);\n var sourceNodesQueue = [adjacentEdge.node1];\n var targetNodesQueue = [adjacentEdge.node2];\n var nodeIteratorIndex = 0;\n while (nodeIteratorIndex < sourceNodesQueue.length) {\n var sourceNode = sourceNodesQueue[nodeIteratorIndex];\n nodeIteratorIndex++;\n connectedNodesMap.set(sourceNode.dataIndex, true);\n for (var j = 0; j < sourceNode.inEdges.length; j++) {\n connectedEdgesMap.set(sourceNode.inEdges[j].dataIndex, true);\n sourceNodesQueue.push(sourceNode.inEdges[j].node1);\n }\n }\n nodeIteratorIndex = 0;\n while (nodeIteratorIndex < targetNodesQueue.length) {\n var targetNode = targetNodesQueue[nodeIteratorIndex];\n nodeIteratorIndex++;\n connectedNodesMap.set(targetNode.dataIndex, true);\n for (var j = 0; j < targetNode.outEdges.length; j++) {\n connectedEdgesMap.set(targetNode.outEdges[j].dataIndex, true);\n targetNodesQueue.push(targetNode.outEdges[j].node2);\n }\n }\n }\n return {\n edge: connectedEdgesMap.keys(),\n node: connectedNodesMap.keys()\n };\n };\n return GraphNode;\n}();\nvar GraphEdge = /** @class */function () {\n function GraphEdge(n1, n2, dataIndex) {\n this.dataIndex = -1;\n this.node1 = n1;\n this.node2 = n2;\n this.dataIndex = dataIndex == null ? -1 : dataIndex;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n GraphEdge.prototype.getModel = function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n var graph = this.hostGraph;\n var itemModel = graph.edgeData.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n };\n GraphEdge.prototype.getAdjacentDataIndices = function () {\n return {\n edge: [this.dataIndex],\n node: [this.node1.dataIndex, this.node2.dataIndex]\n };\n };\n GraphEdge.prototype.getTrajectoryDataIndices = function () {\n var connectedEdgesMap = zrUtil.createHashMap();\n var connectedNodesMap = zrUtil.createHashMap();\n connectedEdgesMap.set(this.dataIndex, true);\n var sourceNodes = [this.node1];\n var targetNodes = [this.node2];\n var nodeIteratorIndex = 0;\n while (nodeIteratorIndex < sourceNodes.length) {\n var sourceNode = sourceNodes[nodeIteratorIndex];\n nodeIteratorIndex++;\n connectedNodesMap.set(sourceNode.dataIndex, true);\n for (var j = 0; j < sourceNode.inEdges.length; j++) {\n connectedEdgesMap.set(sourceNode.inEdges[j].dataIndex, true);\n sourceNodes.push(sourceNode.inEdges[j].node1);\n }\n }\n nodeIteratorIndex = 0;\n while (nodeIteratorIndex < targetNodes.length) {\n var targetNode = targetNodes[nodeIteratorIndex];\n nodeIteratorIndex++;\n connectedNodesMap.set(targetNode.dataIndex, true);\n for (var j = 0; j < targetNode.outEdges.length; j++) {\n connectedEdgesMap.set(targetNode.outEdges[j].dataIndex, true);\n targetNodes.push(targetNode.outEdges[j].node2);\n }\n }\n return {\n edge: connectedEdgesMap.keys(),\n node: connectedNodesMap.keys()\n };\n };\n return GraphEdge;\n}();\nfunction createGraphDataProxyMixin(hostName, dataName) {\n return {\n /**\n * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.\n */\n getValue: function (dimension) {\n var data = this[hostName][dataName];\n return data.getStore().get(data.getDimensionIndex(dimension || 'value'), this.dataIndex);\n },\n // TODO: TYPE stricter type.\n setVisual: function (key, value) {\n this.dataIndex >= 0 && this[hostName][dataName].setItemVisual(this.dataIndex, key, value);\n },\n getVisual: function (key) {\n return this[hostName][dataName].getItemVisual(this.dataIndex, key);\n },\n setLayout: function (layout, merge) {\n this.dataIndex >= 0 && this[hostName][dataName].setItemLayout(this.dataIndex, layout, merge);\n },\n getLayout: function () {\n return this[hostName][dataName].getItemLayout(this.dataIndex);\n },\n getGraphicEl: function () {\n return this[hostName][dataName].getItemGraphicEl(this.dataIndex);\n },\n getRawIndex: function () {\n return this[hostName][dataName].getRawIndex(this.dataIndex);\n }\n };\n}\n;\n;\n;\nzrUtil.mixin(GraphNode, createGraphDataProxyMixin('hostGraph', 'data'));\nzrUtil.mixin(GraphEdge, createGraphDataProxyMixin('hostGraph', 'edgeData'));\nexport default Graph;\nexport { GraphNode, GraphEdge };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport Graph from '../../data/Graph.js';\nimport linkSeriesData from '../../data/helper/linkSeriesData.js';\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport CoordinateSystem from '../../core/CoordinateSystem.js';\nimport createSeriesData from './createSeriesData.js';\nimport { convertOptionIdName } from '../../util/model.js';\nexport default function createGraphFromNodeEdge(nodes, edges, seriesModel, directed, beforeLink) {\n // ??? TODO\n // support dataset?\n var graph = new Graph(directed);\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(zrUtil.retrieve(\n // Id, name, dataIndex\n nodes[i].id, nodes[i].name, i), i);\n }\n var linkNameList = [];\n var validEdges = [];\n var linkCount = 0;\n for (var i = 0; i < edges.length; i++) {\n var link = edges[i];\n var source = link.source;\n var target = link.target;\n // addEdge may fail when source or target not exists\n if (graph.addEdge(source, target, linkCount)) {\n validEdges.push(link);\n linkNameList.push(zrUtil.retrieve(convertOptionIdName(link.id, null), source + ' > ' + target));\n linkCount++;\n }\n }\n var coordSys = seriesModel.get('coordinateSystem');\n var nodeData;\n if (coordSys === 'cartesian2d' || coordSys === 'polar') {\n nodeData = createSeriesData(nodes, seriesModel);\n } else {\n var coordSysCtor = CoordinateSystem.get(coordSys);\n var coordDimensions = coordSysCtor ? coordSysCtor.dimensions || [] : [];\n // FIXME: Some geo do not need `value` dimenson, whereas `calendar` needs\n // `value` dimension, but graph need `value` dimension. It's better to\n // uniform this behavior.\n if (zrUtil.indexOf(coordDimensions, 'value') < 0) {\n coordDimensions.concat(['value']);\n }\n var dimensions = prepareSeriesDataSchema(nodes, {\n coordDimensions: coordDimensions,\n encodeDefine: seriesModel.getEncode()\n }).dimensions;\n nodeData = new SeriesData(dimensions, seriesModel);\n nodeData.initData(nodes);\n }\n var edgeData = new SeriesData(['value'], seriesModel);\n edgeData.initData(validEdges, linkNameList);\n beforeLink && beforeLink(nodeData, edgeData);\n linkSeriesData({\n mainData: nodeData,\n struct: graph,\n structAttr: 'graph',\n datas: {\n node: nodeData,\n edge: edgeData\n },\n datasAttr: {\n node: 'data',\n edge: 'edgeData'\n }\n });\n // Update dataIndex of nodes and edges because invalid edge may be removed\n graph.update();\n return graph;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesData from '../../data/SeriesData.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { defaultEmphasis } from '../../util/model.js';\nimport Model from '../../model/Model.js';\nimport createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport SeriesModel from '../../model/Series.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport { defaultSeriesFormatTooltip } from '../../component/tooltip/seriesFormatTooltip.js';\nimport { initCurvenessList, createEdgeMapForCurveness } from '../helper/multipleGraphEdgeHelper.js';\nvar GraphSeriesModel = /** @class */function (_super) {\n __extends(GraphSeriesModel, _super);\n function GraphSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n GraphSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n var self = this;\n function getCategoriesData() {\n return self._categoriesData;\n }\n // Provide data for legend select\n this.legendVisualProvider = new LegendVisualProvider(getCategoriesData, getCategoriesData);\n this.fillDataTextStyle(option.edges || option.links);\n this._updateCategoriesData();\n };\n GraphSeriesModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n this.fillDataTextStyle(option.edges || option.links);\n this._updateCategoriesData();\n };\n GraphSeriesModel.prototype.mergeDefaultAndTheme = function (option) {\n _super.prototype.mergeDefaultAndTheme.apply(this, arguments);\n defaultEmphasis(option, 'edgeLabel', ['show']);\n };\n GraphSeriesModel.prototype.getInitialData = function (option, ecModel) {\n var edges = option.edges || option.links || [];\n var nodes = option.data || option.nodes || [];\n var self = this;\n if (nodes && edges) {\n // auto curveness\n initCurvenessList(this);\n var graph = createGraphFromNodeEdge(nodes, edges, this, true, beforeLink);\n zrUtil.each(graph.edges, function (edge) {\n createEdgeMapForCurveness(edge.node1, edge.node2, this, edge.dataIndex);\n }, this);\n return graph.data;\n }\n function beforeLink(nodeData, edgeData) {\n // Overwrite nodeData.getItemModel to\n nodeData.wrapMethod('getItemModel', function (model) {\n var categoriesModels = self._categoriesModels;\n var categoryIdx = model.getShallow('category');\n var categoryModel = categoriesModels[categoryIdx];\n if (categoryModel) {\n categoryModel.parentModel = model.parentModel;\n model.parentModel = categoryModel;\n }\n return model;\n });\n // TODO Inherit resolveParentPath by default in Model#getModel?\n var oldGetModel = Model.prototype.getModel;\n function newGetModel(path, parentModel) {\n var model = oldGetModel.call(this, path, parentModel);\n model.resolveParentPath = resolveParentPath;\n return model;\n }\n edgeData.wrapMethod('getItemModel', function (model) {\n model.resolveParentPath = resolveParentPath;\n model.getModel = newGetModel;\n return model;\n });\n function resolveParentPath(pathArr) {\n if (pathArr && (pathArr[0] === 'label' || pathArr[1] === 'label')) {\n var newPathArr = pathArr.slice();\n if (pathArr[0] === 'label') {\n newPathArr[0] = 'edgeLabel';\n } else if (pathArr[1] === 'label') {\n newPathArr[1] = 'edgeLabel';\n }\n return newPathArr;\n }\n return pathArr;\n }\n }\n };\n GraphSeriesModel.prototype.getGraph = function () {\n return this.getData().graph;\n };\n GraphSeriesModel.prototype.getEdgeData = function () {\n return this.getGraph().edgeData;\n };\n GraphSeriesModel.prototype.getCategoriesData = function () {\n return this._categoriesData;\n };\n GraphSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n if (dataType === 'edge') {\n var nodeData = this.getData();\n var params = this.getDataParams(dataIndex, dataType);\n var edge = nodeData.graph.getEdgeByIndex(dataIndex);\n var sourceName = nodeData.getName(edge.node1.dataIndex);\n var targetName = nodeData.getName(edge.node2.dataIndex);\n var nameArr = [];\n sourceName != null && nameArr.push(sourceName);\n targetName != null && nameArr.push(targetName);\n return createTooltipMarkup('nameValue', {\n name: nameArr.join(' > '),\n value: params.value,\n noValue: params.value == null\n });\n }\n // dataType === 'node' or empty\n var nodeMarkup = defaultSeriesFormatTooltip({\n series: this,\n dataIndex: dataIndex,\n multipleSeries: multipleSeries\n });\n return nodeMarkup;\n };\n GraphSeriesModel.prototype._updateCategoriesData = function () {\n var categories = zrUtil.map(this.option.categories || [], function (category) {\n // Data must has value\n return category.value != null ? category : zrUtil.extend({\n value: 0\n }, category);\n });\n var categoriesData = new SeriesData(['value'], this);\n categoriesData.initData(categories);\n this._categoriesData = categoriesData;\n this._categoriesModels = categoriesData.mapArray(function (idx) {\n return categoriesData.getItemModel(idx);\n });\n };\n GraphSeriesModel.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n GraphSeriesModel.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n GraphSeriesModel.prototype.isAnimationEnabled = function () {\n return _super.prototype.isAnimationEnabled.call(this)\n // Not enable animation when do force layout\n && !(this.get('layout') === 'force' && this.get(['force', 'layoutAnimation']));\n };\n GraphSeriesModel.type = 'series.graph';\n GraphSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar'];\n GraphSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n // Default option for all coordinate systems\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // polarIndex: 0,\n // geoIndex: 0,\n legendHoverLink: true,\n layout: null,\n // Configuration of circular layout\n circular: {\n rotateLabel: false\n },\n // Configuration of force directed layout\n force: {\n initLayout: null,\n // Node repulsion. Can be an array to represent range.\n repulsion: [0, 50],\n gravity: 0.1,\n // Initial friction\n friction: 0.6,\n // Edge length. Can be an array to represent range.\n edgeLength: 30,\n layoutAnimation: true\n },\n left: 'center',\n top: 'center',\n // right: null,\n // bottom: null,\n // width: '80%',\n // height: '80%',\n symbol: 'circle',\n symbolSize: 10,\n edgeSymbol: ['none', 'none'],\n edgeSymbolSize: 10,\n edgeLabel: {\n position: 'middle',\n distance: 5\n },\n draggable: false,\n roam: false,\n // Default on center of graph\n center: null,\n zoom: 1,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.6,\n // cursor: null,\n // categories: [],\n // data: []\n // Or\n // nodes: []\n //\n // links: []\n // Or\n // edges: []\n label: {\n show: false,\n formatter: '{b}'\n },\n itemStyle: {},\n lineStyle: {\n color: '#aaa',\n width: 1,\n opacity: 0.5\n },\n emphasis: {\n scale: true,\n label: {\n show: true\n }\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n };\n return GraphSeriesModel;\n}(SeriesModel);\nexport default GraphSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport categoryFilter from './categoryFilter.js';\nimport categoryVisual from './categoryVisual.js';\nimport edgeVisual from './edgeVisual.js';\nimport simpleLayout from './simpleLayout.js';\nimport circularLayout from './circularLayout.js';\nimport forceLayout from './forceLayout.js';\nimport createView from './createView.js';\nimport View from '../../coord/View.js';\nimport GraphView from './GraphView.js';\nimport GraphSeriesModel from './GraphSeries.js';\nimport { updateCenterAndZoom } from '../../action/roamHelper.js';\nimport { noop } from 'zrender/lib/core/util.js';\nvar actionInfo = {\n type: 'graphRoam',\n event: 'graphRoam',\n update: 'none'\n};\nexport function install(registers) {\n registers.registerChartView(GraphView);\n registers.registerSeriesModel(GraphSeriesModel);\n registers.registerProcessor(categoryFilter);\n registers.registerVisual(categoryVisual);\n registers.registerVisual(edgeVisual);\n registers.registerLayout(simpleLayout);\n registers.registerLayout(registers.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout);\n registers.registerLayout(forceLayout);\n registers.registerCoordinateSystem('graphView', {\n dimensions: View.dimensions,\n create: createView\n });\n // Register legacy focus actions\n registers.registerAction({\n type: 'focusNodeAdjacency',\n event: 'focusNodeAdjacency',\n update: 'series:focusNodeAdjacency'\n }, noop);\n registers.registerAction({\n type: 'unfocusNodeAdjacency',\n event: 'unfocusNodeAdjacency',\n update: 'series:unfocusNodeAdjacency'\n }, noop);\n // Register roam action.\n registers.registerAction(actionInfo, function (payload, ecModel, api) {\n ecModel.eachComponent({\n mainType: 'series',\n query: payload\n }, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var res = updateCenterAndZoom(coordSys, payload, undefined, api);\n seriesModel.setCenter && seriesModel.setCenter(res.center);\n seriesModel.setZoom && seriesModel.setZoom(res.zoom);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Path from 'zrender/lib/graphic/Path.js';\nvar PointerShape = /** @class */function () {\n function PointerShape() {\n this.angle = 0;\n this.width = 10;\n this.r = 10;\n this.x = 0;\n this.y = 0;\n }\n return PointerShape;\n}();\nvar PointerPath = /** @class */function (_super) {\n __extends(PointerPath, _super);\n function PointerPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'pointer';\n return _this;\n }\n PointerPath.prototype.getDefaultShape = function () {\n return new PointerShape();\n };\n PointerPath.prototype.buildPath = function (ctx, shape) {\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n var r = shape.r;\n var width = shape.width;\n var angle = shape.angle;\n var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2);\n var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2);\n angle = shape.angle - Math.PI / 2;\n ctx.moveTo(x, y);\n ctx.lineTo(shape.x + mathCos(angle) * width, shape.y + mathSin(angle) * width);\n ctx.lineTo(shape.x + mathCos(shape.angle) * r, shape.y + mathSin(shape.angle) * r);\n ctx.lineTo(shape.x - mathCos(angle) * width, shape.y - mathSin(angle) * width);\n ctx.lineTo(x, y);\n };\n return PointerPath;\n}(Path);\nexport default PointerPath;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport PointerPath from './PointerPath.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { createTextStyle, setLabelValueAnimation, animateLabelValue } from '../../label/labelStyle.js';\nimport ChartView from '../../view/Chart.js';\nimport { parsePercent, round, linearMap } from '../../util/number.js';\nimport Sausage from '../../util/shape/sausage.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { extend, isFunction, isString, isNumber, each } from 'zrender/lib/core/util.js';\nimport { setCommonECData } from '../../util/innerStore.js';\nimport { normalizeArcAngles } from 'zrender/lib/core/PathProxy.js';\nfunction parsePosition(seriesModel, api) {\n var center = seriesModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], api.getWidth());\n var cy = parsePercent(center[1], api.getHeight());\n var r = parsePercent(seriesModel.get('radius'), size / 2);\n return {\n cx: cx,\n cy: cy,\n r: r\n };\n}\nfunction formatLabel(value, labelFormatter) {\n var label = value == null ? '' : value + '';\n if (labelFormatter) {\n if (isString(labelFormatter)) {\n label = labelFormatter.replace('{value}', label);\n } else if (isFunction(labelFormatter)) {\n label = labelFormatter(value);\n }\n }\n return label;\n}\nvar GaugeView = /** @class */function (_super) {\n __extends(GaugeView, _super);\n function GaugeView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GaugeView.type;\n return _this;\n }\n GaugeView.prototype.render = function (seriesModel, ecModel, api) {\n this.group.removeAll();\n var colorList = seriesModel.get(['axisLine', 'lineStyle', 'color']);\n var posInfo = parsePosition(seriesModel, api);\n this._renderMain(seriesModel, ecModel, api, colorList, posInfo);\n this._data = seriesModel.getData();\n };\n GaugeView.prototype.dispose = function () {};\n GaugeView.prototype._renderMain = function (seriesModel, ecModel, api, colorList, posInfo) {\n var group = this.group;\n var clockwise = seriesModel.get('clockwise');\n var startAngle = -seriesModel.get('startAngle') / 180 * Math.PI;\n var endAngle = -seriesModel.get('endAngle') / 180 * Math.PI;\n var axisLineModel = seriesModel.getModel('axisLine');\n var roundCap = axisLineModel.get('roundCap');\n var MainPath = roundCap ? Sausage : graphic.Sector;\n var showAxis = axisLineModel.get('show');\n var lineStyleModel = axisLineModel.getModel('lineStyle');\n var axisLineWidth = lineStyleModel.get('width');\n var angles = [startAngle, endAngle];\n normalizeArcAngles(angles, !clockwise);\n startAngle = angles[0];\n endAngle = angles[1];\n var angleRangeSpan = endAngle - startAngle;\n var prevEndAngle = startAngle;\n var sectors = [];\n for (var i = 0; showAxis && i < colorList.length; i++) {\n // Clamp\n var percent = Math.min(Math.max(colorList[i][0], 0), 1);\n endAngle = startAngle + angleRangeSpan * percent;\n var sector = new MainPath({\n shape: {\n startAngle: prevEndAngle,\n endAngle: endAngle,\n cx: posInfo.cx,\n cy: posInfo.cy,\n clockwise: clockwise,\n r0: posInfo.r - axisLineWidth,\n r: posInfo.r\n },\n silent: true\n });\n sector.setStyle({\n fill: colorList[i][1]\n });\n sector.setStyle(lineStyleModel.getLineStyle(\n // Because we use sector to simulate arc\n // so the properties for stroking are useless\n ['color', 'width']));\n sectors.push(sector);\n prevEndAngle = endAngle;\n }\n sectors.reverse();\n each(sectors, function (sector) {\n return group.add(sector);\n });\n var getColor = function (percent) {\n // Less than 0\n if (percent <= 0) {\n return colorList[0][1];\n }\n var i;\n for (i = 0; i < colorList.length; i++) {\n if (colorList[i][0] >= percent && (i === 0 ? 0 : colorList[i - 1][0]) < percent) {\n return colorList[i][1];\n }\n }\n // More than 1\n return colorList[i - 1][1];\n };\n this._renderTicks(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth);\n this._renderTitleAndDetail(seriesModel, ecModel, api, getColor, posInfo);\n this._renderAnchor(seriesModel, posInfo);\n this._renderPointer(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth);\n };\n GaugeView.prototype._renderTicks = function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth) {\n var group = this.group;\n var cx = posInfo.cx;\n var cy = posInfo.cy;\n var r = posInfo.r;\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var splitLineModel = seriesModel.getModel('splitLine');\n var tickModel = seriesModel.getModel('axisTick');\n var labelModel = seriesModel.getModel('axisLabel');\n var splitNumber = seriesModel.get('splitNumber');\n var subSplitNumber = tickModel.get('splitNumber');\n var splitLineLen = parsePercent(splitLineModel.get('length'), r);\n var tickLen = parsePercent(tickModel.get('length'), r);\n var angle = startAngle;\n var step = (endAngle - startAngle) / splitNumber;\n var subStep = step / subSplitNumber;\n var splitLineStyle = splitLineModel.getModel('lineStyle').getLineStyle();\n var tickLineStyle = tickModel.getModel('lineStyle').getLineStyle();\n var splitLineDistance = splitLineModel.get('distance');\n var unitX;\n var unitY;\n for (var i = 0; i <= splitNumber; i++) {\n unitX = Math.cos(angle);\n unitY = Math.sin(angle);\n // Split line\n if (splitLineModel.get('show')) {\n var distance = splitLineDistance ? splitLineDistance + axisLineWidth : axisLineWidth;\n var splitLine = new graphic.Line({\n shape: {\n x1: unitX * (r - distance) + cx,\n y1: unitY * (r - distance) + cy,\n x2: unitX * (r - splitLineLen - distance) + cx,\n y2: unitY * (r - splitLineLen - distance) + cy\n },\n style: splitLineStyle,\n silent: true\n });\n if (splitLineStyle.stroke === 'auto') {\n splitLine.setStyle({\n stroke: getColor(i / splitNumber)\n });\n }\n group.add(splitLine);\n }\n // Label\n if (labelModel.get('show')) {\n var distance = labelModel.get('distance') + splitLineDistance;\n var label = formatLabel(round(i / splitNumber * (maxVal - minVal) + minVal), labelModel.get('formatter'));\n var autoColor = getColor(i / splitNumber);\n var textStyleX = unitX * (r - splitLineLen - distance) + cx;\n var textStyleY = unitY * (r - splitLineLen - distance) + cy;\n var rotateType = labelModel.get('rotate');\n var rotate = 0;\n if (rotateType === 'radial') {\n rotate = -angle + 2 * Math.PI;\n if (rotate > Math.PI / 2) {\n rotate += Math.PI;\n }\n } else if (rotateType === 'tangential') {\n rotate = -angle - Math.PI / 2;\n } else if (isNumber(rotateType)) {\n rotate = rotateType * Math.PI / 180;\n }\n if (rotate === 0) {\n group.add(new graphic.Text({\n style: createTextStyle(labelModel, {\n text: label,\n x: textStyleX,\n y: textStyleY,\n verticalAlign: unitY < -0.8 ? 'top' : unitY > 0.8 ? 'bottom' : 'middle',\n align: unitX < -0.4 ? 'left' : unitX > 0.4 ? 'right' : 'center'\n }, {\n inheritColor: autoColor\n }),\n silent: true\n }));\n } else {\n group.add(new graphic.Text({\n style: createTextStyle(labelModel, {\n text: label,\n x: textStyleX,\n y: textStyleY,\n verticalAlign: 'middle',\n align: 'center'\n }, {\n inheritColor: autoColor\n }),\n silent: true,\n originX: textStyleX,\n originY: textStyleY,\n rotation: rotate\n }));\n }\n }\n // Axis tick\n if (tickModel.get('show') && i !== splitNumber) {\n var distance = tickModel.get('distance');\n distance = distance ? distance + axisLineWidth : axisLineWidth;\n for (var j = 0; j <= subSplitNumber; j++) {\n unitX = Math.cos(angle);\n unitY = Math.sin(angle);\n var tickLine = new graphic.Line({\n shape: {\n x1: unitX * (r - distance) + cx,\n y1: unitY * (r - distance) + cy,\n x2: unitX * (r - tickLen - distance) + cx,\n y2: unitY * (r - tickLen - distance) + cy\n },\n silent: true,\n style: tickLineStyle\n });\n if (tickLineStyle.stroke === 'auto') {\n tickLine.setStyle({\n stroke: getColor((i + j / subSplitNumber) / splitNumber)\n });\n }\n group.add(tickLine);\n angle += subStep;\n }\n angle -= subStep;\n } else {\n angle += step;\n }\n }\n };\n GaugeView.prototype._renderPointer = function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth) {\n var group = this.group;\n var oldData = this._data;\n var oldProgressData = this._progressEls;\n var progressList = [];\n var showPointer = seriesModel.get(['pointer', 'show']);\n var progressModel = seriesModel.getModel('progress');\n var showProgress = progressModel.get('show');\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var valueExtent = [minVal, maxVal];\n var angleExtent = [startAngle, endAngle];\n function createPointer(idx, angle) {\n var itemModel = data.getItemModel(idx);\n var pointerModel = itemModel.getModel('pointer');\n var pointerWidth = parsePercent(pointerModel.get('width'), posInfo.r);\n var pointerLength = parsePercent(pointerModel.get('length'), posInfo.r);\n var pointerStr = seriesModel.get(['pointer', 'icon']);\n var pointerOffset = pointerModel.get('offsetCenter');\n var pointerOffsetX = parsePercent(pointerOffset[0], posInfo.r);\n var pointerOffsetY = parsePercent(pointerOffset[1], posInfo.r);\n var pointerKeepAspect = pointerModel.get('keepAspect');\n var pointer;\n // not exist icon type will be set 'rect'\n if (pointerStr) {\n pointer = createSymbol(pointerStr, pointerOffsetX - pointerWidth / 2, pointerOffsetY - pointerLength, pointerWidth, pointerLength, null, pointerKeepAspect);\n } else {\n pointer = new PointerPath({\n shape: {\n angle: -Math.PI / 2,\n width: pointerWidth,\n r: pointerLength,\n x: pointerOffsetX,\n y: pointerOffsetY\n }\n });\n }\n pointer.rotation = -(angle + Math.PI / 2);\n pointer.x = posInfo.cx;\n pointer.y = posInfo.cy;\n return pointer;\n }\n function createProgress(idx, endAngle) {\n var roundCap = progressModel.get('roundCap');\n var ProgressPath = roundCap ? Sausage : graphic.Sector;\n var isOverlap = progressModel.get('overlap');\n var progressWidth = isOverlap ? progressModel.get('width') : axisLineWidth / data.count();\n var r0 = isOverlap ? posInfo.r - progressWidth : posInfo.r - (idx + 1) * progressWidth;\n var r = isOverlap ? posInfo.r : posInfo.r - idx * progressWidth;\n var progress = new ProgressPath({\n shape: {\n startAngle: startAngle,\n endAngle: endAngle,\n cx: posInfo.cx,\n cy: posInfo.cy,\n clockwise: clockwise,\n r0: r0,\n r: r\n }\n });\n isOverlap && (progress.z2 = maxVal - data.get(valueDim, idx) % maxVal);\n return progress;\n }\n if (showProgress || showPointer) {\n data.diff(oldData).add(function (idx) {\n var val = data.get(valueDim, idx);\n if (showPointer) {\n var pointer = createPointer(idx, startAngle);\n // TODO hide pointer on NaN value?\n graphic.initProps(pointer, {\n rotation: -((isNaN(+val) ? angleExtent[0] : linearMap(val, valueExtent, angleExtent, true)) + Math.PI / 2)\n }, seriesModel);\n group.add(pointer);\n data.setItemGraphicEl(idx, pointer);\n }\n if (showProgress) {\n var progress = createProgress(idx, startAngle);\n var isClip = progressModel.get('clip');\n graphic.initProps(progress, {\n shape: {\n endAngle: linearMap(val, valueExtent, angleExtent, isClip)\n }\n }, seriesModel);\n group.add(progress);\n // Add data index and series index for indexing the data by element\n // Useful in tooltip\n setCommonECData(seriesModel.seriesIndex, data.dataType, idx, progress);\n progressList[idx] = progress;\n }\n }).update(function (newIdx, oldIdx) {\n var val = data.get(valueDim, newIdx);\n if (showPointer) {\n var previousPointer = oldData.getItemGraphicEl(oldIdx);\n var previousRotate = previousPointer ? previousPointer.rotation : startAngle;\n var pointer = createPointer(newIdx, previousRotate);\n pointer.rotation = previousRotate;\n graphic.updateProps(pointer, {\n rotation: -((isNaN(+val) ? angleExtent[0] : linearMap(val, valueExtent, angleExtent, true)) + Math.PI / 2)\n }, seriesModel);\n group.add(pointer);\n data.setItemGraphicEl(newIdx, pointer);\n }\n if (showProgress) {\n var previousProgress = oldProgressData[oldIdx];\n var previousEndAngle = previousProgress ? previousProgress.shape.endAngle : startAngle;\n var progress = createProgress(newIdx, previousEndAngle);\n var isClip = progressModel.get('clip');\n graphic.updateProps(progress, {\n shape: {\n endAngle: linearMap(val, valueExtent, angleExtent, isClip)\n }\n }, seriesModel);\n group.add(progress);\n // Add data index and series index for indexing the data by element\n // Useful in tooltip\n setCommonECData(seriesModel.seriesIndex, data.dataType, newIdx, progress);\n progressList[newIdx] = progress;\n }\n }).execute();\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var emphasisDisabled = emphasisModel.get('disabled');\n if (showPointer) {\n var pointer = data.getItemGraphicEl(idx);\n var symbolStyle = data.getItemVisual(idx, 'style');\n var visualColor = symbolStyle.fill;\n if (pointer instanceof ZRImage) {\n var pathStyle = pointer.style;\n pointer.useStyle(extend({\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolStyle));\n } else {\n pointer.useStyle(symbolStyle);\n pointer.type !== 'pointer' && pointer.setColor(visualColor);\n }\n pointer.setStyle(itemModel.getModel(['pointer', 'itemStyle']).getItemStyle());\n if (pointer.style.fill === 'auto') {\n pointer.setStyle('fill', getColor(linearMap(data.get(valueDim, idx), valueExtent, [0, 1], true)));\n }\n pointer.z2EmphasisLift = 0;\n setStatesStylesFromModel(pointer, itemModel);\n toggleHoverEmphasis(pointer, focus, blurScope, emphasisDisabled);\n }\n if (showProgress) {\n var progress = progressList[idx];\n progress.useStyle(data.getItemVisual(idx, 'style'));\n progress.setStyle(itemModel.getModel(['progress', 'itemStyle']).getItemStyle());\n progress.z2EmphasisLift = 0;\n setStatesStylesFromModel(progress, itemModel);\n toggleHoverEmphasis(progress, focus, blurScope, emphasisDisabled);\n }\n });\n this._progressEls = progressList;\n }\n };\n GaugeView.prototype._renderAnchor = function (seriesModel, posInfo) {\n var anchorModel = seriesModel.getModel('anchor');\n var showAnchor = anchorModel.get('show');\n if (showAnchor) {\n var anchorSize = anchorModel.get('size');\n var anchorType = anchorModel.get('icon');\n var offsetCenter = anchorModel.get('offsetCenter');\n var anchorKeepAspect = anchorModel.get('keepAspect');\n var anchor = createSymbol(anchorType, posInfo.cx - anchorSize / 2 + parsePercent(offsetCenter[0], posInfo.r), posInfo.cy - anchorSize / 2 + parsePercent(offsetCenter[1], posInfo.r), anchorSize, anchorSize, null, anchorKeepAspect);\n anchor.z2 = anchorModel.get('showAbove') ? 1 : 0;\n anchor.setStyle(anchorModel.getModel('itemStyle').getItemStyle());\n this.group.add(anchor);\n }\n };\n GaugeView.prototype._renderTitleAndDetail = function (seriesModel, ecModel, api, getColor, posInfo) {\n var _this = this;\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var contentGroup = new graphic.Group();\n var newTitleEls = [];\n var newDetailEls = [];\n var hasAnimation = seriesModel.isAnimationEnabled();\n var showPointerAbove = seriesModel.get(['pointer', 'showAbove']);\n data.diff(this._data).add(function (idx) {\n newTitleEls[idx] = new graphic.Text({\n silent: true\n });\n newDetailEls[idx] = new graphic.Text({\n silent: true\n });\n }).update(function (idx, oldIdx) {\n newTitleEls[idx] = _this._titleEls[oldIdx];\n newDetailEls[idx] = _this._detailEls[oldIdx];\n }).execute();\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n var value = data.get(valueDim, idx);\n var itemGroup = new graphic.Group();\n var autoColor = getColor(linearMap(value, [minVal, maxVal], [0, 1], true));\n var itemTitleModel = itemModel.getModel('title');\n if (itemTitleModel.get('show')) {\n var titleOffsetCenter = itemTitleModel.get('offsetCenter');\n var titleX = posInfo.cx + parsePercent(titleOffsetCenter[0], posInfo.r);\n var titleY = posInfo.cy + parsePercent(titleOffsetCenter[1], posInfo.r);\n var labelEl = newTitleEls[idx];\n labelEl.attr({\n z2: showPointerAbove ? 0 : 2,\n style: createTextStyle(itemTitleModel, {\n x: titleX,\n y: titleY,\n text: data.getName(idx),\n align: 'center',\n verticalAlign: 'middle'\n }, {\n inheritColor: autoColor\n })\n });\n itemGroup.add(labelEl);\n }\n var itemDetailModel = itemModel.getModel('detail');\n if (itemDetailModel.get('show')) {\n var detailOffsetCenter = itemDetailModel.get('offsetCenter');\n var detailX = posInfo.cx + parsePercent(detailOffsetCenter[0], posInfo.r);\n var detailY = posInfo.cy + parsePercent(detailOffsetCenter[1], posInfo.r);\n var width = parsePercent(itemDetailModel.get('width'), posInfo.r);\n var height = parsePercent(itemDetailModel.get('height'), posInfo.r);\n var detailColor = seriesModel.get(['progress', 'show']) ? data.getItemVisual(idx, 'style').fill : autoColor;\n var labelEl = newDetailEls[idx];\n var formatter_1 = itemDetailModel.get('formatter');\n labelEl.attr({\n z2: showPointerAbove ? 0 : 2,\n style: createTextStyle(itemDetailModel, {\n x: detailX,\n y: detailY,\n text: formatLabel(value, formatter_1),\n width: isNaN(width) ? null : width,\n height: isNaN(height) ? null : height,\n align: 'center',\n verticalAlign: 'middle'\n }, {\n inheritColor: detailColor\n })\n });\n setLabelValueAnimation(labelEl, {\n normal: itemDetailModel\n }, value, function (value) {\n return formatLabel(value, formatter_1);\n });\n hasAnimation && animateLabelValue(labelEl, idx, data, seriesModel, {\n getFormattedLabel: function (labelDataIndex, status, dataType, labelDimIndex, fmt, extendParams) {\n return formatLabel(extendParams ? extendParams.interpolatedValue : value, formatter_1);\n }\n });\n itemGroup.add(labelEl);\n }\n contentGroup.add(itemGroup);\n });\n this.group.add(contentGroup);\n this._titleEls = newTitleEls;\n this._detailEls = newDetailEls;\n };\n GaugeView.type = 'gauge';\n return GaugeView;\n}(ChartView);\nexport default GaugeView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport SeriesModel from '../../model/Series.js';\nvar GaugeSeriesModel = /** @class */function (_super) {\n __extends(GaugeSeriesModel, _super);\n function GaugeSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GaugeSeriesModel.type;\n _this.visualStyleAccessPath = 'itemStyle';\n return _this;\n }\n GaugeSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesDataSimply(this, ['value']);\n };\n GaugeSeriesModel.type = 'series.gauge';\n GaugeSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n colorBy: 'data',\n // 默认全局居中\n center: ['50%', '50%'],\n legendHoverLink: true,\n radius: '75%',\n startAngle: 225,\n endAngle: -45,\n clockwise: true,\n // 最小值\n min: 0,\n // 最大值\n max: 100,\n // 分割段数,默认为10\n splitNumber: 10,\n // 坐标轴线\n axisLine: {\n // 默认显示,属性show控制显示与否\n show: true,\n roundCap: false,\n lineStyle: {\n color: [[1, '#E6EBF8']],\n width: 10\n }\n },\n // 坐标轴线\n progress: {\n // 默认显示,属性show控制显示与否\n show: false,\n overlap: true,\n width: 10,\n roundCap: false,\n clip: true\n },\n // 分隔线\n splitLine: {\n // 默认显示,属性show控制显示与否\n show: true,\n // 属性length控制线长\n length: 10,\n distance: 10,\n // 属性lineStyle(详见lineStyle)控制线条样式\n lineStyle: {\n color: '#63677A',\n width: 3,\n type: 'solid'\n }\n },\n // 坐标轴小标记\n axisTick: {\n // 属性show控制显示与否,默认不显示\n show: true,\n // 每份split细分多少段\n splitNumber: 5,\n // 属性length控制线长\n length: 6,\n distance: 10,\n // 属性lineStyle控制线条样式\n lineStyle: {\n color: '#63677A',\n width: 1,\n type: 'solid'\n }\n },\n axisLabel: {\n show: true,\n distance: 15,\n // formatter: null,\n color: '#464646',\n fontSize: 12,\n rotate: 0\n },\n pointer: {\n icon: null,\n offsetCenter: [0, 0],\n show: true,\n showAbove: true,\n length: '60%',\n width: 6,\n keepAspect: false\n },\n anchor: {\n show: false,\n showAbove: false,\n size: 6,\n icon: 'circle',\n offsetCenter: [0, 0],\n keepAspect: false,\n itemStyle: {\n color: '#fff',\n borderWidth: 0,\n borderColor: '#5470c6'\n }\n },\n title: {\n show: true,\n // x, y,单位px\n offsetCenter: [0, '20%'],\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#464646',\n fontSize: 16,\n valueAnimation: false\n },\n detail: {\n show: true,\n backgroundColor: 'rgba(0,0,0,0)',\n borderWidth: 0,\n borderColor: '#ccc',\n width: 100,\n height: null,\n padding: [5, 10],\n // x, y,单位px\n offsetCenter: [0, '40%'],\n // formatter: null,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#464646',\n fontSize: 30,\n fontWeight: 'bold',\n lineHeight: 30,\n valueAnimation: false\n }\n };\n return GaugeSeriesModel;\n}(SeriesModel);\nexport default GaugeSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport GaugeView from './GaugeView.js';\nimport GaugeSeriesModel from './GaugeSeries.js';\nexport function install(registers) {\n registers.registerChartView(GaugeView);\n registers.registerSeriesModel(GaugeSeriesModel);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport ChartView from '../../view/Chart.js';\nimport { setLabelLineStyle, getLabelLineStatesModels } from '../../label/labelGuideHelper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar opacityAccessPath = ['itemStyle', 'opacity'];\n/**\n * Piece of pie including Sector, Label, LabelLine\n */\nvar FunnelPiece = /** @class */function (_super) {\n __extends(FunnelPiece, _super);\n function FunnelPiece(data, idx) {\n var _this = _super.call(this) || this;\n var polygon = _this;\n var labelLine = new graphic.Polyline();\n var text = new graphic.Text();\n polygon.setTextContent(text);\n _this.setTextGuideLine(labelLine);\n _this.updateData(data, idx, true);\n return _this;\n }\n FunnelPiece.prototype.updateData = function (data, idx, firstCreate) {\n var polygon = this;\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n var opacity = itemModel.get(opacityAccessPath);\n opacity = opacity == null ? 1 : opacity;\n if (!firstCreate) {\n saveOldStyle(polygon);\n }\n // Update common style\n polygon.useStyle(data.getItemVisual(idx, 'style'));\n polygon.style.lineJoin = 'round';\n if (firstCreate) {\n polygon.setShape({\n points: layout.points\n });\n polygon.style.opacity = 0;\n graphic.initProps(polygon, {\n style: {\n opacity: opacity\n }\n }, seriesModel, idx);\n } else {\n graphic.updateProps(polygon, {\n style: {\n opacity: opacity\n },\n shape: {\n points: layout.points\n }\n }, seriesModel, idx);\n }\n setStatesStylesFromModel(polygon, itemModel);\n this._updateLabel(data, idx);\n toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n };\n FunnelPiece.prototype._updateLabel = function (data, idx) {\n var polygon = this;\n var labelLine = this.getTextGuideLine();\n var labelText = polygon.getTextContent();\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var labelLayout = layout.label;\n var style = data.getItemVisual(idx, 'style');\n var visualColor = style.fill;\n setLabelStyle(\n // position will not be used in setLabelStyle\n labelText, getLabelStatesModels(itemModel), {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n defaultOpacity: style.opacity,\n defaultText: data.getName(idx)\n }, {\n normal: {\n align: labelLayout.textAlign,\n verticalAlign: labelLayout.verticalAlign\n }\n });\n polygon.setTextConfig({\n local: true,\n inside: !!labelLayout.inside,\n insideStroke: visualColor,\n // insideFill: 'auto',\n outsideFill: visualColor\n });\n var linePoints = labelLayout.linePoints;\n labelLine.setShape({\n points: linePoints\n });\n polygon.textGuideLineConfig = {\n anchor: linePoints ? new graphic.Point(linePoints[0][0], linePoints[0][1]) : null\n };\n // Make sure update style on labelText after setLabelStyle.\n // Because setLabelStyle will replace a new style on it.\n graphic.updateProps(labelText, {\n style: {\n x: labelLayout.x,\n y: labelLayout.y\n }\n }, seriesModel, idx);\n labelText.attr({\n rotation: labelLayout.rotation,\n originX: labelLayout.x,\n originY: labelLayout.y,\n z2: 10\n });\n setLabelLineStyle(polygon, getLabelLineStatesModels(itemModel), {\n // Default use item visual color\n stroke: visualColor\n });\n };\n return FunnelPiece;\n}(graphic.Polygon);\nvar FunnelView = /** @class */function (_super) {\n __extends(FunnelView, _super);\n function FunnelView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = FunnelView.type;\n _this.ignoreLabelLineUpdate = true;\n return _this;\n }\n FunnelView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n data.diff(oldData).add(function (idx) {\n var funnelPiece = new FunnelPiece(data, idx);\n data.setItemGraphicEl(idx, funnelPiece);\n group.add(funnelPiece);\n }).update(function (newIdx, oldIdx) {\n var piece = oldData.getItemGraphicEl(oldIdx);\n piece.updateData(data, newIdx);\n group.add(piece);\n data.setItemGraphicEl(newIdx, piece);\n }).remove(function (idx) {\n var piece = oldData.getItemGraphicEl(idx);\n graphic.removeElementWithFadeOut(piece, seriesModel, idx);\n }).execute();\n this._data = data;\n };\n FunnelView.prototype.remove = function () {\n this.group.removeAll();\n this._data = null;\n };\n FunnelView.prototype.dispose = function () {};\n FunnelView.type = 'funnel';\n return FunnelView;\n}(ChartView);\nexport default FunnelView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport { defaultEmphasis } from '../../util/model.js';\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport SeriesModel from '../../model/Series.js';\nvar FunnelSeriesModel = /** @class */function (_super) {\n __extends(FunnelSeriesModel, _super);\n function FunnelSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = FunnelSeriesModel.type;\n return _this;\n }\n FunnelSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n // Extend labelLine emphasis\n this._defaultLabelLine(option);\n };\n FunnelSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesDataSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n };\n FunnelSeriesModel.prototype._defaultLabelLine = function (option) {\n // Extend labelLine emphasis\n defaultEmphasis(option, 'labelLine', ['show']);\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine;\n // Not show label line if `label.normal.show = false`\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\n };\n // Overwrite\n FunnelSeriesModel.prototype.getDataParams = function (dataIndex) {\n var data = this.getData();\n var params = _super.prototype.getDataParams.call(this, dataIndex);\n var valueDim = data.mapDimension('value');\n var sum = data.getSum(valueDim);\n // Percent is 0 if sum is 0\n params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2);\n params.$vars.push('percent');\n return params;\n };\n FunnelSeriesModel.type = 'series.funnel';\n FunnelSeriesModel.defaultOption = {\n // zlevel: 0, // 一级层叠\n z: 2,\n legendHoverLink: true,\n colorBy: 'data',\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n // 默认取数据最小最大值\n // min: 0,\n // max: 100,\n minSize: '0%',\n maxSize: '100%',\n sort: 'descending',\n orient: 'vertical',\n gap: 0,\n funnelAlign: 'center',\n label: {\n show: true,\n position: 'outer'\n // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n },\n\n labelLine: {\n show: true,\n length: 20,\n lineStyle: {\n // color: 各异,\n width: 1\n }\n },\n itemStyle: {\n // color: 各异,\n borderColor: '#fff',\n borderWidth: 1\n },\n emphasis: {\n label: {\n show: true\n }\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n };\n return FunnelSeriesModel;\n}(SeriesModel);\nexport default FunnelSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as layout from '../../util/layout.js';\nimport { parsePercent, linearMap } from '../../util/number.js';\nimport { isFunction } from 'zrender/lib/core/util.js';\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\nfunction getSortedIndices(data, sort) {\n var valueDim = data.mapDimension('value');\n var valueArr = data.mapArray(valueDim, function (val) {\n return val;\n });\n var indices = [];\n var isAscending = sort === 'ascending';\n for (var i = 0, len = data.count(); i < len; i++) {\n indices[i] = i;\n }\n // Add custom sortable function & none sortable opetion by \"options.sort\"\n if (isFunction(sort)) {\n indices.sort(sort);\n } else if (sort !== 'none') {\n indices.sort(function (a, b) {\n return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a];\n });\n }\n return indices;\n}\nfunction labelLayout(data) {\n var seriesModel = data.hostModel;\n var orient = seriesModel.get('orient');\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label');\n var labelPosition = labelModel.get('position');\n var labelLineModel = itemModel.getModel('labelLine');\n var layout = data.getItemLayout(idx);\n var points = layout.points;\n var isLabelInside = labelPosition === 'inner' || labelPosition === 'inside' || labelPosition === 'center' || labelPosition === 'insideLeft' || labelPosition === 'insideRight';\n var textAlign;\n var textX;\n var textY;\n var linePoints;\n if (isLabelInside) {\n if (labelPosition === 'insideLeft') {\n textX = (points[0][0] + points[3][0]) / 2 + 5;\n textY = (points[0][1] + points[3][1]) / 2;\n textAlign = 'left';\n } else if (labelPosition === 'insideRight') {\n textX = (points[1][0] + points[2][0]) / 2 - 5;\n textY = (points[1][1] + points[2][1]) / 2;\n textAlign = 'right';\n } else {\n textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4;\n textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4;\n textAlign = 'center';\n }\n linePoints = [[textX, textY], [textX, textY]];\n } else {\n var x1 = void 0;\n var y1 = void 0;\n var x2 = void 0;\n var y2 = void 0;\n var labelLineLen = labelLineModel.get('length');\n if (process.env.NODE_ENV !== 'production') {\n if (orient === 'vertical' && ['top', 'bottom'].indexOf(labelPosition) > -1) {\n labelPosition = 'left';\n console.warn('Position error: Funnel chart on vertical orient dose not support top and bottom.');\n }\n if (orient === 'horizontal' && ['left', 'right'].indexOf(labelPosition) > -1) {\n labelPosition = 'bottom';\n console.warn('Position error: Funnel chart on horizontal orient dose not support left and right.');\n }\n }\n if (labelPosition === 'left') {\n // Left side\n x1 = (points[3][0] + points[0][0]) / 2;\n y1 = (points[3][1] + points[0][1]) / 2;\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n } else if (labelPosition === 'right') {\n // Right side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n } else if (labelPosition === 'top') {\n // Top side\n x1 = (points[3][0] + points[0][0]) / 2;\n y1 = (points[3][1] + points[0][1]) / 2;\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else if (labelPosition === 'bottom') {\n // Bottom side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else if (labelPosition === 'rightTop') {\n // RightTop side\n x1 = orient === 'horizontal' ? points[3][0] : points[1][0];\n y1 = orient === 'horizontal' ? points[3][1] : points[1][1];\n if (orient === 'horizontal') {\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'top';\n }\n } else if (labelPosition === 'rightBottom') {\n // RightBottom side\n x1 = points[2][0];\n y1 = points[2][1];\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'bottom';\n }\n } else if (labelPosition === 'leftTop') {\n // LeftTop side\n x1 = points[0][0];\n y1 = orient === 'horizontal' ? points[0][1] : points[1][1];\n if (orient === 'horizontal') {\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else {\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n }\n } else if (labelPosition === 'leftBottom') {\n // LeftBottom side\n x1 = orient === 'horizontal' ? points[1][0] : points[3][0];\n y1 = orient === 'horizontal' ? points[1][1] : points[2][1];\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n }\n } else {\n // Right side or Bottom side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n }\n }\n if (orient === 'horizontal') {\n x2 = x1;\n textX = x2;\n } else {\n y2 = y1;\n textY = y2;\n }\n linePoints = [[x1, y1], [x2, y2]];\n }\n layout.label = {\n linePoints: linePoints,\n x: textX,\n y: textY,\n verticalAlign: 'middle',\n textAlign: textAlign,\n inside: isLabelInside\n };\n });\n}\nexport default function funnelLayout(ecModel, api) {\n ecModel.eachSeriesByType('funnel', function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var sort = seriesModel.get('sort');\n var viewRect = getViewRect(seriesModel, api);\n var orient = seriesModel.get('orient');\n var viewWidth = viewRect.width;\n var viewHeight = viewRect.height;\n var indices = getSortedIndices(data, sort);\n var x = viewRect.x;\n var y = viewRect.y;\n var sizeExtent = orient === 'horizontal' ? [parsePercent(seriesModel.get('minSize'), viewHeight), parsePercent(seriesModel.get('maxSize'), viewHeight)] : [parsePercent(seriesModel.get('minSize'), viewWidth), parsePercent(seriesModel.get('maxSize'), viewWidth)];\n var dataExtent = data.getDataExtent(valueDim);\n var min = seriesModel.get('min');\n var max = seriesModel.get('max');\n if (min == null) {\n min = Math.min(dataExtent[0], 0);\n }\n if (max == null) {\n max = dataExtent[1];\n }\n var funnelAlign = seriesModel.get('funnelAlign');\n var gap = seriesModel.get('gap');\n var viewSize = orient === 'horizontal' ? viewWidth : viewHeight;\n var itemSize = (viewSize - gap * (data.count() - 1)) / data.count();\n var getLinePoints = function (idx, offset) {\n // End point index is data.count() and we assign it 0\n if (orient === 'horizontal') {\n var val_1 = data.get(valueDim, idx) || 0;\n var itemHeight = linearMap(val_1, [min, max], sizeExtent, true);\n var y0 = void 0;\n switch (funnelAlign) {\n case 'top':\n y0 = y;\n break;\n case 'center':\n y0 = y + (viewHeight - itemHeight) / 2;\n break;\n case 'bottom':\n y0 = y + (viewHeight - itemHeight);\n break;\n }\n return [[offset, y0], [offset, y0 + itemHeight]];\n }\n var val = data.get(valueDim, idx) || 0;\n var itemWidth = linearMap(val, [min, max], sizeExtent, true);\n var x0;\n switch (funnelAlign) {\n case 'left':\n x0 = x;\n break;\n case 'center':\n x0 = x + (viewWidth - itemWidth) / 2;\n break;\n case 'right':\n x0 = x + viewWidth - itemWidth;\n break;\n }\n return [[x0, offset], [x0 + itemWidth, offset]];\n };\n if (sort === 'ascending') {\n // From bottom to top\n itemSize = -itemSize;\n gap = -gap;\n if (orient === 'horizontal') {\n x += viewWidth;\n } else {\n y += viewHeight;\n }\n indices = indices.reverse();\n }\n for (var i = 0; i < indices.length; i++) {\n var idx = indices[i];\n var nextIdx = indices[i + 1];\n var itemModel = data.getItemModel(idx);\n if (orient === 'horizontal') {\n var width = itemModel.get(['itemStyle', 'width']);\n if (width == null) {\n width = itemSize;\n } else {\n width = parsePercent(width, viewWidth);\n if (sort === 'ascending') {\n width = -width;\n }\n }\n var start = getLinePoints(idx, x);\n var end = getLinePoints(nextIdx, x + width);\n x += width + gap;\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n } else {\n var height = itemModel.get(['itemStyle', 'height']);\n if (height == null) {\n height = itemSize;\n } else {\n height = parsePercent(height, viewHeight);\n if (sort === 'ascending') {\n height = -height;\n }\n }\n var start = getLinePoints(idx, y);\n var end = getLinePoints(nextIdx, y + height);\n y += height + gap;\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n }\n }\n labelLayout(data);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport FunnelView from './FunnelView.js';\nimport FunnelSeriesModel from './FunnelSeries.js';\nimport funnelLayout from './funnelLayout.js';\nimport dataFilter from '../../processor/dataFilter.js';\nexport function install(registers) {\n registers.registerChartView(FunnelView);\n registers.registerSeriesModel(FunnelSeriesModel);\n registers.registerLayout(funnelLayout);\n registers.registerProcessor(dataFilter('funnel'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport ChartView from '../../view/Chart.js';\nimport { numericToNumber } from '../../util/number.js';\nimport { eqNaN } from 'zrender/lib/core/util.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar DEFAULT_SMOOTH = 0.3;\nvar ParallelView = /** @class */function (_super) {\n __extends(ParallelView, _super);\n function ParallelView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelView.type;\n _this._dataGroup = new graphic.Group();\n _this._initialized = false;\n return _this;\n }\n ParallelView.prototype.init = function () {\n this.group.add(this._dataGroup);\n };\n /**\n * @override\n */\n ParallelView.prototype.render = function (seriesModel, ecModel, api, payload) {\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n var dataGroup = this._dataGroup;\n var data = seriesModel.getData();\n var oldData = this._data;\n var coordSys = seriesModel.coordinateSystem;\n var dimensions = coordSys.dimensions;\n var seriesScope = makeSeriesScope(seriesModel);\n data.diff(oldData).add(add).update(update).remove(remove).execute();\n function add(newDataIndex) {\n var line = addEl(data, dataGroup, newDataIndex, dimensions, coordSys);\n updateElCommon(line, data, newDataIndex, seriesScope);\n }\n function update(newDataIndex, oldDataIndex) {\n var line = oldData.getItemGraphicEl(oldDataIndex);\n var points = createLinePoints(data, newDataIndex, dimensions, coordSys);\n data.setItemGraphicEl(newDataIndex, line);\n graphic.updateProps(line, {\n shape: {\n points: points\n }\n }, seriesModel, newDataIndex);\n saveOldStyle(line);\n updateElCommon(line, data, newDataIndex, seriesScope);\n }\n function remove(oldDataIndex) {\n var line = oldData.getItemGraphicEl(oldDataIndex);\n dataGroup.remove(line);\n }\n // First create\n if (!this._initialized) {\n this._initialized = true;\n var clipPath = createGridClipShape(coordSys, seriesModel, function () {\n // Callback will be invoked immediately if there is no animation\n setTimeout(function () {\n dataGroup.removeClipPath();\n });\n });\n dataGroup.setClipPath(clipPath);\n }\n this._data = data;\n };\n ParallelView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n this._initialized = true;\n this._data = null;\n this._dataGroup.removeAll();\n };\n ParallelView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var dimensions = coordSys.dimensions;\n var seriesScope = makeSeriesScope(seriesModel);\n var progressiveEls = this._progressiveEls = [];\n for (var dataIndex = taskParams.start; dataIndex < taskParams.end; dataIndex++) {\n var line = addEl(data, this._dataGroup, dataIndex, dimensions, coordSys);\n line.incremental = true;\n updateElCommon(line, data, dataIndex, seriesScope);\n progressiveEls.push(line);\n }\n };\n ParallelView.prototype.remove = function () {\n this._dataGroup && this._dataGroup.removeAll();\n this._data = null;\n };\n ParallelView.type = 'parallel';\n return ParallelView;\n}(ChartView);\nfunction createGridClipShape(coordSys, seriesModel, cb) {\n var parallelModel = coordSys.model;\n var rect = coordSys.getRect();\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n var dim = parallelModel.get('layout') === 'horizontal' ? 'width' : 'height';\n rectEl.setShape(dim, 0);\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width,\n height: rect.height\n }\n }, seriesModel, cb);\n return rectEl;\n}\nfunction createLinePoints(data, dataIndex, dimensions, coordSys) {\n var points = [];\n for (var i = 0; i < dimensions.length; i++) {\n var dimName = dimensions[i];\n var value = data.get(data.mapDimension(dimName), dataIndex);\n if (!isEmptyValue(value, coordSys.getAxis(dimName).type)) {\n points.push(coordSys.dataToPoint(value, dimName));\n }\n }\n return points;\n}\nfunction addEl(data, dataGroup, dataIndex, dimensions, coordSys) {\n var points = createLinePoints(data, dataIndex, dimensions, coordSys);\n var line = new graphic.Polyline({\n shape: {\n points: points\n },\n // silent: true,\n z2: 10\n });\n dataGroup.add(line);\n data.setItemGraphicEl(dataIndex, line);\n return line;\n}\nfunction makeSeriesScope(seriesModel) {\n var smooth = seriesModel.get('smooth', true);\n smooth === true && (smooth = DEFAULT_SMOOTH);\n smooth = numericToNumber(smooth);\n eqNaN(smooth) && (smooth = 0);\n return {\n smooth: smooth\n };\n}\nfunction updateElCommon(el, data, dataIndex, seriesScope) {\n el.useStyle(data.getItemVisual(dataIndex, 'style'));\n el.style.fill = null;\n el.setShape('smooth', seriesScope.smooth);\n var itemModel = data.getItemModel(dataIndex);\n var emphasisModel = itemModel.getModel('emphasis');\n setStatesStylesFromModel(el, itemModel, 'lineStyle');\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n}\n// function simpleDiff(oldData, newData, dimensions) {\n// let oldLen;\n// if (!oldData\n// || !oldData.__plProgressive\n// || (oldLen = oldData.count()) !== newData.count()\n// ) {\n// return true;\n// }\n// let dimLen = dimensions.length;\n// for (let i = 0; i < oldLen; i++) {\n// for (let j = 0; j < dimLen; j++) {\n// if (oldData.get(dimensions[j], i) !== newData.get(dimensions[j], i)) {\n// return true;\n// }\n// }\n// }\n// return false;\n// }\n// FIXME put in common util?\nfunction isEmptyValue(val, axisType) {\n return axisType === 'category' ? val == null : val == null || isNaN(val); // axisType === 'value'\n}\n\nexport default ParallelView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { each, bind } from 'zrender/lib/core/util.js';\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nvar ParallelSeriesModel = /** @class */function (_super) {\n __extends(ParallelSeriesModel, _super);\n function ParallelSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelSeriesModel.type;\n _this.visualStyleAccessPath = 'lineStyle';\n _this.visualDrawType = 'stroke';\n return _this;\n }\n ParallelSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: bind(makeDefaultEncode, null, this)\n });\n };\n /**\n * User can get data raw indices on 'axisAreaSelected' event received.\n *\n * @return Raw indices\n */\n ParallelSeriesModel.prototype.getRawIndicesByActiveState = function (activeState) {\n var coordSys = this.coordinateSystem;\n var data = this.getData();\n var indices = [];\n coordSys.eachActiveState(data, function (theActiveState, dataIndex) {\n if (activeState === theActiveState) {\n indices.push(data.getRawIndex(dataIndex));\n }\n });\n return indices;\n };\n ParallelSeriesModel.type = 'series.parallel';\n ParallelSeriesModel.dependencies = ['parallel'];\n ParallelSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'parallel',\n parallelIndex: 0,\n label: {\n show: false\n },\n inactiveOpacity: 0.05,\n activeOpacity: 1,\n lineStyle: {\n width: 1,\n opacity: 0.45,\n type: 'solid'\n },\n emphasis: {\n label: {\n show: false\n }\n },\n progressive: 500,\n smooth: false,\n animationEasing: 'linear'\n };\n return ParallelSeriesModel;\n}(SeriesModel);\nfunction makeDefaultEncode(seriesModel) {\n // The mapping of parallelAxis dimension to data dimension can\n // be specified in parallelAxis.option.dim. For example, if\n // parallelAxis.option.dim is 'dim3', it mapping to the third\n // dimension of data. But `data.encode` has higher priority.\n // Moreover, parallelModel.dimension should not be regarded as data\n // dimensions. Consider dimensions = ['dim4', 'dim2', 'dim6'];\n var parallelModel = seriesModel.ecModel.getComponent('parallel', seriesModel.get('parallelIndex'));\n if (!parallelModel) {\n return;\n }\n var encodeDefine = {};\n each(parallelModel.dimensions, function (axisDim) {\n var dataDimIndex = convertDimNameToNumber(axisDim);\n encodeDefine[axisDim] = dataDimIndex;\n });\n return encodeDefine;\n}\nfunction convertDimNameToNumber(dimName) {\n return +dimName.replace('dim', '');\n}\nexport default ParallelSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar opacityAccessPath = ['lineStyle', 'opacity'];\nvar parallelVisual = {\n seriesType: 'parallel',\n reset: function (seriesModel, ecModel) {\n var coordSys = seriesModel.coordinateSystem;\n var opacityMap = {\n normal: seriesModel.get(['lineStyle', 'opacity']),\n active: seriesModel.get('activeOpacity'),\n inactive: seriesModel.get('inactiveOpacity')\n };\n return {\n progress: function (params, data) {\n coordSys.eachActiveState(data, function (activeState, dataIndex) {\n var opacity = opacityMap[activeState];\n if (activeState === 'normal' && data.hasItemOption) {\n var itemOpacity = data.getItemModel(dataIndex).get(opacityAccessPath, true);\n itemOpacity != null && (opacity = itemOpacity);\n }\n var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style');\n existsStyle.opacity = opacity;\n }, params.start, params.end);\n }\n };\n }\n};\nexport default parallelVisual;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nexport default function parallelPreprocessor(option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}\n/**\n * Create a parallel coordinate if not exists.\n * @inner\n */\nfunction createParallelIfNeeded(option) {\n if (option.parallel) {\n return;\n }\n var hasParallelSeries = false;\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'parallel') {\n hasParallelSeries = true;\n }\n });\n if (hasParallelSeries) {\n option.parallel = [{}];\n }\n}\n/**\n * Merge aixs definition from parallel option (if exists) to axis option.\n * @inner\n */\nfunction mergeAxisOptionFromParallel(option) {\n var axes = modelUtil.normalizeToArray(option.parallelAxis);\n zrUtil.each(axes, function (axisOption) {\n if (!zrUtil.isObject(axisOption)) {\n return;\n }\n var parallelIndex = axisOption.parallelIndex || 0;\n var parallelOption = modelUtil.normalizeToArray(option.parallel)[parallelIndex];\n if (parallelOption && parallelOption.parallelAxisDefault) {\n zrUtil.merge(axisOption, parallelOption.parallelAxisDefault, false);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport { each, bind, extend } from 'zrender/lib/core/util.js';\nimport { createOrUpdate, clear } from '../../util/throttle.js';\nvar CLICK_THRESHOLD = 5; // > 4\nvar ParallelView = /** @class */function (_super) {\n __extends(ParallelView, _super);\n function ParallelView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelView.type;\n return _this;\n }\n ParallelView.prototype.render = function (parallelModel, ecModel, api) {\n this._model = parallelModel;\n this._api = api;\n if (!this._handlers) {\n this._handlers = {};\n each(handlers, function (handler, eventName) {\n api.getZr().on(eventName, this._handlers[eventName] = bind(handler, this));\n }, this);\n }\n createOrUpdate(this, '_throttledDispatchExpand', parallelModel.get('axisExpandRate'), 'fixRate');\n };\n ParallelView.prototype.dispose = function (ecModel, api) {\n clear(this, '_throttledDispatchExpand');\n each(this._handlers, function (handler, eventName) {\n api.getZr().off(eventName, handler);\n });\n this._handlers = null;\n };\n /**\n * @internal\n * @param {Object} [opt] If null, cancel the last action triggering for debounce.\n */\n ParallelView.prototype._throttledDispatchExpand = function (opt) {\n this._dispatchExpand(opt);\n };\n /**\n * @internal\n */\n ParallelView.prototype._dispatchExpand = function (opt) {\n opt && this._api.dispatchAction(extend({\n type: 'parallelAxisExpand'\n }, opt));\n };\n ParallelView.type = 'parallel';\n return ParallelView;\n}(ComponentView);\nvar handlers = {\n mousedown: function (e) {\n if (checkTrigger(this, 'click')) {\n this._mouseDownPoint = [e.offsetX, e.offsetY];\n }\n },\n mouseup: function (e) {\n var mouseDownPoint = this._mouseDownPoint;\n if (checkTrigger(this, 'click') && mouseDownPoint) {\n var point = [e.offsetX, e.offsetY];\n var dist = Math.pow(mouseDownPoint[0] - point[0], 2) + Math.pow(mouseDownPoint[1] - point[1], 2);\n if (dist > CLICK_THRESHOLD) {\n return;\n }\n var result = this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);\n result.behavior !== 'none' && this._dispatchExpand({\n axisExpandWindow: result.axisExpandWindow\n });\n }\n this._mouseDownPoint = null;\n },\n mousemove: function (e) {\n // Should do nothing when brushing.\n if (this._mouseDownPoint || !checkTrigger(this, 'mousemove')) {\n return;\n }\n var model = this._model;\n var result = model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);\n var behavior = result.behavior;\n behavior === 'jump' && this._throttledDispatchExpand.debounceNextCall(model.get('axisExpandDebounce'));\n this._throttledDispatchExpand(behavior === 'none' ? null // Cancel the last trigger, in case that mouse slide out of the area quickly.\n : {\n axisExpandWindow: result.axisExpandWindow,\n // Jumping uses animation, and sliding suppresses animation.\n animation: behavior === 'jump' ? null : {\n duration: 0 // Disable animation.\n }\n });\n }\n};\n\nfunction checkTrigger(view, triggerOn) {\n var model = view._model;\n return model.get('axisExpandable') && model.get('axisExpandTriggerOn') === triggerOn;\n}\nexport default ParallelView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nvar ParallelModel = /** @class */function (_super) {\n __extends(ParallelModel, _super);\n function ParallelModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelModel.type;\n return _this;\n }\n ParallelModel.prototype.init = function () {\n _super.prototype.init.apply(this, arguments);\n this.mergeOption({});\n };\n ParallelModel.prototype.mergeOption = function (newOption) {\n var thisOption = this.option;\n newOption && zrUtil.merge(thisOption, newOption, true);\n this._initDimensions();\n };\n /**\n * Whether series or axis is in this coordinate system.\n */\n ParallelModel.prototype.contains = function (model, ecModel) {\n var parallelIndex = model.get('parallelIndex');\n return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this;\n };\n ParallelModel.prototype.setAxisExpand = function (opt) {\n zrUtil.each(['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) {\n if (opt.hasOwnProperty(name)) {\n // @ts-ignore FIXME: why \"never\" inferred in this.option[name]?\n this.option[name] = opt[name];\n }\n }, this);\n };\n ParallelModel.prototype._initDimensions = function () {\n var dimensions = this.dimensions = [];\n var parallelAxisIndex = this.parallelAxisIndex = [];\n var axisModels = zrUtil.filter(this.ecModel.queryComponents({\n mainType: 'parallelAxis'\n }), function (axisModel) {\n // Can not use this.contains here, because\n // initialization has not been completed yet.\n return (axisModel.get('parallelIndex') || 0) === this.componentIndex;\n }, this);\n zrUtil.each(axisModels, function (axisModel) {\n dimensions.push('dim' + axisModel.get('dim'));\n parallelAxisIndex.push(axisModel.componentIndex);\n });\n };\n ParallelModel.type = 'parallel';\n ParallelModel.dependencies = ['parallelAxis'];\n ParallelModel.layoutMode = 'box';\n ParallelModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n layout: 'horizontal',\n // FIXME\n // naming?\n axisExpandable: false,\n axisExpandCenter: null,\n axisExpandCount: 0,\n axisExpandWidth: 50,\n axisExpandRate: 17,\n axisExpandDebounce: 50,\n // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.\n // Do not doc to user until necessary.\n axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],\n axisExpandTriggerOn: 'click',\n parallelAxisDefault: null\n };\n return ParallelModel;\n}(ComponentModel);\nexport default ParallelModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar ParallelAxis = /** @class */function (_super) {\n __extends(ParallelAxis, _super);\n function ParallelAxis(dim, scale, coordExtent, axisType, axisIndex) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n _this.axisIndex = axisIndex;\n return _this;\n }\n ParallelAxis.prototype.isHorizontal = function () {\n return this.coordinateSystem.getModel().get('layout') !== 'horizontal';\n };\n return ParallelAxis;\n}(Axis);\nexport default ParallelAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Calculate slider move result.\n * Usage:\n * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as\n * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.\n * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.\n *\n * @param delta Move length.\n * @param handleEnds handleEnds[0] can be bigger then handleEnds[1].\n * handleEnds will be modified in this method.\n * @param extent handleEnds is restricted by extent.\n * extent[0] should less or equals than extent[1].\n * @param handleIndex Can be 'all', means that both move the two handleEnds.\n * @param minSpan The range of dataZoom can not be smaller than that.\n * If not set, handle0 and cross handle1. If set as a non-negative\n * number (including `0`), handles will push each other when reaching\n * the minSpan.\n * @param maxSpan The range of dataZoom can not be larger than that.\n * @return The input handleEnds.\n */\nexport default function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {\n delta = delta || 0;\n var extentSpan = extent[1] - extent[0];\n // Notice maxSpan and minSpan can be null/undefined.\n if (minSpan != null) {\n minSpan = restrict(minSpan, [0, extentSpan]);\n }\n if (maxSpan != null) {\n maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0);\n }\n if (handleIndex === 'all') {\n var handleSpan = Math.abs(handleEnds[1] - handleEnds[0]);\n handleSpan = restrict(handleSpan, [0, extentSpan]);\n minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]);\n handleIndex = 0;\n }\n handleEnds[0] = restrict(handleEnds[0], extent);\n handleEnds[1] = restrict(handleEnds[1], extent);\n var originalDistSign = getSpanSign(handleEnds, handleIndex);\n handleEnds[handleIndex] += delta;\n // Restrict in extent.\n var extentMinSpan = minSpan || 0;\n var realExtent = extent.slice();\n originalDistSign.sign < 0 ? realExtent[0] += extentMinSpan : realExtent[1] -= extentMinSpan;\n handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent);\n // Expand span.\n var currDistSign;\n currDistSign = getSpanSign(handleEnds, handleIndex);\n if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) {\n // If minSpan exists, 'cross' is forbidden.\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan;\n }\n // Shrink span.\n currDistSign = getSpanSign(handleEnds, handleIndex);\n if (maxSpan != null && currDistSign.span > maxSpan) {\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + currDistSign.sign * maxSpan;\n }\n return handleEnds;\n}\nfunction getSpanSign(handleEnds, handleIndex) {\n var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex];\n // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0]\n // is at left of handleEnds[1] for non-cross case.\n return {\n span: Math.abs(dist),\n sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1\n };\n}\nfunction restrict(value, extend) {\n return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Parallel Coordinates\n * \n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport ParallelAxis from './ParallelAxis.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../../component/helper/sliderMove.js';\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathFloor = Math.floor;\nvar mathCeil = Math.ceil;\nvar round = numberUtil.round;\nvar PI = Math.PI;\nvar Parallel = /** @class */function () {\n function Parallel(parallelModel, ecModel, api) {\n this.type = 'parallel';\n /**\n * key: dimension\n */\n this._axesMap = zrUtil.createHashMap();\n /**\n * key: dimension\n * value: {position: [], rotation, }\n */\n this._axesLayout = {};\n this.dimensions = parallelModel.dimensions;\n this._model = parallelModel;\n this._init(parallelModel, ecModel, api);\n }\n Parallel.prototype._init = function (parallelModel, ecModel, api) {\n var dimensions = parallelModel.dimensions;\n var parallelAxisIndex = parallelModel.parallelAxisIndex;\n each(dimensions, function (dim, idx) {\n var axisIndex = parallelAxisIndex[idx];\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n var axis = this._axesMap.set(dim, new ParallelAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisIndex));\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n // Injection\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = axisModel.coordinateSystem = this;\n }, this);\n };\n /**\n * Update axis scale after data processed\n */\n Parallel.prototype.update = function (ecModel, api) {\n this._updateAxesFromSeries(this._model, ecModel);\n };\n Parallel.prototype.containPoint = function (point) {\n var layoutInfo = this._makeLayoutInfo();\n var axisBase = layoutInfo.axisBase;\n var layoutBase = layoutInfo.layoutBase;\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var pAxis = point[1 - pixelDimIndex];\n var pLayout = point[pixelDimIndex];\n return pAxis >= axisBase && pAxis <= axisBase + layoutInfo.axisLength && pLayout >= layoutBase && pLayout <= layoutBase + layoutInfo.layoutLength;\n };\n Parallel.prototype.getModel = function () {\n return this._model;\n };\n /**\n * Update properties from series\n */\n Parallel.prototype._updateAxesFromSeries = function (parallelModel, ecModel) {\n ecModel.eachSeries(function (seriesModel) {\n if (!parallelModel.contains(seriesModel, ecModel)) {\n return;\n }\n var data = seriesModel.getData();\n each(this.dimensions, function (dim) {\n var axis = this._axesMap.get(dim);\n axis.scale.unionExtentFromData(data, data.mapDimension(dim));\n axisHelper.niceScaleExtent(axis.scale, axis.model);\n }, this);\n }, this);\n };\n /**\n * Resize the parallel coordinate system.\n */\n Parallel.prototype.resize = function (parallelModel, api) {\n this._rect = layoutUtil.getLayoutRect(parallelModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._layoutAxes();\n };\n Parallel.prototype.getRect = function () {\n return this._rect;\n };\n Parallel.prototype._makeLayoutInfo = function () {\n var parallelModel = this._model;\n var rect = this._rect;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var layout = parallelModel.get('layout');\n var pixelDimIndex = layout === 'horizontal' ? 0 : 1;\n var layoutLength = rect[wh[pixelDimIndex]];\n var layoutExtent = [0, layoutLength];\n var axisCount = this.dimensions.length;\n var axisExpandWidth = restrict(parallelModel.get('axisExpandWidth'), layoutExtent);\n var axisExpandCount = restrict(parallelModel.get('axisExpandCount') || 0, [0, axisCount]);\n var axisExpandable = parallelModel.get('axisExpandable') && axisCount > 3 && axisCount > axisExpandCount && axisExpandCount > 1 && axisExpandWidth > 0 && layoutLength > 0;\n // `axisExpandWindow` is According to the coordinates of [0, axisExpandLength],\n // for sake of consider the case that axisCollapseWidth is 0 (when screen is narrow),\n // where collapsed axes should be overlapped.\n var axisExpandWindow = parallelModel.get('axisExpandWindow');\n var winSize;\n if (!axisExpandWindow) {\n winSize = restrict(axisExpandWidth * (axisExpandCount - 1), layoutExtent);\n var axisExpandCenter = parallelModel.get('axisExpandCenter') || mathFloor(axisCount / 2);\n axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2];\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n } else {\n winSize = restrict(axisExpandWindow[1] - axisExpandWindow[0], layoutExtent);\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n }\n var axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount);\n // Avoid axisCollapseWidth is too small.\n axisCollapseWidth < 3 && (axisCollapseWidth = 0);\n // Find the first and last indices > ewin[0] and < ewin[1].\n var winInnerIndices = [mathFloor(round(axisExpandWindow[0] / axisExpandWidth, 1)) + 1, mathCeil(round(axisExpandWindow[1] / axisExpandWidth, 1)) - 1];\n // Pos in ec coordinates.\n var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0];\n return {\n layout: layout,\n pixelDimIndex: pixelDimIndex,\n layoutBase: rect[xy[pixelDimIndex]],\n layoutLength: layoutLength,\n axisBase: rect[xy[1 - pixelDimIndex]],\n axisLength: rect[wh[1 - pixelDimIndex]],\n axisExpandable: axisExpandable,\n axisExpandWidth: axisExpandWidth,\n axisCollapseWidth: axisCollapseWidth,\n axisExpandWindow: axisExpandWindow,\n axisCount: axisCount,\n winInnerIndices: winInnerIndices,\n axisExpandWindow0Pos: axisExpandWindow0Pos\n };\n };\n Parallel.prototype._layoutAxes = function () {\n var rect = this._rect;\n var axes = this._axesMap;\n var dimensions = this.dimensions;\n var layoutInfo = this._makeLayoutInfo();\n var layout = layoutInfo.layout;\n axes.each(function (axis) {\n var axisExtent = [0, layoutInfo.axisLength];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(axisExtent[idx], axisExtent[1 - idx]);\n });\n each(dimensions, function (dim, idx) {\n var posInfo = (layoutInfo.axisExpandable ? layoutAxisWithExpand : layoutAxisWithoutExpand)(idx, layoutInfo);\n var positionTable = {\n horizontal: {\n x: posInfo.position,\n y: layoutInfo.axisLength\n },\n vertical: {\n x: 0,\n y: posInfo.position\n }\n };\n var rotationTable = {\n horizontal: PI / 2,\n vertical: 0\n };\n var position = [positionTable[layout].x + rect.x, positionTable[layout].y + rect.y];\n var rotation = rotationTable[layout];\n var transform = matrix.create();\n matrix.rotate(transform, transform, rotation);\n matrix.translate(transform, transform, position);\n // TODO\n // tick layout info\n // TODO\n // update dimensions info based on axis order.\n this._axesLayout[dim] = {\n position: position,\n rotation: rotation,\n transform: transform,\n axisNameAvailableWidth: posInfo.axisNameAvailableWidth,\n axisLabelShow: posInfo.axisLabelShow,\n nameTruncateMaxWidth: posInfo.nameTruncateMaxWidth,\n tickDirection: 1,\n labelDirection: 1\n };\n }, this);\n };\n /**\n * Get axis by dim.\n */\n Parallel.prototype.getAxis = function (dim) {\n return this._axesMap.get(dim);\n };\n /**\n * Convert a dim value of a single item of series data to Point.\n */\n Parallel.prototype.dataToPoint = function (value, dim) {\n return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim);\n };\n /**\n * Travel data for one time, get activeState of each data item.\n * @param start the start dataIndex that travel from.\n * @param end the next dataIndex of the last dataIndex will be travel.\n */\n Parallel.prototype.eachActiveState = function (data, callback, start, end) {\n start == null && (start = 0);\n end == null && (end = data.count());\n var axesMap = this._axesMap;\n var dimensions = this.dimensions;\n var dataDimensions = [];\n var axisModels = [];\n zrUtil.each(dimensions, function (axisDim) {\n dataDimensions.push(data.mapDimension(axisDim));\n axisModels.push(axesMap.get(axisDim).model);\n });\n var hasActiveSet = this.hasAxisBrushed();\n for (var dataIndex = start; dataIndex < end; dataIndex++) {\n var activeState = void 0;\n if (!hasActiveSet) {\n activeState = 'normal';\n } else {\n activeState = 'active';\n var values = data.getValues(dataDimensions, dataIndex);\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n var state = axisModels[j].getActiveState(values[j]);\n if (state === 'inactive') {\n activeState = 'inactive';\n break;\n }\n }\n }\n callback(activeState, dataIndex);\n }\n };\n /**\n * Whether has any activeSet.\n */\n Parallel.prototype.hasAxisBrushed = function () {\n var dimensions = this.dimensions;\n var axesMap = this._axesMap;\n var hasActiveSet = false;\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n if (axesMap.get(dimensions[j]).model.getActiveState() !== 'normal') {\n hasActiveSet = true;\n }\n }\n return hasActiveSet;\n };\n /**\n * Convert coords of each axis to Point.\n * Return point. For example: [10, 20]\n */\n Parallel.prototype.axisCoordToPoint = function (coord, dim) {\n var axisLayout = this._axesLayout[dim];\n return graphic.applyTransform([coord, 0], axisLayout.transform);\n };\n /**\n * Get axis layout.\n */\n Parallel.prototype.getAxisLayout = function (dim) {\n return zrUtil.clone(this._axesLayout[dim]);\n };\n /**\n * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.\n */\n Parallel.prototype.getSlidedAxisExpandWindow = function (point) {\n var layoutInfo = this._makeLayoutInfo();\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var axisExpandWindow = layoutInfo.axisExpandWindow.slice();\n var winSize = axisExpandWindow[1] - axisExpandWindow[0];\n var extent = [0, layoutInfo.axisExpandWidth * (layoutInfo.axisCount - 1)];\n // Out of the area of coordinate system.\n if (!this.containPoint(point)) {\n return {\n behavior: 'none',\n axisExpandWindow: axisExpandWindow\n };\n }\n // Convert the point from global to expand coordinates.\n var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos;\n // For dragging operation convenience, the window should not be\n // slided when mouse is the center area of the window.\n var delta;\n var behavior = 'slide';\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var triggerArea = this._model.get('axisExpandSlideTriggerArea');\n // But consider touch device, jump is necessary.\n var useJump = triggerArea[0] != null;\n if (axisCollapseWidth) {\n if (useJump && axisCollapseWidth && pointCoord < winSize * triggerArea[0]) {\n behavior = 'jump';\n delta = pointCoord - winSize * triggerArea[2];\n } else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) {\n behavior = 'jump';\n delta = pointCoord - winSize * (1 - triggerArea[2]);\n } else {\n (delta = pointCoord - winSize * triggerArea[1]) >= 0 && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0 && (delta = 0);\n }\n delta *= layoutInfo.axisExpandWidth / axisCollapseWidth;\n delta ? sliderMove(delta, axisExpandWindow, extent, 'all')\n // Avoid nonsense triger on mousemove.\n : behavior = 'none';\n }\n // When screen is too narrow, make it visible and slidable, although it is hard to interact.\n else {\n var winSize2 = axisExpandWindow[1] - axisExpandWindow[0];\n var pos = extent[1] * pointCoord / winSize2;\n axisExpandWindow = [mathMax(0, pos - winSize2 / 2)];\n axisExpandWindow[1] = mathMin(extent[1], axisExpandWindow[0] + winSize2);\n axisExpandWindow[0] = axisExpandWindow[1] - winSize2;\n }\n return {\n axisExpandWindow: axisExpandWindow,\n behavior: behavior\n };\n };\n return Parallel;\n}();\nfunction restrict(len, extent) {\n return mathMin(mathMax(len, extent[0]), extent[1]);\n}\nfunction layoutAxisWithoutExpand(axisIndex, layoutInfo) {\n var step = layoutInfo.layoutLength / (layoutInfo.axisCount - 1);\n return {\n position: step * axisIndex,\n axisNameAvailableWidth: step,\n axisLabelShow: true\n };\n}\nfunction layoutAxisWithExpand(axisIndex, layoutInfo) {\n var layoutLength = layoutInfo.layoutLength;\n var axisExpandWidth = layoutInfo.axisExpandWidth;\n var axisCount = layoutInfo.axisCount;\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var winInnerIndices = layoutInfo.winInnerIndices;\n var position;\n var axisNameAvailableWidth = axisCollapseWidth;\n var axisLabelShow = false;\n var nameTruncateMaxWidth;\n if (axisIndex < winInnerIndices[0]) {\n position = axisIndex * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n } else if (axisIndex <= winInnerIndices[1]) {\n position = layoutInfo.axisExpandWindow0Pos + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0];\n axisNameAvailableWidth = axisExpandWidth;\n axisLabelShow = true;\n } else {\n position = layoutLength - (axisCount - 1 - axisIndex) * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n }\n return {\n position: position,\n axisNameAvailableWidth: axisNameAvailableWidth,\n axisLabelShow: axisLabelShow,\n nameTruncateMaxWidth: nameTruncateMaxWidth\n };\n}\nexport default Parallel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Parallel coordinate system creater.\n */\nimport Parallel from './Parallel.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nfunction createParallelCoordSys(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n });\n // Inject the coordinateSystems into seriesModel\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = seriesModel.getReferringComponents('parallel', SINGLE_REFERRING).models[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}\nvar parallelCoordSysCreator = {\n create: createParallelCoordSys\n};\nexport default parallelCoordSysCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper.js';\nimport * as numberUtil from '../../util/number.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nvar ParallelAxisModel = /** @class */function (_super) {\n __extends(ParallelAxisModel, _super);\n function ParallelAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelAxisModel.type;\n /**\n * @readOnly\n */\n _this.activeIntervals = [];\n return _this;\n }\n ParallelAxisModel.prototype.getAreaSelectStyle = function () {\n return makeStyleMapper([['fill', 'color'], ['lineWidth', 'borderWidth'], ['stroke', 'borderColor'], ['width', 'width'], ['opacity', 'opacity']\n // Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n // So do not transfer decal directly.\n ])(this.getModel('areaSelectStyle'));\n };\n /**\n * The code of this feature is put on AxisModel but not ParallelAxis,\n * because axisModel can be alive after echarts updating but instance of\n * ParallelAxis having been disposed. this._activeInterval should be kept\n * when action dispatched (i.e. legend click).\n *\n * @param intervals `interval.length === 0` means set all active.\n */\n ParallelAxisModel.prototype.setActiveIntervals = function (intervals) {\n var activeIntervals = this.activeIntervals = zrUtil.clone(intervals);\n // Normalize\n if (activeIntervals) {\n for (var i = activeIntervals.length - 1; i >= 0; i--) {\n numberUtil.asc(activeIntervals[i]);\n }\n }\n };\n /**\n * @param value When only attempting detect whether 'no activeIntervals set',\n * `value` is not needed to be input.\n */\n ParallelAxisModel.prototype.getActiveState = function (value) {\n var activeIntervals = this.activeIntervals;\n if (!activeIntervals.length) {\n return 'normal';\n }\n if (value == null || isNaN(+value)) {\n return 'inactive';\n }\n // Simple optimization\n if (activeIntervals.length === 1) {\n var interval = activeIntervals[0];\n if (interval[0] <= value && value <= interval[1]) {\n return 'active';\n }\n } else {\n for (var i = 0, len = activeIntervals.length; i < len; i++) {\n if (activeIntervals[i][0] <= value && value <= activeIntervals[i][1]) {\n return 'active';\n }\n }\n }\n return 'inactive';\n };\n return ParallelAxisModel;\n}(ComponentModel);\nzrUtil.mixin(ParallelAxisModel, AxisModelCommonMixin);\nexport default ParallelAxisModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { curry, each, map, bind, merge, clone, defaults, assert } from 'zrender/lib/core/util.js';\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as interactionMutex from './interactionMutex.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nvar BRUSH_PANEL_GLOBAL = true;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathPow = Math.pow;\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\nvar DIRECTION_MAP = {\n w: [0, 0],\n e: [0, 1],\n n: [1, 0],\n s: [1, 1]\n};\nvar CURSOR_MAP = {\n w: 'ew',\n e: 'ew',\n n: 'ns',\n s: 'ns',\n ne: 'nesw',\n sw: 'nesw',\n nw: 'nwse',\n se: 'nwse'\n};\nvar DEFAULT_BRUSH_OPT = {\n brushStyle: {\n lineWidth: 2,\n stroke: 'rgba(210,219,238,0.3)',\n fill: '#D2DBEE'\n },\n transformable: true,\n brushMode: 'single',\n removeOnClick: false\n};\nvar baseUID = 0;\n/**\n * params:\n * areas: Array., coord relates to container group,\n * If no container specified, to global.\n * opt {\n * isEnd: boolean,\n * removeOnClick: boolean\n * }\n */\nvar BrushController = /** @class */function (_super) {\n __extends(BrushController, _super);\n function BrushController(zr) {\n var _this = _super.call(this) || this;\n /**\n * @internal\n */\n _this._track = [];\n /**\n * @internal\n */\n _this._covers = [];\n _this._handlers = {};\n if (process.env.NODE_ENV !== 'production') {\n assert(zr);\n }\n _this._zr = zr;\n _this.group = new graphic.Group();\n _this._uid = 'brushController_' + baseUID++;\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = bind(handler, this);\n }, _this);\n return _this;\n }\n /**\n * If set to `false`, select disabled.\n */\n BrushController.prototype.enableBrush = function (brushOption) {\n if (process.env.NODE_ENV !== 'production') {\n assert(this._mounted);\n }\n this._brushType && this._doDisableBrush();\n brushOption.brushType && this._doEnableBrush(brushOption);\n return this;\n };\n BrushController.prototype._doEnableBrush = function (brushOption) {\n var zr = this._zr;\n // Consider roam, which takes globalPan too.\n if (!this._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, this._uid);\n }\n each(this._handlers, function (handler, eventName) {\n zr.on(eventName, handler);\n });\n this._brushType = brushOption.brushType;\n this._brushOption = merge(clone(DEFAULT_BRUSH_OPT), brushOption, true);\n };\n BrushController.prototype._doDisableBrush = function () {\n var zr = this._zr;\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, this._uid);\n each(this._handlers, function (handler, eventName) {\n zr.off(eventName, handler);\n });\n this._brushType = this._brushOption = null;\n };\n /**\n * @param panelOpts If not pass, it is global brush.\n */\n BrushController.prototype.setPanels = function (panelOpts) {\n if (panelOpts && panelOpts.length) {\n var panels_1 = this._panels = {};\n each(panelOpts, function (panelOpts) {\n panels_1[panelOpts.panelId] = clone(panelOpts);\n });\n } else {\n this._panels = null;\n }\n return this;\n };\n BrushController.prototype.mount = function (opt) {\n opt = opt || {};\n if (process.env.NODE_ENV !== 'production') {\n this._mounted = true; // should be at first.\n }\n\n this._enableGlobalPan = opt.enableGlobalPan;\n var thisGroup = this.group;\n this._zr.add(thisGroup);\n thisGroup.attr({\n x: opt.x || 0,\n y: opt.y || 0,\n rotation: opt.rotation || 0,\n scaleX: opt.scaleX || 1,\n scaleY: opt.scaleY || 1\n });\n this._transform = thisGroup.getLocalTransform();\n return this;\n };\n // eachCover(cb, context): void {\n // each(this._covers, cb, context);\n // }\n /**\n * Update covers.\n * @param coverConfigList\n * If coverConfigList is null/undefined, all covers removed.\n */\n BrushController.prototype.updateCovers = function (coverConfigList) {\n if (process.env.NODE_ENV !== 'production') {\n assert(this._mounted);\n }\n coverConfigList = map(coverConfigList, function (coverConfig) {\n return merge(clone(DEFAULT_BRUSH_OPT), coverConfig, true);\n });\n var tmpIdPrefix = '\\0-brush-index-';\n var oldCovers = this._covers;\n var newCovers = this._covers = [];\n var controller = this;\n var creatingCover = this._creatingCover;\n new DataDiffer(oldCovers, coverConfigList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute();\n return this;\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType;\n }\n function oldGetKey(cover, index) {\n return getKey(cover.__brushOption, index);\n }\n function addOrUpdate(newIndex, oldIndex) {\n var newBrushInternal = coverConfigList[newIndex];\n // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbidden.\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n } else {\n var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushInternal, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushInternal));\n updateCoverAfterCreation(controller, cover);\n }\n }\n function remove(oldIndex) {\n if (oldCovers[oldIndex] !== creatingCover) {\n controller.group.remove(oldCovers[oldIndex]);\n }\n }\n };\n BrushController.prototype.unmount = function () {\n if (process.env.NODE_ENV !== 'production') {\n if (!this._mounted) {\n return;\n }\n }\n this.enableBrush(false);\n // container may 'removeAll' outside.\n clearCovers(this);\n this._zr.remove(this.group);\n if (process.env.NODE_ENV !== 'production') {\n this._mounted = false; // should be at last.\n }\n\n return this;\n };\n BrushController.prototype.dispose = function () {\n this.unmount();\n this.off();\n };\n return BrushController;\n}(Eventful);\nfunction createCover(controller, brushOption) {\n var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption);\n cover.__brushOption = brushOption;\n updateZ(cover, brushOption);\n controller.group.add(cover);\n return cover;\n}\nfunction endCreating(controller, creatingCover) {\n var coverRenderer = getCoverRenderer(creatingCover);\n if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n return creatingCover;\n}\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption);\n}\nfunction updateZ(cover, brushOption) {\n var z = brushOption.z;\n z == null && (z = COVER_Z);\n cover.traverse(function (el) {\n el.z = z;\n el.z2 = z; // Consider in given container.\n });\n}\n\nfunction updateCoverAfterCreation(controller, cover) {\n getCoverRenderer(cover).updateCommon(controller, cover);\n updateCoverShape(controller, cover);\n}\nfunction getCoverRenderer(cover) {\n return coverRenderers[cover.__brushOption.brushType];\n}\n// return target panel or `true` (means global panel)\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n if (!panels) {\n return BRUSH_PANEL_GLOBAL; // Global panel\n }\n\n var panel;\n var transform = controller._transform;\n each(panels, function (pn) {\n pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn);\n });\n return panel;\n}\n// Return a panel or true\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n if (!panels) {\n return BRUSH_PANEL_GLOBAL; // Global panel\n }\n\n var panelId = cover.__brushOption.panelId;\n // User may give cover without coord sys info,\n // which is then treated as global panel.\n return panelId != null ? panels[panelId] : BRUSH_PANEL_GLOBAL;\n}\nfunction clearCovers(controller) {\n var covers = controller._covers;\n var originalLength = covers.length;\n each(covers, function (cover) {\n controller.group.remove(cover);\n }, controller);\n covers.length = 0;\n return !!originalLength;\n}\nfunction trigger(controller, opt) {\n var areas = map(controller._covers, function (cover) {\n var brushOption = cover.__brushOption;\n var range = clone(brushOption.range);\n return {\n brushType: brushOption.brushType,\n panelId: brushOption.panelId,\n range: range\n };\n });\n controller.trigger('brush', {\n areas: areas,\n isEnd: !!opt.isEnd,\n removeOnClick: !!opt.removeOnClick\n });\n}\nfunction shouldShowCover(controller) {\n var track = controller._track;\n if (!track.length) {\n return false;\n }\n var p2 = track[track.length - 1];\n var p1 = track[0];\n var dx = p2[0] - p1[0];\n var dy = p2[1] - p1[1];\n var dist = mathPow(dx * dx + dy * dy, 0.5);\n return dist > UNSELECT_THRESHOLD;\n}\nfunction getTrackEnds(track) {\n var tail = track.length - 1;\n tail < 0 && (tail = 0);\n return [track[0], track[tail]];\n}\n;\nfunction createBaseRectCover(rectRangeConverter, controller, brushOption, edgeNameSequences) {\n var cover = new graphic.Group();\n cover.add(new graphic.Rect({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true,\n draggable: true,\n cursor: 'move',\n drift: curry(driftRect, rectRangeConverter, controller, cover, ['n', 's', 'w', 'e']),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n each(edgeNameSequences, function (nameSequence) {\n cover.add(new graphic.Rect({\n name: nameSequence.join(''),\n style: {\n opacity: 0\n },\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(driftRect, rectRangeConverter, controller, cover, nameSequence),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n });\n return cover;\n}\nfunction updateBaseRect(controller, cover, localRange, brushOption) {\n var lineWidth = brushOption.brushStyle.lineWidth || 0;\n var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH);\n var x = localRange[0][0];\n var y = localRange[1][0];\n var xa = x - lineWidth / 2;\n var ya = y - lineWidth / 2;\n var x2 = localRange[0][1];\n var y2 = localRange[1][1];\n var x2a = x2 - handleSize + lineWidth / 2;\n var y2a = y2 - handleSize + lineWidth / 2;\n var width = x2 - x;\n var height = y2 - y;\n var widtha = width + lineWidth;\n var heighta = height + lineWidth;\n updateRectShape(controller, cover, 'main', x, y, width, height);\n if (brushOption.transformable) {\n updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize);\n updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize);\n updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize);\n updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize);\n }\n}\nfunction updateCommon(controller, cover) {\n var brushOption = cover.__brushOption;\n var transformable = brushOption.transformable;\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n each([['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']], function (nameSequence) {\n var el = cover.childOfName(nameSequence.join(''));\n var globalDir = nameSequence.length === 1 ? getGlobalDirection1(controller, nameSequence[0]) : getGlobalDirection2(controller, nameSequence);\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n });\n}\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]])));\n}\nfunction makeStyle(brushOption) {\n return defaults({\n strokeNoScale: true\n }, brushOption.brushStyle);\n}\nfunction formatRectRange(x, y, x2, y2) {\n var min = [mathMin(x, x2), mathMin(y, y2)];\n var max = [mathMax(x, x2), mathMax(y, y2)];\n return [[min[0], max[0]], [min[1], max[1]] // y range\n ];\n}\n\nfunction getTransform(controller) {\n return graphic.getTransform(controller.group);\n}\nfunction getGlobalDirection1(controller, localDirName) {\n var map = {\n w: 'left',\n e: 'right',\n n: 'top',\n s: 'bottom'\n };\n var inverseMap = {\n left: 'w',\n right: 'e',\n top: 'n',\n bottom: 's'\n };\n var dir = graphic.transformDirection(map[localDirName], getTransform(controller));\n return inverseMap[dir];\n}\nfunction getGlobalDirection2(controller, localDirNameSeq) {\n var globalDir = [getGlobalDirection1(controller, localDirNameSeq[0]), getGlobalDirection1(controller, localDirNameSeq[1])];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n}\nfunction driftRect(rectRangeConverter, controller, cover, dirNameSequence, dx, dy) {\n var brushOption = cover.__brushOption;\n var rectRange = rectRangeConverter.toRectRange(brushOption.range);\n var localDelta = toLocalDelta(controller, dx, dy);\n each(dirNameSequence, function (dirName) {\n var ind = DIRECTION_MAP[dirName];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n brushOption.range = rectRangeConverter.fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]));\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\nfunction driftPolygon(controller, cover, dx, dy) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\nfunction toLocalDelta(controller, dx, dy) {\n var thisGroup = controller.group;\n var localD = thisGroup.transformCoordToLocal(dx, dy);\n var localZero = thisGroup.transformCoordToLocal(0, 0);\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n return panel && panel !== BRUSH_PANEL_GLOBAL ? panel.clipPath(data, controller._transform) : clone(data);\n}\nfunction pointsToRect(points) {\n var xmin = mathMin(points[0][0], points[1][0]);\n var ymin = mathMin(points[0][1], points[1][1]);\n var xmax = mathMax(points[0][0], points[1][0]);\n var ymax = mathMax(points[0][1], points[1][1]);\n return {\n x: xmin,\n y: ymin,\n width: xmax - xmin,\n height: ymax - ymin\n };\n}\nfunction resetCursor(controller, e, localCursorPoint) {\n if (\n // Check active\n !controller._brushType\n // resetCursor should be always called when mouse is in zr area,\n // but not called when mouse is out of zr area to avoid bad influence\n // if `mousemove`, `mouseup` are triggered from `document` event.\n || isOutsideZrArea(controller, e.offsetX, e.offsetY)) {\n return;\n }\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint);\n // Check whether in covers.\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n if (currPanel && (currPanel === BRUSH_PANEL_GLOBAL || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) {\n // Use cursor style set on cover.\n return;\n }\n }\n }\n currPanel && zr.setCursorStyle('crosshair');\n}\nfunction preventDefault(e) {\n var rawE = e.event;\n rawE.preventDefault && rawE.preventDefault();\n}\nfunction mainShapeContain(cover, x, y) {\n return cover.childOfName('main').contain(x, y);\n}\nfunction updateCoverByMouse(controller, e, localCursorPoint, isEnd) {\n var creatingCover = controller._creatingCover;\n var panel = controller._creatingPanel;\n var thisBrushOption = controller._brushOption;\n var eventParams;\n controller._track.push(localCursorPoint.slice());\n if (shouldShowCover(controller) || creatingCover) {\n if (panel && !creatingCover) {\n thisBrushOption.brushMode === 'single' && clearCovers(controller);\n var brushOption = clone(thisBrushOption);\n brushOption.brushType = determineBrushType(brushOption.brushType, panel);\n brushOption.panelId = panel === BRUSH_PANEL_GLOBAL ? null : panel.panelId;\n creatingCover = controller._creatingCover = createCover(controller, brushOption);\n controller._covers.push(creatingCover);\n }\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track));\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n updateCoverShape(controller, creatingCover);\n eventParams = {\n isEnd: isEnd\n };\n }\n } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) {\n // Help user to remove covers easily, only by a tiny drag, in 'single' mode.\n // But a single click do not clear covers, because user may have casual\n // clicks (for example, click on other component and do not expect covers\n // disappear).\n // Only some cover removed, trigger action, but not every click trigger action.\n if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) {\n eventParams = {\n isEnd: isEnd,\n removeOnClick: true\n };\n }\n }\n return eventParams;\n}\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n if (process.env.NODE_ENV !== 'production') {\n assert(panel && panel.defaultBrushType, 'MUST have defaultBrushType when brushType is \"atuo\"');\n }\n return panel.defaultBrushType;\n }\n return brushType;\n}\nvar pointerHandlers = {\n mousedown: function (e) {\n if (this._dragging) {\n // In case some browser do not support globalOut,\n // and release mouse out side the browser.\n handleDragEnd(this, e);\n } else if (!e.target || !e.target.draggable) {\n preventDefault(e);\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n this._creatingCover = null;\n var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint);\n if (panel) {\n this._dragging = true;\n this._track = [localCursorPoint.slice()];\n }\n }\n },\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n resetCursor(this, e, localCursorPoint);\n if (this._dragging) {\n preventDefault(e);\n var eventParams = updateCoverByMouse(this, e, localCursorPoint, false);\n eventParams && trigger(this, eventParams);\n }\n },\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null;\n // trigger event should be at final, after procedure will be nested.\n eventParams && trigger(controller, eventParams);\n }\n}\nfunction isOutsideZrArea(controller, x, y) {\n var zr = controller._zr;\n return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();\n}\n/**\n * key: brushType\n */\nvar coverRenderers = {\n lineX: getLineRenderer(0),\n lineY: getLineRenderer(1),\n rect: {\n createCover: function (controller, brushOption) {\n function returnInput(range) {\n return range;\n }\n return createBaseRectCover({\n toRectRange: returnInput,\n fromRectRange: returnInput\n }, controller, brushOption, [['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]);\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n updateBaseRect(controller, cover, localRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n },\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group();\n // Do not use graphic.Polygon because graphic.Polyline do not close the\n // border of the shape when drawing, which is a better experience for user.\n cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0));\n // Use graphic.Polygon close the shape.\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n cover.childAt(0).setShape({\n points: clipByPanel(controller, cover, localRange)\n });\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n }\n};\nfunction getLineRenderer(xyIndex) {\n return {\n createCover: function (controller, brushOption) {\n return createBaseRectCover({\n toRectRange: function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n },\n fromRectRange: function (rectRange) {\n return rectRange[xyIndex];\n }\n }, controller, brushOption, [[['w'], ['e']], [['n'], ['s']]][xyIndex]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]);\n var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]);\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent;\n // If brushWidth not specified, fit the panel.\n var panel = getPanelByCover(controller, cover);\n if (panel !== BRUSH_PANEL_GLOBAL && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(xyIndex);\n } else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\nexport default BrushController;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { onIrrelevantElement } from './cursorHelper.js';\nimport * as graphicUtil from '../../util/graphic.js';\nexport function makeRectPanelClipPath(rect) {\n rect = normalizeRect(rect);\n return function (localPoints) {\n return graphicUtil.clipPointsByRect(localPoints, rect);\n };\n}\nexport function makeLinearBrushOtherExtent(rect, specifiedXYIndex) {\n rect = normalizeRect(rect);\n return function (xyIndex) {\n var idx = specifiedXYIndex != null ? specifiedXYIndex : xyIndex;\n var brushWidth = idx ? rect.width : rect.height;\n var base = idx ? rect.x : rect.y;\n return [base, base + (brushWidth || 0)];\n };\n}\nexport function makeRectIsTargetByCursor(rect, api, targetModel) {\n var boundingRect = normalizeRect(rect);\n return function (e, localCursorPoint) {\n return boundingRect.contain(localCursorPoint[0], localCursorPoint[1]) && !onIrrelevantElement(e, api, targetModel);\n };\n}\n// Consider width/height is negative.\nfunction normalizeRect(rect) {\n return BoundingRect.create(rect);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport BrushController from '../helper/BrushController.js';\nimport * as brushHelper from '../helper/brushHelper.js';\nimport * as graphic from '../../util/graphic.js';\nimport ComponentView from '../../view/Component.js';\nvar elementList = ['axisLine', 'axisTickLabel', 'axisName'];\nvar ParallelAxisView = /** @class */function (_super) {\n __extends(ParallelAxisView, _super);\n function ParallelAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelAxisView.type;\n return _this;\n }\n ParallelAxisView.prototype.init = function (ecModel, api) {\n _super.prototype.init.apply(this, arguments);\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this));\n };\n ParallelAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n if (fromAxisAreaSelect(axisModel, ecModel, payload)) {\n return;\n }\n this.axisModel = axisModel;\n this.api = api;\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n if (!axisModel.get('show')) {\n return;\n }\n var coordSysModel = getCoordSysModel(axisModel, ecModel);\n var coordSys = coordSysModel.coordinateSystem;\n var areaSelectStyle = axisModel.getAreaSelectStyle();\n var areaWidth = areaSelectStyle.width;\n var dim = axisModel.axis.dim;\n var axisLayout = coordSys.getAxisLayout(dim);\n var builderOpt = zrUtil.extend({\n strokeContainThreshold: areaWidth\n }, axisLayout);\n var axisBuilder = new AxisBuilder(axisModel, builderOpt);\n zrUtil.each(elementList, axisBuilder.add, axisBuilder);\n this._axisGroup.add(axisBuilder.getGroup());\n this._refreshBrushController(builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n };\n // /**\n // * @override\n // */\n // updateVisual(axisModel, ecModel, api, payload) {\n // this._brushController && this._brushController\n // .updateCovers(getCoverInfoList(axisModel));\n // }\n ParallelAxisView.prototype._refreshBrushController = function (builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api) {\n // After filtering, axis may change, select area needs to be update.\n var extent = axisModel.axis.getExtent();\n var extentLen = extent[1] - extent[0];\n var extra = Math.min(30, Math.abs(extentLen) * 0.1); // Arbitrary value.\n // width/height might be negative, which will be\n // normalized in BoundingRect.\n var rect = graphic.BoundingRect.create({\n x: extent[0],\n y: -areaWidth / 2,\n width: extentLen,\n height: areaWidth\n });\n rect.x -= extra;\n rect.width += 2 * extra;\n this._brushController.mount({\n enableGlobalPan: true,\n rotation: builderOpt.rotation,\n x: builderOpt.position[0],\n y: builderOpt.position[1]\n }).setPanels([{\n panelId: 'pl',\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect, 0)\n }]).enableBrush({\n brushType: 'lineX',\n brushStyle: areaSelectStyle,\n removeOnClick: true\n }).updateCovers(getCoverInfoList(axisModel));\n };\n ParallelAxisView.prototype._onBrush = function (eventParam) {\n var coverInfoList = eventParam.areas;\n // Do not cache these object, because the mey be changed.\n var axisModel = this.axisModel;\n var axis = axisModel.axis;\n var intervals = zrUtil.map(coverInfoList, function (coverInfo) {\n return [axis.coordToData(coverInfo.range[0], true), axis.coordToData(coverInfo.range[1], true)];\n });\n // If realtime is true, action is not dispatched on drag end, because\n // the drag end emits the same params with the last drag move event,\n // and may have some delay when using touch pad.\n if (!axisModel.option.realtime === eventParam.isEnd || eventParam.removeOnClick) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'axisAreaSelect',\n parallelAxisId: axisModel.id,\n intervals: intervals\n });\n }\n };\n ParallelAxisView.prototype.dispose = function () {\n this._brushController.dispose();\n };\n ParallelAxisView.type = 'parallelAxis';\n return ParallelAxisView;\n}(ComponentView);\nfunction fromAxisAreaSelect(axisModel, ecModel, payload) {\n return payload && payload.type === 'axisAreaSelect' && ecModel.findComponents({\n mainType: 'parallelAxis',\n query: payload\n })[0] === axisModel;\n}\nfunction getCoverInfoList(axisModel) {\n var axis = axisModel.axis;\n return zrUtil.map(axisModel.activeIntervals, function (interval) {\n return {\n brushType: 'lineX',\n panelId: 'pl',\n range: [axis.dataToCoord(interval[0], true), axis.dataToCoord(interval[1], true)]\n };\n });\n}\nfunction getCoordSysModel(axisModel, ecModel) {\n return ecModel.getComponent('parallel', axisModel.get('parallelIndex'));\n}\nexport default ParallelAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar actionInfo = {\n type: 'axisAreaSelect',\n event: 'axisAreaSelected'\n // update: 'updateVisual'\n};\n\nexport function installParallelActions(registers) {\n registers.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'parallelAxis',\n query: payload\n }, function (parallelAxisModel) {\n parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);\n });\n });\n /**\n * @payload\n */\n registers.registerAction('parallelAxisExpand', function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'parallel',\n query: payload\n }, function (parallelModel) {\n parallelModel.setAxisExpand(payload);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport parallelPreprocessor from '../../coord/parallel/parallelPreprocessor.js';\nimport ParallelView from './ParallelView.js';\nimport ParallelModel from '../../coord/parallel/ParallelModel.js';\nimport parallelCoordSysCreator from '../../coord/parallel/parallelCreator.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport ParallelAxisModel from '../../coord/parallel/AxisModel.js';\nimport ParallelAxisView from '../axis/ParallelAxisView.js';\nimport { installParallelActions } from '../axis/parallelAxisAction.js';\nvar defaultAxisOption = {\n type: 'value',\n areaSelectStyle: {\n width: 20,\n borderWidth: 1,\n borderColor: 'rgba(160,197,232)',\n color: 'rgba(160,197,232)',\n opacity: 0.3\n },\n realtime: true,\n z: 10\n};\nexport function install(registers) {\n registers.registerComponentView(ParallelView);\n registers.registerComponentModel(ParallelModel);\n registers.registerCoordinateSystem('parallel', parallelCoordSysCreator);\n registers.registerPreprocessor(parallelPreprocessor);\n registers.registerComponentModel(ParallelAxisModel);\n registers.registerComponentView(ParallelAxisView);\n axisModelCreator(registers, 'parallel', ParallelAxisModel, defaultAxisOption);\n installParallelActions(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport ParallelView from './ParallelView.js';\nimport ParallelSeriesModel from './ParallelSeries.js';\nimport parallelVisual from './parallelVisual.js';\nimport { install as installParallelComponent } from '../../component/parallel/install.js';\nexport function install(registers) {\n use(installParallelComponent);\n registers.registerChartView(ParallelView);\n registers.registerSeriesModel(ParallelSeriesModel);\n registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, parallelVisual);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis, setStatesStylesFromModel } from '../../util/states.js';\nimport ChartView from '../../view/Chart.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isString, retrieve3 } from 'zrender/lib/core/util.js';\nvar SankeyPathShape = /** @class */function () {\n function SankeyPathShape() {\n this.x1 = 0;\n this.y1 = 0;\n this.x2 = 0;\n this.y2 = 0;\n this.cpx1 = 0;\n this.cpy1 = 0;\n this.cpx2 = 0;\n this.cpy2 = 0;\n this.extent = 0;\n }\n return SankeyPathShape;\n}();\nvar SankeyPath = /** @class */function (_super) {\n __extends(SankeyPath, _super);\n function SankeyPath(opts) {\n return _super.call(this, opts) || this;\n }\n SankeyPath.prototype.getDefaultShape = function () {\n return new SankeyPathShape();\n };\n SankeyPath.prototype.buildPath = function (ctx, shape) {\n var extent = shape.extent;\n ctx.moveTo(shape.x1, shape.y1);\n ctx.bezierCurveTo(shape.cpx1, shape.cpy1, shape.cpx2, shape.cpy2, shape.x2, shape.y2);\n if (shape.orient === 'vertical') {\n ctx.lineTo(shape.x2 + extent, shape.y2);\n ctx.bezierCurveTo(shape.cpx2 + extent, shape.cpy2, shape.cpx1 + extent, shape.cpy1, shape.x1 + extent, shape.y1);\n } else {\n ctx.lineTo(shape.x2, shape.y2 + extent);\n ctx.bezierCurveTo(shape.cpx2, shape.cpy2 + extent, shape.cpx1, shape.cpy1 + extent, shape.x1, shape.y1 + extent);\n }\n ctx.closePath();\n };\n SankeyPath.prototype.highlight = function () {\n enterEmphasis(this);\n };\n SankeyPath.prototype.downplay = function () {\n leaveEmphasis(this);\n };\n return SankeyPath;\n}(graphic.Path);\nvar SankeyView = /** @class */function (_super) {\n __extends(SankeyView, _super);\n function SankeyView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SankeyView.type;\n _this._focusAdjacencyDisabled = false;\n return _this;\n }\n SankeyView.prototype.render = function (seriesModel, ecModel, api) {\n var sankeyView = this;\n var graph = seriesModel.getGraph();\n var group = this.group;\n var layoutInfo = seriesModel.layoutInfo;\n // view width\n var width = layoutInfo.width;\n // view height\n var height = layoutInfo.height;\n var nodeData = seriesModel.getData();\n var edgeData = seriesModel.getData('edge');\n var orient = seriesModel.get('orient');\n this._model = seriesModel;\n group.removeAll();\n group.x = layoutInfo.x;\n group.y = layoutInfo.y;\n // generate a bezire Curve for each edge\n graph.eachEdge(function (edge) {\n var curve = new SankeyPath();\n var ecData = getECData(curve);\n ecData.dataIndex = edge.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataType = 'edge';\n var edgeModel = edge.getModel();\n var lineStyleModel = edgeModel.getModel('lineStyle');\n var curvature = lineStyleModel.get('curveness');\n var n1Layout = edge.node1.getLayout();\n var node1Model = edge.node1.getModel();\n var dragX1 = node1Model.get('localX');\n var dragY1 = node1Model.get('localY');\n var n2Layout = edge.node2.getLayout();\n var node2Model = edge.node2.getModel();\n var dragX2 = node2Model.get('localX');\n var dragY2 = node2Model.get('localY');\n var edgeLayout = edge.getLayout();\n var x1;\n var y1;\n var x2;\n var y2;\n var cpx1;\n var cpy1;\n var cpx2;\n var cpy2;\n curve.shape.extent = Math.max(1, edgeLayout.dy);\n curve.shape.orient = orient;\n if (orient === 'vertical') {\n x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + edgeLayout.sy;\n y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + n1Layout.dy;\n x2 = (dragX2 != null ? dragX2 * width : n2Layout.x) + edgeLayout.ty;\n y2 = dragY2 != null ? dragY2 * height : n2Layout.y;\n cpx1 = x1;\n cpy1 = y1 * (1 - curvature) + y2 * curvature;\n cpx2 = x2;\n cpy2 = y1 * curvature + y2 * (1 - curvature);\n } else {\n x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + n1Layout.dx;\n y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + edgeLayout.sy;\n x2 = dragX2 != null ? dragX2 * width : n2Layout.x;\n y2 = (dragY2 != null ? dragY2 * height : n2Layout.y) + edgeLayout.ty;\n cpx1 = x1 * (1 - curvature) + x2 * curvature;\n cpy1 = y1;\n cpx2 = x1 * curvature + x2 * (1 - curvature);\n cpy2 = y2;\n }\n curve.setShape({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n cpx1: cpx1,\n cpy1: cpy1,\n cpx2: cpx2,\n cpy2: cpy2\n });\n curve.useStyle(lineStyleModel.getItemStyle());\n // Special color, use source node color or target node color\n applyCurveStyle(curve.style, orient, edge);\n var defaultEdgeLabelText = \"\" + edgeModel.get('value');\n var edgeLabelStateModels = getLabelStatesModels(edgeModel, 'edgeLabel');\n setLabelStyle(curve, edgeLabelStateModels, {\n labelFetcher: {\n getFormattedLabel: function (dataIndex, stateName, dataType, labelDimIndex, formatter, extendParams) {\n return seriesModel.getFormattedLabel(dataIndex, stateName, 'edge', labelDimIndex,\n // ensure edgeLabel formatter is provided\n // to prevent the inheritance from `label.formatter` of the series\n retrieve3(formatter, edgeLabelStateModels.normal && edgeLabelStateModels.normal.get('formatter'), defaultEdgeLabelText), extendParams);\n }\n },\n labelDataIndex: edge.dataIndex,\n defaultText: defaultEdgeLabelText\n });\n curve.setTextConfig({\n position: 'inside'\n });\n var emphasisModel = edgeModel.getModel('emphasis');\n setStatesStylesFromModel(curve, edgeModel, 'lineStyle', function (model) {\n var style = model.getItemStyle();\n applyCurveStyle(style, orient, edge);\n return style;\n });\n group.add(curve);\n edgeData.setItemGraphicEl(edge.dataIndex, curve);\n var focus = emphasisModel.get('focus');\n toggleHoverEmphasis(curve, focus === 'adjacency' ? edge.getAdjacentDataIndices() : focus === 'trajectory' ? edge.getTrajectoryDataIndices() : focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n });\n // Generate a rect for each node\n graph.eachNode(function (node) {\n var layout = node.getLayout();\n var itemModel = node.getModel();\n var dragX = itemModel.get('localX');\n var dragY = itemModel.get('localY');\n var emphasisModel = itemModel.getModel('emphasis');\n var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0;\n var rect = new graphic.Rect({\n shape: {\n x: dragX != null ? dragX * width : layout.x,\n y: dragY != null ? dragY * height : layout.y,\n width: layout.dx,\n height: layout.dy,\n r: borderRadius\n },\n style: itemModel.getModel('itemStyle').getItemStyle(),\n z2: 10\n });\n setLabelStyle(rect, getLabelStatesModels(itemModel), {\n labelFetcher: {\n getFormattedLabel: function (dataIndex, stateName) {\n return seriesModel.getFormattedLabel(dataIndex, stateName, 'node');\n }\n },\n labelDataIndex: node.dataIndex,\n defaultText: node.id\n });\n rect.disableLabelAnimation = true;\n rect.setStyle('fill', node.getVisual('color'));\n rect.setStyle('decal', node.getVisual('style').decal);\n setStatesStylesFromModel(rect, itemModel);\n group.add(rect);\n nodeData.setItemGraphicEl(node.dataIndex, rect);\n getECData(rect).dataType = 'node';\n var focus = emphasisModel.get('focus');\n toggleHoverEmphasis(rect, focus === 'adjacency' ? node.getAdjacentDataIndices() : focus === 'trajectory' ? node.getTrajectoryDataIndices() : focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n });\n nodeData.eachItemGraphicEl(function (el, dataIndex) {\n var itemModel = nodeData.getItemModel(dataIndex);\n if (itemModel.get('draggable')) {\n el.drift = function (dx, dy) {\n sankeyView._focusAdjacencyDisabled = true;\n this.shape.x += dx;\n this.shape.y += dy;\n this.dirty();\n api.dispatchAction({\n type: 'dragNode',\n seriesId: seriesModel.id,\n dataIndex: nodeData.getRawIndex(dataIndex),\n localX: this.shape.x / width,\n localY: this.shape.y / height\n });\n };\n el.ondragend = function () {\n sankeyView._focusAdjacencyDisabled = false;\n };\n el.draggable = true;\n el.cursor = 'move';\n }\n });\n if (!this._data && seriesModel.isAnimationEnabled()) {\n group.setClipPath(createGridClipShape(group.getBoundingRect(), seriesModel, function () {\n group.removeClipPath();\n }));\n }\n this._data = seriesModel.getData();\n };\n SankeyView.prototype.dispose = function () {};\n SankeyView.type = 'sankey';\n return SankeyView;\n}(ChartView);\n/**\n * Special color, use source node color or target node color\n * @param curveProps curve's style to parse\n * @param orient direction\n * @param edge current curve data\n */\nfunction applyCurveStyle(curveProps, orient, edge) {\n switch (curveProps.fill) {\n case 'source':\n curveProps.fill = edge.node1.getVisual('color');\n curveProps.decal = edge.node1.getVisual('style').decal;\n break;\n case 'target':\n curveProps.fill = edge.node2.getVisual('color');\n curveProps.decal = edge.node2.getVisual('style').decal;\n break;\n case 'gradient':\n var sourceColor = edge.node1.getVisual('color');\n var targetColor = edge.node2.getVisual('color');\n if (isString(sourceColor) && isString(targetColor)) {\n curveProps.fill = new graphic.LinearGradient(0, 0, +(orient === 'horizontal'), +(orient === 'vertical'), [{\n color: sourceColor,\n offset: 0\n }, {\n color: targetColor,\n offset: 1\n }]);\n }\n }\n}\n// Add animation to the view\nfunction createGridClipShape(rect, seriesModel, cb) {\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x - 10,\n y: rect.y - 10,\n width: 0,\n height: rect.height + 20\n }\n });\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width + 20\n }\n }, seriesModel, cb);\n return rectEl;\n}\nexport default SankeyView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge.js';\nimport Model from '../../model/Model.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nvar SankeySeriesModel = /** @class */function (_super) {\n __extends(SankeySeriesModel, _super);\n function SankeySeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SankeySeriesModel.type;\n return _this;\n }\n /**\n * Init a graph data structure from data in option series\n */\n SankeySeriesModel.prototype.getInitialData = function (option, ecModel) {\n var links = option.edges || option.links;\n var nodes = option.data || option.nodes;\n var levels = option.levels;\n this.levelModels = [];\n var levelModels = this.levelModels;\n for (var i = 0; i < levels.length; i++) {\n if (levels[i].depth != null && levels[i].depth >= 0) {\n levelModels[levels[i].depth] = new Model(levels[i], this, ecModel);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('levels[i].depth is mandatory and should be natural number');\n }\n }\n }\n if (nodes && links) {\n var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink);\n return graph.data;\n }\n function beforeLink(nodeData, edgeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var seriesModel = model.parentModel;\n var layout = seriesModel.getData().getItemLayout(idx);\n if (layout) {\n var nodeDepth = layout.depth;\n var levelModel = seriesModel.levelModels[nodeDepth];\n if (levelModel) {\n model.parentModel = levelModel;\n }\n }\n return model;\n });\n edgeData.wrapMethod('getItemModel', function (model, idx) {\n var seriesModel = model.parentModel;\n var edge = seriesModel.getGraph().getEdgeByIndex(idx);\n var layout = edge.node1.getLayout();\n if (layout) {\n var depth = layout.depth;\n var levelModel = seriesModel.levelModels[depth];\n if (levelModel) {\n model.parentModel = levelModel;\n }\n }\n return model;\n });\n }\n };\n SankeySeriesModel.prototype.setNodePosition = function (dataIndex, localPosition) {\n var nodes = this.option.data || this.option.nodes;\n var dataItem = nodes[dataIndex];\n dataItem.localX = localPosition[0];\n dataItem.localY = localPosition[1];\n };\n /**\n * Return the graphic data structure\n *\n * @return graphic data structure\n */\n SankeySeriesModel.prototype.getGraph = function () {\n return this.getData().graph;\n };\n /**\n * Get edge data of graphic data structure\n *\n * @return data structure of list\n */\n SankeySeriesModel.prototype.getEdgeData = function () {\n return this.getGraph().edgeData;\n };\n SankeySeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n function noValue(val) {\n return isNaN(val) || val == null;\n }\n // dataType === 'node' or empty do not show tooltip by default\n if (dataType === 'edge') {\n var params = this.getDataParams(dataIndex, dataType);\n var rawDataOpt = params.data;\n var edgeValue = params.value;\n var edgeName = rawDataOpt.source + ' -- ' + rawDataOpt.target;\n return createTooltipMarkup('nameValue', {\n name: edgeName,\n value: edgeValue,\n noValue: noValue(edgeValue)\n });\n }\n // dataType === 'node'\n else {\n var node = this.getGraph().getNodeByIndex(dataIndex);\n var value = node.getLayout().value;\n var name_1 = this.getDataParams(dataIndex, dataType).data.name;\n return createTooltipMarkup('nameValue', {\n name: name_1 != null ? name_1 + '' : null,\n value: value,\n noValue: noValue(value)\n });\n }\n };\n SankeySeriesModel.prototype.optionUpdated = function () {};\n // Override Series.getDataParams()\n SankeySeriesModel.prototype.getDataParams = function (dataIndex, dataType) {\n var params = _super.prototype.getDataParams.call(this, dataIndex, dataType);\n if (params.value == null && dataType === 'node') {\n var node = this.getGraph().getNodeByIndex(dataIndex);\n var nodeValue = node.getLayout().value;\n params.value = nodeValue;\n }\n return params;\n };\n SankeySeriesModel.type = 'series.sankey';\n SankeySeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n left: '5%',\n top: '5%',\n right: '20%',\n bottom: '5%',\n orient: 'horizontal',\n nodeWidth: 20,\n nodeGap: 8,\n draggable: true,\n layoutIterations: 32,\n label: {\n show: true,\n position: 'right',\n fontSize: 12\n },\n edgeLabel: {\n show: false,\n fontSize: 12\n },\n levels: [],\n nodeAlign: 'justify',\n lineStyle: {\n color: '#314656',\n opacity: 0.2,\n curveness: 0.5\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n opacity: 0.5\n }\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n animationEasing: 'linear',\n animationDuration: 1000\n };\n return SankeySeriesModel;\n}(SeriesModel);\nexport default SankeySeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as layout from '../../util/layout.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { groupData } from '../../util/model.js';\nexport default function sankeyLayout(ecModel, api) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var nodeWidth = seriesModel.get('nodeWidth');\n var nodeGap = seriesModel.get('nodeGap');\n var layoutInfo = getViewRect(seriesModel, api);\n seriesModel.layoutInfo = layoutInfo;\n var width = layoutInfo.width;\n var height = layoutInfo.height;\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n var edges = graph.edges;\n computeNodeValues(nodes);\n var filteredNodes = zrUtil.filter(nodes, function (node) {\n return node.getLayout().value === 0;\n });\n var iterations = filteredNodes.length !== 0 ? 0 : seriesModel.get('layoutIterations');\n var orient = seriesModel.get('orient');\n var nodeAlign = seriesModel.get('nodeAlign');\n layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign);\n });\n}\n/**\n * Get the layout position of the whole view\n */\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\nfunction layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign) {\n computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign);\n computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient);\n computeEdgeDepths(nodes, orient);\n}\n/**\n * Compute the value of each node by summing the associated edge's value\n */\nfunction computeNodeValues(nodes) {\n zrUtil.each(nodes, function (node) {\n var value1 = sum(node.outEdges, getEdgeValue);\n var value2 = sum(node.inEdges, getEdgeValue);\n var nodeRawValue = node.getValue() || 0;\n var value = Math.max(value1, value2, nodeRawValue);\n node.setLayout({\n value: value\n }, true);\n });\n}\n/**\n * Compute the x-position for each node.\n *\n * Here we use Kahn algorithm to detect cycle when we traverse\n * the node to computer the initial x position.\n */\nfunction computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) {\n // Used to mark whether the edge is deleted. if it is deleted,\n // the value is 0, otherwise it is 1.\n var remainEdges = [];\n // Storage each node's indegree.\n var indegreeArr = [];\n // Used to storage the node with indegree is equal to 0.\n var zeroIndegrees = [];\n var nextTargetNode = [];\n var x = 0;\n // let kx = 0;\n for (var i = 0; i < edges.length; i++) {\n remainEdges[i] = 1;\n }\n for (var i = 0; i < nodes.length; i++) {\n indegreeArr[i] = nodes[i].inEdges.length;\n if (indegreeArr[i] === 0) {\n zeroIndegrees.push(nodes[i]);\n }\n }\n var maxNodeDepth = -1;\n // Traversing nodes using topological sorting to calculate the\n // horizontal(if orient === 'horizontal') or vertical(if orient === 'vertical')\n // position of the nodes.\n while (zeroIndegrees.length) {\n for (var idx = 0; idx < zeroIndegrees.length; idx++) {\n var node = zeroIndegrees[idx];\n var item = node.hostGraph.data.getRawDataItem(node.dataIndex);\n var isItemDepth = item.depth != null && item.depth >= 0;\n if (isItemDepth && item.depth > maxNodeDepth) {\n maxNodeDepth = item.depth;\n }\n node.setLayout({\n depth: isItemDepth ? item.depth : x\n }, true);\n orient === 'vertical' ? node.setLayout({\n dy: nodeWidth\n }, true) : node.setLayout({\n dx: nodeWidth\n }, true);\n for (var edgeIdx = 0; edgeIdx < node.outEdges.length; edgeIdx++) {\n var edge = node.outEdges[edgeIdx];\n var indexEdge = edges.indexOf(edge);\n remainEdges[indexEdge] = 0;\n var targetNode = edge.node2;\n var nodeIndex = nodes.indexOf(targetNode);\n if (--indegreeArr[nodeIndex] === 0 && nextTargetNode.indexOf(targetNode) < 0) {\n nextTargetNode.push(targetNode);\n }\n }\n }\n ++x;\n zeroIndegrees = nextTargetNode;\n nextTargetNode = [];\n }\n for (var i = 0; i < remainEdges.length; i++) {\n if (remainEdges[i] === 1) {\n throw new Error('Sankey is a DAG, the original data has cycle!');\n }\n }\n var maxDepth = maxNodeDepth > x - 1 ? maxNodeDepth : x - 1;\n if (nodeAlign && nodeAlign !== 'left') {\n adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth);\n }\n var kx = orient === 'vertical' ? (height - nodeWidth) / maxDepth : (width - nodeWidth) / maxDepth;\n scaleNodeBreadths(nodes, kx, orient);\n}\nfunction isNodeDepth(node) {\n var item = node.hostGraph.data.getRawDataItem(node.dataIndex);\n return item.depth != null && item.depth >= 0;\n}\nfunction adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth) {\n if (nodeAlign === 'right') {\n var nextSourceNode = [];\n var remainNodes = nodes;\n var nodeHeight = 0;\n while (remainNodes.length) {\n for (var i = 0; i < remainNodes.length; i++) {\n var node = remainNodes[i];\n node.setLayout({\n skNodeHeight: nodeHeight\n }, true);\n for (var j = 0; j < node.inEdges.length; j++) {\n var edge = node.inEdges[j];\n if (nextSourceNode.indexOf(edge.node1) < 0) {\n nextSourceNode.push(edge.node1);\n }\n }\n }\n remainNodes = nextSourceNode;\n nextSourceNode = [];\n ++nodeHeight;\n }\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node)) {\n node.setLayout({\n depth: Math.max(0, maxDepth - node.getLayout().skNodeHeight)\n }, true);\n }\n });\n } else if (nodeAlign === 'justify') {\n moveSinksRight(nodes, maxDepth);\n }\n}\n/**\n * All the node without outEgdes are assigned maximum x-position and\n * be aligned in the last column.\n *\n * @param nodes. node of sankey view.\n * @param maxDepth. use to assign to node without outEdges as x-position.\n */\nfunction moveSinksRight(nodes, maxDepth) {\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node) && !node.outEdges.length) {\n node.setLayout({\n depth: maxDepth\n }, true);\n }\n });\n}\n/**\n * Scale node x-position to the width\n *\n * @param nodes node of sankey view\n * @param kx multiple used to scale nodes\n */\nfunction scaleNodeBreadths(nodes, kx, orient) {\n zrUtil.each(nodes, function (node) {\n var nodeDepth = node.getLayout().depth * kx;\n orient === 'vertical' ? node.setLayout({\n y: nodeDepth\n }, true) : node.setLayout({\n x: nodeDepth\n }, true);\n });\n}\n/**\n * Using Gauss-Seidel iterations method to compute the node depth(y-position)\n *\n * @param nodes node of sankey view\n * @param edges edge of sankey view\n * @param height the whole height of the area to draw the view\n * @param nodeGap the vertical distance between two nodes\n * in the same column.\n * @param iterations the number of iterations for the algorithm\n */\nfunction computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient) {\n var nodesByBreadth = prepareNodesByBreadth(nodes, orient);\n initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n for (var alpha = 1; iterations > 0; iterations--) {\n // 0.99 is a experience parameter, ensure that each iterations of\n // changes as small as possible.\n alpha *= 0.99;\n relaxRightToLeft(nodesByBreadth, alpha, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n relaxLeftToRight(nodesByBreadth, alpha, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n }\n}\nfunction prepareNodesByBreadth(nodes, orient) {\n var nodesByBreadth = [];\n var keyAttr = orient === 'vertical' ? 'y' : 'x';\n var groupResult = groupData(nodes, function (node) {\n return node.getLayout()[keyAttr];\n });\n groupResult.keys.sort(function (a, b) {\n return a - b;\n });\n zrUtil.each(groupResult.keys, function (key) {\n nodesByBreadth.push(groupResult.buckets.get(key));\n });\n return nodesByBreadth;\n}\n/**\n * Compute the original y-position for each node\n */\nfunction initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient) {\n var minKy = Infinity;\n zrUtil.each(nodesByBreadth, function (nodes) {\n var n = nodes.length;\n var sum = 0;\n zrUtil.each(nodes, function (node) {\n sum += node.getLayout().value;\n });\n var ky = orient === 'vertical' ? (width - (n - 1) * nodeGap) / sum : (height - (n - 1) * nodeGap) / sum;\n if (ky < minKy) {\n minKy = ky;\n }\n });\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node, i) {\n var nodeDy = node.getLayout().value * minKy;\n if (orient === 'vertical') {\n node.setLayout({\n x: i\n }, true);\n node.setLayout({\n dx: nodeDy\n }, true);\n } else {\n node.setLayout({\n y: i\n }, true);\n node.setLayout({\n dy: nodeDy\n }, true);\n }\n });\n });\n zrUtil.each(edges, function (edge) {\n var edgeDy = +edge.getValue() * minKy;\n edge.setLayout({\n dy: edgeDy\n }, true);\n });\n}\n/**\n * Resolve the collision of initialized depth (y-position)\n */\nfunction resolveCollisions(nodesByBreadth, nodeGap, height, width, orient) {\n var keyAttr = orient === 'vertical' ? 'x' : 'y';\n zrUtil.each(nodesByBreadth, function (nodes) {\n nodes.sort(function (a, b) {\n return a.getLayout()[keyAttr] - b.getLayout()[keyAttr];\n });\n var nodeX;\n var node;\n var dy;\n var y0 = 0;\n var n = nodes.length;\n var nodeDyAttr = orient === 'vertical' ? 'dx' : 'dy';\n for (var i = 0; i < n; i++) {\n node = nodes[i];\n dy = y0 - node.getLayout()[keyAttr];\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] + dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n }\n y0 = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap;\n }\n var viewWidth = orient === 'vertical' ? width : height;\n // If the bottommost node goes outside the bounds, push it back up\n dy = y0 - nodeGap - viewWidth;\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n y0 = nodeX;\n for (var i = n - 2; i >= 0; --i) {\n node = nodes[i];\n dy = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap - y0;\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n }\n y0 = node.getLayout()[keyAttr];\n }\n }\n });\n}\n/**\n * Change the y-position of the nodes, except most the right side nodes\n * @param nodesByBreadth\n * @param alpha parameter used to adjust the nodes y-position\n */\nfunction relaxRightToLeft(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth.slice().reverse(), function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.outEdges.length) {\n var y = sum(node.outEdges, weightedTarget, orient) / sum(node.outEdges, getEdgeValue);\n if (isNaN(y)) {\n var len = node.outEdges.length;\n y = len ? sum(node.outEdges, centerTarget, orient) / len : 0;\n }\n if (orient === 'vertical') {\n var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;\n node.setLayout({\n x: nodeX\n }, true);\n } else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({\n y: nodeY\n }, true);\n }\n }\n });\n });\n}\nfunction weightedTarget(edge, orient) {\n return center(edge.node2, orient) * edge.getValue();\n}\nfunction centerTarget(edge, orient) {\n return center(edge.node2, orient);\n}\nfunction weightedSource(edge, orient) {\n return center(edge.node1, orient) * edge.getValue();\n}\nfunction centerSource(edge, orient) {\n return center(edge.node1, orient);\n}\nfunction center(node, orient) {\n return orient === 'vertical' ? node.getLayout().x + node.getLayout().dx / 2 : node.getLayout().y + node.getLayout().dy / 2;\n}\nfunction getEdgeValue(edge) {\n return edge.getValue();\n}\nfunction sum(array, cb, orient) {\n var sum = 0;\n var len = array.length;\n var i = -1;\n while (++i < len) {\n var value = +cb(array[i], orient);\n if (!isNaN(value)) {\n sum += value;\n }\n }\n return sum;\n}\n/**\n * Change the y-position of the nodes, except most the left side nodes\n */\nfunction relaxLeftToRight(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.inEdges.length) {\n var y = sum(node.inEdges, weightedSource, orient) / sum(node.inEdges, getEdgeValue);\n if (isNaN(y)) {\n var len = node.inEdges.length;\n y = len ? sum(node.inEdges, centerSource, orient) / len : 0;\n }\n if (orient === 'vertical') {\n var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;\n node.setLayout({\n x: nodeX\n }, true);\n } else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({\n y: nodeY\n }, true);\n }\n }\n });\n });\n}\n/**\n * Compute the depth(y-position) of each edge\n */\nfunction computeEdgeDepths(nodes, orient) {\n var keyAttr = orient === 'vertical' ? 'x' : 'y';\n zrUtil.each(nodes, function (node) {\n node.outEdges.sort(function (a, b) {\n return a.node2.getLayout()[keyAttr] - b.node2.getLayout()[keyAttr];\n });\n node.inEdges.sort(function (a, b) {\n return a.node1.getLayout()[keyAttr] - b.node1.getLayout()[keyAttr];\n });\n });\n zrUtil.each(nodes, function (node) {\n var sy = 0;\n var ty = 0;\n zrUtil.each(node.outEdges, function (edge) {\n edge.setLayout({\n sy: sy\n }, true);\n sy += edge.getLayout().dy;\n });\n zrUtil.each(node.inEdges, function (edge) {\n edge.setLayout({\n ty: ty\n }, true);\n ty += edge.getLayout().dy;\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nexport default function sankeyVisual(ecModel) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n var edges = graph.edges;\n if (nodes.length) {\n var minValue_1 = Infinity;\n var maxValue_1 = -Infinity;\n zrUtil.each(nodes, function (node) {\n var nodeValue = node.getLayout().value;\n if (nodeValue < minValue_1) {\n minValue_1 = nodeValue;\n }\n if (nodeValue > maxValue_1) {\n maxValue_1 = nodeValue;\n }\n });\n zrUtil.each(nodes, function (node) {\n var mapping = new VisualMapping({\n type: 'color',\n mappingMethod: 'linear',\n dataExtent: [minValue_1, maxValue_1],\n visual: seriesModel.get('color')\n });\n var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value);\n var customColor = node.getModel().get(['itemStyle', 'color']);\n if (customColor != null) {\n node.setVisual('color', customColor);\n node.setVisual('style', {\n fill: customColor\n });\n } else {\n node.setVisual('color', mapValueToColor);\n node.setVisual('style', {\n fill: mapValueToColor\n });\n }\n });\n }\n if (edges.length) {\n zrUtil.each(edges, function (edge) {\n var edgeStyle = edge.getModel().get('lineStyle');\n edge.setVisual('style', edgeStyle);\n });\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SankeyView from './SankeyView.js';\nimport SankeySeriesModel from './SankeySeries.js';\nimport sankeyLayout from './sankeyLayout.js';\nimport sankeyVisual from './sankeyVisual.js';\nexport function install(registers) {\n registers.registerChartView(SankeyView);\n registers.registerSeriesModel(SankeySeriesModel);\n registers.registerLayout(sankeyLayout);\n registers.registerVisual(sankeyVisual);\n registers.registerAction({\n type: 'dragNode',\n event: 'dragnode',\n // here can only use 'update' now, other value is not support in echarts.\n update: 'update'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sankey',\n query: payload\n }, function (seriesModel) {\n seriesModel.setNodePosition(payload.dataIndex, [payload.localX, payload.localY]);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport createSeriesDataSimply from './createSeriesDataSimply.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getDimensionTypeByAxis } from '../../data/helper/dimensionHelper.js';\nimport { makeSeriesEncodeForAxisCoordSys } from '../../data/helper/sourceHelper.js';\nvar WhiskerBoxCommonMixin = /** @class */function () {\n function WhiskerBoxCommonMixin() {}\n /**\n * @override\n */\n WhiskerBoxCommonMixin.prototype.getInitialData = function (option, ecModel) {\n // When both types of xAxis and yAxis are 'value', layout is\n // needed to be specified by user. Otherwise, layout can be\n // judged by which axis is category.\n var ordinalMeta;\n var xAxisModel = ecModel.getComponent('xAxis', this.get('xAxisIndex'));\n var yAxisModel = ecModel.getComponent('yAxis', this.get('yAxisIndex'));\n var xAxisType = xAxisModel.get('type');\n var yAxisType = yAxisModel.get('type');\n var addOrdinal;\n // FIXME\n // Consider time axis.\n if (xAxisType === 'category') {\n option.layout = 'horizontal';\n ordinalMeta = xAxisModel.getOrdinalMeta();\n addOrdinal = true;\n } else if (yAxisType === 'category') {\n option.layout = 'vertical';\n ordinalMeta = yAxisModel.getOrdinalMeta();\n addOrdinal = true;\n } else {\n option.layout = option.layout || 'horizontal';\n }\n var coordDims = ['x', 'y'];\n var baseAxisDimIndex = option.layout === 'horizontal' ? 0 : 1;\n var baseAxisDim = this._baseAxisDim = coordDims[baseAxisDimIndex];\n var otherAxisDim = coordDims[1 - baseAxisDimIndex];\n var axisModels = [xAxisModel, yAxisModel];\n var baseAxisType = axisModels[baseAxisDimIndex].get('type');\n var otherAxisType = axisModels[1 - baseAxisDimIndex].get('type');\n var data = option.data;\n // Clone a new data for next setOption({}) usage.\n // Avoid modifying current data will affect further update.\n if (data && addOrdinal) {\n var newOptionData_1 = [];\n zrUtil.each(data, function (item, index) {\n var newItem;\n if (zrUtil.isArray(item)) {\n newItem = item.slice();\n // Modify current using data.\n item.unshift(index);\n } else if (zrUtil.isArray(item.value)) {\n newItem = zrUtil.extend({}, item);\n newItem.value = newItem.value.slice();\n // Modify current using data.\n item.value.unshift(index);\n } else {\n newItem = item;\n }\n newOptionData_1.push(newItem);\n });\n option.data = newOptionData_1;\n }\n var defaultValueDimensions = this.defaultValueDimensions;\n var coordDimensions = [{\n name: baseAxisDim,\n type: getDimensionTypeByAxis(baseAxisType),\n ordinalMeta: ordinalMeta,\n otherDims: {\n tooltip: false,\n itemName: 0\n },\n dimsDef: ['base']\n }, {\n name: otherAxisDim,\n type: getDimensionTypeByAxis(otherAxisType),\n dimsDef: defaultValueDimensions.slice()\n }];\n return createSeriesDataSimply(this, {\n coordDimensions: coordDimensions,\n dimensionsCount: defaultValueDimensions.length + 1,\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForAxisCoordSys, coordDimensions, this)\n });\n };\n /**\n * If horizontal, base axis is x, otherwise y.\n * @override\n */\n WhiskerBoxCommonMixin.prototype.getBaseAxis = function () {\n var dim = this._baseAxisDim;\n return this.ecModel.getComponent(dim + 'Axis', this.get(dim + 'AxisIndex')).axis;\n };\n return WhiskerBoxCommonMixin;\n}();\n;\nexport { WhiskerBoxCommonMixin };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport { WhiskerBoxCommonMixin } from '../helper/whiskerBoxCommon.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nvar BoxplotSeriesModel = /** @class */function (_super) {\n __extends(BoxplotSeriesModel, _super);\n function BoxplotSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BoxplotSeriesModel.type;\n // TODO\n // box width represents group size, so dimension should have 'size'.\n /**\n * @see \n * The meanings of 'min' and 'max' depend on user,\n * and echarts do not need to know it.\n * @readOnly\n */\n _this.defaultValueDimensions = [{\n name: 'min',\n defaultTooltip: true\n }, {\n name: 'Q1',\n defaultTooltip: true\n }, {\n name: 'median',\n defaultTooltip: true\n }, {\n name: 'Q3',\n defaultTooltip: true\n }, {\n name: 'max',\n defaultTooltip: true\n }];\n _this.visualDrawType = 'stroke';\n return _this;\n }\n BoxplotSeriesModel.type = 'series.boxplot';\n BoxplotSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid'];\n BoxplotSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n layout: null,\n boxWidth: [7, 50],\n itemStyle: {\n color: '#fff',\n borderWidth: 1\n },\n emphasis: {\n scale: true,\n itemStyle: {\n borderWidth: 2,\n shadowBlur: 5,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.2)'\n }\n },\n animationDuration: 800\n };\n return BoxplotSeriesModel;\n}(SeriesModel);\nmixin(BoxplotSeriesModel, WhiskerBoxCommonMixin, true);\nexport default BoxplotSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ChartView from '../../view/Chart.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar BoxplotView = /** @class */function (_super) {\n __extends(BoxplotView, _super);\n function BoxplotView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BoxplotView.type;\n return _this;\n }\n BoxplotView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var group = this.group;\n var oldData = this._data;\n // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!this._data) {\n group.removeAll();\n }\n var constDim = seriesModel.get('layout') === 'horizontal' ? 1 : 0;\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var itemLayout = data.getItemLayout(newIdx);\n var symbolEl = createNormalBox(itemLayout, data, newIdx, constDim, true);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n // Empty data\n if (!data.hasValue(newIdx)) {\n group.remove(symbolEl);\n return;\n }\n var itemLayout = data.getItemLayout(newIdx);\n if (!symbolEl) {\n symbolEl = createNormalBox(itemLayout, data, newIdx, constDim);\n } else {\n saveOldStyle(symbolEl);\n updateNormalBoxData(itemLayout, symbolEl, data, newIdx);\n }\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n };\n BoxplotView.prototype.remove = function (ecModel) {\n var group = this.group;\n var data = this._data;\n this._data = null;\n data && data.eachItemGraphicEl(function (el) {\n el && group.remove(el);\n });\n };\n BoxplotView.type = 'boxplot';\n return BoxplotView;\n}(ChartView);\nvar BoxPathShape = /** @class */function () {\n function BoxPathShape() {}\n return BoxPathShape;\n}();\nvar BoxPath = /** @class */function (_super) {\n __extends(BoxPath, _super);\n function BoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'boxplotBoxPath';\n return _this;\n }\n BoxPath.prototype.getDefaultShape = function () {\n return new BoxPathShape();\n };\n BoxPath.prototype.buildPath = function (ctx, shape) {\n var ends = shape.points;\n var i = 0;\n ctx.moveTo(ends[i][0], ends[i][1]);\n i++;\n for (; i < 4; i++) {\n ctx.lineTo(ends[i][0], ends[i][1]);\n }\n ctx.closePath();\n for (; i < ends.length; i++) {\n ctx.moveTo(ends[i][0], ends[i][1]);\n i++;\n ctx.lineTo(ends[i][0], ends[i][1]);\n }\n };\n return BoxPath;\n}(Path);\nfunction createNormalBox(itemLayout, data, dataIndex, constDim, isInit) {\n var ends = itemLayout.ends;\n var el = new BoxPath({\n shape: {\n points: isInit ? transInit(ends, constDim, itemLayout) : ends\n }\n });\n updateNormalBoxData(itemLayout, el, data, dataIndex, isInit);\n return el;\n}\nfunction updateNormalBoxData(itemLayout, el, data, dataIndex, isInit) {\n var seriesModel = data.hostModel;\n var updateMethod = graphic[isInit ? 'initProps' : 'updateProps'];\n updateMethod(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, dataIndex);\n el.useStyle(data.getItemVisual(dataIndex, 'style'));\n el.style.strokeNoScale = true;\n el.z2 = 100;\n var itemModel = data.getItemModel(dataIndex);\n var emphasisModel = itemModel.getModel('emphasis');\n setStatesStylesFromModel(el, itemModel);\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n}\nfunction transInit(points, dim, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[dim] = itemLayout.initBaseline;\n return point;\n });\n}\nexport default BoxplotView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parsePercent } from '../../util/number.js';\nvar each = zrUtil.each;\nexport default function boxplotLayout(ecModel) {\n var groupResult = groupSeriesByAxis(ecModel);\n each(groupResult, function (groupItem) {\n var seriesModels = groupItem.seriesModels;\n if (!seriesModels.length) {\n return;\n }\n calculateBase(groupItem);\n each(seriesModels, function (seriesModel, idx) {\n layoutSingleSeries(seriesModel, groupItem.boxOffsetList[idx], groupItem.boxWidthList[idx]);\n });\n });\n}\n/**\n * Group series by axis.\n */\nfunction groupSeriesByAxis(ecModel) {\n var result = [];\n var axisList = [];\n ecModel.eachSeriesByType('boxplot', function (seriesModel) {\n var baseAxis = seriesModel.getBaseAxis();\n var idx = zrUtil.indexOf(axisList, baseAxis);\n if (idx < 0) {\n idx = axisList.length;\n axisList[idx] = baseAxis;\n result[idx] = {\n axis: baseAxis,\n seriesModels: []\n };\n }\n result[idx].seriesModels.push(seriesModel);\n });\n return result;\n}\n/**\n * Calculate offset and box width for each series.\n */\nfunction calculateBase(groupItem) {\n var baseAxis = groupItem.axis;\n var seriesModels = groupItem.seriesModels;\n var seriesCount = seriesModels.length;\n var boxWidthList = groupItem.boxWidthList = [];\n var boxOffsetList = groupItem.boxOffsetList = [];\n var boundList = [];\n var bandWidth;\n if (baseAxis.type === 'category') {\n bandWidth = baseAxis.getBandWidth();\n } else {\n var maxDataCount_1 = 0;\n each(seriesModels, function (seriesModel) {\n maxDataCount_1 = Math.max(maxDataCount_1, seriesModel.getData().count());\n });\n var extent = baseAxis.getExtent();\n bandWidth = Math.abs(extent[1] - extent[0]) / maxDataCount_1;\n }\n each(seriesModels, function (seriesModel) {\n var boxWidthBound = seriesModel.get('boxWidth');\n if (!zrUtil.isArray(boxWidthBound)) {\n boxWidthBound = [boxWidthBound, boxWidthBound];\n }\n boundList.push([parsePercent(boxWidthBound[0], bandWidth) || 0, parsePercent(boxWidthBound[1], bandWidth) || 0]);\n });\n var availableWidth = bandWidth * 0.8 - 2;\n var boxGap = availableWidth / seriesCount * 0.3;\n var boxWidth = (availableWidth - boxGap * (seriesCount - 1)) / seriesCount;\n var base = boxWidth / 2 - availableWidth / 2;\n each(seriesModels, function (seriesModel, idx) {\n boxOffsetList.push(base);\n base += boxGap + boxWidth;\n boxWidthList.push(Math.min(Math.max(boxWidth, boundList[idx][0]), boundList[idx][1]));\n });\n}\n/**\n * Calculate points location for each series.\n */\nfunction layoutSingleSeries(seriesModel, offset, boxWidth) {\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n var halfWidth = boxWidth / 2;\n var cDimIdx = seriesModel.get('layout') === 'horizontal' ? 0 : 1;\n var vDimIdx = 1 - cDimIdx;\n var coordDims = ['x', 'y'];\n var cDim = data.mapDimension(coordDims[cDimIdx]);\n var vDims = data.mapDimensionsAll(coordDims[vDimIdx]);\n if (cDim == null || vDims.length < 5) {\n return;\n }\n for (var dataIndex = 0; dataIndex < data.count(); dataIndex++) {\n var axisDimVal = data.get(cDim, dataIndex);\n var median = getPoint(axisDimVal, vDims[2], dataIndex);\n var end1 = getPoint(axisDimVal, vDims[0], dataIndex);\n var end2 = getPoint(axisDimVal, vDims[1], dataIndex);\n var end4 = getPoint(axisDimVal, vDims[3], dataIndex);\n var end5 = getPoint(axisDimVal, vDims[4], dataIndex);\n var ends = [];\n addBodyEnd(ends, end2, false);\n addBodyEnd(ends, end4, true);\n ends.push(end1, end2, end5, end4);\n layEndLine(ends, end1);\n layEndLine(ends, end5);\n layEndLine(ends, median);\n data.setItemLayout(dataIndex, {\n initBaseline: median[vDimIdx],\n ends: ends\n });\n }\n function getPoint(axisDimVal, dim, dataIndex) {\n var val = data.get(dim, dataIndex);\n var p = [];\n p[cDimIdx] = axisDimVal;\n p[vDimIdx] = val;\n var point;\n if (isNaN(axisDimVal) || isNaN(val)) {\n point = [NaN, NaN];\n } else {\n point = coordSys.dataToPoint(p);\n point[cDimIdx] += offset;\n }\n return point;\n }\n function addBodyEnd(ends, point, start) {\n var point1 = point.slice();\n var point2 = point.slice();\n point1[cDimIdx] += halfWidth;\n point2[cDimIdx] -= halfWidth;\n start ? ends.push(point1, point2) : ends.push(point2, point1);\n }\n function layEndLine(ends, endCenter) {\n var from = endCenter.slice();\n var to = endCenter.slice();\n from[cDimIdx] -= halfWidth;\n to[cDimIdx] += halfWidth;\n ends.push(from, to);\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { quantile, asc } from '../../util/number.js';\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\n/**\n * See:\n * \n * \n *\n * Helper method for preparing data.\n *\n * @param rawData like\n * [\n * [12,232,443], (raw data set for the first box)\n * [3843,5545,1232], (raw data set for the second box)\n * ...\n * ]\n * @param opt.boundIQR=1.5 Data less than min bound is outlier.\n * default 1.5, means Q1 - 1.5 * (Q3 - Q1).\n * If 'none'/0 passed, min bound will not be used.\n */\nexport default function prepareBoxplotData(rawData, opt) {\n opt = opt || {};\n var boxData = [];\n var outliers = [];\n var boundIQR = opt.boundIQR;\n var useExtreme = boundIQR === 'none' || boundIQR === 0;\n for (var i = 0; i < rawData.length; i++) {\n var ascList = asc(rawData[i].slice());\n var Q1 = quantile(ascList, 0.25);\n var Q2 = quantile(ascList, 0.5);\n var Q3 = quantile(ascList, 0.75);\n var min = ascList[0];\n var max = ascList[ascList.length - 1];\n var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);\n var low = useExtreme ? min : Math.max(min, Q1 - bound);\n var high = useExtreme ? max : Math.min(max, Q3 + bound);\n var itemNameFormatter = opt.itemNameFormatter;\n var itemName = isFunction(itemNameFormatter) ? itemNameFormatter({\n value: i\n }) : isString(itemNameFormatter) ? itemNameFormatter.replace('{value}', i + '') : i + '';\n boxData.push([itemName, low, Q1, Q2, Q3, high]);\n for (var j = 0; j < ascList.length; j++) {\n var dataItem = ascList[j];\n if (dataItem < low || dataItem > high) {\n var outlier = [itemName, dataItem];\n outliers.push(outlier);\n }\n }\n }\n return {\n boxData: boxData,\n outliers: outliers\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport prepareBoxplotData from './prepareBoxplotData.js';\nimport { throwError, makePrintable } from '../../util/log.js';\nimport { SOURCE_FORMAT_ARRAY_ROWS } from '../../util/types.js';\nexport var boxplotTransform = {\n type: 'echarts:boxplot',\n transform: function transform(params) {\n var upstream = params.upstream;\n if (upstream.sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('source data is not applicable for this boxplot transform. Expect number[][].');\n }\n throwError(errMsg);\n }\n var result = prepareBoxplotData(upstream.getRawData(), params.config);\n return [{\n dimensions: ['ItemName', 'Low', 'Q1', 'Q2', 'Q3', 'High'],\n data: result.boxData\n }, {\n data: result.outliers\n }];\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport BoxplotSeriesModel from './BoxplotSeries.js';\nimport BoxplotView from './BoxplotView.js';\nimport boxplotLayout from './boxplotLayout.js';\nimport { boxplotTransform } from './boxplotTransform.js';\nexport function install(registers) {\n registers.registerSeriesModel(BoxplotSeriesModel);\n registers.registerChartView(BoxplotView);\n registers.registerLayout(boxplotLayout);\n registers.registerTransform(boxplotTransform);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ChartView from '../../view/Chart.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel } from '../../util/states.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar SKIP_PROPS = ['color', 'borderColor'];\nvar CandlestickView = /** @class */function (_super) {\n __extends(CandlestickView, _super);\n function CandlestickView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CandlestickView.type;\n return _this;\n }\n CandlestickView.prototype.render = function (seriesModel, ecModel, api) {\n // If there is clipPath created in large mode. Remove it.\n this.group.removeClipPath();\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n this._updateDrawMode(seriesModel);\n this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel);\n };\n CandlestickView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n this._clear();\n this._updateDrawMode(seriesModel);\n };\n CandlestickView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) {\n this._progressiveEls = [];\n this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel);\n };\n CandlestickView.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n CandlestickView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n this._clear();\n }\n };\n CandlestickView.prototype._renderNormal = function (seriesModel) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var isSimpleBox = data.getLayout('isSimpleBox');\n var needsClip = seriesModel.get('clip', true);\n var coord = seriesModel.coordinateSystem;\n var clipArea = coord.getArea && coord.getArea();\n // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!this._data) {\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var itemLayout = data.getItemLayout(newIdx);\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n return;\n }\n var el = createNormalBox(itemLayout, newIdx, true);\n graphic.initProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }\n }).update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n // Empty data\n if (!data.hasValue(newIdx)) {\n group.remove(el);\n return;\n }\n var itemLayout = data.getItemLayout(newIdx);\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n group.remove(el);\n return;\n }\n if (!el) {\n el = createNormalBox(itemLayout, newIdx);\n } else {\n graphic.updateProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n saveOldStyle(el);\n }\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n };\n CandlestickView.prototype._renderLarge = function (seriesModel) {\n this._clear();\n createLarge(seriesModel, this.group);\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n };\n CandlestickView.prototype._incrementalRenderNormal = function (params, seriesModel) {\n var data = seriesModel.getData();\n var isSimpleBox = data.getLayout('isSimpleBox');\n var dataIndex;\n while ((dataIndex = params.next()) != null) {\n var itemLayout = data.getItemLayout(dataIndex);\n var el = createNormalBox(itemLayout, dataIndex);\n setBoxCommon(el, data, dataIndex, isSimpleBox);\n el.incremental = true;\n this.group.add(el);\n this._progressiveEls.push(el);\n }\n };\n CandlestickView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n createLarge(seriesModel, this.group, this._progressiveEls, true);\n };\n CandlestickView.prototype.remove = function (ecModel) {\n this._clear();\n };\n CandlestickView.prototype._clear = function () {\n this.group.removeAll();\n this._data = null;\n };\n CandlestickView.type = 'candlestick';\n return CandlestickView;\n}(ChartView);\nvar NormalBoxPathShape = /** @class */function () {\n function NormalBoxPathShape() {}\n return NormalBoxPathShape;\n}();\nvar NormalBoxPath = /** @class */function (_super) {\n __extends(NormalBoxPath, _super);\n function NormalBoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'normalCandlestickBox';\n return _this;\n }\n NormalBoxPath.prototype.getDefaultShape = function () {\n return new NormalBoxPathShape();\n };\n NormalBoxPath.prototype.buildPath = function (ctx, shape) {\n var ends = shape.points;\n if (this.__simpleBox) {\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[6][0], ends[6][1]);\n } else {\n ctx.moveTo(ends[0][0], ends[0][1]);\n ctx.lineTo(ends[1][0], ends[1][1]);\n ctx.lineTo(ends[2][0], ends[2][1]);\n ctx.lineTo(ends[3][0], ends[3][1]);\n ctx.closePath();\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[5][0], ends[5][1]);\n ctx.moveTo(ends[6][0], ends[6][1]);\n ctx.lineTo(ends[7][0], ends[7][1]);\n }\n };\n return NormalBoxPath;\n}(Path);\nfunction createNormalBox(itemLayout, dataIndex, isInit) {\n var ends = itemLayout.ends;\n return new NormalBoxPath({\n shape: {\n points: isInit ? transInit(ends, itemLayout) : ends\n },\n z2: 100\n });\n}\nfunction isNormalBoxClipped(clipArea, itemLayout) {\n var clipped = true;\n for (var i = 0; i < itemLayout.ends.length; i++) {\n // If any point are in the region.\n if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) {\n clipped = false;\n break;\n }\n }\n return clipped;\n}\nfunction setBoxCommon(el, data, dataIndex, isSimpleBox) {\n var itemModel = data.getItemModel(dataIndex);\n el.useStyle(data.getItemVisual(dataIndex, 'style'));\n el.style.strokeNoScale = true;\n el.__simpleBox = isSimpleBox;\n setStatesStylesFromModel(el, itemModel);\n}\nfunction transInit(points, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[1] = itemLayout.initBaseline;\n return point;\n });\n}\nvar LargeBoxPathShape = /** @class */function () {\n function LargeBoxPathShape() {}\n return LargeBoxPathShape;\n}();\nvar LargeBoxPath = /** @class */function (_super) {\n __extends(LargeBoxPath, _super);\n function LargeBoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'largeCandlestickBox';\n return _this;\n }\n LargeBoxPath.prototype.getDefaultShape = function () {\n return new LargeBoxPathShape();\n };\n LargeBoxPath.prototype.buildPath = function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n for (var i = 0; i < points.length;) {\n if (this.__sign === points[i++]) {\n var x = points[i++];\n ctx.moveTo(x, points[i++]);\n ctx.lineTo(x, points[i++]);\n } else {\n i += 3;\n }\n }\n };\n return LargeBoxPath;\n}(Path);\nfunction createLarge(seriesModel, group, progressiveEls, incremental) {\n var data = seriesModel.getData();\n var largePoints = data.getLayout('largePoints');\n var elP = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 1,\n ignoreCoarsePointer: true\n });\n group.add(elP);\n var elN = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: -1,\n ignoreCoarsePointer: true\n });\n group.add(elN);\n var elDoji = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 0,\n ignoreCoarsePointer: true\n });\n group.add(elDoji);\n setLargeStyle(1, elP, seriesModel, data);\n setLargeStyle(-1, elN, seriesModel, data);\n setLargeStyle(0, elDoji, seriesModel, data);\n if (incremental) {\n elP.incremental = true;\n elN.incremental = true;\n }\n if (progressiveEls) {\n progressiveEls.push(elP, elN);\n }\n}\nfunction setLargeStyle(sign, el, seriesModel, data) {\n // TODO put in visual?\n var borderColor = seriesModel.get(['itemStyle', sign > 0 ? 'borderColor' : 'borderColor0'])\n // Use color for border color by default.\n || seriesModel.get(['itemStyle', sign > 0 ? 'color' : 'color0']);\n if (sign === 0) {\n borderColor = seriesModel.get(['itemStyle', 'borderColorDoji']);\n }\n // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(SKIP_PROPS);\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor;\n}\nexport default CandlestickView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport { WhiskerBoxCommonMixin } from '../helper/whiskerBoxCommon.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nvar CandlestickSeriesModel = /** @class */function (_super) {\n __extends(CandlestickSeriesModel, _super);\n function CandlestickSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CandlestickSeriesModel.type;\n _this.defaultValueDimensions = [{\n name: 'open',\n defaultTooltip: true\n }, {\n name: 'close',\n defaultTooltip: true\n }, {\n name: 'lowest',\n defaultTooltip: true\n }, {\n name: 'highest',\n defaultTooltip: true\n }];\n return _this;\n }\n /**\n * Get dimension for shadow in dataZoom\n * @return dimension name\n */\n CandlestickSeriesModel.prototype.getShadowDim = function () {\n return 'open';\n };\n CandlestickSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n var itemLayout = data.getItemLayout(dataIndex);\n return itemLayout && selectors.rect(itemLayout.brushRect);\n };\n CandlestickSeriesModel.type = 'series.candlestick';\n CandlestickSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid'];\n CandlestickSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n layout: null,\n clip: true,\n itemStyle: {\n color: '#eb5454',\n color0: '#47b262',\n borderColor: '#eb5454',\n borderColor0: '#47b262',\n borderColorDoji: null,\n // borderColor: '#d24040',\n // borderColor0: '#398f4f',\n borderWidth: 1\n },\n emphasis: {\n scale: true,\n itemStyle: {\n borderWidth: 2\n }\n },\n barMaxWidth: null,\n barMinWidth: null,\n barWidth: null,\n large: true,\n largeThreshold: 600,\n progressive: 3e3,\n progressiveThreshold: 1e4,\n progressiveChunkMode: 'mod',\n animationEasing: 'linear',\n animationDuration: 300\n };\n return CandlestickSeriesModel;\n}(SeriesModel);\nmixin(CandlestickSeriesModel, WhiskerBoxCommonMixin, true);\nexport default CandlestickSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function candlestickPreprocessor(option) {\n if (!option || !zrUtil.isArray(option.series)) {\n return;\n }\n // Translate 'k' to 'candlestick'.\n zrUtil.each(option.series, function (seriesItem) {\n if (zrUtil.isObject(seriesItem) && seriesItem.type === 'k') {\n seriesItem.type = 'candlestick';\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport createRenderPlanner from '../helper/createRenderPlanner.js';\nimport { extend } from 'zrender/lib/core/util.js';\nvar positiveBorderColorQuery = ['itemStyle', 'borderColor'];\nvar negativeBorderColorQuery = ['itemStyle', 'borderColor0'];\nvar dojiBorderColorQuery = ['itemStyle', 'borderColorDoji'];\nvar positiveColorQuery = ['itemStyle', 'color'];\nvar negativeColorQuery = ['itemStyle', 'color0'];\nvar candlestickVisual = {\n seriesType: 'candlestick',\n plan: createRenderPlanner(),\n // For legend.\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n function getColor(sign, model) {\n return model.get(sign > 0 ? positiveColorQuery : negativeColorQuery);\n }\n function getBorderColor(sign, model) {\n return model.get(sign === 0 ? dojiBorderColorQuery : sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery);\n }\n // Only visible series has each data be visual encoded\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n var isLargeRender = seriesModel.pipelineContext.large;\n return !isLargeRender && {\n progress: function (params, data) {\n var dataIndex;\n while ((dataIndex = params.next()) != null) {\n var itemModel = data.getItemModel(dataIndex);\n var sign = data.getItemLayout(dataIndex).sign;\n var style = itemModel.getItemStyle();\n style.fill = getColor(sign, itemModel);\n style.stroke = getBorderColor(sign, itemModel) || style.fill;\n var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style');\n extend(existsStyle, style);\n }\n }\n };\n }\n};\nexport default candlestickVisual;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { subPixelOptimize } from '../../util/graphic.js';\nimport createRenderPlanner from '../helper/createRenderPlanner.js';\nimport { parsePercent } from '../../util/number.js';\nimport { map, retrieve2 } from 'zrender/lib/core/util.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nvar candlestickLayout = {\n seriesType: 'candlestick',\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n var candleWidth = calculateCandleWidth(seriesModel, data);\n var cDimIdx = 0;\n var vDimIdx = 1;\n var coordDims = ['x', 'y'];\n var cDimI = data.getDimensionIndex(data.mapDimension(coordDims[cDimIdx]));\n var vDimsI = map(data.mapDimensionsAll(coordDims[vDimIdx]), data.getDimensionIndex, data);\n var openDimI = vDimsI[0];\n var closeDimI = vDimsI[1];\n var lowestDimI = vDimsI[2];\n var highestDimI = vDimsI[3];\n data.setLayout({\n candleWidth: candleWidth,\n // The value is experimented visually.\n isSimpleBox: candleWidth <= 1.3\n });\n if (cDimI < 0 || vDimsI.length < 4) {\n return;\n }\n return {\n progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress\n };\n function normalProgress(params, data) {\n var dataIndex;\n var store = data.getStore();\n while ((dataIndex = params.next()) != null) {\n var axisDimVal = store.get(cDimI, dataIndex);\n var openVal = store.get(openDimI, dataIndex);\n var closeVal = store.get(closeDimI, dataIndex);\n var lowestVal = store.get(lowestDimI, dataIndex);\n var highestVal = store.get(highestDimI, dataIndex);\n var ocLow = Math.min(openVal, closeVal);\n var ocHigh = Math.max(openVal, closeVal);\n var ocLowPoint = getPoint(ocLow, axisDimVal);\n var ocHighPoint = getPoint(ocHigh, axisDimVal);\n var lowestPoint = getPoint(lowestVal, axisDimVal);\n var highestPoint = getPoint(highestVal, axisDimVal);\n var ends = [];\n addBodyEnd(ends, ocHighPoint, 0);\n addBodyEnd(ends, ocLowPoint, 1);\n ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint));\n var itemModel = data.getItemModel(dataIndex);\n var hasDojiColor = !!itemModel.get(['itemStyle', 'borderColorDoji']);\n data.setItemLayout(dataIndex, {\n sign: getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor),\n initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx],\n ends: ends,\n brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal)\n });\n }\n function getPoint(val, axisDimVal) {\n var p = [];\n p[cDimIdx] = axisDimVal;\n p[vDimIdx] = val;\n return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p);\n }\n function addBodyEnd(ends, point, start) {\n var point1 = point.slice();\n var point2 = point.slice();\n point1[cDimIdx] = subPixelOptimize(point1[cDimIdx] + candleWidth / 2, 1, false);\n point2[cDimIdx] = subPixelOptimize(point2[cDimIdx] - candleWidth / 2, 1, true);\n start ? ends.push(point1, point2) : ends.push(point2, point1);\n }\n function makeBrushRect(lowestVal, highestVal, axisDimVal) {\n var pmin = getPoint(lowestVal, axisDimVal);\n var pmax = getPoint(highestVal, axisDimVal);\n pmin[cDimIdx] -= candleWidth / 2;\n pmax[cDimIdx] -= candleWidth / 2;\n return {\n x: pmin[0],\n y: pmin[1],\n width: vDimIdx ? candleWidth : pmax[0] - pmin[0],\n height: vDimIdx ? pmax[1] - pmin[1] : candleWidth\n };\n }\n function subPixelOptimizePoint(point) {\n point[cDimIdx] = subPixelOptimize(point[cDimIdx], 1);\n return point;\n }\n }\n function largeProgress(params, data) {\n // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...]\n var points = createFloat32Array(params.count * 4);\n var offset = 0;\n var point;\n var tmpIn = [];\n var tmpOut = [];\n var dataIndex;\n var store = data.getStore();\n var hasDojiColor = !!seriesModel.get(['itemStyle', 'borderColorDoji']);\n while ((dataIndex = params.next()) != null) {\n var axisDimVal = store.get(cDimI, dataIndex);\n var openVal = store.get(openDimI, dataIndex);\n var closeVal = store.get(closeDimI, dataIndex);\n var lowestVal = store.get(lowestDimI, dataIndex);\n var highestVal = store.get(highestDimI, dataIndex);\n if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) {\n points[offset++] = NaN;\n offset += 3;\n continue;\n }\n points[offset++] = getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor);\n tmpIn[cDimIdx] = axisDimVal;\n tmpIn[vDimIdx] = lowestVal;\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n tmpIn[vDimIdx] = highestVal;\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n points[offset++] = point ? point[1] : NaN;\n }\n data.setLayout('largePoints', points);\n }\n }\n};\n/**\n * Get the sign of a single data.\n *\n * @returns 0 for doji with hasDojiColor: true,\n * 1 for positive,\n * -1 for negative.\n */\nfunction getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor) {\n var sign;\n if (openVal > closeVal) {\n sign = -1;\n } else if (openVal < closeVal) {\n sign = 1;\n } else {\n sign = hasDojiColor\n // When doji color is set, use it instead of color/color0.\n ? 0 : dataIndex > 0\n // If close === open, compare with close of last record\n ? store.get(closeDimI, dataIndex - 1) <= closeVal ? 1 : -1\n // No record of previous, set to be positive\n : 1;\n }\n return sign;\n}\nfunction calculateCandleWidth(seriesModel, data) {\n var baseAxis = seriesModel.getBaseAxis();\n var extent;\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : (extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / data.count());\n var barMaxWidth = parsePercent(retrieve2(seriesModel.get('barMaxWidth'), bandWidth), bandWidth);\n var barMinWidth = parsePercent(retrieve2(seriesModel.get('barMinWidth'), 1), bandWidth);\n var barWidth = seriesModel.get('barWidth');\n return barWidth != null ? parsePercent(barWidth, bandWidth)\n // Put max outer to ensure bar visible in spite of overlap.\n : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth);\n}\nexport default candlestickLayout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CandlestickView from './CandlestickView.js';\nimport CandlestickSeriesModel from './CandlestickSeries.js';\nimport preprocessor from './preprocessor.js';\nimport candlestickVisual from './candlestickVisual.js';\nimport candlestickLayout from './candlestickLayout.js';\nexport function install(registers) {\n registers.registerChartView(CandlestickView);\n registers.registerSeriesModel(CandlestickSeriesModel);\n registers.registerPreprocessor(preprocessor);\n registers.registerVisual(candlestickVisual);\n registers.registerLayout(candlestickLayout);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport { Group } from '../../util/graphic.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis } from '../../util/states.js';\nimport SymbolClz from './Symbol.js';\nfunction updateRipplePath(rippleGroup, effectCfg) {\n var color = effectCfg.rippleEffectColor || effectCfg.color;\n rippleGroup.eachChild(function (ripplePath) {\n ripplePath.attr({\n z: effectCfg.z,\n zlevel: effectCfg.zlevel,\n style: {\n stroke: effectCfg.brushType === 'stroke' ? color : null,\n fill: effectCfg.brushType === 'fill' ? color : null\n }\n });\n });\n}\nvar EffectSymbol = /** @class */function (_super) {\n __extends(EffectSymbol, _super);\n function EffectSymbol(data, idx) {\n var _this = _super.call(this) || this;\n var symbol = new SymbolClz(data, idx);\n var rippleGroup = new Group();\n _this.add(symbol);\n _this.add(rippleGroup);\n _this.updateData(data, idx);\n return _this;\n }\n EffectSymbol.prototype.stopEffectAnimation = function () {\n this.childAt(1).removeAll();\n };\n EffectSymbol.prototype.startEffectAnimation = function (effectCfg) {\n var symbolType = effectCfg.symbolType;\n var color = effectCfg.color;\n var rippleNumber = effectCfg.rippleNumber;\n var rippleGroup = this.childAt(1);\n for (var i = 0; i < rippleNumber; i++) {\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4136.\n var ripplePath = createSymbol(symbolType, -1, -1, 2, 2, color);\n ripplePath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 99,\n silent: true,\n scaleX: 0.5,\n scaleY: 0.5\n });\n var delay = -i / rippleNumber * effectCfg.period + effectCfg.effectOffset;\n ripplePath.animate('', true).when(effectCfg.period, {\n scaleX: effectCfg.rippleScale / 2,\n scaleY: effectCfg.rippleScale / 2\n }).delay(delay).start();\n ripplePath.animateStyle(true).when(effectCfg.period, {\n opacity: 0\n }).delay(delay).start();\n rippleGroup.add(ripplePath);\n }\n updateRipplePath(rippleGroup, effectCfg);\n };\n /**\n * Update effect symbol\n */\n EffectSymbol.prototype.updateEffectAnimation = function (effectCfg) {\n var oldEffectCfg = this._effectCfg;\n var rippleGroup = this.childAt(1);\n // Must reinitialize effect if following configuration changed\n var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale', 'rippleNumber'];\n for (var i = 0; i < DIFFICULT_PROPS.length; i++) {\n var propName = DIFFICULT_PROPS[i];\n if (oldEffectCfg[propName] !== effectCfg[propName]) {\n this.stopEffectAnimation();\n this.startEffectAnimation(effectCfg);\n return;\n }\n }\n updateRipplePath(rippleGroup, effectCfg);\n };\n /**\n * Highlight symbol\n */\n EffectSymbol.prototype.highlight = function () {\n enterEmphasis(this);\n };\n /**\n * Downplay symbol\n */\n EffectSymbol.prototype.downplay = function () {\n leaveEmphasis(this);\n };\n EffectSymbol.prototype.getSymbolType = function () {\n var symbol = this.childAt(0);\n return symbol && symbol.getSymbolType();\n };\n /**\n * Update symbol properties\n */\n EffectSymbol.prototype.updateData = function (data, idx) {\n var _this = this;\n var seriesModel = data.hostModel;\n this.childAt(0).updateData(data, idx);\n var rippleGroup = this.childAt(1);\n var itemModel = data.getItemModel(idx);\n var symbolType = data.getItemVisual(idx, 'symbol');\n var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var symbolStyle = data.getItemVisual(idx, 'style');\n var color = symbolStyle && symbolStyle.fill;\n var emphasisModel = itemModel.getModel('emphasis');\n rippleGroup.setScale(symbolSize);\n rippleGroup.traverse(function (ripplePath) {\n ripplePath.setStyle('fill', color);\n });\n var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize);\n if (symbolOffset) {\n rippleGroup.x = symbolOffset[0];\n rippleGroup.y = symbolOffset[1];\n }\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n var effectCfg = {};\n effectCfg.showEffectOn = seriesModel.get('showEffectOn');\n effectCfg.rippleScale = itemModel.get(['rippleEffect', 'scale']);\n effectCfg.brushType = itemModel.get(['rippleEffect', 'brushType']);\n effectCfg.period = itemModel.get(['rippleEffect', 'period']) * 1000;\n effectCfg.effectOffset = idx / data.count();\n effectCfg.z = seriesModel.getShallow('z') || 0;\n effectCfg.zlevel = seriesModel.getShallow('zlevel') || 0;\n effectCfg.symbolType = symbolType;\n effectCfg.color = color;\n effectCfg.rippleEffectColor = itemModel.get(['rippleEffect', 'color']);\n effectCfg.rippleNumber = itemModel.get(['rippleEffect', 'number']);\n if (effectCfg.showEffectOn === 'render') {\n this._effectCfg ? this.updateEffectAnimation(effectCfg) : this.startEffectAnimation(effectCfg);\n this._effectCfg = effectCfg;\n } else {\n // Not keep old effect config\n this._effectCfg = null;\n this.stopEffectAnimation();\n this.onHoverStateChange = function (toState) {\n if (toState === 'emphasis') {\n if (effectCfg.showEffectOn !== 'render') {\n _this.startEffectAnimation(effectCfg);\n }\n } else if (toState === 'normal') {\n if (effectCfg.showEffectOn !== 'render') {\n _this.stopEffectAnimation();\n }\n }\n };\n }\n this._effectCfg = effectCfg;\n toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n };\n ;\n EffectSymbol.prototype.fadeOut = function (cb) {\n cb && cb();\n };\n ;\n return EffectSymbol;\n}(Group);\nexport default EffectSymbol;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport EffectSymbol from '../helper/EffectSymbol.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport pointsLayout from '../../layout/points.js';\nimport ChartView from '../../view/Chart.js';\nvar EffectScatterView = /** @class */function (_super) {\n __extends(EffectScatterView, _super);\n function EffectScatterView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = EffectScatterView.type;\n return _this;\n }\n EffectScatterView.prototype.init = function () {\n this._symbolDraw = new SymbolDraw(EffectSymbol);\n };\n EffectScatterView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var effectSymbolDraw = this._symbolDraw;\n effectSymbolDraw.updateData(data, {\n clipShape: this._getClipShape(seriesModel)\n });\n this.group.add(effectSymbolDraw.group);\n };\n EffectScatterView.prototype._getClipShape = function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var clipArea = coordSys && coordSys.getArea && coordSys.getArea();\n return seriesModel.get('clip', true) ? clipArea : null;\n };\n EffectScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n this.group.dirty();\n var res = pointsLayout('').reset(seriesModel, ecModel, api);\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count(),\n count: data.count()\n }, data);\n }\n this._symbolDraw.updateLayout();\n };\n EffectScatterView.prototype._updateGroupTransform = function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.getRoamTransform) {\n this.group.transform = matrix.clone(coordSys.getRoamTransform());\n this.group.decomposeTransform();\n }\n };\n EffectScatterView.prototype.remove = function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(true);\n };\n EffectScatterView.type = 'effectScatter';\n return EffectScatterView;\n}(ChartView);\nexport default EffectScatterView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nvar EffectScatterSeriesModel = /** @class */function (_super) {\n __extends(EffectScatterSeriesModel, _super);\n function EffectScatterSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = EffectScatterSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n EffectScatterSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n EffectScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.point(data.getItemLayout(dataIndex));\n };\n EffectScatterSeriesModel.type = 'series.effectScatter';\n EffectScatterSeriesModel.dependencies = ['grid', 'polar'];\n EffectScatterSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n effectType: 'ripple',\n progressive: 0,\n // When to show the effect, option: 'render'|'emphasis'\n showEffectOn: 'render',\n clip: true,\n // Ripple effect config\n rippleEffect: {\n period: 4,\n // Scale of ripple\n scale: 2.5,\n // Brush type can be fill or stroke\n brushType: 'fill',\n // Ripple number\n number: 3\n },\n universalTransition: {\n divideShape: 'clone'\n },\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Polar coordinate system\n // polarIndex: 0,\n // Geo coordinate system\n // geoIndex: 0,\n // symbol: null, // 图形类型\n symbolSize: 10 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2\n // symbolRotate: null, // 图形旋转控制\n // itemStyle: {\n // opacity: 1\n // }\n };\n\n return EffectScatterSeriesModel;\n}(SeriesModel);\nexport default EffectScatterSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport EffectScatterView from './EffectScatterView.js';\nimport EffectScatterSeriesModel from './EffectScatterSeries.js';\nimport layoutPoints from '../../layout/points.js';\nexport function install(registers) {\n registers.registerChartView(EffectScatterView);\n registers.registerSeriesModel(EffectScatterSeriesModel);\n registers.registerLayout(layoutPoints('effectScatter'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Provide effect for line\n */\nimport * as graphic from '../../util/graphic.js';\nimport Line from './Line.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport * as curveUtil from 'zrender/lib/core/curve.js';\nvar EffectLine = /** @class */function (_super) {\n __extends(EffectLine, _super);\n function EffectLine(lineData, idx, seriesScope) {\n var _this = _super.call(this) || this;\n _this.add(_this.createLine(lineData, idx, seriesScope));\n _this._updateEffectSymbol(lineData, idx);\n return _this;\n }\n EffectLine.prototype.createLine = function (lineData, idx, seriesScope) {\n return new Line(lineData, idx, seriesScope);\n };\n EffectLine.prototype._updateEffectSymbol = function (lineData, idx) {\n var itemModel = lineData.getItemModel(idx);\n var effectModel = itemModel.getModel('effect');\n var size = effectModel.get('symbolSize');\n var symbolType = effectModel.get('symbol');\n if (!zrUtil.isArray(size)) {\n size = [size, size];\n }\n var lineStyle = lineData.getItemVisual(idx, 'style');\n var color = effectModel.get('color') || lineStyle && lineStyle.stroke;\n var symbol = this.childAt(1);\n if (this._symbolType !== symbolType) {\n // Remove previous\n this.remove(symbol);\n symbol = createSymbol(symbolType, -0.5, -0.5, 1, 1, color);\n symbol.z2 = 100;\n symbol.culling = true;\n this.add(symbol);\n }\n // Symbol may be removed if loop is false\n if (!symbol) {\n return;\n }\n // Shadow color is same with color in default\n symbol.setStyle('shadowColor', color);\n symbol.setStyle(effectModel.getItemStyle(['color']));\n symbol.scaleX = size[0];\n symbol.scaleY = size[1];\n symbol.setColor(color);\n this._symbolType = symbolType;\n this._symbolScale = size;\n this._updateEffectAnimation(lineData, effectModel, idx);\n };\n EffectLine.prototype._updateEffectAnimation = function (lineData, effectModel, idx) {\n var symbol = this.childAt(1);\n if (!symbol) {\n return;\n }\n var points = lineData.getItemLayout(idx);\n var period = effectModel.get('period') * 1000;\n var loop = effectModel.get('loop');\n var roundTrip = effectModel.get('roundTrip');\n var constantSpeed = effectModel.get('constantSpeed');\n var delayExpr = zrUtil.retrieve(effectModel.get('delay'), function (idx) {\n return idx / lineData.count() * period / 3;\n });\n // Ignore when updating\n symbol.ignore = true;\n this._updateAnimationPoints(symbol, points);\n if (constantSpeed > 0) {\n period = this._getLineLength(symbol) / constantSpeed * 1000;\n }\n if (period !== this._period || loop !== this._loop || roundTrip !== this._roundTrip) {\n symbol.stopAnimation();\n var delayNum = void 0;\n if (zrUtil.isFunction(delayExpr)) {\n delayNum = delayExpr(idx);\n } else {\n delayNum = delayExpr;\n }\n if (symbol.__t > 0) {\n delayNum = -period * symbol.__t;\n }\n this._animateSymbol(symbol, period, delayNum, loop, roundTrip);\n }\n this._period = period;\n this._loop = loop;\n this._roundTrip = roundTrip;\n };\n EffectLine.prototype._animateSymbol = function (symbol, period, delayNum, loop, roundTrip) {\n if (period > 0) {\n symbol.__t = 0;\n var self_1 = this;\n var animator = symbol.animate('', loop).when(roundTrip ? period * 2 : period, {\n __t: roundTrip ? 2 : 1\n }).delay(delayNum).during(function () {\n self_1._updateSymbolPosition(symbol);\n });\n if (!loop) {\n animator.done(function () {\n self_1.remove(symbol);\n });\n }\n animator.start();\n }\n };\n EffectLine.prototype._getLineLength = function (symbol) {\n // Not so accurate\n return vec2.dist(symbol.__p1, symbol.__cp1) + vec2.dist(symbol.__cp1, symbol.__p2);\n };\n EffectLine.prototype._updateAnimationPoints = function (symbol, points) {\n symbol.__p1 = points[0];\n symbol.__p2 = points[1];\n symbol.__cp1 = points[2] || [(points[0][0] + points[1][0]) / 2, (points[0][1] + points[1][1]) / 2];\n };\n EffectLine.prototype.updateData = function (lineData, idx, seriesScope) {\n this.childAt(0).updateData(lineData, idx, seriesScope);\n this._updateEffectSymbol(lineData, idx);\n };\n EffectLine.prototype._updateSymbolPosition = function (symbol) {\n var p1 = symbol.__p1;\n var p2 = symbol.__p2;\n var cp1 = symbol.__cp1;\n var t = symbol.__t < 1 ? symbol.__t : 2 - symbol.__t;\n var pos = [symbol.x, symbol.y];\n var lastPos = pos.slice();\n var quadraticAt = curveUtil.quadraticAt;\n var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt;\n pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t);\n pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t);\n // Tangent\n var tx = symbol.__t < 1 ? quadraticDerivativeAt(p1[0], cp1[0], p2[0], t) : quadraticDerivativeAt(p2[0], cp1[0], p1[0], 1 - t);\n var ty = symbol.__t < 1 ? quadraticDerivativeAt(p1[1], cp1[1], p2[1], t) : quadraticDerivativeAt(p2[1], cp1[1], p1[1], 1 - t);\n symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2;\n // enable continuity trail for 'line', 'rect', 'roundRect' symbolType\n if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') {\n if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) {\n symbol.scaleY = vec2.dist(lastPos, pos) * 1.05;\n // make sure the last segment render within endPoint\n if (t === 1) {\n pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2;\n pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2;\n }\n } else if (symbol.__lastT === 1) {\n // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly.\n symbol.scaleY = 2 * vec2.dist(p1, pos);\n } else {\n symbol.scaleY = this._symbolScale[1];\n }\n }\n symbol.__lastT = symbol.__t;\n symbol.ignore = false;\n symbol.x = pos[0];\n symbol.y = pos[1];\n };\n EffectLine.prototype.updateLayout = function (lineData, idx) {\n this.childAt(0).updateLayout(lineData, idx);\n var effectModel = lineData.getItemModel(idx).getModel('effect');\n this._updateEffectAnimation(lineData, effectModel, idx);\n };\n return EffectLine;\n}(graphic.Group);\nexport default EffectLine;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis } from '../../util/states.js';\nvar Polyline = /** @class */function (_super) {\n __extends(Polyline, _super);\n function Polyline(lineData, idx, seriesScope) {\n var _this = _super.call(this) || this;\n _this._createPolyline(lineData, idx, seriesScope);\n return _this;\n }\n Polyline.prototype._createPolyline = function (lineData, idx, seriesScope) {\n // let seriesModel = lineData.hostModel;\n var points = lineData.getItemLayout(idx);\n var line = new graphic.Polyline({\n shape: {\n points: points\n }\n });\n this.add(line);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n ;\n Polyline.prototype.updateData = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childAt(0);\n var target = {\n shape: {\n points: lineData.getItemLayout(idx)\n }\n };\n graphic.updateProps(line, target, seriesModel, idx);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n ;\n Polyline.prototype._updateCommonStl = function (lineData, idx, seriesScope) {\n var line = this.childAt(0);\n var itemModel = lineData.getItemModel(idx);\n var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle;\n var focus = seriesScope && seriesScope.focus;\n var blurScope = seriesScope && seriesScope.blurScope;\n var emphasisDisabled = seriesScope && seriesScope.emphasisDisabled;\n if (!seriesScope || lineData.hasItemOption) {\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle();\n emphasisDisabled = emphasisModel.get('disabled');\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n }\n line.useStyle(lineData.getItemVisual(idx, 'style'));\n line.style.fill = null;\n line.style.strokeNoScale = true;\n var lineEmphasisState = line.ensureState('emphasis');\n lineEmphasisState.style = emphasisLineStyle;\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n ;\n Polyline.prototype.updateLayout = function (lineData, idx) {\n var polyline = this.childAt(0);\n polyline.setShape('points', lineData.getItemLayout(idx));\n };\n ;\n return Polyline;\n}(graphic.Group);\nexport default Polyline;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Polyline from './Polyline.js';\nimport EffectLine from './EffectLine.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nvar EffectPolyline = /** @class */function (_super) {\n __extends(EffectPolyline, _super);\n function EffectPolyline() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._lastFrame = 0;\n _this._lastFramePercent = 0;\n return _this;\n }\n // Override\n EffectPolyline.prototype.createLine = function (lineData, idx, seriesScope) {\n return new Polyline(lineData, idx, seriesScope);\n };\n ;\n // Override\n EffectPolyline.prototype._updateAnimationPoints = function (symbol, points) {\n this._points = points;\n var accLenArr = [0];\n var len = 0;\n for (var i = 1; i < points.length; i++) {\n var p1 = points[i - 1];\n var p2 = points[i];\n len += vec2.dist(p1, p2);\n accLenArr.push(len);\n }\n if (len === 0) {\n this._length = 0;\n return;\n }\n for (var i = 0; i < accLenArr.length; i++) {\n accLenArr[i] /= len;\n }\n this._offsets = accLenArr;\n this._length = len;\n };\n ;\n // Override\n EffectPolyline.prototype._getLineLength = function () {\n return this._length;\n };\n ;\n // Override\n EffectPolyline.prototype._updateSymbolPosition = function (symbol) {\n var t = symbol.__t < 1 ? symbol.__t : 2 - symbol.__t;\n var points = this._points;\n var offsets = this._offsets;\n var len = points.length;\n if (!offsets) {\n // Has length 0\n return;\n }\n var lastFrame = this._lastFrame;\n var frame;\n if (t < this._lastFramePercent) {\n // Start from the next frame\n // PENDING start from lastFrame ?\n var start = Math.min(lastFrame + 1, len - 1);\n for (frame = start; frame >= 0; frame--) {\n if (offsets[frame] <= t) {\n break;\n }\n }\n // PENDING really need to do this ?\n frame = Math.min(frame, len - 2);\n } else {\n for (frame = lastFrame; frame < len; frame++) {\n if (offsets[frame] > t) {\n break;\n }\n }\n frame = Math.min(frame - 1, len - 2);\n }\n var p = (t - offsets[frame]) / (offsets[frame + 1] - offsets[frame]);\n var p0 = points[frame];\n var p1 = points[frame + 1];\n symbol.x = p0[0] * (1 - p) + p * p1[0];\n symbol.y = p0[1] * (1 - p) + p * p1[1];\n var tx = symbol.__t < 1 ? p1[0] - p0[0] : p0[0] - p1[0];\n var ty = symbol.__t < 1 ? p1[1] - p0[1] : p0[1] - p1[1];\n symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2;\n this._lastFrame = frame;\n this._lastFramePercent = t;\n symbol.ignore = false;\n };\n ;\n return EffectPolyline;\n}(EffectLine);\nexport default EffectPolyline;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// TODO Batch by color\nimport * as graphic from '../../util/graphic.js';\nimport * as lineContain from 'zrender/lib/contain/line.js';\nimport * as quadraticContain from 'zrender/lib/contain/quadratic.js';\nimport { getECData } from '../../util/innerStore.js';\nvar LargeLinesPathShape = /** @class */function () {\n function LargeLinesPathShape() {\n this.polyline = false;\n this.curveness = 0;\n this.segs = [];\n }\n return LargeLinesPathShape;\n}();\nvar LargeLinesPath = /** @class */function (_super) {\n __extends(LargeLinesPath, _super);\n function LargeLinesPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this._off = 0;\n _this.hoverDataIdx = -1;\n return _this;\n }\n LargeLinesPath.prototype.reset = function () {\n this.notClear = false;\n this._off = 0;\n };\n LargeLinesPath.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n LargeLinesPath.prototype.getDefaultShape = function () {\n return new LargeLinesPathShape();\n };\n LargeLinesPath.prototype.buildPath = function (ctx, shape) {\n var segs = shape.segs;\n var curveness = shape.curveness;\n var i;\n if (shape.polyline) {\n for (i = this._off; i < segs.length;) {\n var count = segs[i++];\n if (count > 0) {\n ctx.moveTo(segs[i++], segs[i++]);\n for (var k = 1; k < count; k++) {\n ctx.lineTo(segs[i++], segs[i++]);\n }\n }\n }\n } else {\n for (i = this._off; i < segs.length;) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n var x1 = segs[i++];\n var y1 = segs[i++];\n ctx.moveTo(x0, y0);\n if (curveness > 0) {\n var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness;\n var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness;\n ctx.quadraticCurveTo(x2, y2, x1, y1);\n } else {\n ctx.lineTo(x1, y1);\n }\n }\n }\n if (this.incremental) {\n this._off = i;\n this.notClear = true;\n }\n };\n LargeLinesPath.prototype.findDataIndex = function (x, y) {\n var shape = this.shape;\n var segs = shape.segs;\n var curveness = shape.curveness;\n var lineWidth = this.style.lineWidth;\n if (shape.polyline) {\n var dataIndex = 0;\n for (var i = 0; i < segs.length;) {\n var count = segs[i++];\n if (count > 0) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n for (var k = 1; k < count; k++) {\n var x1 = segs[i++];\n var y1 = segs[i++];\n if (lineContain.containStroke(x0, y0, x1, y1, lineWidth, x, y)) {\n return dataIndex;\n }\n }\n }\n dataIndex++;\n }\n } else {\n var dataIndex = 0;\n for (var i = 0; i < segs.length;) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n var x1 = segs[i++];\n var y1 = segs[i++];\n if (curveness > 0) {\n var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness;\n var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness;\n if (quadraticContain.containStroke(x0, y0, x2, y2, x1, y1, lineWidth, x, y)) {\n return dataIndex;\n }\n } else {\n if (lineContain.containStroke(x0, y0, x1, y1, lineWidth, x, y)) {\n return dataIndex;\n }\n }\n dataIndex++;\n }\n }\n return -1;\n };\n LargeLinesPath.prototype.contain = function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n x = localPos[0];\n y = localPos[1];\n if (rect.contain(x, y)) {\n // Cache found data index.\n var dataIdx = this.hoverDataIdx = this.findDataIndex(x, y);\n return dataIdx >= 0;\n }\n this.hoverDataIdx = -1;\n return false;\n };\n LargeLinesPath.prototype.getBoundingRect = function () {\n // Ignore stroke for large symbol draw.\n var rect = this._rect;\n if (!rect) {\n var shape = this.shape;\n var points = shape.segs;\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n rect = this._rect = new graphic.BoundingRect(minX, minY, maxX, maxY);\n }\n return rect;\n };\n return LargeLinesPath;\n}(graphic.Path);\nvar LargeLineDraw = /** @class */function () {\n function LargeLineDraw() {\n this.group = new graphic.Group();\n }\n /**\n * Update symbols draw by new data\n */\n LargeLineDraw.prototype.updateData = function (data) {\n this._clear();\n var lineEl = this._create();\n lineEl.setShape({\n segs: data.getLayout('linesPoints')\n });\n this._setCommon(lineEl, data);\n };\n ;\n /**\n * @override\n */\n LargeLineDraw.prototype.incrementalPrepareUpdate = function (data) {\n this.group.removeAll();\n this._clear();\n };\n ;\n /**\n * @override\n */\n LargeLineDraw.prototype.incrementalUpdate = function (taskParams, data) {\n var lastAdded = this._newAdded[0];\n var linePoints = data.getLayout('linesPoints');\n var oldSegs = lastAdded && lastAdded.shape.segs;\n // Merging the exists. Each element has 1e4 points.\n // Consider the performance balance between too much elements and too much points in one shape(may affect hover optimization)\n if (oldSegs && oldSegs.length < 2e4) {\n var oldLen = oldSegs.length;\n var newSegs = new Float32Array(oldLen + linePoints.length);\n // Concat two array\n newSegs.set(oldSegs);\n newSegs.set(linePoints, oldLen);\n lastAdded.setShape({\n segs: newSegs\n });\n } else {\n // Clear\n this._newAdded = [];\n var lineEl = this._create();\n lineEl.incremental = true;\n lineEl.setShape({\n segs: linePoints\n });\n this._setCommon(lineEl, data);\n lineEl.__startIndex = taskParams.start;\n }\n };\n /**\n * @override\n */\n LargeLineDraw.prototype.remove = function () {\n this._clear();\n };\n LargeLineDraw.prototype.eachRendered = function (cb) {\n this._newAdded[0] && cb(this._newAdded[0]);\n };\n LargeLineDraw.prototype._create = function () {\n var lineEl = new LargeLinesPath({\n cursor: 'default',\n ignoreCoarsePointer: true\n });\n this._newAdded.push(lineEl);\n this.group.add(lineEl);\n return lineEl;\n };\n LargeLineDraw.prototype._setCommon = function (lineEl, data, isIncremental) {\n var hostModel = data.hostModel;\n lineEl.setShape({\n polyline: hostModel.get('polyline'),\n curveness: hostModel.get(['lineStyle', 'curveness'])\n });\n lineEl.useStyle(hostModel.getModel('lineStyle').getLineStyle());\n lineEl.style.strokeNoScale = true;\n var style = data.getVisual('style');\n if (style && style.stroke) {\n lineEl.setStyle('stroke', style.stroke);\n }\n lineEl.setStyle('fill', null);\n var ecData = getECData(lineEl);\n // Enable tooltip\n // PENDING May have performance issue when path is extremely large\n ecData.seriesIndex = hostModel.seriesIndex;\n lineEl.on('mousemove', function (e) {\n ecData.dataIndex = null;\n var dataIndex = lineEl.hoverDataIdx;\n if (dataIndex > 0) {\n // Provide dataIndex for tooltip\n ecData.dataIndex = dataIndex + lineEl.__startIndex;\n }\n });\n };\n ;\n LargeLineDraw.prototype._clear = function () {\n this._newAdded = [];\n this.group.removeAll();\n };\n ;\n return LargeLineDraw;\n}();\nexport default LargeLineDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/* global Float32Array */\nimport createRenderPlanner from '../helper/createRenderPlanner.js';\nimport { error } from '../../util/log.js';\nvar linesLayout = {\n seriesType: 'lines',\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (!coordSys) {\n if (process.env.NODE_ENV !== 'production') {\n error('The lines series must have a coordinate system.');\n }\n return;\n }\n var isPolyline = seriesModel.get('polyline');\n var isLarge = seriesModel.pipelineContext.large;\n return {\n progress: function (params, lineData) {\n var lineCoords = [];\n if (isLarge) {\n var points = void 0;\n var segCount = params.end - params.start;\n if (isPolyline) {\n var totalCoordsCount = 0;\n for (var i = params.start; i < params.end; i++) {\n totalCoordsCount += seriesModel.getLineCoordsCount(i);\n }\n points = new Float32Array(segCount + totalCoordsCount * 2);\n } else {\n points = new Float32Array(segCount * 4);\n }\n var offset = 0;\n var pt = [];\n for (var i = params.start; i < params.end; i++) {\n var len = seriesModel.getLineCoords(i, lineCoords);\n if (isPolyline) {\n points[offset++] = len;\n }\n for (var k = 0; k < len; k++) {\n pt = coordSys.dataToPoint(lineCoords[k], false, pt);\n points[offset++] = pt[0];\n points[offset++] = pt[1];\n }\n }\n lineData.setLayout('linesPoints', points);\n } else {\n for (var i = params.start; i < params.end; i++) {\n var itemModel = lineData.getItemModel(i);\n var len = seriesModel.getLineCoords(i, lineCoords);\n var pts = [];\n if (isPolyline) {\n for (var j = 0; j < len; j++) {\n pts.push(coordSys.dataToPoint(lineCoords[j]));\n }\n } else {\n pts[0] = coordSys.dataToPoint(lineCoords[0]);\n pts[1] = coordSys.dataToPoint(lineCoords[1]);\n var curveness = itemModel.get(['lineStyle', 'curveness']);\n if (+curveness) {\n pts[2] = [(pts[0][0] + pts[1][0]) / 2 - (pts[0][1] - pts[1][1]) * curveness, (pts[0][1] + pts[1][1]) / 2 - (pts[1][0] - pts[0][0]) * curveness];\n }\n }\n lineData.setItemLayout(i, pts);\n }\n }\n }\n };\n }\n};\nexport default linesLayout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport LineDraw from '../helper/LineDraw.js';\nimport EffectLine from '../helper/EffectLine.js';\nimport Line from '../helper/Line.js';\nimport Polyline from '../helper/Polyline.js';\nimport EffectPolyline from '../helper/EffectPolyline.js';\nimport LargeLineDraw from '../helper/LargeLineDraw.js';\nimport linesLayout from './linesLayout.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport ChartView from '../../view/Chart.js';\nvar LinesView = /** @class */function (_super) {\n __extends(LinesView, _super);\n function LinesView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LinesView.type;\n return _this;\n }\n LinesView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var lineDraw = this._updateLineDraw(data, seriesModel);\n var zlevel = seriesModel.get('zlevel');\n var trailLength = seriesModel.get(['effect', 'trailLength']);\n var zr = api.getZr();\n // Avoid the drag cause ghost shadow\n // FIXME Better way ?\n // SVG doesn't support\n var isSvg = zr.painter.getType() === 'svg';\n if (!isSvg) {\n zr.painter.getLayer(zlevel).clear(true);\n }\n // Config layer with motion blur\n if (this._lastZlevel != null && !isSvg) {\n zr.configLayer(this._lastZlevel, {\n motionBlur: false\n });\n }\n if (this._showEffect(seriesModel) && trailLength > 0) {\n if (!isSvg) {\n zr.configLayer(zlevel, {\n motionBlur: true,\n lastFrameAlpha: Math.max(Math.min(trailLength / 10 + 0.9, 1), 0)\n });\n } else if (process.env.NODE_ENV !== 'production') {\n console.warn('SVG render mode doesn\\'t support lines with trail effect');\n }\n }\n lineDraw.updateData(data);\n var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n this._lastZlevel = zlevel;\n this._finished = true;\n };\n LinesView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var lineDraw = this._updateLineDraw(data, seriesModel);\n lineDraw.incrementalPrepareUpdate(data);\n this._clearLayer(api);\n this._finished = false;\n };\n LinesView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) {\n this._lineDraw.incrementalUpdate(taskParams, seriesModel.getData());\n this._finished = taskParams.end === seriesModel.getData().count();\n };\n LinesView.prototype.eachRendered = function (cb) {\n this._lineDraw && this._lineDraw.eachRendered(cb);\n };\n LinesView.prototype.updateTransform = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var pipelineContext = seriesModel.pipelineContext;\n if (!this._finished || pipelineContext.large || pipelineContext.progressiveRender) {\n // TODO Don't have to do update in large mode. Only do it when there are millions of data.\n return {\n update: true\n };\n } else {\n // TODO Use same logic with ScatterView.\n // Manually update layout\n var res = linesLayout.reset(seriesModel, ecModel, api);\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count(),\n count: data.count()\n }, data);\n }\n // Not in large mode\n this._lineDraw.updateLayout();\n this._clearLayer(api);\n }\n };\n LinesView.prototype._updateLineDraw = function (data, seriesModel) {\n var lineDraw = this._lineDraw;\n var hasEffect = this._showEffect(seriesModel);\n var isPolyline = !!seriesModel.get('polyline');\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n if (process.env.NODE_ENV !== 'production') {\n if (hasEffect && isLargeDraw) {\n console.warn('Large lines not support effect');\n }\n }\n if (!lineDraw || hasEffect !== this._hasEffet || isPolyline !== this._isPolyline || isLargeDraw !== this._isLargeDraw) {\n if (lineDraw) {\n lineDraw.remove();\n }\n lineDraw = this._lineDraw = isLargeDraw ? new LargeLineDraw() : new LineDraw(isPolyline ? hasEffect ? EffectPolyline : Polyline : hasEffect ? EffectLine : Line);\n this._hasEffet = hasEffect;\n this._isPolyline = isPolyline;\n this._isLargeDraw = isLargeDraw;\n }\n this.group.add(lineDraw.group);\n return lineDraw;\n };\n LinesView.prototype._showEffect = function (seriesModel) {\n return !!seriesModel.get(['effect', 'show']);\n };\n LinesView.prototype._clearLayer = function (api) {\n // Not use motion when dragging or zooming\n var zr = api.getZr();\n var isSvg = zr.painter.getType() === 'svg';\n if (!isSvg && this._lastZlevel != null) {\n zr.painter.getLayer(this._lastZlevel).clear(true);\n }\n };\n LinesView.prototype.remove = function (ecModel, api) {\n this._lineDraw && this._lineDraw.remove();\n this._lineDraw = null;\n // Clear motion when lineDraw is removed\n this._clearLayer(api);\n };\n LinesView.prototype.dispose = function (ecModel, api) {\n this.remove(ecModel, api);\n };\n LinesView.type = 'lines';\n return LinesView;\n}(ChartView);\nexport default LinesView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global Uint32Array, Float64Array, Float32Array */\nimport SeriesModel from '../../model/Series.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport { concatArray, mergeAll, map, isNumber } from 'zrender/lib/core/util.js';\nimport CoordinateSystem from '../../core/CoordinateSystem.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nvar Uint32Arr = typeof Uint32Array === 'undefined' ? Array : Uint32Array;\nvar Float64Arr = typeof Float64Array === 'undefined' ? Array : Float64Array;\nfunction compatEc2(seriesOpt) {\n var data = seriesOpt.data;\n if (data && data[0] && data[0][0] && data[0][0].coord) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Lines data configuration has been changed to' + ' { coords:[[1,2],[2,3]] }');\n }\n seriesOpt.data = map(data, function (itemOpt) {\n var coords = [itemOpt[0].coord, itemOpt[1].coord];\n var target = {\n coords: coords\n };\n if (itemOpt[0].name) {\n target.fromName = itemOpt[0].name;\n }\n if (itemOpt[1].name) {\n target.toName = itemOpt[1].name;\n }\n return mergeAll([target, itemOpt[0], itemOpt[1]]);\n });\n }\n}\nvar LinesSeriesModel = /** @class */function (_super) {\n __extends(LinesSeriesModel, _super);\n function LinesSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LinesSeriesModel.type;\n _this.visualStyleAccessPath = 'lineStyle';\n _this.visualDrawType = 'stroke';\n return _this;\n }\n LinesSeriesModel.prototype.init = function (option) {\n // The input data may be null/undefined.\n option.data = option.data || [];\n // Not using preprocessor because mergeOption may not have series.type\n compatEc2(option);\n var result = this._processFlatCoordsArray(option.data);\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n if (result.flatCoords) {\n option.data = new Float32Array(result.count);\n }\n _super.prototype.init.apply(this, arguments);\n };\n LinesSeriesModel.prototype.mergeOption = function (option) {\n compatEc2(option);\n if (option.data) {\n // Only update when have option data to merge.\n var result = this._processFlatCoordsArray(option.data);\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n if (result.flatCoords) {\n option.data = new Float32Array(result.count);\n }\n }\n _super.prototype.mergeOption.apply(this, arguments);\n };\n LinesSeriesModel.prototype.appendData = function (params) {\n var result = this._processFlatCoordsArray(params.data);\n if (result.flatCoords) {\n if (!this._flatCoords) {\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n } else {\n this._flatCoords = concatArray(this._flatCoords, result.flatCoords);\n this._flatCoordsOffset = concatArray(this._flatCoordsOffset, result.flatCoordsOffset);\n }\n params.data = new Float32Array(result.count);\n }\n this.getRawData().appendData(params.data);\n };\n LinesSeriesModel.prototype._getCoordsFromItemModel = function (idx) {\n var itemModel = this.getData().getItemModel(idx);\n var coords = itemModel.option instanceof Array ? itemModel.option : itemModel.getShallow('coords');\n if (process.env.NODE_ENV !== 'production') {\n if (!(coords instanceof Array && coords.length > 0 && coords[0] instanceof Array)) {\n throw new Error('Invalid coords ' + JSON.stringify(coords) + '. Lines must have 2d coords array in data item.');\n }\n }\n return coords;\n };\n LinesSeriesModel.prototype.getLineCoordsCount = function (idx) {\n if (this._flatCoordsOffset) {\n return this._flatCoordsOffset[idx * 2 + 1];\n } else {\n return this._getCoordsFromItemModel(idx).length;\n }\n };\n LinesSeriesModel.prototype.getLineCoords = function (idx, out) {\n if (this._flatCoordsOffset) {\n var offset = this._flatCoordsOffset[idx * 2];\n var len = this._flatCoordsOffset[idx * 2 + 1];\n for (var i = 0; i < len; i++) {\n out[i] = out[i] || [];\n out[i][0] = this._flatCoords[offset + i * 2];\n out[i][1] = this._flatCoords[offset + i * 2 + 1];\n }\n return len;\n } else {\n var coords = this._getCoordsFromItemModel(idx);\n for (var i = 0; i < coords.length; i++) {\n out[i] = out[i] || [];\n out[i][0] = coords[i][0];\n out[i][1] = coords[i][1];\n }\n return coords.length;\n }\n };\n LinesSeriesModel.prototype._processFlatCoordsArray = function (data) {\n var startOffset = 0;\n if (this._flatCoords) {\n startOffset = this._flatCoords.length;\n }\n // Stored as a typed array. In format\n // Points Count(2) | x | y | x | y | Points Count(3) | x | y | x | y | x | y |\n if (isNumber(data[0])) {\n var len = data.length;\n // Store offset and len of each segment\n var coordsOffsetAndLenStorage = new Uint32Arr(len);\n var coordsStorage = new Float64Arr(len);\n var coordsCursor = 0;\n var offsetCursor = 0;\n var dataCount = 0;\n for (var i = 0; i < len;) {\n dataCount++;\n var count = data[i++];\n // Offset\n coordsOffsetAndLenStorage[offsetCursor++] = coordsCursor + startOffset;\n // Len\n coordsOffsetAndLenStorage[offsetCursor++] = count;\n for (var k = 0; k < count; k++) {\n var x = data[i++];\n var y = data[i++];\n coordsStorage[coordsCursor++] = x;\n coordsStorage[coordsCursor++] = y;\n if (i > len) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('Invalid data format.');\n }\n }\n }\n }\n return {\n flatCoordsOffset: new Uint32Array(coordsOffsetAndLenStorage.buffer, 0, offsetCursor),\n flatCoords: coordsStorage,\n count: dataCount\n };\n }\n return {\n flatCoordsOffset: null,\n flatCoords: null,\n count: data.length\n };\n };\n LinesSeriesModel.prototype.getInitialData = function (option, ecModel) {\n if (process.env.NODE_ENV !== 'production') {\n var CoordSys = CoordinateSystem.get(option.coordinateSystem);\n if (!CoordSys) {\n throw new Error('Unknown coordinate system ' + option.coordinateSystem);\n }\n }\n var lineData = new SeriesData(['value'], this);\n lineData.hasItemOption = false;\n lineData.initData(option.data, [], function (dataItem, dimName, dataIndex, dimIndex) {\n // dataItem is simply coords\n if (dataItem instanceof Array) {\n return NaN;\n } else {\n lineData.hasItemOption = true;\n var value = dataItem.value;\n if (value != null) {\n return value instanceof Array ? value[dimIndex] : value;\n }\n }\n });\n return lineData;\n };\n LinesSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var itemModel = data.getItemModel(dataIndex);\n var name = itemModel.get('name');\n if (name) {\n return name;\n }\n var fromName = itemModel.get('fromName');\n var toName = itemModel.get('toName');\n var nameArr = [];\n fromName != null && nameArr.push(fromName);\n toName != null && nameArr.push(toName);\n return createTooltipMarkup('nameValue', {\n name: nameArr.join(' > ')\n });\n };\n LinesSeriesModel.prototype.preventIncremental = function () {\n return !!this.get(['effect', 'show']);\n };\n LinesSeriesModel.prototype.getProgressive = function () {\n var progressive = this.option.progressive;\n if (progressive == null) {\n return this.option.large ? 1e4 : this.get('progressive');\n }\n return progressive;\n };\n LinesSeriesModel.prototype.getProgressiveThreshold = function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n if (progressiveThreshold == null) {\n return this.option.large ? 2e4 : this.get('progressiveThreshold');\n }\n return progressiveThreshold;\n };\n LinesSeriesModel.prototype.getZLevelKey = function () {\n var effectModel = this.getModel('effect');\n var trailLength = effectModel.get('trailLength');\n return this.getData().count() > this.getProgressiveThreshold()\n // Each progressive series has individual key.\n ? this.id : effectModel.get('show') && trailLength > 0 ? trailLength + '' : '';\n };\n LinesSeriesModel.type = 'series.lines';\n LinesSeriesModel.dependencies = ['grid', 'polar', 'geo', 'calendar'];\n LinesSeriesModel.defaultOption = {\n coordinateSystem: 'geo',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n // Cartesian coordinate system\n xAxisIndex: 0,\n yAxisIndex: 0,\n symbol: ['none', 'none'],\n symbolSize: [10, 10],\n // Geo coordinate system\n geoIndex: 0,\n effect: {\n show: false,\n period: 4,\n constantSpeed: 0,\n symbol: 'circle',\n symbolSize: 3,\n loop: true,\n trailLength: 0.2\n },\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n polyline: false,\n clip: true,\n label: {\n show: false,\n position: 'end'\n // distance: 5,\n // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n },\n\n lineStyle: {\n opacity: 0.5\n }\n };\n return LinesSeriesModel;\n}(SeriesModel);\nexport default LinesSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n return a;\n}\nvar linesVisual = {\n seriesType: 'lines',\n reset: function (seriesModel) {\n var symbolType = normalize(seriesModel.get('symbol'));\n var symbolSize = normalize(seriesModel.get('symbolSize'));\n var data = seriesModel.getData();\n data.setVisual('fromSymbol', symbolType && symbolType[0]);\n data.setVisual('toSymbol', symbolType && symbolType[1]);\n data.setVisual('fromSymbolSize', symbolSize && symbolSize[0]);\n data.setVisual('toSymbolSize', symbolSize && symbolSize[1]);\n function dataEach(data, idx) {\n var itemModel = data.getItemModel(idx);\n var symbolType = normalize(itemModel.getShallow('symbol', true));\n var symbolSize = normalize(itemModel.getShallow('symbolSize', true));\n symbolType[0] && data.setItemVisual(idx, 'fromSymbol', symbolType[0]);\n symbolType[1] && data.setItemVisual(idx, 'toSymbol', symbolType[1]);\n symbolSize[0] && data.setItemVisual(idx, 'fromSymbolSize', symbolSize[0]);\n symbolSize[1] && data.setItemVisual(idx, 'toSymbolSize', symbolSize[1]);\n }\n return {\n dataEach: data.hasItemOption ? dataEach : null\n };\n }\n};\nexport default linesVisual;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LinesView from './LinesView.js';\nimport LinesSeriesModel from './LinesSeries.js';\nimport linesLayout from './linesLayout.js';\nimport linesVisual from './linesVisual.js';\nexport function install(registers) {\n registers.registerChartView(LinesView);\n registers.registerSeriesModel(LinesSeriesModel);\n registers.registerLayout(linesLayout);\n registers.registerVisual(linesVisual);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/* global Uint8ClampedArray */\nimport { platformApi } from 'zrender/lib/core/platform.js';\nvar GRADIENT_LEVELS = 256;\nvar HeatmapLayer = /** @class */function () {\n function HeatmapLayer() {\n this.blurSize = 30;\n this.pointSize = 20;\n this.maxOpacity = 1;\n this.minOpacity = 0;\n this._gradientPixels = {\n inRange: null,\n outOfRange: null\n };\n var canvas = platformApi.createCanvas();\n this.canvas = canvas;\n }\n /**\n * Renders Heatmap and returns the rendered canvas\n * @param data array of data, each has x, y, value\n * @param width canvas width\n * @param height canvas height\n */\n HeatmapLayer.prototype.update = function (data, width, height, normalize, colorFunc, isInRange) {\n var brush = this._getBrush();\n var gradientInRange = this._getGradient(colorFunc, 'inRange');\n var gradientOutOfRange = this._getGradient(colorFunc, 'outOfRange');\n var r = this.pointSize + this.blurSize;\n var canvas = this.canvas;\n var ctx = canvas.getContext('2d');\n var len = data.length;\n canvas.width = width;\n canvas.height = height;\n for (var i = 0; i < len; ++i) {\n var p = data[i];\n var x = p[0];\n var y = p[1];\n var value = p[2];\n // calculate alpha using value\n var alpha = normalize(value);\n // draw with the circle brush with alpha\n ctx.globalAlpha = alpha;\n ctx.drawImage(brush, x - r, y - r);\n }\n if (!canvas.width || !canvas.height) {\n // Avoid \"Uncaught DOMException: Failed to execute 'getImageData' on\n // 'CanvasRenderingContext2D': The source height is 0.\"\n return canvas;\n }\n // colorize the canvas using alpha value and set with gradient\n var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n var pixels = imageData.data;\n var offset = 0;\n var pixelLen = pixels.length;\n var minOpacity = this.minOpacity;\n var maxOpacity = this.maxOpacity;\n var diffOpacity = maxOpacity - minOpacity;\n while (offset < pixelLen) {\n var alpha = pixels[offset + 3] / 256;\n var gradientOffset = Math.floor(alpha * (GRADIENT_LEVELS - 1)) * 4;\n // Simple optimize to ignore the empty data\n if (alpha > 0) {\n var gradient = isInRange(alpha) ? gradientInRange : gradientOutOfRange;\n // Any alpha > 0 will be mapped to [minOpacity, maxOpacity]\n alpha > 0 && (alpha = alpha * diffOpacity + minOpacity);\n pixels[offset++] = gradient[gradientOffset];\n pixels[offset++] = gradient[gradientOffset + 1];\n pixels[offset++] = gradient[gradientOffset + 2];\n pixels[offset++] = gradient[gradientOffset + 3] * alpha * 256;\n } else {\n offset += 4;\n }\n }\n ctx.putImageData(imageData, 0, 0);\n return canvas;\n };\n /**\n * get canvas of a black circle brush used for canvas to draw later\n */\n HeatmapLayer.prototype._getBrush = function () {\n var brushCanvas = this._brushCanvas || (this._brushCanvas = platformApi.createCanvas());\n // set brush size\n var r = this.pointSize + this.blurSize;\n var d = r * 2;\n brushCanvas.width = d;\n brushCanvas.height = d;\n var ctx = brushCanvas.getContext('2d');\n ctx.clearRect(0, 0, d, d);\n // in order to render shadow without the distinct circle,\n // draw the distinct circle in an invisible place,\n // and use shadowOffset to draw shadow in the center of the canvas\n ctx.shadowOffsetX = d;\n ctx.shadowBlur = this.blurSize;\n // draw the shadow in black, and use alpha and shadow blur to generate\n // color in color map\n ctx.shadowColor = '#000';\n // draw circle in the left to the canvas\n ctx.beginPath();\n ctx.arc(-r, r, this.pointSize, 0, Math.PI * 2, true);\n ctx.closePath();\n ctx.fill();\n return brushCanvas;\n };\n /**\n * get gradient color map\n * @private\n */\n HeatmapLayer.prototype._getGradient = function (colorFunc, state) {\n var gradientPixels = this._gradientPixels;\n var pixelsSingleState = gradientPixels[state] || (gradientPixels[state] = new Uint8ClampedArray(256 * 4));\n var color = [0, 0, 0, 0];\n var off = 0;\n for (var i = 0; i < 256; i++) {\n colorFunc[state](i / 255, true, color);\n pixelsSingleState[off++] = color[0];\n pixelsSingleState[off++] = color[1];\n pixelsSingleState[off++] = color[2];\n pixelsSingleState[off++] = color[3];\n }\n return pixelsSingleState;\n };\n return HeatmapLayer;\n}();\nexport default HeatmapLayer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis } from '../../util/states.js';\nimport HeatmapLayer from './HeatmapLayer.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ChartView from '../../view/Chart.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nfunction getIsInPiecewiseRange(dataExtent, pieceList, selected) {\n var dataSpan = dataExtent[1] - dataExtent[0];\n pieceList = zrUtil.map(pieceList, function (piece) {\n return {\n interval: [(piece.interval[0] - dataExtent[0]) / dataSpan, (piece.interval[1] - dataExtent[0]) / dataSpan]\n };\n });\n var len = pieceList.length;\n var lastIndex = 0;\n return function (val) {\n var i;\n // Try to find in the location of the last found\n for (i = lastIndex; i < len; i++) {\n var interval = pieceList[i].interval;\n if (interval[0] <= val && val <= interval[1]) {\n lastIndex = i;\n break;\n }\n }\n if (i === len) {\n // Not found, back interation\n for (i = lastIndex - 1; i >= 0; i--) {\n var interval = pieceList[i].interval;\n if (interval[0] <= val && val <= interval[1]) {\n lastIndex = i;\n break;\n }\n }\n }\n return i >= 0 && i < len && selected[i];\n };\n}\nfunction getIsInContinuousRange(dataExtent, range) {\n var dataSpan = dataExtent[1] - dataExtent[0];\n range = [(range[0] - dataExtent[0]) / dataSpan, (range[1] - dataExtent[0]) / dataSpan];\n return function (val) {\n return val >= range[0] && val <= range[1];\n };\n}\nfunction isGeoCoordSys(coordSys) {\n var dimensions = coordSys.dimensions;\n // Not use coordSys.type === 'geo' because coordSys maybe extended\n return dimensions[0] === 'lng' && dimensions[1] === 'lat';\n}\nvar HeatmapView = /** @class */function (_super) {\n __extends(HeatmapView, _super);\n function HeatmapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = HeatmapView.type;\n return _this;\n }\n HeatmapView.prototype.render = function (seriesModel, ecModel, api) {\n var visualMapOfThisSeries;\n ecModel.eachComponent('visualMap', function (visualMap) {\n visualMap.eachTargetSeries(function (targetSeries) {\n if (targetSeries === seriesModel) {\n visualMapOfThisSeries = visualMap;\n }\n });\n });\n if (process.env.NODE_ENV !== 'production') {\n if (!visualMapOfThisSeries) {\n throw new Error('Heatmap must use with visualMap');\n }\n }\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n this.group.removeAll();\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type === 'cartesian2d' || coordSys.type === 'calendar') {\n this._renderOnCartesianAndCalendar(seriesModel, api, 0, seriesModel.getData().count());\n } else if (isGeoCoordSys(coordSys)) {\n this._renderOnGeo(coordSys, seriesModel, visualMapOfThisSeries, api);\n }\n };\n HeatmapView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n this.group.removeAll();\n };\n HeatmapView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys) {\n // geo does not support incremental rendering?\n if (isGeoCoordSys(coordSys)) {\n this.render(seriesModel, ecModel, api);\n } else {\n this._progressiveEls = [];\n this._renderOnCartesianAndCalendar(seriesModel, api, params.start, params.end, true);\n }\n }\n };\n HeatmapView.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n HeatmapView.prototype._renderOnCartesianAndCalendar = function (seriesModel, api, start, end, incremental) {\n var coordSys = seriesModel.coordinateSystem;\n var isCartesian2d = isCoordinateSystemType(coordSys, 'cartesian2d');\n var width;\n var height;\n var xAxisExtent;\n var yAxisExtent;\n if (isCartesian2d) {\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n if (process.env.NODE_ENV !== 'production') {\n if (!(xAxis.type === 'category' && yAxis.type === 'category')) {\n throw new Error('Heatmap on cartesian must have two category axes');\n }\n if (!(xAxis.onBand && yAxis.onBand)) {\n throw new Error('Heatmap on cartesian must have two axes with boundaryGap true');\n }\n }\n // add 0.5px to avoid the gaps\n width = xAxis.getBandWidth() + .5;\n height = yAxis.getBandWidth() + .5;\n xAxisExtent = xAxis.scale.getExtent();\n yAxisExtent = yAxis.scale.getExtent();\n }\n var group = this.group;\n var data = seriesModel.getData();\n var emphasisStyle = seriesModel.getModel(['emphasis', 'itemStyle']).getItemStyle();\n var blurStyle = seriesModel.getModel(['blur', 'itemStyle']).getItemStyle();\n var selectStyle = seriesModel.getModel(['select', 'itemStyle']).getItemStyle();\n var borderRadius = seriesModel.get(['itemStyle', 'borderRadius']);\n var labelStatesModels = getLabelStatesModels(seriesModel);\n var emphasisModel = seriesModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var emphasisDisabled = emphasisModel.get('disabled');\n var dataDims = isCartesian2d ? [data.mapDimension('x'), data.mapDimension('y'), data.mapDimension('value')] : [data.mapDimension('time'), data.mapDimension('value')];\n for (var idx = start; idx < end; idx++) {\n var rect = void 0;\n var style = data.getItemVisual(idx, 'style');\n if (isCartesian2d) {\n var dataDimX = data.get(dataDims[0], idx);\n var dataDimY = data.get(dataDims[1], idx);\n // Ignore empty data and out of extent data\n if (isNaN(data.get(dataDims[2], idx)) || isNaN(dataDimX) || isNaN(dataDimY) || dataDimX < xAxisExtent[0] || dataDimX > xAxisExtent[1] || dataDimY < yAxisExtent[0] || dataDimY > yAxisExtent[1]) {\n continue;\n }\n var point = coordSys.dataToPoint([dataDimX, dataDimY]);\n rect = new graphic.Rect({\n shape: {\n x: point[0] - width / 2,\n y: point[1] - height / 2,\n width: width,\n height: height\n },\n style: style\n });\n } else {\n // Ignore empty data\n if (isNaN(data.get(dataDims[1], idx))) {\n continue;\n }\n rect = new graphic.Rect({\n z2: 1,\n shape: coordSys.dataToRect([data.get(dataDims[0], idx)]).contentShape,\n style: style\n });\n }\n // Optimization for large dataset\n if (data.hasItemOption) {\n var itemModel = data.getItemModel(idx);\n var emphasisModel_1 = itemModel.getModel('emphasis');\n emphasisStyle = emphasisModel_1.getModel('itemStyle').getItemStyle();\n blurStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n selectStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n // Each item value struct in the data would be firstly\n // {\n // itemStyle: { borderRadius: [30, 30] },\n // value: [2022, 02, 22]\n // }\n borderRadius = itemModel.get(['itemStyle', 'borderRadius']);\n focus = emphasisModel_1.get('focus');\n blurScope = emphasisModel_1.get('blurScope');\n emphasisDisabled = emphasisModel_1.get('disabled');\n labelStatesModels = getLabelStatesModels(itemModel);\n }\n rect.shape.r = borderRadius;\n var rawValue = seriesModel.getRawValue(idx);\n var defaultText = '-';\n if (rawValue && rawValue[2] != null) {\n defaultText = rawValue[2] + '';\n }\n setLabelStyle(rect, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultOpacity: style.opacity,\n defaultText: defaultText\n });\n rect.ensureState('emphasis').style = emphasisStyle;\n rect.ensureState('blur').style = blurStyle;\n rect.ensureState('select').style = selectStyle;\n toggleHoverEmphasis(rect, focus, blurScope, emphasisDisabled);\n rect.incremental = incremental;\n // PENDING\n if (incremental) {\n // Rect must use hover layer if it's incremental.\n rect.states.emphasis.hoverLayer = true;\n }\n group.add(rect);\n data.setItemGraphicEl(idx, rect);\n if (this._progressiveEls) {\n this._progressiveEls.push(rect);\n }\n }\n };\n HeatmapView.prototype._renderOnGeo = function (geo, seriesModel, visualMapModel, api) {\n var inRangeVisuals = visualMapModel.targetVisuals.inRange;\n var outOfRangeVisuals = visualMapModel.targetVisuals.outOfRange;\n // if (!visualMapping) {\n // throw new Error('Data range must have color visuals');\n // }\n var data = seriesModel.getData();\n var hmLayer = this._hmLayer || this._hmLayer || new HeatmapLayer();\n hmLayer.blurSize = seriesModel.get('blurSize');\n hmLayer.pointSize = seriesModel.get('pointSize');\n hmLayer.minOpacity = seriesModel.get('minOpacity');\n hmLayer.maxOpacity = seriesModel.get('maxOpacity');\n var rect = geo.getViewRect().clone();\n var roamTransform = geo.getRoamTransform();\n rect.applyTransform(roamTransform);\n // Clamp on viewport\n var x = Math.max(rect.x, 0);\n var y = Math.max(rect.y, 0);\n var x2 = Math.min(rect.width + rect.x, api.getWidth());\n var y2 = Math.min(rect.height + rect.y, api.getHeight());\n var width = x2 - x;\n var height = y2 - y;\n var dims = [data.mapDimension('lng'), data.mapDimension('lat'), data.mapDimension('value')];\n var points = data.mapArray(dims, function (lng, lat, value) {\n var pt = geo.dataToPoint([lng, lat]);\n pt[0] -= x;\n pt[1] -= y;\n pt.push(value);\n return pt;\n });\n var dataExtent = visualMapModel.getExtent();\n var isInRange = visualMapModel.type === 'visualMap.continuous' ? getIsInContinuousRange(dataExtent, visualMapModel.option.range) : getIsInPiecewiseRange(dataExtent, visualMapModel.getPieceList(), visualMapModel.option.selected);\n hmLayer.update(points, width, height, inRangeVisuals.color.getNormalizer(), {\n inRange: inRangeVisuals.color.getColorMapper(),\n outOfRange: outOfRangeVisuals.color.getColorMapper()\n }, isInRange);\n var img = new graphic.Image({\n style: {\n width: width,\n height: height,\n x: x,\n y: y,\n image: hmLayer.canvas\n },\n silent: true\n });\n this.group.add(img);\n };\n HeatmapView.type = 'heatmap';\n return HeatmapView;\n}(ChartView);\nexport default HeatmapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport CoordinateSystem from '../../core/CoordinateSystem.js';\nvar HeatmapSeriesModel = /** @class */function (_super) {\n __extends(HeatmapSeriesModel, _super);\n function HeatmapSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = HeatmapSeriesModel.type;\n return _this;\n }\n HeatmapSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n generateCoord: 'value'\n });\n };\n HeatmapSeriesModel.prototype.preventIncremental = function () {\n var coordSysCreator = CoordinateSystem.get(this.get('coordinateSystem'));\n if (coordSysCreator && coordSysCreator.dimensions) {\n return coordSysCreator.dimensions[0] === 'lng' && coordSysCreator.dimensions[1] === 'lat';\n }\n };\n HeatmapSeriesModel.type = 'series.heatmap';\n HeatmapSeriesModel.dependencies = ['grid', 'geo', 'calendar'];\n HeatmapSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Geo coordinate system\n geoIndex: 0,\n blurSize: 30,\n pointSize: 20,\n maxOpacity: 1,\n minOpacity: 0,\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n };\n return HeatmapSeriesModel;\n}(SeriesModel);\nexport default HeatmapSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport HeatmapView from './HeatmapView.js';\nimport HeatmapSeriesModel from './HeatmapSeries.js';\nexport function install(registers) {\n registers.registerChartView(HeatmapView);\n registers.registerSeriesModel(HeatmapSeriesModel);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis } from '../../util/states.js';\nimport { createSymbol, normalizeSymbolOffset } from '../../util/symbol.js';\nimport { parsePercent, isNumeric } from '../../util/number.js';\nimport ChartView from '../../view/Chart.js';\nimport { getDefaultLabel } from '../helper/labelHelper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nvar BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'borderWidth'];\n// index: +isHorizontal\nvar LAYOUT_ATTRS = [{\n xy: 'x',\n wh: 'width',\n index: 0,\n posDesc: ['left', 'right']\n}, {\n xy: 'y',\n wh: 'height',\n index: 1,\n posDesc: ['top', 'bottom']\n}];\nvar pathForLineWidth = new graphic.Circle();\nvar PictorialBarView = /** @class */function (_super) {\n __extends(PictorialBarView, _super);\n function PictorialBarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PictorialBarView.type;\n return _this;\n }\n PictorialBarView.prototype.render = function (seriesModel, ecModel, api) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var coordSysRect = cartesian.master.getRect();\n var opt = {\n ecSize: {\n width: api.getWidth(),\n height: api.getHeight()\n },\n seriesModel: seriesModel,\n coordSys: cartesian,\n coordSysExtent: [[coordSysRect.x, coordSysRect.x + coordSysRect.width], [coordSysRect.y, coordSysRect.y + coordSysRect.height]],\n isHorizontal: isHorizontal,\n valueDim: LAYOUT_ATTRS[+isHorizontal],\n categoryDim: LAYOUT_ATTRS[1 - +isHorizontal]\n };\n data.diff(oldData).add(function (dataIndex) {\n if (!data.hasValue(dataIndex)) {\n return;\n }\n var itemModel = getItemModel(data, dataIndex);\n var symbolMeta = getSymbolMeta(data, dataIndex, itemModel, opt);\n var bar = createBar(data, opt, symbolMeta);\n data.setItemGraphicEl(dataIndex, bar);\n group.add(bar);\n updateCommon(bar, opt, symbolMeta);\n }).update(function (newIndex, oldIndex) {\n var bar = oldData.getItemGraphicEl(oldIndex);\n if (!data.hasValue(newIndex)) {\n group.remove(bar);\n return;\n }\n var itemModel = getItemModel(data, newIndex);\n var symbolMeta = getSymbolMeta(data, newIndex, itemModel, opt);\n var pictorialShapeStr = getShapeStr(data, symbolMeta);\n if (bar && pictorialShapeStr !== bar.__pictorialShapeStr) {\n group.remove(bar);\n data.setItemGraphicEl(newIndex, null);\n bar = null;\n }\n if (bar) {\n updateBar(bar, opt, symbolMeta);\n } else {\n bar = createBar(data, opt, symbolMeta, true);\n }\n data.setItemGraphicEl(newIndex, bar);\n bar.__pictorialSymbolMeta = symbolMeta;\n // Add back\n group.add(bar);\n updateCommon(bar, opt, symbolMeta);\n }).remove(function (dataIndex) {\n var bar = oldData.getItemGraphicEl(dataIndex);\n bar && removeBar(oldData, dataIndex, bar.__pictorialSymbolMeta.animationModel, bar);\n }).execute();\n // Do clipping\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n this._data = data;\n return this.group;\n };\n PictorialBarView.prototype.remove = function (ecModel, api) {\n var group = this.group;\n var data = this._data;\n if (ecModel.get('animation')) {\n if (data) {\n data.eachItemGraphicEl(function (bar) {\n removeBar(data, getECData(bar).dataIndex, ecModel, bar);\n });\n }\n } else {\n group.removeAll();\n }\n };\n PictorialBarView.type = 'pictorialBar';\n return PictorialBarView;\n}(ChartView);\n// Set or calculate default value about symbol, and calculate layout info.\nfunction getSymbolMeta(data, dataIndex, itemModel, opt) {\n var layout = data.getItemLayout(dataIndex);\n var symbolRepeat = itemModel.get('symbolRepeat');\n var symbolClip = itemModel.get('symbolClip');\n var symbolPosition = itemModel.get('symbolPosition') || 'start';\n var symbolRotate = itemModel.get('symbolRotate');\n var rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n var symbolPatternSize = itemModel.get('symbolPatternSize') || 2;\n var isAnimationEnabled = itemModel.isAnimationEnabled();\n var symbolMeta = {\n dataIndex: dataIndex,\n layout: layout,\n itemModel: itemModel,\n symbolType: data.getItemVisual(dataIndex, 'symbol') || 'circle',\n style: data.getItemVisual(dataIndex, 'style'),\n symbolClip: symbolClip,\n symbolRepeat: symbolRepeat,\n symbolRepeatDirection: itemModel.get('symbolRepeatDirection'),\n symbolPatternSize: symbolPatternSize,\n rotation: rotation,\n animationModel: isAnimationEnabled ? itemModel : null,\n hoverScale: isAnimationEnabled && itemModel.get(['emphasis', 'scale']),\n z2: itemModel.getShallow('z', true) || 0\n };\n prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta);\n prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, symbolMeta.boundingLength, symbolMeta.pxSign, symbolPatternSize, opt, symbolMeta);\n prepareLineWidth(itemModel, symbolMeta.symbolScale, rotation, opt, symbolMeta);\n var symbolSize = symbolMeta.symbolSize;\n var symbolOffset = normalizeSymbolOffset(itemModel.get('symbolOffset'), symbolSize);\n prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, symbolMeta.valueLineWidth, symbolMeta.boundingLength, symbolMeta.repeatCutLength, opt, symbolMeta);\n return symbolMeta;\n}\n// bar length can be negative.\nfunction prepareBarLength(itemModel, symbolRepeat, layout, opt, outputSymbolMeta) {\n var valueDim = opt.valueDim;\n var symbolBoundingData = itemModel.get('symbolBoundingData');\n var valueAxis = opt.coordSys.getOtherAxis(opt.coordSys.getBaseAxis());\n var zeroPx = valueAxis.toGlobalCoord(valueAxis.dataToCoord(0));\n var pxSignIdx = 1 - +(layout[valueDim.wh] <= 0);\n var boundingLength;\n if (zrUtil.isArray(symbolBoundingData)) {\n var symbolBoundingExtent = [convertToCoordOnAxis(valueAxis, symbolBoundingData[0]) - zeroPx, convertToCoordOnAxis(valueAxis, symbolBoundingData[1]) - zeroPx];\n symbolBoundingExtent[1] < symbolBoundingExtent[0] && symbolBoundingExtent.reverse();\n boundingLength = symbolBoundingExtent[pxSignIdx];\n } else if (symbolBoundingData != null) {\n boundingLength = convertToCoordOnAxis(valueAxis, symbolBoundingData) - zeroPx;\n } else if (symbolRepeat) {\n boundingLength = opt.coordSysExtent[valueDim.index][pxSignIdx] - zeroPx;\n } else {\n boundingLength = layout[valueDim.wh];\n }\n outputSymbolMeta.boundingLength = boundingLength;\n if (symbolRepeat) {\n outputSymbolMeta.repeatCutLength = layout[valueDim.wh];\n }\n // if 'pxSign' means sign of pixel, it can't be zero, or symbolScale will be zero\n // and when borderWidth be settled, the actual linewidth will be NaN\n outputSymbolMeta.pxSign = boundingLength > 0 ? 1 : -1;\n}\nfunction convertToCoordOnAxis(axis, value) {\n return axis.toGlobalCoord(axis.dataToCoord(axis.scale.parse(value)));\n}\n// Support ['100%', '100%']\nfunction prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, boundingLength, pxSign, symbolPatternSize, opt, outputSymbolMeta) {\n var valueDim = opt.valueDim;\n var categoryDim = opt.categoryDim;\n var categorySize = Math.abs(layout[categoryDim.wh]);\n var symbolSize = data.getItemVisual(dataIndex, 'symbolSize');\n var parsedSymbolSize;\n if (zrUtil.isArray(symbolSize)) {\n parsedSymbolSize = symbolSize.slice();\n } else {\n if (symbolSize == null) {\n // will parse to number below\n parsedSymbolSize = ['100%', '100%'];\n } else {\n parsedSymbolSize = [symbolSize, symbolSize];\n }\n }\n // Note: percentage symbolSize (like '100%') do not consider lineWidth, because it is\n // to complicated to calculate real percent value if considering scaled lineWidth.\n // So the actual size will bigger than layout size if lineWidth is bigger than zero,\n // which can be tolerated in pictorial chart.\n parsedSymbolSize[categoryDim.index] = parsePercent(parsedSymbolSize[categoryDim.index], categorySize);\n parsedSymbolSize[valueDim.index] = parsePercent(parsedSymbolSize[valueDim.index], symbolRepeat ? categorySize : Math.abs(boundingLength));\n outputSymbolMeta.symbolSize = parsedSymbolSize;\n // If x or y is less than zero, show reversed shape.\n var symbolScale = outputSymbolMeta.symbolScale = [parsedSymbolSize[0] / symbolPatternSize, parsedSymbolSize[1] / symbolPatternSize];\n // Follow convention, 'right' and 'top' is the normal scale.\n symbolScale[valueDim.index] *= (opt.isHorizontal ? -1 : 1) * pxSign;\n}\nfunction prepareLineWidth(itemModel, symbolScale, rotation, opt, outputSymbolMeta) {\n // In symbols are drawn with scale, so do not need to care about the case that width\n // or height are too small. But symbol use strokeNoScale, where acture lineWidth should\n // be calculated.\n var valueLineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0;\n if (valueLineWidth) {\n pathForLineWidth.attr({\n scaleX: symbolScale[0],\n scaleY: symbolScale[1],\n rotation: rotation\n });\n pathForLineWidth.updateTransform();\n valueLineWidth /= pathForLineWidth.getLineScale();\n valueLineWidth *= symbolScale[opt.valueDim.index];\n }\n outputSymbolMeta.valueLineWidth = valueLineWidth || 0;\n}\nfunction prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, valueLineWidth, boundingLength, repeatCutLength, opt, outputSymbolMeta) {\n var categoryDim = opt.categoryDim;\n var valueDim = opt.valueDim;\n var pxSign = outputSymbolMeta.pxSign;\n var unitLength = Math.max(symbolSize[valueDim.index] + valueLineWidth, 0);\n var pathLen = unitLength;\n // Note: rotation will not effect the layout of symbols, because user may\n // want symbols to rotate on its center, which should not be translated\n // when rotating.\n if (symbolRepeat) {\n var absBoundingLength = Math.abs(boundingLength);\n var symbolMargin = zrUtil.retrieve(itemModel.get('symbolMargin'), '15%') + '';\n var hasEndGap = false;\n if (symbolMargin.lastIndexOf('!') === symbolMargin.length - 1) {\n hasEndGap = true;\n symbolMargin = symbolMargin.slice(0, symbolMargin.length - 1);\n }\n var symbolMarginNumeric = parsePercent(symbolMargin, symbolSize[valueDim.index]);\n var uLenWithMargin = Math.max(unitLength + symbolMarginNumeric * 2, 0);\n // When symbol margin is less than 0, margin at both ends will be subtracted\n // to ensure that all of the symbols will not be overflow the given area.\n var endFix = hasEndGap ? 0 : symbolMarginNumeric * 2;\n // Both final repeatTimes and final symbolMarginNumeric area calculated based on\n // boundingLength.\n var repeatSpecified = isNumeric(symbolRepeat);\n var repeatTimes = repeatSpecified ? symbolRepeat : toIntTimes((absBoundingLength + endFix) / uLenWithMargin);\n // Adjust calculate margin, to ensure each symbol is displayed\n // entirely in the given layout area.\n var mDiff = absBoundingLength - repeatTimes * unitLength;\n symbolMarginNumeric = mDiff / 2 / (hasEndGap ? repeatTimes : Math.max(repeatTimes - 1, 1));\n uLenWithMargin = unitLength + symbolMarginNumeric * 2;\n endFix = hasEndGap ? 0 : symbolMarginNumeric * 2;\n // Update repeatTimes when not all symbol will be shown.\n if (!repeatSpecified && symbolRepeat !== 'fixed') {\n repeatTimes = repeatCutLength ? toIntTimes((Math.abs(repeatCutLength) + endFix) / uLenWithMargin) : 0;\n }\n pathLen = repeatTimes * uLenWithMargin - endFix;\n outputSymbolMeta.repeatTimes = repeatTimes;\n outputSymbolMeta.symbolMargin = symbolMarginNumeric;\n }\n var sizeFix = pxSign * (pathLen / 2);\n var pathPosition = outputSymbolMeta.pathPosition = [];\n pathPosition[categoryDim.index] = layout[categoryDim.wh] / 2;\n pathPosition[valueDim.index] = symbolPosition === 'start' ? sizeFix : symbolPosition === 'end' ? boundingLength - sizeFix : boundingLength / 2; // 'center'\n if (symbolOffset) {\n pathPosition[0] += symbolOffset[0];\n pathPosition[1] += symbolOffset[1];\n }\n var bundlePosition = outputSymbolMeta.bundlePosition = [];\n bundlePosition[categoryDim.index] = layout[categoryDim.xy];\n bundlePosition[valueDim.index] = layout[valueDim.xy];\n var barRectShape = outputSymbolMeta.barRectShape = zrUtil.extend({}, layout);\n barRectShape[valueDim.wh] = pxSign * Math.max(Math.abs(layout[valueDim.wh]), Math.abs(pathPosition[valueDim.index] + sizeFix));\n barRectShape[categoryDim.wh] = layout[categoryDim.wh];\n var clipShape = outputSymbolMeta.clipShape = {};\n // Consider that symbol may be overflow layout rect.\n clipShape[categoryDim.xy] = -layout[categoryDim.xy];\n clipShape[categoryDim.wh] = opt.ecSize[categoryDim.wh];\n clipShape[valueDim.xy] = 0;\n clipShape[valueDim.wh] = layout[valueDim.wh];\n}\nfunction createPath(symbolMeta) {\n var symbolPatternSize = symbolMeta.symbolPatternSize;\n var path = createSymbol(\n // Consider texture img, make a big size.\n symbolMeta.symbolType, -symbolPatternSize / 2, -symbolPatternSize / 2, symbolPatternSize, symbolPatternSize);\n path.attr({\n culling: true\n });\n path.type !== 'image' && path.setStyle({\n strokeNoScale: true\n });\n return path;\n}\nfunction createOrUpdateRepeatSymbols(bar, opt, symbolMeta, isUpdate) {\n var bundle = bar.__pictorialBundle;\n var symbolSize = symbolMeta.symbolSize;\n var valueLineWidth = symbolMeta.valueLineWidth;\n var pathPosition = symbolMeta.pathPosition;\n var valueDim = opt.valueDim;\n var repeatTimes = symbolMeta.repeatTimes || 0;\n var index = 0;\n var unit = symbolSize[opt.valueDim.index] + valueLineWidth + symbolMeta.symbolMargin * 2;\n eachPath(bar, function (path) {\n path.__pictorialAnimationIndex = index;\n path.__pictorialRepeatTimes = repeatTimes;\n if (index < repeatTimes) {\n updateAttr(path, null, makeTarget(index), symbolMeta, isUpdate);\n } else {\n updateAttr(path, null, {\n scaleX: 0,\n scaleY: 0\n }, symbolMeta, isUpdate, function () {\n bundle.remove(path);\n });\n }\n // updateHoverAnimation(path, symbolMeta);\n index++;\n });\n for (; index < repeatTimes; index++) {\n var path = createPath(symbolMeta);\n path.__pictorialAnimationIndex = index;\n path.__pictorialRepeatTimes = repeatTimes;\n bundle.add(path);\n var target = makeTarget(index);\n updateAttr(path, {\n x: target.x,\n y: target.y,\n scaleX: 0,\n scaleY: 0\n }, {\n scaleX: target.scaleX,\n scaleY: target.scaleY,\n rotation: target.rotation\n }, symbolMeta, isUpdate);\n }\n function makeTarget(index) {\n var position = pathPosition.slice();\n // (start && pxSign > 0) || (end && pxSign < 0): i = repeatTimes - index\n // Otherwise: i = index;\n var pxSign = symbolMeta.pxSign;\n var i = index;\n if (symbolMeta.symbolRepeatDirection === 'start' ? pxSign > 0 : pxSign < 0) {\n i = repeatTimes - 1 - index;\n }\n position[valueDim.index] = unit * (i - repeatTimes / 2 + 0.5) + pathPosition[valueDim.index];\n return {\n x: position[0],\n y: position[1],\n scaleX: symbolMeta.symbolScale[0],\n scaleY: symbolMeta.symbolScale[1],\n rotation: symbolMeta.rotation\n };\n }\n}\nfunction createOrUpdateSingleSymbol(bar, opt, symbolMeta, isUpdate) {\n var bundle = bar.__pictorialBundle;\n var mainPath = bar.__pictorialMainPath;\n if (!mainPath) {\n mainPath = bar.__pictorialMainPath = createPath(symbolMeta);\n bundle.add(mainPath);\n updateAttr(mainPath, {\n x: symbolMeta.pathPosition[0],\n y: symbolMeta.pathPosition[1],\n scaleX: 0,\n scaleY: 0,\n rotation: symbolMeta.rotation\n }, {\n scaleX: symbolMeta.symbolScale[0],\n scaleY: symbolMeta.symbolScale[1]\n }, symbolMeta, isUpdate);\n } else {\n updateAttr(mainPath, null, {\n x: symbolMeta.pathPosition[0],\n y: symbolMeta.pathPosition[1],\n scaleX: symbolMeta.symbolScale[0],\n scaleY: symbolMeta.symbolScale[1],\n rotation: symbolMeta.rotation\n }, symbolMeta, isUpdate);\n }\n}\n// bar rect is used for label.\nfunction createOrUpdateBarRect(bar, symbolMeta, isUpdate) {\n var rectShape = zrUtil.extend({}, symbolMeta.barRectShape);\n var barRect = bar.__pictorialBarRect;\n if (!barRect) {\n barRect = bar.__pictorialBarRect = new graphic.Rect({\n z2: 2,\n shape: rectShape,\n silent: true,\n style: {\n stroke: 'transparent',\n fill: 'transparent',\n lineWidth: 0\n }\n });\n barRect.disableMorphing = true;\n bar.add(barRect);\n } else {\n updateAttr(barRect, null, {\n shape: rectShape\n }, symbolMeta, isUpdate);\n }\n}\nfunction createOrUpdateClip(bar, opt, symbolMeta, isUpdate) {\n // If not clip, symbol will be remove and rebuilt.\n if (symbolMeta.symbolClip) {\n var clipPath = bar.__pictorialClipPath;\n var clipShape = zrUtil.extend({}, symbolMeta.clipShape);\n var valueDim = opt.valueDim;\n var animationModel = symbolMeta.animationModel;\n var dataIndex = symbolMeta.dataIndex;\n if (clipPath) {\n graphic.updateProps(clipPath, {\n shape: clipShape\n }, animationModel, dataIndex);\n } else {\n clipShape[valueDim.wh] = 0;\n clipPath = new graphic.Rect({\n shape: clipShape\n });\n bar.__pictorialBundle.setClipPath(clipPath);\n bar.__pictorialClipPath = clipPath;\n var target = {};\n target[valueDim.wh] = symbolMeta.clipShape[valueDim.wh];\n graphic[isUpdate ? 'updateProps' : 'initProps'](clipPath, {\n shape: target\n }, animationModel, dataIndex);\n }\n }\n}\nfunction getItemModel(data, dataIndex) {\n var itemModel = data.getItemModel(dataIndex);\n itemModel.getAnimationDelayParams = getAnimationDelayParams;\n itemModel.isAnimationEnabled = isAnimationEnabled;\n return itemModel;\n}\nfunction getAnimationDelayParams(path) {\n // The order is the same as the z-order, see `symbolRepeatDiretion`.\n return {\n index: path.__pictorialAnimationIndex,\n count: path.__pictorialRepeatTimes\n };\n}\nfunction isAnimationEnabled() {\n // `animation` prop can be set on itemModel in pictorial bar chart.\n return this.parentModel.isAnimationEnabled() && !!this.getShallow('animation');\n}\nfunction createBar(data, opt, symbolMeta, isUpdate) {\n // bar is the main element for each data.\n var bar = new graphic.Group();\n // bundle is used for location and clip.\n var bundle = new graphic.Group();\n bar.add(bundle);\n bar.__pictorialBundle = bundle;\n bundle.x = symbolMeta.bundlePosition[0];\n bundle.y = symbolMeta.bundlePosition[1];\n if (symbolMeta.symbolRepeat) {\n createOrUpdateRepeatSymbols(bar, opt, symbolMeta);\n } else {\n createOrUpdateSingleSymbol(bar, opt, symbolMeta);\n }\n createOrUpdateBarRect(bar, symbolMeta, isUpdate);\n createOrUpdateClip(bar, opt, symbolMeta, isUpdate);\n bar.__pictorialShapeStr = getShapeStr(data, symbolMeta);\n bar.__pictorialSymbolMeta = symbolMeta;\n return bar;\n}\nfunction updateBar(bar, opt, symbolMeta) {\n var animationModel = symbolMeta.animationModel;\n var dataIndex = symbolMeta.dataIndex;\n var bundle = bar.__pictorialBundle;\n graphic.updateProps(bundle, {\n x: symbolMeta.bundlePosition[0],\n y: symbolMeta.bundlePosition[1]\n }, animationModel, dataIndex);\n if (symbolMeta.symbolRepeat) {\n createOrUpdateRepeatSymbols(bar, opt, symbolMeta, true);\n } else {\n createOrUpdateSingleSymbol(bar, opt, symbolMeta, true);\n }\n createOrUpdateBarRect(bar, symbolMeta, true);\n createOrUpdateClip(bar, opt, symbolMeta, true);\n}\nfunction removeBar(data, dataIndex, animationModel, bar) {\n // Not show text when animating\n var labelRect = bar.__pictorialBarRect;\n labelRect && labelRect.removeTextContent();\n var paths = [];\n eachPath(bar, function (path) {\n paths.push(path);\n });\n bar.__pictorialMainPath && paths.push(bar.__pictorialMainPath);\n // I do not find proper remove animation for clip yet.\n bar.__pictorialClipPath && (animationModel = null);\n zrUtil.each(paths, function (path) {\n graphic.removeElement(path, {\n scaleX: 0,\n scaleY: 0\n }, animationModel, dataIndex, function () {\n bar.parent && bar.parent.remove(bar);\n });\n });\n data.setItemGraphicEl(dataIndex, null);\n}\nfunction getShapeStr(data, symbolMeta) {\n return [data.getItemVisual(symbolMeta.dataIndex, 'symbol') || 'none', !!symbolMeta.symbolRepeat, !!symbolMeta.symbolClip].join(':');\n}\nfunction eachPath(bar, cb, context) {\n // Do not use Group#eachChild, because it do not support remove.\n zrUtil.each(bar.__pictorialBundle.children(), function (el) {\n el !== bar.__pictorialBarRect && cb.call(context, el);\n });\n}\nfunction updateAttr(el, immediateAttrs, animationAttrs, symbolMeta, isUpdate, cb) {\n immediateAttrs && el.attr(immediateAttrs);\n // when symbolCip used, only clip path has init animation, otherwise it would be weird effect.\n if (symbolMeta.symbolClip && !isUpdate) {\n animationAttrs && el.attr(animationAttrs);\n } else {\n animationAttrs && graphic[isUpdate ? 'updateProps' : 'initProps'](el, animationAttrs, symbolMeta.animationModel, symbolMeta.dataIndex, cb);\n }\n}\nfunction updateCommon(bar, opt, symbolMeta) {\n var dataIndex = symbolMeta.dataIndex;\n var itemModel = symbolMeta.itemModel;\n // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n var emphasisModel = itemModel.getModel('emphasis');\n var emphasisStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n var blurStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n var selectStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n var cursorStyle = itemModel.getShallow('cursor');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var hoverScale = emphasisModel.get('scale');\n eachPath(bar, function (path) {\n if (path instanceof ZRImage) {\n var pathStyle = path.style;\n path.useStyle(zrUtil.extend({\n // TODO other properties like dx, dy ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolMeta.style));\n } else {\n path.useStyle(symbolMeta.style);\n }\n var emphasisState = path.ensureState('emphasis');\n emphasisState.style = emphasisStyle;\n if (hoverScale) {\n // NOTE: Must after scale is set after updateAttr\n emphasisState.scaleX = path.scaleX * 1.1;\n emphasisState.scaleY = path.scaleY * 1.1;\n }\n path.ensureState('blur').style = blurStyle;\n path.ensureState('select').style = selectStyle;\n cursorStyle && (path.cursor = cursorStyle);\n path.z2 = symbolMeta.z2;\n });\n var barPositionOutside = opt.valueDim.posDesc[+(symbolMeta.boundingLength > 0)];\n var barRect = bar.__pictorialBarRect;\n barRect.ignoreClip = true;\n setLabelStyle(barRect, getLabelStatesModels(itemModel), {\n labelFetcher: opt.seriesModel,\n labelDataIndex: dataIndex,\n defaultText: getDefaultLabel(opt.seriesModel.getData(), dataIndex),\n inheritColor: symbolMeta.style.fill,\n defaultOpacity: symbolMeta.style.opacity,\n defaultOutsidePosition: barPositionOutside\n });\n toggleHoverEmphasis(bar, focus, blurScope, emphasisModel.get('disabled'));\n}\nfunction toIntTimes(times) {\n var roundedTimes = Math.round(times);\n // Escapse accurate error\n return Math.abs(times - roundedTimes) < 1e-4 ? roundedTimes : Math.ceil(times);\n}\nexport default PictorialBarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseBarSeriesModel from './BaseBarSeries.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar PictorialBarSeriesModel = /** @class */function (_super) {\n __extends(PictorialBarSeriesModel, _super);\n function PictorialBarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PictorialBarSeriesModel.type;\n _this.hasSymbolVisual = true;\n _this.defaultSymbol = 'roundRect';\n return _this;\n }\n PictorialBarSeriesModel.prototype.getInitialData = function (option) {\n // Disable stack.\n option.stack = null;\n return _super.prototype.getInitialData.apply(this, arguments);\n };\n PictorialBarSeriesModel.type = 'series.pictorialBar';\n PictorialBarSeriesModel.dependencies = ['grid'];\n PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeriesModel.defaultOption, {\n symbol: 'circle',\n symbolSize: null,\n symbolRotate: null,\n symbolPosition: null,\n symbolOffset: null,\n symbolMargin: null,\n symbolRepeat: false,\n symbolRepeatDirection: 'end',\n symbolClip: false,\n symbolBoundingData: null,\n symbolPatternSize: 400,\n barGap: '-100%',\n // Pictorial bar do not clip by default because in many cases\n // xAxis and yAxis are not displayed and it's expected not to clip\n clip: false,\n // z can be set in data item, which is z2 actually.\n // Disable progressive\n progressive: 0,\n emphasis: {\n // By default pictorialBar do not hover scale. Hover scale is not suitable\n // for the case that both has foreground and background.\n scale: false\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n });\n return PictorialBarSeriesModel;\n}(BaseBarSeriesModel);\nexport default PictorialBarSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport PictorialBarView from './PictorialBarView.js';\nimport PictorialBarSeriesModel from './PictorialBarSeries.js';\nimport { createProgressiveLayout, layout } from '../../layout/barGrid.js';\nimport { curry } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n registers.registerChartView(PictorialBarView);\n registers.registerSeriesModel(PictorialBarSeriesModel);\n registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout, 'pictorialBar'));\n // Do layout after other overall layout, which can prepare some information.\n registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('pictorialBar'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { ECPolygon } from '../line/poly.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { bind } from 'zrender/lib/core/util.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport ChartView from '../../view/Chart.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar ThemeRiverView = /** @class */function (_super) {\n __extends(ThemeRiverView, _super);\n function ThemeRiverView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ThemeRiverView.type;\n _this._layers = [];\n return _this;\n }\n ThemeRiverView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var self = this;\n var group = this.group;\n var layersSeries = seriesModel.getLayerSeries();\n var layoutInfo = data.getLayout('layoutInfo');\n var rect = layoutInfo.rect;\n var boundaryGap = layoutInfo.boundaryGap;\n group.x = 0;\n group.y = rect.y + boundaryGap[0];\n function keyGetter(item) {\n return item.name;\n }\n var dataDiffer = new DataDiffer(this._layersSeries || [], layersSeries, keyGetter, keyGetter);\n var newLayersGroups = [];\n dataDiffer.add(bind(process, this, 'add')).update(bind(process, this, 'update')).remove(bind(process, this, 'remove')).execute();\n function process(status, idx, oldIdx) {\n var oldLayersGroups = self._layers;\n if (status === 'remove') {\n group.remove(oldLayersGroups[idx]);\n return;\n }\n var points0 = [];\n var points1 = [];\n var style;\n var indices = layersSeries[idx].indices;\n var j = 0;\n for (; j < indices.length; j++) {\n var layout = data.getItemLayout(indices[j]);\n var x = layout.x;\n var y0 = layout.y0;\n var y = layout.y;\n points0.push(x, y0);\n points1.push(x, y0 + y);\n style = data.getItemVisual(indices[j], 'style');\n }\n var polygon;\n var textLayout = data.getItemLayout(indices[0]);\n var labelModel = seriesModel.getModel('label');\n var margin = labelModel.get('margin');\n var emphasisModel = seriesModel.getModel('emphasis');\n if (status === 'add') {\n var layerGroup = newLayersGroups[idx] = new graphic.Group();\n polygon = new ECPolygon({\n shape: {\n points: points0,\n stackedOnPoints: points1,\n smooth: 0.4,\n stackedOnSmooth: 0.4,\n smoothConstraint: false\n },\n z2: 0\n });\n layerGroup.add(polygon);\n group.add(layerGroup);\n if (seriesModel.isAnimationEnabled()) {\n polygon.setClipPath(createGridClipShape(polygon.getBoundingRect(), seriesModel, function () {\n polygon.removeClipPath();\n }));\n }\n } else {\n var layerGroup = oldLayersGroups[oldIdx];\n polygon = layerGroup.childAt(0);\n group.add(layerGroup);\n newLayersGroups[idx] = layerGroup;\n graphic.updateProps(polygon, {\n shape: {\n points: points0,\n stackedOnPoints: points1\n }\n }, seriesModel);\n saveOldStyle(polygon);\n }\n setLabelStyle(polygon, getLabelStatesModels(seriesModel), {\n labelDataIndex: indices[j - 1],\n defaultText: data.getName(indices[j - 1]),\n inheritColor: style.fill\n }, {\n normal: {\n verticalAlign: 'middle'\n // align: 'right'\n }\n });\n\n polygon.setTextConfig({\n position: null,\n local: true\n });\n var labelEl = polygon.getTextContent();\n // TODO More label position options.\n if (labelEl) {\n labelEl.x = textLayout.x - margin;\n labelEl.y = textLayout.y0 + textLayout.y / 2;\n }\n polygon.useStyle(style);\n data.setItemGraphicEl(idx, polygon);\n setStatesStylesFromModel(polygon, seriesModel);\n toggleHoverEmphasis(polygon, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n }\n this._layersSeries = layersSeries;\n this._layers = newLayersGroups;\n };\n ThemeRiverView.type = 'themeRiver';\n return ThemeRiverView;\n}(ChartView);\n;\n// add animation to the view\nfunction createGridClipShape(rect, seriesModel, cb) {\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x - 10,\n y: rect.y - 10,\n width: 0,\n height: rect.height + 20\n }\n });\n graphic.initProps(rectEl, {\n shape: {\n x: rect.x - 50,\n width: rect.width + 100,\n height: rect.height + 20\n }\n }, seriesModel, cb);\n return rectEl;\n}\nexport default ThemeRiverView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport { getDimensionTypeByAxis } from '../../data/helper/dimensionHelper.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { groupData, SINGLE_REFERRING } from '../../util/model.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nvar DATA_NAME_INDEX = 2;\nvar ThemeRiverSeriesModel = /** @class */function (_super) {\n __extends(ThemeRiverSeriesModel, _super);\n function ThemeRiverSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ThemeRiverSeriesModel.type;\n return _this;\n }\n /**\n * @override\n */\n ThemeRiverSeriesModel.prototype.init = function (option) {\n // eslint-disable-next-line\n _super.prototype.init.apply(this, arguments);\n // Put this function here is for the sake of consistency of code style.\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n };\n /**\n * If there is no value of a certain point in the time for some event,set it value to 0.\n *\n * @param {Array} data initial data in the option\n * @return {Array}\n */\n ThemeRiverSeriesModel.prototype.fixData = function (data) {\n var rawDataLength = data.length;\n /**\n * Make sure every layer data get the same keys.\n * The value index tells which layer has visited.\n * {\n * 2014/01/01: -1\n * }\n */\n var timeValueKeys = {};\n // grouped data by name\n var groupResult = groupData(data, function (item) {\n if (!timeValueKeys.hasOwnProperty(item[0] + '')) {\n timeValueKeys[item[0] + ''] = -1;\n }\n return item[2];\n });\n var layerData = [];\n groupResult.buckets.each(function (items, key) {\n layerData.push({\n name: key,\n dataList: items\n });\n });\n var layerNum = layerData.length;\n for (var k = 0; k < layerNum; ++k) {\n var name_1 = layerData[k].name;\n for (var j = 0; j < layerData[k].dataList.length; ++j) {\n var timeValue = layerData[k].dataList[j][0] + '';\n timeValueKeys[timeValue] = k;\n }\n for (var timeValue in timeValueKeys) {\n if (timeValueKeys.hasOwnProperty(timeValue) && timeValueKeys[timeValue] !== k) {\n timeValueKeys[timeValue] = k;\n data[rawDataLength] = [timeValue, 0, name_1];\n rawDataLength++;\n }\n }\n }\n return data;\n };\n /**\n * @override\n * @param option the initial option that user gave\n * @param ecModel the model object for themeRiver option\n */\n ThemeRiverSeriesModel.prototype.getInitialData = function (option, ecModel) {\n var singleAxisModel = this.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0];\n var axisType = singleAxisModel.get('type');\n // filter the data item with the value of label is undefined\n var filterData = zrUtil.filter(option.data, function (dataItem) {\n return dataItem[2] !== undefined;\n });\n // ??? TODO design a stage to transfer data for themeRiver and lines?\n var data = this.fixData(filterData || []);\n var nameList = [];\n var nameMap = this.nameMap = zrUtil.createHashMap();\n var count = 0;\n for (var i = 0; i < data.length; ++i) {\n nameList.push(data[i][DATA_NAME_INDEX]);\n if (!nameMap.get(data[i][DATA_NAME_INDEX])) {\n nameMap.set(data[i][DATA_NAME_INDEX], count);\n count++;\n }\n }\n var dimensions = prepareSeriesDataSchema(data, {\n coordDimensions: ['single'],\n dimensionsDefine: [{\n name: 'time',\n type: getDimensionTypeByAxis(axisType)\n }, {\n name: 'value',\n type: 'float'\n }, {\n name: 'name',\n type: 'ordinal'\n }],\n encodeDefine: {\n single: 0,\n value: 1,\n itemName: 2\n }\n }).dimensions;\n var list = new SeriesData(dimensions, this);\n list.initData(data);\n return list;\n };\n /**\n * The raw data is divided into multiple layers and each layer\n * has same name.\n */\n ThemeRiverSeriesModel.prototype.getLayerSeries = function () {\n var data = this.getData();\n var lenCount = data.count();\n var indexArr = [];\n for (var i = 0; i < lenCount; ++i) {\n indexArr[i] = i;\n }\n var timeDim = data.mapDimension('single');\n // data group by name\n var groupResult = groupData(indexArr, function (index) {\n return data.get('name', index);\n });\n var layerSeries = [];\n groupResult.buckets.each(function (items, key) {\n items.sort(function (index1, index2) {\n return data.get(timeDim, index1) - data.get(timeDim, index2);\n });\n layerSeries.push({\n name: key,\n indices: items\n });\n });\n return layerSeries;\n };\n /**\n * Get data indices for show tooltip content\n */\n ThemeRiverSeriesModel.prototype.getAxisTooltipData = function (dim, value, baseAxis) {\n if (!zrUtil.isArray(dim)) {\n dim = dim ? [dim] : [];\n }\n var data = this.getData();\n var layerSeries = this.getLayerSeries();\n var indices = [];\n var layerNum = layerSeries.length;\n var nestestValue;\n for (var i = 0; i < layerNum; ++i) {\n var minDist = Number.MAX_VALUE;\n var nearestIdx = -1;\n var pointNum = layerSeries[i].indices.length;\n for (var j = 0; j < pointNum; ++j) {\n var theValue = data.get(dim[0], layerSeries[i].indices[j]);\n var dist = Math.abs(theValue - value);\n if (dist <= minDist) {\n nestestValue = theValue;\n minDist = dist;\n nearestIdx = layerSeries[i].indices[j];\n }\n }\n indices.push(nearestIdx);\n }\n return {\n dataIndices: indices,\n nestestValue: nestestValue\n };\n };\n ThemeRiverSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var name = data.getName(dataIndex);\n var value = data.get(data.mapDimension('value'), dataIndex);\n return createTooltipMarkup('nameValue', {\n name: name,\n value: value\n });\n };\n ThemeRiverSeriesModel.type = 'series.themeRiver';\n ThemeRiverSeriesModel.dependencies = ['singleAxis'];\n ThemeRiverSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n colorBy: 'data',\n coordinateSystem: 'singleAxis',\n // gap in axis's orthogonal orientation\n boundaryGap: ['10%', '10%'],\n // legendHoverLink: true,\n singleAxisIndex: 0,\n animationEasing: 'linear',\n label: {\n margin: 4,\n show: true,\n position: 'left',\n fontSize: 11\n },\n emphasis: {\n label: {\n show: true\n }\n }\n };\n return ThemeRiverSeriesModel;\n}(SeriesModel);\nexport default ThemeRiverSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as numberUtil from '../../util/number.js';\nexport default function themeRiverLayout(ecModel, api) {\n ecModel.eachSeriesByType('themeRiver', function (seriesModel) {\n var data = seriesModel.getData();\n var single = seriesModel.coordinateSystem;\n var layoutInfo = {};\n // use the axis boundingRect for view\n var rect = single.getRect();\n layoutInfo.rect = rect;\n var boundaryGap = seriesModel.get('boundaryGap');\n var axis = single.getAxis();\n layoutInfo.boundaryGap = boundaryGap;\n if (axis.orient === 'horizontal') {\n boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], rect.height);\n boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], rect.height);\n var height = rect.height - boundaryGap[0] - boundaryGap[1];\n doThemeRiverLayout(data, seriesModel, height);\n } else {\n boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], rect.width);\n boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], rect.width);\n var width = rect.width - boundaryGap[0] - boundaryGap[1];\n doThemeRiverLayout(data, seriesModel, width);\n }\n data.setLayout('layoutInfo', layoutInfo);\n });\n}\n/**\n * The layout information about themeriver\n *\n * @param data data in the series\n * @param seriesModel the model object of themeRiver series\n * @param height value used to compute every series height\n */\nfunction doThemeRiverLayout(data, seriesModel, height) {\n if (!data.count()) {\n return;\n }\n var coordSys = seriesModel.coordinateSystem;\n // the data in each layer are organized into a series.\n var layerSeries = seriesModel.getLayerSeries();\n // the points in each layer.\n var timeDim = data.mapDimension('single');\n var valueDim = data.mapDimension('value');\n var layerPoints = zrUtil.map(layerSeries, function (singleLayer) {\n return zrUtil.map(singleLayer.indices, function (idx) {\n var pt = coordSys.dataToPoint(data.get(timeDim, idx));\n pt[1] = data.get(valueDim, idx);\n return pt;\n });\n });\n var base = computeBaseline(layerPoints);\n var baseLine = base.y0;\n var ky = height / base.max;\n // set layout information for each item.\n var n = layerSeries.length;\n var m = layerSeries[0].indices.length;\n var baseY0;\n for (var j = 0; j < m; ++j) {\n baseY0 = baseLine[j] * ky;\n data.setItemLayout(layerSeries[0].indices[j], {\n layerIndex: 0,\n x: layerPoints[0][j][0],\n y0: baseY0,\n y: layerPoints[0][j][1] * ky\n });\n for (var i = 1; i < n; ++i) {\n baseY0 += layerPoints[i - 1][j][1] * ky;\n data.setItemLayout(layerSeries[i].indices[j], {\n layerIndex: i,\n x: layerPoints[i][j][0],\n y0: baseY0,\n y: layerPoints[i][j][1] * ky\n });\n }\n }\n}\n/**\n * Compute the baseLine of the rawdata\n * Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics\n *\n * @param data the points in each layer\n */\nfunction computeBaseline(data) {\n var layerNum = data.length;\n var pointNum = data[0].length;\n var sums = [];\n var y0 = [];\n var max = 0;\n for (var i = 0; i < pointNum; ++i) {\n var temp = 0;\n for (var j = 0; j < layerNum; ++j) {\n temp += data[j][i][1];\n }\n if (temp > max) {\n max = temp;\n }\n sums.push(temp);\n }\n for (var k = 0; k < pointNum; ++k) {\n y0[k] = (max - sums[k]) / 2;\n }\n max = 0;\n for (var l = 0; l < pointNum; ++l) {\n var sum = sums[l] + y0[l];\n if (sum > max) {\n max = sum;\n }\n }\n return {\n y0: y0,\n max: max\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport ThemeRiverView from './ThemeRiverView.js';\nimport ThemeRiverSeriesModel from './ThemeRiverSeries.js';\nimport themeRiverLayout from './themeRiverLayout.js';\nimport dataFilter from '../../processor/dataFilter.js';\nexport function install(registers) {\n registers.registerChartView(ThemeRiverView);\n registers.registerSeriesModel(ThemeRiverSeriesModel);\n registers.registerLayout(themeRiverLayout);\n registers.registerProcessor(dataFilter('themeRiver'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, SPECIAL_STATES, DISPLAY_STATES } from '../../util/states.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { normalizeRadian } from 'zrender/lib/contain/util.js';\nimport { isRadianAroundZero } from '../../util/number.js';\nvar DEFAULT_SECTOR_Z = 2;\nvar DEFAULT_TEXT_Z = 4;\n/**\n * Sunburstce of Sunburst including Sector, Label, LabelLine\n */\nvar SunburstPiece = /** @class */function (_super) {\n __extends(SunburstPiece, _super);\n function SunburstPiece(node, seriesModel, ecModel, api) {\n var _this = _super.call(this) || this;\n _this.z2 = DEFAULT_SECTOR_Z;\n _this.textConfig = {\n inside: true\n };\n getECData(_this).seriesIndex = seriesModel.seriesIndex;\n var text = new graphic.Text({\n z2: DEFAULT_TEXT_Z,\n silent: node.getModel().get(['label', 'silent'])\n });\n _this.setTextContent(text);\n _this.updateData(true, node, seriesModel, ecModel, api);\n return _this;\n }\n SunburstPiece.prototype.updateData = function (firstCreate, node,\n // state: 'emphasis' | 'normal' | 'highlight' | 'downplay',\n seriesModel, ecModel, api) {\n this.node = node;\n node.piece = this;\n seriesModel = seriesModel || this._seriesModel;\n ecModel = ecModel || this._ecModel;\n var sector = this;\n getECData(sector).dataIndex = node.dataIndex;\n var itemModel = node.getModel();\n var emphasisModel = itemModel.getModel('emphasis');\n var layout = node.getLayout();\n var sectorShape = zrUtil.extend({}, layout);\n sectorShape.label = null;\n var normalStyle = node.getVisual('style');\n normalStyle.lineJoin = 'bevel';\n var decal = node.getVisual('decal');\n if (decal) {\n normalStyle.decal = createOrUpdatePatternFromDecal(decal, api);\n }\n var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true);\n zrUtil.extend(sectorShape, cornerRadius);\n zrUtil.each(SPECIAL_STATES, function (stateName) {\n var state = sector.ensureState(stateName);\n var itemStyleModel = itemModel.getModel([stateName, 'itemStyle']);\n state.style = itemStyleModel.getItemStyle();\n // border radius\n var cornerRadius = getSectorCornerRadius(itemStyleModel, sectorShape);\n if (cornerRadius) {\n state.shape = cornerRadius;\n }\n });\n if (firstCreate) {\n sector.setShape(sectorShape);\n sector.shape.r = layout.r0;\n graphic.initProps(sector, {\n shape: {\n r: layout.r\n }\n }, seriesModel, node.dataIndex);\n } else {\n // Disable animation for gradient since no interpolation method\n // is supported for gradient\n graphic.updateProps(sector, {\n shape: sectorShape\n }, seriesModel);\n saveOldStyle(sector);\n }\n sector.useStyle(normalStyle);\n this._updateLabel(seriesModel);\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && sector.attr('cursor', cursorStyle);\n this._seriesModel = seriesModel || this._seriesModel;\n this._ecModel = ecModel || this._ecModel;\n var focus = emphasisModel.get('focus');\n var focusOrIndices = focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : focus;\n toggleHoverEmphasis(this, focusOrIndices, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n };\n SunburstPiece.prototype._updateLabel = function (seriesModel) {\n var _this = this;\n var itemModel = this.node.getModel();\n var normalLabelModel = itemModel.getModel('label');\n var layout = this.node.getLayout();\n var angle = layout.endAngle - layout.startAngle;\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n var sector = this;\n var label = sector.getTextContent();\n var dataIndex = this.node.dataIndex;\n var labelMinAngle = normalLabelModel.get('minAngle') / 180 * Math.PI;\n var isNormalShown = normalLabelModel.get('show') && !(labelMinAngle != null && Math.abs(angle) < labelMinAngle);\n label.ignore = !isNormalShown;\n // TODO use setLabelStyle\n zrUtil.each(DISPLAY_STATES, function (stateName) {\n var labelStateModel = stateName === 'normal' ? itemModel.getModel('label') : itemModel.getModel([stateName, 'label']);\n var isNormal = stateName === 'normal';\n var state = isNormal ? label : label.ensureState(stateName);\n var text = seriesModel.getFormattedLabel(dataIndex, stateName);\n if (isNormal) {\n text = text || _this.node.name;\n }\n state.style = createTextStyle(labelStateModel, {}, null, stateName !== 'normal', true);\n if (text) {\n state.style.text = text;\n }\n // Not displaying text when angle is too small\n var isShown = labelStateModel.get('show');\n if (isShown != null && !isNormal) {\n state.ignore = !isShown;\n }\n var labelPosition = getLabelAttr(labelStateModel, 'position');\n var sectorState = isNormal ? sector : sector.states[stateName];\n var labelColor = sectorState.style.fill;\n sectorState.textConfig = {\n outsideFill: labelStateModel.get('color') === 'inherit' ? labelColor : null,\n inside: labelPosition !== 'outside'\n };\n var r;\n var labelPadding = getLabelAttr(labelStateModel, 'distance') || 0;\n var textAlign = getLabelAttr(labelStateModel, 'align');\n var rotateType = getLabelAttr(labelStateModel, 'rotate');\n var flipStartAngle = Math.PI * 0.5;\n var flipEndAngle = Math.PI * 1.5;\n var midAngleNormal = normalizeRadian(rotateType === 'tangential' ? Math.PI / 2 - midAngle : midAngle);\n // For text that is up-side down, rotate 180 degrees to make sure\n // it's readable\n var needsFlip = midAngleNormal > flipStartAngle && !isRadianAroundZero(midAngleNormal - flipStartAngle) && midAngleNormal < flipEndAngle;\n if (labelPosition === 'outside') {\n r = layout.r + labelPadding;\n textAlign = needsFlip ? 'right' : 'left';\n } else {\n if (!textAlign || textAlign === 'center') {\n // Put label in the center if it's a circle\n if (angle === 2 * Math.PI && layout.r0 === 0) {\n r = 0;\n } else {\n r = (layout.r + layout.r0) / 2;\n }\n textAlign = 'center';\n } else if (textAlign === 'left') {\n r = layout.r0 + labelPadding;\n textAlign = needsFlip ? 'right' : 'left';\n } else if (textAlign === 'right') {\n r = layout.r - labelPadding;\n textAlign = needsFlip ? 'left' : 'right';\n }\n }\n state.style.align = textAlign;\n state.style.verticalAlign = getLabelAttr(labelStateModel, 'verticalAlign') || 'middle';\n state.x = r * dx + layout.cx;\n state.y = r * dy + layout.cy;\n var rotate = 0;\n if (rotateType === 'radial') {\n rotate = normalizeRadian(-midAngle) + (needsFlip ? Math.PI : 0);\n } else if (rotateType === 'tangential') {\n rotate = normalizeRadian(Math.PI / 2 - midAngle) + (needsFlip ? Math.PI : 0);\n } else if (zrUtil.isNumber(rotateType)) {\n rotate = rotateType * Math.PI / 180;\n }\n state.rotation = normalizeRadian(rotate);\n });\n function getLabelAttr(model, name) {\n var stateAttr = model.get(name);\n if (stateAttr == null) {\n return normalLabelModel.get(name);\n }\n return stateAttr;\n }\n label.dirtyStyle();\n };\n return SunburstPiece;\n}(graphic.Sector);\nexport default SunburstPiece;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend } from 'zrender/lib/core/util.js';\nimport { deprecateReplaceLog } from '../../util/log.js';\nimport { retrieveTargetInfo, aboveViewRoot } from '../helper/treeHelper.js';\nexport var ROOT_TO_NODE_ACTION = 'sunburstRootToNode';\nvar HIGHLIGHT_ACTION = 'sunburstHighlight';\nvar UNHIGHLIGHT_ACTION = 'sunburstUnhighlight';\nexport function installSunburstAction(registers) {\n registers.registerAction({\n type: ROOT_TO_NODE_ACTION,\n update: 'updateView'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sunburst',\n query: payload\n }, handleRootToNode);\n function handleRootToNode(model, index) {\n var targetInfo = retrieveTargetInfo(payload, [ROOT_TO_NODE_ACTION], model);\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n if (originViewRoot) {\n payload.direction = aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown';\n }\n model.resetViewRoot(targetInfo.node);\n }\n }\n });\n registers.registerAction({\n type: HIGHLIGHT_ACTION,\n update: 'none'\n }, function (payload, ecModel, api) {\n // Clone\n payload = extend({}, payload);\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sunburst',\n query: payload\n }, handleHighlight);\n function handleHighlight(model) {\n var targetInfo = retrieveTargetInfo(payload, [HIGHLIGHT_ACTION], model);\n if (targetInfo) {\n payload.dataIndex = targetInfo.node.dataIndex;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('sunburstHighlight', 'highlight');\n }\n // Fast forward action\n api.dispatchAction(extend(payload, {\n type: 'highlight'\n }));\n });\n registers.registerAction({\n type: UNHIGHLIGHT_ACTION,\n update: 'updateView'\n }, function (payload, ecModel, api) {\n payload = extend({}, payload);\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('sunburstUnhighlight', 'downplay');\n }\n api.dispatchAction(extend(payload, {\n type: 'downplay'\n }));\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ChartView from '../../view/Chart.js';\nimport SunburstPiece from './SunburstPiece.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport { ROOT_TO_NODE_ACTION } from './sunburstAction.js';\nimport { windowOpen } from '../../util/format.js';\nvar SunburstView = /** @class */function (_super) {\n __extends(SunburstView, _super);\n function SunburstView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SunburstView.type;\n return _this;\n }\n SunburstView.prototype.render = function (seriesModel, ecModel, api,\n // @ts-ignore\n payload) {\n var self = this;\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var data = seriesModel.getData();\n var virtualRoot = data.tree.root;\n var newRoot = seriesModel.getViewRoot();\n var group = this.group;\n var renderLabelForZeroData = seriesModel.get('renderLabelForZeroData');\n var newChildren = [];\n newRoot.eachNode(function (node) {\n newChildren.push(node);\n });\n var oldChildren = this._oldChildren || [];\n dualTravel(newChildren, oldChildren);\n renderRollUp(virtualRoot, newRoot);\n this._initEvents();\n this._oldChildren = newChildren;\n function dualTravel(newChildren, oldChildren) {\n if (newChildren.length === 0 && oldChildren.length === 0) {\n return;\n }\n new DataDiffer(oldChildren, newChildren, getKey, getKey).add(processNode).update(processNode).remove(zrUtil.curry(processNode, null)).execute();\n function getKey(node) {\n return node.getId();\n }\n function processNode(newIdx, oldIdx) {\n var newNode = newIdx == null ? null : newChildren[newIdx];\n var oldNode = oldIdx == null ? null : oldChildren[oldIdx];\n doRenderNode(newNode, oldNode);\n }\n }\n function doRenderNode(newNode, oldNode) {\n if (!renderLabelForZeroData && newNode && !newNode.getValue()) {\n // Not render data with value 0\n newNode = null;\n }\n if (newNode !== virtualRoot && oldNode !== virtualRoot) {\n if (oldNode && oldNode.piece) {\n if (newNode) {\n // Update\n oldNode.piece.updateData(false, newNode, seriesModel, ecModel, api);\n // For tooltip\n data.setItemGraphicEl(newNode.dataIndex, oldNode.piece);\n } else {\n // Remove\n removeNode(oldNode);\n }\n } else if (newNode) {\n // Add\n var piece = new SunburstPiece(newNode, seriesModel, ecModel, api);\n group.add(piece);\n // For tooltip\n data.setItemGraphicEl(newNode.dataIndex, piece);\n }\n }\n }\n function removeNode(node) {\n if (!node) {\n return;\n }\n if (node.piece) {\n group.remove(node.piece);\n node.piece = null;\n }\n }\n function renderRollUp(virtualRoot, viewRoot) {\n if (viewRoot.depth > 0) {\n // Render\n if (self.virtualPiece) {\n // Update\n self.virtualPiece.updateData(false, virtualRoot, seriesModel, ecModel, api);\n } else {\n // Add\n self.virtualPiece = new SunburstPiece(virtualRoot, seriesModel, ecModel, api);\n group.add(self.virtualPiece);\n }\n // TODO event scope\n viewRoot.piece.off('click');\n self.virtualPiece.on('click', function (e) {\n self._rootToNode(viewRoot.parentNode);\n });\n } else if (self.virtualPiece) {\n // Remove\n group.remove(self.virtualPiece);\n self.virtualPiece = null;\n }\n }\n };\n /**\n * @private\n */\n SunburstView.prototype._initEvents = function () {\n var _this = this;\n this.group.off('click');\n this.group.on('click', function (e) {\n var targetFound = false;\n var viewRoot = _this.seriesModel.getViewRoot();\n viewRoot.eachNode(function (node) {\n if (!targetFound && node.piece && node.piece === e.target) {\n var nodeClick = node.getModel().get('nodeClick');\n if (nodeClick === 'rootToNode') {\n _this._rootToNode(node);\n } else if (nodeClick === 'link') {\n var itemModel = node.getModel();\n var link = itemModel.get('link');\n if (link) {\n var linkTarget = itemModel.get('target', true) || '_blank';\n windowOpen(link, linkTarget);\n }\n }\n targetFound = true;\n }\n });\n });\n };\n /**\n * @private\n */\n SunburstView.prototype._rootToNode = function (node) {\n if (node !== this.seriesModel.getViewRoot()) {\n this.api.dispatchAction({\n type: ROOT_TO_NODE_ACTION,\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: node\n });\n }\n };\n /**\n * @implement\n */\n SunburstView.prototype.containPoint = function (point, seriesModel) {\n var treeRoot = seriesModel.getData();\n var itemLayout = treeRoot.getItemLayout(0);\n if (itemLayout) {\n var dx = point[0] - itemLayout.cx;\n var dy = point[1] - itemLayout.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n return radius <= itemLayout.r && radius >= itemLayout.r0;\n }\n };\n SunburstView.type = 'sunburst';\n return SunburstView;\n}(ChartView);\nexport default SunburstView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesModel from '../../model/Series.js';\nimport Tree from '../../data/Tree.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nimport Model from '../../model/Model.js';\nimport enableAriaDecalForTree from '../helper/enableAriaDecalForTree.js';\nvar SunburstSeriesModel = /** @class */function (_super) {\n __extends(SunburstSeriesModel, _super);\n function SunburstSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SunburstSeriesModel.type;\n _this.ignoreStyleOnData = true;\n return _this;\n }\n SunburstSeriesModel.prototype.getInitialData = function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levelModels = this._levelModels = zrUtil.map(option.levels || [], function (levelDefine) {\n return new Model(levelDefine, this, ecModel);\n }, this);\n // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n var tree = Tree.createTree(root, this, beforeLink);\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = levelModels[node.depth];\n levelModel && (model.parentModel = levelModel);\n return model;\n });\n }\n return tree.data;\n };\n SunburstSeriesModel.prototype.optionUpdated = function () {\n this.resetViewRoot();\n };\n /*\n * @override\n */\n SunburstSeriesModel.prototype.getDataParams = function (dataIndex) {\n var params = _super.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n return params;\n };\n SunburstSeriesModel.prototype.getLevelModel = function (node) {\n return this._levelModels && this._levelModels[node.depth];\n };\n SunburstSeriesModel.prototype.getViewRoot = function () {\n return this._viewRoot;\n };\n SunburstSeriesModel.prototype.resetViewRoot = function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n };\n SunburstSeriesModel.prototype.enableAriaDecal = function () {\n enableAriaDecalForTree(this);\n };\n SunburstSeriesModel.type = 'series.sunburst';\n SunburstSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n // 最小角度改为0\n minAngle: 0,\n // If still show when all data zero.\n stillShowZeroSum: true,\n // 'rootToNode', 'link', or false\n nodeClick: 'rootToNode',\n renderLabelForZeroData: false,\n label: {\n // could be: 'radial', 'tangential', or 'none'\n rotate: 'radial',\n show: true,\n opacity: 1,\n // 'left' is for inner side of inside, and 'right' is for outer\n // side for inside\n align: 'center',\n position: 'inside',\n distance: 5,\n silent: true\n },\n itemStyle: {\n borderWidth: 1,\n borderColor: 'white',\n borderType: 'solid',\n shadowBlur: 0,\n shadowColor: 'rgba(0, 0, 0, 0.2)',\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n emphasis: {\n focus: 'descendant'\n },\n blur: {\n itemStyle: {\n opacity: 0.2\n },\n label: {\n opacity: 0.1\n }\n },\n // Animation type can be expansion, scale.\n animationType: 'expansion',\n animationDuration: 1000,\n animationDurationUpdate: 500,\n data: [],\n /**\n * Sort order.\n *\n * Valid values: 'desc', 'asc', null, or callback function.\n * 'desc' and 'asc' for descend and ascendant order;\n * null for not sorting;\n * example of callback function:\n * function(nodeA, nodeB) {\n * return nodeA.getValue() - nodeB.getValue();\n * }\n */\n sort: 'desc'\n };\n return SunburstSeriesModel;\n}(SeriesModel);\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value;\n // TODO First value of array must be a number\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n }\n // Value should not less than 0.\n if (thisValue < 0) {\n thisValue = 0;\n }\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\nexport default SunburstSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parsePercent } from '../../util/number.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\n// let PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\nexport default function sunburstLayout(seriesType, ecModel, api) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n var width = api.getWidth();\n var height = api.getHeight();\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], width);\n var cy = parsePercent(center[1], height);\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var virtualRoot = seriesModel.getData().tree.root;\n var treeRoot = seriesModel.getViewRoot();\n var rootDepth = treeRoot.depth;\n var sort = seriesModel.get('sort');\n if (sort != null) {\n initChildren(treeRoot, sort);\n }\n var validDataCount = 0;\n zrUtil.each(treeRoot.children, function (child) {\n !isNaN(child.getValue()) && validDataCount++;\n });\n var sum = treeRoot.getValue();\n // Sum may be 0\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var renderRollupNode = treeRoot.depth > 0;\n var levels = treeRoot.height - (renderRollupNode ? -1 : 1);\n var rPerLevel = (r - r0) / (levels || 1);\n var clockwise = seriesModel.get('clockwise');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum');\n // In the case some sector angle is smaller than minAngle\n // let restAngle = PI2;\n // let valueSumLargerThanMinAngle = 0;\n var dir = clockwise ? 1 : -1;\n /**\n * Render a tree\n * @return increased angle\n */\n var renderNode = function (node, startAngle) {\n if (!node) {\n return;\n }\n var endAngle = startAngle;\n // Render self\n if (node !== virtualRoot) {\n // Tree node is virtual, so it doesn't need to be drawn\n var value = node.getValue();\n var angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n if (angle < minAngle) {\n angle = minAngle;\n // restAngle -= minAngle;\n }\n // else {\n // valueSumLargerThanMinAngle += value;\n // }\n endAngle = startAngle + dir * angle;\n var depth = node.depth - rootDepth - (renderRollupNode ? -1 : 1);\n var rStart = r0 + rPerLevel * depth;\n var rEnd = r0 + rPerLevel * (depth + 1);\n var levelModel = seriesModel.getLevelModel(node);\n if (levelModel) {\n var r0_1 = levelModel.get('r0', true);\n var r_1 = levelModel.get('r', true);\n var radius_1 = levelModel.get('radius', true);\n if (radius_1 != null) {\n r0_1 = radius_1[0];\n r_1 = radius_1[1];\n }\n r0_1 != null && (rStart = parsePercent(r0_1, size / 2));\n r_1 != null && (rEnd = parsePercent(r_1, size / 2));\n }\n node.setLayout({\n angle: angle,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: rStart,\n r: rEnd\n });\n }\n // Render children\n if (node.children && node.children.length) {\n // currentAngle = startAngle;\n var siblingAngle_1 = 0;\n zrUtil.each(node.children, function (node) {\n siblingAngle_1 += renderNode(node, startAngle + siblingAngle_1);\n });\n }\n return endAngle - startAngle;\n };\n // Virtual root node for roll up\n if (renderRollupNode) {\n var rStart = r0;\n var rEnd = r0 + rPerLevel;\n var angle = Math.PI * 2;\n virtualRoot.setLayout({\n angle: angle,\n startAngle: startAngle,\n endAngle: startAngle + angle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: rStart,\n r: rEnd\n });\n }\n renderNode(treeRoot, startAngle);\n });\n}\n/**\n * Init node children by order and update visual\n */\nfunction initChildren(node, sortOrder) {\n var children = node.children || [];\n node.children = sort(children, sortOrder);\n // Init children recursively\n if (children.length) {\n zrUtil.each(node.children, function (child) {\n initChildren(child, sortOrder);\n });\n }\n}\n/**\n * Sort children nodes\n *\n * @param {TreeNode[]} children children of node to be sorted\n * @param {string | function | null} sort sort method\n * See SunburstSeries.js for details.\n */\nfunction sort(children, sortOrder) {\n if (zrUtil.isFunction(sortOrder)) {\n var sortTargets = zrUtil.map(children, function (child, idx) {\n var value = child.getValue();\n return {\n params: {\n depth: child.depth,\n height: child.height,\n dataIndex: child.dataIndex,\n getValue: function () {\n return value;\n }\n },\n index: idx\n };\n });\n sortTargets.sort(function (a, b) {\n return sortOrder(a.params, b.params);\n });\n return zrUtil.map(sortTargets, function (target) {\n return children[target.index];\n });\n } else {\n var isAsc_1 = sortOrder === 'asc';\n return children.sort(function (a, b) {\n var diff = (a.getValue() - b.getValue()) * (isAsc_1 ? 1 : -1);\n return diff === 0 ? (a.dataIndex - b.dataIndex) * (isAsc_1 ? -1 : 1) : diff;\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { lift } from 'zrender/lib/tool/color.js';\nimport { extend, isString } from 'zrender/lib/core/util.js';\nexport default function sunburstVisual(ecModel) {\n var paletteScope = {};\n // Default color strategy\n function pickColor(node, seriesModel, treeHeight) {\n // Choose color from palette based on the first level.\n var current = node;\n while (current && current.depth > 1) {\n current = current.parentNode;\n }\n var color = seriesModel.getColorFromPalette(current.name || current.dataIndex + '', paletteScope);\n if (node.depth > 1 && isString(color)) {\n // Lighter on the deeper level.\n color = lift(color, (node.depth - 1) / (treeHeight - 1) * 0.5);\n }\n return color;\n }\n ecModel.eachSeriesByType('sunburst', function (seriesModel) {\n var data = seriesModel.getData();\n var tree = data.tree;\n tree.eachNode(function (node) {\n var model = node.getModel();\n var style = model.getModel('itemStyle').getItemStyle();\n if (!style.fill) {\n style.fill = pickColor(node, seriesModel, tree.root.height);\n }\n var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style');\n extend(existsStyle, style);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SunburstView from './SunburstView.js';\nimport SunburstSeriesModel from './SunburstSeries.js';\nimport sunburstLayout from './sunburstLayout.js';\nimport sunburstVisual from './sunburstVisual.js';\nimport dataFilter from '../../processor/dataFilter.js';\nimport { curry } from 'zrender/lib/core/util.js';\nimport { installSunburstAction } from './sunburstAction.js';\nexport function install(registers) {\n registers.registerChartView(SunburstView);\n registers.registerSeriesModel(SunburstSeriesModel);\n registers.registerLayout(curry(sunburstLayout, 'sunburst'));\n registers.registerProcessor(curry(dataFilter, 'sunburst'));\n registers.registerVisual(sunburstVisual);\n installSunburstAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { makeInner } from '../../util/model.js';\nimport SeriesModel from '../../model/Series.js';\n// Also compat with ec4, where\n// `visual('color') visual('borderColor')` is supported.\nexport var STYLE_VISUAL_TYPE = {\n color: 'fill',\n borderColor: 'stroke'\n};\nexport var NON_STYLE_VISUAL_PROPS = {\n symbol: 1,\n symbolSize: 1,\n symbolKeepAspect: 1,\n legendIcon: 1,\n visualMeta: 1,\n liftZ: 1,\n decal: 1\n};\n;\nexport var customInnerStore = makeInner();\nvar CustomSeriesModel = /** @class */function (_super) {\n __extends(CustomSeriesModel, _super);\n function CustomSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CustomSeriesModel.type;\n return _this;\n }\n CustomSeriesModel.prototype.optionUpdated = function () {\n this.currentZLevel = this.get('zlevel', true);\n this.currentZ = this.get('z', true);\n };\n CustomSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this);\n };\n CustomSeriesModel.prototype.getDataParams = function (dataIndex, dataType, el) {\n var params = _super.prototype.getDataParams.call(this, dataIndex, dataType);\n el && (params.info = customInnerStore(el).info);\n return params;\n };\n CustomSeriesModel.type = 'series.custom';\n CustomSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar'];\n CustomSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n // Custom series will not clip by default.\n // Some case will use custom series to draw label\n // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight\n clip: false\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Polar coordinate system\n // polarIndex: 0,\n // Geo coordinate system\n // geoIndex: 0,\n };\n\n return CustomSeriesModel;\n}(SeriesModel);\nexport default CustomSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n dataItem = dataItem || [0, 0];\n return zrUtil.map(['x', 'y'], function (dim, dimIdx) {\n var axis = this.getAxis(dim);\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n }, this);\n}\nexport default function cartesianPrepareCustom(coordSys) {\n var rect = coordSys.master.getRect();\n return {\n coordSys: {\n // The name exposed to user is always 'cartesian2d' but not 'grid'.\n type: 'cartesian2d',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function (data) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nfunction dataToCoordSize(dataSize, dataItem) {\n dataItem = dataItem || [0, 0];\n return zrUtil.map([0, 1], function (dimIdx) {\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n var p1 = [];\n var p2 = [];\n p1[dimIdx] = val - halfSize;\n p2[dimIdx] = val + halfSize;\n p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];\n return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);\n }, this);\n}\nexport default function geoPrepareCustom(coordSys) {\n var rect = coordSys.getBoundingRect();\n return {\n coordSys: {\n type: 'geo',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n zoom: coordSys.getZoom()\n },\n api: {\n coord: function (data) {\n // do not provide \"out\" and noRoam param,\n // Compatible with this usage:\n // echarts.util.map(item.points, api.coord)\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { bind } from 'zrender/lib/core/util.js';\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n var axis = this.getAxis();\n var val = dataItem instanceof Array ? dataItem[0] : dataItem;\n var halfSize = (dataSize instanceof Array ? dataSize[0] : dataSize) / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n}\nexport default function singlePrepareCustom(coordSys) {\n var rect = coordSys.getRect();\n return {\n coordSys: {\n type: 'singleAxis',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function (val) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(val);\n },\n size: bind(dataToCoordSize, coordSys)\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\n// import AngleAxis from './AngleAxis.js';\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n dataItem = dataItem || [0, 0];\n return zrUtil.map(['Radius', 'Angle'], function (dim, dimIdx) {\n var getterName = 'get' + dim + 'Axis';\n // TODO: TYPE Check Angle Axis\n var axis = this[getterName]();\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n var result = axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n if (dim === 'Angle') {\n result = result * Math.PI / 180;\n }\n return result;\n }, this);\n}\nexport default function polarPrepareCustom(coordSys) {\n var radiusAxis = coordSys.getRadiusAxis();\n var angleAxis = coordSys.getAngleAxis();\n var radius = radiusAxis.getExtent();\n radius[0] > radius[1] && radius.reverse();\n return {\n coordSys: {\n type: 'polar',\n cx: coordSys.cx,\n cy: coordSys.cy,\n r: radius[1],\n r0: radius[0]\n },\n api: {\n coord: function (data) {\n var radius = radiusAxis.dataToRadius(data[0]);\n var angle = angleAxis.dataToAngle(data[1]);\n var coord = coordSys.coordToPoint([radius, angle]);\n coord.push(radius, angle * Math.PI / 180);\n return coord;\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function calendarPrepareCustom(coordSys) {\n var rect = coordSys.getRect();\n var rangeInfo = coordSys.getRangeInfo();\n return {\n coordSys: {\n type: 'calendar',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n cellWidth: coordSys.getCellWidth(),\n cellHeight: coordSys.getCellHeight(),\n rangeInfo: {\n start: rangeInfo.start,\n end: rangeInfo.end,\n weeks: rangeInfo.weeks,\n dayCount: rangeInfo.allDay\n }\n },\n api: {\n coord: function (data, clamp) {\n return coordSys.dataToPoint(data, clamp);\n }\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, hasOwn } from 'zrender/lib/core/util.js';\nvar deprecatedLogs = {};\n/**\n * Whether need to call `convertEC4CompatibleStyle`.\n */\nexport function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) {\n // Since echarts5, `RectText` is separated from its host element and style.text\n // does not exist any more. The compat work brings some extra burden on performance.\n // So we provide:\n // `legacy: true` force make compat.\n // `legacy: false`, force do not compat.\n // `legacy` not set: auto detect whether legacy.\n // But in this case we do not compat (difficult to detect and rare case):\n // Becuse custom series and graphic component support \"merge\", users may firstly\n // only set `textStrokeWidth` style or secondly only set `text`.\n return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan'\n // Difficult to detect whether legacy for a \"text\" el.\n && (elType === 'text' || hasOwn(style, 'text')));\n}\n/**\n * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.\n * @param hostStyle The properties might be modified.\n * @return If be text el, `textContentStyle` and `textConfig` will not be returned.\n * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area\n * retried from the `hostStyle`.\n */\nexport function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) {\n var srcStyle = hostStyle;\n var textConfig;\n var textContent;\n var textContentStyle;\n if (elType === 'text') {\n textContentStyle = srcStyle;\n } else {\n textContentStyle = {};\n hasOwn(srcStyle, 'text') && (textContentStyle.text = srcStyle.text);\n hasOwn(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich);\n hasOwn(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill);\n hasOwn(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke);\n hasOwn(srcStyle, 'fontFamily') && (textContentStyle.fontFamily = srcStyle.fontFamily);\n hasOwn(srcStyle, 'fontSize') && (textContentStyle.fontSize = srcStyle.fontSize);\n hasOwn(srcStyle, 'fontStyle') && (textContentStyle.fontStyle = srcStyle.fontStyle);\n hasOwn(srcStyle, 'fontWeight') && (textContentStyle.fontWeight = srcStyle.fontWeight);\n textContent = {\n type: 'text',\n style: textContentStyle,\n // ec4 does not support rectText trigger.\n // And when text position is different in normal and emphasis\n // => hover text trigger emphasis;\n // => text position changed, leave mouse pointer immediately;\n // That might cause incorrect state.\n silent: true\n };\n textConfig = {};\n var hasOwnPos = hasOwn(srcStyle, 'textPosition');\n if (isNormal) {\n textConfig.position = hasOwnPos ? srcStyle.textPosition : 'inside';\n } else {\n hasOwnPos && (textConfig.position = srcStyle.textPosition);\n }\n hasOwn(srcStyle, 'textPosition') && (textConfig.position = srcStyle.textPosition);\n hasOwn(srcStyle, 'textOffset') && (textConfig.offset = srcStyle.textOffset);\n hasOwn(srcStyle, 'textRotation') && (textConfig.rotation = srcStyle.textRotation);\n hasOwn(srcStyle, 'textDistance') && (textConfig.distance = srcStyle.textDistance);\n }\n convertEC4CompatibleRichItem(textContentStyle, hostStyle);\n each(textContentStyle.rich, function (richItem) {\n convertEC4CompatibleRichItem(richItem, richItem);\n });\n return {\n textConfig: textConfig,\n textContent: textContent\n };\n}\n/**\n * The result will be set to `out`.\n */\nfunction convertEC4CompatibleRichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n // (1) For simplicity, make textXXX properties (deprecated since ec5) has\n // higher priority. For example, consider in ec4 `borderColor: 5, textBorderColor: 10`\n // on a rect means `borderColor: 4` on the rect and `borderColor: 10` on an attached\n // richText in ec5.\n // (2) `out === richItem` if and only if `out` is text el or rich item.\n // So we can overwrite existing props in `out` since textXXX has higher priority.\n richItem.font = richItem.textFont || richItem.font;\n hasOwn(richItem, 'textStrokeWidth') && (out.lineWidth = richItem.textStrokeWidth);\n hasOwn(richItem, 'textAlign') && (out.align = richItem.textAlign);\n hasOwn(richItem, 'textVerticalAlign') && (out.verticalAlign = richItem.textVerticalAlign);\n hasOwn(richItem, 'textLineHeight') && (out.lineHeight = richItem.textLineHeight);\n hasOwn(richItem, 'textWidth') && (out.width = richItem.textWidth);\n hasOwn(richItem, 'textHeight') && (out.height = richItem.textHeight);\n hasOwn(richItem, 'textBackgroundColor') && (out.backgroundColor = richItem.textBackgroundColor);\n hasOwn(richItem, 'textPadding') && (out.padding = richItem.textPadding);\n hasOwn(richItem, 'textBorderColor') && (out.borderColor = richItem.textBorderColor);\n hasOwn(richItem, 'textBorderWidth') && (out.borderWidth = richItem.textBorderWidth);\n hasOwn(richItem, 'textBorderRadius') && (out.borderRadius = richItem.textBorderRadius);\n hasOwn(richItem, 'textBoxShadowColor') && (out.shadowColor = richItem.textBoxShadowColor);\n hasOwn(richItem, 'textBoxShadowBlur') && (out.shadowBlur = richItem.textBoxShadowBlur);\n hasOwn(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX);\n hasOwn(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY);\n}\n/**\n * Convert to pure echarts4 format style.\n * `itemStyle` will be modified, added with ec4 style properties from\n * `textStyle` and `textConfig`.\n *\n * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where\n * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.\n */\nexport function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) {\n var out = itemStl;\n // See `custom.ts`, a trick to set extra `textPosition` firstly.\n out.textPosition = out.textPosition || txCfg.position || 'inside';\n txCfg.offset != null && (out.textOffset = txCfg.offset);\n txCfg.rotation != null && (out.textRotation = txCfg.rotation);\n txCfg.distance != null && (out.textDistance = txCfg.distance);\n var isInside = out.textPosition.indexOf('inside') >= 0;\n var hostFill = itemStl.fill || '#000';\n convertToEC4RichItem(out, txStl);\n var textFillNotSet = out.textFill == null;\n if (isInside) {\n if (textFillNotSet) {\n out.textFill = txCfg.insideFill || '#fff';\n !out.textStroke && txCfg.insideStroke && (out.textStroke = txCfg.insideStroke);\n !out.textStroke && (out.textStroke = hostFill);\n out.textStrokeWidth == null && (out.textStrokeWidth = 2);\n }\n } else {\n if (textFillNotSet) {\n out.textFill = itemStl.fill || txCfg.outsideFill || '#000';\n }\n !out.textStroke && txCfg.outsideStroke && (out.textStroke = txCfg.outsideStroke);\n }\n out.text = txStl.text;\n out.rich = txStl.rich;\n each(txStl.rich, function (richItem) {\n convertToEC4RichItem(richItem, richItem);\n });\n return out;\n}\nfunction convertToEC4RichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n hasOwn(richItem, 'fill') && (out.textFill = richItem.fill);\n hasOwn(richItem, 'stroke') && (out.textStroke = richItem.fill);\n hasOwn(richItem, 'lineWidth') && (out.textStrokeWidth = richItem.lineWidth);\n hasOwn(richItem, 'font') && (out.font = richItem.font);\n hasOwn(richItem, 'fontStyle') && (out.fontStyle = richItem.fontStyle);\n hasOwn(richItem, 'fontWeight') && (out.fontWeight = richItem.fontWeight);\n hasOwn(richItem, 'fontSize') && (out.fontSize = richItem.fontSize);\n hasOwn(richItem, 'fontFamily') && (out.fontFamily = richItem.fontFamily);\n hasOwn(richItem, 'align') && (out.textAlign = richItem.align);\n hasOwn(richItem, 'verticalAlign') && (out.textVerticalAlign = richItem.verticalAlign);\n hasOwn(richItem, 'lineHeight') && (out.textLineHeight = richItem.lineHeight);\n hasOwn(richItem, 'width') && (out.textWidth = richItem.width);\n hasOwn(richItem, 'height') && (out.textHeight = richItem.height);\n hasOwn(richItem, 'backgroundColor') && (out.textBackgroundColor = richItem.backgroundColor);\n hasOwn(richItem, 'padding') && (out.textPadding = richItem.padding);\n hasOwn(richItem, 'borderColor') && (out.textBorderColor = richItem.borderColor);\n hasOwn(richItem, 'borderWidth') && (out.textBorderWidth = richItem.borderWidth);\n hasOwn(richItem, 'borderRadius') && (out.textBorderRadius = richItem.borderRadius);\n hasOwn(richItem, 'shadowColor') && (out.textBoxShadowColor = richItem.shadowColor);\n hasOwn(richItem, 'shadowBlur') && (out.textBoxShadowBlur = richItem.shadowBlur);\n hasOwn(richItem, 'shadowOffsetX') && (out.textBoxShadowOffsetX = richItem.shadowOffsetX);\n hasOwn(richItem, 'shadowOffsetY') && (out.textBoxShadowOffsetY = richItem.shadowOffsetY);\n hasOwn(richItem, 'textShadowColor') && (out.textShadowColor = richItem.textShadowColor);\n hasOwn(richItem, 'textShadowBlur') && (out.textShadowBlur = richItem.textShadowBlur);\n hasOwn(richItem, 'textShadowOffsetX') && (out.textShadowOffsetX = richItem.textShadowOffsetX);\n hasOwn(richItem, 'textShadowOffsetY') && (out.textShadowOffsetY = richItem.textShadowOffsetY);\n}\nexport function warnDeprecated(deprecated, insteadApproach) {\n if (process.env.NODE_ENV !== 'production') {\n var key = deprecated + '^_^' + insteadApproach;\n if (!deprecatedLogs[key]) {\n console.warn(\"[ECharts] DEPRECATED: \\\"\" + deprecated + \"\\\" has been deprecated. \" + insteadApproach);\n deprecatedLogs[key] = true;\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner, normalizeToArray } from '../util/model.js';\nimport { assert, bind, each, eqNaN, extend, hasOwn, indexOf, isArrayLike, keys, reduce } from 'zrender/lib/core/util.js';\nimport { cloneValue } from 'zrender/lib/animation/Animator.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { Path } from '../util/graphic.js';\nimport { warn } from '../util/log.js';\nimport { TRANSFORMABLE_PROPS } from 'zrender/lib/core/Transformable.js';\nvar LEGACY_TRANSFORM_PROPS_MAP = {\n position: ['x', 'y'],\n scale: ['scaleX', 'scaleY'],\n origin: ['originX', 'originY']\n};\nvar LEGACY_TRANSFORM_PROPS = keys(LEGACY_TRANSFORM_PROPS_MAP);\nvar TRANSFORM_PROPS_MAP = reduce(TRANSFORMABLE_PROPS, function (obj, key) {\n obj[key] = 1;\n return obj;\n}, {});\nvar transformPropNamesStr = TRANSFORMABLE_PROPS.join(', ');\n// '' means root\nexport var ELEMENT_ANIMATABLE_PROPS = ['', 'style', 'shape', 'extra'];\n;\nvar transitionInnerStore = makeInner();\n;\nfunction getElementAnimationConfig(animationType, el, elOption, parentModel, dataIndex) {\n var animationProp = animationType + \"Animation\";\n var config = getAnimationConfig(animationType, parentModel, dataIndex) || {};\n var userDuring = transitionInnerStore(el).userDuring;\n // Only set when duration is > 0 and it's need to be animated.\n if (config.duration > 0) {\n // For simplicity, if during not specified, the previous during will not work any more.\n config.during = userDuring ? bind(duringCall, {\n el: el,\n userDuring: userDuring\n }) : null;\n config.setToFinal = true;\n config.scope = animationType;\n }\n extend(config, elOption[animationProp]);\n return config;\n}\nexport function applyUpdateTransition(el, elOption, animatableModel, opts) {\n opts = opts || {};\n var dataIndex = opts.dataIndex,\n isInit = opts.isInit,\n clearStyle = opts.clearStyle;\n var hasAnimation = animatableModel.isAnimationEnabled();\n // Save the meta info for further morphing. Like apply on the sub morphing elements.\n var store = transitionInnerStore(el);\n var styleOpt = elOption.style;\n store.userDuring = elOption.during;\n var transFromProps = {};\n var propsToSet = {};\n prepareTransformAllPropsFinal(el, elOption, propsToSet);\n prepareShapeOrExtraAllPropsFinal('shape', elOption, propsToSet);\n prepareShapeOrExtraAllPropsFinal('extra', elOption, propsToSet);\n if (!isInit && hasAnimation) {\n prepareTransformTransitionFrom(el, elOption, transFromProps);\n prepareShapeOrExtraTransitionFrom('shape', el, elOption, transFromProps);\n prepareShapeOrExtraTransitionFrom('extra', el, elOption, transFromProps);\n prepareStyleTransitionFrom(el, elOption, styleOpt, transFromProps);\n }\n propsToSet.style = styleOpt;\n applyPropsDirectly(el, propsToSet, clearStyle);\n applyMiscProps(el, elOption);\n if (hasAnimation) {\n if (isInit) {\n var enterFromProps_1 = {};\n each(ELEMENT_ANIMATABLE_PROPS, function (propName) {\n var prop = propName ? elOption[propName] : elOption;\n if (prop && prop.enterFrom) {\n if (propName) {\n enterFromProps_1[propName] = enterFromProps_1[propName] || {};\n }\n extend(propName ? enterFromProps_1[propName] : enterFromProps_1, prop.enterFrom);\n }\n });\n var config = getElementAnimationConfig('enter', el, elOption, animatableModel, dataIndex);\n if (config.duration > 0) {\n el.animateFrom(enterFromProps_1, config);\n }\n } else {\n applyPropsTransition(el, elOption, dataIndex || 0, animatableModel, transFromProps);\n }\n }\n // Store leave to be used in leave transition.\n updateLeaveTo(el, elOption);\n styleOpt ? el.dirty() : el.markRedraw();\n}\nexport function updateLeaveTo(el, elOption) {\n // Try merge to previous set leaveTo\n var leaveToProps = transitionInnerStore(el).leaveToProps;\n for (var i = 0; i < ELEMENT_ANIMATABLE_PROPS.length; i++) {\n var propName = ELEMENT_ANIMATABLE_PROPS[i];\n var prop = propName ? elOption[propName] : elOption;\n if (prop && prop.leaveTo) {\n if (!leaveToProps) {\n leaveToProps = transitionInnerStore(el).leaveToProps = {};\n }\n if (propName) {\n leaveToProps[propName] = leaveToProps[propName] || {};\n }\n extend(propName ? leaveToProps[propName] : leaveToProps, prop.leaveTo);\n }\n }\n}\nexport function applyLeaveTransition(el, elOption, animatableModel, onRemove) {\n if (el) {\n var parent_1 = el.parent;\n var leaveToProps = transitionInnerStore(el).leaveToProps;\n if (leaveToProps) {\n // TODO TODO use leave after leaveAnimation in series is introduced\n // TODO Data index?\n var config = getElementAnimationConfig('update', el, elOption, animatableModel, 0);\n config.done = function () {\n parent_1.remove(el);\n onRemove && onRemove();\n };\n el.animateTo(leaveToProps, config);\n } else {\n parent_1.remove(el);\n onRemove && onRemove();\n }\n }\n}\nexport function isTransitionAll(transition) {\n return transition === 'all';\n}\nfunction applyPropsDirectly(el,\n// Can be null/undefined\nallPropsFinal, clearStyle) {\n var styleOpt = allPropsFinal.style;\n if (!el.isGroup && styleOpt) {\n if (clearStyle) {\n el.useStyle({});\n // When style object changed, how to trade the existing animation?\n // It is probably complicated and not needed to cover all the cases.\n // But still need consider the case:\n // (1) When using init animation on `style.opacity`, and before the animation\n // ended users triggers an update by mousewhel. At that time the init\n // animation should better be continued rather than terminated.\n // So after `useStyle` called, we should change the animation target manually\n // to continue the effect of the init animation.\n // (2) PENDING: If the previous animation targeted at a `val1`, and currently we need\n // to update the value to `val2` and no animation declared, should be terminate\n // the previous animation or just modify the target of the animation?\n // Therotically That will happen not only on `style` but also on `shape` and\n // `transfrom` props. But we haven't handle this case at present yet.\n // (3) PENDING: Is it proper to visit `animators` and `targetName`?\n var animators = el.animators;\n for (var i = 0; i < animators.length; i++) {\n var animator = animators[i];\n // targetName is the \"topKey\".\n if (animator.targetName === 'style') {\n animator.changeTarget(el.style);\n }\n }\n }\n el.setStyle(styleOpt);\n }\n if (allPropsFinal) {\n // Not set style here.\n allPropsFinal.style = null;\n // Set el to the final state firstly.\n allPropsFinal && el.attr(allPropsFinal);\n allPropsFinal.style = styleOpt;\n }\n}\nfunction applyPropsTransition(el, elOption, dataIndex, model,\n// Can be null/undefined\ntransFromProps) {\n if (transFromProps) {\n var config = getElementAnimationConfig('update', el, elOption, model, dataIndex);\n if (config.duration > 0) {\n el.animateFrom(transFromProps, config);\n }\n }\n}\nfunction applyMiscProps(el, elOption) {\n // Merge by default.\n hasOwn(elOption, 'silent') && (el.silent = elOption.silent);\n hasOwn(elOption, 'ignore') && (el.ignore = elOption.ignore);\n if (el instanceof Displayable) {\n hasOwn(elOption, 'invisible') && (el.invisible = elOption.invisible);\n }\n if (el instanceof Path) {\n hasOwn(elOption, 'autoBatch') && (el.autoBatch = elOption.autoBatch);\n }\n}\n// Use it to avoid it be exposed to user.\nvar tmpDuringScope = {};\nvar transitionDuringAPI = {\n // Usually other props do not need to be changed in animation during.\n setTransform: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `setTransform`.');\n }\n tmpDuringScope.el[key] = val;\n return this;\n },\n getTransform: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `getTransform`.');\n }\n return tmpDuringScope.el[key];\n },\n setShape: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var el = tmpDuringScope.el;\n var shape = el.shape || (el.shape = {});\n shape[key] = val;\n el.dirtyShape && el.dirtyShape();\n return this;\n },\n getShape: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var shape = tmpDuringScope.el.shape;\n if (shape) {\n return shape[key];\n }\n },\n setStyle: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var el = tmpDuringScope.el;\n var style = el.style;\n if (style) {\n if (process.env.NODE_ENV !== 'production') {\n if (eqNaN(val)) {\n warn('style.' + key + ' must not be assigned with NaN.');\n }\n }\n style[key] = val;\n el.dirtyStyle && el.dirtyStyle();\n }\n return this;\n },\n getStyle: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var style = tmpDuringScope.el.style;\n if (style) {\n return style[key];\n }\n },\n setExtra: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var extra = tmpDuringScope.el.extra || (tmpDuringScope.el.extra = {});\n extra[key] = val;\n return this;\n },\n getExtra: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var extra = tmpDuringScope.el.extra;\n if (extra) {\n return extra[key];\n }\n }\n};\nfunction assertNotReserved(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (key === 'transition' || key === 'enterFrom' || key === 'leaveTo') {\n throw new Error('key must not be \"' + key + '\"');\n }\n }\n}\nfunction duringCall() {\n // Do not provide \"percent\" until some requirements come.\n // Because consider thies case:\n // enterFrom: {x: 100, y: 30}, transition: 'x'.\n // And enter duration is different from update duration.\n // Thus it might be confused about the meaning of \"percent\" in during callback.\n var scope = this;\n var el = scope.el;\n if (!el) {\n return;\n }\n // If el is remove from zr by reason like legend, during still need to called,\n // because el will be added back to zr and the prop value should not be incorrect.\n var latestUserDuring = transitionInnerStore(el).userDuring;\n var scopeUserDuring = scope.userDuring;\n // Ensured a during is only called once in each animation frame.\n // If a during is called multiple times in one frame, maybe some users' calculation logic\n // might be wrong (not sure whether this usage exists).\n // The case of a during might be called twice can be: by default there is a animator for\n // 'x', 'y' when init. Before the init animation finished, call `setOption` to start\n // another animators for 'style'/'shape'/'extra'.\n if (latestUserDuring !== scopeUserDuring) {\n // release\n scope.el = scope.userDuring = null;\n return;\n }\n tmpDuringScope.el = el;\n // Give no `this` to user in \"during\" calling.\n scopeUserDuring(transitionDuringAPI);\n // FIXME: if in future meet the case that some prop will be both modified in `during` and `state`,\n // consider the issue that the prop might be incorrect when return to \"normal\" state.\n}\n\nfunction prepareShapeOrExtraTransitionFrom(mainAttr, fromEl, elOption, transFromProps) {\n var attrOpt = elOption[mainAttr];\n if (!attrOpt) {\n return;\n }\n var elPropsInAttr = fromEl[mainAttr];\n var transFromPropsInAttr;\n if (elPropsInAttr) {\n var transition = elOption.transition;\n var attrTransition = attrOpt.transition;\n if (attrTransition) {\n !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {});\n if (isTransitionAll(attrTransition)) {\n extend(transFromPropsInAttr, elPropsInAttr);\n } else {\n var transitionKeys = normalizeToArray(attrTransition);\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n var elVal = elPropsInAttr[key];\n transFromPropsInAttr[key] = elVal;\n }\n }\n } else if (isTransitionAll(transition) || indexOf(transition, mainAttr) >= 0) {\n !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {});\n var elPropsInAttrKeys = keys(elPropsInAttr);\n for (var i = 0; i < elPropsInAttrKeys.length; i++) {\n var key = elPropsInAttrKeys[i];\n var elVal = elPropsInAttr[key];\n if (isNonStyleTransitionEnabled(attrOpt[key], elVal)) {\n transFromPropsInAttr[key] = elVal;\n }\n }\n }\n }\n}\nfunction prepareShapeOrExtraAllPropsFinal(mainAttr, elOption, allProps) {\n var attrOpt = elOption[mainAttr];\n if (!attrOpt) {\n return;\n }\n var allPropsInAttr = allProps[mainAttr] = {};\n var keysInAttr = keys(attrOpt);\n for (var i = 0; i < keysInAttr.length; i++) {\n var key = keysInAttr[i];\n // To avoid share one object with different element, and\n // to avoid user modify the object inexpectedly, have to clone.\n allPropsInAttr[key] = cloneValue(attrOpt[key]);\n }\n}\nfunction prepareTransformTransitionFrom(el, elOption, transFromProps) {\n var transition = elOption.transition;\n var transitionKeys = isTransitionAll(transition) ? TRANSFORMABLE_PROPS : normalizeToArray(transition || []);\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n if (key === 'style' || key === 'shape' || key === 'extra') {\n continue;\n }\n var elVal = el[key];\n if (process.env.NODE_ENV !== 'production') {\n checkTransformPropRefer(key, 'el.transition');\n }\n // Do not clone, animator will perform that clone.\n transFromProps[key] = elVal;\n }\n}\nfunction prepareTransformAllPropsFinal(el, elOption, allProps) {\n for (var i = 0; i < LEGACY_TRANSFORM_PROPS.length; i++) {\n var legacyName = LEGACY_TRANSFORM_PROPS[i];\n var xyName = LEGACY_TRANSFORM_PROPS_MAP[legacyName];\n var legacyArr = elOption[legacyName];\n if (legacyArr) {\n allProps[xyName[0]] = legacyArr[0];\n allProps[xyName[1]] = legacyArr[1];\n }\n }\n for (var i = 0; i < TRANSFORMABLE_PROPS.length; i++) {\n var key = TRANSFORMABLE_PROPS[i];\n if (elOption[key] != null) {\n allProps[key] = elOption[key];\n }\n }\n}\nfunction prepareStyleTransitionFrom(fromEl, elOption, styleOpt, transFromProps) {\n if (!styleOpt) {\n return;\n }\n var fromElStyle = fromEl.style;\n var transFromStyleProps;\n if (fromElStyle) {\n var styleTransition = styleOpt.transition;\n var elTransition = elOption.transition;\n if (styleTransition && !isTransitionAll(styleTransition)) {\n var transitionKeys = normalizeToArray(styleTransition);\n !transFromStyleProps && (transFromStyleProps = transFromProps.style = {});\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n var elVal = fromElStyle[key];\n // Do not clone, see `checkNonStyleTansitionRefer`.\n transFromStyleProps[key] = elVal;\n }\n } else if (fromEl.getAnimationStyleProps && (isTransitionAll(elTransition) || isTransitionAll(styleTransition) || indexOf(elTransition, 'style') >= 0)) {\n var animationProps = fromEl.getAnimationStyleProps();\n var animationStyleProps = animationProps ? animationProps.style : null;\n if (animationStyleProps) {\n !transFromStyleProps && (transFromStyleProps = transFromProps.style = {});\n var styleKeys = keys(styleOpt);\n for (var i = 0; i < styleKeys.length; i++) {\n var key = styleKeys[i];\n if (animationStyleProps[key]) {\n var elVal = fromElStyle[key];\n transFromStyleProps[key] = elVal;\n }\n }\n }\n }\n }\n}\nfunction isNonStyleTransitionEnabled(optVal, elVal) {\n // The same as `checkNonStyleTansitionRefer`.\n return !isArrayLike(optVal) ? optVal != null && isFinite(optVal) : optVal !== elVal;\n}\nvar checkTransformPropRefer;\nif (process.env.NODE_ENV !== 'production') {\n checkTransformPropRefer = function (key, usedIn) {\n if (!hasOwn(TRANSFORM_PROPS_MAP, key)) {\n warn('Prop `' + key + '` is not a permitted in `' + usedIn + '`. ' + 'Only `' + keys(TRANSFORM_PROPS_MAP).join('`, `') + '` are permitted.');\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { keys, filter, each, isArray, indexOf } from 'zrender/lib/core/util.js';\nimport { ELEMENT_ANIMATABLE_PROPS } from './customGraphicTransition.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { warn } from '../util/log.js';\nimport { makeInner } from '../util/model.js';\nvar getStateToRestore = makeInner();\nvar KEYFRAME_EXCLUDE_KEYS = ['percent', 'easing', 'shape', 'style', 'extra'];\n/**\n * Stop previous keyframe animation and restore the attributes.\n * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set.\n */\nexport function stopPreviousKeyframeAnimationAndRestore(el) {\n // Stop previous keyframe animation.\n el.stopAnimation('keyframe');\n // Restore\n el.attr(getStateToRestore(el));\n}\nexport function applyKeyframeAnimation(el, animationOpts, animatableModel) {\n if (!animatableModel.isAnimationEnabled() || !animationOpts) {\n return;\n }\n if (isArray(animationOpts)) {\n each(animationOpts, function (singleAnimationOpts) {\n applyKeyframeAnimation(el, singleAnimationOpts, animatableModel);\n });\n return;\n }\n var keyframes = animationOpts.keyframes;\n var duration = animationOpts.duration;\n if (animatableModel && duration == null) {\n // Default to use duration of config.\n // NOTE: animation config from payload will be ignored because they are mainly for transitions.\n var config = getAnimationConfig('enter', animatableModel, 0);\n duration = config && config.duration;\n }\n if (!keyframes || !duration) {\n return;\n }\n var stateToRestore = getStateToRestore(el);\n each(ELEMENT_ANIMATABLE_PROPS, function (targetPropName) {\n if (targetPropName && !el[targetPropName]) {\n return;\n }\n var animator;\n var endFrameIsSet = false;\n // Sort keyframes by percent.\n keyframes.sort(function (a, b) {\n return a.percent - b.percent;\n });\n each(keyframes, function (kf) {\n // Stop current animation.\n var animators = el.animators;\n var kfValues = targetPropName ? kf[targetPropName] : kf;\n if (process.env.NODE_ENV !== 'production') {\n if (kf.percent >= 1) {\n endFrameIsSet = true;\n }\n }\n if (!kfValues) {\n return;\n }\n var propKeys = keys(kfValues);\n if (!targetPropName) {\n // PENDING performance?\n propKeys = filter(propKeys, function (key) {\n return indexOf(KEYFRAME_EXCLUDE_KEYS, key) < 0;\n });\n }\n if (!propKeys.length) {\n return;\n }\n if (!animator) {\n animator = el.animate(targetPropName, animationOpts.loop, true);\n animator.scope = 'keyframe';\n }\n for (var i = 0; i < animators.length; i++) {\n // Stop all other animation that is not keyframe.\n if (animators[i] !== animator && animators[i].targetName === animator.targetName) {\n animators[i].stopTracks(propKeys);\n }\n }\n targetPropName && (stateToRestore[targetPropName] = stateToRestore[targetPropName] || {});\n var savedTarget = targetPropName ? stateToRestore[targetPropName] : stateToRestore;\n each(propKeys, function (key) {\n // Save original value.\n savedTarget[key] = ((targetPropName ? el[targetPropName] : el) || {})[key];\n });\n animator.whenWithKeys(duration * kf.percent, kfValues, propKeys, kf.easing);\n });\n if (!animator) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!endFrameIsSet) {\n warn('End frame with percent: 1 is missing in the keyframeAnimation.', true);\n }\n }\n animator.delay(animationOpts.delay || 0).duration(duration).start(animationOpts.easing);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { hasOwn, assert, isString, retrieve2, retrieve3, defaults, each, indexOf } from 'zrender/lib/core/util.js';\nimport * as graphicUtil from '../../util/graphic.js';\nimport { setDefaultStateProxy, toggleHoverEmphasis } from '../../util/states.js';\nimport * as labelStyleHelper from '../../label/labelStyle.js';\nimport { getDefaultLabel } from '../helper/labelHelper.js';\nimport { getLayoutOnAxis } from '../../layout/barGrid.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport ChartView from '../../view/Chart.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport prepareCartesian2d from '../../coord/cartesian/prepareCustom.js';\nimport prepareGeo from '../../coord/geo/prepareCustom.js';\nimport prepareSingleAxis from '../../coord/single/prepareCustom.js';\nimport preparePolar from '../../coord/polar/prepareCustom.js';\nimport prepareCalendar from '../../coord/calendar/prepareCustom.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { convertToEC4StyleForCustomSerise, isEC4CompatibleStyle, convertFromEC4CompatibleStyle, warnDeprecated } from '../../util/styleCompat.js';\nimport { throwError } from '../../util/log.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { STYLE_VISUAL_TYPE, NON_STYLE_VISUAL_PROPS, customInnerStore } from './CustomSeries.js';\nimport { applyLeaveTransition, applyUpdateTransition } from '../../animation/customGraphicTransition.js';\nimport { applyKeyframeAnimation, stopPreviousKeyframeAnimationAndRestore } from '../../animation/customGraphicKeyframeAnimation.js';\nvar EMPHASIS = 'emphasis';\nvar NORMAL = 'normal';\nvar BLUR = 'blur';\nvar SELECT = 'select';\nvar STATES = [NORMAL, EMPHASIS, BLUR, SELECT];\nvar PATH_ITEM_STYLE = {\n normal: ['itemStyle'],\n emphasis: [EMPHASIS, 'itemStyle'],\n blur: [BLUR, 'itemStyle'],\n select: [SELECT, 'itemStyle']\n};\nvar PATH_LABEL = {\n normal: ['label'],\n emphasis: [EMPHASIS, 'label'],\n blur: [BLUR, 'label'],\n select: [SELECT, 'label']\n};\nvar DEFAULT_TRANSITION = ['x', 'y'];\n// Use prefix to avoid index to be the same as el.name,\n// which will cause weird update animation.\nvar GROUP_DIFF_PREFIX = 'e\\0\\0';\nvar attachedTxInfoTmp = {\n normal: {},\n emphasis: {},\n blur: {},\n select: {}\n};\n/**\n * To reduce total package size of each coordinate systems, the modules `prepareCustom`\n * of each coordinate systems are not required by each coordinate systems directly, but\n * required by the module `custom`.\n *\n * prepareInfoForCustomSeries {Function}: optional\n * @return {Object} {coordSys: {...}, api: {\n * coord: function (data, clamp) {}, // return point in global.\n * size: function (dataSize, dataItem) {} // return size of each axis in coordSys.\n * }}\n */\nvar prepareCustoms = {\n cartesian2d: prepareCartesian2d,\n geo: prepareGeo,\n single: prepareSingleAxis,\n polar: preparePolar,\n calendar: prepareCalendar\n};\nfunction isPath(el) {\n return el instanceof graphicUtil.Path;\n}\nfunction isDisplayable(el) {\n return el instanceof Displayable;\n}\nfunction copyElement(sourceEl, targetEl) {\n targetEl.copyTransform(sourceEl);\n if (isDisplayable(targetEl) && isDisplayable(sourceEl)) {\n targetEl.setStyle(sourceEl.style);\n targetEl.z = sourceEl.z;\n targetEl.z2 = sourceEl.z2;\n targetEl.zlevel = sourceEl.zlevel;\n targetEl.invisible = sourceEl.invisible;\n targetEl.ignore = sourceEl.ignore;\n if (isPath(targetEl) && isPath(sourceEl)) {\n targetEl.setShape(sourceEl.shape);\n }\n }\n}\nvar CustomChartView = /** @class */function (_super) {\n __extends(CustomChartView, _super);\n function CustomChartView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CustomChartView.type;\n return _this;\n }\n CustomChartView.prototype.render = function (customSeries, ecModel, api, payload) {\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n var oldData = this._data;\n var data = customSeries.getData();\n var group = this.group;\n var renderItem = makeRenderItem(customSeries, data, ecModel, api);\n if (!oldData) {\n // Previous render is incremental render or first render.\n // Needs remove the incremental rendered elements.\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n createOrUpdateItem(api, null, newIdx, renderItem(newIdx, payload), customSeries, group, data);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && applyLeaveTransition(el, customInnerStore(el).option, customSeries);\n }).update(function (newIdx, oldIdx) {\n var oldEl = oldData.getItemGraphicEl(oldIdx);\n createOrUpdateItem(api, oldEl, newIdx, renderItem(newIdx, payload), customSeries, group, data);\n }).execute();\n // Do clipping\n var clipPath = customSeries.get('clip', true) ? createClipPath(customSeries.coordinateSystem, false, customSeries) : null;\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n this._data = data;\n };\n CustomChartView.prototype.incrementalPrepareRender = function (customSeries, ecModel, api) {\n this.group.removeAll();\n this._data = null;\n };\n CustomChartView.prototype.incrementalRender = function (params, customSeries, ecModel, api, payload) {\n var data = customSeries.getData();\n var renderItem = makeRenderItem(customSeries, data, ecModel, api);\n var progressiveEls = this._progressiveEls = [];\n function setIncrementalAndHoverLayer(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = params.start; idx < params.end; idx++) {\n var el = createOrUpdateItem(null, null, idx, renderItem(idx, payload), customSeries, this.group, data);\n if (el) {\n el.traverse(setIncrementalAndHoverLayer);\n progressiveEls.push(el);\n }\n }\n };\n CustomChartView.prototype.eachRendered = function (cb) {\n graphicUtil.traverseElements(this._progressiveEls || this.group, cb);\n };\n CustomChartView.prototype.filterForExposedEvent = function (eventType, query, targetEl, packedEvent) {\n var elementName = query.element;\n if (elementName == null || targetEl.name === elementName) {\n return true;\n }\n // Enable to give a name on a group made by `renderItem`, and listen\n // events that are triggered by its descendents.\n while ((targetEl = targetEl.__hostTarget || targetEl.parent) && targetEl !== this.group) {\n if (targetEl.name === elementName) {\n return true;\n }\n }\n return false;\n };\n CustomChartView.type = 'custom';\n return CustomChartView;\n}(ChartView);\nexport default CustomChartView;\nfunction createEl(elOption) {\n var graphicType = elOption.type;\n var el;\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n if (graphicType === 'path') {\n var shape = elOption.shape;\n // Using pathRect brings convenience to users sacle svg path.\n var pathRect = shape.width != null && shape.height != null ? {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width,\n height: shape.height\n } : null;\n var pathData = getPathData(shape);\n // Path is also used for icon, so layout 'center' by default.\n el = graphicUtil.makePath(pathData, null, pathRect, shape.layout || 'center');\n customInnerStore(el).customPathData = pathData;\n } else if (graphicType === 'image') {\n el = new graphicUtil.Image({});\n customInnerStore(el).customImagePath = elOption.style.image;\n } else if (graphicType === 'text') {\n el = new graphicUtil.Text({});\n // customInnerStore(el).customText = (elOption.style as TextStyleProps).text;\n } else if (graphicType === 'group') {\n el = new graphicUtil.Group();\n } else if (graphicType === 'compoundPath') {\n throw new Error('\"compoundPath\" is not supported yet.');\n } else {\n var Clz = graphicUtil.getShapeClass(graphicType);\n if (!Clz) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'graphic type \"' + graphicType + '\" can not be found.';\n }\n throwError(errMsg);\n }\n el = new Clz();\n }\n customInnerStore(el).customGraphicType = graphicType;\n el.name = elOption.name;\n // Compat ec4: the default z2 lift is 1. If changing the number,\n // some cases probably be broken: hierarchy layout along z, like circle packing,\n // where emphasis only intending to modify color/border rather than lift z2.\n el.z2EmphasisLift = 1;\n el.z2SelectLift = 1;\n return el;\n}\nfunction updateElNormal(\n// Can be null/undefined\napi, el, dataIndex, elOption, attachedTxInfo, seriesModel, isInit) {\n // Stop and restore before update any other attributes.\n stopPreviousKeyframeAnimationAndRestore(el);\n var txCfgOpt = attachedTxInfo && attachedTxInfo.normal.cfg;\n if (txCfgOpt) {\n // PENDING: whether use user object directly rather than clone?\n // TODO:5.0 textConfig transition animation?\n el.setTextConfig(txCfgOpt);\n }\n // Default transition ['x', 'y']\n if (elOption && elOption.transition == null) {\n elOption.transition = DEFAULT_TRANSITION;\n }\n // Do some normalization on style.\n var styleOpt = elOption && elOption.style;\n if (styleOpt) {\n if (el.type === 'text') {\n var textOptionStyle = styleOpt;\n // Compatible with ec4: if `textFill` or `textStroke` exists use them.\n hasOwn(textOptionStyle, 'textFill') && (textOptionStyle.fill = textOptionStyle.textFill);\n hasOwn(textOptionStyle, 'textStroke') && (textOptionStyle.stroke = textOptionStyle.textStroke);\n }\n var decalPattern = void 0;\n var decalObj = isPath(el) ? styleOpt.decal : null;\n if (api && decalObj) {\n decalObj.dirty = true;\n decalPattern = createOrUpdatePatternFromDecal(decalObj, api);\n }\n // Always overwrite in case user specify this prop.\n styleOpt.__decalPattern = decalPattern;\n }\n if (isDisplayable(el)) {\n if (styleOpt) {\n var decalPattern = styleOpt.__decalPattern;\n if (decalPattern) {\n styleOpt.decal = decalPattern;\n }\n }\n }\n applyUpdateTransition(el, elOption, seriesModel, {\n dataIndex: dataIndex,\n isInit: isInit,\n clearStyle: true\n });\n applyKeyframeAnimation(el, elOption.keyframeAnimation, seriesModel);\n}\nfunction updateElOnState(state, el, elStateOpt, styleOpt, attachedTxInfo) {\n var elDisplayable = el.isGroup ? null : el;\n var txCfgOpt = attachedTxInfo && attachedTxInfo[state].cfg;\n // PENDING:5.0 support customize scale change and transition animation?\n if (elDisplayable) {\n // By default support auto lift color when hover whether `emphasis` specified.\n var stateObj = elDisplayable.ensureState(state);\n if (styleOpt === false) {\n var existingEmphasisState = elDisplayable.getState(state);\n if (existingEmphasisState) {\n existingEmphasisState.style = null;\n }\n } else {\n // style is needed to enable default emphasis.\n stateObj.style = styleOpt || null;\n }\n // If `elOption.styleEmphasis` or `elOption.emphasis.style` is `false`,\n // remove hover style.\n // If `elOption.textConfig` or `elOption.emphasis.textConfig` is null/undefined, it does not\n // make sense. So for simplicity, we do not ditinguish `hasOwnProperty` and null/undefined.\n if (txCfgOpt) {\n stateObj.textConfig = txCfgOpt;\n }\n setDefaultStateProxy(elDisplayable);\n }\n}\nfunction updateZ(el, elOption, seriesModel) {\n // Group not support textContent and not support z yet.\n if (el.isGroup) {\n return;\n }\n var elDisplayable = el;\n var currentZ = seriesModel.currentZ;\n var currentZLevel = seriesModel.currentZLevel;\n // Always erase.\n elDisplayable.z = currentZ;\n elDisplayable.zlevel = currentZLevel;\n // z2 must not be null/undefined, otherwise sort error may occur.\n var optZ2 = elOption.z2;\n optZ2 != null && (elDisplayable.z2 = optZ2 || 0);\n for (var i = 0; i < STATES.length; i++) {\n updateZForEachState(elDisplayable, elOption, STATES[i]);\n }\n}\nfunction updateZForEachState(elDisplayable, elOption, state) {\n var isNormal = state === NORMAL;\n var elStateOpt = isNormal ? elOption : retrieveStateOption(elOption, state);\n var optZ2 = elStateOpt ? elStateOpt.z2 : null;\n var stateObj;\n if (optZ2 != null) {\n // Do not `ensureState` until required.\n stateObj = isNormal ? elDisplayable : elDisplayable.ensureState(state);\n stateObj.z2 = optZ2 || 0;\n }\n}\nfunction makeRenderItem(customSeries, data, ecModel, api) {\n var renderItem = customSeries.get('renderItem');\n var coordSys = customSeries.coordinateSystem;\n var prepareResult = {};\n if (coordSys) {\n if (process.env.NODE_ENV !== 'production') {\n assert(renderItem, 'series.render is required.');\n assert(coordSys.prepareCustoms || prepareCustoms[coordSys.type], 'This coordSys does not support custom series.');\n }\n // `coordSys.prepareCustoms` is used for external coord sys like bmap.\n prepareResult = coordSys.prepareCustoms ? coordSys.prepareCustoms(coordSys) : prepareCustoms[coordSys.type](coordSys);\n }\n var userAPI = defaults({\n getWidth: api.getWidth,\n getHeight: api.getHeight,\n getZr: api.getZr,\n getDevicePixelRatio: api.getDevicePixelRatio,\n value: value,\n style: style,\n ordinalRawValue: ordinalRawValue,\n styleEmphasis: styleEmphasis,\n visual: visual,\n barLayout: barLayout,\n currentSeriesIndices: currentSeriesIndices,\n font: font\n }, prepareResult.api || {});\n var userParams = {\n // The life cycle of context: current round of rendering.\n // The global life cycle is probably not necessary, because\n // user can store global status by themselves.\n context: {},\n seriesId: customSeries.id,\n seriesName: customSeries.name,\n seriesIndex: customSeries.seriesIndex,\n coordSys: prepareResult.coordSys,\n dataInsideLength: data.count(),\n encode: wrapEncodeDef(customSeries.getData())\n };\n // If someday intending to refactor them to a class, should consider do not\n // break change: currently these attribute member are encapsulated in a closure\n // so that do not need to force user to call these method with a scope.\n // Do not support call `api` asynchronously without dataIndexInside input.\n var currDataIndexInside;\n var currItemModel;\n var currItemStyleModels = {};\n var currLabelModels = {};\n var seriesItemStyleModels = {};\n var seriesLabelModels = {};\n for (var i = 0; i < STATES.length; i++) {\n var stateName = STATES[i];\n seriesItemStyleModels[stateName] = customSeries.getModel(PATH_ITEM_STYLE[stateName]);\n seriesLabelModels[stateName] = customSeries.getModel(PATH_LABEL[stateName]);\n }\n function getItemModel(dataIndexInside) {\n return dataIndexInside === currDataIndexInside ? currItemModel || (currItemModel = data.getItemModel(dataIndexInside)) : data.getItemModel(dataIndexInside);\n }\n function getItemStyleModel(dataIndexInside, state) {\n return !data.hasItemOption ? seriesItemStyleModels[state] : dataIndexInside === currDataIndexInside ? currItemStyleModels[state] || (currItemStyleModels[state] = getItemModel(dataIndexInside).getModel(PATH_ITEM_STYLE[state])) : getItemModel(dataIndexInside).getModel(PATH_ITEM_STYLE[state]);\n }\n function getLabelModel(dataIndexInside, state) {\n return !data.hasItemOption ? seriesLabelModels[state] : dataIndexInside === currDataIndexInside ? currLabelModels[state] || (currLabelModels[state] = getItemModel(dataIndexInside).getModel(PATH_LABEL[state])) : getItemModel(dataIndexInside).getModel(PATH_LABEL[state]);\n }\n return function (dataIndexInside, payload) {\n currDataIndexInside = dataIndexInside;\n currItemModel = null;\n currItemStyleModels = {};\n currLabelModels = {};\n return renderItem && renderItem(defaults({\n dataIndexInside: dataIndexInside,\n dataIndex: data.getRawIndex(dataIndexInside),\n // Can be used for optimization when zoom or roam.\n actionType: payload ? payload.type : null\n }, userParams), userAPI);\n };\n /**\n * @public\n * @param dim by default 0.\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function value(dim, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n return data.getStore().get(data.getDimensionIndex(dim || 0), dataIndexInside);\n }\n /**\n * @public\n * @param dim by default 0.\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function ordinalRawValue(dim, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n dim = dim || 0;\n var dimInfo = data.getDimensionInfo(dim);\n if (!dimInfo) {\n var dimIndex = data.getDimensionIndex(dim);\n return dimIndex >= 0 ? data.getStore().get(dimIndex, dataIndexInside) : undefined;\n }\n var val = data.get(dimInfo.name, dataIndexInside);\n var ordinalMeta = dimInfo && dimInfo.ordinalMeta;\n return ordinalMeta ? ordinalMeta.categories[val] : val;\n }\n /**\n * @deprecated The original intention of `api.style` is enable to set itemStyle\n * like other series. But it is not necessary and not easy to give a strict definition\n * of what it returns. And since echarts5 it needs to be make compat work. So\n * deprecates it since echarts5.\n *\n * By default, `visual` is applied to style (to support visualMap).\n * `visual.color` is applied at `fill`. If user want apply visual.color on `stroke`,\n * it can be implemented as:\n * `api.style({stroke: api.visual('color'), fill: null})`;\n *\n * [Compat]: since ec5, RectText has been separated from its hosts el.\n * so `api.style()` will only return the style from `itemStyle` but not handle `label`\n * any more. But `series.label` config is never published in doc.\n * We still compat it in `api.style()`. But not encourage to use it and will still not\n * to pulish it to doc.\n * @public\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function style(userProps, dataIndexInside) {\n if (process.env.NODE_ENV !== 'production') {\n warnDeprecated('api.style', 'Please write literal style directly instead.');\n }\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n var style = data.getItemVisual(dataIndexInside, 'style');\n var visualColor = style && style.fill;\n var opacity = style && style.opacity;\n var itemStyle = getItemStyleModel(dataIndexInside, NORMAL).getItemStyle();\n visualColor != null && (itemStyle.fill = visualColor);\n opacity != null && (itemStyle.opacity = opacity);\n var opt = {\n inheritColor: isString(visualColor) ? visualColor : '#000'\n };\n var labelModel = getLabelModel(dataIndexInside, NORMAL);\n // Now that the feature of \"auto adjust text fill/stroke\" has been migrated to zrender\n // since ec5, we should set `isAttached` as `false` here and make compat in\n // `convertToEC4StyleForCustomSerise`.\n var textStyle = labelStyleHelper.createTextStyle(labelModel, null, opt, false, true);\n textStyle.text = labelModel.getShallow('show') ? retrieve2(customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null;\n var textConfig = labelStyleHelper.createTextConfig(labelModel, opt, false);\n preFetchFromExtra(userProps, itemStyle);\n itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig);\n userProps && applyUserPropsAfter(itemStyle, userProps);\n itemStyle.legacy = true;\n return itemStyle;\n }\n /**\n * @deprecated The reason see `api.style()`\n * @public\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function styleEmphasis(userProps, dataIndexInside) {\n if (process.env.NODE_ENV !== 'production') {\n warnDeprecated('api.styleEmphasis', 'Please write literal style directly instead.');\n }\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n var itemStyle = getItemStyleModel(dataIndexInside, EMPHASIS).getItemStyle();\n var labelModel = getLabelModel(dataIndexInside, EMPHASIS);\n var textStyle = labelStyleHelper.createTextStyle(labelModel, null, null, true, true);\n textStyle.text = labelModel.getShallow('show') ? retrieve3(customSeries.getFormattedLabel(dataIndexInside, EMPHASIS), customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null;\n var textConfig = labelStyleHelper.createTextConfig(labelModel, null, true);\n preFetchFromExtra(userProps, itemStyle);\n itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig);\n userProps && applyUserPropsAfter(itemStyle, userProps);\n itemStyle.legacy = true;\n return itemStyle;\n }\n function applyUserPropsAfter(itemStyle, extra) {\n for (var key in extra) {\n if (hasOwn(extra, key)) {\n itemStyle[key] = extra[key];\n }\n }\n }\n function preFetchFromExtra(extra, itemStyle) {\n // A trick to retrieve those props firstly, which are used to\n // apply auto inside fill/stroke in `convertToEC4StyleForCustomSerise`.\n // (It's not reasonable but only for a degree of compat)\n if (extra) {\n extra.textFill && (itemStyle.textFill = extra.textFill);\n extra.textPosition && (itemStyle.textPosition = extra.textPosition);\n }\n }\n /**\n * @public\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function visual(visualType, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n if (hasOwn(STYLE_VISUAL_TYPE, visualType)) {\n var style_1 = data.getItemVisual(dataIndexInside, 'style');\n return style_1 ? style_1[STYLE_VISUAL_TYPE[visualType]] : null;\n }\n // Only support these visuals. Other visual might be inner tricky\n // for performance (like `style`), do not expose to users.\n if (hasOwn(NON_STYLE_VISUAL_PROPS, visualType)) {\n return data.getItemVisual(dataIndexInside, visualType);\n }\n }\n /**\n * @public\n * @return If not support, return undefined.\n */\n function barLayout(opt) {\n if (coordSys.type === 'cartesian2d') {\n var baseAxis = coordSys.getBaseAxis();\n return getLayoutOnAxis(defaults({\n axis: baseAxis\n }, opt));\n }\n }\n /**\n * @public\n */\n function currentSeriesIndices() {\n return ecModel.getCurrentSeriesIndices();\n }\n /**\n * @public\n * @return font string\n */\n function font(opt) {\n return labelStyleHelper.getFont(opt, ecModel);\n }\n}\nfunction wrapEncodeDef(data) {\n var encodeDef = {};\n each(data.dimensions, function (dimName) {\n var dimInfo = data.getDimensionInfo(dimName);\n if (!dimInfo.isExtraCoord) {\n var coordDim = dimInfo.coordDim;\n var dataDims = encodeDef[coordDim] = encodeDef[coordDim] || [];\n dataDims[dimInfo.coordDimIndex] = data.getDimensionIndex(dimName);\n }\n });\n return encodeDef;\n}\nfunction createOrUpdateItem(api, existsEl, dataIndex, elOption, seriesModel, group, data) {\n // [Rule]\n // If `renderItem` returns `null`/`undefined`/`false`, remove the previous el if existing.\n // (It seems that violate the \"merge\" principle, but most of users probably intuitively\n // regard \"return;\" as \"show nothing element whatever\", so make a exception to meet the\n // most cases.)\n // The rule or \"merge\" see [STRATEGY_MERGE].\n // If `elOption` is `null`/`undefined`/`false` (when `renderItem` returns nothing).\n if (!elOption) {\n group.remove(existsEl);\n return;\n }\n var el = doCreateOrUpdateEl(api, existsEl, dataIndex, elOption, seriesModel, group);\n el && data.setItemGraphicEl(dataIndex, el);\n el && toggleHoverEmphasis(el, elOption.focus, elOption.blurScope, elOption.emphasisDisabled);\n return el;\n}\nfunction doCreateOrUpdateEl(api, existsEl, dataIndex, elOption, seriesModel, group) {\n if (process.env.NODE_ENV !== 'production') {\n assert(elOption, 'should not have an null/undefined element setting');\n }\n var toBeReplacedIdx = -1;\n var oldEl = existsEl;\n if (existsEl && doesElNeedRecreate(existsEl, elOption, seriesModel)\n // || (\n // // PENDING: even in one-to-one mapping case, if el is marked as morph,\n // // do not sure whether the el will be mapped to another el with different\n // // hierarchy in Group tree. So always recreate el rather than reuse the el.\n // morphHelper && morphHelper.isOneToOneFrom(el)\n // )\n ) {\n // Should keep at the original index, otherwise \"merge by index\" will be incorrect.\n toBeReplacedIdx = indexOf(group.childrenRef(), existsEl);\n existsEl = null;\n }\n var isInit = !existsEl;\n var el = existsEl;\n if (!el) {\n el = createEl(elOption);\n if (oldEl) {\n copyElement(oldEl, el);\n }\n } else {\n // FIMXE:NEXT unified clearState?\n // If in some case the performance issue arised, consider\n // do not clearState but update cached normal state directly.\n el.clearStates();\n }\n // Need to set morph: false explictly to disable automatically morphing.\n if (elOption.morph === false) {\n el.disableMorphing = true;\n } else if (el.disableMorphing) {\n el.disableMorphing = false;\n }\n attachedTxInfoTmp.normal.cfg = attachedTxInfoTmp.normal.conOpt = attachedTxInfoTmp.emphasis.cfg = attachedTxInfoTmp.emphasis.conOpt = attachedTxInfoTmp.blur.cfg = attachedTxInfoTmp.blur.conOpt = attachedTxInfoTmp.select.cfg = attachedTxInfoTmp.select.conOpt = null;\n attachedTxInfoTmp.isLegacy = false;\n doCreateOrUpdateAttachedTx(el, dataIndex, elOption, seriesModel, isInit, attachedTxInfoTmp);\n doCreateOrUpdateClipPath(el, dataIndex, elOption, seriesModel, isInit);\n updateElNormal(api, el, dataIndex, elOption, attachedTxInfoTmp, seriesModel, isInit);\n // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n // Update them only when user specified, otherwise, remain.\n hasOwn(elOption, 'info') && (customInnerStore(el).info = elOption.info);\n for (var i = 0; i < STATES.length; i++) {\n var stateName = STATES[i];\n if (stateName !== NORMAL) {\n var otherStateOpt = retrieveStateOption(elOption, stateName);\n var otherStyleOpt = retrieveStyleOptionOnState(elOption, otherStateOpt, stateName);\n updateElOnState(stateName, el, otherStateOpt, otherStyleOpt, attachedTxInfoTmp);\n }\n }\n updateZ(el, elOption, seriesModel);\n if (elOption.type === 'group') {\n mergeChildren(api, el, dataIndex, elOption, seriesModel);\n }\n if (toBeReplacedIdx >= 0) {\n group.replaceAt(el, toBeReplacedIdx);\n } else {\n group.add(el);\n }\n return el;\n}\n// `el` must not be null/undefined.\nfunction doesElNeedRecreate(el, elOption, seriesModel) {\n var elInner = customInnerStore(el);\n var elOptionType = elOption.type;\n var elOptionShape = elOption.shape;\n var elOptionStyle = elOption.style;\n return (\n // Always create new if universal transition is enabled.\n // Because we do transition after render. It needs to know what old element is. Replacement will loose it.\n seriesModel.isUniversalTransitionEnabled()\n // If `elOptionType` is `null`, follow the merge principle.\n || elOptionType != null && elOptionType !== elInner.customGraphicType || elOptionType === 'path' && hasOwnPathData(elOptionShape) && getPathData(elOptionShape) !== elInner.customPathData || elOptionType === 'image' && hasOwn(elOptionStyle, 'image') && elOptionStyle.image !== elInner.customImagePath\n // // FIXME test and remove this restriction?\n // || (elOptionType === 'text'\n // && hasOwn(elOptionStyle, 'text')\n // && (elOptionStyle as TextStyleProps).text !== elInner.customText\n // )\n );\n}\n\nfunction doCreateOrUpdateClipPath(el, dataIndex, elOption, seriesModel, isInit) {\n // Based on the \"merge\" principle, if no clipPath provided,\n // do nothing. The exists clip will be totally removed only if\n // `el.clipPath` is `false`. Otherwise it will be merged/replaced.\n var clipPathOpt = elOption.clipPath;\n if (clipPathOpt === false) {\n if (el && el.getClipPath()) {\n el.removeClipPath();\n }\n } else if (clipPathOpt) {\n var clipPath = el.getClipPath();\n if (clipPath && doesElNeedRecreate(clipPath, clipPathOpt, seriesModel)) {\n clipPath = null;\n }\n if (!clipPath) {\n clipPath = createEl(clipPathOpt);\n if (process.env.NODE_ENV !== 'production') {\n assert(isPath(clipPath), 'Only any type of `path` can be used in `clipPath`, rather than ' + clipPath.type + '.');\n }\n el.setClipPath(clipPath);\n }\n updateElNormal(null, clipPath, dataIndex, clipPathOpt, null, seriesModel, isInit);\n }\n // If not define `clipPath` in option, do nothing unnecessary.\n}\n\nfunction doCreateOrUpdateAttachedTx(el, dataIndex, elOption, seriesModel, isInit, attachedTxInfo) {\n // Group does not support textContent temporarily until necessary.\n if (el.isGroup) {\n return;\n }\n // Normal must be called before emphasis, for `isLegacy` detection.\n processTxInfo(elOption, null, attachedTxInfo);\n processTxInfo(elOption, EMPHASIS, attachedTxInfo);\n // If `elOption.textConfig` or `elOption.textContent` is null/undefined, it does not make sense.\n // So for simplicity, if \"elOption hasOwnProperty of them but be null/undefined\", we do not\n // trade them as set to null to el.\n // Especially:\n // `elOption.textContent: false` means remove textContent.\n // `elOption.textContent.emphasis.style: false` means remove the style from emphasis state.\n var txConOptNormal = attachedTxInfo.normal.conOpt;\n var txConOptEmphasis = attachedTxInfo.emphasis.conOpt;\n var txConOptBlur = attachedTxInfo.blur.conOpt;\n var txConOptSelect = attachedTxInfo.select.conOpt;\n if (txConOptNormal != null || txConOptEmphasis != null || txConOptSelect != null || txConOptBlur != null) {\n var textContent = el.getTextContent();\n if (txConOptNormal === false) {\n textContent && el.removeTextContent();\n } else {\n txConOptNormal = attachedTxInfo.normal.conOpt = txConOptNormal || {\n type: 'text'\n };\n if (!textContent) {\n textContent = createEl(txConOptNormal);\n el.setTextContent(textContent);\n } else {\n // If in some case the performance issue arised, consider\n // do not clearState but update cached normal state directly.\n textContent.clearStates();\n }\n updateElNormal(null, textContent, dataIndex, txConOptNormal, null, seriesModel, isInit);\n var txConStlOptNormal = txConOptNormal && txConOptNormal.style;\n for (var i = 0; i < STATES.length; i++) {\n var stateName = STATES[i];\n if (stateName !== NORMAL) {\n var txConOptOtherState = attachedTxInfo[stateName].conOpt;\n updateElOnState(stateName, textContent, txConOptOtherState, retrieveStyleOptionOnState(txConOptNormal, txConOptOtherState, stateName), null);\n }\n }\n txConStlOptNormal ? textContent.dirty() : textContent.markRedraw();\n }\n }\n}\nfunction processTxInfo(elOption, state, attachedTxInfo) {\n var stateOpt = !state ? elOption : retrieveStateOption(elOption, state);\n var styleOpt = !state ? elOption.style : retrieveStyleOptionOnState(elOption, stateOpt, EMPHASIS);\n var elType = elOption.type;\n var txCfg = stateOpt ? stateOpt.textConfig : null;\n var txConOptNormal = elOption.textContent;\n var txConOpt = !txConOptNormal ? null : !state ? txConOptNormal : retrieveStateOption(txConOptNormal, state);\n if (styleOpt && (\n // Because emphasis style has little info to detect legacy,\n // if normal is legacy, emphasis is trade as legacy.\n attachedTxInfo.isLegacy || isEC4CompatibleStyle(styleOpt, elType, !!txCfg, !!txConOpt))) {\n attachedTxInfo.isLegacy = true;\n var convertResult = convertFromEC4CompatibleStyle(styleOpt, elType, !state);\n // Explicitly specified `textConfig` and `textContent` has higher priority than\n // the ones generated by legacy style. Otherwise if users use them and `api.style`\n // at the same time, they not both work and hardly to known why.\n if (!txCfg && convertResult.textConfig) {\n txCfg = convertResult.textConfig;\n }\n if (!txConOpt && convertResult.textContent) {\n txConOpt = convertResult.textContent;\n }\n }\n if (!state && txConOpt) {\n var txConOptNormal_1 = txConOpt;\n // `textContent: {type: 'text'}`, the \"type\" is easy to be missing. So we tolerate it.\n !txConOptNormal_1.type && (txConOptNormal_1.type = 'text');\n if (process.env.NODE_ENV !== 'production') {\n // Do not tolerate incorrcet type for forward compat.\n assert(txConOptNormal_1.type === 'text', 'textContent.type must be \"text\"');\n }\n }\n var info = !state ? attachedTxInfo.normal : attachedTxInfo[state];\n info.cfg = txCfg;\n info.conOpt = txConOpt;\n}\nfunction retrieveStateOption(elOption, state) {\n return !state ? elOption : elOption ? elOption[state] : null;\n}\nfunction retrieveStyleOptionOnState(stateOptionNormal, stateOption, state) {\n var style = stateOption && stateOption.style;\n if (style == null && state === EMPHASIS && stateOptionNormal) {\n style = stateOptionNormal.styleEmphasis;\n }\n return style;\n}\n// Usage:\n// (1) By default, `elOption.$mergeChildren` is `'byIndex'`, which indicates\n// that the existing children will not be removed, and enables the feature\n// that update some of the props of some of the children simply by construct\n// the returned children of `renderItem` like:\n// `var children = group.children = []; children[3] = {opacity: 0.5};`\n// (2) If `elOption.$mergeChildren` is `'byName'`, add/update/remove children\n// by child.name. But that might be lower performance.\n// (3) If `elOption.$mergeChildren` is `false`, the existing children will be\n// replaced totally.\n// (4) If `!elOption.children`, following the \"merge\" principle, nothing will\n// happen.\n// (5) If `elOption.$mergeChildren` is not `false` neither `'byName'` and the\n// `el` is a group, and if any of the new child is null, it means to remove\n// the element at the same index, if exists. On the other hand, if the new\n// child is and empty object `{}`, it means to keep the element not changed.\n//\n// For implementation simpleness, do not provide a direct way to remove single\n// child (otherwise the total indices of the children array have to be modified).\n// User can remove a single child by setting its `ignore` to `true`.\nfunction mergeChildren(api, el, dataIndex, elOption, seriesModel) {\n var newChildren = elOption.children;\n var newLen = newChildren ? newChildren.length : 0;\n var mergeChildren = elOption.$mergeChildren;\n // `diffChildrenByName` has been deprecated.\n var byName = mergeChildren === 'byName' || elOption.diffChildrenByName;\n var notMerge = mergeChildren === false;\n // For better performance on roam update, only enter if necessary.\n if (!newLen && !byName && !notMerge) {\n return;\n }\n if (byName) {\n diffGroupChildren({\n api: api,\n oldChildren: el.children() || [],\n newChildren: newChildren || [],\n dataIndex: dataIndex,\n seriesModel: seriesModel,\n group: el\n });\n return;\n }\n notMerge && el.removeAll();\n // Mapping children of a group simply by index, which\n // might be better performance.\n var index = 0;\n for (; index < newLen; index++) {\n var newChild = newChildren[index];\n var oldChild = el.childAt(index);\n if (newChild) {\n if (newChild.ignore == null) {\n // The old child is set to be ignored if null (see comments\n // below). So we need to set ignore to be false back.\n newChild.ignore = false;\n }\n doCreateOrUpdateEl(api, oldChild, dataIndex, newChild, seriesModel, el);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n assert(oldChild, 'renderItem should not return a group containing elements' + ' as null/undefined/{} if they do not exist before.');\n }\n // If the new element option is null, it means to remove the old\n // element. But we cannot really remove the element from the group\n // directly, because the element order may not be stable when this\n // element is added back. So we set the element to be ignored.\n oldChild.ignore = true;\n }\n }\n for (var i = el.childCount() - 1; i >= index; i--) {\n var child = el.childAt(i);\n removeChildFromGroup(el, child, seriesModel);\n }\n}\nfunction removeChildFromGroup(group, child, seriesModel) {\n // Do not support leave elements that are not mentioned in the latest\n // `renderItem` return. Otherwise users may not have a clear and simple\n // concept that how to control all of the elements.\n child && applyLeaveTransition(child, customInnerStore(group).option, seriesModel);\n}\nfunction diffGroupChildren(context) {\n new DataDiffer(context.oldChildren, context.newChildren, getKey, getKey, context).add(processAddUpdate).update(processAddUpdate).remove(processRemove).execute();\n}\nfunction getKey(item, idx) {\n var name = item && item.name;\n return name != null ? name : GROUP_DIFF_PREFIX + idx;\n}\nfunction processAddUpdate(newIndex, oldIndex) {\n var context = this.context;\n var childOption = newIndex != null ? context.newChildren[newIndex] : null;\n var child = oldIndex != null ? context.oldChildren[oldIndex] : null;\n doCreateOrUpdateEl(context.api, child, context.dataIndex, childOption, context.seriesModel, context.group);\n}\nfunction processRemove(oldIndex) {\n var context = this.context;\n var child = context.oldChildren[oldIndex];\n child && applyLeaveTransition(child, customInnerStore(child).option, context.seriesModel);\n}\n/**\n * @return SVG Path data.\n */\nfunction getPathData(shape) {\n // \"d\" follows the SVG convention.\n return shape && (shape.pathData || shape.d);\n}\nfunction hasOwnPathData(shape) {\n return shape && (hasOwn(shape, 'pathData') || hasOwn(shape, 'd'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CustomSeriesModel from './CustomSeries.js';\nimport CustomChartView from './CustomView.js';\nexport function install(registers) {\n registers.registerChartView(CustomChartView);\n registers.registerSeriesModel(CustomSeriesModel);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as axisPointerModelHelper from './modelHelper.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar clone = zrUtil.clone;\nvar bind = zrUtil.bind;\n/**\n * Base axis pointer class in 2D.\n */\nvar BaseAxisPointer = /** @class */function () {\n function BaseAxisPointer() {\n this._dragging = false;\n /**\n * In px, arbitrary value. Do not set too small,\n * no animation is ok for most cases.\n */\n this.animationThreshold = 15;\n }\n /**\n * @implement\n */\n BaseAxisPointer.prototype.render = function (axisModel, axisPointerModel, api, forceRender) {\n var value = axisPointerModel.get('value');\n var status = axisPointerModel.get('status');\n // Bind them to `this`, not in closure, otherwise they will not\n // be replaced when user calling setOption in not merge mode.\n this._axisModel = axisModel;\n this._axisPointerModel = axisPointerModel;\n this._api = api;\n // Optimize: `render` will be called repeatedly during mouse move.\n // So it is power consuming if performing `render` each time,\n // especially on mobile device.\n if (!forceRender && this._lastValue === value && this._lastStatus === status) {\n return;\n }\n this._lastValue = value;\n this._lastStatus = status;\n var group = this._group;\n var handle = this._handle;\n if (!status || status === 'hide') {\n // Do not clear here, for animation better.\n group && group.hide();\n handle && handle.hide();\n return;\n }\n group && group.show();\n handle && handle.show();\n // Otherwise status is 'show'\n var elOption = {};\n this.makeElOption(elOption, value, axisModel, axisPointerModel, api);\n // Enable change axis pointer type.\n var graphicKey = elOption.graphicKey;\n if (graphicKey !== this._lastGraphicKey) {\n this.clear(api);\n }\n this._lastGraphicKey = graphicKey;\n var moveAnimation = this._moveAnimation = this.determineAnimation(axisModel, axisPointerModel);\n if (!group) {\n group = this._group = new graphic.Group();\n this.createPointerEl(group, elOption, axisModel, axisPointerModel);\n this.createLabelEl(group, elOption, axisModel, axisPointerModel);\n api.getZr().add(group);\n } else {\n var doUpdateProps = zrUtil.curry(updateProps, axisPointerModel, moveAnimation);\n this.updatePointerEl(group, elOption, doUpdateProps);\n this.updateLabelEl(group, elOption, doUpdateProps, axisPointerModel);\n }\n updateMandatoryProps(group, axisPointerModel, true);\n this._renderHandle(value);\n };\n /**\n * @implement\n */\n BaseAxisPointer.prototype.remove = function (api) {\n this.clear(api);\n };\n /**\n * @implement\n */\n BaseAxisPointer.prototype.dispose = function (api) {\n this.clear(api);\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.determineAnimation = function (axisModel, axisPointerModel) {\n var animation = axisPointerModel.get('animation');\n var axis = axisModel.axis;\n var isCategoryAxis = axis.type === 'category';\n var useSnap = axisPointerModel.get('snap');\n // Value axis without snap always do not snap.\n if (!useSnap && !isCategoryAxis) {\n return false;\n }\n if (animation === 'auto' || animation == null) {\n var animationThreshold = this.animationThreshold;\n if (isCategoryAxis && axis.getBandWidth() > animationThreshold) {\n return true;\n }\n // It is important to auto animation when snap used. Consider if there is\n // a dataZoom, animation will be disabled when too many points exist, while\n // it will be enabled for better visual effect when little points exist.\n if (useSnap) {\n var seriesDataCount = axisPointerModelHelper.getAxisInfo(axisModel).seriesDataCount;\n var axisExtent = axis.getExtent();\n // Approximate band width\n return Math.abs(axisExtent[0] - axisExtent[1]) / seriesDataCount > animationThreshold;\n }\n return false;\n }\n return animation === true;\n };\n /**\n * add {pointer, label, graphicKey} to elOption\n * @protected\n */\n BaseAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n // Should be implemenented by sub-class.\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.createPointerEl = function (group, elOption, axisModel, axisPointerModel) {\n var pointerOption = elOption.pointer;\n if (pointerOption) {\n var pointerEl = inner(group).pointerEl = new graphic[pointerOption.type](clone(elOption.pointer));\n group.add(pointerEl);\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.createLabelEl = function (group, elOption, axisModel, axisPointerModel) {\n if (elOption.label) {\n var labelEl = inner(group).labelEl = new graphic.Text(clone(elOption.label));\n group.add(labelEl);\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.updatePointerEl = function (group, elOption, updateProps) {\n var pointerEl = inner(group).pointerEl;\n if (pointerEl && elOption.pointer) {\n pointerEl.setStyle(elOption.pointer.style);\n updateProps(pointerEl, {\n shape: elOption.pointer.shape\n });\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.updateLabelEl = function (group, elOption, updateProps, axisPointerModel) {\n var labelEl = inner(group).labelEl;\n if (labelEl) {\n labelEl.setStyle(elOption.label.style);\n updateProps(labelEl, {\n // Consider text length change in vertical axis, animation should\n // be used on shape, otherwise the effect will be weird.\n // TODOTODO\n // shape: elOption.label.shape,\n x: elOption.label.x,\n y: elOption.label.y\n });\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n };\n /**\n * @private\n */\n BaseAxisPointer.prototype._renderHandle = function (value) {\n if (this._dragging || !this.updateHandleTransform) {\n return;\n }\n var axisPointerModel = this._axisPointerModel;\n var zr = this._api.getZr();\n var handle = this._handle;\n var handleModel = axisPointerModel.getModel('handle');\n var status = axisPointerModel.get('status');\n if (!handleModel.get('show') || !status || status === 'hide') {\n handle && zr.remove(handle);\n this._handle = null;\n return;\n }\n var isInit;\n if (!this._handle) {\n isInit = true;\n handle = this._handle = graphic.createIcon(handleModel.get('icon'), {\n cursor: 'move',\n draggable: true,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n onmousedown: bind(this._onHandleDragMove, this, 0, 0),\n drift: bind(this._onHandleDragMove, this),\n ondragend: bind(this._onHandleDragEnd, this)\n });\n zr.add(handle);\n }\n updateMandatoryProps(handle, axisPointerModel, false);\n // update style\n handle.setStyle(handleModel.getItemStyle(null, ['color', 'borderColor', 'borderWidth', 'opacity', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY']));\n // update position\n var handleSize = handleModel.get('size');\n if (!zrUtil.isArray(handleSize)) {\n handleSize = [handleSize, handleSize];\n }\n handle.scaleX = handleSize[0] / 2;\n handle.scaleY = handleSize[1] / 2;\n throttleUtil.createOrUpdate(this, '_doDispatchAxisPointer', handleModel.get('throttle') || 0, 'fixRate');\n this._moveHandleToValue(value, isInit);\n };\n BaseAxisPointer.prototype._moveHandleToValue = function (value, isInit) {\n updateProps(this._axisPointerModel, !isInit && this._moveAnimation, this._handle, getHandleTransProps(this.getHandleTransform(value, this._axisModel, this._axisPointerModel)));\n };\n BaseAxisPointer.prototype._onHandleDragMove = function (dx, dy) {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n this._dragging = true;\n // Persistent for throttle.\n var trans = this.updateHandleTransform(getHandleTransProps(handle), [dx, dy], this._axisModel, this._axisPointerModel);\n this._payloadInfo = trans;\n handle.stopAnimation();\n handle.attr(getHandleTransProps(trans));\n inner(handle).lastProp = null;\n this._doDispatchAxisPointer();\n };\n /**\n * Throttled method.\n */\n BaseAxisPointer.prototype._doDispatchAxisPointer = function () {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n var payloadInfo = this._payloadInfo;\n var axisModel = this._axisModel;\n this._api.dispatchAction({\n type: 'updateAxisPointer',\n x: payloadInfo.cursorPoint[0],\n y: payloadInfo.cursorPoint[1],\n tooltipOption: payloadInfo.tooltipOption,\n axesInfo: [{\n axisDim: axisModel.axis.dim,\n axisIndex: axisModel.componentIndex\n }]\n });\n };\n BaseAxisPointer.prototype._onHandleDragEnd = function () {\n this._dragging = false;\n var handle = this._handle;\n if (!handle) {\n return;\n }\n var value = this._axisPointerModel.get('value');\n // Consider snap or categroy axis, handle may be not consistent with\n // axisPointer. So move handle to align the exact value position when\n // drag ended.\n this._moveHandleToValue(value);\n // For the effect: tooltip will be shown when finger holding on handle\n // button, and will be hidden after finger left handle button.\n this._api.dispatchAction({\n type: 'hideTip'\n });\n };\n /**\n * @private\n */\n BaseAxisPointer.prototype.clear = function (api) {\n this._lastValue = null;\n this._lastStatus = null;\n var zr = api.getZr();\n var group = this._group;\n var handle = this._handle;\n if (zr && group) {\n this._lastGraphicKey = null;\n group && zr.remove(group);\n handle && zr.remove(handle);\n this._group = null;\n this._handle = null;\n this._payloadInfo = null;\n }\n throttleUtil.clear(this, '_doDispatchAxisPointer');\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.doClear = function () {\n // Implemented by sub-class if necessary.\n };\n BaseAxisPointer.prototype.buildLabel = function (xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n };\n return BaseAxisPointer;\n}();\nfunction updateProps(animationModel, moveAnimation, el, props) {\n // Animation optimize.\n if (!propsEqual(inner(el).lastProp, props)) {\n inner(el).lastProp = props;\n moveAnimation ? graphic.updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props));\n }\n}\nfunction propsEqual(lastProps, newProps) {\n if (zrUtil.isObject(lastProps) && zrUtil.isObject(newProps)) {\n var equals_1 = true;\n zrUtil.each(newProps, function (item, key) {\n equals_1 = equals_1 && propsEqual(lastProps[key], item);\n });\n return !!equals_1;\n } else {\n return lastProps === newProps;\n }\n}\nfunction updateLabelShowHide(labelEl, axisPointerModel) {\n labelEl[axisPointerModel.get(['label', 'show']) ? 'show' : 'hide']();\n}\nfunction getHandleTransProps(trans) {\n return {\n x: trans.x || 0,\n y: trans.y || 0,\n rotation: trans.rotation || 0\n };\n}\nfunction updateMandatoryProps(group, axisPointerModel, silent) {\n var z = axisPointerModel.get('z');\n var zlevel = axisPointerModel.get('zlevel');\n group && group.traverse(function (el) {\n if (el.type !== 'group') {\n z != null && (el.z = z);\n zlevel != null && (el.zlevel = zlevel);\n el.silent = silent;\n }\n });\n}\nexport default BaseAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nexport function buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n } else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n return style;\n}\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\nexport function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n });\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2];\n // Adjust by align.\n var align = labelPos.align;\n align === 'right' && (position[0] -= width);\n align === 'center' && (position[0] -= width / 2);\n var verticalAlign = labelPos.verticalAlign;\n verticalAlign === 'bottom' && (position[1] -= height);\n verticalAlign === 'middle' && (position[1] -= height / 2);\n // Not overflow ec container\n confineInContainer(position, width, height, api);\n var bgColor = labelModel.get('backgroundColor');\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get(['axisLine', 'lineStyle', 'color']);\n }\n elOption.label = {\n // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},\n x: position[0],\n y: position[1],\n style: createTextStyle(labelModel, {\n text: text,\n font: font,\n fill: labelModel.getTextColor(),\n padding: paddings,\n backgroundColor: bgColor\n }),\n // Label should be over axisPointer.\n z2: 10\n };\n}\n// Do not overflow ec container\nfunction confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}\nexport function getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel({\n value: value\n }, {\n // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n precision: opt.precision\n });\n var formatter = opt.formatter;\n if (formatter) {\n var params_1 = {\n value: axisHelper.getAxisRawValue(axis, {\n value: value\n }),\n axisDimension: axis.dim,\n axisIndex: axis.index,\n seriesData: []\n };\n zrUtil.each(seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams && params_1.seriesData.push(dataParams);\n });\n if (zrUtil.isString(formatter)) {\n text = formatter.replace('{value}', text);\n } else if (zrUtil.isFunction(formatter)) {\n text = formatter(params_1);\n }\n }\n return text;\n}\nexport function getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n return graphic.applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform);\n}\nexport function buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) {\n // @ts-ignore\n var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection);\n layoutInfo.labelMargin = axisPointerModel.get(['label', 'margin']);\n buildLabelElOption(elOption, axisModel, axisPointerModel, api, {\n position: getTransformedPosition(axisModel.axis, value, layoutInfo),\n align: textLayout.textAlign,\n verticalAlign: textLayout.textVerticalAlign\n });\n}\nexport function makeLineShape(p1, p2, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x1: p1[xDimIndex],\n y1: p1[1 - xDimIndex],\n x2: p2[xDimIndex],\n y2: p2[1 - xDimIndex]\n };\n}\nexport function makeRectShape(xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n}\nexport function makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper.js';\nvar CartesianAxisPointer = /** @class */function (_super) {\n __extends(CartesianAxisPointer, _super);\n function CartesianAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n CartesianAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisPointerType = axisPointerModel.get('type');\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var pixelValue = axis.toGlobalCoord(axis.dataToCoord(value, true));\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var layoutInfo = cartesianAxisHelper.layout(grid.model, axisModel);\n viewHelper.buildCartesianSingleLabelElOption(\n // @ts-ignore\n value, elOption, layoutInfo, axisModel, axisPointerModel, api);\n };\n /**\n * @override\n */\n CartesianAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {\n var layoutInfo = cartesianAxisHelper.layout(axisModel.axis.grid.model, axisModel, {\n labelInside: false\n });\n // @ts-ignore\n layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']);\n var pos = viewHelper.getTransformedPosition(axisModel.axis, value, layoutInfo);\n return {\n x: pos[0],\n y: pos[1],\n rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)\n };\n };\n /**\n * @override\n */\n CartesianAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisExtent = axis.getGlobalExtent(true);\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var dimIndex = axis.dim === 'x' ? 0 : 1;\n var currPosition = [transform.x, transform.y];\n currPosition[dimIndex] += delta[dimIndex];\n currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]);\n currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]);\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n // Make tooltip do not overlap axisPointer and in the middle of the grid.\n var tooltipOptions = [{\n verticalAlign: 'middle'\n }, {\n align: 'center'\n }];\n return {\n x: currPosition[0],\n y: currPosition[1],\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: tooltipOptions[dimIndex]\n };\n };\n return CartesianAxisPointer;\n}(BaseAxisPointer);\nfunction getCartesian(grid, axis) {\n var opt = {};\n opt[axis.dim + 'AxisIndex'] = axis.index;\n return grid.getCartesian(opt);\n}\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getAxisDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var span = otherExtent[1] - otherExtent[0];\n return {\n type: 'Rect',\n shape: viewHelper.makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getAxisDimIndex(axis))\n };\n }\n};\nfunction getAxisDimIndex(axis) {\n return axis.dim === 'x' ? 0 : 1;\n}\nexport default CartesianAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar AxisPointerModel = /** @class */function (_super) {\n __extends(AxisPointerModel, _super);\n function AxisPointerModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisPointerModel.type;\n return _this;\n }\n AxisPointerModel.type = 'axisPointer';\n AxisPointerModel.defaultOption = {\n // 'auto' means that show when triggered by tooltip or handle.\n show: 'auto',\n // zlevel: 0,\n z: 50,\n type: 'line',\n // axispointer triggered by tootip determine snap automatically,\n // see `modelHelper`.\n snap: false,\n triggerTooltip: true,\n triggerEmphasis: true,\n value: null,\n status: null,\n link: [],\n // Do not set 'auto' here, otherwise global animation: false\n // will not effect at this axispointer.\n animation: null,\n animationDurationUpdate: 200,\n lineStyle: {\n color: '#B9BEC9',\n width: 1,\n type: 'dashed'\n },\n shadowStyle: {\n color: 'rgba(210,219,238,0.2)'\n },\n label: {\n show: true,\n formatter: null,\n precision: 'auto',\n margin: 3,\n color: '#fff',\n padding: [5, 7, 5, 7],\n backgroundColor: 'auto',\n borderColor: null,\n borderWidth: 0,\n borderRadius: 3\n },\n handle: {\n show: false,\n // eslint-disable-next-line\n icon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z',\n size: 45,\n // handle margin is from symbol center to axis, which is stable when circular move.\n margin: 50,\n // color: '#1b8bbd'\n // color: '#2f4554'\n color: '#333',\n shadowBlur: 3,\n shadowColor: '#aaa',\n shadowOffsetX: 0,\n shadowOffsetY: 2,\n // For mobile performance\n throttle: 40\n }\n };\n return AxisPointerModel;\n}(ComponentModel);\nexport default AxisPointerModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar each = zrUtil.each;\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n * @param {Function} handler\n * param: {string} currTrigger\n * param: {Array.} point\n */\nexport function register(key, api, handler) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n inner(zr).records || (inner(zr).records = {});\n initGlobalListeners(zr, api);\n var record = inner(zr).records[key] || (inner(zr).records[key] = {});\n record.handler = handler;\n}\nfunction initGlobalListeners(zr, api) {\n if (inner(zr).initialized) {\n return;\n }\n inner(zr).initialized = true;\n useHandler('click', zrUtil.curry(doEnter, 'click'));\n useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove'));\n // useHandler('mouseout', onLeave);\n useHandler('globalout', onLeave);\n function useHandler(eventType, cb) {\n zr.on(eventType, function (e) {\n var dis = makeDispatchAction(api);\n each(inner(zr).records, function (record) {\n record && cb(record, e, dis.dispatchAction);\n });\n dispatchTooltipFinally(dis.pendings, api);\n });\n }\n}\nfunction dispatchTooltipFinally(pendings, api) {\n var showLen = pendings.showTip.length;\n var hideLen = pendings.hideTip.length;\n var actuallyPayload;\n if (showLen) {\n actuallyPayload = pendings.showTip[showLen - 1];\n } else if (hideLen) {\n actuallyPayload = pendings.hideTip[hideLen - 1];\n }\n if (actuallyPayload) {\n actuallyPayload.dispatchAction = null;\n api.dispatchAction(actuallyPayload);\n }\n}\nfunction onLeave(record, e, dispatchAction) {\n record.handler('leave', null, dispatchAction);\n}\nfunction doEnter(currTrigger, record, e, dispatchAction) {\n record.handler(currTrigger, e, dispatchAction);\n}\nfunction makeDispatchAction(api) {\n var pendings = {\n showTip: [],\n hideTip: []\n };\n // FIXME\n // better approach?\n // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip,\n // which may be conflict, (axisPointer call showTip but tooltip call hideTip);\n // So we have to add \"final stage\" to merge those dispatched actions.\n var dispatchAction = function (payload) {\n var pendingList = pendings[payload.type];\n if (pendingList) {\n pendingList.push(payload);\n } else {\n payload.dispatchAction = dispatchAction;\n api.dispatchAction(payload);\n }\n };\n return {\n dispatchAction: dispatchAction,\n pendings: pendings\n };\n}\nexport function unregister(key, api) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n var record = (inner(zr).records || {})[key];\n if (record) {\n inner(zr).records[key] = null;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as globalListener from './globalListener.js';\nimport ComponentView from '../../view/Component.js';\nvar AxisPointerView = /** @class */function (_super) {\n __extends(AxisPointerView, _super);\n function AxisPointerView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisPointerView.type;\n return _this;\n }\n AxisPointerView.prototype.render = function (globalAxisPointerModel, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var triggerOn = globalAxisPointerModel.get('triggerOn') || globalTooltipModel && globalTooltipModel.get('triggerOn') || 'mousemove|click';\n // Register global listener in AxisPointerView to enable\n // AxisPointerView to be independent to Tooltip.\n globalListener.register('axisPointer', api, function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none' && (currTrigger === 'leave' || triggerOn.indexOf(currTrigger) >= 0)) {\n dispatchAction({\n type: 'updateAxisPointer',\n currTrigger: currTrigger,\n x: e && e.offsetX,\n y: e && e.offsetY\n });\n }\n });\n };\n AxisPointerView.prototype.remove = function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n };\n AxisPointerView.prototype.dispose = function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n };\n AxisPointerView.type = 'axisPointer';\n return AxisPointerView;\n}(ComponentView);\nexport default AxisPointerView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\n/**\n * @param finder contains {seriesIndex, dataIndex, dataIndexInside}\n * @param ecModel\n * @return {point: [x, y], el: ...} point Will not be null.\n */\nexport default function findPointFromSeries(finder, ecModel) {\n var point = [];\n var seriesIndex = finder.seriesIndex;\n var seriesModel;\n if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) {\n return {\n point: []\n };\n }\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, finder);\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\n return {\n point: []\n };\n }\n var el = data.getItemGraphicEl(dataIndex);\n var coordSys = seriesModel.coordinateSystem;\n if (seriesModel.getTooltipPosition) {\n point = seriesModel.getTooltipPosition(dataIndex) || [];\n } else if (coordSys && coordSys.dataToPoint) {\n if (finder.isStacked) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueAxisDim = valueAxis.dim;\n var baseAxisDim = baseAxis.dim;\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var baseDim = data.mapDimension(baseAxisDim);\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(baseDim, dataIndex);\n stackedData[1 - baseDataOffset] = data.get(data.getCalculationInfo('stackResultDimension'), dataIndex);\n point = coordSys.dataToPoint(stackedData) || [];\n } else {\n point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex)) || [];\n }\n } else if (el) {\n // Use graphic bounding rect\n var rect = el.getBoundingRect().clone();\n rect.applyTransform(el.transform);\n point = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n }\n return {\n point: point,\n el: el\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner } from '../../util/model.js';\nimport * as modelHelper from './modelHelper.js';\nimport findPointFromSeries from './findPointFromSeries.js';\nimport { each, curry, bind, extend } from 'zrender/lib/core/util.js';\nvar inner = makeInner();\n/**\n * Basic logic: check all axis, if they do not demand show/highlight,\n * then hide/downplay them.\n *\n * @return content of event obj for echarts.connect.\n */\nexport default function axisTrigger(payload, ecModel, api) {\n var currTrigger = payload.currTrigger;\n var point = [payload.x, payload.y];\n var finder = payload;\n var dispatchAction = payload.dispatchAction || bind(api.dispatchAction, api);\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n // Pending\n // See #6121. But we are not able to reproduce it yet.\n if (!coordSysAxesInfo) {\n return;\n }\n if (illegalPoint(point)) {\n // Used in the default behavior of `connection`: use the sample seriesIndex\n // and dataIndex. And also used in the tooltipView trigger.\n point = findPointFromSeries({\n seriesIndex: finder.seriesIndex,\n // Do not use dataIndexInside from other ec instance.\n // FIXME: auto detect it?\n dataIndex: finder.dataIndex\n }, ecModel).point;\n }\n var isIllegalPoint = illegalPoint(point);\n // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}).\n // Notice: In this case, it is difficult to get the `point` (which is necessary to show\n // tooltip, so if point is not given, we just use the point found by sample seriesIndex\n // and dataIndex.\n var inputAxesInfo = finder.axesInfo;\n var axesInfo = coordSysAxesInfo.axesInfo;\n var shouldHide = currTrigger === 'leave' || illegalPoint(point);\n var outputPayload = {};\n var showValueMap = {};\n var dataByCoordSys = {\n list: [],\n map: {}\n };\n var updaters = {\n showPointer: curry(showPointer, showValueMap),\n showTooltip: curry(showTooltip, dataByCoordSys)\n };\n // Process for triggered axes.\n each(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) {\n // If a point given, it must be contained by the coordinate system.\n var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point);\n each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {\n var axis = axisInfo.axis;\n var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo);\n // If no inputAxesInfo, no axis is restricted.\n if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {\n var val = inputAxisInfo && inputAxisInfo.value;\n if (val == null && !isIllegalPoint) {\n val = axis.pointToData(point);\n }\n val != null && processOnAxis(axisInfo, val, updaters, false, outputPayload);\n }\n });\n });\n // Process for linked axes.\n var linkTriggers = {};\n each(axesInfo, function (tarAxisInfo, tarKey) {\n var linkGroup = tarAxisInfo.linkGroup;\n // If axis has been triggered in the previous stage, it should not be triggered by link.\n if (linkGroup && !showValueMap[tarKey]) {\n each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) {\n var srcValItem = showValueMap[srcKey];\n // If srcValItem exist, source axis is triggered, so link to target axis.\n if (srcAxisInfo !== tarAxisInfo && srcValItem) {\n var val = srcValItem.value;\n linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo))));\n linkTriggers[tarAxisInfo.key] = val;\n }\n });\n }\n });\n each(linkTriggers, function (val, tarKey) {\n processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload);\n });\n updateModelActually(showValueMap, axesInfo, outputPayload);\n dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction);\n dispatchHighDownActually(axesInfo, dispatchAction, api);\n return outputPayload;\n}\nfunction processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) {\n var axis = axisInfo.axis;\n if (axis.scale.isBlank() || !axis.containData(newValue)) {\n return;\n }\n if (!axisInfo.involveSeries) {\n updaters.showPointer(axisInfo, newValue);\n return;\n }\n // Heavy calculation. So put it after axis.containData checking.\n var payloadInfo = buildPayloadsBySeries(newValue, axisInfo);\n var payloadBatch = payloadInfo.payloadBatch;\n var snapToValue = payloadInfo.snapToValue;\n // Fill content of event obj for echarts.connect.\n // By default use the first involved series data as a sample to connect.\n if (payloadBatch[0] && outputFinder.seriesIndex == null) {\n extend(outputFinder, payloadBatch[0]);\n }\n // If no linkSource input, this process is for collecting link\n // target, where snap should not be accepted.\n if (!noSnap && axisInfo.snap) {\n if (axis.containData(snapToValue) && snapToValue != null) {\n newValue = snapToValue;\n }\n }\n updaters.showPointer(axisInfo, newValue, payloadBatch);\n // Tooltip should always be snapToValue, otherwise there will be\n // incorrect \"axis value ~ series value\" mapping displayed in tooltip.\n updaters.showTooltip(axisInfo, payloadInfo, snapToValue);\n}\nfunction buildPayloadsBySeries(value, axisInfo) {\n var axis = axisInfo.axis;\n var dim = axis.dim;\n var snapToValue = value;\n var payloadBatch = [];\n var minDist = Number.MAX_VALUE;\n var minDiff = -1;\n each(axisInfo.seriesModels, function (series, idx) {\n var dataDim = series.getData().mapDimensionsAll(dim);\n var seriesNestestValue;\n var dataIndices;\n if (series.getAxisTooltipData) {\n var result = series.getAxisTooltipData(dataDim, value, axis);\n dataIndices = result.dataIndices;\n seriesNestestValue = result.nestestValue;\n } else {\n dataIndices = series.getData().indicesOfNearest(dataDim[0], value,\n // Add a threshold to avoid find the wrong dataIndex\n // when data length is not same.\n // false,\n axis.type === 'category' ? 0.5 : null);\n if (!dataIndices.length) {\n return;\n }\n seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]);\n }\n if (seriesNestestValue == null || !isFinite(seriesNestestValue)) {\n return;\n }\n var diff = value - seriesNestestValue;\n var dist = Math.abs(diff);\n // Consider category case\n if (dist <= minDist) {\n if (dist < minDist || diff >= 0 && minDiff < 0) {\n minDist = dist;\n minDiff = diff;\n snapToValue = seriesNestestValue;\n payloadBatch.length = 0;\n }\n each(dataIndices, function (dataIndex) {\n payloadBatch.push({\n seriesIndex: series.seriesIndex,\n dataIndexInside: dataIndex,\n dataIndex: series.getData().getRawIndex(dataIndex)\n });\n });\n }\n });\n return {\n payloadBatch: payloadBatch,\n snapToValue: snapToValue\n };\n}\nfunction showPointer(showValueMap, axisInfo, value, payloadBatch) {\n showValueMap[axisInfo.key] = {\n value: value,\n payloadBatch: payloadBatch\n };\n}\nfunction showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) {\n var payloadBatch = payloadInfo.payloadBatch;\n var axis = axisInfo.axis;\n var axisModel = axis.model;\n var axisPointerModel = axisInfo.axisPointerModel;\n // If no data, do not create anything in dataByCoordSys,\n // whose length will be used to judge whether dispatch action.\n if (!axisInfo.triggerTooltip || !payloadBatch.length) {\n return;\n }\n var coordSysModel = axisInfo.coordSys.model;\n var coordSysKey = modelHelper.makeKey(coordSysModel);\n var coordSysItem = dataByCoordSys.map[coordSysKey];\n if (!coordSysItem) {\n coordSysItem = dataByCoordSys.map[coordSysKey] = {\n coordSysId: coordSysModel.id,\n coordSysIndex: coordSysModel.componentIndex,\n coordSysType: coordSysModel.type,\n coordSysMainType: coordSysModel.mainType,\n dataByAxis: []\n };\n dataByCoordSys.list.push(coordSysItem);\n }\n coordSysItem.dataByAxis.push({\n axisDim: axis.dim,\n axisIndex: axisModel.componentIndex,\n axisType: axisModel.type,\n axisId: axisModel.id,\n value: value,\n // Caustion: viewHelper.getValueLabel is actually on \"view stage\", which\n // depends that all models have been updated. So it should not be performed\n // here. Considering axisPointerModel used here is volatile, which is hard\n // to be retrieve in TooltipView, we prepare parameters here.\n valueLabelOpt: {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n },\n seriesDataIndices: payloadBatch.slice()\n });\n}\nfunction updateModelActually(showValueMap, axesInfo, outputPayload) {\n var outputAxesInfo = outputPayload.axesInfo = [];\n // Basic logic: If no 'show' required, 'hide' this axisPointer.\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n var valItem = showValueMap[key];\n if (valItem) {\n !axisInfo.useHandle && (option.status = 'show');\n option.value = valItem.value;\n // For label formatter param and highlight.\n option.seriesDataIndices = (valItem.payloadBatch || []).slice();\n }\n // When always show (e.g., handle used), remain\n // original value and status.\n else {\n // If hide, value still need to be set, consider\n // click legend to toggle axis blank.\n !axisInfo.useHandle && (option.status = 'hide');\n }\n // If status is 'hide', should be no info in payload.\n option.status === 'show' && outputAxesInfo.push({\n axisDim: axisInfo.axis.dim,\n axisIndex: axisInfo.axis.model.componentIndex,\n value: option.value\n });\n });\n}\nfunction dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) {\n // Basic logic: If no showTip required, hideTip will be dispatched.\n if (illegalPoint(point) || !dataByCoordSys.list.length) {\n dispatchAction({\n type: 'hideTip'\n });\n return;\n }\n // In most case only one axis (or event one series is used). It is\n // convenient to fetch payload.seriesIndex and payload.dataIndex\n // directly. So put the first seriesIndex and dataIndex of the first\n // axis on the payload.\n var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};\n dispatchAction({\n type: 'showTip',\n escapeConnect: true,\n x: point[0],\n y: point[1],\n tooltipOption: payload.tooltipOption,\n position: payload.position,\n dataIndexInside: sampleItem.dataIndexInside,\n dataIndex: sampleItem.dataIndex,\n seriesIndex: sampleItem.seriesIndex,\n dataByCoordSys: dataByCoordSys.list\n });\n}\nfunction dispatchHighDownActually(axesInfo, dispatchAction, api) {\n // FIXME\n // highlight status modification should be a stage of main process?\n // (Consider confilct (e.g., legend and axisPointer) and setOption)\n var zr = api.getZr();\n var highDownKey = 'axisPointerLastHighlights';\n var lastHighlights = inner(zr)[highDownKey] || {};\n var newHighlights = inner(zr)[highDownKey] = {};\n // Update highlight/downplay status according to axisPointer model.\n // Build hash map and remove duplicate incidentally.\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n option.status === 'show' && axisInfo.triggerEmphasis && each(option.seriesDataIndices, function (batchItem) {\n var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex;\n newHighlights[key] = batchItem;\n });\n });\n // Diff.\n var toHighlight = [];\n var toDownplay = [];\n each(lastHighlights, function (batchItem, key) {\n !newHighlights[key] && toDownplay.push(batchItem);\n });\n each(newHighlights, function (batchItem, key) {\n !lastHighlights[key] && toHighlight.push(batchItem);\n });\n toDownplay.length && api.dispatchAction({\n type: 'downplay',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toDownplay\n });\n toHighlight.length && api.dispatchAction({\n type: 'highlight',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toHighlight\n });\n}\nfunction findInputAxisInfo(inputAxesInfo, axisInfo) {\n for (var i = 0; i < (inputAxesInfo || []).length; i++) {\n var inputAxisInfo = inputAxesInfo[i];\n if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) {\n return inputAxisInfo;\n }\n }\n}\nfunction makeMapperParam(axisInfo) {\n var axisModel = axisInfo.axis.model;\n var item = {};\n var dim = item.axisDim = axisInfo.axis.dim;\n item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex;\n item.axisName = item[dim + 'AxisName'] = axisModel.name;\n item.axisId = item[dim + 'AxisId'] = axisModel.id;\n return item;\n}\nfunction illegalPoint(point) {\n return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport AxisView from '../axis/AxisView.js';\nimport CartesianAxisPointer from './CartesianAxisPointer.js';\nimport AxisPointerModel from './AxisPointerModel.js';\nimport AxisPointerView from './AxisPointerView.js';\nimport { isArray } from 'zrender/lib/core/util.js';\nimport { collect } from './modelHelper.js';\nimport axisTrigger from './axisTrigger.js';\nexport function install(registers) {\n // CartesianAxisPointer is not supposed to be required here. But consider\n // echarts.simple.js and online build tooltip, which only require gridSimple,\n // CartesianAxisPointer should be able to required somewhere.\n AxisView.registerAxisPointerClass('CartesianAxisPointer', CartesianAxisPointer);\n registers.registerComponentModel(AxisPointerModel);\n registers.registerComponentView(AxisPointerView);\n registers.registerPreprocessor(function (option) {\n // Always has a global axisPointerModel for default setting.\n if (option) {\n (!option.axisPointer || option.axisPointer.length === 0) && (option.axisPointer = {});\n var link = option.axisPointer.link;\n // Normalize to array to avoid object mergin. But if link\n // is not set, remain null/undefined, otherwise it will\n // override existent link setting.\n if (link && !isArray(link)) {\n option.axisPointer.link = [link];\n }\n }\n });\n // This process should proformed after coordinate systems created\n // and series data processed. So put it on statistic processing stage.\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, function (ecModel, api) {\n // Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n // allAxesInfo should be updated when setOption performed.\n ecModel.getComponent('axisPointer').coordSysAxesInfo = collect(ecModel, api);\n });\n // Broadcast to all views.\n registers.registerAction({\n type: 'updateAxisPointer',\n event: 'updateAxisPointer',\n update: ':updateAxisPointer'\n }, axisTrigger);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { install as installSimple } from './installSimple.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport { use } from '../../extension.js';\nexport function install(registers) {\n use(installSimple);\n use(installAxisPointer);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nvar PolarAxisPointer = /** @class */function (_super) {\n __extends(PolarAxisPointer, _super);\n function PolarAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n if (axis.dim === 'angle') {\n this.animationThreshold = Math.PI / 18;\n }\n var polar = axis.polar;\n var otherAxis = polar.getOtherAxis(axis);\n var otherExtent = otherAxis.getExtent();\n var coordValue = axis.dataToCoord(value);\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, polar, coordValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var labelMargin = axisPointerModel.get(['label', 'margin']);\n var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin);\n viewHelper.buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos);\n };\n return PolarAxisPointer;\n}(BaseAxisPointer);\n;\nfunction getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) {\n var axis = axisModel.axis;\n var coord = axis.dataToCoord(value);\n var axisAngle = polar.getAngleAxis().getExtent()[0];\n axisAngle = axisAngle / 180 * Math.PI;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var position;\n var align;\n var verticalAlign;\n if (axis.dim === 'radius') {\n var transform = matrix.create();\n matrix.rotate(transform, transform, axisAngle);\n matrix.translate(transform, transform, [polar.cx, polar.cy]);\n position = graphic.applyTransform([coord, -labelMargin], transform);\n var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0;\n // @ts-ignore\n var labelLayout = AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1);\n align = labelLayout.textAlign;\n verticalAlign = labelLayout.textVerticalAlign;\n } else {\n // angle axis\n var r = radiusExtent[1];\n position = polar.coordToPoint([r + labelMargin, coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right';\n verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom';\n }\n return {\n position: position,\n align: align,\n verticalAlign: verticalAlign\n };\n}\nvar pointerShapeBuilder = {\n line: function (axis, polar, coordValue, otherExtent) {\n return axis.dim === 'angle' ? {\n type: 'Line',\n shape: viewHelper.makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue]))\n } : {\n type: 'Circle',\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: coordValue\n }\n };\n },\n shadow: function (axis, polar, coordValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var radian = Math.PI / 180;\n return axis.dim === 'angle' ? {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1],\n // In ECharts y is negative if angle is positive\n (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian)\n } : {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2)\n };\n }\n};\nexport default PolarAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar PolarModel = /** @class */function (_super) {\n __extends(PolarModel, _super);\n function PolarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PolarModel.type;\n return _this;\n }\n PolarModel.prototype.findAxisModel = function (axisType) {\n var foundAxisModel;\n var ecModel = this.ecModel;\n ecModel.eachComponent(axisType, function (axisModel) {\n if (axisModel.getCoordSysModel() === this) {\n foundAxisModel = axisModel;\n }\n }, this);\n return foundAxisModel;\n };\n PolarModel.type = 'polar';\n PolarModel.dependencies = ['radiusAxis', 'angleAxis'];\n PolarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '80%'\n };\n return PolarModel;\n}(ComponentModel);\nexport default PolarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar PolarAxisModel = /** @class */function (_super) {\n __extends(PolarAxisModel, _super);\n function PolarAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PolarAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n };\n PolarAxisModel.type = 'polarAxis';\n return PolarAxisModel;\n}(ComponentModel);\nzrUtil.mixin(PolarAxisModel, AxisModelCommonMixin);\nexport { PolarAxisModel };\nvar AngleAxisModel = /** @class */function (_super) {\n __extends(AngleAxisModel, _super);\n function AngleAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AngleAxisModel.type;\n return _this;\n }\n AngleAxisModel.type = 'angleAxis';\n return AngleAxisModel;\n}(PolarAxisModel);\nexport { AngleAxisModel };\nvar RadiusAxisModel = /** @class */function (_super) {\n __extends(RadiusAxisModel, _super);\n function RadiusAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadiusAxisModel.type;\n return _this;\n }\n RadiusAxisModel.type = 'radiusAxis';\n return RadiusAxisModel;\n}(PolarAxisModel);\nexport { RadiusAxisModel };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar RadiusAxis = /** @class */function (_super) {\n __extends(RadiusAxis, _super);\n function RadiusAxis(scale, radiusExtent) {\n return _super.call(this, 'radius', scale, radiusExtent) || this;\n }\n RadiusAxis.prototype.pointToData = function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n };\n return RadiusAxis;\n}(Axis);\nRadiusAxis.prototype.dataToRadius = Axis.prototype.dataToCoord;\nRadiusAxis.prototype.radiusToData = Axis.prototype.coordToData;\nexport default RadiusAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport Axis from '../Axis.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar AngleAxis = /** @class */function (_super) {\n __extends(AngleAxis, _super);\n function AngleAxis(scale, angleExtent) {\n return _super.call(this, 'angle', scale, angleExtent || [0, 360]) || this;\n }\n AngleAxis.prototype.pointToData = function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n };\n /**\n * Only be called in category axis.\n * Angle axis uses text height to decide interval\n *\n * @override\n * @return {number} Auto interval for cateogry axis tick and label\n */\n AngleAxis.prototype.calculateCategoryInterval = function () {\n var axis = this;\n var labelModel = axis.getLabelModel();\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\n var tickCount = ordinalScale.count();\n if (ordinalExtent[1] - ordinalExtent[0] < 1) {\n return 0;\n }\n var tickValue = ordinalExtent[0];\n var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue);\n var unitH = Math.abs(unitSpan);\n // Not precise, just use height as text width\n // and each distance from axis line yet.\n var rect = textContain.getBoundingRect(tickValue == null ? '' : tickValue + '', labelModel.getFont(), 'center', 'top');\n var maxH = Math.max(rect.height, 7);\n var dh = maxH / unitH;\n // 0/0 is NaN, 1/0 is Infinity.\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(dh));\n var cache = inner(axis.model);\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount;\n // Use cache to keep interval stable while moving zoom window,\n // otherwise the calculated interval might jitter when the zoom\n // window size is close to the interval-changing size.\n if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1\n // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval) {\n interval = lastAutoInterval;\n }\n // Only update cache if cache not used, otherwise the\n // changing of interval is too insensitive.\n else {\n cache.lastTickCount = tickCount;\n cache.lastAutoInterval = interval;\n }\n return interval;\n };\n return AngleAxis;\n}(Axis);\nAngleAxis.prototype.dataToAngle = Axis.prototype.dataToCoord;\nAngleAxis.prototype.angleToData = Axis.prototype.coordToData;\nexport default AngleAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport RadiusAxis from './RadiusAxis.js';\nimport AngleAxis from './AngleAxis.js';\nexport var polarDimensions = ['radius', 'angle'];\nvar Polar = /** @class */function () {\n function Polar(name) {\n this.dimensions = polarDimensions;\n this.type = 'polar';\n /**\n * x of polar center\n */\n this.cx = 0;\n /**\n * y of polar center\n */\n this.cy = 0;\n this._radiusAxis = new RadiusAxis();\n this._angleAxis = new AngleAxis();\n this.axisPointerEnabled = true;\n this.name = name || '';\n this._radiusAxis.polar = this._angleAxis.polar = this;\n }\n /**\n * If contain coord\n */\n Polar.prototype.containPoint = function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n };\n /**\n * If contain data\n */\n Polar.prototype.containData = function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n };\n Polar.prototype.getAxis = function (dim) {\n var key = '_' + dim + 'Axis';\n return this[key];\n };\n Polar.prototype.getAxes = function () {\n return [this._radiusAxis, this._angleAxis];\n };\n /**\n * Get axes by type of scale\n */\n Polar.prototype.getAxesByScale = function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n };\n Polar.prototype.getAngleAxis = function () {\n return this._angleAxis;\n };\n Polar.prototype.getRadiusAxis = function () {\n return this._radiusAxis;\n };\n Polar.prototype.getOtherAxis = function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n };\n /**\n * Base axis will be used on stacking.\n *\n */\n Polar.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n };\n Polar.prototype.getTooltipAxes = function (dim) {\n var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis();\n return {\n baseAxes: [baseAxis],\n otherAxes: [this.getOtherAxis(baseAxis)]\n };\n };\n /**\n * Convert a single data item to (x, y) point.\n * Parameter data is an array which the first element is radius and the second is angle\n */\n Polar.prototype.dataToPoint = function (data, clamp) {\n return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]);\n };\n /**\n * Convert a (x, y) point to data\n */\n Polar.prototype.pointToData = function (point, clamp) {\n var coord = this.pointToCoord(point);\n return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)];\n };\n /**\n * Convert a (x, y) point to (radius, angle) coord\n */\n Polar.prototype.pointToCoord = function (point) {\n var dx = point[0] - this.cx;\n var dy = point[1] - this.cy;\n var angleAxis = this.getAngleAxis();\n var extent = angleAxis.getExtent();\n var minAngle = Math.min(extent[0], extent[1]);\n var maxAngle = Math.max(extent[0], extent[1]);\n // Fix fixed extent in polarCreator\n // FIXME\n angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx) / Math.PI * 180;\n // move to angleExtent\n var dir = radian < minAngle ? 1 : -1;\n while (radian < minAngle || radian > maxAngle) {\n radian += dir * 360;\n }\n return [radius, radian];\n };\n /**\n * Convert a (radius, angle) coord to (x, y) point\n */\n Polar.prototype.coordToPoint = function (coord) {\n var radius = coord[0];\n var radian = coord[1] / 180 * Math.PI;\n var x = Math.cos(radian) * radius + this.cx;\n // Inverse the y\n var y = -Math.sin(radian) * radius + this.cy;\n return [x, y];\n };\n /**\n * Get ring area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Polar.prototype.getArea = function () {\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n var RADIAN = Math.PI / 180;\n return {\n cx: this.cx,\n cy: this.cy,\n r0: radiusExtent[0],\n r: radiusExtent[1],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse,\n contain: function (x, y) {\n // It's a ring shape.\n // Start angle and end angle don't matter\n var dx = x - this.cx;\n var dy = y - this.cy;\n // minus a tiny value 1e-4 to avoid being clipped unexpectedly\n var d2 = dx * dx + dy * dy - 1e-4;\n var r = this.r;\n var r0 = this.r0;\n return d2 <= r * r && d2 >= r0 * r0;\n }\n };\n };\n Polar.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.dataToPoint(value) : null;\n };\n Polar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.pointToData(pixel) : null;\n };\n return Polar;\n}();\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n var polarModel = finder.polarModel;\n return polarModel && polarModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem;\n}\nexport default Polar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO Axis scale\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Polar, { polarDimensions } from './Polar.js';\nimport { parsePercent } from '../../util/number.js';\nimport { createScaleByModel, niceScaleExtent, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Resize method bound to the polar\n */\nfunction resizePolar(polar, polarModel, api) {\n var center = polarModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n polar.cx = parsePercent(center[0], width);\n polar.cy = parsePercent(center[1], height);\n var radiusAxis = polar.getRadiusAxis();\n var size = Math.min(width, height) / 2;\n var radius = polarModel.get('radius');\n if (radius == null) {\n radius = [0, '100%'];\n } else if (!zrUtil.isArray(radius)) {\n // r0 = 0\n radius = [0, radius];\n }\n var parsedRadius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];\n radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]);\n}\n/**\n * Update polar\n */\nfunction updatePolarScale(ecModel, api) {\n var polar = this;\n var angleAxis = polar.getAngleAxis();\n var radiusAxis = polar.getRadiusAxis();\n // Reset scale\n angleAxis.scale.setExtent(Infinity, -Infinity);\n radiusAxis.scale.setExtent(Infinity, -Infinity);\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === polar) {\n var data_1 = seriesModel.getData();\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'radius'), function (dim) {\n radiusAxis.scale.unionExtentFromData(data_1, dim);\n });\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'angle'), function (dim) {\n angleAxis.scale.unionExtentFromData(data_1, dim);\n });\n }\n });\n niceScaleExtent(angleAxis.scale, angleAxis.model);\n niceScaleExtent(radiusAxis.scale, radiusAxis.model);\n // Fix extent of category angle axis\n if (angleAxis.type === 'category' && !angleAxis.onBand) {\n var extent = angleAxis.getExtent();\n var diff = 360 / angleAxis.scale.count();\n angleAxis.inverse ? extent[1] += diff : extent[1] -= diff;\n angleAxis.setExtent(extent[0], extent[1]);\n }\n}\nfunction isAngleAxisModel(axisModel) {\n return axisModel.mainType === 'angleAxis';\n}\n/**\n * Set common axis properties\n */\nfunction setAxis(axis, axisModel) {\n var _a;\n axis.type = axisModel.get('type');\n axis.scale = createScaleByModel(axisModel);\n axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';\n axis.inverse = axisModel.get('inverse');\n if (isAngleAxisModel(axisModel)) {\n axis.inverse = axis.inverse !== axisModel.get('clockwise');\n var startAngle = axisModel.get('startAngle');\n var endAngle = (_a = axisModel.get('endAngle')) !== null && _a !== void 0 ? _a : startAngle + (axis.inverse ? -360 : 360);\n axis.setExtent(startAngle, endAngle);\n }\n // Inject axis instance\n axisModel.axis = axis;\n axis.model = axisModel;\n}\nvar polarCreator = {\n dimensions: polarDimensions,\n create: function (ecModel, api) {\n var polarList = [];\n ecModel.eachComponent('polar', function (polarModel, idx) {\n var polar = new Polar(idx + '');\n // Inject resize and update method\n polar.update = updatePolarScale;\n var radiusAxis = polar.getRadiusAxis();\n var angleAxis = polar.getAngleAxis();\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n setAxis(radiusAxis, radiusAxisModel);\n setAxis(angleAxis, angleAxisModel);\n resizePolar(polar, polarModel, api);\n polarList.push(polar);\n polarModel.coordinateSystem = polar;\n polar.model = polarModel;\n });\n // Inject coordinateSystem to series\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'polar') {\n var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!polarModel) {\n throw new Error('Polar \"' + zrUtil.retrieve(seriesModel.get('polarIndex'), seriesModel.get('polarId'), 0) + '\" not found');\n }\n }\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\n }\n });\n return polarList;\n }\n};\nexport default polarCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport AxisView from './AxisView.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport { getECData } from '../../util/innerStore.js';\nvar elementList = ['axisLine', 'axisLabel', 'axisTick', 'minorTick', 'splitLine', 'minorSplitLine', 'splitArea'];\nfunction getAxisLineShape(polar, rExtent, angle) {\n rExtent[1] > rExtent[0] && (rExtent = rExtent.slice().reverse());\n var start = polar.coordToPoint([rExtent[0], angle]);\n var end = polar.coordToPoint([rExtent[1], angle]);\n return {\n x1: start[0],\n y1: start[1],\n x2: end[0],\n y2: end[1]\n };\n}\nfunction getRadiusIdx(polar) {\n var radiusAxis = polar.getRadiusAxis();\n return radiusAxis.inverse ? 0 : 1;\n}\n// Remove the last tick which will overlap the first tick\nfunction fixAngleOverlap(list) {\n var firstItem = list[0];\n var lastItem = list[list.length - 1];\n if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4) {\n list.pop();\n }\n}\nvar AngleAxisView = /** @class */function (_super) {\n __extends(AngleAxisView, _super);\n function AngleAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AngleAxisView.type;\n _this.axisPointerClass = 'PolarAxisPointer';\n return _this;\n }\n AngleAxisView.prototype.render = function (angleAxisModel, ecModel) {\n this.group.removeAll();\n if (!angleAxisModel.get('show')) {\n return;\n }\n var angleAxis = angleAxisModel.axis;\n var polar = angleAxis.polar;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var ticksAngles = angleAxis.getTicksCoords();\n var minorTickAngles = angleAxis.getMinorTicksCoords();\n var labels = zrUtil.map(angleAxis.getViewLabels(), function (labelItem) {\n labelItem = zrUtil.clone(labelItem);\n var scale = angleAxis.scale;\n var tickValue = scale.type === 'ordinal' ? scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue;\n labelItem.coord = angleAxis.dataToCoord(tickValue);\n return labelItem;\n });\n fixAngleOverlap(labels);\n fixAngleOverlap(ticksAngles);\n zrUtil.each(elementList, function (name) {\n if (angleAxisModel.get([name, 'show']) && (!angleAxis.scale.isBlank() || name === 'axisLine')) {\n angelAxisElementsBuilders[name](this.group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels);\n }\n }, this);\n };\n AngleAxisView.type = 'angleAxis';\n return AngleAxisView;\n}(AxisView);\nvar angelAxisElementsBuilders = {\n axisLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var lineStyleModel = angleAxisModel.getModel(['axisLine', 'lineStyle']);\n var angleAxis = polar.getAngleAxis();\n var RADIAN = Math.PI / 180;\n var angleExtent = angleAxis.getExtent();\n // extent id of the axis radius (r0 and r)\n var rId = getRadiusIdx(polar);\n var r0Id = rId ? 0 : 1;\n var shape;\n var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc';\n if (radiusExtent[r0Id] === 0) {\n shape = new graphic[shapeType]({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n } else {\n shape = new graphic.Ring({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n r0: radiusExtent[r0Id]\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n }\n shape.style.fill = null;\n group.add(shape);\n },\n axisTick: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var tickModel = angleAxisModel.getModel('axisTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = zrUtil.map(ticksAngles, function (tickAngleItem) {\n return new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], tickAngleItem.coord)\n });\n });\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(tickModel.getModel('lineStyle').getLineStyle(), {\n stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color'])\n })\n }));\n },\n minorTick: function (group, angleAxisModel, polar, tickAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n var tickModel = angleAxisModel.getModel('axisTick');\n var minorTickModel = angleAxisModel.getModel('minorTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = [];\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], minorTickAngles[i][k].coord)\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(minorTickModel.getModel('lineStyle').getLineStyle(), zrUtil.defaults(tickModel.getLineStyle(), {\n stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color'])\n }))\n }));\n },\n axisLabel: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) {\n var rawCategoryData = angleAxisModel.getCategories(true);\n var commonLabelModel = angleAxisModel.getModel('axisLabel');\n var labelMargin = commonLabelModel.get('margin');\n var triggerEvent = angleAxisModel.get('triggerEvent');\n // Use length of ticksAngles because it may remove the last tick to avoid overlapping\n zrUtil.each(labels, function (labelItem, idx) {\n var labelModel = commonLabelModel;\n var tickValue = labelItem.tickValue;\n var r = radiusExtent[getRadiusIdx(polar)];\n var p = polar.coordToPoint([r + labelMargin, labelItem.coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3 ? 'center' : p[0] > cx ? 'left' : 'right';\n var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3 ? 'middle' : p[1] > cy ? 'top' : 'bottom';\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (zrUtil.isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n labelModel = new Model(rawCategoryItem.textStyle, commonLabelModel, commonLabelModel.ecModel);\n }\n }\n var textEl = new graphic.Text({\n silent: AxisBuilder.isLabelSilent(angleAxisModel),\n style: createTextStyle(labelModel, {\n x: p[0],\n y: p[1],\n fill: labelModel.getTextColor() || angleAxisModel.get(['axisLine', 'lineStyle', 'color']),\n text: labelItem.formattedLabel,\n align: labelTextAlign,\n verticalAlign: labelTextVerticalAlign\n })\n });\n group.add(textEl);\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(angleAxisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = labelItem.rawLabel;\n getECData(textEl).eventData = eventData;\n }\n }, this);\n },\n splitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var splitLineModel = angleAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n for (var i = 0; i < ticksAngles.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i].coord)\n }));\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitLines.length; i++) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyleModel.getLineStyle()),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n }\n },\n minorSplitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n var minorSplitLineModel = angleAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, minorTickAngles[i][k].coord)\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: lineStyleModel.getLineStyle(),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n },\n splitArea: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!ticksAngles.length) {\n return;\n }\n var splitAreaModel = angleAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var RADIAN = Math.PI / 180;\n var prevAngle = -ticksAngles[0].coord * RADIAN;\n var r0 = Math.min(radiusExtent[0], radiusExtent[1]);\n var r1 = Math.max(radiusExtent[0], radiusExtent[1]);\n var clockwise = angleAxisModel.get('clockwise');\n for (var i = 1, len = ticksAngles.length; i <= len; i++) {\n var coord = i === len ? ticksAngles[0].coord : ticksAngles[i].coord;\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: r0,\n r: r1,\n startAngle: prevAngle,\n endAngle: -coord * RADIAN,\n clockwise: clockwise\n },\n silent: true\n }));\n prevAngle = -coord * RADIAN;\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitAreas.length; i++) {\n group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n};\nexport default AngleAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport AxisView from './AxisView.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine'];\nvar RadiusAxisView = /** @class */function (_super) {\n __extends(RadiusAxisView, _super);\n function RadiusAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadiusAxisView.type;\n _this.axisPointerClass = 'PolarAxisPointer';\n return _this;\n }\n RadiusAxisView.prototype.render = function (radiusAxisModel, ecModel) {\n this.group.removeAll();\n if (!radiusAxisModel.get('show')) {\n return;\n }\n var oldAxisGroup = this._axisGroup;\n var newAxisGroup = this._axisGroup = new graphic.Group();\n this.group.add(newAxisGroup);\n var radiusAxis = radiusAxisModel.axis;\n var polar = radiusAxis.polar;\n var angleAxis = polar.getAngleAxis();\n var ticksCoords = radiusAxis.getTicksCoords();\n var minorTicksCoords = radiusAxis.getMinorTicksCoords();\n var axisAngle = angleAxis.getExtent()[0];\n var radiusExtent = radiusAxis.getExtent();\n var layout = layoutAxis(polar, radiusAxisModel, axisAngle);\n var axisBuilder = new AxisBuilder(radiusAxisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n newAxisGroup.add(axisBuilder.getGroup());\n graphic.groupTransition(oldAxisGroup, newAxisGroup, radiusAxisModel);\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (radiusAxisModel.get([name, 'show']) && !radiusAxis.scale.isBlank()) {\n axisElementBuilders[name](this.group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords);\n }\n }, this);\n };\n RadiusAxisView.type = 'radiusAxis';\n return RadiusAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n var splitLineModel = radiusAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n var angleAxis = polar.getAngleAxis();\n var RADIAN = Math.PI / 180;\n var angleExtent = angleAxis.getExtent();\n var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc';\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic[shapeType]({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n // ensure circle radius >= 0\n r: Math.max(ticksCoords[i].coord, 0),\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse\n }\n }));\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitLines.length; i++) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length],\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n }\n },\n minorSplitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) {\n if (!minorTicksCoords.length) {\n return;\n }\n var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n lines.push(new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: minorTicksCoords[i][k].coord\n }\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults({\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n },\n splitArea: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n if (!ticksCoords.length) {\n return;\n }\n var splitAreaModel = radiusAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var prevRadius = ticksCoords[0].coord;\n for (var i = 1; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: prevRadius,\n r: ticksCoords[i].coord,\n startAngle: 0,\n endAngle: Math.PI * 2\n },\n silent: true\n }));\n prevRadius = ticksCoords[i].coord;\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitAreas.length; i++) {\n group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n};\n/**\n * @inner\n */\nfunction layoutAxis(polar, radiusAxisModel, axisAngle) {\n return {\n position: [polar.cx, polar.cy],\n rotation: axisAngle / 180 * Math.PI,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1,\n labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'),\n // Over splitLine and splitArea\n z2: 1\n };\n}\nexport default RadiusAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parsePercent } from '../util/number.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex;\n}\nfunction getAxisKey(polar, axis) {\n return axis.dim + polar.model.componentIndex;\n}\nfunction barLayoutPolar(seriesType, ecModel, api) {\n var lastStackCoords = {};\n var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) {\n return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar';\n }));\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n // Check series coordinate, do layout for polar only\n if (seriesModel.coordinateSystem.type !== 'polar') {\n return;\n }\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var stackId = getSeriesStackId(seriesModel);\n var columnLayoutInfo = barWidthAndOffset[axisKey][stackId];\n var columnOffset = columnLayoutInfo.offset;\n var columnWidth = columnLayoutInfo.width;\n var valueAxis = polar.getOtherAxis(baseAxis);\n var cx = seriesModel.coordinateSystem.cx;\n var cy = seriesModel.coordinateSystem.cy;\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n var barMinAngle = seriesModel.get('barMinAngle') || 0;\n lastStackCoords[stackId] = lastStackCoords[stackId] || [];\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim /* , baseDim */);\n var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true);\n var valueAxisModel = valueAxis.model;\n var startValue = valueAxisModel.get('startValue');\n var valueAxisStart = valueAxis.dataToCoord(startValue || 0);\n for (var idx = 0, len = data.count(); idx < len; idx++) {\n var value = data.get(valueDim, idx);\n var baseValue = data.get(baseDim, idx);\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart;\n // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n // Only ordinal axis can be stacked.\n if (stacked) {\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart,\n n: valueAxisStart // Negative stack\n };\n }\n // Should also consider #4243\n baseCoord = lastStackCoords[stackId][baseValue][sign];\n }\n var r0 = void 0;\n var r = void 0;\n var startAngle = void 0;\n var endAngle = void 0;\n // radial sector\n if (valueAxis.dim === 'radius') {\n var radiusSpan = valueAxis.dataToCoord(value) - valueAxisStart;\n var angle = baseAxis.dataToCoord(baseValue);\n if (Math.abs(radiusSpan) < barMinHeight) {\n radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight;\n }\n r0 = baseCoord;\n r = baseCoord + radiusSpan;\n startAngle = angle - columnOffset;\n endAngle = startAngle - columnWidth;\n stacked && (lastStackCoords[stackId][baseValue][sign] = r);\n }\n // tangential sector\n else {\n var angleSpan = valueAxis.dataToCoord(value, clampLayout) - valueAxisStart;\n var radius = baseAxis.dataToCoord(baseValue);\n if (Math.abs(angleSpan) < barMinAngle) {\n angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle;\n }\n r0 = radius + columnOffset;\n r = r0 + columnWidth;\n startAngle = baseCoord;\n endAngle = baseCoord + angleSpan;\n // if the previous stack is at the end of the ring,\n // add a round to differentiate it from origin\n // let extent = angleAxis.getExtent();\n // let stackCoord = angle;\n // if (stackCoord === extent[0] && value > 0) {\n // stackCoord = extent[1];\n // }\n // else if (stackCoord === extent[1] && value < 0) {\n // stackCoord = extent[0];\n // }\n stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle);\n }\n data.setItemLayout(idx, {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n // Consider that positive angle is anti-clockwise,\n // while positive radian of sector is clockwise\n startAngle: -startAngle * Math.PI / 180,\n endAngle: -endAngle * Math.PI / 180,\n /**\n * Keep the same logic with bar in catesion: use end value to\n * control direction. Notice that if clockwise is true (by\n * default), the sector will always draw clockwisely, no matter\n * whether endAngle is greater or less than startAngle.\n */\n clockwise: startAngle >= endAngle\n });\n }\n });\n}\n/**\n * Calculate bar width and offset for radial bar charts\n */\nfunction calRadialBar(barSeries) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n // Find if any auto calculated bar exceeded maxBarWidth\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n });\n // Recalculate width again\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}\nexport default barLayoutPolar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { use } from '../../extension.js';\nimport AxisView from '../axis/AxisView.js';\nimport PolarAxisPointer from '../axisPointer/PolarAxisPointer.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport PolarModel from '../../coord/polar/PolarModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport { AngleAxisModel, RadiusAxisModel } from '../../coord/polar/AxisModel.js';\nimport polarCreator from '../../coord/polar/polarCreator.js';\nimport AngleAxisView from '../axis/AngleAxisView.js';\nimport RadiusAxisView from '../axis/RadiusAxisView.js';\nimport ComponentView from '../../view/Component.js';\nimport { curry } from 'zrender/lib/core/util.js';\nimport barLayoutPolar from '../../layout/barPolar.js';\nvar angleAxisExtraOption = {\n startAngle: 90,\n clockwise: true,\n splitNumber: 12,\n axisLabel: {\n rotate: 0\n }\n};\nvar radiusAxisExtraOption = {\n splitNumber: 5\n};\nvar PolarView = /** @class */function (_super) {\n __extends(PolarView, _super);\n function PolarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PolarView.type;\n return _this;\n }\n PolarView.type = 'polar';\n return PolarView;\n}(ComponentView);\nexport function install(registers) {\n use(installAxisPointer);\n AxisView.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer);\n registers.registerCoordinateSystem('polar', polarCreator);\n registers.registerComponentModel(PolarModel);\n registers.registerComponentView(PolarView);\n // Model and view for angleAxis and radiusAxis\n axisModelCreator(registers, 'angle', AngleAxisModel, angleAxisExtraOption);\n axisModelCreator(registers, 'radius', RadiusAxisModel, radiusAxisExtraOption);\n registers.registerComponentView(AngleAxisView);\n registers.registerComponentView(RadiusAxisView);\n registers.registerLayout(curry(barLayoutPolar, 'bar'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport function layout(axisModel, opt) {\n opt = opt || {};\n var single = axisModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var axisPosition = axis.position;\n var orient = axis.orient;\n var rect = single.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var positionMap = {\n horizontal: {\n top: rectBound[2],\n bottom: rectBound[3]\n },\n vertical: {\n left: rectBound[0],\n right: rectBound[1]\n }\n };\n layout.position = [orient === 'vertical' ? positionMap.vertical[axisPosition] : rectBound[0], orient === 'horizontal' ? positionMap.horizontal[axisPosition] : rectBound[3]];\n var r = {\n horizontal: 0,\n vertical: 1\n };\n layout.rotation = Math.PI / 2 * r[orient];\n var directionMap = {\n top: -1,\n bottom: 1,\n right: 1,\n left: -1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = directionMap[axisPosition];\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n if (zrUtil.retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n }\n var labelRotation = opt.rotate;\n labelRotation == null && (labelRotation = axisModel.get(['axisLabel', 'rotate']));\n layout.labelRotation = axisPosition === 'top' ? -labelRotation : labelRotation;\n layout.z2 = 1;\n return layout;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper.js';\nimport AxisView from './AxisView.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitArea', 'splitLine'];\nvar SingleAxisView = /** @class */function (_super) {\n __extends(SingleAxisView, _super);\n function SingleAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleAxisView.type;\n _this.axisPointerClass = 'SingleAxisPointer';\n return _this;\n }\n SingleAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n var layout = singleAxisHelper.layout(axisModel);\n var axisBuilder = new AxisBuilder(axisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n group.add(this._axisGroup);\n group.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this.group, this._axisGroup, axisModel);\n }\n }, this);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n SingleAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n SingleAxisView.type = 'singleAxis';\n return SingleAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (axisView, group, axisGroup, axisModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var lineWidth = lineStyleModel.get('width');\n var gridRect = axisModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var splitLines = [];\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n for (var i = 0; i < ticksCoords.length; ++i) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var line = new graphic.Line({\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineWidth);\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(line);\n }\n var lineStyle = lineStyleModel.getLineStyle(['color']);\n for (var i = 0; i < splitLines.length; ++i) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyle),\n silent: true\n }));\n }\n },\n splitArea: function (axisView, group, axisGroup, axisModel) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, axisModel);\n }\n};\nexport default SingleAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nvar SingleAxisModel = /** @class */function (_super) {\n __extends(SingleAxisModel, _super);\n function SingleAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleAxisModel.type;\n return _this;\n }\n SingleAxisModel.prototype.getCoordSysModel = function () {\n return this;\n };\n SingleAxisModel.type = 'singleAxis';\n SingleAxisModel.layoutMode = 'box';\n SingleAxisModel.defaultOption = {\n left: '5%',\n top: '5%',\n right: '5%',\n bottom: '5%',\n type: 'value',\n position: 'bottom',\n orient: 'horizontal',\n axisLine: {\n show: true,\n lineStyle: {\n width: 1,\n type: 'solid'\n }\n },\n // Single coordinate system and single axis is the,\n // which is used as the parent tooltip model.\n // same model, so we set default tooltip show as true.\n tooltip: {\n show: true\n },\n axisTick: {\n show: true,\n length: 6,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n interval: 'auto'\n },\n splitLine: {\n show: true,\n lineStyle: {\n type: 'dashed',\n opacity: 0.2\n }\n }\n };\n return SingleAxisModel;\n}(ComponentModel);\nmixin(SingleAxisModel, AxisModelCommonMixin.prototype);\nexport default SingleAxisModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar SingleAxis = /** @class */function (_super) {\n __extends(SingleAxis, _super);\n function SingleAxis(dim, scale, coordExtent, axisType, position) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n _this.position = position || 'bottom';\n return _this;\n }\n /**\n * Judge the orient of the axis.\n */\n SingleAxis.prototype.isHorizontal = function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n };\n SingleAxis.prototype.pointToData = function (point, clamp) {\n return this.coordinateSystem.pointToData(point)[0];\n };\n return SingleAxis;\n}(Axis);\nexport default SingleAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Single coordinates system.\n */\nimport SingleAxis from './SingleAxis.js';\nimport * as axisHelper from '../axisHelper.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport { each } from 'zrender/lib/core/util.js';\nexport var singleDimensions = ['single'];\n/**\n * Create a single coordinates system.\n */\nvar Single = /** @class */function () {\n function Single(axisModel, ecModel, api) {\n this.type = 'single';\n this.dimension = 'single';\n /**\n * Add it just for draw tooltip.\n */\n this.dimensions = singleDimensions;\n this.axisPointerEnabled = true;\n this.model = axisModel;\n this._init(axisModel, ecModel, api);\n }\n /**\n * Initialize single coordinate system.\n */\n Single.prototype._init = function (axisModel, ecModel, api) {\n var dim = this.dimension;\n var axis = new SingleAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisModel.get('position'));\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n axis.orient = axisModel.get('orient');\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = this;\n this._axis = axis;\n };\n /**\n * Update axis scale after data processed\n */\n Single.prototype.update = function (ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === this) {\n var data_1 = seriesModel.getData();\n each(data_1.mapDimensionsAll(this.dimension), function (dim) {\n this._axis.scale.unionExtentFromData(data_1, dim);\n }, this);\n axisHelper.niceScaleExtent(this._axis.scale, this._axis.model);\n }\n }, this);\n };\n /**\n * Resize the single coordinate system.\n */\n Single.prototype.resize = function (axisModel, api) {\n this._rect = getLayoutRect({\n left: axisModel.get('left'),\n top: axisModel.get('top'),\n right: axisModel.get('right'),\n bottom: axisModel.get('bottom'),\n width: axisModel.get('width'),\n height: axisModel.get('height')\n }, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._adjustAxis();\n };\n Single.prototype.getRect = function () {\n return this._rect;\n };\n Single.prototype._adjustAxis = function () {\n var rect = this._rect;\n var axis = this._axis;\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, rect.width] : [0, rect.height];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n this._updateAxisTransform(axis, isHorizontal ? rect.x : rect.y);\n };\n Single.prototype._updateAxisTransform = function (axis, coordBase) {\n var axisExtent = axis.getExtent();\n var extentSum = axisExtent[0] + axisExtent[1];\n var isHorizontal = axis.isHorizontal();\n axis.toGlobalCoord = isHorizontal ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return extentSum - coord + coordBase;\n };\n axis.toLocalCoord = isHorizontal ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return extentSum - coord + coordBase;\n };\n };\n /**\n * Get axis.\n */\n Single.prototype.getAxis = function () {\n return this._axis;\n };\n /**\n * Get axis, add it just for draw tooltip.\n */\n Single.prototype.getBaseAxis = function () {\n return this._axis;\n };\n Single.prototype.getAxes = function () {\n return [this._axis];\n };\n Single.prototype.getTooltipAxes = function () {\n return {\n baseAxes: [this.getAxis()],\n // Empty otherAxes\n otherAxes: []\n };\n };\n /**\n * If contain point.\n */\n Single.prototype.containPoint = function (point) {\n var rect = this.getRect();\n var axis = this.getAxis();\n var orient = axis.orient;\n if (orient === 'horizontal') {\n return axis.contain(axis.toLocalCoord(point[0])) && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n } else {\n return axis.contain(axis.toLocalCoord(point[1])) && point[0] >= rect.y && point[0] <= rect.y + rect.height;\n }\n };\n Single.prototype.pointToData = function (point) {\n var axis = this.getAxis();\n return [axis.coordToData(axis.toLocalCoord(point[axis.orient === 'horizontal' ? 0 : 1]))];\n };\n /**\n * Convert the series data to concrete point.\n * Can be [val] | val\n */\n Single.prototype.dataToPoint = function (val) {\n var axis = this.getAxis();\n var rect = this.getRect();\n var pt = [];\n var idx = axis.orient === 'horizontal' ? 0 : 1;\n if (val instanceof Array) {\n val = val[0];\n }\n pt[idx] = axis.toGlobalCoord(axis.dataToCoord(+val));\n pt[1 - idx] = idx === 0 ? rect.y + rect.height / 2 : rect.x + rect.width / 2;\n return pt;\n };\n Single.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.dataToPoint(value) : null;\n };\n Single.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.pointToData(pixel) : null;\n };\n return Single;\n}();\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n var singleModel = finder.singleAxisModel;\n return singleModel && singleModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem;\n}\nexport default Single;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Single coordinate system creator.\n */\nimport Single, { singleDimensions } from './Single.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Create single coordinate system and inject it into seriesModel.\n */\nfunction create(ecModel, api) {\n var singles = [];\n ecModel.eachComponent('singleAxis', function (axisModel, idx) {\n var single = new Single(axisModel, ecModel, api);\n single.name = 'single_' + idx;\n single.resize(axisModel, api);\n axisModel.coordinateSystem = single;\n singles.push(single);\n });\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'singleAxis') {\n var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0];\n seriesModel.coordinateSystem = singleAxisModel && singleAxisModel.coordinateSystem;\n }\n });\n return singles;\n}\nvar singleCreator = {\n create: create,\n dimensions: singleDimensions\n};\nexport default singleCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper.js';\nvar XY = ['x', 'y'];\nvar WH = ['width', 'height'];\nvar SingleAxisPointer = /** @class */function (_super) {\n __extends(SingleAxisPointer, _super);\n function SingleAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n SingleAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var coordSys = axis.coordinateSystem;\n var otherExtent = getGlobalExtent(coordSys, 1 - getPointDimIndex(axis));\n var pixelValue = coordSys.dataToPoint(value)[0];\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var layoutInfo = singleAxisHelper.layout(axisModel);\n viewHelper.buildCartesianSingleLabelElOption(\n // @ts-ignore\n value, elOption, layoutInfo, axisModel, axisPointerModel, api);\n };\n /**\n * @override\n */\n SingleAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {\n var layoutInfo = singleAxisHelper.layout(axisModel, {\n labelInside: false\n });\n // @ts-ignore\n layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']);\n var position = viewHelper.getTransformedPosition(axisModel.axis, value, layoutInfo);\n return {\n x: position[0],\n y: position[1],\n rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)\n };\n };\n /**\n * @override\n */\n SingleAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {\n var axis = axisModel.axis;\n var coordSys = axis.coordinateSystem;\n var dimIndex = getPointDimIndex(axis);\n var axisExtent = getGlobalExtent(coordSys, dimIndex);\n var currPosition = [transform.x, transform.y];\n currPosition[dimIndex] += delta[dimIndex];\n currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]);\n currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]);\n var otherExtent = getGlobalExtent(coordSys, 1 - dimIndex);\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n return {\n x: currPosition[0],\n y: currPosition[1],\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: {\n verticalAlign: 'middle'\n }\n };\n };\n return SingleAxisPointer;\n}(BaseAxisPointer);\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getPointDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = axis.getBandWidth();\n var span = otherExtent[1] - otherExtent[0];\n return {\n type: 'Rect',\n shape: viewHelper.makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getPointDimIndex(axis))\n };\n }\n};\nfunction getPointDimIndex(axis) {\n return axis.isHorizontal() ? 0 : 1;\n}\nfunction getGlobalExtent(coordSys, dimIndex) {\n var rect = coordSys.getRect();\n return [rect[XY[dimIndex]], rect[XY[dimIndex]] + rect[WH[dimIndex]]];\n}\nexport default SingleAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { use } from '../../extension.js';\nimport ComponentView from '../../view/Component.js';\nimport SingleAxisView from '../axis/SingleAxisView.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport SingleAxisModel from '../../coord/single/AxisModel.js';\nimport singleCreator from '../../coord/single/singleCreator.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport AxisView from '../axis/AxisView.js';\nimport SingleAxisPointer from '../axisPointer/SingleAxisPointer.js';\nvar SingleView = /** @class */function (_super) {\n __extends(SingleView, _super);\n function SingleView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleView.type;\n return _this;\n }\n SingleView.type = 'single';\n return SingleView;\n}(ComponentView);\nexport function install(registers) {\n use(installAxisPointer);\n AxisView.registerAxisPointerClass('SingleAxisPointer', SingleAxisPointer);\n registers.registerComponentView(SingleView);\n // Axis\n registers.registerComponentView(SingleAxisView);\n registers.registerComponentModel(SingleAxisModel);\n axisModelCreator(registers, 'single', SingleAxisModel, SingleAxisModel.defaultOption);\n registers.registerCoordinateSystem('single', singleCreator);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { getLayoutParams, sizeCalculable, mergeLayoutParam } from '../../util/layout.js';\nvar CalendarModel = /** @class */function (_super) {\n __extends(CalendarModel, _super);\n function CalendarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CalendarModel.type;\n return _this;\n }\n /**\n * @override\n */\n CalendarModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n _super.prototype.init.apply(this, arguments);\n mergeAndNormalizeLayoutParams(option, inputPositionParams);\n };\n /**\n * @override\n */\n CalendarModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n mergeAndNormalizeLayoutParams(this.option, option);\n };\n CalendarModel.prototype.getCellSize = function () {\n // Has been normalized\n return this.option.cellSize;\n };\n CalendarModel.type = 'calendar';\n CalendarModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n left: 80,\n top: 60,\n cellSize: 20,\n // horizontal vertical\n orient: 'horizontal',\n // month separate line style\n splitLine: {\n show: true,\n lineStyle: {\n color: '#000',\n width: 1,\n type: 'solid'\n }\n },\n // rect style temporarily unused emphasis\n itemStyle: {\n color: '#fff',\n borderWidth: 1,\n borderColor: '#ccc'\n },\n // week text style\n dayLabel: {\n show: true,\n firstDay: 0,\n // start end\n position: 'start',\n margin: '50%',\n color: '#000'\n },\n // month text style\n monthLabel: {\n show: true,\n // start end\n position: 'start',\n margin: 5,\n // center or left\n align: 'center',\n formatter: null,\n color: '#000'\n },\n // year text style\n yearLabel: {\n show: true,\n // top bottom left right\n position: null,\n margin: 30,\n formatter: null,\n color: '#ccc',\n fontFamily: 'sans-serif',\n fontWeight: 'bolder',\n fontSize: 20\n }\n };\n return CalendarModel;\n}(ComponentModel);\nfunction mergeAndNormalizeLayoutParams(target, raw) {\n // Normalize cellSize\n var cellSize = target.cellSize;\n var cellSizeArr;\n if (!zrUtil.isArray(cellSize)) {\n cellSizeArr = target.cellSize = [cellSize, cellSize];\n } else {\n cellSizeArr = cellSize;\n }\n if (cellSizeArr.length === 1) {\n cellSizeArr[1] = cellSizeArr[0];\n }\n var ignoreSize = zrUtil.map([0, 1], function (hvIdx) {\n // If user have set `width` or both `left` and `right`, cellSizeArr\n // will be automatically set to 'auto', otherwise the default\n // setting of cellSizeArr will make `width` setting not work.\n if (sizeCalculable(raw, hvIdx)) {\n cellSizeArr[hvIdx] = 'auto';\n }\n return cellSizeArr[hvIdx] != null && cellSizeArr[hvIdx] !== 'auto';\n });\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: ignoreSize\n });\n}\nexport default CalendarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { isString, extend, map, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { formatTplSimple } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getLocaleModel } from '../../core/locale.js';\nvar CalendarView = /** @class */function (_super) {\n __extends(CalendarView, _super);\n function CalendarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CalendarView.type;\n return _this;\n }\n CalendarView.prototype.render = function (calendarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n var coordSys = calendarModel.coordinateSystem;\n // range info\n var rangeData = coordSys.getRangeInfo();\n var orient = coordSys.getOrient();\n // locale\n var localeModel = ecModel.getLocaleModel();\n this._renderDayRect(calendarModel, rangeData, group);\n // _renderLines must be called prior to following function\n this._renderLines(calendarModel, rangeData, orient, group);\n this._renderYearText(calendarModel, rangeData, orient, group);\n this._renderMonthText(calendarModel, localeModel, orient, group);\n this._renderWeekText(calendarModel, localeModel, rangeData, orient, group);\n };\n // render day rect\n CalendarView.prototype._renderDayRect = function (calendarModel, rangeData, group) {\n var coordSys = calendarModel.coordinateSystem;\n var itemRectStyleModel = calendarModel.getModel('itemStyle').getItemStyle();\n var sw = coordSys.getCellWidth();\n var sh = coordSys.getCellHeight();\n for (var i = rangeData.start.time; i <= rangeData.end.time; i = coordSys.getNextNDay(i, 1).time) {\n var point = coordSys.dataToRect([i], false).tl;\n // every rect\n var rect = new graphic.Rect({\n shape: {\n x: point[0],\n y: point[1],\n width: sw,\n height: sh\n },\n cursor: 'default',\n style: itemRectStyleModel\n });\n group.add(rect);\n }\n };\n // render separate line\n CalendarView.prototype._renderLines = function (calendarModel, rangeData, orient, group) {\n var self = this;\n var coordSys = calendarModel.coordinateSystem;\n var lineStyleModel = calendarModel.getModel(['splitLine', 'lineStyle']).getLineStyle();\n var show = calendarModel.get(['splitLine', 'show']);\n var lineWidth = lineStyleModel.lineWidth;\n this._tlpoints = [];\n this._blpoints = [];\n this._firstDayOfMonth = [];\n this._firstDayPoints = [];\n var firstDay = rangeData.start;\n for (var i = 0; firstDay.time <= rangeData.end.time; i++) {\n addPoints(firstDay.formatedDate);\n if (i === 0) {\n firstDay = coordSys.getDateInfo(rangeData.start.y + '-' + rangeData.start.m);\n }\n var date = firstDay.date;\n date.setMonth(date.getMonth() + 1);\n firstDay = coordSys.getDateInfo(date);\n }\n addPoints(coordSys.getNextNDay(rangeData.end.time, 1).formatedDate);\n function addPoints(date) {\n self._firstDayOfMonth.push(coordSys.getDateInfo(date));\n self._firstDayPoints.push(coordSys.dataToRect([date], false).tl);\n var points = self._getLinePointsOfOneWeek(calendarModel, date, orient);\n self._tlpoints.push(points[0]);\n self._blpoints.push(points[points.length - 1]);\n show && self._drawSplitline(points, lineStyleModel, group);\n }\n // render top/left line\n show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group);\n // render bottom/right line\n show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group);\n };\n // get points at both ends\n CalendarView.prototype._getEdgesPoints = function (points, lineWidth, orient) {\n var rs = [points[0].slice(), points[points.length - 1].slice()];\n var idx = orient === 'horizontal' ? 0 : 1;\n // both ends of the line are extend half lineWidth\n rs[0][idx] = rs[0][idx] - lineWidth / 2;\n rs[1][idx] = rs[1][idx] + lineWidth / 2;\n return rs;\n };\n // render split line\n CalendarView.prototype._drawSplitline = function (points, lineStyle, group) {\n var poyline = new graphic.Polyline({\n z2: 20,\n shape: {\n points: points\n },\n style: lineStyle\n });\n group.add(poyline);\n };\n // render month line of one week points\n CalendarView.prototype._getLinePointsOfOneWeek = function (calendarModel, date, orient) {\n var coordSys = calendarModel.coordinateSystem;\n var parsedDate = coordSys.getDateInfo(date);\n var points = [];\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(parsedDate.time, i);\n var point = coordSys.dataToRect([tmpD.time], false);\n points[2 * tmpD.day] = point.tl;\n points[2 * tmpD.day + 1] = point[orient === 'horizontal' ? 'bl' : 'tr'];\n }\n return points;\n };\n CalendarView.prototype._formatterLabel = function (formatter, params) {\n if (isString(formatter) && formatter) {\n return formatTplSimple(formatter, params);\n }\n if (isFunction(formatter)) {\n return formatter(params);\n }\n return params.nameMap;\n };\n CalendarView.prototype._yearTextPositionControl = function (textEl, point, orient, position, margin) {\n var x = point[0];\n var y = point[1];\n var aligns = ['center', 'bottom'];\n if (position === 'bottom') {\n y += margin;\n aligns = ['center', 'top'];\n } else if (position === 'left') {\n x -= margin;\n } else if (position === 'right') {\n x += margin;\n aligns = ['center', 'top'];\n } else {\n // top\n y -= margin;\n }\n var rotate = 0;\n if (position === 'left' || position === 'right') {\n rotate = Math.PI / 2;\n }\n return {\n rotation: rotate,\n x: x,\n y: y,\n style: {\n align: aligns[0],\n verticalAlign: aligns[1]\n }\n };\n };\n // render year\n CalendarView.prototype._renderYearText = function (calendarModel, rangeData, orient, group) {\n var yearLabel = calendarModel.getModel('yearLabel');\n if (!yearLabel.get('show')) {\n return;\n }\n var margin = yearLabel.get('margin');\n var pos = yearLabel.get('position');\n if (!pos) {\n pos = orient !== 'horizontal' ? 'top' : 'left';\n }\n var points = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]];\n var xc = (points[0][0] + points[1][0]) / 2;\n var yc = (points[0][1] + points[1][1]) / 2;\n var idx = orient === 'horizontal' ? 0 : 1;\n var posPoints = {\n top: [xc, points[idx][1]],\n bottom: [xc, points[1 - idx][1]],\n left: [points[1 - idx][0], yc],\n right: [points[idx][0], yc]\n };\n var name = rangeData.start.y;\n if (+rangeData.end.y > +rangeData.start.y) {\n name = name + '-' + rangeData.end.y;\n }\n var formatter = yearLabel.get('formatter');\n var params = {\n start: rangeData.start.y,\n end: rangeData.end.y,\n nameMap: name\n };\n var content = this._formatterLabel(formatter, params);\n var yearText = new graphic.Text({\n z2: 30,\n style: createTextStyle(yearLabel, {\n text: content\n })\n });\n yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin));\n group.add(yearText);\n };\n CalendarView.prototype._monthTextPositionControl = function (point, isCenter, orient, position, margin) {\n var align = 'left';\n var vAlign = 'top';\n var x = point[0];\n var y = point[1];\n if (orient === 'horizontal') {\n y = y + margin;\n if (isCenter) {\n align = 'center';\n }\n if (position === 'start') {\n vAlign = 'bottom';\n }\n } else {\n x = x + margin;\n if (isCenter) {\n vAlign = 'middle';\n }\n if (position === 'start') {\n align = 'right';\n }\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render month and year text\n CalendarView.prototype._renderMonthText = function (calendarModel, localeModel, orient, group) {\n var monthLabel = calendarModel.getModel('monthLabel');\n if (!monthLabel.get('show')) {\n return;\n }\n var nameMap = monthLabel.get('nameMap');\n var margin = monthLabel.get('margin');\n var pos = monthLabel.get('position');\n var align = monthLabel.get('align');\n var termPoints = [this._tlpoints, this._blpoints];\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // PENDING\n // for ZH locale, original form is `一月` but current form is `1月`\n nameMap = localeModel.get(['time', 'monthAbbr']) || [];\n }\n var idx = pos === 'start' ? 0 : 1;\n var axis = orient === 'horizontal' ? 0 : 1;\n margin = pos === 'start' ? -margin : margin;\n var isCenter = align === 'center';\n for (var i = 0; i < termPoints[idx].length - 1; i++) {\n var tmp = termPoints[idx][i].slice();\n var firstDay = this._firstDayOfMonth[i];\n if (isCenter) {\n var firstDayPoints = this._firstDayPoints[i];\n tmp[axis] = (firstDayPoints[axis] + termPoints[0][i + 1][axis]) / 2;\n }\n var formatter = monthLabel.get('formatter');\n var name_1 = nameMap[+firstDay.m - 1];\n var params = {\n yyyy: firstDay.y,\n yy: (firstDay.y + '').slice(2),\n MM: firstDay.m,\n M: +firstDay.m,\n nameMap: name_1\n };\n var content = this._formatterLabel(formatter, params);\n var monthText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(monthLabel, {\n text: content\n }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin))\n });\n group.add(monthText);\n }\n };\n CalendarView.prototype._weekTextPositionControl = function (point, orient, position, margin, cellSize) {\n var align = 'center';\n var vAlign = 'middle';\n var x = point[0];\n var y = point[1];\n var isStart = position === 'start';\n if (orient === 'horizontal') {\n x = x + margin + (isStart ? 1 : -1) * cellSize[0] / 2;\n align = isStart ? 'right' : 'left';\n } else {\n y = y + margin + (isStart ? 1 : -1) * cellSize[1] / 2;\n vAlign = isStart ? 'bottom' : 'top';\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render weeks\n CalendarView.prototype._renderWeekText = function (calendarModel, localeModel, rangeData, orient, group) {\n var dayLabel = calendarModel.getModel('dayLabel');\n if (!dayLabel.get('show')) {\n return;\n }\n var coordSys = calendarModel.coordinateSystem;\n var pos = dayLabel.get('position');\n var nameMap = dayLabel.get('nameMap');\n var margin = dayLabel.get('margin');\n var firstDayOfWeek = coordSys.getFirstDayOfWeek();\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // Use the first letter of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file\n var dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);\n nameMap = dayOfWeekShort || map(localeModel.get(['time', 'dayOfWeekAbbr']), function (val) {\n return val[0];\n });\n }\n var start = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time;\n var cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()];\n margin = parsePercent(margin, Math.min(cellSize[1], cellSize[0]));\n if (pos === 'start') {\n start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time;\n margin = -margin;\n }\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(start, i);\n var point = coordSys.dataToRect([tmpD.time], false).center;\n var day = i;\n day = Math.abs((i + firstDayOfWeek) % 7);\n var weekText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(dayLabel, {\n text: nameMap[day]\n }), this._weekTextPositionControl(point, orient, pos, margin, cellSize))\n });\n group.add(weekText);\n }\n };\n CalendarView.type = 'calendar';\n return CalendarView;\n}(ComponentView);\nexport default CalendarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as layout from '../../util/layout.js';\nimport * as numberUtil from '../../util/number.js';\n// (24*60*60*1000)\nvar PROXIMATE_ONE_DAY = 86400000;\nvar Calendar = /** @class */function () {\n function Calendar(calendarModel, ecModel, api) {\n this.type = 'calendar';\n this.dimensions = Calendar.dimensions;\n // Required in createListFromData\n this.getDimensionsInfo = Calendar.getDimensionsInfo;\n this._model = calendarModel;\n }\n Calendar.getDimensionsInfo = function () {\n return [{\n name: 'time',\n type: 'time'\n }, 'value'];\n };\n Calendar.prototype.getRangeInfo = function () {\n return this._rangeInfo;\n };\n Calendar.prototype.getModel = function () {\n return this._model;\n };\n Calendar.prototype.getRect = function () {\n return this._rect;\n };\n Calendar.prototype.getCellWidth = function () {\n return this._sw;\n };\n Calendar.prototype.getCellHeight = function () {\n return this._sh;\n };\n Calendar.prototype.getOrient = function () {\n return this._orient;\n };\n /**\n * getFirstDayOfWeek\n *\n * @example\n * 0 : start at Sunday\n * 1 : start at Monday\n *\n * @return {number}\n */\n Calendar.prototype.getFirstDayOfWeek = function () {\n return this._firstDayOfWeek;\n };\n /**\n * get date info\n * }\n */\n Calendar.prototype.getDateInfo = function (date) {\n date = numberUtil.parseDate(date);\n var y = date.getFullYear();\n var m = date.getMonth() + 1;\n var mStr = m < 10 ? '0' + m : '' + m;\n var d = date.getDate();\n var dStr = d < 10 ? '0' + d : '' + d;\n var day = date.getDay();\n day = Math.abs((day + 7 - this.getFirstDayOfWeek()) % 7);\n return {\n y: y + '',\n m: mStr,\n d: dStr,\n day: day,\n time: date.getTime(),\n formatedDate: y + '-' + mStr + '-' + dStr,\n date: date\n };\n };\n Calendar.prototype.getNextNDay = function (date, n) {\n n = n || 0;\n if (n === 0) {\n return this.getDateInfo(date);\n }\n date = new Date(this.getDateInfo(date).time);\n date.setDate(date.getDate() + n);\n return this.getDateInfo(date);\n };\n Calendar.prototype.update = function (ecModel, api) {\n this._firstDayOfWeek = +this._model.getModel('dayLabel').get('firstDay');\n this._orient = this._model.get('orient');\n this._lineWidth = this._model.getModel('itemStyle').getItemStyle().lineWidth || 0;\n this._rangeInfo = this._getRangeInfo(this._initRangeOption());\n var weeks = this._rangeInfo.weeks || 1;\n var whNames = ['width', 'height'];\n var cellSize = this._model.getCellSize().slice();\n var layoutParams = this._model.getBoxLayoutParams();\n var cellNumbers = this._orient === 'horizontal' ? [weeks, 7] : [7, weeks];\n zrUtil.each([0, 1], function (idx) {\n if (cellSizeSpecified(cellSize, idx)) {\n layoutParams[whNames[idx]] = cellSize[idx] * cellNumbers[idx];\n }\n });\n var whGlobal = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var calendarRect = this._rect = layout.getLayoutRect(layoutParams, whGlobal);\n zrUtil.each([0, 1], function (idx) {\n if (!cellSizeSpecified(cellSize, idx)) {\n cellSize[idx] = calendarRect[whNames[idx]] / cellNumbers[idx];\n }\n });\n function cellSizeSpecified(cellSize, idx) {\n return cellSize[idx] != null && cellSize[idx] !== 'auto';\n }\n // Has been calculated out number.\n this._sw = cellSize[0];\n this._sh = cellSize[1];\n };\n /**\n * Convert a time data(time, value) item to (x, y) point.\n */\n // TODO Clamp of calendar is not same with cartesian coordinate systems.\n // It will return NaN if data exceeds.\n Calendar.prototype.dataToPoint = function (data, clamp) {\n zrUtil.isArray(data) && (data = data[0]);\n clamp == null && (clamp = true);\n var dayInfo = this.getDateInfo(data);\n var range = this._rangeInfo;\n var date = dayInfo.formatedDate;\n // if not in range return [NaN, NaN]\n if (clamp && !(dayInfo.time >= range.start.time && dayInfo.time < range.end.time + PROXIMATE_ONE_DAY)) {\n return [NaN, NaN];\n }\n var week = dayInfo.day;\n var nthWeek = this._getRangeInfo([range.start.time, date]).nthWeek;\n if (this._orient === 'vertical') {\n return [this._rect.x + week * this._sw + this._sw / 2, this._rect.y + nthWeek * this._sh + this._sh / 2];\n }\n return [this._rect.x + nthWeek * this._sw + this._sw / 2, this._rect.y + week * this._sh + this._sh / 2];\n };\n /**\n * Convert a (x, y) point to time data\n */\n Calendar.prototype.pointToData = function (point) {\n var date = this.pointToDate(point);\n return date && date.time;\n };\n /**\n * Convert a time date item to (x, y) four point.\n */\n Calendar.prototype.dataToRect = function (data, clamp) {\n var point = this.dataToPoint(data, clamp);\n return {\n contentShape: {\n x: point[0] - (this._sw - this._lineWidth) / 2,\n y: point[1] - (this._sh - this._lineWidth) / 2,\n width: this._sw - this._lineWidth,\n height: this._sh - this._lineWidth\n },\n center: point,\n tl: [point[0] - this._sw / 2, point[1] - this._sh / 2],\n tr: [point[0] + this._sw / 2, point[1] - this._sh / 2],\n br: [point[0] + this._sw / 2, point[1] + this._sh / 2],\n bl: [point[0] - this._sw / 2, point[1] + this._sh / 2]\n };\n };\n /**\n * Convert a (x, y) point to time date\n *\n * @param {Array} point point\n * @return {Object} date\n */\n Calendar.prototype.pointToDate = function (point) {\n var nthX = Math.floor((point[0] - this._rect.x) / this._sw) + 1;\n var nthY = Math.floor((point[1] - this._rect.y) / this._sh) + 1;\n var range = this._rangeInfo.range;\n if (this._orient === 'vertical') {\n return this._getDateByWeeksAndDay(nthY, nthX - 1, range);\n }\n return this._getDateByWeeksAndDay(nthX, nthY - 1, range);\n };\n Calendar.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n Calendar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n Calendar.prototype.containPoint = function (point) {\n console.warn('Not implemented.');\n return false;\n };\n /**\n * initRange\n * Normalize to an [start, end] array\n */\n Calendar.prototype._initRangeOption = function () {\n var range = this._model.get('range');\n var normalizedRange;\n // Convert [1990] to 1990\n if (zrUtil.isArray(range) && range.length === 1) {\n range = range[0];\n }\n if (!zrUtil.isArray(range)) {\n var rangeStr = range.toString();\n // One year.\n if (/^\\d{4}$/.test(rangeStr)) {\n normalizedRange = [rangeStr + '-01-01', rangeStr + '-12-31'];\n }\n // One month\n if (/^\\d{4}[\\/|-]\\d{1,2}$/.test(rangeStr)) {\n var start = this.getDateInfo(rangeStr);\n var firstDay = start.date;\n firstDay.setMonth(firstDay.getMonth() + 1);\n var end = this.getNextNDay(firstDay, -1);\n normalizedRange = [start.formatedDate, end.formatedDate];\n }\n // One day\n if (/^\\d{4}[\\/|-]\\d{1,2}[\\/|-]\\d{1,2}$/.test(rangeStr)) {\n normalizedRange = [rangeStr, rangeStr];\n }\n } else {\n normalizedRange = range;\n }\n if (!normalizedRange) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.logError('Invalid date range.');\n }\n // Not handling it.\n return range;\n }\n var tmp = this._getRangeInfo(normalizedRange);\n if (tmp.start.time > tmp.end.time) {\n normalizedRange.reverse();\n }\n return normalizedRange;\n };\n /**\n * range info\n *\n * @private\n * @param {Array} range range ['2017-01-01', '2017-07-08']\n * If range[0] > range[1], they will not be reversed.\n * @return {Object} obj\n */\n Calendar.prototype._getRangeInfo = function (range) {\n var parsedRange = [this.getDateInfo(range[0]), this.getDateInfo(range[1])];\n var reversed;\n if (parsedRange[0].time > parsedRange[1].time) {\n reversed = true;\n parsedRange.reverse();\n }\n var allDay = Math.floor(parsedRange[1].time / PROXIMATE_ONE_DAY) - Math.floor(parsedRange[0].time / PROXIMATE_ONE_DAY) + 1;\n // Consider case1 (#11677 #10430):\n // Set the system timezone as \"UK\", set the range to `['2016-07-01', '2016-12-31']`\n // Consider case2:\n // Firstly set system timezone as \"Time Zone: America/Toronto\",\n // ```\n // let first = new Date(1478412000000 - 3600 * 1000 * 2.5);\n // let second = new Date(1478412000000);\n // let allDays = Math.floor(second / ONE_DAY) - Math.floor(first / ONE_DAY) + 1;\n // ```\n // will get wrong result because of DST. So we should fix it.\n var date = new Date(parsedRange[0].time);\n var startDateNum = date.getDate();\n var endDateNum = parsedRange[1].date.getDate();\n date.setDate(startDateNum + allDay - 1);\n // The bias can not over a month, so just compare date.\n var dateNum = date.getDate();\n if (dateNum !== endDateNum) {\n var sign = date.getTime() - parsedRange[1].time > 0 ? 1 : -1;\n while ((dateNum = date.getDate()) !== endDateNum && (date.getTime() - parsedRange[1].time) * sign > 0) {\n allDay -= sign;\n date.setDate(dateNum - sign);\n }\n }\n var weeks = Math.floor((allDay + parsedRange[0].day + 6) / 7);\n var nthWeek = reversed ? -weeks + 1 : weeks - 1;\n reversed && parsedRange.reverse();\n return {\n range: [parsedRange[0].formatedDate, parsedRange[1].formatedDate],\n start: parsedRange[0],\n end: parsedRange[1],\n allDay: allDay,\n weeks: weeks,\n // From 0.\n nthWeek: nthWeek,\n fweek: parsedRange[0].day,\n lweek: parsedRange[1].day\n };\n };\n /**\n * get date by nthWeeks and week day in range\n *\n * @private\n * @param {number} nthWeek the week\n * @param {number} day the week day\n * @param {Array} range [d1, d2]\n * @return {Object}\n */\n Calendar.prototype._getDateByWeeksAndDay = function (nthWeek, day, range) {\n var rangeInfo = this._getRangeInfo(range);\n if (nthWeek > rangeInfo.weeks || nthWeek === 0 && day < rangeInfo.fweek || nthWeek === rangeInfo.weeks && day > rangeInfo.lweek) {\n return null;\n }\n var nthDay = (nthWeek - 1) * 7 - rangeInfo.fweek + day;\n var date = new Date(rangeInfo.start.time);\n date.setDate(+rangeInfo.start.d + nthDay);\n return this.getDateInfo(date);\n };\n Calendar.create = function (ecModel, api) {\n var calendarList = [];\n ecModel.eachComponent('calendar', function (calendarModel) {\n var calendar = new Calendar(calendarModel, ecModel, api);\n calendarList.push(calendar);\n calendarModel.coordinateSystem = calendar;\n });\n ecModel.eachSeries(function (calendarSeries) {\n if (calendarSeries.get('coordinateSystem') === 'calendar') {\n // Inject coordinate system\n calendarSeries.coordinateSystem = calendarList[calendarSeries.get('calendarIndex') || 0];\n }\n });\n return calendarList;\n };\n Calendar.dimensions = ['time', 'value'];\n return Calendar;\n}();\nfunction getCoordSys(finder) {\n var calendarModel = finder.calendarModel;\n var seriesModel = finder.seriesModel;\n var coordSys = calendarModel ? calendarModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem : null;\n return coordSys;\n}\nexport default Calendar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CalendarModel from '../../coord/calendar/CalendarModel.js';\nimport CalendarView from './CalendarView.js';\nimport Calendar from '../../coord/calendar/Calendar.js';\nexport function install(registers) {\n registers.registerComponentModel(CalendarModel);\n registers.registerComponentView(CalendarView);\n registers.registerCoordinateSystem('calendar', Calendar);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nimport { copyLayoutParams, mergeLayoutParam } from '../../util/layout.js';\n;\n;\n;\nexport function setKeyInfoToNewElOption(resultItem, newElOption) {\n var existElOption = resultItem.existing;\n // Set id and type after id assigned.\n newElOption.id = resultItem.keyInfo.id;\n !newElOption.type && existElOption && (newElOption.type = existElOption.type);\n // Set parent id if not specified\n if (newElOption.parentId == null) {\n var newElParentOption = newElOption.parentOption;\n if (newElParentOption) {\n newElOption.parentId = newElParentOption.id;\n } else if (existElOption) {\n newElOption.parentId = existElOption.parentId;\n }\n }\n // Clear\n newElOption.parentOption = null;\n}\nfunction isSetLoc(obj, props) {\n var isSet;\n zrUtil.each(props, function (prop) {\n obj[prop] != null && obj[prop] !== 'auto' && (isSet = true);\n });\n return isSet;\n}\nfunction mergeNewElOptionToExist(existList, index, newElOption) {\n // Update existing options, for `getOption` feature.\n var newElOptCopy = zrUtil.extend({}, newElOption);\n var existElOption = existList[index];\n var $action = newElOption.$action || 'merge';\n if ($action === 'merge') {\n if (existElOption) {\n if (process.env.NODE_ENV !== 'production') {\n var newType = newElOption.type;\n zrUtil.assert(!newType || existElOption.type === newType, 'Please set $action: \"replace\" to change `type`');\n }\n // We can ensure that newElOptCopy and existElOption are not\n // the same object, so `merge` will not change newElOptCopy.\n zrUtil.merge(existElOption, newElOptCopy, true);\n // Rigid body, use ignoreSize.\n mergeLayoutParam(existElOption, newElOptCopy, {\n ignoreSize: true\n });\n // Will be used in render.\n copyLayoutParams(newElOption, existElOption);\n // Copy transition info to new option so it can be used in the transition.\n // DO IT AFTER merge\n copyTransitionInfo(newElOption, existElOption);\n copyTransitionInfo(newElOption, existElOption, 'shape');\n copyTransitionInfo(newElOption, existElOption, 'style');\n copyTransitionInfo(newElOption, existElOption, 'extra');\n // Copy clipPath\n newElOption.clipPath = existElOption.clipPath;\n } else {\n existList[index] = newElOptCopy;\n }\n } else if ($action === 'replace') {\n existList[index] = newElOptCopy;\n } else if ($action === 'remove') {\n // null will be cleaned later.\n existElOption && (existList[index] = null);\n }\n}\nvar TRANSITION_PROPS_TO_COPY = ['transition', 'enterFrom', 'leaveTo'];\nvar ROOT_TRANSITION_PROPS_TO_COPY = TRANSITION_PROPS_TO_COPY.concat(['enterAnimation', 'updateAnimation', 'leaveAnimation']);\nfunction copyTransitionInfo(target, source, targetProp) {\n if (targetProp) {\n if (!target[targetProp] && source[targetProp]) {\n // TODO avoid creating this empty object when there is no transition configuration.\n target[targetProp] = {};\n }\n target = target[targetProp];\n source = source[targetProp];\n }\n if (!target || !source) {\n return;\n }\n var props = targetProp ? TRANSITION_PROPS_TO_COPY : ROOT_TRANSITION_PROPS_TO_COPY;\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n if (target[prop] == null && source[prop] != null) {\n target[prop] = source[prop];\n }\n }\n}\nfunction setLayoutInfoToExist(existItem, newElOption) {\n if (!existItem) {\n return;\n }\n existItem.hv = newElOption.hv = [\n // Rigid body, don't care about `width`.\n isSetLoc(newElOption, ['left', 'right']),\n // Rigid body, don't care about `height`.\n isSetLoc(newElOption, ['top', 'bottom'])];\n // Give default group size. Otherwise layout error may occur.\n if (existItem.type === 'group') {\n var existingGroupOpt = existItem;\n var newGroupOpt = newElOption;\n existingGroupOpt.width == null && (existingGroupOpt.width = newGroupOpt.width = 0);\n existingGroupOpt.height == null && (existingGroupOpt.height = newGroupOpt.height = 0);\n }\n}\nvar GraphicComponentModel = /** @class */function (_super) {\n __extends(GraphicComponentModel, _super);\n function GraphicComponentModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphicComponentModel.type;\n _this.preventAutoZ = true;\n return _this;\n }\n GraphicComponentModel.prototype.mergeOption = function (option, ecModel) {\n // Prevent default merge to elements\n var elements = this.option.elements;\n this.option.elements = null;\n _super.prototype.mergeOption.call(this, option, ecModel);\n this.option.elements = elements;\n };\n GraphicComponentModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n var newList = (isInit ? thisOption : newOption).elements;\n var existList = thisOption.elements = isInit ? [] : thisOption.elements;\n var flattenedList = [];\n this._flatten(newList, flattenedList, null);\n var mappingResult = modelUtil.mappingToExists(existList, flattenedList, 'normalMerge');\n // Clear elOptionsToUpdate\n var elOptionsToUpdate = this._elOptionsToUpdate = [];\n zrUtil.each(mappingResult, function (resultItem, index) {\n var newElOption = resultItem.newOption;\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(zrUtil.isObject(newElOption) || resultItem.existing, 'Empty graphic option definition');\n }\n if (!newElOption) {\n return;\n }\n elOptionsToUpdate.push(newElOption);\n setKeyInfoToNewElOption(resultItem, newElOption);\n mergeNewElOptionToExist(existList, index, newElOption);\n setLayoutInfoToExist(existList[index], newElOption);\n }, this);\n // Clean\n thisOption.elements = zrUtil.filter(existList, function (item) {\n // $action should be volatile, otherwise option gotten from\n // `getOption` will contain unexpected $action.\n item && delete item.$action;\n return item != null;\n });\n };\n /**\n * Convert\n * [{\n * type: 'group',\n * id: 'xx',\n * children: [{type: 'circle'}, {type: 'polygon'}]\n * }]\n * to\n * [\n * {type: 'group', id: 'xx'},\n * {type: 'circle', parentId: 'xx'},\n * {type: 'polygon', parentId: 'xx'}\n * ]\n */\n GraphicComponentModel.prototype._flatten = function (optionList, result, parentOption) {\n zrUtil.each(optionList, function (option) {\n if (!option) {\n return;\n }\n if (parentOption) {\n option.parentOption = parentOption;\n }\n result.push(option);\n var children = option.children;\n // here we don't judge if option.type is `group`\n // when new option doesn't provide `type`, it will cause that the children can't be updated.\n if (children && children.length) {\n this._flatten(children, result, option);\n }\n // Deleting for JSON output, and for not affecting group creation.\n delete option.children;\n }, this);\n };\n // FIXME\n // Pass to view using payload? setOption has a payload?\n GraphicComponentModel.prototype.useElOptionsToUpdate = function () {\n var els = this._elOptionsToUpdate;\n // Clear to avoid render duplicately when zooming.\n this._elOptionsToUpdate = null;\n return els;\n };\n GraphicComponentModel.type = 'graphic';\n GraphicComponentModel.defaultOption = {\n elements: []\n // parentId: null\n };\n\n return GraphicComponentModel;\n}(ComponentModel);\nexport { GraphicComponentModel };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport * as modelUtil from '../../util/model.js';\nimport * as graphicUtil from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isEC4CompatibleStyle, convertFromEC4CompatibleStyle } from '../../util/styleCompat.js';\nimport { applyLeaveTransition, applyUpdateTransition, isTransitionAll, updateLeaveTo } from '../../animation/customGraphicTransition.js';\nimport { updateProps } from '../../animation/basicTransition.js';\nimport { applyKeyframeAnimation, stopPreviousKeyframeAnimationAndRestore } from '../../animation/customGraphicKeyframeAnimation.js';\nvar nonShapeGraphicElements = {\n // Reserved but not supported in graphic component.\n path: null,\n compoundPath: null,\n // Supported in graphic component.\n group: graphicUtil.Group,\n image: graphicUtil.Image,\n text: graphicUtil.Text\n};\nexport var inner = modelUtil.makeInner();\n// ------------------------\n// View\n// ------------------------\nvar GraphicComponentView = /** @class */function (_super) {\n __extends(GraphicComponentView, _super);\n function GraphicComponentView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphicComponentView.type;\n return _this;\n }\n GraphicComponentView.prototype.init = function () {\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.render = function (graphicModel, ecModel, api) {\n // Having leveraged between use cases and algorithm complexity, a very\n // simple layout mechanism is used:\n // The size(width/height) can be determined by itself or its parent (not\n // implemented yet), but can not by its children. (Top-down travel)\n // The location(x/y) can be determined by the bounding rect of itself\n // (can including its descendants or not) and the size of its parent.\n // (Bottom-up travel)\n // When `chart.clear()` or `chart.setOption({...}, true)` with the same id,\n // view will be reused.\n if (graphicModel !== this._lastGraphicModel) {\n this._clear();\n }\n this._lastGraphicModel = graphicModel;\n this._updateElements(graphicModel);\n this._relocate(graphicModel, api);\n };\n /**\n * Update graphic elements.\n */\n GraphicComponentView.prototype._updateElements = function (graphicModel) {\n var elOptionsToUpdate = graphicModel.useElOptionsToUpdate();\n if (!elOptionsToUpdate) {\n return;\n }\n var elMap = this._elMap;\n var rootGroup = this.group;\n var globalZ = graphicModel.get('z');\n var globalZLevel = graphicModel.get('zlevel');\n // Top-down tranverse to assign graphic settings to each elements.\n zrUtil.each(elOptionsToUpdate, function (elOption) {\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var elExisting = id != null ? elMap.get(id) : null;\n var parentId = modelUtil.convertOptionIdName(elOption.parentId, null);\n var targetElParent = parentId != null ? elMap.get(parentId) : rootGroup;\n var elType = elOption.type;\n var elOptionStyle = elOption.style;\n if (elType === 'text' && elOptionStyle) {\n // In top/bottom mode, textVerticalAlign should not be used, which cause\n // inaccurately locating.\n if (elOption.hv && elOption.hv[1]) {\n elOptionStyle.textVerticalAlign = elOptionStyle.textBaseline = elOptionStyle.verticalAlign = elOptionStyle.align = null;\n }\n }\n var textContentOption = elOption.textContent;\n var textConfig = elOption.textConfig;\n if (elOptionStyle && isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption)) {\n var convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true);\n if (!textConfig && convertResult.textConfig) {\n textConfig = elOption.textConfig = convertResult.textConfig;\n }\n if (!textContentOption && convertResult.textContent) {\n textContentOption = convertResult.textContent;\n }\n }\n // Remove unnecessary props to avoid potential problems.\n var elOptionCleaned = getCleanedElOption(elOption);\n // For simple, do not support parent change, otherwise reorder is needed.\n if (process.env.NODE_ENV !== 'production') {\n elExisting && zrUtil.assert(targetElParent === elExisting.parent, 'Changing parent is not supported.');\n }\n var $action = elOption.$action || 'merge';\n var isMerge = $action === 'merge';\n var isReplace = $action === 'replace';\n if (isMerge) {\n var isInit = !elExisting;\n var el_1 = elExisting;\n if (isInit) {\n el_1 = createEl(id, targetElParent, elOption.type, elMap);\n } else {\n el_1 && (inner(el_1).isNew = false);\n // Stop and restore before update any other attributes.\n stopPreviousKeyframeAnimationAndRestore(el_1);\n }\n if (el_1) {\n applyUpdateTransition(el_1, elOptionCleaned, graphicModel, {\n isInit: isInit\n });\n updateCommonAttrs(el_1, elOption, globalZ, globalZLevel);\n }\n } else if (isReplace) {\n removeEl(elExisting, elOption, elMap, graphicModel);\n var el_2 = createEl(id, targetElParent, elOption.type, elMap);\n if (el_2) {\n applyUpdateTransition(el_2, elOptionCleaned, graphicModel, {\n isInit: true\n });\n updateCommonAttrs(el_2, elOption, globalZ, globalZLevel);\n }\n } else if ($action === 'remove') {\n updateLeaveTo(elExisting, elOption);\n removeEl(elExisting, elOption, elMap, graphicModel);\n }\n var el = elMap.get(id);\n if (el && textContentOption) {\n if (isMerge) {\n var textContentExisting = el.getTextContent();\n textContentExisting ? textContentExisting.attr(textContentOption) : el.setTextContent(new graphicUtil.Text(textContentOption));\n } else if (isReplace) {\n el.setTextContent(new graphicUtil.Text(textContentOption));\n }\n }\n if (el) {\n var clipPathOption = elOption.clipPath;\n if (clipPathOption) {\n var clipPathType = clipPathOption.type;\n var clipPath = void 0;\n var isInit = false;\n if (isMerge) {\n var oldClipPath = el.getClipPath();\n isInit = !oldClipPath || inner(oldClipPath).type !== clipPathType;\n clipPath = isInit ? newEl(clipPathType) : oldClipPath;\n } else if (isReplace) {\n isInit = true;\n clipPath = newEl(clipPathType);\n }\n el.setClipPath(clipPath);\n applyUpdateTransition(clipPath, clipPathOption, graphicModel, {\n isInit: isInit\n });\n applyKeyframeAnimation(clipPath, clipPathOption.keyframeAnimation, graphicModel);\n }\n var elInner = inner(el);\n el.setTextConfig(textConfig);\n elInner.option = elOption;\n setEventData(el, graphicModel, elOption);\n graphicUtil.setTooltipConfig({\n el: el,\n componentModel: graphicModel,\n itemName: el.name,\n itemTooltipOption: elOption.tooltip\n });\n applyKeyframeAnimation(el, elOption.keyframeAnimation, graphicModel);\n }\n });\n };\n /**\n * Locate graphic elements.\n */\n GraphicComponentView.prototype._relocate = function (graphicModel, api) {\n var elOptions = graphicModel.option.elements;\n var rootGroup = this.group;\n var elMap = this._elMap;\n var apiWidth = api.getWidth();\n var apiHeight = api.getHeight();\n var xy = ['x', 'y'];\n // Top-down to calculate percentage width/height of group\n for (var i = 0; i < elOptions.length; i++) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el || !el.isGroup) {\n continue;\n }\n var parentEl = el.parent;\n var isParentRoot = parentEl === rootGroup;\n // Like 'position:absolut' in css, default 0.\n var elInner = inner(el);\n var parentElInner = inner(parentEl);\n elInner.width = parsePercent(elInner.option.width, isParentRoot ? apiWidth : parentElInner.width) || 0;\n elInner.height = parsePercent(elInner.option.height, isParentRoot ? apiHeight : parentElInner.height) || 0;\n }\n // Bottom-up tranvese all elements (consider ec resize) to locate elements.\n for (var i = elOptions.length - 1; i >= 0; i--) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el) {\n continue;\n }\n var parentEl = el.parent;\n var parentElInner = inner(parentEl);\n var containerInfo = parentEl === rootGroup ? {\n width: apiWidth,\n height: apiHeight\n } : {\n width: parentElInner.width,\n height: parentElInner.height\n };\n // PENDING\n // Currently, when `bounding: 'all'`, the union bounding rect of the group\n // does not include the rect of [0, 0, group.width, group.height], which\n // is probably weird for users. Should we make a break change for it?\n var layoutPos = {};\n var layouted = layoutUtil.positionElement(el, elOption, containerInfo, null, {\n hv: elOption.hv,\n boundingMode: elOption.bounding\n }, layoutPos);\n if (!inner(el).isNew && layouted) {\n var transition = elOption.transition;\n var animatePos = {};\n for (var k = 0; k < xy.length; k++) {\n var key = xy[k];\n var val = layoutPos[key];\n if (transition && (isTransitionAll(transition) || zrUtil.indexOf(transition, key) >= 0)) {\n animatePos[key] = val;\n } else {\n el[key] = val;\n }\n }\n updateProps(el, animatePos, graphicModel, 0);\n } else {\n el.attr(layoutPos);\n }\n }\n };\n /**\n * Clear all elements.\n */\n GraphicComponentView.prototype._clear = function () {\n var _this = this;\n var elMap = this._elMap;\n elMap.each(function (el) {\n removeEl(el, inner(el).option, elMap, _this._lastGraphicModel);\n });\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.dispose = function () {\n this._clear();\n };\n GraphicComponentView.type = 'graphic';\n return GraphicComponentView;\n}(ComponentView);\nexport { GraphicComponentView };\nfunction newEl(graphicType) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(graphicType, 'graphic type MUST be set');\n }\n var Clz = zrUtil.hasOwn(nonShapeGraphicElements, graphicType)\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n ? nonShapeGraphicElements[graphicType] : graphicUtil.getShapeClass(graphicType);\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(Clz, \"graphic type \" + graphicType + \" can not be found\");\n }\n var el = new Clz({});\n inner(el).type = graphicType;\n return el;\n}\nfunction createEl(id, targetElParent, graphicType, elMap) {\n var el = newEl(graphicType);\n targetElParent.add(el);\n elMap.set(id, el);\n inner(el).id = id;\n inner(el).isNew = true;\n return el;\n}\nfunction removeEl(elExisting, elOption, elMap, graphicModel) {\n var existElParent = elExisting && elExisting.parent;\n if (existElParent) {\n elExisting.type === 'group' && elExisting.traverse(function (el) {\n removeEl(el, elOption, elMap, graphicModel);\n });\n applyLeaveTransition(elExisting, elOption, graphicModel);\n elMap.removeKey(inner(elExisting).id);\n }\n}\nfunction updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) {\n if (!el.isGroup) {\n zrUtil.each([['cursor', Displayable.prototype.cursor],\n // We should not support configure z and zlevel in the element level.\n // But seems we didn't limit it previously. So here still use it to avoid breaking.\n ['zlevel', defaultZlevel || 0], ['z', defaultZ || 0],\n // z2 must not be null/undefined, otherwise sort error may occur.\n ['z2', 0]], function (item) {\n var prop = item[0];\n if (zrUtil.hasOwn(elOption, prop)) {\n el[prop] = zrUtil.retrieve2(elOption[prop], item[1]);\n } else if (el[prop] == null) {\n el[prop] = item[1];\n }\n });\n }\n zrUtil.each(zrUtil.keys(elOption), function (key) {\n // Assign event handlers.\n // PENDING: should enumerate all event names or use pattern matching?\n if (key.indexOf('on') === 0) {\n var val = elOption[key];\n el[key] = zrUtil.isFunction(val) ? val : null;\n }\n });\n if (zrUtil.hasOwn(elOption, 'draggable')) {\n el.draggable = elOption.draggable;\n }\n // Other attributes\n elOption.name != null && (el.name = elOption.name);\n elOption.id != null && (el.id = elOption.id);\n}\n// Remove unnecessary props to avoid potential problems.\nfunction getCleanedElOption(elOption) {\n elOption = zrUtil.extend({}, elOption);\n zrUtil.each(['id', 'parentId', '$action', 'hv', 'bounding', 'textContent', 'clipPath'].concat(layoutUtil.LOCATION_PARAMS), function (name) {\n delete elOption[name];\n });\n return elOption;\n}\nfunction setEventData(el, graphicModel, elOption) {\n var eventData = getECData(el).eventData;\n // Simple optimize for large amount of elements that no need event.\n if (!el.silent && !el.ignore && !eventData) {\n eventData = getECData(el).eventData = {\n componentType: 'graphic',\n componentIndex: graphicModel.componentIndex,\n name: el.name\n };\n }\n // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n if (eventData) {\n eventData.info = elOption.info;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray } from 'zrender/lib/core/util.js';\nimport { GraphicComponentModel } from './GraphicModel.js';\nimport { GraphicComponentView } from './GraphicView.js';\nexport function install(registers) {\n registers.registerComponentModel(GraphicComponentModel);\n registers.registerComponentView(GraphicComponentView);\n registers.registerPreprocessor(function (option) {\n var graphicOption = option.graphic;\n // Convert\n // {graphic: [{left: 10, type: 'circle'}, ...]}\n // or\n // {graphic: {left: 10, type: 'circle'}}\n // to\n // {graphic: [{elements: [{left: 10, type: 'circle'}, ...]}]}\n if (isArray(graphicOption)) {\n if (!graphicOption[0] || !graphicOption[0].elements) {\n option.graphic = [{\n elements: graphicOption\n }];\n } else {\n // Only one graphic instance can be instantiated. (We don't\n // want that too many views are created in echarts._viewMap.)\n option.graphic = [option.graphic[0]];\n }\n } else if (graphicOption && !graphicOption.elements) {\n option.graphic = [{\n elements: [graphicOption]\n }];\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { indexOf, createHashMap, assert } from 'zrender/lib/core/util.js';\nexport var DATA_ZOOM_AXIS_DIMENSIONS = ['x', 'y', 'radius', 'angle', 'single'];\n// Supported coords.\n// FIXME: polar has been broken (but rarely used).\nvar SERIES_COORDS = ['cartesian2d', 'polar', 'singleAxis'];\nexport function isCoordSupported(seriesModel) {\n var coordType = seriesModel.get('coordinateSystem');\n return indexOf(SERIES_COORDS, coordType) >= 0;\n}\nexport function getAxisMainType(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'Axis';\n}\nexport function getAxisIndexPropName(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'AxisIndex';\n}\nexport function getAxisIdPropName(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'AxisId';\n}\n/**\n * If two dataZoomModels has the same axis controlled, we say that they are 'linked'.\n * This function finds all linked dataZoomModels start from the given payload.\n */\nexport function findEffectedDataZooms(ecModel, payload) {\n // Key: `DataZoomAxisDimension`\n var axisRecords = createHashMap();\n var effectedModels = [];\n // Key: uid of dataZoomModel\n var effectedModelMap = createHashMap();\n // Find the dataZooms specified by payload.\n ecModel.eachComponent({\n mainType: 'dataZoom',\n query: payload\n }, function (dataZoomModel) {\n if (!effectedModelMap.get(dataZoomModel.uid)) {\n addToEffected(dataZoomModel);\n }\n });\n // Start from the given dataZoomModels, travel the graph to find\n // all of the linked dataZoom models.\n var foundNewLink;\n do {\n foundNewLink = false;\n ecModel.eachComponent('dataZoom', processSingle);\n } while (foundNewLink);\n function processSingle(dataZoomModel) {\n if (!effectedModelMap.get(dataZoomModel.uid) && isLinked(dataZoomModel)) {\n addToEffected(dataZoomModel);\n foundNewLink = true;\n }\n }\n function addToEffected(dataZoom) {\n effectedModelMap.set(dataZoom.uid, true);\n effectedModels.push(dataZoom);\n markAxisControlled(dataZoom);\n }\n function isLinked(dataZoomModel) {\n var isLink = false;\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisIdxArr = axisRecords.get(axisDim);\n if (axisIdxArr && axisIdxArr[axisIndex]) {\n isLink = true;\n }\n });\n return isLink;\n }\n function markAxisControlled(dataZoomModel) {\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n (axisRecords.get(axisDim) || axisRecords.set(axisDim, []))[axisIndex] = true;\n });\n }\n return effectedModels;\n}\n/**\n * Find the first target coordinate system.\n * Available after model built.\n *\n * @return Like {\n * grid: [\n * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1},\n * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0},\n * ...\n * ], // cartesians must not be null/undefined.\n * polar: [\n * {model: coord0, axisModels: [axis4], coordIndex: 0},\n * ...\n * ], // polars must not be null/undefined.\n * singleAxis: [\n * {model: coord0, axisModels: [], coordIndex: 0}\n * ]\n * }\n */\nexport function collectReferCoordSysModelInfo(dataZoomModel) {\n var ecModel = dataZoomModel.ecModel;\n var coordSysInfoWrap = {\n infoList: [],\n infoMap: createHashMap()\n };\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n if (!axisModel) {\n return;\n }\n var coordSysModel = axisModel.getCoordSysModel();\n if (!coordSysModel) {\n return;\n }\n var coordSysUid = coordSysModel.uid;\n var coordSysInfo = coordSysInfoWrap.infoMap.get(coordSysUid);\n if (!coordSysInfo) {\n coordSysInfo = {\n model: coordSysModel,\n axisModels: []\n };\n coordSysInfoWrap.infoList.push(coordSysInfo);\n coordSysInfoWrap.infoMap.set(coordSysUid, coordSysInfo);\n }\n coordSysInfo.axisModels.push(axisModel);\n });\n return coordSysInfoWrap;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { each, createHashMap, merge, assert } from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { getAxisMainType, DATA_ZOOM_AXIS_DIMENSIONS } from './helper.js';\nimport { MULTIPLE_REFERRING, SINGLE_REFERRING } from '../../util/model.js';\nvar DataZoomAxisInfo = /** @class */function () {\n function DataZoomAxisInfo() {\n this.indexList = [];\n this.indexMap = [];\n }\n DataZoomAxisInfo.prototype.add = function (axisCmptIdx) {\n // Remove duplication.\n if (!this.indexMap[axisCmptIdx]) {\n this.indexList.push(axisCmptIdx);\n this.indexMap[axisCmptIdx] = true;\n }\n };\n return DataZoomAxisInfo;\n}();\nvar DataZoomModel = /** @class */function (_super) {\n __extends(DataZoomModel, _super);\n function DataZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = DataZoomModel.type;\n _this._autoThrottle = true;\n _this._noTarget = true;\n /**\n * It is `[rangeModeForMin, rangeModeForMax]`.\n * The optional values for `rangeMode`:\n * + `'value'` mode: the axis extent will always be determined by\n * `dataZoom.startValue` and `dataZoom.endValue`, despite\n * how data like and how `axis.min` and `axis.max` are.\n * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`,\n * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`,\n * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`.\n * Axis extent will be determined by the result of the percent of `[dMin, dMax]`.\n *\n * For example, when users are using dynamic data (update data periodically via `setOption`),\n * if in `'value`' mode, the window will be kept in a fixed value range despite how\n * data are appended, while if in `'percent'` mode, whe window range will be changed alone with\n * the appended data (suppose `axis.min` and `axis.max` are not specified).\n */\n _this._rangePropMode = ['percent', 'percent'];\n return _this;\n }\n DataZoomModel.prototype.init = function (option, parentModel, ecModel) {\n var inputRawOption = retrieveRawOption(option);\n /**\n * Suppose a \"main process\" start at the point that model prepared (that is,\n * model initialized or merged or method called in `action`).\n * We should keep the `main process` idempotent, that is, given a set of values\n * on `option`, we get the same result.\n *\n * But sometimes, values on `option` will be updated for providing users\n * a \"final calculated value\" (`dataZoomProcessor` will do that). Those value\n * should not be the base/input of the `main process`.\n *\n * So in that case we should save and keep the input of the `main process`\n * separately, called `settledOption`.\n *\n * For example, consider the case:\n * (Step_1) brush zoom the grid by `toolbox.dataZoom`,\n * where the original input `option.startValue`, `option.endValue` are earsed by\n * calculated value.\n * (Step)2) click the legend to hide and show a series,\n * where the new range is calculated by the earsed `startValue` and `endValue`,\n * which brings incorrect result.\n */\n this.settledOption = inputRawOption;\n this.mergeDefaultAndTheme(option, ecModel);\n this._doInit(inputRawOption);\n };\n DataZoomModel.prototype.mergeOption = function (newOption) {\n var inputRawOption = retrieveRawOption(newOption);\n // FIX #2591\n merge(this.option, newOption, true);\n merge(this.settledOption, inputRawOption, true);\n this._doInit(inputRawOption);\n };\n DataZoomModel.prototype._doInit = function (inputRawOption) {\n var thisOption = this.option;\n this._setDefaultThrottle(inputRawOption);\n this._updateRangeUse(inputRawOption);\n var settledOption = this.settledOption;\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n // start/end has higher priority over startValue/endValue if they\n // both set, but we should make chart.setOption({endValue: 1000})\n // effective, rather than chart.setOption({endValue: 1000, end: null}).\n if (this._rangePropMode[index] === 'value') {\n thisOption[names[0]] = settledOption[names[0]] = null;\n }\n // Otherwise do nothing and use the merge result.\n }, this);\n this._resetTarget();\n };\n DataZoomModel.prototype._resetTarget = function () {\n var optionOrient = this.get('orient', true);\n var targetAxisIndexMap = this._targetAxisInfoMap = createHashMap();\n var hasAxisSpecified = this._fillSpecifiedTargetAxis(targetAxisIndexMap);\n if (hasAxisSpecified) {\n this._orient = optionOrient || this._makeAutoOrientByTargetAxis();\n } else {\n this._orient = optionOrient || 'horizontal';\n this._fillAutoTargetAxisByOrient(targetAxisIndexMap, this._orient);\n }\n this._noTarget = true;\n targetAxisIndexMap.each(function (axisInfo) {\n if (axisInfo.indexList.length) {\n this._noTarget = false;\n }\n }, this);\n };\n DataZoomModel.prototype._fillSpecifiedTargetAxis = function (targetAxisIndexMap) {\n var hasAxisSpecified = false;\n each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) {\n var refering = this.getReferringComponents(getAxisMainType(axisDim), MULTIPLE_REFERRING);\n // When user set axisIndex as a empty array, we think that user specify axisIndex\n // but do not want use auto mode. Because empty array may be encountered when\n // some error occurred.\n if (!refering.specified) {\n return;\n }\n hasAxisSpecified = true;\n var axisInfo = new DataZoomAxisInfo();\n each(refering.models, function (axisModel) {\n axisInfo.add(axisModel.componentIndex);\n });\n targetAxisIndexMap.set(axisDim, axisInfo);\n }, this);\n return hasAxisSpecified;\n };\n DataZoomModel.prototype._fillAutoTargetAxisByOrient = function (targetAxisIndexMap, orient) {\n var ecModel = this.ecModel;\n var needAuto = true;\n // Find axis that parallel to dataZoom as default.\n if (needAuto) {\n var axisDim = orient === 'vertical' ? 'y' : 'x';\n var axisModels = ecModel.findComponents({\n mainType: axisDim + 'Axis'\n });\n setParallelAxis(axisModels, axisDim);\n }\n // Find axis that parallel to dataZoom as default.\n if (needAuto) {\n var axisModels = ecModel.findComponents({\n mainType: 'singleAxis',\n filter: function (axisModel) {\n return axisModel.get('orient', true) === orient;\n }\n });\n setParallelAxis(axisModels, 'single');\n }\n function setParallelAxis(axisModels, axisDim) {\n // At least use the first parallel axis as the target axis.\n var axisModel = axisModels[0];\n if (!axisModel) {\n return;\n }\n var axisInfo = new DataZoomAxisInfo();\n axisInfo.add(axisModel.componentIndex);\n targetAxisIndexMap.set(axisDim, axisInfo);\n needAuto = false;\n // Find parallel axes in the same grid.\n if (axisDim === 'x' || axisDim === 'y') {\n var gridModel_1 = axisModel.getReferringComponents('grid', SINGLE_REFERRING).models[0];\n gridModel_1 && each(axisModels, function (axModel) {\n if (axisModel.componentIndex !== axModel.componentIndex && gridModel_1 === axModel.getReferringComponents('grid', SINGLE_REFERRING).models[0]) {\n axisInfo.add(axModel.componentIndex);\n }\n });\n }\n }\n if (needAuto) {\n // If no parallel axis, find the first category axis as default. (Also consider polar).\n each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) {\n if (!needAuto) {\n return;\n }\n var axisModels = ecModel.findComponents({\n mainType: getAxisMainType(axisDim),\n filter: function (axisModel) {\n return axisModel.get('type', true) === 'category';\n }\n });\n if (axisModels[0]) {\n var axisInfo = new DataZoomAxisInfo();\n axisInfo.add(axisModels[0].componentIndex);\n targetAxisIndexMap.set(axisDim, axisInfo);\n needAuto = false;\n }\n }, this);\n }\n };\n DataZoomModel.prototype._makeAutoOrientByTargetAxis = function () {\n var dim;\n // Find the first axis\n this.eachTargetAxis(function (axisDim) {\n !dim && (dim = axisDim);\n }, this);\n return dim === 'y' ? 'vertical' : 'horizontal';\n };\n DataZoomModel.prototype._setDefaultThrottle = function (inputRawOption) {\n // When first time user set throttle, auto throttle ends.\n if (inputRawOption.hasOwnProperty('throttle')) {\n this._autoThrottle = false;\n }\n if (this._autoThrottle) {\n var globalOption = this.ecModel.option;\n this.option.throttle = globalOption.animation && globalOption.animationDurationUpdate > 0 ? 100 : 20;\n }\n };\n DataZoomModel.prototype._updateRangeUse = function (inputRawOption) {\n var rangePropMode = this._rangePropMode;\n var rangeModeInOption = this.get('rangeMode');\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n var percentSpecified = inputRawOption[names[0]] != null;\n var valueSpecified = inputRawOption[names[1]] != null;\n if (percentSpecified && !valueSpecified) {\n rangePropMode[index] = 'percent';\n } else if (!percentSpecified && valueSpecified) {\n rangePropMode[index] = 'value';\n } else if (rangeModeInOption) {\n rangePropMode[index] = rangeModeInOption[index];\n } else if (percentSpecified) {\n // percentSpecified && valueSpecified\n rangePropMode[index] = 'percent';\n }\n // else remain its original setting.\n });\n };\n\n DataZoomModel.prototype.noTarget = function () {\n return this._noTarget;\n };\n DataZoomModel.prototype.getFirstTargetAxisModel = function () {\n var firstAxisModel;\n this.eachTargetAxis(function (axisDim, axisIndex) {\n if (firstAxisModel == null) {\n firstAxisModel = this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n }\n }, this);\n return firstAxisModel;\n };\n /**\n * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel\n */\n DataZoomModel.prototype.eachTargetAxis = function (callback, context) {\n this._targetAxisInfoMap.each(function (axisInfo, axisDim) {\n each(axisInfo.indexList, function (axisIndex) {\n callback.call(context, axisDim, axisIndex);\n });\n });\n };\n /**\n * @return If not found, return null/undefined.\n */\n DataZoomModel.prototype.getAxisProxy = function (axisDim, axisIndex) {\n var axisModel = this.getAxisModel(axisDim, axisIndex);\n if (axisModel) {\n return axisModel.__dzAxisProxy;\n }\n };\n /**\n * @return If not found, return null/undefined.\n */\n DataZoomModel.prototype.getAxisModel = function (axisDim, axisIndex) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim && axisIndex != null);\n }\n var axisInfo = this._targetAxisInfoMap.get(axisDim);\n if (axisInfo && axisInfo.indexMap[axisIndex]) {\n return this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n }\n };\n /**\n * If not specified, set to undefined.\n */\n DataZoomModel.prototype.setRawRange = function (opt) {\n var thisOption = this.option;\n var settledOption = this.settledOption;\n each([['start', 'startValue'], ['end', 'endValue']], function (names) {\n // Consider the pair :\n // If one has value and the other one is `null/undefined`, we both set them\n // to `settledOption`. This strategy enables the feature to clear the original\n // value in `settledOption` to `null/undefined`.\n // But if both of them are `null/undefined`, we do not set them to `settledOption`\n // and keep `settledOption` with the original value. This strategy enables users to\n // only set but not set when calling\n // `dispatchAction`.\n // The pair is treated in the same way.\n if (opt[names[0]] != null || opt[names[1]] != null) {\n thisOption[names[0]] = settledOption[names[0]] = opt[names[0]];\n thisOption[names[1]] = settledOption[names[1]] = opt[names[1]];\n }\n }, this);\n this._updateRangeUse(opt);\n };\n DataZoomModel.prototype.setCalculatedRange = function (opt) {\n var option = this.option;\n each(['start', 'startValue', 'end', 'endValue'], function (name) {\n option[name] = opt[name];\n });\n };\n DataZoomModel.prototype.getPercentRange = function () {\n var axisProxy = this.findRepresentativeAxisProxy();\n if (axisProxy) {\n return axisProxy.getDataPercentWindow();\n }\n };\n /**\n * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0);\n *\n * @return [startValue, endValue] value can only be '-' or finite number.\n */\n DataZoomModel.prototype.getValueRange = function (axisDim, axisIndex) {\n if (axisDim == null && axisIndex == null) {\n var axisProxy = this.findRepresentativeAxisProxy();\n if (axisProxy) {\n return axisProxy.getDataValueWindow();\n }\n } else {\n return this.getAxisProxy(axisDim, axisIndex).getDataValueWindow();\n }\n };\n /**\n * @param axisModel If axisModel given, find axisProxy\n * corresponding to the axisModel\n */\n DataZoomModel.prototype.findRepresentativeAxisProxy = function (axisModel) {\n if (axisModel) {\n return axisModel.__dzAxisProxy;\n }\n // Find the first hosted axisProxy\n var firstProxy;\n var axisDimList = this._targetAxisInfoMap.keys();\n for (var i = 0; i < axisDimList.length; i++) {\n var axisDim = axisDimList[i];\n var axisInfo = this._targetAxisInfoMap.get(axisDim);\n for (var j = 0; j < axisInfo.indexList.length; j++) {\n var proxy = this.getAxisProxy(axisDim, axisInfo.indexList[j]);\n if (proxy.hostedBy(this)) {\n return proxy;\n }\n if (!firstProxy) {\n firstProxy = proxy;\n }\n }\n }\n // If no hosted proxy found, still need to return a proxy.\n // This case always happens in toolbox dataZoom, where axes are all hosted by\n // other dataZooms.\n return firstProxy;\n };\n DataZoomModel.prototype.getRangePropMode = function () {\n return this._rangePropMode.slice();\n };\n DataZoomModel.prototype.getOrient = function () {\n if (process.env.NODE_ENV !== 'production') {\n // Should not be called before initialized.\n assert(this._orient);\n }\n return this._orient;\n };\n DataZoomModel.type = 'dataZoom';\n DataZoomModel.dependencies = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'series', 'toolbox'];\n DataZoomModel.defaultOption = {\n // zlevel: 0,\n z: 4,\n filterMode: 'filter',\n start: 0,\n end: 100\n };\n return DataZoomModel;\n}(ComponentModel);\n/**\n * Retrieve those raw params from option, which will be cached separately,\n * because they will be overwritten by normalized/calculated values in the main\n * process.\n */\nfunction retrieveRawOption(option) {\n var ret = {};\n each(['start', 'end', 'startValue', 'endValue', 'throttle'], function (name) {\n option.hasOwnProperty(name) && (ret[name] = option[name]);\n });\n return ret;\n}\nexport default DataZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nvar SelectDataZoomModel = /** @class */function (_super) {\n __extends(SelectDataZoomModel, _super);\n function SelectDataZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SelectDataZoomModel.type;\n return _this;\n }\n SelectDataZoomModel.type = 'dataZoom.select';\n return SelectDataZoomModel;\n}(DataZoomModel);\nexport default SelectDataZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nvar DataZoomView = /** @class */function (_super) {\n __extends(DataZoomView, _super);\n function DataZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = DataZoomView.type;\n return _this;\n }\n DataZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) {\n this.dataZoomModel = dataZoomModel;\n this.ecModel = ecModel;\n this.api = api;\n };\n DataZoomView.type = 'dataZoom';\n return DataZoomView;\n}(ComponentView);\nexport default DataZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomView from './DataZoomView.js';\nvar SelectDataZoomView = /** @class */function (_super) {\n __extends(SelectDataZoomView, _super);\n function SelectDataZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SelectDataZoomView.type;\n return _this;\n }\n SelectDataZoomView.type = 'dataZoom.select';\n return SelectDataZoomView;\n}(DataZoomView);\nexport default SelectDataZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport { unionAxisExtentFromData } from '../../coord/axisHelper.js';\nimport { ensureScaleRawExtentInfo } from '../../coord/scaleRawExtentInfo.js';\nimport { getAxisMainType, isCoordSupported } from './helper.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\n/**\n * Operate single axis.\n * One axis can only operated by one axis operator.\n * Different dataZoomModels may be defined to operate the same axis.\n * (i.e. 'inside' data zoom and 'slider' data zoom components)\n * So dataZoomModels share one axisProxy in that case.\n */\nvar AxisProxy = /** @class */function () {\n function AxisProxy(dimName, axisIndex, dataZoomModel, ecModel) {\n this._dimName = dimName;\n this._axisIndex = axisIndex;\n this.ecModel = ecModel;\n this._dataZoomModel = dataZoomModel;\n // /**\n // * @readOnly\n // * @private\n // */\n // this.hasSeriesStacked;\n }\n /**\n * Whether the axisProxy is hosted by dataZoomModel.\n */\n AxisProxy.prototype.hostedBy = function (dataZoomModel) {\n return this._dataZoomModel === dataZoomModel;\n };\n /**\n * @return Value can only be NaN or finite value.\n */\n AxisProxy.prototype.getDataValueWindow = function () {\n return this._valueWindow.slice();\n };\n /**\n * @return {Array.}\n */\n AxisProxy.prototype.getDataPercentWindow = function () {\n return this._percentWindow.slice();\n };\n AxisProxy.prototype.getTargetSeriesModels = function () {\n var seriesModels = [];\n this.ecModel.eachSeries(function (seriesModel) {\n if (isCoordSupported(seriesModel)) {\n var axisMainType = getAxisMainType(this._dimName);\n var axisModel = seriesModel.getReferringComponents(axisMainType, SINGLE_REFERRING).models[0];\n if (axisModel && this._axisIndex === axisModel.componentIndex) {\n seriesModels.push(seriesModel);\n }\n }\n }, this);\n return seriesModels;\n };\n AxisProxy.prototype.getAxisModel = function () {\n return this.ecModel.getComponent(this._dimName + 'Axis', this._axisIndex);\n };\n AxisProxy.prototype.getMinMaxSpan = function () {\n return zrUtil.clone(this._minMaxSpan);\n };\n /**\n * Only calculate by given range and this._dataExtent, do not change anything.\n */\n AxisProxy.prototype.calculateDataWindow = function (opt) {\n var dataExtent = this._dataExtent;\n var axisModel = this.getAxisModel();\n var scale = axisModel.axis.scale;\n var rangePropMode = this._dataZoomModel.getRangePropMode();\n var percentExtent = [0, 100];\n var percentWindow = [];\n var valueWindow = [];\n var hasPropModeValue;\n each(['start', 'end'], function (prop, idx) {\n var boundPercent = opt[prop];\n var boundValue = opt[prop + 'Value'];\n // Notice: dataZoom is based either on `percentProp` ('start', 'end') or\n // on `valueProp` ('startValue', 'endValue'). (They are based on the data extent\n // but not min/max of axis, which will be calculated by data window then).\n // The former one is suitable for cases that a dataZoom component controls multiple\n // axes with different unit or extent, and the latter one is suitable for accurate\n // zoom by pixel (e.g., in dataZoomSelect).\n // we use `getRangePropMode()` to mark which prop is used. `rangePropMode` is updated\n // only when setOption or dispatchAction, otherwise it remains its original value.\n // (Why not only record `percentProp` and always map to `valueProp`? Because\n // the map `valueProp` -> `percentProp` -> `valueProp` probably not the original\n // `valueProp`. consider two axes constrolled by one dataZoom. They have different\n // data extent. All of values that are overflow the `dataExtent` will be calculated\n // to percent '100%').\n if (rangePropMode[idx] === 'percent') {\n boundPercent == null && (boundPercent = percentExtent[idx]);\n // Use scale.parse to math round for category or time axis.\n boundValue = scale.parse(numberUtil.linearMap(boundPercent, percentExtent, dataExtent));\n } else {\n hasPropModeValue = true;\n boundValue = boundValue == null ? dataExtent[idx] : scale.parse(boundValue);\n // Calculating `percent` from `value` may be not accurate, because\n // This calculation can not be inversed, because all of values that\n // are overflow the `dataExtent` will be calculated to percent '100%'\n boundPercent = numberUtil.linearMap(boundValue, dataExtent, percentExtent);\n }\n // valueWindow[idx] = round(boundValue);\n // percentWindow[idx] = round(boundPercent);\n // fallback to extent start/end when parsed value or percent is invalid\n valueWindow[idx] = boundValue == null || isNaN(boundValue) ? dataExtent[idx] : boundValue;\n percentWindow[idx] = boundPercent == null || isNaN(boundPercent) ? percentExtent[idx] : boundPercent;\n });\n asc(valueWindow);\n asc(percentWindow);\n // The windows from user calling of `dispatchAction` might be out of the extent,\n // or do not obey the `min/maxSpan`, `min/maxValueSpan`. But we don't restrict window\n // by `zoomLock` here, because we see `zoomLock` just as a interaction constraint,\n // where API is able to initialize/modify the window size even though `zoomLock`\n // specified.\n var spans = this._minMaxSpan;\n hasPropModeValue ? restrictSet(valueWindow, percentWindow, dataExtent, percentExtent, false) : restrictSet(percentWindow, valueWindow, percentExtent, dataExtent, true);\n function restrictSet(fromWindow, toWindow, fromExtent, toExtent, toValue) {\n var suffix = toValue ? 'Span' : 'ValueSpan';\n sliderMove(0, fromWindow, fromExtent, 'all', spans['min' + suffix], spans['max' + suffix]);\n for (var i = 0; i < 2; i++) {\n toWindow[i] = numberUtil.linearMap(fromWindow[i], fromExtent, toExtent, true);\n toValue && (toWindow[i] = scale.parse(toWindow[i]));\n }\n }\n return {\n valueWindow: valueWindow,\n percentWindow: percentWindow\n };\n };\n /**\n * Notice: reset should not be called before series.restoreData() is called,\n * so it is recommended to be called in \"process stage\" but not \"model init\n * stage\".\n */\n AxisProxy.prototype.reset = function (dataZoomModel) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n var targetSeries = this.getTargetSeriesModels();\n // Culculate data window and data extent, and record them.\n this._dataExtent = calculateDataExtent(this, this._dimName, targetSeries);\n // `calculateDataWindow` uses min/maxSpan.\n this._updateMinMaxSpan();\n var dataWindow = this.calculateDataWindow(dataZoomModel.settledOption);\n this._valueWindow = dataWindow.valueWindow;\n this._percentWindow = dataWindow.percentWindow;\n // Update axis setting then.\n this._setAxisModel();\n };\n AxisProxy.prototype.filterData = function (dataZoomModel, api) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n var axisDim = this._dimName;\n var seriesModels = this.getTargetSeriesModels();\n var filterMode = dataZoomModel.get('filterMode');\n var valueWindow = this._valueWindow;\n if (filterMode === 'none') {\n return;\n }\n // FIXME\n // Toolbox may has dataZoom injected. And if there are stacked bar chart\n // with NaN data, NaN will be filtered and stack will be wrong.\n // So we need to force the mode to be set empty.\n // In fect, it is not a big deal that do not support filterMode-'filter'\n // when using toolbox#dataZoom, utill tooltip#dataZoom support \"single axis\n // selection\" some day, which might need \"adapt to data extent on the\n // otherAxis\", which is disabled by filterMode-'empty'.\n // But currently, stack has been fixed to based on value but not index,\n // so this is not an issue any more.\n // let otherAxisModel = this.getOtherAxisModel();\n // if (dataZoomModel.get('$fromToolbox')\n // && otherAxisModel\n // && otherAxisModel.hasSeriesStacked\n // ) {\n // filterMode = 'empty';\n // }\n // TODO\n // filterMode 'weakFilter' and 'empty' is not optimized for huge data yet.\n each(seriesModels, function (seriesModel) {\n var seriesData = seriesModel.getData();\n var dataDims = seriesData.mapDimensionsAll(axisDim);\n if (!dataDims.length) {\n return;\n }\n if (filterMode === 'weakFilter') {\n var store_1 = seriesData.getStore();\n var dataDimIndices_1 = zrUtil.map(dataDims, function (dim) {\n return seriesData.getDimensionIndex(dim);\n }, seriesData);\n seriesData.filterSelf(function (dataIndex) {\n var leftOut;\n var rightOut;\n var hasValue;\n for (var i = 0; i < dataDims.length; i++) {\n var value = store_1.get(dataDimIndices_1[i], dataIndex);\n var thisHasValue = !isNaN(value);\n var thisLeftOut = value < valueWindow[0];\n var thisRightOut = value > valueWindow[1];\n if (thisHasValue && !thisLeftOut && !thisRightOut) {\n return true;\n }\n thisHasValue && (hasValue = true);\n thisLeftOut && (leftOut = true);\n thisRightOut && (rightOut = true);\n }\n // If both left out and right out, do not filter.\n return hasValue && leftOut && rightOut;\n });\n } else {\n each(dataDims, function (dim) {\n if (filterMode === 'empty') {\n seriesModel.setData(seriesData = seriesData.map(dim, function (value) {\n return !isInWindow(value) ? NaN : value;\n }));\n } else {\n var range = {};\n range[dim] = valueWindow;\n // console.time('select');\n seriesData.selectRange(range);\n // console.timeEnd('select');\n }\n });\n }\n\n each(dataDims, function (dim) {\n seriesData.setApproximateExtent(valueWindow, dim);\n });\n });\n function isInWindow(value) {\n return value >= valueWindow[0] && value <= valueWindow[1];\n }\n };\n AxisProxy.prototype._updateMinMaxSpan = function () {\n var minMaxSpan = this._minMaxSpan = {};\n var dataZoomModel = this._dataZoomModel;\n var dataExtent = this._dataExtent;\n each(['min', 'max'], function (minMax) {\n var percentSpan = dataZoomModel.get(minMax + 'Span');\n var valueSpan = dataZoomModel.get(minMax + 'ValueSpan');\n valueSpan != null && (valueSpan = this.getAxisModel().axis.scale.parse(valueSpan));\n // minValueSpan and maxValueSpan has higher priority than minSpan and maxSpan\n if (valueSpan != null) {\n percentSpan = numberUtil.linearMap(dataExtent[0] + valueSpan, dataExtent, [0, 100], true);\n } else if (percentSpan != null) {\n valueSpan = numberUtil.linearMap(percentSpan, [0, 100], dataExtent, true) - dataExtent[0];\n }\n minMaxSpan[minMax + 'Span'] = percentSpan;\n minMaxSpan[minMax + 'ValueSpan'] = valueSpan;\n }, this);\n };\n AxisProxy.prototype._setAxisModel = function () {\n var axisModel = this.getAxisModel();\n var percentWindow = this._percentWindow;\n var valueWindow = this._valueWindow;\n if (!percentWindow) {\n return;\n }\n // [0, 500]: arbitrary value, guess axis extent.\n var precision = numberUtil.getPixelPrecision(valueWindow, [0, 500]);\n precision = Math.min(precision, 20);\n // For value axis, if min/max/scale are not set, we just use the extent obtained\n // by series data, which may be a little different from the extent calculated by\n // `axisHelper.getScaleExtent`. But the different just affects the experience a\n // little when zooming. So it will not be fixed until some users require it strongly.\n var rawExtentInfo = axisModel.axis.scale.rawExtentInfo;\n if (percentWindow[0] !== 0) {\n rawExtentInfo.setDeterminedMinMax('min', +valueWindow[0].toFixed(precision));\n }\n if (percentWindow[1] !== 100) {\n rawExtentInfo.setDeterminedMinMax('max', +valueWindow[1].toFixed(precision));\n }\n rawExtentInfo.freeze();\n };\n return AxisProxy;\n}();\nfunction calculateDataExtent(axisProxy, axisDim, seriesModels) {\n var dataExtent = [Infinity, -Infinity];\n each(seriesModels, function (seriesModel) {\n unionAxisExtentFromData(dataExtent, seriesModel.getData(), axisDim);\n });\n // It is important to get \"consistent\" extent when more then one axes is\n // controlled by a `dataZoom`, otherwise those axes will not be synchronized\n // when zooming. But it is difficult to know what is \"consistent\", considering\n // axes have different type or even different meanings (For example, two\n // time axes are used to compare data of the same date in different years).\n // So basically dataZoom just obtains extent by series.data (in category axis\n // extent can be obtained from axis.data).\n // Nevertheless, user can set min/max/scale on axes to make extent of axes\n // consistent.\n var axisModel = axisProxy.getAxisModel();\n var rawExtentResult = ensureScaleRawExtentInfo(axisModel.axis.scale, axisModel, dataExtent).calculate();\n return [rawExtentResult.min, rawExtentResult.max];\n}\nexport default AxisProxy;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap, each } from 'zrender/lib/core/util.js';\nimport { getAxisMainType } from './helper.js';\nimport AxisProxy from './AxisProxy.js';\nvar dataZoomProcessor = {\n // `dataZoomProcessor` will only be performed in needed series. Consider if\n // there is a line series and a pie series, it is better not to update the\n // line series if only pie series is needed to be updated.\n getTargetSeries: function (ecModel) {\n function eachAxisModel(cb) {\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n cb(axisDim, axisIndex, axisModel, dataZoomModel);\n });\n });\n }\n // FIXME: it brings side-effect to `getTargetSeries`.\n // Prepare axis proxies.\n eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) {\n // dispose all last axis proxy, in case that some axis are deleted.\n axisModel.__dzAxisProxy = null;\n });\n var proxyList = [];\n eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) {\n // Different dataZooms may constrol the same axis. In that case,\n // an axisProxy serves both of them.\n if (!axisModel.__dzAxisProxy) {\n // Use the first dataZoomModel as the main model of axisProxy.\n axisModel.__dzAxisProxy = new AxisProxy(axisDim, axisIndex, dataZoomModel, ecModel);\n proxyList.push(axisModel.__dzAxisProxy);\n }\n });\n var seriesModelMap = createHashMap();\n each(proxyList, function (axisProxy) {\n each(axisProxy.getTargetSeriesModels(), function (seriesModel) {\n seriesModelMap.set(seriesModel.uid, seriesModel);\n });\n });\n return seriesModelMap;\n },\n // Consider appendData, where filter should be performed. Because data process is\n // in block mode currently, it is not need to worry about that the overallProgress\n // execute every frame.\n overallReset: function (ecModel, api) {\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // We calculate window and reset axis here but not in model\n // init stage and not after action dispatch handler, because\n // reset should be called after seriesData.restoreData.\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n dataZoomModel.getAxisProxy(axisDim, axisIndex).reset(dataZoomModel);\n });\n // Caution: data zoom filtering is order sensitive when using\n // percent range and no min/max/scale set on axis.\n // For example, we have dataZoom definition:\n // [\n // {xAxisIndex: 0, start: 30, end: 70},\n // {yAxisIndex: 0, start: 20, end: 80}\n // ]\n // In this case, [20, 80] of y-dataZoom should be based on data\n // that have filtered by x-dataZoom using range of [30, 70],\n // but should not be based on full raw data. Thus sliding\n // x-dataZoom will change both ranges of xAxis and yAxis,\n // while sliding y-dataZoom will only change the range of yAxis.\n // So we should filter x-axis after reset x-axis immediately,\n // and then reset y-axis and filter y-axis.\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n dataZoomModel.getAxisProxy(axisDim, axisIndex).filterData(dataZoomModel, api);\n });\n });\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // Fullfill all of the range props so that user\n // is able to get them from chart.getOption().\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n if (axisProxy) {\n var percentRange = axisProxy.getDataPercentWindow();\n var valueRange = axisProxy.getDataValueWindow();\n dataZoomModel.setCalculatedRange({\n start: percentRange[0],\n end: percentRange[1],\n startValue: valueRange[0],\n endValue: valueRange[1]\n });\n }\n });\n }\n};\nexport default dataZoomProcessor;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { findEffectedDataZooms } from './helper.js';\nimport { each } from 'zrender/lib/core/util.js';\nexport default function installDataZoomAction(registers) {\n registers.registerAction('dataZoom', function (payload, ecModel) {\n var effectedModels = findEffectedDataZooms(ecModel, payload);\n each(effectedModels, function (dataZoomModel) {\n dataZoomModel.setRawRange({\n start: payload.start,\n end: payload.end,\n startValue: payload.startValue,\n endValue: payload.endValue\n });\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport dataZoomProcessor from './dataZoomProcessor.js';\nimport installDataZoomAction from './dataZoomAction.js';\nvar installed = false;\nexport default function installCommon(registers) {\n if (installed) {\n return;\n }\n installed = true;\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, dataZoomProcessor);\n installDataZoomAction(registers);\n registers.registerSubTypeDefaulter('dataZoom', function () {\n // Default 'slider' when no type specified.\n return 'slider';\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SelectZoomModel from './SelectZoomModel.js';\nimport SelectZoomView from './SelectZoomView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(SelectZoomModel);\n registers.registerComponentView(SelectZoomView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nvar ToolboxFeature = /** @class */function () {\n function ToolboxFeature() {}\n return ToolboxFeature;\n}();\nexport { ToolboxFeature };\nvar features = {};\nexport function registerFeature(name, ctor) {\n features[name] = ctor;\n}\nexport function getFeature(name) {\n return features[name];\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as featureManager from './featureManager.js';\nimport ComponentModel from '../../model/Component.js';\nvar ToolboxModel = /** @class */function (_super) {\n __extends(ToolboxModel, _super);\n function ToolboxModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ToolboxModel.type;\n return _this;\n }\n ToolboxModel.prototype.optionUpdated = function () {\n _super.prototype.optionUpdated.apply(this, arguments);\n var ecModel = this.ecModel;\n zrUtil.each(this.option.feature, function (featureOpt, featureName) {\n var Feature = featureManager.getFeature(featureName);\n if (Feature) {\n if (Feature.getDefaultOption) {\n Feature.defaultOption = Feature.getDefaultOption(ecModel);\n }\n zrUtil.merge(featureOpt, Feature.defaultOption);\n }\n });\n };\n ToolboxModel.type = 'toolbox';\n ToolboxModel.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n ToolboxModel.defaultOption = {\n show: true,\n z: 6,\n // zlevel: 0,\n orient: 'horizontal',\n left: 'right',\n top: 'top',\n // right\n // bottom\n backgroundColor: 'transparent',\n borderColor: '#ccc',\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemSize: 15,\n itemGap: 8,\n showTitle: true,\n iconStyle: {\n borderColor: '#666',\n color: 'none'\n },\n emphasis: {\n iconStyle: {\n borderColor: '#3E98C5'\n }\n },\n // textStyle: {},\n // feature\n tooltip: {\n show: false,\n position: 'bottom'\n }\n };\n return ToolboxModel;\n}(ComponentModel);\nexport default ToolboxModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport { getLayoutRect, box as layoutBox, positionElement } from '../../util/layout.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as graphic from '../../util/graphic.js';\n/**\n * Layout list like component.\n * It will box layout each items in group of component and then position the whole group in the viewport\n * @param {module:zrender/group/Group} group\n * @param {module:echarts/model/Component} componentModel\n * @param {module:echarts/ExtensionAPI}\n */\nexport function layout(group, componentModel, api) {\n var boxLayoutParams = componentModel.getBoxLayoutParams();\n var padding = componentModel.get('padding');\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var rect = getLayoutRect(boxLayoutParams, viewportSize, padding);\n layoutBox(componentModel.get('orient'), group, componentModel.get('itemGap'), rect.width, rect.height);\n positionElement(group, boxLayoutParams, viewportSize, padding);\n}\nexport function makeBackground(rect, componentModel) {\n var padding = formatUtil.normalizeCssArray(componentModel.get('padding'));\n var style = componentModel.getItemStyle(['color', 'opacity']);\n style.fill = componentModel.get('backgroundColor');\n rect = new graphic.Rect({\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[1] + padding[3],\n height: rect.height + padding[0] + padding[2],\n r: componentModel.get('borderRadius')\n },\n style: style,\n silent: true,\n z2: -1\n });\n // FIXME\n // `subPixelOptimizeRect` may bring some gap between edge of viewpart\n // and background rect when setting like `left: 0`, `top: 0`.\n // graphic.subPixelOptimizeRect(rect);\n return rect;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enterEmphasis, leaveEmphasis } from '../../util/states.js';\nimport Model from '../../model/Model.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport * as listComponentHelper from '../helper/listComponent.js';\nimport ComponentView from '../../view/Component.js';\nimport { ToolboxFeature, getFeature } from './featureManager.js';\nimport { getUID } from '../../util/component.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport { getFont } from '../../label/labelStyle.js';\nvar ToolboxView = /** @class */function (_super) {\n __extends(ToolboxView, _super);\n function ToolboxView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n if (!toolboxModel.get('show')) {\n return;\n }\n var itemSize = +toolboxModel.get('itemSize');\n var isVertical = toolboxModel.get('orient') === 'vertical';\n var featureOpts = toolboxModel.get('feature') || {};\n var features = this._features || (this._features = {});\n var featureNames = [];\n zrUtil.each(featureOpts, function (opt, name) {\n featureNames.push(name);\n });\n new DataDiffer(this._featureNames || [], featureNames).add(processFeature).update(processFeature).remove(zrUtil.curry(processFeature, null)).execute();\n // Keep for diff.\n this._featureNames = featureNames;\n function processFeature(newIndex, oldIndex) {\n var featureName = featureNames[newIndex];\n var oldName = featureNames[oldIndex];\n var featureOpt = featureOpts[featureName];\n var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel);\n var feature;\n // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\n featureOpt.title = payload.newTitle;\n }\n if (featureName && !oldName) {\n // Create\n if (isUserFeatureName(featureName)) {\n feature = {\n onclick: featureModel.option.onclick,\n featureName: featureName\n };\n } else {\n var Feature = getFeature(featureName);\n if (!Feature) {\n return;\n }\n feature = new Feature();\n }\n features[featureName] = feature;\n } else {\n feature = features[oldName];\n // If feature does not exist.\n if (!feature) {\n return;\n }\n }\n feature.uid = getUID('toolbox-feature');\n feature.model = featureModel;\n feature.ecModel = ecModel;\n feature.api = api;\n var isToolboxFeature = feature instanceof ToolboxFeature;\n if (!featureName && oldName) {\n isToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n return;\n }\n if (!featureModel.get('show') || isToolboxFeature && feature.unusable) {\n isToolboxFeature && feature.remove && feature.remove(ecModel, api);\n return;\n }\n createIconPaths(featureModel, feature, featureName);\n featureModel.setIconStatus = function (iconName, status) {\n var option = this.option;\n var iconPaths = this.iconPaths;\n option.iconStatus = option.iconStatus || {};\n option.iconStatus[iconName] = status;\n if (iconPaths[iconName]) {\n (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]);\n }\n };\n if (feature instanceof ToolboxFeature) {\n if (feature.render) {\n feature.render(featureModel, ecModel, api, payload);\n }\n }\n }\n function createIconPaths(featureModel, feature, featureName) {\n var iconStyleModel = featureModel.getModel('iconStyle');\n var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']);\n // If one feature has multiple icons, they are organized as\n // {\n // icon: {\n // foo: '',\n // bar: ''\n // },\n // title: {\n // foo: '',\n // bar: ''\n // }\n // }\n var icons = feature instanceof ToolboxFeature && feature.getIcons ? feature.getIcons() : featureModel.get('icon');\n var titles = featureModel.get('title') || {};\n var iconsMap;\n var titlesMap;\n if (zrUtil.isString(icons)) {\n iconsMap = {};\n iconsMap[featureName] = icons;\n } else {\n iconsMap = icons;\n }\n if (zrUtil.isString(titles)) {\n titlesMap = {};\n titlesMap[featureName] = titles;\n } else {\n titlesMap = titles;\n }\n var iconPaths = featureModel.iconPaths = {};\n zrUtil.each(iconsMap, function (iconStr, iconName) {\n var path = graphic.createIcon(iconStr, {}, {\n x: -itemSize / 2,\n y: -itemSize / 2,\n width: itemSize,\n height: itemSize\n }); // TODO handling image\n path.setStyle(iconStyleModel.getItemStyle());\n var pathEmphasisState = path.ensureState('emphasis');\n pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle();\n // Text position calculation\n // TODO: extract `textStyle` from `iconStyle` and use `createTextStyle`\n var textContent = new ZRText({\n style: {\n text: titlesMap[iconName],\n align: iconStyleEmphasisModel.get('textAlign'),\n borderRadius: iconStyleEmphasisModel.get('textBorderRadius'),\n padding: iconStyleEmphasisModel.get('textPadding'),\n fill: null,\n font: getFont({\n fontStyle: iconStyleEmphasisModel.get('textFontStyle'),\n fontFamily: iconStyleEmphasisModel.get('textFontFamily'),\n fontSize: iconStyleEmphasisModel.get('textFontSize'),\n fontWeight: iconStyleEmphasisModel.get('textFontWeight')\n }, ecModel)\n },\n ignore: true\n });\n path.setTextContent(textContent);\n graphic.setTooltipConfig({\n el: path,\n componentModel: toolboxModel,\n itemName: iconName,\n formatterParamsExtra: {\n title: titlesMap[iconName]\n }\n });\n path.__title = titlesMap[iconName];\n path.on('mouseover', function () {\n // Should not reuse above hoverStyle, which might be modified.\n var hoverStyle = iconStyleEmphasisModel.getItemStyle();\n var defaultTextPosition = isVertical ? toolboxModel.get('right') == null && toolboxModel.get('left') !== 'right' ? 'right' : 'left' : toolboxModel.get('bottom') == null && toolboxModel.get('top') !== 'bottom' ? 'bottom' : 'top';\n textContent.setStyle({\n fill: iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || '#000',\n backgroundColor: iconStyleEmphasisModel.get('textBackgroundColor')\n });\n path.setTextConfig({\n position: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition\n });\n textContent.ignore = !toolboxModel.get('showTitle');\n // Use enterEmphasis and leaveEmphasis provide by ec.\n // There are flags managed by the echarts.\n api.enterEmphasis(this);\n }).on('mouseout', function () {\n if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') {\n api.leaveEmphasis(this);\n }\n textContent.hide();\n });\n (featureModel.get(['iconStatus', iconName]) === 'emphasis' ? enterEmphasis : leaveEmphasis)(path);\n group.add(path);\n path.on('click', zrUtil.bind(feature.onclick, feature, ecModel, api, iconName));\n iconPaths[iconName] = path;\n });\n }\n listComponentHelper.layout(group, toolboxModel, api);\n // Render background after group is layout\n // FIXME\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel));\n // Adjust icon title positions to avoid them out of screen\n isVertical || group.eachChild(function (icon) {\n var titleText = icon.__title;\n // const hoverStyle = icon.hoverStyle;\n // TODO simplify code?\n var emphasisState = icon.ensureState('emphasis');\n var emphasisTextConfig = emphasisState.textConfig || (emphasisState.textConfig = {});\n var textContent = icon.getTextContent();\n var emphasisTextState = textContent && textContent.ensureState('emphasis');\n // May be background element\n if (emphasisTextState && !zrUtil.isFunction(emphasisTextState) && titleText) {\n var emphasisTextStyle = emphasisTextState.style || (emphasisTextState.style = {});\n var rect = textContain.getBoundingRect(titleText, ZRText.makeFont(emphasisTextStyle));\n var offsetX = icon.x + group.x;\n var offsetY = icon.y + group.y + itemSize;\n var needPutOnTop = false;\n if (offsetY + rect.height > api.getHeight()) {\n emphasisTextConfig.position = 'top';\n needPutOnTop = true;\n }\n var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 10;\n if (offsetX + rect.width / 2 > api.getWidth()) {\n emphasisTextConfig.position = ['100%', topOffset];\n emphasisTextStyle.align = 'right';\n } else if (offsetX - rect.width / 2 < 0) {\n emphasisTextConfig.position = [0, topOffset];\n emphasisTextStyle.align = 'left';\n }\n }\n });\n };\n ToolboxView.prototype.updateView = function (toolboxModel, ecModel, api, payload) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.updateView && feature.updateView(feature.model, ecModel, api, payload);\n });\n };\n // updateLayout(toolboxModel, ecModel, api, payload) {\n // zrUtil.each(this._features, function (feature) {\n // feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload);\n // });\n // },\n ToolboxView.prototype.remove = function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.remove && feature.remove(ecModel, api);\n });\n this.group.removeAll();\n };\n ToolboxView.prototype.dispose = function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n });\n };\n ToolboxView.type = 'toolbox';\n return ToolboxView;\n}(ComponentView);\nfunction isUserFeatureName(featureName) {\n return featureName.indexOf('my') === 0;\n}\nexport default ToolboxView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global window, Uint8Array, document */\nimport env from 'zrender/lib/core/env.js';\nimport { ToolboxFeature } from '../featureManager.js';\nvar SaveAsImage = /** @class */function (_super) {\n __extends(SaveAsImage, _super);\n function SaveAsImage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SaveAsImage.prototype.onclick = function (ecModel, api) {\n var model = this.model;\n var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';\n var isSvg = api.getZr().painter.getType() === 'svg';\n var type = isSvg ? 'svg' : model.get('type', true) || 'png';\n var url = api.getConnectedDataURL({\n type: type,\n backgroundColor: model.get('backgroundColor', true) || ecModel.get('backgroundColor') || '#fff',\n connectedBackgroundColor: model.get('connectedBackgroundColor'),\n excludeComponents: model.get('excludeComponents'),\n pixelRatio: model.get('pixelRatio')\n });\n var browser = env.browser;\n // Chrome, Firefox, New Edge\n if (typeof MouseEvent === 'function' && (browser.newEdge || !browser.ie && !browser.edge)) {\n var $a = document.createElement('a');\n $a.download = title + '.' + type;\n $a.target = '_blank';\n $a.href = url;\n var evt = new MouseEvent('click', {\n // some micro front-end framework, window maybe is a Proxy\n view: document.defaultView,\n bubbles: true,\n cancelable: false\n });\n $a.dispatchEvent(evt);\n }\n // IE or old Edge\n else {\n // @ts-ignore\n if (window.navigator.msSaveOrOpenBlob || isSvg) {\n var parts = url.split(',');\n // data:[][;charset=][;base64],\n var base64Encoded = parts[0].indexOf('base64') > -1;\n var bstr = isSvg\n // should decode the svg data uri first\n ? decodeURIComponent(parts[1]) : parts[1];\n // only `atob` when the data uri is encoded with base64\n // otherwise, like `svg` data uri exported by zrender,\n // there will be an error, for it's not encoded with base64.\n // (just a url-encoded string through `encodeURIComponent`)\n base64Encoded && (bstr = window.atob(bstr));\n var filename = title + '.' + type;\n // @ts-ignore\n if (window.navigator.msSaveOrOpenBlob) {\n var n = bstr.length;\n var u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n var blob = new Blob([u8arr]); // @ts-ignore\n window.navigator.msSaveOrOpenBlob(blob, filename);\n } else {\n var frame = document.createElement('iframe');\n document.body.appendChild(frame);\n var cw = frame.contentWindow;\n var doc = cw.document;\n doc.open('image/svg+xml', 'replace');\n doc.write(bstr);\n doc.close();\n cw.focus();\n doc.execCommand('SaveAs', true, filename);\n document.body.removeChild(frame);\n }\n } else {\n var lang = model.get('lang');\n var html = '' + '' + '' + '';\n var tab = window.open();\n tab.document.write(html);\n tab.document.title = title;\n }\n }\n };\n SaveAsImage.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n icon: 'M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0',\n title: ecModel.getLocaleModel().get(['toolbox', 'saveAsImage', 'title']),\n type: 'png',\n // Default use option.backgroundColor\n // backgroundColor: '#fff',\n connectedBackgroundColor: '#fff',\n name: '',\n excludeComponents: ['toolbox'],\n // use current pixel ratio of device by default\n // pixelRatio: 1,\n lang: ecModel.getLocaleModel().get(['toolbox', 'saveAsImage', 'lang'])\n };\n return defaultOption;\n };\n return SaveAsImage;\n}(ToolboxFeature);\nexport default SaveAsImage;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as echarts from '../../../core/echarts.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { SINGLE_REFERRING } from '../../../util/model.js';\nvar INNER_STACK_KEYWORD = '__ec_magicType_stack__';\nvar ICON_TYPES = ['line', 'bar', 'stack'];\n// stack and tiled appears in pair for the title\nvar TITLE_TYPES = ['line', 'bar', 'stack', 'tiled'];\nvar radioTypes = [['line', 'bar'], ['stack']];\nvar MagicType = /** @class */function (_super) {\n __extends(MagicType, _super);\n function MagicType() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MagicType.prototype.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon');\n var icons = {};\n zrUtil.each(model.get('type'), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n };\n MagicType.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n type: [],\n // Icon group\n icon: {\n line: 'M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4',\n bar: 'M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7',\n // eslint-disable-next-line\n stack: 'M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z' // jshint ignore:line\n },\n\n // `line`, `bar`, `stack`, `tiled`\n title: ecModel.getLocaleModel().get(['toolbox', 'magicType', 'title']),\n option: {},\n seriesIndex: {}\n };\n return defaultOption;\n };\n MagicType.prototype.onclick = function (ecModel, api, type) {\n var model = this.model;\n var seriesIndex = model.get(['seriesIndex', type]);\n // Not supported magicType\n if (!seriesOptGenreator[type]) {\n return;\n }\n var newOption = {\n series: []\n };\n var generateNewSeriesTypes = function (seriesModel) {\n var seriesType = seriesModel.subType;\n var seriesId = seriesModel.id;\n var newSeriesOpt = seriesOptGenreator[type](seriesType, seriesId, seriesModel, model);\n if (newSeriesOpt) {\n // PENDING If merge original option?\n zrUtil.defaults(newSeriesOpt, seriesModel.option);\n newOption.series.push(newSeriesOpt);\n }\n // Modify boundaryGap\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type === 'cartesian2d' && (type === 'line' || type === 'bar')) {\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n if (categoryAxis) {\n var axisDim = categoryAxis.dim;\n var axisType = axisDim + 'Axis';\n var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0];\n var axisIndex = axisModel.componentIndex;\n newOption[axisType] = newOption[axisType] || [];\n for (var i = 0; i <= axisIndex; i++) {\n newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {};\n }\n newOption[axisType][axisIndex].boundaryGap = type === 'bar';\n }\n }\n };\n zrUtil.each(radioTypes, function (radio) {\n if (zrUtil.indexOf(radio, type) >= 0) {\n zrUtil.each(radio, function (item) {\n model.setIconStatus(item, 'normal');\n });\n }\n });\n model.setIconStatus(type, 'emphasis');\n ecModel.eachComponent({\n mainType: 'series',\n query: seriesIndex == null ? null : {\n seriesIndex: seriesIndex\n }\n }, generateNewSeriesTypes);\n var newTitle;\n var currentType = type;\n // Change title of stack\n if (type === 'stack') {\n // use titles in model instead of ecModel\n // as stack and tiled appears in pair, just flip them\n // no need of checking stack state\n newTitle = zrUtil.merge({\n stack: model.option.title.tiled,\n tiled: model.option.title.stack\n }, model.option.title);\n if (model.get(['iconStatus', type]) !== 'emphasis') {\n currentType = 'tiled';\n }\n }\n api.dispatchAction({\n type: 'changeMagicType',\n currentType: currentType,\n newOption: newOption,\n newTitle: newTitle,\n featureName: 'magicType'\n });\n };\n return MagicType;\n}(ToolboxFeature);\nvar seriesOptGenreator = {\n 'line': function (seriesType, seriesId, seriesModel, model) {\n if (seriesType === 'bar') {\n return zrUtil.merge({\n id: seriesId,\n type: 'line',\n // Preserve data related option\n data: seriesModel.get('data'),\n stack: seriesModel.get('stack'),\n markPoint: seriesModel.get('markPoint'),\n markLine: seriesModel.get('markLine')\n }, model.get(['option', 'line']) || {}, true);\n }\n },\n 'bar': function (seriesType, seriesId, seriesModel, model) {\n if (seriesType === 'line') {\n return zrUtil.merge({\n id: seriesId,\n type: 'bar',\n // Preserve data related option\n data: seriesModel.get('data'),\n stack: seriesModel.get('stack'),\n markPoint: seriesModel.get('markPoint'),\n markLine: seriesModel.get('markLine')\n }, model.get(['option', 'bar']) || {}, true);\n }\n },\n 'stack': function (seriesType, seriesId, seriesModel, model) {\n var isStack = seriesModel.get('stack') === INNER_STACK_KEYWORD;\n if (seriesType === 'line' || seriesType === 'bar') {\n model.setIconStatus('stack', isStack ? 'normal' : 'emphasis');\n return zrUtil.merge({\n id: seriesId,\n stack: isStack ? '' : INNER_STACK_KEYWORD\n }, model.get(['option', 'stack']) || {}, true);\n }\n }\n};\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'changeMagicType',\n event: 'magicTypeChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n ecModel.mergeOption(payload.newOption);\n});\nexport default MagicType;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global document */\nimport * as echarts from '../../../core/echarts.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { addEventListener } from 'zrender/lib/core/event.js';\nimport { warn } from '../../../util/log.js';\n/* global document */\nvar BLOCK_SPLITER = new Array(60).join('-');\nvar ITEM_SPLITER = '\\t';\n/**\n * Group series into two types\n * 1. on category axis, like line, bar\n * 2. others, like scatter, pie\n */\nfunction groupSeries(ecModel) {\n var seriesGroupByCategoryAxis = {};\n var otherSeries = [];\n var meta = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) {\n // TODO: TYPE Consider polar? Include polar may increase unecessary bundle size.\n var baseAxis = coordSys.getBaseAxis();\n if (baseAxis.type === 'category') {\n var key = baseAxis.dim + '_' + baseAxis.index;\n if (!seriesGroupByCategoryAxis[key]) {\n seriesGroupByCategoryAxis[key] = {\n categoryAxis: baseAxis,\n valueAxis: coordSys.getOtherAxis(baseAxis),\n series: []\n };\n meta.push({\n axisDim: baseAxis.dim,\n axisIndex: baseAxis.index\n });\n }\n seriesGroupByCategoryAxis[key].series.push(seriesModel);\n } else {\n otherSeries.push(seriesModel);\n }\n } else {\n otherSeries.push(seriesModel);\n }\n });\n return {\n seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,\n other: otherSeries,\n meta: meta\n };\n}\n/**\n * Assemble content of series on cateogory axis\n * @inner\n */\nfunction assembleSeriesWithCategoryAxis(groups) {\n var tables = [];\n zrUtil.each(groups, function (group, key) {\n var categoryAxis = group.categoryAxis;\n var valueAxis = group.valueAxis;\n var valueAxisDim = valueAxis.dim;\n var headers = [' '].concat(zrUtil.map(group.series, function (series) {\n return series.name;\n }));\n // @ts-ignore TODO Polar\n var columns = [categoryAxis.model.getCategories()];\n zrUtil.each(group.series, function (series) {\n var rawData = series.getRawData();\n columns.push(series.getRawData().mapArray(rawData.mapDimension(valueAxisDim), function (val) {\n return val;\n }));\n });\n // Assemble table content\n var lines = [headers.join(ITEM_SPLITER)];\n for (var i = 0; i < columns[0].length; i++) {\n var items = [];\n for (var j = 0; j < columns.length; j++) {\n items.push(columns[j][i]);\n }\n lines.push(items.join(ITEM_SPLITER));\n }\n tables.push(lines.join('\\n'));\n });\n return tables.join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\n/**\n * Assemble content of other series\n */\nfunction assembleOtherSeries(series) {\n return zrUtil.map(series, function (series) {\n var data = series.getRawData();\n var lines = [series.name];\n var vals = [];\n data.each(data.dimensions, function () {\n var argLen = arguments.length;\n var dataIndex = arguments[argLen - 1];\n var name = data.getName(dataIndex);\n for (var i = 0; i < argLen - 1; i++) {\n vals[i] = arguments[i];\n }\n lines.push((name ? name + ITEM_SPLITER : '') + vals.join(ITEM_SPLITER));\n });\n return lines.join('\\n');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\nfunction getContentFromModel(ecModel) {\n var result = groupSeries(ecModel);\n return {\n value: zrUtil.filter([assembleSeriesWithCategoryAxis(result.seriesGroupByCategoryAxis), assembleOtherSeries(result.other)], function (str) {\n return !!str.replace(/[\\n\\t\\s]/g, '');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n'),\n meta: result.meta\n };\n}\nfunction trim(str) {\n return str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n}\n/**\n * If a block is tsv format\n */\nfunction isTSVFormat(block) {\n // Simple method to find out if a block is tsv format\n var firstLine = block.slice(0, block.indexOf('\\n'));\n if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n return true;\n }\n}\nvar itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');\n/**\n * @param {string} tsv\n * @return {Object}\n */\nfunction parseTSVContents(tsv) {\n var tsvLines = tsv.split(/\\n+/g);\n var headers = trim(tsvLines.shift()).split(itemSplitRegex);\n var categories = [];\n var series = zrUtil.map(headers, function (header) {\n return {\n name: header,\n data: []\n };\n });\n for (var i = 0; i < tsvLines.length; i++) {\n var items = trim(tsvLines[i]).split(itemSplitRegex);\n categories.push(items.shift());\n for (var j = 0; j < items.length; j++) {\n series[j] && (series[j].data[i] = items[j]);\n }\n }\n return {\n series: series,\n categories: categories\n };\n}\nfunction parseListContents(str) {\n var lines = str.split(/\\n+/g);\n var seriesName = trim(lines.shift());\n var data = [];\n for (var i = 0; i < lines.length; i++) {\n // if line is empty, ignore it.\n // there is a case that a user forgot to delete `\\n`.\n var line = trim(lines[i]);\n if (!line) {\n continue;\n }\n var items = line.split(itemSplitRegex);\n var name_1 = '';\n var value = void 0;\n var hasName = false;\n if (isNaN(items[0])) {\n // First item is name\n hasName = true;\n name_1 = items[0];\n items = items.slice(1);\n data[i] = {\n name: name_1,\n value: []\n };\n value = data[i].value;\n } else {\n value = data[i] = [];\n }\n for (var j = 0; j < items.length; j++) {\n value.push(+items[j]);\n }\n if (value.length === 1) {\n hasName ? data[i].value = value[0] : data[i] = value[0];\n }\n }\n return {\n name: seriesName,\n data: data\n };\n}\nfunction parseContents(str, blockMetaList) {\n var blocks = str.split(new RegExp('\\n*' + BLOCK_SPLITER + '\\n*', 'g'));\n var newOption = {\n series: []\n };\n zrUtil.each(blocks, function (block, idx) {\n if (isTSVFormat(block)) {\n var result = parseTSVContents(block);\n var blockMeta = blockMetaList[idx];\n var axisKey = blockMeta.axisDim + 'Axis';\n if (blockMeta) {\n newOption[axisKey] = newOption[axisKey] || [];\n newOption[axisKey][blockMeta.axisIndex] = {\n data: result.categories\n };\n newOption.series = newOption.series.concat(result.series);\n }\n } else {\n var result = parseListContents(block);\n newOption.series.push(result);\n }\n });\n return newOption;\n}\nvar DataView = /** @class */function (_super) {\n __extends(DataView, _super);\n function DataView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DataView.prototype.onclick = function (ecModel, api) {\n // FIXME: better way?\n setTimeout(function () {\n api.dispatchAction({\n type: 'hideTip'\n });\n });\n var container = api.getDom();\n var model = this.model;\n if (this._dom) {\n container.removeChild(this._dom);\n }\n var root = document.createElement('div');\n // use padding to avoid 5px whitespace\n root.style.cssText = 'position:absolute;top:0;bottom:0;left:0;right:0;padding:5px';\n root.style.backgroundColor = model.get('backgroundColor') || '#fff';\n // Create elements\n var header = document.createElement('h4');\n var lang = model.get('lang') || [];\n header.innerHTML = lang[0] || model.get('title');\n header.style.cssText = 'margin:10px 20px';\n header.style.color = model.get('textColor');\n var viewMain = document.createElement('div');\n var textarea = document.createElement('textarea');\n viewMain.style.cssText = 'overflow:auto';\n var optionToContent = model.get('optionToContent');\n var contentToOption = model.get('contentToOption');\n var result = getContentFromModel(ecModel);\n if (zrUtil.isFunction(optionToContent)) {\n var htmlOrDom = optionToContent(api.getOption());\n if (zrUtil.isString(htmlOrDom)) {\n viewMain.innerHTML = htmlOrDom;\n } else if (zrUtil.isDom(htmlOrDom)) {\n viewMain.appendChild(htmlOrDom);\n }\n } else {\n // Use default textarea\n textarea.readOnly = model.get('readOnly');\n var style = textarea.style;\n // eslint-disable-next-line max-len\n style.cssText = 'display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none';\n style.color = model.get('textColor');\n style.borderColor = model.get('textareaBorderColor');\n style.backgroundColor = model.get('textareaColor');\n textarea.value = result.value;\n viewMain.appendChild(textarea);\n }\n var blockMetaList = result.meta;\n var buttonContainer = document.createElement('div');\n buttonContainer.style.cssText = 'position:absolute;bottom:5px;left:0;right:0';\n // eslint-disable-next-line max-len\n var buttonStyle = 'float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';\n var closeButton = document.createElement('div');\n var refreshButton = document.createElement('div');\n buttonStyle += ';background-color:' + model.get('buttonColor');\n buttonStyle += ';color:' + model.get('buttonTextColor');\n var self = this;\n function close() {\n container.removeChild(root);\n self._dom = null;\n }\n addEventListener(closeButton, 'click', close);\n addEventListener(refreshButton, 'click', function () {\n if (contentToOption == null && optionToContent != null || contentToOption != null && optionToContent == null) {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.');\n }\n close();\n return;\n }\n var newOption;\n try {\n if (zrUtil.isFunction(contentToOption)) {\n newOption = contentToOption(viewMain, api.getOption());\n } else {\n newOption = parseContents(textarea.value, blockMetaList);\n }\n } catch (e) {\n close();\n throw new Error('Data view format error ' + e);\n }\n if (newOption) {\n api.dispatchAction({\n type: 'changeDataView',\n newOption: newOption\n });\n }\n close();\n });\n closeButton.innerHTML = lang[1];\n refreshButton.innerHTML = lang[2];\n refreshButton.style.cssText = closeButton.style.cssText = buttonStyle;\n !model.get('readOnly') && buttonContainer.appendChild(refreshButton);\n buttonContainer.appendChild(closeButton);\n root.appendChild(header);\n root.appendChild(viewMain);\n root.appendChild(buttonContainer);\n viewMain.style.height = container.clientHeight - 80 + 'px';\n container.appendChild(root);\n this._dom = root;\n };\n DataView.prototype.remove = function (ecModel, api) {\n this._dom && api.getDom().removeChild(this._dom);\n };\n DataView.prototype.dispose = function (ecModel, api) {\n this.remove(ecModel, api);\n };\n DataView.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n readOnly: false,\n optionToContent: null,\n contentToOption: null,\n // eslint-disable-next-line\n icon: 'M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28',\n title: ecModel.getLocaleModel().get(['toolbox', 'dataView', 'title']),\n lang: ecModel.getLocaleModel().get(['toolbox', 'dataView', 'lang']),\n backgroundColor: '#fff',\n textColor: '#000',\n textareaColor: '#fff',\n textareaBorderColor: '#333',\n buttonColor: '#c23531',\n buttonTextColor: '#fff'\n };\n return defaultOption;\n };\n return DataView;\n}(ToolboxFeature);\n/**\n * @inner\n */\nfunction tryMergeDataOption(newData, originalData) {\n return zrUtil.map(newData, function (newVal, idx) {\n var original = originalData && originalData[idx];\n if (zrUtil.isObject(original) && !zrUtil.isArray(original)) {\n var newValIsObject = zrUtil.isObject(newVal) && !zrUtil.isArray(newVal);\n if (!newValIsObject) {\n newVal = {\n value: newVal\n };\n }\n // original data has name but new data has no name\n var shouldDeleteName = original.name != null && newVal.name == null;\n // Original data has option\n newVal = zrUtil.defaults(newVal, original);\n shouldDeleteName && delete newVal.name;\n return newVal;\n } else {\n return newVal;\n }\n });\n}\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'changeDataView',\n event: 'dataViewChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n var newSeriesOptList = [];\n zrUtil.each(payload.newOption.series, function (seriesOpt) {\n var seriesModel = ecModel.getSeriesByName(seriesOpt.name)[0];\n if (!seriesModel) {\n // New created series\n // Geuss the series type\n newSeriesOptList.push(zrUtil.extend({\n // Default is scatter\n type: 'scatter'\n }, seriesOpt));\n } else {\n var originalData = seriesModel.get('data');\n newSeriesOptList.push({\n name: seriesOpt.name,\n data: tryMergeDataOption(seriesOpt.data, originalData)\n });\n }\n });\n ecModel.mergeOption(zrUtil.defaults({\n series: newSeriesOptList\n }, payload.newOption));\n});\nexport default DataView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nvar each = zrUtil.each;\nvar inner = makeInner();\n/**\n * @param ecModel\n * @param newSnapshot key is dataZoomId\n */\nexport function push(ecModel, newSnapshot) {\n var storedSnapshots = getStoreSnapshots(ecModel);\n // If previous dataZoom can not be found,\n // complete an range with current range.\n each(newSnapshot, function (batchItem, dataZoomId) {\n var i = storedSnapshots.length - 1;\n for (; i >= 0; i--) {\n var snapshot = storedSnapshots[i];\n if (snapshot[dataZoomId]) {\n break;\n }\n }\n if (i < 0) {\n // No origin range set, create one by current range.\n var dataZoomModel = ecModel.queryComponents({\n mainType: 'dataZoom',\n subType: 'select',\n id: dataZoomId\n })[0];\n if (dataZoomModel) {\n var percentRange = dataZoomModel.getPercentRange();\n storedSnapshots[0][dataZoomId] = {\n dataZoomId: dataZoomId,\n start: percentRange[0],\n end: percentRange[1]\n };\n }\n }\n });\n storedSnapshots.push(newSnapshot);\n}\nexport function pop(ecModel) {\n var storedSnapshots = getStoreSnapshots(ecModel);\n var head = storedSnapshots[storedSnapshots.length - 1];\n storedSnapshots.length > 1 && storedSnapshots.pop();\n // Find top for all dataZoom.\n var snapshot = {};\n each(head, function (batchItem, dataZoomId) {\n for (var i = storedSnapshots.length - 1; i >= 0; i--) {\n batchItem = storedSnapshots[i][dataZoomId];\n if (batchItem) {\n snapshot[dataZoomId] = batchItem;\n break;\n }\n }\n });\n return snapshot;\n}\nexport function clear(ecModel) {\n inner(ecModel).snapshots = null;\n}\nexport function count(ecModel) {\n return getStoreSnapshots(ecModel).length;\n}\n/**\n * History length of each dataZoom may be different.\n * this._history[0] is used to store origin range.\n */\nfunction getStoreSnapshots(ecModel) {\n var store = inner(ecModel);\n if (!store.snapshots) {\n store.snapshots = [{}];\n }\n return store.snapshots;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as echarts from '../../../core/echarts.js';\nimport * as history from '../../dataZoom/history.js';\nimport { ToolboxFeature } from '../featureManager.js';\nvar RestoreOption = /** @class */function (_super) {\n __extends(RestoreOption, _super);\n function RestoreOption() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n RestoreOption.prototype.onclick = function (ecModel, api) {\n history.clear(ecModel);\n api.dispatchAction({\n type: 'restore',\n from: this.uid\n });\n };\n RestoreOption.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n // eslint-disable-next-line\n icon: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5',\n title: ecModel.getLocaleModel().get(['toolbox', 'restore', 'title'])\n };\n return defaultOption;\n };\n return RestoreOption;\n}(ToolboxFeature);\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'restore',\n event: 'restore',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n ecModel.resetOption('recreate');\n});\nexport default RestoreOption;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, indexOf, curry, assert, map, createHashMap } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as brushHelper from './brushHelper.js';\nimport { parseFinder as modelUtilParseFinder } from '../../util/model.js';\n// FIXME\n// how to genarialize to more coordinate systems.\nvar INCLUDE_FINDER_MAIN_TYPES = ['grid', 'xAxis', 'yAxis', 'geo', 'graph', 'polar', 'radiusAxis', 'angleAxis', 'bmap'];\nvar BrushTargetManager = /** @class */function () {\n /**\n * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid\n * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]}\n * @param opt.include include coordinate system types.\n */\n function BrushTargetManager(finder, ecModel, opt) {\n var _this = this;\n this._targetInfoList = [];\n var foundCpts = parseFinder(ecModel, finder);\n each(targetInfoBuilders, function (builder, type) {\n if (!opt || !opt.include || indexOf(opt.include, type) >= 0) {\n builder(foundCpts, _this._targetInfoList);\n }\n });\n }\n BrushTargetManager.prototype.setOutputRanges = function (areas, ecModel) {\n this.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) {\n (area.coordRanges || (area.coordRanges = [])).push(coordRange);\n // area.coordRange is the first of area.coordRanges\n if (!area.coordRange) {\n area.coordRange = coordRange;\n // In 'category' axis, coord to pixel is not reversible, so we can not\n // rebuild range by coordRange accrately, which may bring trouble when\n // brushing only one item. So we use __rangeOffset to rebuilding range\n // by coordRange. And this it only used in brush component so it is no\n // need to be adapted to coordRanges.\n var result = coordConvert[area.brushType](0, coordSys, coordRange);\n area.__rangeOffset = {\n offset: diffProcessor[area.brushType](result.values, area.range, [1, 1]),\n xyMinMax: result.xyMinMax\n };\n }\n });\n return areas;\n };\n BrushTargetManager.prototype.matchOutputRanges = function (areas, ecModel, cb) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n if (targetInfo && targetInfo !== true) {\n each(targetInfo.coordSyses, function (coordSys) {\n var result = coordConvert[area.brushType](1, coordSys, area.range, true);\n cb(area, result.values, coordSys, ecModel);\n });\n }\n }, this);\n };\n /**\n * the `areas` is `BrushModel.areas`.\n * Called in layout stage.\n * convert `area.coordRange` to global range and set panelId to `area.range`.\n */\n BrushTargetManager.prototype.setInputRanges = function (areas, ecModel) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n if (process.env.NODE_ENV !== 'production') {\n assert(!targetInfo || targetInfo === true || area.coordRange, 'coordRange must be specified when coord index specified.');\n assert(!targetInfo || targetInfo !== true || area.range, 'range must be specified in global brush.');\n }\n area.range = area.range || [];\n // convert coordRange to global range and set panelId.\n if (targetInfo && targetInfo !== true) {\n area.panelId = targetInfo.panelId;\n // (1) area.range should always be calculate from coordRange but does\n // not keep its original value, for the sake of the dataZoom scenario,\n // where area.coordRange remains unchanged but area.range may be changed.\n // (2) Only support converting one coordRange to pixel range in brush\n // component. So do not consider `coordRanges`.\n // (3) About __rangeOffset, see comment above.\n var result = coordConvert[area.brushType](0, targetInfo.coordSys, area.coordRange);\n var rangeOffset = area.__rangeOffset;\n area.range = rangeOffset ? diffProcessor[area.brushType](result.values, rangeOffset.offset, getScales(result.xyMinMax, rangeOffset.xyMinMax)) : result.values;\n }\n }, this);\n };\n BrushTargetManager.prototype.makePanelOpts = function (api, getDefaultBrushType) {\n return map(this._targetInfoList, function (targetInfo) {\n var rect = targetInfo.getPanelRect();\n return {\n panelId: targetInfo.panelId,\n defaultBrushType: getDefaultBrushType ? getDefaultBrushType(targetInfo) : null,\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, targetInfo.coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect)\n };\n });\n };\n BrushTargetManager.prototype.controlSeries = function (area, seriesModel, ecModel) {\n // Check whether area is bound in coord, and series do not belong to that coord.\n // If do not do this check, some brush (like lineX) will controll all axes.\n var targetInfo = this.findTargetInfo(area, ecModel);\n return targetInfo === true || targetInfo && indexOf(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0;\n };\n /**\n * If return Object, a coord found.\n * If return true, global found.\n * Otherwise nothing found.\n */\n BrushTargetManager.prototype.findTargetInfo = function (area, ecModel) {\n var targetInfoList = this._targetInfoList;\n var foundCpts = parseFinder(ecModel, area);\n for (var i = 0; i < targetInfoList.length; i++) {\n var targetInfo = targetInfoList[i];\n var areaPanelId = area.panelId;\n if (areaPanelId) {\n if (targetInfo.panelId === areaPanelId) {\n return targetInfo;\n }\n } else {\n for (var j = 0; j < targetInfoMatchers.length; j++) {\n if (targetInfoMatchers[j](foundCpts, targetInfo)) {\n return targetInfo;\n }\n }\n }\n }\n return true;\n };\n return BrushTargetManager;\n}();\nfunction formatMinMax(minMax) {\n minMax[0] > minMax[1] && minMax.reverse();\n return minMax;\n}\nfunction parseFinder(ecModel, finder) {\n return modelUtilParseFinder(ecModel, finder, {\n includeMainTypes: INCLUDE_FINDER_MAIN_TYPES\n });\n}\nvar targetInfoBuilders = {\n grid: function (foundCpts, targetInfoList) {\n var xAxisModels = foundCpts.xAxisModels;\n var yAxisModels = foundCpts.yAxisModels;\n var gridModels = foundCpts.gridModels;\n // Remove duplicated.\n var gridModelMap = createHashMap();\n var xAxesHas = {};\n var yAxesHas = {};\n if (!xAxisModels && !yAxisModels && !gridModels) {\n return;\n }\n each(xAxisModels, function (axisModel) {\n var gridModel = axisModel.axis.grid.model;\n gridModelMap.set(gridModel.id, gridModel);\n xAxesHas[gridModel.id] = true;\n });\n each(yAxisModels, function (axisModel) {\n var gridModel = axisModel.axis.grid.model;\n gridModelMap.set(gridModel.id, gridModel);\n yAxesHas[gridModel.id] = true;\n });\n each(gridModels, function (gridModel) {\n gridModelMap.set(gridModel.id, gridModel);\n xAxesHas[gridModel.id] = true;\n yAxesHas[gridModel.id] = true;\n });\n gridModelMap.each(function (gridModel) {\n var grid = gridModel.coordinateSystem;\n var cartesians = [];\n each(grid.getCartesians(), function (cartesian, index) {\n if (indexOf(xAxisModels, cartesian.getAxis('x').model) >= 0 || indexOf(yAxisModels, cartesian.getAxis('y').model) >= 0) {\n cartesians.push(cartesian);\n }\n });\n targetInfoList.push({\n panelId: 'grid--' + gridModel.id,\n gridModel: gridModel,\n coordSysModel: gridModel,\n // Use the first one as the representitive coordSys.\n coordSys: cartesians[0],\n coordSyses: cartesians,\n getPanelRect: panelRectBuilders.grid,\n xAxisDeclared: xAxesHas[gridModel.id],\n yAxisDeclared: yAxesHas[gridModel.id]\n });\n });\n },\n geo: function (foundCpts, targetInfoList) {\n each(foundCpts.geoModels, function (geoModel) {\n var coordSys = geoModel.coordinateSystem;\n targetInfoList.push({\n panelId: 'geo--' + geoModel.id,\n geoModel: geoModel,\n coordSysModel: geoModel,\n coordSys: coordSys,\n coordSyses: [coordSys],\n getPanelRect: panelRectBuilders.geo\n });\n });\n }\n};\nvar targetInfoMatchers = [\n// grid\nfunction (foundCpts, targetInfo) {\n var xAxisModel = foundCpts.xAxisModel;\n var yAxisModel = foundCpts.yAxisModel;\n var gridModel = foundCpts.gridModel;\n !gridModel && xAxisModel && (gridModel = xAxisModel.axis.grid.model);\n !gridModel && yAxisModel && (gridModel = yAxisModel.axis.grid.model);\n return gridModel && gridModel === targetInfo.gridModel;\n},\n// geo\nfunction (foundCpts, targetInfo) {\n var geoModel = foundCpts.geoModel;\n return geoModel && geoModel === targetInfo.geoModel;\n}];\nvar panelRectBuilders = {\n grid: function () {\n // grid is not Transformable.\n return this.coordSys.master.getRect().clone();\n },\n geo: function () {\n var coordSys = this.coordSys;\n var rect = coordSys.getBoundingRect().clone();\n // geo roam and zoom transform\n rect.applyTransform(graphic.getTransform(coordSys));\n return rect;\n }\n};\nvar coordConvert = {\n lineX: curry(axisConvert, 0),\n lineY: curry(axisConvert, 1),\n rect: function (to, coordSys, rangeOrCoordRange, clamp) {\n var xminymin = to ? coordSys.pointToData([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]], clamp) : coordSys.dataToPoint([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]], clamp);\n var xmaxymax = to ? coordSys.pointToData([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]], clamp) : coordSys.dataToPoint([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]], clamp);\n var values = [formatMinMax([xminymin[0], xmaxymax[0]]), formatMinMax([xminymin[1], xmaxymax[1]])];\n return {\n values: values,\n xyMinMax: values\n };\n },\n polygon: function (to, coordSys, rangeOrCoordRange, clamp) {\n var xyMinMax = [[Infinity, -Infinity], [Infinity, -Infinity]];\n var values = map(rangeOrCoordRange, function (item) {\n var p = to ? coordSys.pointToData(item, clamp) : coordSys.dataToPoint(item, clamp);\n xyMinMax[0][0] = Math.min(xyMinMax[0][0], p[0]);\n xyMinMax[1][0] = Math.min(xyMinMax[1][0], p[1]);\n xyMinMax[0][1] = Math.max(xyMinMax[0][1], p[0]);\n xyMinMax[1][1] = Math.max(xyMinMax[1][1], p[1]);\n return p;\n });\n return {\n values: values,\n xyMinMax: xyMinMax\n };\n }\n};\nfunction axisConvert(axisNameIndex, to, coordSys, rangeOrCoordRange) {\n if (process.env.NODE_ENV !== 'production') {\n assert(coordSys.type === 'cartesian2d', 'lineX/lineY brush is available only in cartesian2d.');\n }\n var axis = coordSys.getAxis(['x', 'y'][axisNameIndex]);\n var values = formatMinMax(map([0, 1], function (i) {\n return to ? axis.coordToData(axis.toLocalCoord(rangeOrCoordRange[i]), true) : axis.toGlobalCoord(axis.dataToCoord(rangeOrCoordRange[i]));\n }));\n var xyMinMax = [];\n xyMinMax[axisNameIndex] = values;\n xyMinMax[1 - axisNameIndex] = [NaN, NaN];\n return {\n values: values,\n xyMinMax: xyMinMax\n };\n}\nvar diffProcessor = {\n lineX: curry(axisDiffProcessor, 0),\n lineY: curry(axisDiffProcessor, 1),\n rect: function (values, refer, scales) {\n return [[values[0][0] - scales[0] * refer[0][0], values[0][1] - scales[0] * refer[0][1]], [values[1][0] - scales[1] * refer[1][0], values[1][1] - scales[1] * refer[1][1]]];\n },\n polygon: function (values, refer, scales) {\n return map(values, function (item, idx) {\n return [item[0] - scales[0] * refer[idx][0], item[1] - scales[1] * refer[idx][1]];\n });\n }\n};\nfunction axisDiffProcessor(axisNameIndex, values, refer, scales) {\n return [values[0] - scales[axisNameIndex] * refer[0], values[1] - scales[axisNameIndex] * refer[1]];\n}\n// We have to process scale caused by dataZoom manually,\n// although it might be not accurate.\n// Return [0~1, 0~1]\nfunction getScales(xyMinMaxCurr, xyMinMaxOrigin) {\n var sizeCurr = getSize(xyMinMaxCurr);\n var sizeOrigin = getSize(xyMinMaxOrigin);\n var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]];\n isNaN(scales[0]) && (scales[0] = 1);\n isNaN(scales[1]) && (scales[1] = 1);\n return scales;\n}\nfunction getSize(xyMinMax) {\n return xyMinMax ? [xyMinMax[0][1] - xyMinMax[0][0], xyMinMax[1][1] - xyMinMax[1][0]] : [NaN, NaN];\n}\nexport default BrushTargetManager;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// TODO depends on DataZoom and Brush\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BrushController from '../../helper/BrushController.js';\nimport BrushTargetManager from '../../helper/BrushTargetManager.js';\nimport * as history from '../../dataZoom/history.js';\nimport sliderMove from '../../helper/sliderMove.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { makeInternalComponentId, parseFinder } from '../../../util/model.js';\nimport { registerInternalOptionCreator } from '../../../model/internalComponentCreator.js';\nvar each = zrUtil.each;\nvar DATA_ZOOM_ID_BASE = makeInternalComponentId('toolbox-dataZoom_');\nvar ICON_TYPES = ['zoom', 'back'];\nvar DataZoomFeature = /** @class */function (_super) {\n __extends(DataZoomFeature, _super);\n function DataZoomFeature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DataZoomFeature.prototype.render = function (featureModel, ecModel, api, payload) {\n if (!this._brushController) {\n this._brushController = new BrushController(api.getZr());\n this._brushController.on('brush', zrUtil.bind(this._onBrush, this)).mount();\n }\n updateZoomBtnStatus(featureModel, ecModel, this, payload, api);\n updateBackBtnStatus(featureModel, ecModel);\n };\n DataZoomFeature.prototype.onclick = function (ecModel, api, type) {\n handlers[type].call(this);\n };\n DataZoomFeature.prototype.remove = function (ecModel, api) {\n this._brushController && this._brushController.unmount();\n };\n DataZoomFeature.prototype.dispose = function (ecModel, api) {\n this._brushController && this._brushController.dispose();\n };\n DataZoomFeature.prototype._onBrush = function (eventParam) {\n var areas = eventParam.areas;\n if (!eventParam.isEnd || !areas.length) {\n return;\n }\n var snapshot = {};\n var ecModel = this.ecModel;\n this._brushController.updateCovers([]); // remove cover\n var brushTargetManager = new BrushTargetManager(makeAxisFinder(this.model), ecModel, {\n include: ['grid']\n });\n brushTargetManager.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) {\n if (coordSys.type !== 'cartesian2d') {\n return;\n }\n var brushType = area.brushType;\n if (brushType === 'rect') {\n setBatch('x', coordSys, coordRange[0]);\n setBatch('y', coordSys, coordRange[1]);\n } else {\n setBatch({\n lineX: 'x',\n lineY: 'y'\n }[brushType], coordSys, coordRange);\n }\n });\n history.push(ecModel, snapshot);\n this._dispatchZoomAction(snapshot);\n function setBatch(dimName, coordSys, minMax) {\n var axis = coordSys.getAxis(dimName);\n var axisModel = axis.model;\n var dataZoomModel = findDataZoom(dimName, axisModel, ecModel);\n // Restrict range.\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy(axisModel).getMinMaxSpan();\n if (minMaxSpan.minValueSpan != null || minMaxSpan.maxValueSpan != null) {\n minMax = sliderMove(0, minMax.slice(), axis.scale.getExtent(), 0, minMaxSpan.minValueSpan, minMaxSpan.maxValueSpan);\n }\n dataZoomModel && (snapshot[dataZoomModel.id] = {\n dataZoomId: dataZoomModel.id,\n startValue: minMax[0],\n endValue: minMax[1]\n });\n }\n function findDataZoom(dimName, axisModel, ecModel) {\n var found;\n ecModel.eachComponent({\n mainType: 'dataZoom',\n subType: 'select'\n }, function (dzModel) {\n var has = dzModel.getAxisModel(dimName, axisModel.componentIndex);\n has && (found = dzModel);\n });\n return found;\n }\n };\n ;\n DataZoomFeature.prototype._dispatchZoomAction = function (snapshot) {\n var batch = [];\n // Convert from hash map to array.\n each(snapshot, function (batchItem, dataZoomId) {\n batch.push(zrUtil.clone(batchItem));\n });\n batch.length && this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n batch: batch\n });\n };\n DataZoomFeature.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n filterMode: 'filter',\n // Icon group\n icon: {\n zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1',\n back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26'\n },\n // `zoom`, `back`\n title: ecModel.getLocaleModel().get(['toolbox', 'dataZoom', 'title']),\n brushStyle: {\n borderWidth: 0,\n color: 'rgba(210,219,238,0.2)'\n }\n };\n return defaultOption;\n };\n return DataZoomFeature;\n}(ToolboxFeature);\nvar handlers = {\n zoom: function () {\n var nextActive = !this._isZoomActive;\n this.api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'dataZoomSelect',\n dataZoomSelectActive: nextActive\n });\n },\n back: function () {\n this._dispatchZoomAction(history.pop(this.ecModel));\n }\n};\nfunction makeAxisFinder(dzFeatureModel) {\n var setting = {\n xAxisIndex: dzFeatureModel.get('xAxisIndex', true),\n yAxisIndex: dzFeatureModel.get('yAxisIndex', true),\n xAxisId: dzFeatureModel.get('xAxisId', true),\n yAxisId: dzFeatureModel.get('yAxisId', true)\n };\n // If both `xAxisIndex` `xAxisId` not set, it means 'all'.\n // If both `yAxisIndex` `yAxisId` not set, it means 'all'.\n // Some old cases set like this below to close yAxis control but leave xAxis control:\n // `{ feature: { dataZoom: { yAxisIndex: false } }`.\n if (setting.xAxisIndex == null && setting.xAxisId == null) {\n setting.xAxisIndex = 'all';\n }\n if (setting.yAxisIndex == null && setting.yAxisId == null) {\n setting.yAxisIndex = 'all';\n }\n return setting;\n}\nfunction updateBackBtnStatus(featureModel, ecModel) {\n featureModel.setIconStatus('back', history.count(ecModel) > 1 ? 'emphasis' : 'normal');\n}\nfunction updateZoomBtnStatus(featureModel, ecModel, view, payload, api) {\n var zoomActive = view._isZoomActive;\n if (payload && payload.type === 'takeGlobalCursor') {\n zoomActive = payload.key === 'dataZoomSelect' ? payload.dataZoomSelectActive : false;\n }\n view._isZoomActive = zoomActive;\n featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal');\n var brushTargetManager = new BrushTargetManager(makeAxisFinder(featureModel), ecModel, {\n include: ['grid']\n });\n var panels = brushTargetManager.makePanelOpts(api, function (targetInfo) {\n return targetInfo.xAxisDeclared && !targetInfo.yAxisDeclared ? 'lineX' : !targetInfo.xAxisDeclared && targetInfo.yAxisDeclared ? 'lineY' : 'rect';\n });\n view._brushController.setPanels(panels).enableBrush(zoomActive && panels.length ? {\n brushType: 'auto',\n brushStyle: featureModel.getModel('brushStyle').getItemStyle()\n } : false);\n}\nregisterInternalOptionCreator('dataZoom', function (ecModel) {\n var toolboxModel = ecModel.getComponent('toolbox', 0);\n var featureDataZoomPath = ['feature', 'dataZoom'];\n if (!toolboxModel || toolboxModel.get(featureDataZoomPath) == null) {\n return;\n }\n var dzFeatureModel = toolboxModel.getModel(featureDataZoomPath);\n var dzOptions = [];\n var finder = makeAxisFinder(dzFeatureModel);\n var finderResult = parseFinder(ecModel, finder);\n each(finderResult.xAxisModels, function (axisModel) {\n return buildInternalOptions(axisModel, 'xAxis', 'xAxisIndex');\n });\n each(finderResult.yAxisModels, function (axisModel) {\n return buildInternalOptions(axisModel, 'yAxis', 'yAxisIndex');\n });\n function buildInternalOptions(axisModel, axisMainType, axisIndexPropName) {\n var axisIndex = axisModel.componentIndex;\n var newOpt = {\n type: 'select',\n $fromToolbox: true,\n // Default to be filter\n filterMode: dzFeatureModel.get('filterMode', true) || 'filter',\n // Id for merge mapping.\n id: DATA_ZOOM_ID_BASE + axisMainType + axisIndex\n };\n newOpt[axisIndexPropName] = axisIndex;\n dzOptions.push(newOpt);\n }\n return dzOptions;\n});\nexport default DataZoomFeature;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installDataZoomSelect } from '../../component/dataZoom/installDataZoomSelect.js';\nimport ToolboxModel from './ToolboxModel.js';\nimport ToolboxView from './ToolboxView.js';\n// TODOD: REGISTER IN INSTALL\nimport { registerFeature } from './featureManager.js';\nimport SaveAsImage from './feature/SaveAsImage.js';\nimport MagicType from './feature/MagicType.js';\nimport DataView from './feature/DataView.js';\nimport Restore from './feature/Restore.js';\nimport DataZoom from './feature/DataZoom.js';\nexport function install(registers) {\n registers.registerComponentModel(ToolboxModel);\n registers.registerComponentView(ToolboxView);\n registerFeature('saveAsImage', SaveAsImage);\n registerFeature('magicType', MagicType);\n registerFeature('dataView', DataView);\n registerFeature('dataZoom', DataZoom);\n registerFeature('restore', Restore);\n use(installDataZoomSelect);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar TooltipModel = /** @class */function (_super) {\n __extends(TooltipModel, _super);\n function TooltipModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipModel.type;\n return _this;\n }\n TooltipModel.type = 'tooltip';\n TooltipModel.dependencies = ['axisPointer'];\n TooltipModel.defaultOption = {\n // zlevel: 0,\n z: 60,\n show: true,\n // tooltip main content\n showContent: true,\n // 'trigger' only works on coordinate system.\n // 'item' | 'axis' | 'none'\n trigger: 'item',\n // 'click' | 'mousemove' | 'none'\n triggerOn: 'mousemove|click',\n alwaysShowContent: false,\n displayMode: 'single',\n renderMode: 'auto',\n // whether restraint content inside viewRect.\n // If renderMode: 'richText', default true.\n // If renderMode: 'html', defaut false (for backward compat).\n confine: null,\n showDelay: 0,\n hideDelay: 100,\n // Animation transition time, unit is second\n transitionDuration: 0.4,\n enterable: false,\n backgroundColor: '#fff',\n // box shadow\n shadowBlur: 10,\n shadowColor: 'rgba(0, 0, 0, .2)',\n shadowOffsetX: 1,\n shadowOffsetY: 2,\n // tooltip border radius, unit is px, default is 4\n borderRadius: 4,\n // tooltip border width, unit is px, default is 0 (no border)\n borderWidth: 1,\n // Tooltip inside padding, default is 5 for all direction\n // Array is allowed to set up, right, bottom, left, same with css\n // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.\n padding: null,\n // Extra css text\n extraCssText: '',\n // axis indicator, trigger by axis\n axisPointer: {\n // default is line\n // legal values: 'line' | 'shadow' | 'cross'\n type: 'line',\n // Valid when type is line, appoint tooltip line locate on which line. Optional\n // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'\n // default is 'auto', chose the axis which type is category.\n // for multiply y axis, cartesian coord chose x axis, polar chose angle axis\n axis: 'auto',\n animation: 'auto',\n animationDurationUpdate: 200,\n animationEasingUpdate: 'exponentialOut',\n crossStyle: {\n color: '#999',\n width: 1,\n type: 'dashed',\n // TODO formatter\n textStyle: {}\n }\n // lineStyle and shadowStyle should not be specified here,\n // otherwise it will always override those styles on option.axisPointer.\n },\n\n textStyle: {\n color: '#666',\n fontSize: 14\n }\n };\n return TooltipModel;\n}(ComponentModel);\nexport default TooltipModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { toCamelCase } from '../../util/format.js';\nimport env from 'zrender/lib/core/env.js';\n/* global document */\nexport function shouldTooltipConfine(tooltipModel) {\n var confineOption = tooltipModel.get('confine');\n return confineOption != null ? !!confineOption\n // In richText mode, the outside part can not be visible.\n : tooltipModel.get('renderMode') === 'richText';\n}\nfunction testStyle(styleProps) {\n if (!env.domSupported) {\n return;\n }\n var style = document.documentElement.style;\n for (var i = 0, len = styleProps.length; i < len; i++) {\n if (styleProps[i] in style) {\n return styleProps[i];\n }\n }\n}\nexport var TRANSFORM_VENDOR = testStyle(['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\nexport var TRANSITION_VENDOR = testStyle(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\nexport function toCSSVendorPrefix(styleVendor, styleProp) {\n if (!styleVendor) {\n return styleProp;\n }\n styleProp = toCamelCase(styleProp, true);\n var idx = styleVendor.indexOf(styleProp);\n styleVendor = idx === -1 ? styleProp : \"-\" + styleVendor.slice(0, idx) + \"-\" + styleProp;\n return styleVendor.toLowerCase();\n}\nexport function getComputedStyle(el, style) {\n var stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el);\n return stl ? style ? stl[style] : stl : null;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isString, indexOf, each, bind, isFunction, isArray, isDom } from 'zrender/lib/core/util.js';\nimport { normalizeEvent } from 'zrender/lib/core/event.js';\nimport { transformLocalCoord } from 'zrender/lib/core/dom.js';\nimport env from 'zrender/lib/core/env.js';\nimport { convertToColorString, toCamelCase, normalizeCssArray } from '../../util/format.js';\nimport { shouldTooltipConfine, toCSSVendorPrefix, getComputedStyle, TRANSFORM_VENDOR, TRANSITION_VENDOR } from './helper.js';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup.js';\n/* global document, window */\nvar CSS_TRANSITION_VENDOR = toCSSVendorPrefix(TRANSITION_VENDOR, 'transition');\nvar CSS_TRANSFORM_VENDOR = toCSSVendorPrefix(TRANSFORM_VENDOR, 'transform');\n// eslint-disable-next-line\nvar gCssText = \"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;\" + (env.transform3dSupported ? 'will-change:transform;' : '');\nfunction mirrorPos(pos) {\n pos = pos === 'left' ? 'right' : pos === 'right' ? 'left' : pos === 'top' ? 'bottom' : 'top';\n return pos;\n}\nfunction assembleArrow(tooltipModel, borderColor, arrowPosition) {\n if (!isString(arrowPosition) || arrowPosition === 'inside') {\n return '';\n }\n var backgroundColor = tooltipModel.get('backgroundColor');\n var borderWidth = tooltipModel.get('borderWidth');\n borderColor = convertToColorString(borderColor);\n var arrowPos = mirrorPos(arrowPosition);\n var arrowSize = Math.max(Math.round(borderWidth) * 1.5, 6);\n var positionStyle = '';\n var transformStyle = CSS_TRANSFORM_VENDOR + ':';\n var rotateDeg;\n if (indexOf(['left', 'right'], arrowPos) > -1) {\n positionStyle += 'top:50%';\n transformStyle += \"translateY(-50%) rotate(\" + (rotateDeg = arrowPos === 'left' ? -225 : -45) + \"deg)\";\n } else {\n positionStyle += 'left:50%';\n transformStyle += \"translateX(-50%) rotate(\" + (rotateDeg = arrowPos === 'top' ? 225 : 45) + \"deg)\";\n }\n var rotateRadian = rotateDeg * Math.PI / 180;\n var arrowWH = arrowSize + borderWidth;\n var rotatedWH = arrowWH * Math.abs(Math.cos(rotateRadian)) + arrowWH * Math.abs(Math.sin(rotateRadian));\n var arrowOffset = Math.round(((rotatedWH - Math.SQRT2 * borderWidth) / 2 + Math.SQRT2 * borderWidth - (rotatedWH - arrowWH) / 2) * 100) / 100;\n positionStyle += \";\" + arrowPos + \":-\" + arrowOffset + \"px\";\n var borderStyle = borderColor + \" solid \" + borderWidth + \"px;\";\n var styleCss = [\"position:absolute;width:\" + arrowSize + \"px;height:\" + arrowSize + \"px;z-index:-1;\", positionStyle + \";\" + transformStyle + \";\", \"border-bottom:\" + borderStyle, \"border-right:\" + borderStyle, \"background-color:\" + backgroundColor + \";\"];\n return \"
\";\n}\nfunction assembleTransition(duration, onlyFade) {\n var transitionCurve = 'cubic-bezier(0.23,1,0.32,1)';\n var transitionOption = \" \" + duration / 2 + \"s \" + transitionCurve;\n var transitionText = \"opacity\" + transitionOption + \",visibility\" + transitionOption;\n if (!onlyFade) {\n transitionOption = \" \" + duration + \"s \" + transitionCurve;\n transitionText += env.transformSupported ? \",\" + CSS_TRANSFORM_VENDOR + transitionOption : \",left\" + transitionOption + \",top\" + transitionOption;\n }\n return CSS_TRANSITION_VENDOR + ':' + transitionText;\n}\nfunction assembleTransform(x, y, toString) {\n // If using float on style, the final width of the dom might\n // keep changing slightly while mouse move. So `toFixed(0)` them.\n var x0 = x.toFixed(0) + 'px';\n var y0 = y.toFixed(0) + 'px';\n // not support transform, use `left` and `top` instead.\n if (!env.transformSupported) {\n return toString ? \"top:\" + y0 + \";left:\" + x0 + \";\" : [['top', y0], ['left', x0]];\n }\n // support transform\n var is3d = env.transform3dSupported;\n var translate = \"translate\" + (is3d ? '3d' : '') + \"(\" + x0 + \",\" + y0 + (is3d ? ',0' : '') + \")\";\n return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]];\n}\n/**\n * @param {Object} textStyle\n * @return {string}\n * @inner\n */\nfunction assembleFont(textStyleModel) {\n var cssText = [];\n var fontSize = textStyleModel.get('fontSize');\n var color = textStyleModel.getTextColor();\n color && cssText.push('color:' + color);\n cssText.push('font:' + textStyleModel.getFont());\n fontSize\n // @ts-ignore, leave it to the tooltip refactor.\n && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');\n var shadowColor = textStyleModel.get('textShadowColor');\n var shadowBlur = textStyleModel.get('textShadowBlur') || 0;\n var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0;\n var shadowOffsetY = textStyleModel.get('textShadowOffsetY') || 0;\n shadowColor && shadowBlur && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px ' + shadowBlur + 'px ' + shadowColor);\n each(['decoration', 'align'], function (name) {\n var val = textStyleModel.get(name);\n val && cssText.push('text-' + name + ':' + val);\n });\n return cssText.join(';');\n}\nfunction assembleCssText(tooltipModel, enableTransition, onlyFade) {\n var cssText = [];\n var transitionDuration = tooltipModel.get('transitionDuration');\n var backgroundColor = tooltipModel.get('backgroundColor');\n var shadowBlur = tooltipModel.get('shadowBlur');\n var shadowColor = tooltipModel.get('shadowColor');\n var shadowOffsetX = tooltipModel.get('shadowOffsetX');\n var shadowOffsetY = tooltipModel.get('shadowOffsetY');\n var textStyleModel = tooltipModel.getModel('textStyle');\n var padding = getPaddingFromTooltipModel(tooltipModel, 'html');\n var boxShadow = shadowOffsetX + \"px \" + shadowOffsetY + \"px \" + shadowBlur + \"px \" + shadowColor;\n cssText.push('box-shadow:' + boxShadow);\n // Animation transition. Do not animate when transitionDuration is 0.\n enableTransition && transitionDuration && cssText.push(assembleTransition(transitionDuration, onlyFade));\n if (backgroundColor) {\n cssText.push('background-color:' + backgroundColor);\n }\n // Border style\n each(['width', 'color', 'radius'], function (name) {\n var borderName = 'border-' + name;\n var camelCase = toCamelCase(borderName);\n var val = tooltipModel.get(camelCase);\n val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));\n });\n // Text style\n cssText.push(assembleFont(textStyleModel));\n // Padding\n if (padding != null) {\n cssText.push('padding:' + normalizeCssArray(padding).join('px ') + 'px');\n }\n return cssText.join(';') + ';';\n}\n// If not able to make, do not modify the input `out`.\nfunction makeStyleCoord(out, zr, container, zrX, zrY) {\n var zrPainter = zr && zr.painter;\n if (container) {\n var zrViewportRoot = zrPainter && zrPainter.getViewportRoot();\n if (zrViewportRoot) {\n // Some APPs might use scale on body, so we support CSS transform here.\n transformLocalCoord(out, zrViewportRoot, container, zrX, zrY);\n }\n } else {\n out[0] = zrX;\n out[1] = zrY;\n // xy should be based on canvas root. But tooltipContent is\n // the sibling of canvas root. So padding of ec container\n // should be considered here.\n var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();\n if (viewportRootOffset) {\n out[0] += viewportRootOffset.offsetLeft;\n out[1] += viewportRootOffset.offsetTop;\n }\n }\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\nvar TooltipHTMLContent = /** @class */function () {\n function TooltipHTMLContent(api, opt) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._enterable = true;\n this._alwaysShowContent = false;\n this._firstShow = true;\n this._longHide = true;\n if (env.wxa) {\n return null;\n }\n var el = document.createElement('div');\n // TODO: TYPE\n el.domBelongToZr = true;\n this.el = el;\n var zr = this._zr = api.getZr();\n var appendTo = opt.appendTo;\n var container = appendTo && (isString(appendTo) ? document.querySelector(appendTo) : isDom(appendTo) ? appendTo : isFunction(appendTo) && appendTo(api.getDom()));\n makeStyleCoord(this._styleCoord, zr, container, api.getWidth() / 2, api.getHeight() / 2);\n (container || api.getDom()).appendChild(el);\n this._api = api;\n this._container = container;\n // FIXME\n // Is it needed to trigger zr event manually if\n // the browser do not support `pointer-events: none`.\n var self = this;\n el.onmouseenter = function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n self._inContent = true;\n };\n el.onmousemove = function (e) {\n e = e || window.event;\n if (!self._enterable) {\n // `pointer-events: none` is set to tooltip content div\n // if `enterable` is set as `false`, and `el.onmousemove`\n // can not be triggered. But in browser that do not\n // support `pointer-events`, we need to do this:\n // Try trigger zrender event to avoid mouse\n // in and out shape too frequently\n var handler = zr.handler;\n var zrViewportRoot = zr.painter.getViewportRoot();\n normalizeEvent(zrViewportRoot, e, true);\n handler.dispatch('mousemove', e);\n }\n };\n el.onmouseleave = function () {\n // set `_inContent` to `false` before `hideLater`\n self._inContent = false;\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n };\n }\n /**\n * Update when tooltip is rendered\n */\n TooltipHTMLContent.prototype.update = function (tooltipModel) {\n // FIXME\n // Move this logic to ec main?\n if (!this._container) {\n var container = this._api.getDom();\n var position = getComputedStyle(container, 'position');\n var domStyle = container.style;\n if (domStyle.position !== 'absolute' && position !== 'absolute') {\n domStyle.position = 'relative';\n }\n }\n // move tooltip if chart resized\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n // update alwaysShowContent\n this._alwaysShowContent = alwaysShowContent;\n // update className\n this.el.className = tooltipModel.get('className') || '';\n // Hide the tooltip\n // PENDING\n // this.hide();\n };\n\n TooltipHTMLContent.prototype.show = function (tooltipModel, nearPointColor) {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var el = this.el;\n var style = el.style;\n var styleCoord = this._styleCoord;\n if (!el.innerHTML) {\n style.display = 'none';\n } else {\n style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide)\n // initial transform\n + assembleTransform(styleCoord[0], styleCoord[1], true) + (\"border-color:\" + convertToColorString(nearPointColor) + \";\") + (tooltipModel.get('extraCssText') || '')\n // If mouse occasionally move over the tooltip, a mouseout event will be\n // triggered by canvas, and cause some unexpectable result like dragging\n // stop, \"unfocusAdjacency\". Here `pointer-events: none` is used to solve\n // it. Although it is not supported by IE8~IE10, fortunately it is a rare\n // scenario.\n + (\";pointer-events:\" + (this._enterable ? 'auto' : 'none'));\n }\n this._show = true;\n this._firstShow = false;\n this._longHide = false;\n };\n TooltipHTMLContent.prototype.setContent = function (content, markers, tooltipModel, borderColor, arrowPosition) {\n var el = this.el;\n if (content == null) {\n el.innerHTML = '';\n return;\n }\n var arrow = '';\n if (isString(arrowPosition) && tooltipModel.get('trigger') === 'item' && !shouldTooltipConfine(tooltipModel)) {\n arrow = assembleArrow(tooltipModel, borderColor, arrowPosition);\n }\n if (isString(content)) {\n el.innerHTML = content + arrow;\n } else if (content) {\n // Clear previous\n el.innerHTML = '';\n if (!isArray(content)) {\n content = [content];\n }\n for (var i = 0; i < content.length; i++) {\n if (isDom(content[i]) && content[i].parentNode !== el) {\n el.appendChild(content[i]);\n }\n }\n // no arrow if empty\n if (arrow && el.childNodes.length) {\n // no need to create a new parent element, but it's not supported by IE 10 and older.\n // const arrowEl = document.createRange().createContextualFragment(arrow);\n var arrowEl = document.createElement('div');\n arrowEl.innerHTML = arrow;\n el.appendChild(arrowEl);\n }\n }\n };\n TooltipHTMLContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n TooltipHTMLContent.prototype.getSize = function () {\n var el = this.el;\n return [el.offsetWidth, el.offsetHeight];\n };\n TooltipHTMLContent.prototype.moveTo = function (zrX, zrY) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, this._container, zrX, zrY);\n if (styleCoord[0] != null && styleCoord[1] != null) {\n var style_1 = this.el.style;\n var transforms = assembleTransform(styleCoord[0], styleCoord[1]);\n each(transforms, function (transform) {\n style_1[transform[0]] = transform[1];\n });\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n TooltipHTMLContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2];\n // The ratio of top to height\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n TooltipHTMLContent.prototype.hide = function () {\n var _this = this;\n var style = this.el.style;\n style.visibility = 'hidden';\n style.opacity = '0';\n env.transform3dSupported && (style.willChange = '');\n this._show = false;\n this._longHideTimeout = setTimeout(function () {\n return _this._longHide = true;\n }, 500);\n };\n TooltipHTMLContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n TooltipHTMLContent.prototype.isShow = function () {\n return this._show;\n };\n TooltipHTMLContent.prototype.dispose = function () {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var parentNode = this.el.parentNode;\n parentNode && parentNode.removeChild(this.el);\n this.el = this._container = null;\n };\n return TooltipHTMLContent;\n}();\nexport default TooltipHTMLContent;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup.js';\nimport { throwError } from '../../util/log.js';\nvar TooltipRichContent = /** @class */function () {\n function TooltipRichContent(api) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._alwaysShowContent = false;\n this._enterable = true;\n this._zr = api.getZr();\n makeStyleCoord(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2);\n }\n /**\n * Update when tooltip is rendered\n */\n TooltipRichContent.prototype.update = function (tooltipModel) {\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n // update alwaysShowContent\n this._alwaysShowContent = alwaysShowContent;\n };\n TooltipRichContent.prototype.show = function () {\n if (this._hideTimeout) {\n clearTimeout(this._hideTimeout);\n }\n this.el.show();\n this._show = true;\n };\n /**\n * Set tooltip content\n */\n TooltipRichContent.prototype.setContent = function (content, markupStyleCreator, tooltipModel, borderColor, arrowPosition) {\n var _this = this;\n if (zrUtil.isObject(content)) {\n throwError(process.env.NODE_ENV !== 'production' ? 'Passing DOM nodes as content is not supported in richText tooltip!' : '');\n }\n if (this.el) {\n this._zr.remove(this.el);\n }\n var textStyleModel = tooltipModel.getModel('textStyle');\n this.el = new ZRText({\n style: {\n rich: markupStyleCreator.richTextStyles,\n text: content,\n lineHeight: 22,\n borderWidth: 1,\n borderColor: borderColor,\n textShadowColor: textStyleModel.get('textShadowColor'),\n fill: tooltipModel.get(['textStyle', 'color']),\n padding: getPaddingFromTooltipModel(tooltipModel, 'richText'),\n verticalAlign: 'top',\n align: 'left'\n },\n z: tooltipModel.get('z')\n });\n zrUtil.each(['backgroundColor', 'borderRadius', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'], function (propName) {\n _this.el.style[propName] = tooltipModel.get(propName);\n });\n zrUtil.each(['textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY'], function (propName) {\n _this.el.style[propName] = textStyleModel.get(propName) || 0;\n });\n this._zr.add(this.el);\n var self = this;\n this.el.on('mouseover', function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n self._inContent = true;\n });\n this.el.on('mouseout', function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n self._inContent = false;\n });\n };\n TooltipRichContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n TooltipRichContent.prototype.getSize = function () {\n var el = this.el;\n var bounding = this.el.getBoundingRect();\n // bounding rect does not include shadow. For renderMode richText,\n // if overflow, it will be cut. So calculate them accurately.\n var shadowOuterSize = calcShadowOuterSize(el.style);\n return [bounding.width + shadowOuterSize.left + shadowOuterSize.right, bounding.height + shadowOuterSize.top + shadowOuterSize.bottom];\n };\n TooltipRichContent.prototype.moveTo = function (x, y) {\n var el = this.el;\n if (el) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, x, y);\n x = styleCoord[0];\n y = styleCoord[1];\n var style = el.style;\n var borderWidth = mathMaxWith0(style.borderWidth || 0);\n var shadowOuterSize = calcShadowOuterSize(style);\n // rich text x, y do not include border.\n el.x = x + borderWidth + shadowOuterSize.left;\n el.y = y + borderWidth + shadowOuterSize.top;\n el.markRedraw();\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n TooltipRichContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2];\n // The ratio of top to height\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n TooltipRichContent.prototype.hide = function () {\n if (this.el) {\n this.el.hide();\n }\n this._show = false;\n };\n TooltipRichContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n TooltipRichContent.prototype.isShow = function () {\n return this._show;\n };\n TooltipRichContent.prototype.dispose = function () {\n this._zr.remove(this.el);\n };\n return TooltipRichContent;\n}();\nfunction mathMaxWith0(val) {\n return Math.max(0, val);\n}\nfunction calcShadowOuterSize(style) {\n var shadowBlur = mathMaxWith0(style.shadowBlur || 0);\n var shadowOffsetX = mathMaxWith0(style.shadowOffsetX || 0);\n var shadowOffsetY = mathMaxWith0(style.shadowOffsetY || 0);\n return {\n left: mathMaxWith0(shadowBlur - shadowOffsetX),\n right: mathMaxWith0(shadowBlur + shadowOffsetX),\n top: mathMaxWith0(shadowBlur - shadowOffsetY),\n bottom: mathMaxWith0(shadowBlur + shadowOffsetY)\n };\n}\nfunction makeStyleCoord(out, zr, zrX, zrY) {\n out[0] = zrX;\n out[1] = zrY;\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\nexport default TooltipRichContent;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport { __extends } from \"tslib\";\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { bind, each, clone, trim, isString, isFunction, isArray, isObject, extend } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport TooltipHTMLContent from './TooltipHTMLContent.js';\nimport TooltipRichContent from './TooltipRichContent.js';\nimport { convertToColorString, encodeHTML, formatTpl } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport { Rect } from '../../util/graphic.js';\nimport findPointFromSeries from '../axisPointer/findPointFromSeries.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport Model from '../../model/Model.js';\nimport * as globalListener from '../axisPointer/globalListener.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport * as axisPointerViewHelper from '../axisPointer/viewHelper.js';\nimport { getTooltipRenderMode, preParseFinder, queryReferringComponents } from '../../util/model.js';\nimport ComponentView from '../../view/Component.js';\nimport { format as timeFormat } from '../../util/time.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { shouldTooltipConfine } from './helper.js';\nimport { normalizeTooltipFormatResult } from '../../model/mixin/dataFormat.js';\nimport { createTooltipMarkup, buildTooltipMarkup, TooltipMarkupStyleCreator } from './tooltipMarkup.js';\nimport { findEventDispatcher } from '../../util/event.js';\nimport { clear, createOrUpdate } from '../../util/throttle.js';\nvar proxyRect = new Rect({\n shape: {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n }\n});\nvar TooltipView = /** @class */function (_super) {\n __extends(TooltipView, _super);\n function TooltipView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipView.type;\n return _this;\n }\n TooltipView.prototype.init = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n var tooltipModel = ecModel.getComponent('tooltip');\n var renderMode = this._renderMode = getTooltipRenderMode(tooltipModel.get('renderMode'));\n this._tooltipContent = renderMode === 'richText' ? new TooltipRichContent(api) : new TooltipHTMLContent(api, {\n appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true)\n });\n };\n TooltipView.prototype.render = function (tooltipModel, ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n // Reset\n this.group.removeAll();\n this._tooltipModel = tooltipModel;\n this._ecModel = ecModel;\n this._api = api;\n var tooltipContent = this._tooltipContent;\n tooltipContent.update(tooltipModel);\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n this._initGlobalListener();\n this._keepShow();\n // PENDING\n // `mousemove` event will be triggered very frequently when the mouse moves fast,\n // which causes that the `updatePosition` function was also called frequently.\n // In Chrome with devtools open and Firefox, tooltip looks laggy and shakes. See #14695 #16101\n // To avoid frequent triggering,\n // consider throttling it in 50ms when transition is enabled\n if (this._renderMode !== 'richText' && tooltipModel.get('transitionDuration')) {\n createOrUpdate(this, '_updatePosition', 50, 'fixRate');\n } else {\n clear(this, '_updatePosition');\n }\n };\n TooltipView.prototype._initGlobalListener = function () {\n var tooltipModel = this._tooltipModel;\n var triggerOn = tooltipModel.get('triggerOn');\n globalListener.register('itemTooltip', this._api, bind(function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none') {\n if (triggerOn.indexOf(currTrigger) >= 0) {\n this._tryShow(e, dispatchAction);\n } else if (currTrigger === 'leave') {\n this._hide(dispatchAction);\n }\n }\n }, this));\n };\n TooltipView.prototype._keepShow = function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api;\n var triggerOn = tooltipModel.get('triggerOn');\n // Try to keep the tooltip show when refreshing\n if (this._lastX != null && this._lastY != null\n // When user is willing to control tooltip totally using API,\n // self.manuallyShowTip({x, y}) might cause tooltip hide,\n // which is not expected.\n && triggerOn !== 'none' && triggerOn !== 'click') {\n var self_1 = this;\n clearTimeout(this._refreshUpdateTimeout);\n this._refreshUpdateTimeout = setTimeout(function () {\n // Show tip next tick after other charts are rendered\n // In case highlight action has wrong result\n // FIXME\n !api.isDisposed() && self_1.manuallyShowTip(tooltipModel, ecModel, api, {\n x: self_1._lastX,\n y: self_1._lastY,\n dataByCoordSys: self_1._lastDataByCoordSys\n });\n });\n }\n };\n /**\n * Show tip manually by\n * dispatchAction({\n * type: 'showTip',\n * x: 10,\n * y: 10\n * });\n * Or\n * dispatchAction({\n * type: 'showTip',\n * seriesIndex: 0,\n * dataIndex or dataIndexInside or name\n * });\n *\n * TODO Batch\n */\n TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) {\n if (payload.from === this.uid || env.node || !api.getDom()) {\n return;\n }\n var dispatchAction = makeDispatchAction(payload, api);\n // Reset ticket\n this._ticket = '';\n // When triggered from axisPointer.\n var dataByCoordSys = payload.dataByCoordSys;\n var cmptRef = findComponentReference(payload, ecModel, api);\n if (cmptRef) {\n var rect = cmptRef.el.getBoundingRect().clone();\n rect.applyTransform(cmptRef.el.transform);\n this._tryShow({\n offsetX: rect.x + rect.width / 2,\n offsetY: rect.y + rect.height / 2,\n target: cmptRef.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n } else if (payload.tooltip && payload.x != null && payload.y != null) {\n var el = proxyRect;\n el.x = payload.x;\n el.y = payload.y;\n el.update();\n getECData(el).tooltipConfig = {\n name: null,\n option: payload.tooltip\n };\n // Manually show tooltip while view is not using zrender elements.\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n target: el\n }, dispatchAction);\n } else if (dataByCoordSys) {\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n dataByCoordSys: dataByCoordSys,\n tooltipOption: payload.tooltipOption\n }, dispatchAction);\n } else if (payload.seriesIndex != null) {\n if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) {\n return;\n }\n var pointInfo = findPointFromSeries(payload, ecModel);\n var cx = pointInfo.point[0];\n var cy = pointInfo.point[1];\n if (cx != null && cy != null) {\n this._tryShow({\n offsetX: cx,\n offsetY: cy,\n target: pointInfo.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n }\n } else if (payload.x != null && payload.y != null) {\n // FIXME\n // should wrap dispatchAction like `axisPointer/globalListener` ?\n api.dispatchAction({\n type: 'updateAxisPointer',\n x: payload.x,\n y: payload.y\n });\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n target: api.getZr().findHover(payload.x, payload.y).target\n }, dispatchAction);\n }\n };\n TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) {\n var tooltipContent = this._tooltipContent;\n if (this._tooltipModel) {\n tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));\n }\n this._lastX = this._lastY = this._lastDataByCoordSys = null;\n if (payload.from !== this.uid) {\n this._hide(makeDispatchAction(payload, api));\n }\n };\n // Be compatible with previous design, that is, when tooltip.type is 'axis' and\n // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer\n // and tooltip.\n TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) {\n var seriesIndex = payload.seriesIndex;\n var dataIndex = payload.dataIndex;\n // @ts-ignore\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) {\n return;\n }\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n if (!seriesModel) {\n return;\n }\n var data = seriesModel.getData();\n var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel);\n if (tooltipCascadedModel.get('trigger') !== 'axis') {\n return;\n }\n api.dispatchAction({\n type: 'updateAxisPointer',\n seriesIndex: seriesIndex,\n dataIndex: dataIndex,\n position: payload.position\n });\n return true;\n };\n TooltipView.prototype._tryShow = function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n if (!tooltipModel) {\n return;\n }\n // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n var dataByCoordSys = e.dataByCoordSys;\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n } else if (el) {\n var ecData = getECData(el);\n if (ecData.ssrType === 'legend') {\n // Don't trigger tooltip for legend tooltip item\n return;\n }\n this._lastDataByCoordSys = null;\n var seriesDispatcher_1;\n var cmptDispatcher_1;\n findEventDispatcher(el, function (target) {\n // Always show item tooltip if mouse is on the element with dataIndex\n if (getECData(target).dataIndex != null) {\n seriesDispatcher_1 = target;\n return true;\n }\n // Tooltip provided directly. Like legend.\n if (getECData(target).tooltipConfig != null) {\n cmptDispatcher_1 = target;\n return true;\n }\n }, true);\n if (seriesDispatcher_1) {\n this._showSeriesItemTooltip(e, seriesDispatcher_1, dispatchAction);\n } else if (cmptDispatcher_1) {\n this._showComponentItemTooltip(e, cmptDispatcher_1, dispatchAction);\n } else {\n this._hide(dispatchAction);\n }\n } else {\n this._lastDataByCoordSys = null;\n this._hide(dispatchAction);\n }\n };\n TooltipView.prototype._showOrMove = function (tooltipModel, cb) {\n // showDelay is used in this case: tooltip.enterable is set\n // as true. User intent to move mouse into tooltip and click\n // something. `showDelay` makes it easier to enter the content\n // but tooltip do not move immediately.\n var delay = tooltipModel.get('showDelay');\n cb = bind(cb, this);\n clearTimeout(this._showTimout);\n delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb();\n };\n TooltipView.prototype._showAxisTooltip = function (dataByCoordSys, e) {\n var ecModel = this._ecModel;\n var globalTooltipModel = this._tooltipModel;\n var point = [e.offsetX, e.offsetY];\n var singleTooltipModel = buildTooltipModel([e.tooltipOption], globalTooltipModel);\n var renderMode = this._renderMode;\n var cbParamsList = [];\n var articleMarkup = createTooltipMarkup('section', {\n blocks: [],\n noHeader: true\n });\n // Only for legacy: `Serise['formatTooltip']` returns a string.\n var markupTextArrLegacy = [];\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n each(dataByCoordSys, function (itemCoordSys) {\n each(itemCoordSys.dataByAxis, function (axisItem) {\n var axisModel = ecModel.getComponent(axisItem.axisDim + 'Axis', axisItem.axisIndex);\n var axisValue = axisItem.value;\n if (!axisModel || axisValue == null) {\n return;\n }\n var axisValueLabel = axisPointerViewHelper.getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt);\n var axisSectionMarkup = createTooltipMarkup('section', {\n header: axisValueLabel,\n noHeader: !trim(axisValueLabel),\n sortBlocks: true,\n blocks: []\n });\n articleMarkup.blocks.push(axisSectionMarkup);\n each(axisItem.seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var cbParams = series.getDataParams(dataIndex);\n // Can't find data.\n if (cbParams.dataIndex < 0) {\n return;\n }\n cbParams.axisDim = axisItem.axisDim;\n cbParams.axisIndex = axisItem.axisIndex;\n cbParams.axisType = axisItem.axisType;\n cbParams.axisId = axisItem.axisId;\n cbParams.axisValue = axisHelper.getAxisRawValue(axisModel.axis, {\n value: axisValue\n });\n cbParams.axisValueLabel = axisValueLabel;\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n cbParams.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(cbParams.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null));\n var frag = seriesTooltipResult.frag;\n if (frag) {\n var valueFormatter = buildTooltipModel([series], globalTooltipModel).get('valueFormatter');\n axisSectionMarkup.blocks.push(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag);\n }\n if (seriesTooltipResult.text) {\n markupTextArrLegacy.push(seriesTooltipResult.text);\n }\n cbParamsList.push(cbParams);\n });\n });\n });\n // In most cases, the second axis is displays upper on the first one.\n // So we reverse it to look better.\n articleMarkup.blocks.reverse();\n markupTextArrLegacy.reverse();\n var positionExpr = e.position;\n var orderMode = singleTooltipModel.get('order');\n var builtMarkupText = buildTooltipMarkup(articleMarkup, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), singleTooltipModel.get('textStyle'));\n builtMarkupText && markupTextArrLegacy.unshift(builtMarkupText);\n var blockBreak = renderMode === 'richText' ? '\\n\\n' : '
';\n var allMarkupText = markupTextArrLegacy.join(blockBreak);\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys, cbParamsList)) {\n this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, cbParamsList);\n } else {\n this._showTooltipContent(singleTooltipModel, allMarkupText, cbParamsList, Math.random() + '', point[0], point[1], positionExpr, null, markupStyleCreator);\n }\n });\n // Do not trigger events here, because this branch only be entered\n // from dispatchAction.\n };\n\n TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) {\n var ecModel = this._ecModel;\n var ecData = getECData(dispatcher);\n // Use dataModel in element if possible\n // Used when mouseover on a element like markPoint or edge\n // In which case, the data is not main data in series.\n var seriesIndex = ecData.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n // For example, graph link.\n var dataModel = ecData.dataModel || seriesModel;\n var dataIndex = ecData.dataIndex;\n var dataType = ecData.dataType;\n var data = dataModel.getData(dataType);\n var renderMode = this._renderMode;\n var positionDefault = e.positionDefault;\n var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model], this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var tooltipTrigger = tooltipModel.get('trigger');\n if (tooltipTrigger != null && tooltipTrigger !== 'item') {\n return;\n }\n var params = dataModel.getDataParams(dataIndex, dataType);\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n params.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(params.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType));\n var orderMode = tooltipModel.get('order');\n var valueFormatter = tooltipModel.get('valueFormatter');\n var frag = seriesTooltipResult.frag;\n var markupText = frag ? buildTooltipMarkup(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.text;\n var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex;\n this._showOrMove(tooltipModel, function () {\n this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator);\n });\n // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n };\n TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) {\n var isHTMLRenderMode = this._renderMode === 'html';\n var ecData = getECData(el);\n var tooltipConfig = ecData.tooltipConfig;\n var tooltipOpt = tooltipConfig.option || {};\n var encodeHTMLContent = tooltipOpt.encodeHTMLContent;\n if (isString(tooltipOpt)) {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n // when `tooltipConfig.option` is a string rather than an object,\n // we can't know if the content needs to be encoded\n // for the sake of security, encode it by default.\n encodeHTMLContent = true;\n }\n if (encodeHTMLContent && isHTMLRenderMode && tooltipOpt.content) {\n // clone might be unnecessary?\n tooltipOpt = clone(tooltipOpt);\n tooltipOpt.content = encodeHTML(tooltipOpt.content);\n }\n var tooltipModelCascade = [tooltipOpt];\n var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex);\n if (cmpt) {\n tooltipModelCascade.push(cmpt);\n }\n // In most cases, component tooltip formatter has different params with series tooltip formatter,\n // so that they cannot share the same formatter. Since the global tooltip formatter is used for series\n // by convention, we do not use it as the default formatter for component.\n tooltipModelCascade.push({\n formatter: tooltipOpt.content\n });\n var positionDefault = e.positionDefault;\n var subTooltipModel = buildTooltipModel(tooltipModelCascade, this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var defaultHtml = subTooltipModel.get('content');\n var asyncTicket = Math.random() + '';\n // PENDING: this case do not support richText style yet.\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Do not check whether `trigger` is 'none' here, because `trigger`\n // only works on coordinate system. In fact, we have not found case\n // that requires setting `trigger` nothing on component yet.\n this._showOrMove(subTooltipModel, function () {\n // Use formatterParams from element defined in component\n // Avoid users modify it.\n var formatterParams = clone(subTooltipModel.get('formatterParams') || {});\n this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator);\n });\n // If not dispatch showTip, tip may be hide triggered by axis.\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n };\n TooltipView.prototype._showTooltipContent = function (\n // Use Model insteadof TooltipModel because this model may be from series or other options.\n // Instead of top level tooltip.\n tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markupStyleCreator) {\n // Reset ticket\n this._ticket = '';\n if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) {\n return;\n }\n var tooltipContent = this._tooltipContent;\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n var formatter = tooltipModel.get('formatter');\n positionExpr = positionExpr || tooltipModel.get('position');\n var html = defaultHtml;\n var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor'));\n var nearPointColor = nearPoint.color;\n if (formatter) {\n if (isString(formatter)) {\n var useUTC = tooltipModel.ecModel.get('useUTC');\n var params0 = isArray(params) ? params[0] : params;\n var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;\n html = formatter;\n if (isTimeAxis) {\n html = timeFormat(params0.axisValue, html, useUTC);\n }\n html = formatTpl(html, params, true);\n } else if (isFunction(formatter)) {\n var callback = bind(function (cbTicket, html) {\n if (cbTicket === this._ticket) {\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n }\n }, this);\n this._ticket = asyncTicket;\n html = formatter(params, asyncTicket, callback);\n } else {\n html = formatter;\n }\n }\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n tooltipContent.show(tooltipModel, nearPointColor);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n };\n TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor) {\n if (trigger === 'axis' || isArray(tooltipDataParams)) {\n return {\n color: borderColor || (this._renderMode === 'html' ? '#fff' : 'none')\n };\n }\n if (!isArray(tooltipDataParams)) {\n return {\n color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor\n };\n }\n };\n TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x,\n // Mouse x\n y,\n // Mouse y\n content, params, el) {\n var viewWidth = this._api.getWidth();\n var viewHeight = this._api.getHeight();\n positionExpr = positionExpr || tooltipModel.get('position');\n var contentSize = content.getSize();\n var align = tooltipModel.get('align');\n var vAlign = tooltipModel.get('verticalAlign');\n var rect = el && el.getBoundingRect().clone();\n el && rect.applyTransform(el.transform);\n if (isFunction(positionExpr)) {\n // Callback of position can be an array or a string specify the position\n positionExpr = positionExpr([x, y], params, content.el, rect, {\n viewSize: [viewWidth, viewHeight],\n contentSize: contentSize.slice()\n });\n }\n if (isArray(positionExpr)) {\n x = parsePercent(positionExpr[0], viewWidth);\n y = parsePercent(positionExpr[1], viewHeight);\n } else if (isObject(positionExpr)) {\n var boxLayoutPosition = positionExpr;\n boxLayoutPosition.width = contentSize[0];\n boxLayoutPosition.height = contentSize[1];\n var layoutRect = getLayoutRect(boxLayoutPosition, {\n width: viewWidth,\n height: viewHeight\n });\n x = layoutRect.x;\n y = layoutRect.y;\n align = null;\n // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n vAlign = null;\n }\n // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (isString(positionExpr) && el) {\n var pos = calcTooltipPosition(positionExpr, rect, contentSize, tooltipModel.get('borderWidth'));\n x = pos[0];\n y = pos[1];\n } else {\n var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20);\n x = pos[0];\n y = pos[1];\n }\n align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0);\n vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0);\n if (shouldTooltipConfine(tooltipModel)) {\n var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight);\n x = pos[0];\n y = pos[1];\n }\n content.moveTo(x, y);\n };\n // FIXME\n // Should we remove this but leave this to user?\n TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys, cbParamsList) {\n var lastCoordSys = this._lastDataByCoordSys;\n var lastCbParamsList = this._cbParamsList;\n var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length;\n contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {\n var lastDataByAxis = lastItemCoordSys.dataByAxis || [];\n var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};\n var thisDataByAxis = thisItemCoordSys.dataByAxis || [];\n contentNotChanged = contentNotChanged && lastDataByAxis.length === thisDataByAxis.length;\n contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {\n var thisItem = thisDataByAxis[indexAxis] || {};\n var lastIndices = lastItem.seriesDataIndices || [];\n var newIndices = thisItem.seriesDataIndices || [];\n contentNotChanged = contentNotChanged && lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length;\n contentNotChanged && each(lastIndices, function (lastIdxItem, j) {\n var newIdxItem = newIndices[j];\n contentNotChanged = contentNotChanged && lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex;\n });\n // check is cbParams data value changed\n lastCbParamsList && each(lastItem.seriesDataIndices, function (idxItem) {\n var seriesIdx = idxItem.seriesIndex;\n var cbParams = cbParamsList[seriesIdx];\n var lastCbParams = lastCbParamsList[seriesIdx];\n if (cbParams && lastCbParams && lastCbParams.data !== cbParams.data) {\n contentNotChanged = false;\n }\n });\n });\n });\n this._lastDataByCoordSys = dataByCoordSys;\n this._cbParamsList = cbParamsList;\n return !!contentNotChanged;\n };\n TooltipView.prototype._hide = function (dispatchAction) {\n // Do not directly hideLater here, because this behavior may be prevented\n // in dispatchAction when showTip is dispatched.\n // FIXME\n // duplicated hideTip if manuallyHideTip is called from dispatchAction.\n this._lastDataByCoordSys = null;\n dispatchAction({\n type: 'hideTip',\n from: this.uid\n });\n };\n TooltipView.prototype.dispose = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n clear(this, '_updatePosition');\n this._tooltipContent.dispose();\n globalListener.unregister('itemTooltip', api);\n };\n TooltipView.type = 'tooltip';\n return TooltipView;\n}(ComponentView);\n/**\n * From top to bottom. (the last one should be globalTooltipModel);\n */\nfunction buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) {\n // Last is always tooltip model.\n var ecModel = globalTooltipModel.ecModel;\n var resultModel;\n if (defaultTooltipOption) {\n resultModel = new Model(defaultTooltipOption, ecModel, ecModel);\n resultModel = new Model(globalTooltipModel.option, resultModel, ecModel);\n } else {\n resultModel = globalTooltipModel;\n }\n for (var i = modelCascade.length - 1; i >= 0; i--) {\n var tooltipOpt = modelCascade[i];\n if (tooltipOpt) {\n if (tooltipOpt instanceof Model) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n }\n // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n if (isString(tooltipOpt)) {\n tooltipOpt = {\n formatter: tooltipOpt\n };\n }\n if (tooltipOpt) {\n resultModel = new Model(tooltipOpt, resultModel, ecModel);\n }\n }\n }\n return resultModel;\n}\nfunction makeDispatchAction(payload, api) {\n return payload.dispatchAction || bind(api.dispatchAction, api);\n}\nfunction refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n if (gapH != null) {\n // Add extra 2 pixels for this case:\n // At present the \"values\" in default tooltip are using CSS `float: right`.\n // When the right edge of the tooltip box is on the right side of the\n // viewport, the `float` layout might push the \"values\" to the second line.\n if (x + width + gapH + 2 > viewWidth) {\n x -= width + gapH;\n } else {\n x += gapH;\n }\n }\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n } else {\n y += gapV;\n }\n }\n return [x, y];\n}\nfunction confineTooltipPosition(x, y, content, viewWidth, viewHeight) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n x = Math.min(x + width, viewWidth) - width;\n y = Math.min(y + height, viewHeight) - height;\n x = Math.max(x, 0);\n y = Math.max(y, 0);\n return [x, y];\n}\nfunction calcTooltipPosition(position, rect, contentSize, borderWidth) {\n var domWidth = contentSize[0];\n var domHeight = contentSize[1];\n var offset = Math.ceil(Math.SQRT2 * borderWidth) + 8;\n var x = 0;\n var y = 0;\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n switch (position) {\n case 'inside':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - offset;\n break;\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + offset;\n break;\n case 'left':\n x = rect.x - domWidth - offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'right':\n x = rect.x + rectWidth + offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n return [x, y];\n}\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\n}\n/**\n * Find target component by payload like:\n * ```js\n * { legendId: 'some_id', name: 'xxx' }\n * { toolboxIndex: 1, name: 'xxx' }\n * { geoName: 'some_name', name: 'xxx' }\n * ```\n * PENDING: at present only\n *\n * If not found, return null/undefined.\n */\nfunction findComponentReference(payload, ecModel, api) {\n var queryOptionMap = preParseFinder(payload).queryOptionMap;\n var componentMainType = queryOptionMap.keys()[0];\n if (!componentMainType || componentMainType === 'series') {\n return;\n }\n var queryResult = queryReferringComponents(ecModel, componentMainType, queryOptionMap.get(componentMainType), {\n useDefault: false,\n enableAll: false,\n enableNone: false\n });\n var model = queryResult.models[0];\n if (!model) {\n return;\n }\n var view = api.getViewOfComponentModel(model);\n var el;\n view.group.traverse(function (subEl) {\n var tooltipConfig = getECData(subEl).tooltipConfig;\n if (tooltipConfig && tooltipConfig.name === payload.name) {\n el = subEl;\n return true; // stop\n }\n });\n\n if (el) {\n return {\n componentMainType: componentMainType,\n componentIndex: model.componentIndex,\n el: el\n };\n }\n}\nexport default TooltipView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport { use } from '../../extension.js';\nimport TooltipModel from './TooltipModel.js';\nimport TooltipView from './TooltipView.js';\nimport { noop } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n use(installAxisPointer);\n registers.registerComponentModel(TooltipModel);\n registers.registerComponentView(TooltipView);\n /**\n * @action\n * @property {string} type\n * @property {number} seriesIndex\n * @property {number} dataIndex\n * @property {number} [x]\n * @property {number} [y]\n */\n registers.registerAction({\n type: 'showTip',\n event: 'showTip',\n update: 'tooltip:manuallyShowTip'\n }, noop);\n registers.registerAction({\n type: 'hideTip',\n event: 'hideTip',\n update: 'tooltip:manuallyHideTip'\n }, noop);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { normalizeToArray } from '../../util/model.js';\nvar DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear'];\nexport default function brushPreprocessor(option, isNew) {\n var brushComponents = normalizeToArray(option ? option.brush : []);\n if (!brushComponents.length) {\n return;\n }\n var brushComponentSpecifiedBtns = [];\n zrUtil.each(brushComponents, function (brushOpt) {\n var tbs = brushOpt.hasOwnProperty('toolbox') ? brushOpt.toolbox : [];\n if (tbs instanceof Array) {\n brushComponentSpecifiedBtns = brushComponentSpecifiedBtns.concat(tbs);\n }\n });\n var toolbox = option && option.toolbox;\n if (zrUtil.isArray(toolbox)) {\n toolbox = toolbox[0];\n }\n if (!toolbox) {\n toolbox = {\n feature: {}\n };\n option.toolbox = [toolbox];\n }\n var toolboxFeature = toolbox.feature || (toolbox.feature = {});\n var toolboxBrush = toolboxFeature.brush || (toolboxFeature.brush = {});\n var brushTypes = toolboxBrush.type || (toolboxBrush.type = []);\n brushTypes.push.apply(brushTypes, brushComponentSpecifiedBtns);\n removeDuplicate(brushTypes);\n if (isNew && !brushTypes.length) {\n brushTypes.push.apply(brushTypes, DEFAULT_TOOLBOX_BTNS);\n }\n}\nfunction removeDuplicate(arr) {\n var map = {};\n zrUtil.each(arr, function (val) {\n map[val] = 1;\n });\n arr.length = 0;\n zrUtil.each(map, function (flag, val) {\n arr.push(val);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * @file Visual solution, for consistent option specification.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapping from './VisualMapping.js';\nimport { getItemVisualFromData, setItemVisualFromData } from './helper.js';\nvar each = zrUtil.each;\nfunction hasKeys(obj) {\n if (obj) {\n for (var name_1 in obj) {\n if (obj.hasOwnProperty(name_1)) {\n return true;\n }\n }\n }\n}\nexport function createVisualMappings(option, stateList, supplementVisualOption) {\n var visualMappings = {};\n each(stateList, function (state) {\n var mappings = visualMappings[state] = createMappings();\n each(option[state], function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n var mappingOption = {\n type: visualType,\n visual: visualData\n };\n supplementVisualOption && supplementVisualOption(mappingOption, state);\n mappings[visualType] = new VisualMapping(mappingOption);\n // Prepare a alpha for opacity, for some case that opacity\n // is not supported, such as rendering using gradient color.\n if (visualType === 'opacity') {\n mappingOption = zrUtil.clone(mappingOption);\n mappingOption.type = 'colorAlpha';\n mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption);\n }\n });\n });\n return visualMappings;\n function createMappings() {\n var Creater = function () {};\n // Make sure hidden fields will not be visited by\n // object iteration (with hasOwnProperty checking).\n Creater.prototype.__hidden = Creater.prototype;\n var obj = new Creater();\n return obj;\n }\n}\nexport function replaceVisualOption(thisOption, newOption, keys) {\n // Visual attributes merge is not supported, otherwise it\n // brings overcomplicated merge logic. See #2853. So if\n // newOption has anyone of these keys, all of these keys\n // will be reset. Otherwise, all keys remain.\n var has;\n zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n has = true;\n }\n });\n has && zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n thisOption[key] = zrUtil.clone(newOption[key]);\n } else {\n delete thisOption[key];\n }\n });\n}\n/**\n * @param stateList\n * @param visualMappings\n * @param list\n * @param getValueState param: valueOrIndex, return: state.\n * @param scope Scope for getValueState\n * @param dimension Concrete dimension, if used.\n */\n// ???! handle brush?\nexport function applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n var dataIndex;\n function getVisual(key) {\n return getItemVisualFromData(data, dataIndex, key);\n }\n function setVisual(key, value) {\n setItemVisualFromData(data, dataIndex, key, value);\n }\n if (dimension == null) {\n data.each(eachItem);\n } else {\n data.each([dimension], eachItem);\n }\n function eachItem(valueOrIndex, index) {\n dataIndex = dimension == null ? valueOrIndex // First argument is index\n : index;\n var rawDataItem = data.getRawDataItem(dataIndex);\n // Consider performance\n // @ts-ignore\n if (rawDataItem && rawDataItem.visualMap === false) {\n return;\n }\n var valueState = getValueState.call(scope, valueOrIndex);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual);\n }\n }\n}\n/**\n * @param data\n * @param stateList\n * @param visualMappings >\n * @param getValueState param: valueOrIndex, return: state.\n * @param dim dimension or dimension index.\n */\nexport function incrementalApplyVisual(stateList, visualMappings, getValueState, dim) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n return {\n progress: function progress(params, data) {\n var dimIndex;\n if (dim != null) {\n dimIndex = data.getDimensionIndex(dim);\n }\n function getVisual(key) {\n return getItemVisualFromData(data, dataIndex, key);\n }\n function setVisual(key, value) {\n setItemVisualFromData(data, dataIndex, key, value);\n }\n var dataIndex;\n var store = data.getStore();\n while ((dataIndex = params.next()) != null) {\n var rawDataItem = data.getRawDataItem(dataIndex);\n // Consider performance\n // @ts-ignore\n if (rawDataItem && rawDataItem.visualMap === false) {\n continue;\n }\n var value = dim != null ? store.get(dimIndex, dataIndex) : dataIndex;\n var valueState = getValueState(value);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual);\n }\n }\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as polygonContain from 'zrender/lib/contain/polygon.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { linePolygonIntersect } from '../../util/graphic.js';\nexport function makeBrushCommonSelectorForSeries(area) {\n var brushType = area.brushType;\n // Do not use function binding or curry for performance.\n var selectors = {\n point: function (itemLayout) {\n return selector[brushType].point(itemLayout, selectors, area);\n },\n rect: function (itemLayout) {\n return selector[brushType].rect(itemLayout, selectors, area);\n }\n };\n return selectors;\n}\nvar selector = {\n lineX: getLineSelectors(0),\n lineY: getLineSelectors(1),\n rect: {\n point: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]);\n },\n rect: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.intersect(itemLayout);\n }\n },\n polygon: {\n point: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]) && polygonContain.contain(area.range, itemLayout[0], itemLayout[1]);\n },\n rect: function (itemLayout, selectors, area) {\n var points = area.range;\n if (!itemLayout || points.length <= 1) {\n return false;\n }\n var x = itemLayout.x;\n var y = itemLayout.y;\n var width = itemLayout.width;\n var height = itemLayout.height;\n var p = points[0];\n if (polygonContain.contain(points, x, y) || polygonContain.contain(points, x + width, y) || polygonContain.contain(points, x, y + height) || polygonContain.contain(points, x + width, y + height) || BoundingRect.create(itemLayout).contain(p[0], p[1]) || linePolygonIntersect(x, y, x + width, y, points) || linePolygonIntersect(x, y, x, y + height, points) || linePolygonIntersect(x + width, y, x + width, y + height, points) || linePolygonIntersect(x, y + height, x + width, y + height, points)) {\n return true;\n }\n }\n }\n};\nfunction getLineSelectors(xyIndex) {\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n return {\n point: function (itemLayout, selectors, area) {\n if (itemLayout) {\n var range = area.range;\n var p = itemLayout[xyIndex];\n return inLineRange(p, range);\n }\n },\n rect: function (itemLayout, selectors, area) {\n if (itemLayout) {\n var range = area.range;\n var layoutRange = [itemLayout[xy[xyIndex]], itemLayout[xy[xyIndex]] + itemLayout[wh[xyIndex]]];\n layoutRange[1] < layoutRange[0] && layoutRange.reverse();\n return inLineRange(layoutRange[0], range) || inLineRange(layoutRange[1], range) || inLineRange(range[0], layoutRange) || inLineRange(range[1], layoutRange);\n }\n }\n };\n}\nfunction inLineRange(p, range) {\n return range[0] <= p && p <= range[1];\n}\nexport default selector;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport { makeBrushCommonSelectorForSeries } from './selector.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport BrushTargetManager from '../helper/BrushTargetManager.js';\nvar STATE_LIST = ['inBrush', 'outOfBrush'];\nvar DISPATCH_METHOD = '__ecBrushSelect';\nvar DISPATCH_FLAG = '__ecInBrushSelectEvent';\n;\nexport function layoutCovers(ecModel) {\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel);\n brushTargetManager.setInputRanges(brushModel.areas, ecModel);\n });\n}\n/**\n * Register the visual encoding if this modules required.\n */\nexport default function brushVisual(ecModel, api, payload) {\n var brushSelected = [];\n var throttleType;\n var throttleDelay;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : {\n brushType: false\n });\n });\n layoutCovers(ecModel);\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel, brushIndex) {\n var thisBrushSelected = {\n brushId: brushModel.id,\n brushIndex: brushIndex,\n brushName: brushModel.name,\n areas: zrUtil.clone(brushModel.areas),\n selected: []\n };\n // Every brush component exists in event params, convenient\n // for user to find by index.\n brushSelected.push(thisBrushSelected);\n var brushOption = brushModel.option;\n var brushLink = brushOption.brushLink;\n var linkedSeriesMap = [];\n var selectedDataIndexForLink = [];\n var rangeInfoBySeries = [];\n var hasBrushExists = false;\n if (!brushIndex) {\n // Only the first throttle setting works.\n throttleType = brushOption.throttleType;\n throttleDelay = brushOption.throttleDelay;\n }\n // Add boundingRect and selectors to range.\n var areas = zrUtil.map(brushModel.areas, function (area) {\n var builder = boundingRectBuilders[area.brushType];\n var selectableArea = zrUtil.defaults({\n boundingRect: builder ? builder(area) : void 0\n }, area);\n selectableArea.selectors = makeBrushCommonSelectorForSeries(selectableArea);\n return selectableArea;\n });\n var visualMappings = visualSolution.createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) {\n mappingOption.mappingMethod = 'fixed';\n });\n zrUtil.isArray(brushLink) && zrUtil.each(brushLink, function (seriesIndex) {\n linkedSeriesMap[seriesIndex] = 1;\n });\n function linkOthers(seriesIndex) {\n return brushLink === 'all' || !!linkedSeriesMap[seriesIndex];\n }\n // If no supported brush or no brush on the series,\n // all visuals should be in original state.\n function brushed(rangeInfoList) {\n return !!rangeInfoList.length;\n }\n /**\n * Logic for each series: (If the logic has to be modified one day, do it carefully!)\n *\n * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord.\n * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck.\n * !brushed┘ └nothing.\n * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing.\n */\n // Step A\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var rangeInfoList = rangeInfoBySeries[seriesIndex] = [];\n seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex) : stepAOthers(seriesModel, seriesIndex, rangeInfoList);\n });\n function stepAParallel(seriesModel, seriesIndex) {\n var coordSys = seriesModel.coordinateSystem;\n hasBrushExists = hasBrushExists || coordSys.hasAxisBrushed();\n linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) {\n activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1);\n });\n }\n function stepAOthers(seriesModel, seriesIndex, rangeInfoList) {\n if (!seriesModel.brushSelector || brushModelNotControll(brushModel, seriesIndex)) {\n return;\n }\n zrUtil.each(areas, function (area) {\n if (brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel)) {\n rangeInfoList.push(area);\n }\n hasBrushExists = hasBrushExists || brushed(rangeInfoList);\n });\n if (linkOthers(seriesIndex) && brushed(rangeInfoList)) {\n var data_1 = seriesModel.getData();\n data_1.each(function (dataIndex) {\n if (checkInRange(seriesModel, rangeInfoList, data_1, dataIndex)) {\n selectedDataIndexForLink[dataIndex] = 1;\n }\n });\n }\n }\n // Step B\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var seriesBrushSelected = {\n seriesId: seriesModel.id,\n seriesIndex: seriesIndex,\n seriesName: seriesModel.name,\n dataIndex: []\n };\n // Every series exists in event params, convenient\n // for user to find series by seriesIndex.\n thisBrushSelected.selected.push(seriesBrushSelected);\n var rangeInfoList = rangeInfoBySeries[seriesIndex];\n var data = seriesModel.getData();\n var getValueState = linkOthers(seriesIndex) ? function (dataIndex) {\n return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n } : function (dataIndex) {\n return checkInRange(seriesModel, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n };\n // If no supported brush or no brush, all visuals are in original state.\n (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && visualSolution.applyVisual(STATE_LIST, visualMappings, data, getValueState);\n });\n });\n dispatchAction(api, throttleType, throttleDelay, brushSelected, payload);\n}\n;\nfunction dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) {\n // This event will not be triggered when `setOpion`, otherwise dead lock may\n // triggered when do `setOption` in event listener, which we do not find\n // satisfactory way to solve yet. Some considered resolutions:\n // (a) Diff with prevoius selected data ant only trigger event when changed.\n // But store previous data and diff precisely (i.e., not only by dataIndex, but\n // also detect value changes in selected data) might bring complexity or fragility.\n // (b) Use spectial param like `silent` to suppress event triggering.\n // But such kind of volatile param may be weird in `setOption`.\n if (!payload) {\n return;\n }\n var zr = api.getZr();\n if (zr[DISPATCH_FLAG]) {\n return;\n }\n if (!zr[DISPATCH_METHOD]) {\n zr[DISPATCH_METHOD] = doDispatch;\n }\n var fn = throttleUtil.createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType);\n fn(api, brushSelected);\n}\nfunction doDispatch(api, brushSelected) {\n if (!api.isDisposed()) {\n var zr = api.getZr();\n zr[DISPATCH_FLAG] = true;\n api.dispatchAction({\n type: 'brushSelect',\n batch: brushSelected\n });\n zr[DISPATCH_FLAG] = false;\n }\n}\nfunction checkInRange(seriesModel, rangeInfoList, data, dataIndex) {\n for (var i = 0, len = rangeInfoList.length; i < len; i++) {\n var area = rangeInfoList[i];\n if (seriesModel.brushSelector(dataIndex, data, area.selectors, area)) {\n return true;\n }\n }\n}\nfunction brushModelNotControll(brushModel, seriesIndex) {\n var seriesIndices = brushModel.option.seriesIndex;\n return seriesIndices != null && seriesIndices !== 'all' && (zrUtil.isArray(seriesIndices) ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices);\n}\nvar boundingRectBuilders = {\n rect: function (area) {\n return getBoundingRectFromMinMax(area.range);\n },\n polygon: function (area) {\n var minMax;\n var range = area.range;\n for (var i = 0, len = range.length; i < len; i++) {\n minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]];\n var rg = range[i];\n rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]);\n rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]);\n rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]);\n rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]);\n }\n return minMax && getBoundingRectFromMinMax(minMax);\n }\n};\nfunction getBoundingRectFromMinMax(minMax) {\n return new BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BrushController from '../helper/BrushController.js';\nimport { layoutCovers } from './visualEncoding.js';\nimport ComponentView from '../../view/Component.js';\nvar BrushView = /** @class */function (_super) {\n __extends(BrushView, _super);\n function BrushView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BrushView.type;\n return _this;\n }\n BrushView.prototype.init = function (ecModel, api) {\n this.ecModel = ecModel;\n this.api = api;\n this.model;\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this)).mount();\n };\n BrushView.prototype.render = function (brushModel, ecModel, api, payload) {\n this.model = brushModel;\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateTransform = function (brushModel, ecModel, api, payload) {\n // PENDING: `updateTransform` is a little tricky, whose layout need\n // to be calculate mandatorily and other stages will not be performed.\n // Take care the correctness of the logic. See #11754 .\n layoutCovers(ecModel);\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateVisual = function (brushModel, ecModel, api, payload) {\n this.updateTransform(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateView = function (brushModel, ecModel, api, payload) {\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype._updateController = function (brushModel, ecModel, api, payload) {\n // Do not update controller when drawing.\n (!payload || payload.$from !== brushModel.id) && this._brushController.setPanels(brushModel.brushTargetManager.makePanelOpts(api)).enableBrush(brushModel.brushOption).updateCovers(brushModel.areas.slice());\n };\n // updateLayout: updateController,\n // updateVisual: updateController,\n BrushView.prototype.dispose = function () {\n this._brushController.dispose();\n };\n BrushView.prototype._onBrush = function (eventParam) {\n var modelId = this.model.id;\n var areas = this.model.brushTargetManager.setOutputRanges(eventParam.areas, this.ecModel);\n // Action is not dispatched on drag end, because the drag end\n // emits the same params with the last drag move event, and\n // may have some delay when using touch pad, which makes\n // animation not smooth (when using debounce).\n (!eventParam.isEnd || eventParam.removeOnClick) && this.api.dispatchAction({\n type: 'brush',\n brushId: modelId,\n areas: zrUtil.clone(areas),\n $from: modelId\n });\n eventParam.isEnd && this.api.dispatchAction({\n type: 'brushEnd',\n brushId: modelId,\n areas: zrUtil.clone(areas),\n $from: modelId\n });\n };\n BrushView.type = 'brush';\n return BrushView;\n}(ComponentView);\nexport default BrushView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport Model from '../../model/Model.js';\nimport ComponentModel from '../../model/Component.js';\nvar DEFAULT_OUT_OF_BRUSH_COLOR = '#ddd';\nvar BrushModel = /** @class */function (_super) {\n __extends(BrushModel, _super);\n function BrushModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BrushModel.type;\n /**\n * @readOnly\n */\n _this.areas = [];\n /**\n * Current brush painting area settings.\n * @readOnly\n */\n _this.brushOption = {};\n return _this;\n }\n BrushModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, ['inBrush', 'outOfBrush']);\n var inBrush = thisOption.inBrush = thisOption.inBrush || {};\n // Always give default visual, consider setOption at the second time.\n thisOption.outOfBrush = thisOption.outOfBrush || {\n color: DEFAULT_OUT_OF_BRUSH_COLOR\n };\n if (!inBrush.hasOwnProperty('liftZ')) {\n // Bigger than the highlight z lift, otherwise it will\n // be effected by the highlight z when brush.\n inBrush.liftZ = 5;\n }\n };\n /**\n * If `areas` is null/undefined, range state remain.\n */\n BrushModel.prototype.setAreas = function (areas) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(zrUtil.isArray(areas));\n zrUtil.each(areas, function (area) {\n zrUtil.assert(area.brushType, 'Illegal areas');\n });\n }\n // If areas is null/undefined, range state remain.\n // This helps user to dispatchAction({type: 'brush'}) with no areas\n // set but just want to get the current brush select info from a `brush` event.\n if (!areas) {\n return;\n }\n this.areas = zrUtil.map(areas, function (area) {\n return generateBrushOption(this.option, area);\n }, this);\n };\n /**\n * Set the current painting brush option.\n */\n BrushModel.prototype.setBrushOption = function (brushOption) {\n this.brushOption = generateBrushOption(this.option, brushOption);\n this.brushType = this.brushOption.brushType;\n };\n BrushModel.type = 'brush';\n BrushModel.dependencies = ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series'];\n BrushModel.defaultOption = {\n seriesIndex: 'all',\n brushType: 'rect',\n brushMode: 'single',\n transformable: true,\n brushStyle: {\n borderWidth: 1,\n color: 'rgba(210,219,238,0.3)',\n borderColor: '#D2DBEE'\n },\n throttleType: 'fixRate',\n throttleDelay: 0,\n removeOnClick: true,\n z: 10000\n };\n return BrushModel;\n}(ComponentModel);\nfunction generateBrushOption(option, brushOption) {\n return zrUtil.merge({\n brushType: option.brushType,\n brushMode: option.brushMode,\n transformable: option.transformable,\n brushStyle: new Model(option.brushStyle).getItemStyle(),\n removeOnClick: option.removeOnClick,\n z: option.z\n }, brushOption, true);\n}\nexport default BrushModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nvar ICON_TYPES = ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear'];\nvar BrushFeature = /** @class */function (_super) {\n __extends(BrushFeature, _super);\n function BrushFeature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BrushFeature.prototype.render = function (featureModel, ecModel, api) {\n var brushType;\n var brushMode;\n var isBrushed;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n brushType = brushModel.brushType;\n brushMode = brushModel.brushOption.brushMode || 'single';\n isBrushed = isBrushed || !!brushModel.areas.length;\n });\n this._brushType = brushType;\n this._brushMode = brushMode;\n zrUtil.each(featureModel.get('type', true), function (type) {\n featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal');\n });\n };\n BrushFeature.prototype.updateView = function (featureModel, ecModel, api) {\n this.render(featureModel, ecModel, api);\n };\n BrushFeature.prototype.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon', true);\n var icons = {};\n zrUtil.each(model.get('type', true), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n };\n ;\n BrushFeature.prototype.onclick = function (ecModel, api, type) {\n var brushType = this._brushType;\n var brushMode = this._brushMode;\n if (type === 'clear') {\n // Trigger parallel action firstly\n api.dispatchAction({\n type: 'axisAreaSelect',\n intervals: []\n });\n api.dispatchAction({\n type: 'brush',\n command: 'clear',\n // Clear all areas of all brush components.\n areas: []\n });\n } else {\n api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: {\n brushType: type === 'keep' ? brushType : brushType === type ? false : type,\n brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode\n }\n });\n }\n };\n ;\n BrushFeature.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n type: ICON_TYPES.slice(),\n icon: {\n /* eslint-disable */\n 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',\n 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',\n 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',\n 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',\n 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',\n 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' // jshint ignore:line\n /* eslint-enable */\n },\n\n // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`\n title: ecModel.getLocaleModel().get(['toolbox', 'brush', 'title'])\n };\n return defaultOption;\n };\n return BrushFeature;\n}(ToolboxFeature);\nexport default BrushFeature;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport brushPreprocessor from './preprocessor.js';\nimport BrushView from './BrushView.js';\nimport BrushModel from './BrushModel.js';\nimport brushVisual from './visualEncoding.js';\n// TODO\nimport BrushFeature from '../toolbox/feature/Brush.js';\nimport { registerFeature } from '../toolbox/featureManager.js';\nimport { noop } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n registers.registerComponentView(BrushView);\n registers.registerComponentModel(BrushModel);\n registers.registerPreprocessor(brushPreprocessor);\n registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, brushVisual);\n registers.registerAction({\n type: 'brush',\n event: 'brush',\n update: 'updateVisual'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'brush',\n query: payload\n }, function (brushModel) {\n brushModel.setAreas(payload.areas);\n });\n });\n /**\n * payload: {\n * brushComponents: [\n * {\n * brushId,\n * brushIndex,\n * brushName,\n * series: [\n * {\n * seriesId,\n * seriesIndex,\n * seriesName,\n * rawIndices: [21, 34, ...]\n * },\n * ...\n * ]\n * },\n * ...\n * ]\n * }\n */\n registers.registerAction({\n type: 'brushSelect',\n event: 'brushSelected',\n update: 'none'\n }, noop);\n registers.registerAction({\n type: 'brushEnd',\n event: 'brushEnd',\n update: 'none'\n }, noop);\n registerFeature('brush', BrushFeature);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport ComponentModel from '../../model/Component.js';\nimport ComponentView from '../../view/Component.js';\nimport { windowOpen } from '../../util/format.js';\nvar TitleModel = /** @class */function (_super) {\n __extends(TitleModel, _super);\n function TitleModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TitleModel.type;\n _this.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n return _this;\n }\n TitleModel.type = 'title';\n TitleModel.defaultOption = {\n // zlevel: 0,\n z: 6,\n show: true,\n text: '',\n target: 'blank',\n subtext: '',\n subtarget: 'blank',\n left: 0,\n top: 0,\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n textStyle: {\n fontSize: 18,\n fontWeight: 'bold',\n color: '#464646'\n },\n subtextStyle: {\n fontSize: 12,\n color: '#6E7079'\n }\n };\n return TitleModel;\n}(ComponentModel);\n// View\nvar TitleView = /** @class */function (_super) {\n __extends(TitleView, _super);\n function TitleView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TitleView.type;\n return _this;\n }\n TitleView.prototype.render = function (titleModel, ecModel, api) {\n this.group.removeAll();\n if (!titleModel.get('show')) {\n return;\n }\n var group = this.group;\n var textStyleModel = titleModel.getModel('textStyle');\n var subtextStyleModel = titleModel.getModel('subtextStyle');\n var textAlign = titleModel.get('textAlign');\n var textVerticalAlign = zrUtil.retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));\n var textEl = new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: titleModel.get('text'),\n fill: textStyleModel.getTextColor()\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var textRect = textEl.getBoundingRect();\n var subText = titleModel.get('subtext');\n var subTextEl = new graphic.Text({\n style: createTextStyle(subtextStyleModel, {\n text: subText,\n fill: subtextStyleModel.getTextColor(),\n y: textRect.height + titleModel.get('itemGap'),\n verticalAlign: 'top'\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var link = titleModel.get('link');\n var sublink = titleModel.get('sublink');\n var triggerEvent = titleModel.get('triggerEvent', true);\n textEl.silent = !link && !triggerEvent;\n subTextEl.silent = !sublink && !triggerEvent;\n if (link) {\n textEl.on('click', function () {\n windowOpen(link, '_' + titleModel.get('target'));\n });\n }\n if (sublink) {\n subTextEl.on('click', function () {\n windowOpen(sublink, '_' + titleModel.get('subtarget'));\n });\n }\n getECData(textEl).eventData = getECData(subTextEl).eventData = triggerEvent ? {\n componentType: 'title',\n componentIndex: titleModel.componentIndex\n } : null;\n group.add(textEl);\n subText && group.add(subTextEl);\n // If no subText, but add subTextEl, there will be an empty line.\n var groupRect = group.getBoundingRect();\n var layoutOption = titleModel.getBoxLayoutParams();\n layoutOption.width = groupRect.width;\n layoutOption.height = groupRect.height;\n var layoutRect = getLayoutRect(layoutOption, {\n width: api.getWidth(),\n height: api.getHeight()\n }, titleModel.get('padding'));\n // Adjust text align based on position\n if (!textAlign) {\n // Align left if title is on the left. center and right is same\n textAlign = titleModel.get('left') || titleModel.get('right');\n // @ts-ignore\n if (textAlign === 'middle') {\n textAlign = 'center';\n }\n // Adjust layout by text align\n if (textAlign === 'right') {\n layoutRect.x += layoutRect.width;\n } else if (textAlign === 'center') {\n layoutRect.x += layoutRect.width / 2;\n }\n }\n if (!textVerticalAlign) {\n textVerticalAlign = titleModel.get('top') || titleModel.get('bottom');\n // @ts-ignore\n if (textVerticalAlign === 'center') {\n textVerticalAlign = 'middle';\n }\n if (textVerticalAlign === 'bottom') {\n layoutRect.y += layoutRect.height;\n } else if (textVerticalAlign === 'middle') {\n layoutRect.y += layoutRect.height / 2;\n }\n textVerticalAlign = textVerticalAlign || 'top';\n }\n group.x = layoutRect.x;\n group.y = layoutRect.y;\n group.markRedraw();\n var alignStyle = {\n align: textAlign,\n verticalAlign: textVerticalAlign\n };\n textEl.setStyle(alignStyle);\n subTextEl.setStyle(alignStyle);\n // Render background\n // Get groupRect again because textAlign has been changed\n groupRect = group.getBoundingRect();\n var padding = layoutRect.margin;\n var style = titleModel.getItemStyle(['color', 'opacity']);\n style.fill = titleModel.get('backgroundColor');\n var rect = new graphic.Rect({\n shape: {\n x: groupRect.x - padding[3],\n y: groupRect.y - padding[0],\n width: groupRect.width + padding[1] + padding[3],\n height: groupRect.height + padding[0] + padding[2],\n r: titleModel.get('borderRadius')\n },\n style: style,\n subPixelOptimize: true,\n silent: true\n });\n group.add(rect);\n };\n TitleView.type = 'title';\n return TitleView;\n}(ComponentView);\nexport function install(registers) {\n registers.registerComponentModel(TitleModel);\n registers.registerComponentView(TitleView);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport { each, isObject, clone } from 'zrender/lib/core/util.js';\nimport { convertOptionIdName, getDataItemValue } from '../../util/model.js';\nvar TimelineModel = /** @class */function (_super) {\n __extends(TimelineModel, _super);\n function TimelineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TimelineModel.type;\n _this.layoutMode = 'box';\n return _this;\n }\n /**\n * @override\n */\n TimelineModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n this._initData();\n };\n /**\n * @override\n */\n TimelineModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n this._initData();\n };\n TimelineModel.prototype.setCurrentIndex = function (currentIndex) {\n if (currentIndex == null) {\n currentIndex = this.option.currentIndex;\n }\n var count = this._data.count();\n if (this.option.loop) {\n currentIndex = (currentIndex % count + count) % count;\n } else {\n currentIndex >= count && (currentIndex = count - 1);\n currentIndex < 0 && (currentIndex = 0);\n }\n this.option.currentIndex = currentIndex;\n };\n /**\n * @return {number} currentIndex\n */\n TimelineModel.prototype.getCurrentIndex = function () {\n return this.option.currentIndex;\n };\n /**\n * @return {boolean}\n */\n TimelineModel.prototype.isIndexMax = function () {\n return this.getCurrentIndex() >= this._data.count() - 1;\n };\n /**\n * @param {boolean} state true: play, false: stop\n */\n TimelineModel.prototype.setPlayState = function (state) {\n this.option.autoPlay = !!state;\n };\n /**\n * @return {boolean} true: play, false: stop\n */\n TimelineModel.prototype.getPlayState = function () {\n return !!this.option.autoPlay;\n };\n /**\n * @private\n */\n TimelineModel.prototype._initData = function () {\n var thisOption = this.option;\n var dataArr = thisOption.data || [];\n var axisType = thisOption.axisType;\n var names = this._names = [];\n var processedDataArr;\n if (axisType === 'category') {\n processedDataArr = [];\n each(dataArr, function (item, index) {\n var value = convertOptionIdName(getDataItemValue(item), '');\n var newItem;\n if (isObject(item)) {\n newItem = clone(item);\n newItem.value = index;\n } else {\n newItem = index;\n }\n processedDataArr.push(newItem);\n names.push(value);\n });\n } else {\n processedDataArr = dataArr;\n }\n var dimType = {\n category: 'ordinal',\n time: 'time',\n value: 'number'\n }[axisType] || 'number';\n var data = this._data = new SeriesData([{\n name: 'value',\n type: dimType\n }], this);\n data.initData(processedDataArr, names);\n };\n TimelineModel.prototype.getData = function () {\n return this._data;\n };\n /**\n * @public\n * @return {Array.} categoreis\n */\n TimelineModel.prototype.getCategories = function () {\n if (this.get('axisType') === 'category') {\n return this._names.slice();\n }\n };\n TimelineModel.type = 'timeline';\n /**\n * @protected\n */\n TimelineModel.defaultOption = {\n // zlevel: 0, // 一级层叠\n z: 4,\n show: true,\n axisType: 'time',\n realtime: true,\n left: '20%',\n top: null,\n right: '20%',\n bottom: 0,\n width: null,\n height: 40,\n padding: 5,\n controlPosition: 'left',\n autoPlay: false,\n rewind: false,\n loop: true,\n playInterval: 2000,\n currentIndex: 0,\n itemStyle: {},\n label: {\n color: '#000'\n },\n data: []\n };\n return TimelineModel;\n}(ComponentModel);\nexport default TimelineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport TimelineModel from './TimelineModel.js';\nimport { DataFormatMixin } from '../../model/mixin/dataFormat.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar SliderTimelineModel = /** @class */function (_super) {\n __extends(SliderTimelineModel, _super);\n function SliderTimelineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderTimelineModel.type;\n return _this;\n }\n SliderTimelineModel.type = 'timeline.slider';\n /**\n * @protected\n */\n SliderTimelineModel.defaultOption = inheritDefaultOption(TimelineModel.defaultOption, {\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderWidth: 0,\n orient: 'horizontal',\n inverse: false,\n tooltip: {\n trigger: 'item' // data item may also have tootip attr.\n },\n\n symbol: 'circle',\n symbolSize: 12,\n lineStyle: {\n show: true,\n width: 2,\n color: '#DAE1F5'\n },\n label: {\n position: 'auto',\n // When using number, label position is not\n // restricted by viewRect.\n // positive: right/bottom, negative: left/top\n show: true,\n interval: 'auto',\n rotate: 0,\n // formatter: null,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#A4B1D7'\n },\n itemStyle: {\n color: '#A4B1D7',\n borderWidth: 1\n },\n checkpointStyle: {\n symbol: 'circle',\n symbolSize: 15,\n color: '#316bf3',\n borderColor: '#fff',\n borderWidth: 2,\n shadowBlur: 2,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0, 0, 0, 0.3)',\n // borderColor: 'rgba(194,53,49, 0.5)',\n animation: true,\n animationDuration: 300,\n animationEasing: 'quinticInOut'\n },\n controlStyle: {\n show: true,\n showPlayBtn: true,\n showPrevBtn: true,\n showNextBtn: true,\n itemSize: 24,\n itemGap: 12,\n position: 'left',\n playIcon: 'path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z',\n stopIcon: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',\n // eslint-disable-next-line max-len\n nextIcon: 'M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z',\n // eslint-disable-next-line max-len\n prevIcon: 'M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z',\n prevBtnSize: 18,\n nextBtnSize: 18,\n color: '#A4B1D7',\n borderColor: '#A4B1D7',\n borderWidth: 1\n },\n emphasis: {\n label: {\n show: true,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#6f778d'\n },\n itemStyle: {\n color: '#316BF3'\n },\n controlStyle: {\n color: '#316BF3',\n borderColor: '#316BF3',\n borderWidth: 2\n }\n },\n progress: {\n lineStyle: {\n color: '#316BF3'\n },\n itemStyle: {\n color: '#316BF3'\n },\n label: {\n color: '#6f778d'\n }\n },\n data: []\n });\n return SliderTimelineModel;\n}(TimelineModel);\nmixin(SliderTimelineModel, DataFormatMixin.prototype);\nexport default SliderTimelineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nvar TimelineView = /** @class */function (_super) {\n __extends(TimelineView, _super);\n function TimelineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TimelineView.type;\n return _this;\n }\n TimelineView.type = 'timeline';\n return TimelineView;\n}(ComponentView);\nexport default TimelineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../../coord/Axis.js';\n/**\n * Extend axis 2d\n */\nvar TimelineAxis = /** @class */function (_super) {\n __extends(TimelineAxis, _super);\n function TimelineAxis(dim, scale, coordExtent, axisType) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n return _this;\n }\n /**\n * @override\n */\n TimelineAxis.prototype.getLabelModel = function () {\n // Force override\n return this.model.getModel('label');\n };\n /**\n * @override\n */\n TimelineAxis.prototype.isHorizontal = function () {\n return this.model.get('orient') === 'horizontal';\n };\n return TimelineAxis;\n}(Axis);\nexport default TimelineAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport * as layout from '../../util/layout.js';\nimport TimelineView from './TimelineView.js';\nimport TimelineAxis from './TimelineAxis.js';\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as numberUtil from '../../util/number.js';\nimport { merge, each, extend, isString, bind, defaults, retrieve2 } from 'zrender/lib/core/util.js';\nimport OrdinalScale from '../../scale/Ordinal.js';\nimport TimeScale from '../../scale/Time.js';\nimport IntervalScale from '../../scale/Interval.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nimport { makeInner } from '../../util/model.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { createTooltipMarkup } from '../tooltip/tooltipMarkup.js';\nvar PI = Math.PI;\nvar labelDataIndexStore = makeInner();\nvar SliderTimelineView = /** @class */function (_super) {\n __extends(SliderTimelineView, _super);\n function SliderTimelineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderTimelineView.type;\n return _this;\n }\n SliderTimelineView.prototype.init = function (ecModel, api) {\n this.api = api;\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.render = function (timelineModel, ecModel, api) {\n this.model = timelineModel;\n this.api = api;\n this.ecModel = ecModel;\n this.group.removeAll();\n if (timelineModel.get('show', true)) {\n var layoutInfo_1 = this._layout(timelineModel, api);\n var mainGroup_1 = this._createGroup('_mainGroup');\n var labelGroup = this._createGroup('_labelGroup');\n var axis_1 = this._axis = this._createAxis(layoutInfo_1, timelineModel);\n timelineModel.formatTooltip = function (dataIndex) {\n var name = axis_1.scale.getLabel({\n value: dataIndex\n });\n return createTooltipMarkup('nameValue', {\n noName: true,\n value: name\n });\n };\n each(['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'], function (name) {\n this['_render' + name](layoutInfo_1, mainGroup_1, axis_1, timelineModel);\n }, this);\n this._renderAxisLabel(layoutInfo_1, labelGroup, axis_1, timelineModel);\n this._position(layoutInfo_1, timelineModel);\n }\n this._doPlayStop();\n this._updateTicksStatus();\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.remove = function () {\n this._clearTimer();\n this.group.removeAll();\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.dispose = function () {\n this._clearTimer();\n };\n SliderTimelineView.prototype._layout = function (timelineModel, api) {\n var labelPosOpt = timelineModel.get(['label', 'position']);\n var orient = timelineModel.get('orient');\n var viewRect = getViewRect(timelineModel, api);\n var parsedLabelPos;\n // Auto label offset.\n if (labelPosOpt == null || labelPosOpt === 'auto') {\n parsedLabelPos = orient === 'horizontal' ? viewRect.y + viewRect.height / 2 < api.getHeight() / 2 ? '-' : '+' : viewRect.x + viewRect.width / 2 < api.getWidth() / 2 ? '+' : '-';\n } else if (isString(labelPosOpt)) {\n parsedLabelPos = {\n horizontal: {\n top: '-',\n bottom: '+'\n },\n vertical: {\n left: '-',\n right: '+'\n }\n }[orient][labelPosOpt];\n } else {\n // is number\n parsedLabelPos = labelPosOpt;\n }\n var labelAlignMap = {\n horizontal: 'center',\n vertical: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'left' : 'right'\n };\n var labelBaselineMap = {\n horizontal: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'top' : 'bottom',\n vertical: 'middle'\n };\n var rotationMap = {\n horizontal: 0,\n vertical: PI / 2\n };\n // Position\n var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width;\n var controlModel = timelineModel.getModel('controlStyle');\n var showControl = controlModel.get('show', true);\n var controlSize = showControl ? controlModel.get('itemSize') : 0;\n var controlGap = showControl ? controlModel.get('itemGap') : 0;\n var sizePlusGap = controlSize + controlGap;\n // Special label rotate.\n var labelRotation = timelineModel.get(['label', 'rotate']) || 0;\n labelRotation = labelRotation * PI / 180; // To radian.\n var playPosition;\n var prevBtnPosition;\n var nextBtnPosition;\n var controlPosition = controlModel.get('position', true);\n var showPlayBtn = showControl && controlModel.get('showPlayBtn', true);\n var showPrevBtn = showControl && controlModel.get('showPrevBtn', true);\n var showNextBtn = showControl && controlModel.get('showNextBtn', true);\n var xLeft = 0;\n var xRight = mainLength;\n // position[0] means left, position[1] means middle.\n if (controlPosition === 'left' || controlPosition === 'bottom') {\n showPlayBtn && (playPosition = [0, 0], xLeft += sizePlusGap);\n showPrevBtn && (prevBtnPosition = [xLeft, 0], xLeft += sizePlusGap);\n showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n } else {\n // 'top' 'right'\n showPlayBtn && (playPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n showPrevBtn && (prevBtnPosition = [0, 0], xLeft += sizePlusGap);\n showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n }\n var axisExtent = [xLeft, xRight];\n if (timelineModel.get('inverse')) {\n axisExtent.reverse();\n }\n return {\n viewRect: viewRect,\n mainLength: mainLength,\n orient: orient,\n rotation: rotationMap[orient],\n labelRotation: labelRotation,\n labelPosOpt: parsedLabelPos,\n labelAlign: timelineModel.get(['label', 'align']) || labelAlignMap[orient],\n labelBaseline: timelineModel.get(['label', 'verticalAlign']) || timelineModel.get(['label', 'baseline']) || labelBaselineMap[orient],\n // Based on mainGroup.\n playPosition: playPosition,\n prevBtnPosition: prevBtnPosition,\n nextBtnPosition: nextBtnPosition,\n axisExtent: axisExtent,\n controlSize: controlSize,\n controlGap: controlGap\n };\n };\n SliderTimelineView.prototype._position = function (layoutInfo, timelineModel) {\n // Position is be called finally, because bounding rect is needed for\n // adapt content to fill viewRect (auto adapt offset).\n // Timeline may be not all in the viewRect when 'offset' is specified\n // as a number, because it is more appropriate that label aligns at\n // 'offset' but not the other edge defined by viewRect.\n var mainGroup = this._mainGroup;\n var labelGroup = this._labelGroup;\n var viewRect = layoutInfo.viewRect;\n if (layoutInfo.orient === 'vertical') {\n // transform to horizontal, inverse rotate by left-top point.\n var m = matrix.create();\n var rotateOriginX = viewRect.x;\n var rotateOriginY = viewRect.y + viewRect.height;\n matrix.translate(m, m, [-rotateOriginX, -rotateOriginY]);\n matrix.rotate(m, m, -PI / 2);\n matrix.translate(m, m, [rotateOriginX, rotateOriginY]);\n viewRect = viewRect.clone();\n viewRect.applyTransform(m);\n }\n var viewBound = getBound(viewRect);\n var mainBound = getBound(mainGroup.getBoundingRect());\n var labelBound = getBound(labelGroup.getBoundingRect());\n var mainPosition = [mainGroup.x, mainGroup.y];\n var labelsPosition = [labelGroup.x, labelGroup.y];\n labelsPosition[0] = mainPosition[0] = viewBound[0][0];\n var labelPosOpt = layoutInfo.labelPosOpt;\n if (labelPosOpt == null || isString(labelPosOpt)) {\n // '+' or '-'\n var mainBoundIdx = labelPosOpt === '+' ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx);\n } else {\n var mainBoundIdx = labelPosOpt >= 0 ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n labelsPosition[1] = mainPosition[1] + labelPosOpt;\n }\n mainGroup.setPosition(mainPosition);\n labelGroup.setPosition(labelsPosition);\n mainGroup.rotation = labelGroup.rotation = layoutInfo.rotation;\n setOrigin(mainGroup);\n setOrigin(labelGroup);\n function setOrigin(targetGroup) {\n targetGroup.originX = viewBound[0][0] - targetGroup.x;\n targetGroup.originY = viewBound[1][0] - targetGroup.y;\n }\n function getBound(rect) {\n // [[xmin, xmax], [ymin, ymax]]\n return [[rect.x, rect.x + rect.width], [rect.y, rect.y + rect.height]];\n }\n function toBound(fromPos, from, to, dimIdx, boundIdx) {\n fromPos[dimIdx] += to[dimIdx][boundIdx] - from[dimIdx][boundIdx];\n }\n };\n SliderTimelineView.prototype._createAxis = function (layoutInfo, timelineModel) {\n var data = timelineModel.getData();\n var axisType = timelineModel.get('axisType');\n var scale = createScaleByModel(timelineModel, axisType);\n // Customize scale. The `tickValue` is `dataIndex`.\n scale.getTicks = function () {\n return data.mapArray(['value'], function (value) {\n return {\n value: value\n };\n });\n };\n var dataExtent = data.getDataExtent('value');\n scale.setExtent(dataExtent[0], dataExtent[1]);\n scale.calcNiceTicks();\n var axis = new TimelineAxis('value', scale, layoutInfo.axisExtent, axisType);\n axis.model = timelineModel;\n return axis;\n };\n SliderTimelineView.prototype._createGroup = function (key) {\n var newGroup = this[key] = new graphic.Group();\n this.group.add(newGroup);\n return newGroup;\n };\n SliderTimelineView.prototype._renderAxisLine = function (layoutInfo, group, axis, timelineModel) {\n var axisExtent = axis.getExtent();\n if (!timelineModel.get(['lineStyle', 'show'])) {\n return;\n }\n var line = new graphic.Line({\n shape: {\n x1: axisExtent[0],\n y1: 0,\n x2: axisExtent[1],\n y2: 0\n },\n style: extend({\n lineCap: 'round'\n }, timelineModel.getModel('lineStyle').getLineStyle()),\n silent: true,\n z2: 1\n });\n group.add(line);\n var progressLine = this._progressLine = new graphic.Line({\n shape: {\n x1: axisExtent[0],\n x2: this._currentPointer ? this._currentPointer.x : axisExtent[0],\n y1: 0,\n y2: 0\n },\n style: defaults({\n lineCap: 'round',\n lineWidth: line.style.lineWidth\n }, timelineModel.getModel(['progress', 'lineStyle']).getLineStyle()),\n silent: true,\n z2: 1\n });\n group.add(progressLine);\n };\n SliderTimelineView.prototype._renderAxisTick = function (layoutInfo, group, axis, timelineModel) {\n var _this = this;\n var data = timelineModel.getData();\n // Show all ticks, despite ignoring strategy.\n var ticks = axis.scale.getTicks();\n this._tickSymbols = [];\n // The value is dataIndex, see the customized scale.\n each(ticks, function (tick) {\n var tickCoord = axis.dataToCoord(tick.value);\n var itemModel = data.getItemModel(tick.value);\n var itemStyleModel = itemModel.getModel('itemStyle');\n var hoverStyleModel = itemModel.getModel(['emphasis', 'itemStyle']);\n var progressStyleModel = itemModel.getModel(['progress', 'itemStyle']);\n var symbolOpt = {\n x: tickCoord,\n y: 0,\n onclick: bind(_this._changeTimeline, _this, tick.value)\n };\n var el = giveSymbol(itemModel, itemStyleModel, group, symbolOpt);\n el.ensureState('emphasis').style = hoverStyleModel.getItemStyle();\n el.ensureState('progress').style = progressStyleModel.getItemStyle();\n enableHoverEmphasis(el);\n var ecData = getECData(el);\n if (itemModel.get('tooltip')) {\n ecData.dataIndex = tick.value;\n ecData.dataModel = timelineModel;\n } else {\n ecData.dataIndex = ecData.dataModel = null;\n }\n _this._tickSymbols.push(el);\n });\n };\n SliderTimelineView.prototype._renderAxisLabel = function (layoutInfo, group, axis, timelineModel) {\n var _this = this;\n var labelModel = axis.getLabelModel();\n if (!labelModel.get('show')) {\n return;\n }\n var data = timelineModel.getData();\n var labels = axis.getViewLabels();\n this._tickLabels = [];\n each(labels, function (labelItem) {\n // The tickValue is dataIndex, see the customized scale.\n var dataIndex = labelItem.tickValue;\n var itemModel = data.getItemModel(dataIndex);\n var normalLabelModel = itemModel.getModel('label');\n var hoverLabelModel = itemModel.getModel(['emphasis', 'label']);\n var progressLabelModel = itemModel.getModel(['progress', 'label']);\n var tickCoord = axis.dataToCoord(labelItem.tickValue);\n var textEl = new graphic.Text({\n x: tickCoord,\n y: 0,\n rotation: layoutInfo.labelRotation - layoutInfo.rotation,\n onclick: bind(_this._changeTimeline, _this, dataIndex),\n silent: false,\n style: createTextStyle(normalLabelModel, {\n text: labelItem.formattedLabel,\n align: layoutInfo.labelAlign,\n verticalAlign: layoutInfo.labelBaseline\n })\n });\n textEl.ensureState('emphasis').style = createTextStyle(hoverLabelModel);\n textEl.ensureState('progress').style = createTextStyle(progressLabelModel);\n group.add(textEl);\n enableHoverEmphasis(textEl);\n labelDataIndexStore(textEl).dataIndex = dataIndex;\n _this._tickLabels.push(textEl);\n });\n };\n SliderTimelineView.prototype._renderControl = function (layoutInfo, group, axis, timelineModel) {\n var controlSize = layoutInfo.controlSize;\n var rotation = layoutInfo.rotation;\n var itemStyle = timelineModel.getModel('controlStyle').getItemStyle();\n var hoverStyle = timelineModel.getModel(['emphasis', 'controlStyle']).getItemStyle();\n var playState = timelineModel.getPlayState();\n var inverse = timelineModel.get('inverse', true);\n makeBtn(layoutInfo.nextBtnPosition, 'next', bind(this._changeTimeline, this, inverse ? '-' : '+'));\n makeBtn(layoutInfo.prevBtnPosition, 'prev', bind(this._changeTimeline, this, inverse ? '+' : '-'));\n makeBtn(layoutInfo.playPosition, playState ? 'stop' : 'play', bind(this._handlePlayClick, this, !playState), true);\n function makeBtn(position, iconName, onclick, willRotate) {\n if (!position) {\n return;\n }\n var iconSize = parsePercent(retrieve2(timelineModel.get(['controlStyle', iconName + 'BtnSize']), controlSize), controlSize);\n var rect = [0, -iconSize / 2, iconSize, iconSize];\n var btn = makeControlIcon(timelineModel, iconName + 'Icon', rect, {\n x: position[0],\n y: position[1],\n originX: controlSize / 2,\n originY: 0,\n rotation: willRotate ? -rotation : 0,\n rectHover: true,\n style: itemStyle,\n onclick: onclick\n });\n btn.ensureState('emphasis').style = hoverStyle;\n group.add(btn);\n enableHoverEmphasis(btn);\n }\n };\n SliderTimelineView.prototype._renderCurrentPointer = function (layoutInfo, group, axis, timelineModel) {\n var data = timelineModel.getData();\n var currentIndex = timelineModel.getCurrentIndex();\n var pointerModel = data.getItemModel(currentIndex).getModel('checkpointStyle');\n var me = this;\n var callback = {\n onCreate: function (pointer) {\n pointer.draggable = true;\n pointer.drift = bind(me._handlePointerDrag, me);\n pointer.ondragend = bind(me._handlePointerDragend, me);\n pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel, true);\n },\n onUpdate: function (pointer) {\n pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel);\n }\n };\n // Reuse when exists, for animation and drag.\n this._currentPointer = giveSymbol(pointerModel, pointerModel, this._mainGroup, {}, this._currentPointer, callback);\n };\n SliderTimelineView.prototype._handlePlayClick = function (nextState) {\n this._clearTimer();\n this.api.dispatchAction({\n type: 'timelinePlayChange',\n playState: nextState,\n from: this.uid\n });\n };\n SliderTimelineView.prototype._handlePointerDrag = function (dx, dy, e) {\n this._clearTimer();\n this._pointerChangeTimeline([e.offsetX, e.offsetY]);\n };\n SliderTimelineView.prototype._handlePointerDragend = function (e) {\n this._pointerChangeTimeline([e.offsetX, e.offsetY], true);\n };\n SliderTimelineView.prototype._pointerChangeTimeline = function (mousePos, trigger) {\n var toCoord = this._toAxisCoord(mousePos)[0];\n var axis = this._axis;\n var axisExtent = numberUtil.asc(axis.getExtent().slice());\n toCoord > axisExtent[1] && (toCoord = axisExtent[1]);\n toCoord < axisExtent[0] && (toCoord = axisExtent[0]);\n this._currentPointer.x = toCoord;\n this._currentPointer.markRedraw();\n var progressLine = this._progressLine;\n if (progressLine) {\n progressLine.shape.x2 = toCoord;\n progressLine.dirty();\n }\n var targetDataIndex = this._findNearestTick(toCoord);\n var timelineModel = this.model;\n if (trigger || targetDataIndex !== timelineModel.getCurrentIndex() && timelineModel.get('realtime')) {\n this._changeTimeline(targetDataIndex);\n }\n };\n SliderTimelineView.prototype._doPlayStop = function () {\n var _this = this;\n this._clearTimer();\n if (this.model.getPlayState()) {\n this._timer = setTimeout(function () {\n // Do not cache\n var timelineModel = _this.model;\n _this._changeTimeline(timelineModel.getCurrentIndex() + (timelineModel.get('rewind', true) ? -1 : 1));\n }, this.model.get('playInterval'));\n }\n };\n SliderTimelineView.prototype._toAxisCoord = function (vertex) {\n var trans = this._mainGroup.getLocalTransform();\n return graphic.applyTransform(vertex, trans, true);\n };\n SliderTimelineView.prototype._findNearestTick = function (axisCoord) {\n var data = this.model.getData();\n var dist = Infinity;\n var targetDataIndex;\n var axis = this._axis;\n data.each(['value'], function (value, dataIndex) {\n var coord = axis.dataToCoord(value);\n var d = Math.abs(coord - axisCoord);\n if (d < dist) {\n dist = d;\n targetDataIndex = dataIndex;\n }\n });\n return targetDataIndex;\n };\n SliderTimelineView.prototype._clearTimer = function () {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n };\n SliderTimelineView.prototype._changeTimeline = function (nextIndex) {\n var currentIndex = this.model.getCurrentIndex();\n if (nextIndex === '+') {\n nextIndex = currentIndex + 1;\n } else if (nextIndex === '-') {\n nextIndex = currentIndex - 1;\n }\n this.api.dispatchAction({\n type: 'timelineChange',\n currentIndex: nextIndex,\n from: this.uid\n });\n };\n SliderTimelineView.prototype._updateTicksStatus = function () {\n var currentIndex = this.model.getCurrentIndex();\n var tickSymbols = this._tickSymbols;\n var tickLabels = this._tickLabels;\n if (tickSymbols) {\n for (var i = 0; i < tickSymbols.length; i++) {\n tickSymbols && tickSymbols[i] && tickSymbols[i].toggleState('progress', i < currentIndex);\n }\n }\n if (tickLabels) {\n for (var i = 0; i < tickLabels.length; i++) {\n tickLabels && tickLabels[i] && tickLabels[i].toggleState('progress', labelDataIndexStore(tickLabels[i]).dataIndex <= currentIndex);\n }\n }\n };\n SliderTimelineView.type = 'timeline.slider';\n return SliderTimelineView;\n}(TimelineView);\nfunction createScaleByModel(model, axisType) {\n axisType = axisType || model.get('type');\n if (axisType) {\n switch (axisType) {\n // Buildin scale\n case 'category':\n return new OrdinalScale({\n ordinalMeta: model.getCategories(),\n extent: [Infinity, -Infinity]\n });\n case 'time':\n return new TimeScale({\n locale: model.ecModel.getLocaleModel(),\n useUTC: model.ecModel.get('useUTC')\n });\n default:\n // default to be value\n return new IntervalScale();\n }\n }\n}\nfunction getViewRect(model, api) {\n return layout.getLayoutRect(model.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n }, model.get('padding'));\n}\nfunction makeControlIcon(timelineModel, objPath, rect, opts) {\n var style = opts.style;\n var icon = graphic.createIcon(timelineModel.get(['controlStyle', objPath]), opts || {}, new BoundingRect(rect[0], rect[1], rect[2], rect[3]));\n // TODO createIcon won't use style in opt.\n if (style) {\n icon.setStyle(style);\n }\n return icon;\n}\n/**\n * Create symbol or update symbol\n * opt: basic position and event handlers\n */\nfunction giveSymbol(hostModel, itemStyleModel, group, opt, symbol, callback) {\n var color = itemStyleModel.get('color');\n if (!symbol) {\n var symbolType = hostModel.get('symbol');\n symbol = createSymbol(symbolType, -1, -1, 2, 2, color);\n symbol.setStyle('strokeNoScale', true);\n group.add(symbol);\n callback && callback.onCreate(symbol);\n } else {\n symbol.setColor(color);\n group.add(symbol); // Group may be new, also need to add.\n callback && callback.onUpdate(symbol);\n }\n // Style\n var itemStyle = itemStyleModel.getItemStyle(['color']);\n symbol.setStyle(itemStyle);\n // Transform and events.\n opt = merge({\n rectHover: true,\n z2: 100\n }, opt, true);\n var symbolSize = normalizeSymbolSize(hostModel.get('symbolSize'));\n opt.scaleX = symbolSize[0] / 2;\n opt.scaleY = symbolSize[1] / 2;\n var symbolOffset = normalizeSymbolOffset(hostModel.get('symbolOffset'), symbolSize);\n if (symbolOffset) {\n opt.x = (opt.x || 0) + symbolOffset[0];\n opt.y = (opt.y || 0) + symbolOffset[1];\n }\n var symbolRotate = hostModel.get('symbolRotate');\n opt.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n symbol.attr(opt);\n // FIXME\n // (1) When symbol.style.strokeNoScale is true and updateTransform is not performed,\n // getBoundingRect will return wrong result.\n // (This is supposed to be resolved in zrender, but it is a little difficult to\n // leverage performance and auto updateTransform)\n // (2) All of ancesters of symbol do not scale, so we can just updateTransform symbol.\n symbol.updateTransform();\n return symbol;\n}\nfunction pointerMoveTo(pointer, progressLine, dataIndex, axis, timelineModel, noAnimation) {\n if (pointer.dragging) {\n return;\n }\n var pointerModel = timelineModel.getModel('checkpointStyle');\n var toCoord = axis.dataToCoord(timelineModel.getData().get('value', dataIndex));\n if (noAnimation || !pointerModel.get('animation', true)) {\n pointer.attr({\n x: toCoord,\n y: 0\n });\n progressLine && progressLine.attr({\n shape: {\n x2: toCoord\n }\n });\n } else {\n var animationCfg = {\n duration: pointerModel.get('animationDuration', true),\n easing: pointerModel.get('animationEasing', true)\n };\n pointer.stopAnimation(null, true);\n pointer.animateTo({\n x: toCoord,\n y: 0\n }, animationCfg);\n progressLine && progressLine.animateTo({\n shape: {\n x2: toCoord\n }\n }, animationCfg);\n }\n}\nexport default SliderTimelineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { defaults } from 'zrender/lib/core/util.js';\nexport function installTimelineAction(registers) {\n registers.registerAction({\n type: 'timelineChange',\n event: 'timelineChanged',\n update: 'prepareAndUpdate'\n }, function (payload, ecModel, api) {\n var timelineModel = ecModel.getComponent('timeline');\n if (timelineModel && payload.currentIndex != null) {\n timelineModel.setCurrentIndex(payload.currentIndex);\n if (!timelineModel.get('loop', true) && timelineModel.isIndexMax() && timelineModel.getPlayState()) {\n timelineModel.setPlayState(false);\n // The timeline has played to the end, trigger event\n api.dispatchAction({\n type: 'timelinePlayChange',\n playState: false,\n from: payload.from\n });\n }\n }\n // Set normalized currentIndex to payload.\n ecModel.resetOption('timeline', {\n replaceMerge: timelineModel.get('replaceMerge', true)\n });\n return defaults({\n currentIndex: timelineModel.option.currentIndex\n }, payload);\n });\n registers.registerAction({\n type: 'timelinePlayChange',\n event: 'timelinePlayChanged',\n update: 'update'\n }, function (payload, ecModel) {\n var timelineModel = ecModel.getComponent('timeline');\n if (timelineModel && payload.playState != null) {\n timelineModel.setPlayState(payload.playState);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function timelinePreprocessor(option) {\n var timelineOpt = option && option.timeline;\n if (!zrUtil.isArray(timelineOpt)) {\n timelineOpt = timelineOpt ? [timelineOpt] : [];\n }\n zrUtil.each(timelineOpt, function (opt) {\n if (!opt) {\n return;\n }\n compatibleEC2(opt);\n });\n}\nfunction compatibleEC2(opt) {\n var type = opt.type;\n var ec2Types = {\n 'number': 'value',\n 'time': 'time'\n };\n // Compatible with ec2\n if (ec2Types[type]) {\n opt.axisType = ec2Types[type];\n delete opt.type;\n }\n transferItem(opt);\n if (has(opt, 'controlPosition')) {\n var controlStyle = opt.controlStyle || (opt.controlStyle = {});\n if (!has(controlStyle, 'position')) {\n controlStyle.position = opt.controlPosition;\n }\n if (controlStyle.position === 'none' && !has(controlStyle, 'show')) {\n controlStyle.show = false;\n delete controlStyle.position;\n }\n delete opt.controlPosition;\n }\n zrUtil.each(opt.data || [], function (dataItem) {\n if (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem)) {\n if (!has(dataItem, 'value') && has(dataItem, 'name')) {\n // In ec2, using name as value.\n dataItem.value = dataItem.name;\n }\n transferItem(dataItem);\n }\n });\n}\nfunction transferItem(opt) {\n var itemStyle = opt.itemStyle || (opt.itemStyle = {});\n var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {});\n // Transfer label out\n var label = opt.label || opt.label || {};\n var labelNormal = label.normal || (label.normal = {});\n var excludeLabelAttr = {\n normal: 1,\n emphasis: 1\n };\n zrUtil.each(label, function (value, name) {\n if (!excludeLabelAttr[name] && !has(labelNormal, name)) {\n labelNormal[name] = value;\n }\n });\n if (itemStyleEmphasis.label && !has(label, 'emphasis')) {\n label.emphasis = itemStyleEmphasis.label;\n delete itemStyleEmphasis.label;\n }\n}\nfunction has(obj, attr) {\n return obj.hasOwnProperty(attr);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport SliderTimelineModel from './SliderTimelineModel.js';\nimport SliderTimelineView from './SliderTimelineView.js';\nimport { installTimelineAction } from './timelineAction.js';\nimport preprocessor from './preprocessor.js';\nexport function install(registers) {\n registers.registerComponentModel(SliderTimelineModel);\n registers.registerComponentView(SliderTimelineView);\n registers.registerSubTypeDefaulter('timeline', function () {\n // Only slider now.\n return 'slider';\n });\n installTimelineAction(registers);\n registers.registerPreprocessor(preprocessor);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray } from 'zrender/lib/core/util.js';\nexport default function checkMarkerInSeries(seriesOpts, markerType) {\n if (!seriesOpts) {\n return false;\n }\n var seriesOptArr = isArray(seriesOpts) ? seriesOpts : [seriesOpts];\n for (var idx = 0; idx < seriesOptArr.length; idx++) {\n if (seriesOptArr[idx] && seriesOptArr[idx][markerType]) {\n return true;\n }\n }\n return false;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { DataFormatMixin } from '../../model/mixin/dataFormat.js';\nimport ComponentModel from '../../model/Component.js';\nimport { makeInner, defaultEmphasis } from '../../util/model.js';\nimport { createTooltipMarkup } from '../tooltip/tooltipMarkup.js';\nfunction fillLabel(opt) {\n defaultEmphasis(opt, 'label', ['show']);\n}\n// { [componentType]: MarkerModel }\nvar inner = makeInner();\nvar MarkerModel = /** @class */function (_super) {\n __extends(MarkerModel, _super);\n function MarkerModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkerModel.type;\n /**\n * If marker model is created by self from series\n */\n _this.createdBySelf = false;\n return _this;\n }\n /**\n * @overrite\n */\n MarkerModel.prototype.init = function (option, parentModel, ecModel) {\n if (process.env.NODE_ENV !== 'production') {\n if (this.type === 'marker') {\n throw new Error('Marker component is abstract component. Use markLine, markPoint, markArea instead.');\n }\n }\n this.mergeDefaultAndTheme(option, ecModel);\n this._mergeOption(option, ecModel, false, true);\n };\n MarkerModel.prototype.isAnimationEnabled = function () {\n if (env.node) {\n return false;\n }\n var hostSeries = this.__hostSeries;\n return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled();\n };\n /**\n * @overrite\n */\n MarkerModel.prototype.mergeOption = function (newOpt, ecModel) {\n this._mergeOption(newOpt, ecModel, false, false);\n };\n MarkerModel.prototype._mergeOption = function (newOpt, ecModel, createdBySelf, isInit) {\n var componentType = this.mainType;\n if (!createdBySelf) {\n ecModel.eachSeries(function (seriesModel) {\n // mainType can be markPoint, markLine, markArea\n var markerOpt = seriesModel.get(this.mainType, true);\n var markerModel = inner(seriesModel)[componentType];\n if (!markerOpt || !markerOpt.data) {\n inner(seriesModel)[componentType] = null;\n return;\n }\n if (!markerModel) {\n if (isInit) {\n // Default label emphasis `position` and `show`\n fillLabel(markerOpt);\n }\n zrUtil.each(markerOpt.data, function (item) {\n // FIXME Overwrite fillLabel method ?\n if (item instanceof Array) {\n fillLabel(item[0]);\n fillLabel(item[1]);\n } else {\n fillLabel(item);\n }\n });\n markerModel = this.createMarkerModelFromSeries(markerOpt, this, ecModel);\n // markerModel = new ImplementedMarkerModel(\n // markerOpt, this, ecModel\n // );\n zrUtil.extend(markerModel, {\n mainType: this.mainType,\n // Use the same series index and name\n seriesIndex: seriesModel.seriesIndex,\n name: seriesModel.name,\n createdBySelf: true\n });\n markerModel.__hostSeries = seriesModel;\n } else {\n markerModel._mergeOption(markerOpt, ecModel, true);\n }\n inner(seriesModel)[componentType] = markerModel;\n }, this);\n }\n };\n MarkerModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var itemName = data.getName(dataIndex);\n return createTooltipMarkup('section', {\n header: this.name,\n blocks: [createTooltipMarkup('nameValue', {\n name: itemName,\n value: value,\n noName: !itemName,\n noValue: value == null\n })]\n });\n };\n MarkerModel.prototype.getData = function () {\n return this._data;\n };\n MarkerModel.prototype.setData = function (data) {\n this._data = data;\n };\n MarkerModel.prototype.getDataParams = function (dataIndex, dataType) {\n var params = DataFormatMixin.prototype.getDataParams.call(this, dataIndex, dataType);\n var hostSeries = this.__hostSeries;\n if (hostSeries) {\n params.seriesId = hostSeries.id;\n params.seriesName = hostSeries.name;\n params.seriesType = hostSeries.subType;\n }\n return params;\n };\n MarkerModel.getMarkerModelFromSeries = function (seriesModel,\n // Support three types of markers. Strict check.\n componentType) {\n return inner(seriesModel)[componentType];\n };\n MarkerModel.type = 'marker';\n MarkerModel.dependencies = ['series', 'grid', 'polar', 'geo'];\n return MarkerModel;\n}(ComponentModel);\nzrUtil.mixin(MarkerModel, DataFormatMixin.prototype);\nexport default MarkerModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkPointModel = /** @class */function (_super) {\n __extends(MarkPointModel, _super);\n function MarkPointModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkPointModel.type;\n return _this;\n }\n MarkPointModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkPointModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkPointModel.type = 'markPoint';\n MarkPointModel.defaultOption = {\n // zlevel: 0,\n z: 5,\n symbol: 'pin',\n symbolSize: 50,\n // symbolRotate: 0,\n // symbolOffset: [0, 0]\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'inside'\n },\n itemStyle: {\n borderWidth: 2\n },\n emphasis: {\n label: {\n show: true\n }\n }\n };\n return MarkPointModel;\n}(MarkerModel);\nexport default MarkPointModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as numberUtil from '../../util/number.js';\nimport { isDimensionStacked } from '../../data/helper/dataStackHelper.js';\nimport { indexOf, curry, clone, isArray } from 'zrender/lib/core/util.js';\nimport { parseDataValue } from '../../data/helper/dataValueHelper.js';\nfunction hasXOrY(item) {\n return !(isNaN(parseFloat(item.x)) && isNaN(parseFloat(item.y)));\n}\nfunction hasXAndY(item) {\n return !isNaN(parseFloat(item.x)) && !isNaN(parseFloat(item.y));\n}\nfunction markerTypeCalculatorWithExtent(markerType, data, otherDataDim, targetDataDim, otherCoordIndex, targetCoordIndex) {\n var coordArr = [];\n var stacked = isDimensionStacked(data, targetDataDim /* , otherDataDim */);\n var calcDataDim = stacked ? data.getCalculationInfo('stackResultDimension') : targetDataDim;\n var value = numCalculate(data, calcDataDim, markerType);\n var dataIndex = data.indicesOfNearest(calcDataDim, value)[0];\n coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex);\n coordArr[targetCoordIndex] = data.get(calcDataDim, dataIndex);\n var coordArrValue = data.get(targetDataDim, dataIndex);\n // Make it simple, do not visit all stacked value to count precision.\n var precision = numberUtil.getPrecision(data.get(targetDataDim, dataIndex));\n precision = Math.min(precision, 20);\n if (precision >= 0) {\n coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision);\n }\n return [coordArr, coordArrValue];\n}\n// TODO Specified percent\nvar markerTypeCalculator = {\n min: curry(markerTypeCalculatorWithExtent, 'min'),\n max: curry(markerTypeCalculatorWithExtent, 'max'),\n average: curry(markerTypeCalculatorWithExtent, 'average'),\n median: curry(markerTypeCalculatorWithExtent, 'median')\n};\n/**\n * Transform markPoint data item to format used in List by do the following\n * 1. Calculate statistic like `max`, `min`, `average`\n * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array\n */\nexport function dataTransform(seriesModel, item) {\n if (!item) {\n return;\n }\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var dims = coordSys && coordSys.dimensions;\n // 1. If not specify the position with pixel directly\n // 2. If `coord` is not a data array. Which uses `xAxis`,\n // `yAxis` to specify the coord on each dimension\n // parseFloat first because item.x and item.y can be percent string like '20%'\n if (!hasXAndY(item) && !isArray(item.coord) && isArray(dims)) {\n var axisInfo = getAxisInfo(item, data, coordSys, seriesModel);\n // Clone the option\n // Transform the properties xAxis, yAxis, radiusAxis, angleAxis, geoCoord to value\n item = clone(item);\n if (item.type && markerTypeCalculator[item.type] && axisInfo.baseAxis && axisInfo.valueAxis) {\n var otherCoordIndex = indexOf(dims, axisInfo.baseAxis.dim);\n var targetCoordIndex = indexOf(dims, axisInfo.valueAxis.dim);\n var coordInfo = markerTypeCalculator[item.type](data, axisInfo.baseDataDim, axisInfo.valueDataDim, otherCoordIndex, targetCoordIndex);\n item.coord = coordInfo[0];\n // Force to use the value of calculated value.\n // let item use the value without stack.\n item.value = coordInfo[1];\n } else {\n // FIXME Only has one of xAxis and yAxis.\n item.coord = [item.xAxis != null ? item.xAxis : item.radiusAxis, item.yAxis != null ? item.yAxis : item.angleAxis];\n }\n }\n // x y is provided\n if (item.coord == null || !isArray(dims)) {\n item.coord = [];\n } else {\n // Each coord support max, min, average\n var coord = item.coord;\n for (var i = 0; i < 2; i++) {\n if (markerTypeCalculator[coord[i]]) {\n coord[i] = numCalculate(data, data.mapDimension(dims[i]), coord[i]);\n }\n }\n }\n return item;\n}\nexport function getAxisInfo(item, data, coordSys, seriesModel) {\n var ret = {};\n if (item.valueIndex != null || item.valueDim != null) {\n ret.valueDataDim = item.valueIndex != null ? data.getDimension(item.valueIndex) : item.valueDim;\n ret.valueAxis = coordSys.getAxis(dataDimToCoordDim(seriesModel, ret.valueDataDim));\n ret.baseAxis = coordSys.getOtherAxis(ret.valueAxis);\n ret.baseDataDim = data.mapDimension(ret.baseAxis.dim);\n } else {\n ret.baseAxis = seriesModel.getBaseAxis();\n ret.valueAxis = coordSys.getOtherAxis(ret.baseAxis);\n ret.baseDataDim = data.mapDimension(ret.baseAxis.dim);\n ret.valueDataDim = data.mapDimension(ret.valueAxis.dim);\n }\n return ret;\n}\nfunction dataDimToCoordDim(seriesModel, dataDim) {\n var dimItem = seriesModel.getData().getDimensionInfo(dataDim);\n return dimItem && dimItem.coordDim;\n}\n/**\n * Filter data which is out of coordinateSystem range\n * [dataFilter description]\n */\nexport function dataFilter(\n// Currently only polar and cartesian has containData.\ncoordSys, item) {\n // Always return true if there is no coordSys\n return coordSys && coordSys.containData && item.coord && !hasXOrY(item) ? coordSys.containData(item.coord) : true;\n}\nexport function zoneFilter(\n// Currently only polar and cartesian has containData.\ncoordSys, item1, item2) {\n // Always return true if there is no coordSys\n return coordSys && coordSys.containZone && item1.coord && item2.coord && !hasXOrY(item1) && !hasXOrY(item2) ? coordSys.containZone(item1.coord, item2.coord) : true;\n}\nexport function createMarkerDimValueGetter(inCoordSys, dims) {\n return inCoordSys ? function (item, dimName, dataIndex, dimIndex) {\n var rawVal = dimIndex < 2\n // x, y, radius, angle\n ? item.coord && item.coord[dimIndex] : item.value;\n return parseDataValue(rawVal, dims[dimIndex]);\n } : function (item, dimName, dataIndex, dimIndex) {\n return parseDataValue(item.value, dims[dimIndex]);\n };\n}\nexport function numCalculate(data, valueDataDim, type) {\n if (type === 'average') {\n var sum_1 = 0;\n var count_1 = 0;\n data.each(valueDataDim, function (val, idx) {\n if (!isNaN(val)) {\n sum_1 += val;\n count_1++;\n }\n });\n return sum_1 / count_1;\n } else if (type === 'median') {\n return data.getMedian(valueDataDim);\n } else {\n // max & min\n return data.getDataExtent(valueDataDim)[type === 'max' ? 1 : 0];\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport { createHashMap, each } from 'zrender/lib/core/util.js';\nimport MarkerModel from './MarkerModel.js';\nimport { makeInner } from '../../util/model.js';\nimport { enterBlur, leaveBlur } from '../../util/states.js';\nvar inner = makeInner();\nvar MarkerView = /** @class */function (_super) {\n __extends(MarkerView, _super);\n function MarkerView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkerView.type;\n return _this;\n }\n MarkerView.prototype.init = function () {\n this.markerGroupMap = createHashMap();\n };\n MarkerView.prototype.render = function (markerModel, ecModel, api) {\n var _this = this;\n var markerGroupMap = this.markerGroupMap;\n markerGroupMap.each(function (item) {\n inner(item).keep = false;\n });\n ecModel.eachSeries(function (seriesModel) {\n var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type);\n markerModel && _this.renderSeries(seriesModel, markerModel, ecModel, api);\n });\n markerGroupMap.each(function (item) {\n !inner(item).keep && _this.group.remove(item.group);\n });\n };\n MarkerView.prototype.markKeep = function (drawGroup) {\n inner(drawGroup).keep = true;\n };\n MarkerView.prototype.toggleBlurSeries = function (seriesModelList, isBlur) {\n var _this = this;\n each(seriesModelList, function (seriesModel) {\n var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type);\n if (markerModel) {\n var data = markerModel.getData();\n data.eachItemGraphicEl(function (el) {\n if (el) {\n isBlur ? enterBlur(el) : leaveBlur(el);\n }\n });\n }\n });\n };\n MarkerView.type = 'marker';\n return MarkerView;\n}(ComponentView);\nexport default MarkerView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../../chart/helper/SymbolDraw.js';\nimport * as numberUtil from '../../util/number.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport * as markerHelper from './markerHelper.js';\nimport MarkerView from './MarkerView.js';\nimport MarkerModel from './MarkerModel.js';\nimport { isFunction, map, filter, curry, extend } from 'zrender/lib/core/util.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nfunction updateMarkerLayout(mpData, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n mpData.each(function (idx) {\n var itemModel = mpData.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n }\n // Chart like bar may have there own marker positioning logic\n else if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(mpData.getValues(mpData.dimensions, idx));\n } else if (coordSys) {\n var x = mpData.get(coordSys.dimensions[0], idx);\n var y = mpData.get(coordSys.dimensions[1], idx);\n point = coordSys.dataToPoint([x, y]);\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n mpData.setItemLayout(idx, point);\n });\n}\nvar MarkPointView = /** @class */function (_super) {\n __extends(MarkPointView, _super);\n function MarkPointView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkPointView.type;\n return _this;\n }\n MarkPointView.prototype.updateTransform = function (markPointModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var mpModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markPoint');\n if (mpModel) {\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n this.markerGroupMap.get(seriesModel.id).updateLayout();\n }\n }, this);\n };\n MarkPointView.prototype.renderSeries = function (seriesModel, mpModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var symbolDrawMap = this.markerGroupMap;\n var symbolDraw = symbolDrawMap.get(seriesId) || symbolDrawMap.set(seriesId, new SymbolDraw());\n var mpData = createData(coordSys, seriesModel, mpModel);\n // FIXME\n mpModel.setData(mpData);\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n mpData.each(function (idx) {\n var itemModel = mpData.getItemModel(idx);\n var symbol = itemModel.getShallow('symbol');\n var symbolSize = itemModel.getShallow('symbolSize');\n var symbolRotate = itemModel.getShallow('symbolRotate');\n var symbolOffset = itemModel.getShallow('symbolOffset');\n var symbolKeepAspect = itemModel.getShallow('symbolKeepAspect');\n // TODO: refactor needed: single data item should not support callback function\n if (isFunction(symbol) || isFunction(symbolSize) || isFunction(symbolRotate) || isFunction(symbolOffset)) {\n var rawIdx = mpModel.getRawValue(idx);\n var dataParams = mpModel.getDataParams(idx);\n if (isFunction(symbol)) {\n symbol = symbol(rawIdx, dataParams);\n }\n if (isFunction(symbolSize)) {\n // FIXME 这里不兼容 ECharts 2.x,2.x 貌似参数是整个数据?\n symbolSize = symbolSize(rawIdx, dataParams);\n }\n if (isFunction(symbolRotate)) {\n symbolRotate = symbolRotate(rawIdx, dataParams);\n }\n if (isFunction(symbolOffset)) {\n symbolOffset = symbolOffset(rawIdx, dataParams);\n }\n }\n var style = itemModel.getModel('itemStyle').getItemStyle();\n var color = getVisualFromData(seriesData, 'color');\n if (!style.fill) {\n style.fill = color;\n }\n mpData.setItemVisual(idx, {\n symbol: symbol,\n symbolSize: symbolSize,\n symbolRotate: symbolRotate,\n symbolOffset: symbolOffset,\n symbolKeepAspect: symbolKeepAspect,\n style: style\n });\n });\n // TODO Text are wrong\n symbolDraw.updateData(mpData);\n this.group.add(symbolDraw.group);\n // Set host model for tooltip\n // FIXME\n mpData.eachItemGraphicEl(function (el) {\n el.traverse(function (child) {\n getECData(child).dataModel = mpModel;\n });\n });\n this.markKeep(symbolDraw);\n symbolDraw.group.silent = mpModel.get('silent') || seriesModel.get('silent');\n };\n MarkPointView.type = 'markPoint';\n return MarkPointView;\n}(MarkerView);\nfunction createData(coordSys, seriesModel, mpModel) {\n var coordDimsInfos;\n if (coordSys) {\n coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n }\n var mpData = new SeriesData(coordDimsInfos, mpModel);\n var dataOpt = map(mpModel.get('data'), curry(markerHelper.dataTransform, seriesModel));\n if (coordSys) {\n dataOpt = filter(dataOpt, curry(markerHelper.dataFilter, coordSys));\n }\n var dimValueGetter = markerHelper.createMarkerDimValueGetter(!!coordSys, coordDimsInfos);\n mpData.initData(dataOpt, null, dimValueGetter);\n return mpData;\n}\nexport default MarkPointView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkPointModel from './MarkPointModel.js';\nimport MarkPointView from './MarkPointView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkPointModel);\n registers.registerComponentView(MarkPointView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markPoint')) {\n // Make sure markPoint component is enabled\n opt.markPoint = opt.markPoint || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkLineModel = /** @class */function (_super) {\n __extends(MarkLineModel, _super);\n function MarkLineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkLineModel.type;\n return _this;\n }\n MarkLineModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkLineModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkLineModel.type = 'markLine';\n MarkLineModel.defaultOption = {\n // zlevel: 0,\n z: 5,\n symbol: ['circle', 'arrow'],\n symbolSize: [8, 16],\n // symbolRotate: 0,\n symbolOffset: 0,\n precision: 2,\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'end',\n distance: 5\n },\n lineStyle: {\n type: 'dashed'\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n width: 3\n }\n },\n animationEasing: 'linear'\n };\n return MarkLineModel;\n}(MarkerModel);\nexport default MarkLineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesData from '../../data/SeriesData.js';\nimport * as numberUtil from '../../util/number.js';\nimport * as markerHelper from './markerHelper.js';\nimport LineDraw from '../../chart/helper/LineDraw.js';\nimport MarkerView from './MarkerView.js';\nimport { getStackedDimension } from '../../data/helper/dataStackHelper.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { getECData } from '../../util/innerStore.js';\nimport MarkerModel from './MarkerModel.js';\nimport { isArray, retrieve, retrieve2, clone, extend, logError, merge, map, curry, filter, isNumber } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nvar inner = makeInner();\nvar markLineTransform = function (seriesModel, coordSys, mlModel, item) {\n var data = seriesModel.getData();\n var itemArray;\n if (!isArray(item)) {\n // Special type markLine like 'min', 'max', 'average', 'median'\n var mlType = item.type;\n if (mlType === 'min' || mlType === 'max' || mlType === 'average' || mlType === 'median'\n // In case\n // data: [{\n // yAxis: 10\n // }]\n || item.xAxis != null || item.yAxis != null) {\n var valueAxis = void 0;\n var value = void 0;\n if (item.yAxis != null || item.xAxis != null) {\n valueAxis = coordSys.getAxis(item.yAxis != null ? 'y' : 'x');\n value = retrieve(item.yAxis, item.xAxis);\n } else {\n var axisInfo = markerHelper.getAxisInfo(item, data, coordSys, seriesModel);\n valueAxis = axisInfo.valueAxis;\n var valueDataDim = getStackedDimension(data, axisInfo.valueDataDim);\n value = markerHelper.numCalculate(data, valueDataDim, mlType);\n }\n var valueIndex = valueAxis.dim === 'x' ? 0 : 1;\n var baseIndex = 1 - valueIndex;\n // Normized to 2d data with start and end point\n var mlFrom = clone(item);\n var mlTo = {\n coord: []\n };\n mlFrom.type = null;\n mlFrom.coord = [];\n mlFrom.coord[baseIndex] = -Infinity;\n mlTo.coord[baseIndex] = Infinity;\n var precision = mlModel.get('precision');\n if (precision >= 0 && isNumber(value)) {\n value = +value.toFixed(Math.min(precision, 20));\n }\n mlFrom.coord[valueIndex] = mlTo.coord[valueIndex] = value;\n itemArray = [mlFrom, mlTo, {\n type: mlType,\n valueIndex: item.valueIndex,\n // Force to use the value of calculated value.\n value: value\n }];\n } else {\n // Invalid data\n if (process.env.NODE_ENV !== 'production') {\n logError('Invalid markLine data.');\n }\n itemArray = [];\n }\n } else {\n itemArray = item;\n }\n var normalizedItem = [markerHelper.dataTransform(seriesModel, itemArray[0]), markerHelper.dataTransform(seriesModel, itemArray[1]), extend({}, itemArray[2])];\n // Avoid line data type is extended by from(to) data type\n normalizedItem[2].type = normalizedItem[2].type || null;\n // Merge from option and to option into line option\n merge(normalizedItem[2], normalizedItem[0]);\n merge(normalizedItem[2], normalizedItem[1]);\n return normalizedItem;\n};\nfunction isInfinity(val) {\n return !isNaN(val) && !isFinite(val);\n}\n// If a markLine has one dim\nfunction ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {\n var otherDimIndex = 1 - dimIndex;\n var dimName = coordSys.dimensions[dimIndex];\n return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]) && fromCoord[dimIndex] === toCoord[dimIndex] && coordSys.getAxis(dimName).containData(fromCoord[dimIndex]);\n}\nfunction markLineFilter(coordSys, item) {\n if (coordSys.type === 'cartesian2d') {\n var fromCoord = item[0].coord;\n var toCoord = item[1].coord;\n // In case\n // {\n // markLine: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (fromCoord && toCoord && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))) {\n return true;\n }\n }\n return markerHelper.dataFilter(coordSys, item[0]) && markerHelper.dataFilter(coordSys, item[1]);\n}\nfunction updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } else {\n // Chart like bar may have there own marker positioning logic\n if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(data.getValues(data.dimensions, idx));\n } else {\n var dims = coordSys.dimensions;\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n point = coordSys.dataToPoint([x, y]);\n }\n // Expand line to the edge of grid if value on one axis is Inifnity\n // In case\n // markLine: {\n // data: [{\n // yAxis: 2\n // // or\n // type: 'average'\n // }]\n // }\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var dims = coordSys.dimensions;\n if (isInfinity(data.get(dims[0], idx))) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[isFrom ? 0 : 1]);\n } else if (isInfinity(data.get(dims[1], idx))) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]);\n }\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n data.setItemLayout(idx, point);\n}\nvar MarkLineView = /** @class */function (_super) {\n __extends(MarkLineView, _super);\n function MarkLineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkLineView.type;\n return _this;\n }\n MarkLineView.prototype.updateTransform = function (markLineModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var mlModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markLine');\n if (mlModel) {\n var mlData_1 = mlModel.getData();\n var fromData_1 = inner(mlModel).from;\n var toData_1 = inner(mlModel).to;\n // Update visual and layout of from symbol and to symbol\n fromData_1.each(function (idx) {\n updateSingleMarkerEndLayout(fromData_1, idx, true, seriesModel, api);\n updateSingleMarkerEndLayout(toData_1, idx, false, seriesModel, api);\n });\n // Update layout of line\n mlData_1.each(function (idx) {\n mlData_1.setItemLayout(idx, [fromData_1.getItemLayout(idx), toData_1.getItemLayout(idx)]);\n });\n this.markerGroupMap.get(seriesModel.id).updateLayout();\n }\n }, this);\n };\n MarkLineView.prototype.renderSeries = function (seriesModel, mlModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var lineDrawMap = this.markerGroupMap;\n var lineDraw = lineDrawMap.get(seriesId) || lineDrawMap.set(seriesId, new LineDraw());\n this.group.add(lineDraw.group);\n var mlData = createList(coordSys, seriesModel, mlModel);\n var fromData = mlData.from;\n var toData = mlData.to;\n var lineData = mlData.line;\n inner(mlModel).from = fromData;\n inner(mlModel).to = toData;\n // Line data for tooltip and formatter\n mlModel.setData(lineData);\n // TODO\n // Functionally, `symbolSize` & `symbolOffset` can also be 2D array now.\n // But the related logic and type definition are not finished yet.\n // Finish it if required\n var symbolType = mlModel.get('symbol');\n var symbolSize = mlModel.get('symbolSize');\n var symbolRotate = mlModel.get('symbolRotate');\n var symbolOffset = mlModel.get('symbolOffset');\n // TODO: support callback function like markPoint\n if (!isArray(symbolType)) {\n symbolType = [symbolType, symbolType];\n }\n if (!isArray(symbolSize)) {\n symbolSize = [symbolSize, symbolSize];\n }\n if (!isArray(symbolRotate)) {\n symbolRotate = [symbolRotate, symbolRotate];\n }\n if (!isArray(symbolOffset)) {\n symbolOffset = [symbolOffset, symbolOffset];\n }\n // Update visual and layout of from symbol and to symbol\n mlData.from.each(function (idx) {\n updateDataVisualAndLayout(fromData, idx, true);\n updateDataVisualAndLayout(toData, idx, false);\n });\n // Update visual and layout of line\n lineData.each(function (idx) {\n var lineStyle = lineData.getItemModel(idx).getModel('lineStyle').getLineStyle();\n // lineData.setItemVisual(idx, {\n // color: lineColor || fromData.getItemVisual(idx, 'color')\n // });\n lineData.setItemLayout(idx, [fromData.getItemLayout(idx), toData.getItemLayout(idx)]);\n if (lineStyle.stroke == null) {\n lineStyle.stroke = fromData.getItemVisual(idx, 'style').fill;\n }\n lineData.setItemVisual(idx, {\n fromSymbolKeepAspect: fromData.getItemVisual(idx, 'symbolKeepAspect'),\n fromSymbolOffset: fromData.getItemVisual(idx, 'symbolOffset'),\n fromSymbolRotate: fromData.getItemVisual(idx, 'symbolRotate'),\n fromSymbolSize: fromData.getItemVisual(idx, 'symbolSize'),\n fromSymbol: fromData.getItemVisual(idx, 'symbol'),\n toSymbolKeepAspect: toData.getItemVisual(idx, 'symbolKeepAspect'),\n toSymbolOffset: toData.getItemVisual(idx, 'symbolOffset'),\n toSymbolRotate: toData.getItemVisual(idx, 'symbolRotate'),\n toSymbolSize: toData.getItemVisual(idx, 'symbolSize'),\n toSymbol: toData.getItemVisual(idx, 'symbol'),\n style: lineStyle\n });\n });\n lineDraw.updateData(lineData);\n // Set host model for tooltip\n // FIXME\n mlData.line.eachItemGraphicEl(function (el) {\n getECData(el).dataModel = mlModel;\n el.traverse(function (child) {\n getECData(child).dataModel = mlModel;\n });\n });\n function updateDataVisualAndLayout(data, idx, isFrom) {\n var itemModel = data.getItemModel(idx);\n updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api);\n var style = itemModel.getModel('itemStyle').getItemStyle();\n if (style.fill == null) {\n style.fill = getVisualFromData(seriesData, 'color');\n }\n data.setItemVisual(idx, {\n symbolKeepAspect: itemModel.get('symbolKeepAspect'),\n // `0` should be considered as a valid value, so use `retrieve2` instead of `||`\n symbolOffset: retrieve2(itemModel.get('symbolOffset', true), symbolOffset[isFrom ? 0 : 1]),\n symbolRotate: retrieve2(itemModel.get('symbolRotate', true), symbolRotate[isFrom ? 0 : 1]),\n // TODO: when 2d array is supported, it should ignore parent\n symbolSize: retrieve2(itemModel.get('symbolSize'), symbolSize[isFrom ? 0 : 1]),\n symbol: retrieve2(itemModel.get('symbol', true), symbolType[isFrom ? 0 : 1]),\n style: style\n });\n }\n this.markKeep(lineDraw);\n lineDraw.group.silent = mlModel.get('silent') || seriesModel.get('silent');\n };\n MarkLineView.type = 'markLine';\n return MarkLineView;\n}(MarkerView);\nfunction createList(coordSys, seriesModel, mlModel) {\n var coordDimsInfos;\n if (coordSys) {\n coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n }\n var fromData = new SeriesData(coordDimsInfos, mlModel);\n var toData = new SeriesData(coordDimsInfos, mlModel);\n // No dimensions\n var lineData = new SeriesData([], mlModel);\n var optData = map(mlModel.get('data'), curry(markLineTransform, seriesModel, coordSys, mlModel));\n if (coordSys) {\n optData = filter(optData, curry(markLineFilter, coordSys));\n }\n var dimValueGetter = markerHelper.createMarkerDimValueGetter(!!coordSys, coordDimsInfos);\n fromData.initData(map(optData, function (item) {\n return item[0];\n }), null, dimValueGetter);\n toData.initData(map(optData, function (item) {\n return item[1];\n }), null, dimValueGetter);\n lineData.initData(map(optData, function (item) {\n return item[2];\n }));\n lineData.hasItemOption = true;\n return {\n from: fromData,\n to: toData,\n line: lineData\n };\n}\nexport default MarkLineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkLineModel from './MarkLineModel.js';\nimport MarkLineView from './MarkLineView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkLineModel);\n registers.registerComponentView(MarkLineView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markLine')) {\n // Make sure markLine component is enabled\n opt.markLine = opt.markLine || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkAreaModel = /** @class */function (_super) {\n __extends(MarkAreaModel, _super);\n function MarkAreaModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkAreaModel.type;\n return _this;\n }\n MarkAreaModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkAreaModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkAreaModel.type = 'markArea';\n MarkAreaModel.defaultOption = {\n // zlevel: 0,\n // PENDING\n z: 1,\n tooltip: {\n trigger: 'item'\n },\n // markArea should fixed on the coordinate system\n animation: false,\n label: {\n show: true,\n position: 'top'\n },\n itemStyle: {\n // color and borderColor default to use color from series\n // color: 'auto'\n // borderColor: 'auto'\n borderWidth: 0\n },\n emphasis: {\n label: {\n show: true,\n position: 'top'\n }\n }\n };\n return MarkAreaModel;\n}(MarkerModel);\nexport default MarkAreaModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// TODO Optimize on polar\nimport * as colorUtil from 'zrender/lib/tool/color.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport * as numberUtil from '../../util/number.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, setStatesStylesFromModel } from '../../util/states.js';\nimport * as markerHelper from './markerHelper.js';\nimport MarkerView from './MarkerView.js';\nimport { retrieve, mergeAll, map, curry, filter, extend, isString } from 'zrender/lib/core/util.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport MarkerModel from './MarkerModel.js';\nimport { makeInner } from '../../util/model.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { parseDataValue } from '../../data/helper/dataValueHelper.js';\nvar inner = makeInner();\nvar markAreaTransform = function (seriesModel, coordSys, maModel, item) {\n // item may be null\n var item0 = item[0];\n var item1 = item[1];\n if (!item0 || !item1) {\n return;\n }\n var lt = markerHelper.dataTransform(seriesModel, item0);\n var rb = markerHelper.dataTransform(seriesModel, item1);\n // FIXME make sure lt is less than rb\n var ltCoord = lt.coord;\n var rbCoord = rb.coord;\n ltCoord[0] = retrieve(ltCoord[0], -Infinity);\n ltCoord[1] = retrieve(ltCoord[1], -Infinity);\n rbCoord[0] = retrieve(rbCoord[0], Infinity);\n rbCoord[1] = retrieve(rbCoord[1], Infinity);\n // Merge option into one\n var result = mergeAll([{}, lt, rb]);\n result.coord = [lt.coord, rb.coord];\n result.x0 = lt.x;\n result.y0 = lt.y;\n result.x1 = rb.x;\n result.y1 = rb.y;\n return result;\n};\nfunction isInfinity(val) {\n return !isNaN(val) && !isFinite(val);\n}\n// If a markArea has one dim\nfunction ifMarkAreaHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {\n var otherDimIndex = 1 - dimIndex;\n return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]);\n}\nfunction markAreaFilter(coordSys, item) {\n var fromCoord = item.coord[0];\n var toCoord = item.coord[1];\n var item0 = {\n coord: fromCoord,\n x: item.x0,\n y: item.y0\n };\n var item1 = {\n coord: toCoord,\n x: item.x1,\n y: item.y1\n };\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // In case\n // {\n // markArea: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (fromCoord && toCoord && (ifMarkAreaHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkAreaHasOnlyDim(0, fromCoord, toCoord, coordSys))) {\n return true;\n }\n // Directly returning true may also do the work,\n // because markArea will not be shown automatically\n // when it's not included in coordinate system.\n // But filtering ahead can avoid keeping rendering markArea\n // when there are too many of them.\n return markerHelper.zoneFilter(coordSys, item0, item1);\n }\n return markerHelper.dataFilter(coordSys, item0) || markerHelper.dataFilter(coordSys, item1);\n}\n// dims can be ['x0', 'y0'], ['x1', 'y1'], ['x0', 'y1'], ['x1', 'y0']\nfunction getSingleMarkerEndPoint(data, idx, dims, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get(dims[0]), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get(dims[1]), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } else {\n // Chart like bar may have there own marker positioning logic\n if (seriesModel.getMarkerPosition) {\n // Consider the case that user input the right-bottom point first\n // Pick the larger x and y as 'x1' and 'y1'\n var pointValue0 = data.getValues(['x0', 'y0'], idx);\n var pointValue1 = data.getValues(['x1', 'y1'], idx);\n var clampPointValue0 = coordSys.clampData(pointValue0);\n var clampPointValue1 = coordSys.clampData(pointValue1);\n var pointValue = [];\n if (dims[0] === 'x0') {\n pointValue[0] = clampPointValue0[0] > clampPointValue1[0] ? pointValue1[0] : pointValue0[0];\n } else {\n pointValue[0] = clampPointValue0[0] > clampPointValue1[0] ? pointValue0[0] : pointValue1[0];\n }\n if (dims[1] === 'y0') {\n pointValue[1] = clampPointValue0[1] > clampPointValue1[1] ? pointValue1[1] : pointValue0[1];\n } else {\n pointValue[1] = clampPointValue0[1] > clampPointValue1[1] ? pointValue0[1] : pointValue1[1];\n }\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(pointValue, dims, true);\n } else {\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n var pt = [x, y];\n coordSys.clampData && coordSys.clampData(pt, pt);\n point = coordSys.dataToPoint(pt, true);\n }\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n if (isInfinity(x)) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[dims[0] === 'x0' ? 0 : 1]);\n } else if (isInfinity(y)) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]);\n }\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n return point;\n}\nexport var dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']];\nvar MarkAreaView = /** @class */function (_super) {\n __extends(MarkAreaView, _super);\n function MarkAreaView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkAreaView.type;\n return _this;\n }\n MarkAreaView.prototype.updateTransform = function (markAreaModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var maModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markArea');\n if (maModel) {\n var areaData_1 = maModel.getData();\n areaData_1.each(function (idx) {\n var points = map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData_1, idx, dim, seriesModel, api);\n });\n // Layout\n areaData_1.setItemLayout(idx, points);\n var el = areaData_1.getItemGraphicEl(idx);\n el.setShape('points', points);\n });\n }\n }, this);\n };\n MarkAreaView.prototype.renderSeries = function (seriesModel, maModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var areaGroupMap = this.markerGroupMap;\n var polygonGroup = areaGroupMap.get(seriesId) || areaGroupMap.set(seriesId, {\n group: new graphic.Group()\n });\n this.group.add(polygonGroup.group);\n this.markKeep(polygonGroup);\n var areaData = createList(coordSys, seriesModel, maModel);\n // Line data for tooltip and formatter\n maModel.setData(areaData);\n // Update visual and layout of line\n areaData.each(function (idx) {\n // Layout\n var points = map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api);\n });\n var xAxisScale = coordSys.getAxis('x').scale;\n var yAxisScale = coordSys.getAxis('y').scale;\n var xAxisExtent = xAxisScale.getExtent();\n var yAxisExtent = yAxisScale.getExtent();\n var xPointExtent = [xAxisScale.parse(areaData.get('x0', idx)), xAxisScale.parse(areaData.get('x1', idx))];\n var yPointExtent = [yAxisScale.parse(areaData.get('y0', idx)), yAxisScale.parse(areaData.get('y1', idx))];\n numberUtil.asc(xPointExtent);\n numberUtil.asc(yPointExtent);\n var overlapped = !(xAxisExtent[0] > xPointExtent[1] || xAxisExtent[1] < xPointExtent[0] || yAxisExtent[0] > yPointExtent[1] || yAxisExtent[1] < yPointExtent[0]);\n // If none of the area is inside coordSys, allClipped is set to be true\n // in layout so that label will not be displayed. See #12591\n var allClipped = !overlapped;\n areaData.setItemLayout(idx, {\n points: points,\n allClipped: allClipped\n });\n var style = areaData.getItemModel(idx).getModel('itemStyle').getItemStyle();\n var color = getVisualFromData(seriesData, 'color');\n if (!style.fill) {\n style.fill = color;\n if (isString(style.fill)) {\n style.fill = colorUtil.modifyAlpha(style.fill, 0.4);\n }\n }\n if (!style.stroke) {\n style.stroke = color;\n }\n // Visual\n areaData.setItemVisual(idx, 'style', style);\n });\n areaData.diff(inner(polygonGroup).data).add(function (idx) {\n var layout = areaData.getItemLayout(idx);\n if (!layout.allClipped) {\n var polygon = new graphic.Polygon({\n shape: {\n points: layout.points\n }\n });\n areaData.setItemGraphicEl(idx, polygon);\n polygonGroup.group.add(polygon);\n }\n }).update(function (newIdx, oldIdx) {\n var polygon = inner(polygonGroup).data.getItemGraphicEl(oldIdx);\n var layout = areaData.getItemLayout(newIdx);\n if (!layout.allClipped) {\n if (polygon) {\n graphic.updateProps(polygon, {\n shape: {\n points: layout.points\n }\n }, maModel, newIdx);\n } else {\n polygon = new graphic.Polygon({\n shape: {\n points: layout.points\n }\n });\n }\n areaData.setItemGraphicEl(newIdx, polygon);\n polygonGroup.group.add(polygon);\n } else if (polygon) {\n polygonGroup.group.remove(polygon);\n }\n }).remove(function (idx) {\n var polygon = inner(polygonGroup).data.getItemGraphicEl(idx);\n polygonGroup.group.remove(polygon);\n }).execute();\n areaData.eachItemGraphicEl(function (polygon, idx) {\n var itemModel = areaData.getItemModel(idx);\n var style = areaData.getItemVisual(idx, 'style');\n polygon.useStyle(areaData.getItemVisual(idx, 'style'));\n setLabelStyle(polygon, getLabelStatesModels(itemModel), {\n labelFetcher: maModel,\n labelDataIndex: idx,\n defaultText: areaData.getName(idx) || '',\n inheritColor: isString(style.fill) ? colorUtil.modifyAlpha(style.fill, 1) : '#000'\n });\n setStatesStylesFromModel(polygon, itemModel);\n toggleHoverEmphasis(polygon, null, null, itemModel.get(['emphasis', 'disabled']));\n getECData(polygon).dataModel = maModel;\n });\n inner(polygonGroup).data = areaData;\n polygonGroup.group.silent = maModel.get('silent') || seriesModel.get('silent');\n };\n MarkAreaView.type = 'markArea';\n return MarkAreaView;\n}(MarkerView);\nfunction createList(coordSys, seriesModel, maModel) {\n var areaData;\n var dataDims;\n var dims = ['x0', 'y0', 'x1', 'y1'];\n if (coordSys) {\n var coordDimsInfos_1 = map(coordSys && coordSys.dimensions, function (coordDim) {\n var data = seriesModel.getData();\n var info = data.getDimensionInfo(data.mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n dataDims = map(dims, function (dim, idx) {\n return {\n name: dim,\n type: coordDimsInfos_1[idx % 2].type\n };\n });\n areaData = new SeriesData(dataDims, maModel);\n } else {\n dataDims = [{\n name: 'value',\n type: 'float'\n }];\n areaData = new SeriesData(dataDims, maModel);\n }\n var optData = map(maModel.get('data'), curry(markAreaTransform, seriesModel, coordSys, maModel));\n if (coordSys) {\n optData = filter(optData, curry(markAreaFilter, coordSys));\n }\n var dimValueGetter = coordSys ? function (item, dimName, dataIndex, dimIndex) {\n // TODO should convert to ParsedValue?\n var rawVal = item.coord[Math.floor(dimIndex / 2)][dimIndex % 2];\n return parseDataValue(rawVal, dataDims[dimIndex]);\n } : function (item, dimName, dataIndex, dimIndex) {\n return parseDataValue(item.value, dataDims[dimIndex]);\n };\n areaData.initData(optData, null, dimValueGetter);\n areaData.hasItemOption = true;\n return areaData;\n}\nexport default MarkAreaView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkAreaModel from './MarkAreaModel.js';\nimport MarkAreaView from './MarkAreaView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkAreaModel);\n registers.registerComponentView(MarkAreaView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markArea')) {\n // Make sure markArea component is enabled\n opt.markArea = opt.markArea || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from '../../model/Model.js';\nimport { isNameSpecified } from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nvar getDefaultSelectorOptions = function (ecModel, type) {\n if (type === 'all') {\n return {\n type: 'all',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'all'])\n };\n } else if (type === 'inverse') {\n return {\n type: 'inverse',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'inverse'])\n };\n }\n};\nvar LegendModel = /** @class */function (_super) {\n __extends(LegendModel, _super);\n function LegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendModel.type;\n _this.layoutMode = {\n type: 'box',\n // legend.width/height are maxWidth/maxHeight actually,\n // whereas real width/height is calculated by its content.\n // (Setting {left: 10, right: 10} does not make sense).\n // So consider the case:\n // `setOption({legend: {left: 10});`\n // then `setOption({legend: {right: 10});`\n // The previous `left` should be cleared by setting `ignoreSize`.\n ignoreSize: true\n };\n return _this;\n }\n LegendModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n option.selected = option.selected || {};\n this._updateSelector(option);\n };\n LegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n this._updateSelector(option);\n };\n LegendModel.prototype._updateSelector = function (option) {\n var selector = option.selector;\n var ecModel = this.ecModel;\n if (selector === true) {\n selector = option.selector = ['all', 'inverse'];\n }\n if (zrUtil.isArray(selector)) {\n zrUtil.each(selector, function (item, index) {\n zrUtil.isString(item) && (item = {\n type: item\n });\n selector[index] = zrUtil.merge(item, getDefaultSelectorOptions(ecModel, item.type));\n });\n }\n };\n LegendModel.prototype.optionUpdated = function () {\n this._updateData(this.ecModel);\n var legendData = this._data;\n // If selectedMode is single, try to select one\n if (legendData[0] && this.get('selectedMode') === 'single') {\n var hasSelected = false;\n // If has any selected in option.selected\n for (var i = 0; i < legendData.length; i++) {\n var name_1 = legendData[i].get('name');\n if (this.isSelected(name_1)) {\n // Force to unselect others\n this.select(name_1);\n hasSelected = true;\n break;\n }\n }\n // Try select the first if selectedMode is single\n !hasSelected && this.select(legendData[0].get('name'));\n }\n };\n LegendModel.prototype._updateData = function (ecModel) {\n var potentialData = [];\n var availableNames = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var seriesName = seriesModel.name;\n availableNames.push(seriesName);\n var isPotential;\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n var names = provider.getAllNames();\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n availableNames = availableNames.concat(names);\n }\n if (names.length) {\n potentialData = potentialData.concat(names);\n } else {\n isPotential = true;\n }\n } else {\n isPotential = true;\n }\n if (isPotential && isNameSpecified(seriesModel)) {\n potentialData.push(seriesModel.name);\n }\n });\n /**\n * @type {Array.}\n * @private\n */\n this._availableNames = availableNames;\n // If legend.data is not specified in option, use availableNames as data,\n // which is convenient for user preparing option.\n var rawData = this.get('data') || potentialData;\n var legendNameMap = zrUtil.createHashMap();\n var legendData = zrUtil.map(rawData, function (dataItem) {\n // Can be string or number\n if (zrUtil.isString(dataItem) || zrUtil.isNumber(dataItem)) {\n dataItem = {\n name: dataItem\n };\n }\n if (legendNameMap.get(dataItem.name)) {\n // remove legend name duplicate\n return null;\n }\n legendNameMap.set(dataItem.name, true);\n return new Model(dataItem, this, this.ecModel);\n }, this);\n /**\n * @type {Array.}\n * @private\n */\n this._data = zrUtil.filter(legendData, function (item) {\n return !!item;\n });\n };\n LegendModel.prototype.getData = function () {\n return this._data;\n };\n LegendModel.prototype.select = function (name) {\n var selected = this.option.selected;\n var selectedMode = this.get('selectedMode');\n if (selectedMode === 'single') {\n var data = this._data;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name')] = false;\n });\n }\n selected[name] = true;\n };\n LegendModel.prototype.unSelect = function (name) {\n if (this.get('selectedMode') !== 'single') {\n this.option.selected[name] = false;\n }\n };\n LegendModel.prototype.toggleSelected = function (name) {\n var selected = this.option.selected;\n // Default is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n this[selected[name] ? 'unSelect' : 'select'](name);\n };\n LegendModel.prototype.allSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name', true)] = true;\n });\n };\n LegendModel.prototype.inverseSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n var name = dataItem.get('name', true);\n // Initially, default value is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n selected[name] = !selected[name];\n });\n };\n LegendModel.prototype.isSelected = function (name) {\n var selected = this.option.selected;\n return !(selected.hasOwnProperty(name) && !selected[name]) && zrUtil.indexOf(this._availableNames, name) >= 0;\n };\n LegendModel.prototype.getOrient = function () {\n return this.get('orient') === 'vertical' ? {\n index: 1,\n name: 'vertical'\n } : {\n index: 0,\n name: 'horizontal'\n };\n };\n LegendModel.type = 'legend.plain';\n LegendModel.dependencies = ['series'];\n LegendModel.defaultOption = {\n // zlevel: 0,\n z: 4,\n show: true,\n orient: 'horizontal',\n left: 'center',\n // right: 'center',\n top: 0,\n // bottom: null,\n align: 'auto',\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n itemWidth: 25,\n itemHeight: 14,\n symbolRotate: 'inherit',\n symbolKeepAspect: true,\n inactiveColor: '#ccc',\n inactiveBorderColor: '#ccc',\n inactiveBorderWidth: 'auto',\n itemStyle: {\n color: 'inherit',\n opacity: 'inherit',\n borderColor: 'inherit',\n borderWidth: 'auto',\n borderCap: 'inherit',\n borderJoin: 'inherit',\n borderDashOffset: 'inherit',\n borderMiterLimit: 'inherit'\n },\n lineStyle: {\n width: 'auto',\n color: 'inherit',\n inactiveColor: '#ccc',\n inactiveWidth: 2,\n opacity: 'inherit',\n type: 'inherit',\n cap: 'inherit',\n join: 'inherit',\n dashOffset: 'inherit',\n miterLimit: 'inherit'\n },\n textStyle: {\n color: '#333'\n },\n selectedMode: true,\n selector: false,\n selectorLabel: {\n show: true,\n borderRadius: 10,\n padding: [3, 5, 3, 5],\n fontSize: 12,\n fontFamily: 'sans-serif',\n color: '#666',\n borderWidth: 1,\n borderColor: '#666'\n },\n emphasis: {\n selectorLabel: {\n show: true,\n color: '#eee',\n backgroundColor: '#666'\n }\n },\n selectorPosition: 'auto',\n selectorItemGap: 7,\n selectorButtonGap: 10,\n tooltip: {\n show: false\n }\n };\n return LegendModel;\n}(ComponentModel);\nexport default LegendModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parse, stringify } from 'zrender/lib/tool/color.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, createTextStyle } from '../../label/labelStyle.js';\nimport { makeBackground } from '../helper/listComponent.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport ComponentView from '../../view/Component.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { getECData } from '../../util/innerStore.js';\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\nvar LegendView = /** @class */function (_super) {\n __extends(LegendView, _super);\n function LegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendView.type;\n _this.newlineDisabled = false;\n return _this;\n }\n LegendView.prototype.init = function () {\n this.group.add(this._contentGroup = new Group());\n this.group.add(this._selectorGroup = new Group());\n this._isFirstRender = true;\n };\n /**\n * @protected\n */\n LegendView.prototype.getContentGroup = function () {\n return this._contentGroup;\n };\n /**\n * @protected\n */\n LegendView.prototype.getSelectorGroup = function () {\n return this._selectorGroup;\n };\n /**\n * @override\n */\n LegendView.prototype.render = function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n if (!legendModel.get('show', true)) {\n return;\n }\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n }\n // selector has been normalized to an array in model\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n // Perform layout.\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition);\n // Place mainGroup, based on the calculated `mainRect`.\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), viewportSize, padding);\n this.group.x = layoutRect.x - mainRect.x;\n this.group.y = layoutRect.y - mainRect.y;\n this.group.markRedraw();\n // Render background after group is layout.\n this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel));\n };\n LegendView.prototype.resetInner = function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n };\n LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (legendItemModel, dataIndex) {\n var name = legendItemModel.get('name');\n // Use empty string or \\n as a newline string\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n var g = new Group();\n // @ts-ignore\n g.newline = true;\n contentGroup.add(g);\n return;\n }\n // Representitive series.\n var seriesModel = ecModel.getSeriesByName(name)[0];\n if (legendDrawnMap.get(name)) {\n // Have been drawn\n return;\n }\n // Legend to control series.\n if (seriesModel) {\n var data = seriesModel.getData();\n var lineVisualStyle = data.getVisual('legendLineStyle') || {};\n var legendIcon = data.getVisual('legendIcon');\n /**\n * `data.getVisual('style')` may be the color from the register\n * in series. For example, for line series,\n */\n var style = data.getVisual('style');\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api);\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n if (!provider.containName(name)) {\n return;\n }\n var idx = provider.indexOfName(name);\n var style = provider.getItemVisual(idx, 'style');\n var legendIcon = provider.getItemVisual(idx, 'legendIcon');\n var colorArr = parse(style.fill);\n // Color may be set to transparent in visualMap when data is out of range.\n // Do not show nothing.\n if (colorArr && colorArr[3] === 0) {\n colorArr[3] = 0.2;\n // TODO color is set to 0, 0, 0, 0. Should show correct RGBA\n style = zrUtil.extend(zrUtil.extend({}, style), {\n fill: stringify(colorArr, 'rgba')\n });\n }\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, legendIcon, selectMode, api);\n // FIXME: consider different series has items with the same name.\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId))\n // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!legendDrawnMap.get(name)) {\n console.warn(name + ' series not exists. Legend data should be same with series name or data name.');\n }\n }\n }, this);\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n };\n LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect'\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']);\n setLabelStyle(labelText, {\n normal: labelModel,\n emphasis: emphasisLabelModel\n }, {\n defaultText: selectorItem.title\n });\n enableHoverEmphasis(labelText);\n });\n };\n LegendView.prototype._createItem = function (seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, legendIcon, selectMode, api) {\n var drawType = seriesModel.visualDrawType;\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var isSelected = legendModel.isSelected(name);\n var iconRotate = legendItemModel.get('symbolRotate');\n var symbolKeepAspect = legendItemModel.get('symbolKeepAspect');\n var legendIconType = legendItemModel.get('icon');\n legendIcon = legendIconType || legendIcon || 'roundRect';\n var style = getLegendStyle(legendIcon, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api);\n var itemGroup = new Group();\n var textStyleModel = legendItemModel.getModel('textStyle');\n if (zrUtil.isFunction(seriesModel.getLegendIcon) && (!legendIconType || legendIconType === 'inherit')) {\n // Series has specific way to define legend icon\n itemGroup.add(seriesModel.getLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: iconRotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n } else {\n // Use default legend icon policy for most series\n var rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') ? iconRotate === 'inherit' ? seriesModel.getData().getVisual('symbolRotate') : iconRotate : 0; // No rotation for no icon\n itemGroup.add(getDefaultLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: rotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n }\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n if (zrUtil.isString(formatter) && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (zrUtil.isFunction(formatter)) {\n content = formatter(name);\n }\n var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n fill: textColor,\n align: textAlign,\n verticalAlign: 'middle'\n }, {\n inheritColor: textColor\n })\n }));\n // Add a invisible rect to increase the area of mouse hover\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n style: {\n // Cannot use 'invisible' because SVG SSR will miss the node\n fill: 'transparent'\n }\n });\n var tooltipModel = legendItemModel.getModel('tooltip');\n if (tooltipModel.get('show')) {\n graphic.setTooltipConfig({\n el: hitRect,\n componentModel: legendModel,\n itemName: name,\n itemTooltipOption: tooltipModel.option\n });\n }\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n enableHoverEmphasis(itemGroup);\n // @ts-ignore\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n };\n LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup();\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n selectorGroup.markRedraw();\n contentGroup.markRedraw();\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n }\n // Always align selector to content as 'middle'\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n return this.group.getBoundingRect();\n }\n };\n /**\n * @protected\n */\n LegendView.prototype.remove = function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n };\n LegendView.type = 'legend.plain';\n return LegendView;\n}(ComponentView);\nfunction getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) {\n /**\n * Use series style if is inherit;\n * elsewise, use legend style\n */\n function handleCommonProps(style, visualStyle) {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n if (style.lineWidth === 'auto') {\n style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;\n }\n each(style, function (propVal, propName) {\n style[propName] === 'inherit' && (style[propName] = visualStyle[propName]);\n });\n }\n // itemStyle\n var itemStyleModel = legendItemModel.getModel('itemStyle');\n var itemStyle = itemStyleModel.getItemStyle();\n var iconBrushType = iconType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke';\n var decalStyle = itemStyleModel.getShallow('decal');\n itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api);\n if (itemStyle.fill === 'inherit') {\n /**\n * Series with visualDrawType as 'stroke' should have\n * series stroke as legend fill\n */\n itemStyle.fill = itemVisualStyle[drawType];\n }\n if (itemStyle.stroke === 'inherit') {\n /**\n * icon type with \"emptyXXX\" should use fill color\n * in visual style\n */\n itemStyle.stroke = itemVisualStyle[iconBrushType];\n }\n if (itemStyle.opacity === 'inherit') {\n /**\n * Use lineStyle.opacity if drawType is stroke\n */\n itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;\n }\n handleCommonProps(itemStyle, itemVisualStyle);\n // lineStyle\n var legendLineModel = legendItemModel.getModel('lineStyle');\n var lineStyle = legendLineModel.getLineStyle();\n handleCommonProps(lineStyle, lineVisualStyle);\n // Fix auto color to real color\n itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill);\n itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill);\n lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);\n if (!isSelected) {\n var borderWidth = legendItemModel.get('inactiveBorderWidth');\n /**\n * Since stroke is set to be inactiveBorderColor, it may occur that\n * there is no border in series but border in legend, so we need to\n * use border only when series has border if is set to be auto\n */\n var visualHasBorder = itemStyle[iconBrushType];\n itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;\n itemStyle.fill = legendItemModel.get('inactiveColor');\n itemStyle.stroke = legendItemModel.get('inactiveBorderColor');\n lineStyle.stroke = legendLineModel.get('inactiveColor');\n lineStyle.lineWidth = legendLineModel.get('inactiveWidth');\n }\n return {\n itemStyle: itemStyle,\n lineStyle: lineStyle\n };\n}\nfunction getDefaultLegendIcon(opt) {\n var symboType = opt.icon || 'roundRect';\n var icon = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect);\n icon.setStyle(opt.itemStyle);\n icon.rotation = (opt.iconRotate || 0) * Math.PI / 180;\n icon.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symboType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = '#fff';\n icon.style.lineWidth = 2;\n }\n return icon;\n}\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n });\n // highlight after select\n // TODO highlight immediately may cause animation loss.\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\nfunction isUseHoverLayer(api) {\n var list = api.getZr().storage.getDisplayList();\n var emphasisState;\n var i = 0;\n var len = list.length;\n while (i < len && !(emphasisState = list[i].states.emphasis)) {\n i++;\n }\n return emphasisState && emphasisState.hoverLayer;\n}\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nexport default LegendView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function legendFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (legendModels && legendModels.length) {\n ecModel.filterSeries(function (series) {\n // If in any legend component the status is not selected.\n // Because in legend series is assumed selected when it is not in the legend data.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(series.name)) {\n return false;\n }\n }\n return true;\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport { curry, each } from 'zrender/lib/core/util.js';\nfunction legendSelectActionHandler(methodName, payload, ecModel) {\n var selectedMap = {};\n var isToggleSelect = methodName === 'toggleSelected';\n var isSelected;\n // Update all legend components\n ecModel.eachComponent('legend', function (legendModel) {\n if (isToggleSelect && isSelected != null) {\n // Force other legend has same selected status\n // Or the first is toggled to true and other are toggled to false\n // In the case one legend has some item unSelected in option. And if other legend\n // doesn't has the item, they will assume it is selected.\n legendModel[isSelected ? 'select' : 'unSelect'](payload.name);\n } else if (methodName === 'allSelect' || methodName === 'inverseSelect') {\n legendModel[methodName]();\n } else {\n legendModel[methodName](payload.name);\n isSelected = legendModel.isSelected(payload.name);\n }\n var legendData = legendModel.getData();\n each(legendData, function (model) {\n var name = model.get('name');\n // Wrap element\n if (name === '\\n' || name === '') {\n return;\n }\n var isItemSelected = legendModel.isSelected(name);\n if (selectedMap.hasOwnProperty(name)) {\n // Unselected if any legend is unselected\n selectedMap[name] = selectedMap[name] && isItemSelected;\n } else {\n selectedMap[name] = isItemSelected;\n }\n });\n });\n // Return the event explicitly\n return methodName === 'allSelect' || methodName === 'inverseSelect' ? {\n selected: selectedMap\n } : {\n name: payload.name,\n selected: selectedMap\n };\n}\nexport function installLegendAction(registers) {\n /**\n * @event legendToggleSelect\n * @type {Object}\n * @property {string} type 'legendToggleSelect'\n * @property {string} [from]\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendToggleSelect', 'legendselectchanged', curry(legendSelectActionHandler, 'toggleSelected'));\n registers.registerAction('legendAllSelect', 'legendselectall', curry(legendSelectActionHandler, 'allSelect'));\n registers.registerAction('legendInverseSelect', 'legendinverseselect', curry(legendSelectActionHandler, 'inverseSelect'));\n /**\n * @event legendSelect\n * @type {Object}\n * @property {string} type 'legendSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendSelect', 'legendselected', curry(legendSelectActionHandler, 'select'));\n /**\n * @event legendUnSelect\n * @type {Object}\n * @property {string} type 'legendUnSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendUnSelect', 'legendunselected', curry(legendSelectActionHandler, 'unSelect'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LegendModel from './LegendModel.js';\nimport LegendView from './LegendView.js';\nimport legendFilter from './legendFilter.js';\nimport { installLegendAction } from './legendAction.js';\nexport function install(registers) {\n registers.registerComponentModel(LegendModel);\n registers.registerComponentView(LegendView);\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);\n registers.registerSubTypeDefaulter('legend', function () {\n return 'plain';\n });\n installLegendAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport LegendModel from './LegendModel.js';\nimport { mergeLayoutParam, getLayoutParams } from '../../util/layout.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar ScrollableLegendModel = /** @class */function (_super) {\n __extends(ScrollableLegendModel, _super);\n function ScrollableLegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendModel.type;\n return _this;\n }\n /**\n * @param {number} scrollDataIndex\n */\n ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) {\n this.option.scrollDataIndex = scrollDataIndex;\n };\n ScrollableLegendModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n _super.prototype.init.call(this, option, parentModel, ecModel);\n mergeAndNormalizeLayoutParams(this, option, inputPositionParams);\n };\n /**\n * @override\n */\n ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n mergeAndNormalizeLayoutParams(this, this.option, option);\n };\n ScrollableLegendModel.type = 'legend.scroll';\n ScrollableLegendModel.defaultOption = inheritDefaultOption(LegendModel.defaultOption, {\n scrollDataIndex: 0,\n pageButtonItemGap: 5,\n pageButtonGap: null,\n pageButtonPosition: 'end',\n pageFormatter: '{current}/{total}',\n pageIcons: {\n horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'],\n vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z']\n },\n pageIconColor: '#2f4554',\n pageIconInactiveColor: '#aaa',\n pageIconSize: 15,\n pageTextStyle: {\n color: '#333'\n },\n animationDurationUpdate: 800\n });\n return ScrollableLegendModel;\n}(LegendModel);\n;\n// Do not `ignoreSize` to enable setting {left: 10, right: 10}.\nfunction mergeAndNormalizeLayoutParams(legendModel, target, raw) {\n var orient = legendModel.getOrient();\n var ignoreSize = [1, 1];\n ignoreSize[orient.index] = 0;\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: !!ignoreSize\n });\n}\nexport default ScrollableLegendModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Separate legend and scrollable legend to reduce package size.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport LegendView from './LegendView.js';\nvar Group = graphic.Group;\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\nvar ScrollableLegendView = /** @class */function (_super) {\n __extends(ScrollableLegendView, _super);\n function ScrollableLegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendView.type;\n _this.newlineDisabled = true;\n _this._currentIndex = 0;\n return _this;\n }\n ScrollableLegendView.prototype.init = function () {\n _super.prototype.init.call(this);\n this.group.add(this._containerGroup = new Group());\n this._containerGroup.add(this.getContentGroup());\n this.group.add(this._controllerGroup = new Group());\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.resetInner = function () {\n _super.prototype.resetInner.call(this);\n this._controllerGroup.removeAll();\n this._containerGroup.removeClipPath();\n this._containerGroup.__rectSize = null;\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var self = this;\n // Render content items.\n _super.prototype.renderInner.call(this, itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n var controllerGroup = this._controllerGroup;\n // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n var pageIconSize = legendModel.get('pageIconSize', true);\n var pageIconSizeArr = zrUtil.isArray(pageIconSize) ? pageIconSize : [pageIconSize, pageIconSize];\n createPageButton('pagePrev', 0);\n var pageTextStyleModel = legendModel.getModel('pageTextStyle');\n controllerGroup.add(new graphic.Text({\n name: 'pageText',\n style: {\n // Placeholder to calculate a proper layout.\n text: 'xx/xx',\n fill: pageTextStyleModel.getTextColor(),\n font: pageTextStyleModel.getFont(),\n verticalAlign: 'middle',\n align: 'center'\n },\n silent: true\n }));\n createPageButton('pageNext', 1);\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], {\n // Buttons will be created in each render, so we do not need\n // to worry about avoiding using legendModel kept in scope.\n onclick: zrUtil.bind(self._pageGo, self, pageDataIndexName, legendModel, api)\n }, {\n x: -pageIconSizeArr[0] / 2,\n y: -pageIconSizeArr[1] / 2,\n width: pageIconSizeArr[0],\n height: pageIconSizeArr[1]\n });\n icon.name = name;\n controllerGroup.add(icon);\n }\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var hw = WH[1 - orientIdx];\n var yx = XY[1 - orientIdx];\n selector && layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx, xy);\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n } else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2;\n mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]);\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n selectorGroup.markRedraw();\n }\n return mainRect;\n };\n ScrollableLegendView.prototype._layoutContentAndController = function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx, xy) {\n var contentGroup = this.getContentGroup();\n var containerGroup = this._containerGroup;\n var controllerGroup = this._controllerGroup;\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height);\n layoutUtil.box(\n // Buttons in controller are layout always horizontally.\n 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true));\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh];\n // In case that the inner elements of contentGroup layout do not based on [0, 0]\n var contentPos = [-contentRect.x, -contentRect.y];\n // Remain contentPos when scroll animation perfroming.\n // If first rendering, `contentGroup.position` is [0, 0], which\n // does not make sense and may cause unexepcted animation if adopted.\n if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup[xy];\n }\n // Layout container group based on 0.\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true));\n // Place containerGroup and controllerGroup and contentGroup.\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true);\n // controller is on the right / bottom.\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n }\n // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n }\n // Always align controller to content as 'middle'.\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n contentGroup.setPosition(contentPos);\n containerGroup.setPosition(containerPos);\n controllerGroup.setPosition(controllerPos);\n // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n var mainRect = {\n x: 0,\n y: 0\n };\n // Consider content may be overflow (should be clipped).\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]);\n // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n containerGroup.__rectSize = maxSize[wh];\n if (showController) {\n var clipShape = {\n x: 0,\n y: 0\n };\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({\n shape: clipShape\n }));\n // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n containerGroup.__rectSize = clipShape[wh];\n } else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({\n invisible: true,\n silent: true\n });\n });\n }\n // Content translate animation.\n var pageInfo = this._getPageInfo(legendModel);\n pageInfo.pageIndex != null && graphic.updateProps(contentGroup, {\n x: pageInfo.contentPosition[0],\n y: pageInfo.contentPosition[1]\n },\n // When switch from \"show controller\" to \"not show controller\", view should be\n // updated immediately without animation, otherwise causes weird effect.\n showController ? legendModel : null);\n this._updatePageInfoView(legendModel, pageInfo);\n return mainRect;\n };\n ScrollableLegendView.prototype._pageGo = function (to, legendModel, api) {\n var scrollDataIndex = this._getPageInfo(legendModel)[to];\n scrollDataIndex != null && api.dispatchAction({\n type: 'legendScroll',\n scrollDataIndex: scrollDataIndex,\n legendId: legendModel.id\n });\n };\n ScrollableLegendView.prototype._updatePageInfoView = function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var key = name + 'DataIndex';\n var canJump = pageInfo[key] != null;\n var icon = controllerGroup.childOfName(name);\n if (icon) {\n icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true));\n icon.cursor = canJump ? 'pointer' : 'default';\n }\n });\n var pageText = controllerGroup.childOfName('pageText');\n var pageFormatter = legendModel.get('pageFormatter');\n var pageIndex = pageInfo.pageIndex;\n var current = pageIndex != null ? pageIndex + 1 : 0;\n var total = pageInfo.pageCount;\n pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current == null ? '' : current + '').replace('{total}', total == null ? '' : total + '') : pageFormatter({\n current: current,\n total: total\n }));\n };\n /**\n * contentPosition: Array., null when data item not found.\n * pageIndex: number, null when data item not found.\n * pageCount: number, always be a number, can be 0.\n * pagePrevDataIndex: number, null when no previous page.\n * pageNextDataIndex: number, null when no next page.\n * }\n */\n ScrollableLegendView.prototype._getPageInfo = function (legendModel) {\n var scrollDataIndex = legendModel.get('scrollDataIndex', true);\n var contentGroup = this.getContentGroup();\n var containerRectSize = this._containerGroup.__rectSize;\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var targetItemIndex = this._findTargetItemIndex(scrollDataIndex);\n var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n var result = {\n contentPosition: [contentGroup.x, contentGroup.y],\n pageCount: pCount,\n pageIndex: pCount - 1,\n pagePrevDataIndex: null,\n pageNextDataIndex: null\n };\n if (!targetItem) {\n return result;\n }\n var targetItemInfo = getItemInfo(targetItem);\n result.contentPosition[orientIdx] = -targetItemInfo.s;\n // Strategy:\n // (1) Always align based on the left/top most item.\n // (2) It is user-friendly that the last item shown in the\n // current window is shown at the begining of next window.\n // Otherwise if half of the last item is cut by the window,\n // it will have no chance to display entirely.\n // (3) Consider that item size probably be different, we\n // have calculate pageIndex by size rather than item index,\n // and we can not get page index directly by division.\n // (4) The window is to narrow to contain more than\n // one item, we should make sure that the page can be fliped.\n for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // Half of the last item is out of the window.\n !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize\n // If the current item does not intersect with the window, the new page\n // can be started at the current item or the last item.\n || currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n } else {\n // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n }\n }\n winEndItemInfo = currItemInfo;\n }\n for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // If the the end item does not intersect with the window started\n // from the current item, a page can be settled.\n (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)\n // e.g., when page size is smaller than item size.\n ) && winStartItemInfo.i < winEndItemInfo.i) {\n winEndItemInfo = winStartItemInfo;\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n ++result.pageIndex;\n }\n winStartItemInfo = currItemInfo;\n }\n return result;\n function getItemInfo(el) {\n if (el) {\n var itemRect = el.getBoundingRect();\n var start = itemRect[xy] + el[xy];\n return {\n s: start,\n e: start + itemRect[wh],\n i: el.__legendDataIndex\n };\n }\n }\n function intersect(itemInfo, winStart) {\n return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize;\n }\n };\n ScrollableLegendView.prototype._findTargetItemIndex = function (targetDataIndex) {\n if (!this._showController) {\n return 0;\n }\n var index;\n var contentGroup = this.getContentGroup();\n var defaultIndex;\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex;\n // FIXME\n // If the given targetDataIndex (from model) is illegal,\n // we use defaultIndex. But the index on the legend model and\n // action payload is still illegal. That case will not be\n // changed until some scenario requires.\n if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n return index != null ? index : defaultIndex;\n };\n ScrollableLegendView.type = 'legend.scroll';\n return ScrollableLegendView;\n}(LegendView);\nexport default ScrollableLegendView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function installScrollableLegendAction(registers) {\n /**\n * @event legendScroll\n * @type {Object}\n * @property {string} type 'legendScroll'\n * @property {string} scrollDataIndex\n */\n registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) {\n var scrollDataIndex = payload.scrollDataIndex;\n scrollDataIndex != null && ecModel.eachComponent({\n mainType: 'legend',\n subType: 'scroll',\n query: payload\n }, function (legendModel) {\n legendModel.setScrollDataIndex(scrollDataIndex);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport ScrollableLegendModel from './ScrollableLegendModel.js';\nimport ScrollableLegendView from './ScrollableLegendView.js';\nimport installScrollableLegendAction from './scrollableLegendAction.js';\nexport function install(registers) {\n use(installLegendPlain);\n registers.registerComponentModel(ScrollableLegendModel);\n registers.registerComponentView(ScrollableLegendView);\n installScrollableLegendAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport { install as installLegendScroll } from './installLegendScroll.js';\nexport function install(registers) {\n use(installLegendPlain);\n use(installLegendScroll);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar InsideZoomModel = /** @class */function (_super) {\n __extends(InsideZoomModel, _super);\n function InsideZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = InsideZoomModel.type;\n return _this;\n }\n InsideZoomModel.type = 'dataZoom.inside';\n InsideZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, {\n disabled: false,\n zoomLock: false,\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true\n });\n return InsideZoomModel;\n}(DataZoomModel);\nexport default InsideZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Only create one roam controller for each coordinate system.\n// one roam controller might be refered by two inside data zoom\n// components (for example, one for x and one for y). When user\n// pan or zoom, only dispatch one action for those data zoom\n// components.\nimport RoamController from '../../component/helper/RoamController.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport { makeInner } from '../../util/model.js';\nimport { each, curry, createHashMap } from 'zrender/lib/core/util.js';\nimport { collectReferCoordSysModelInfo } from './helper.js';\nvar inner = makeInner();\nexport function setViewInfoToCoordSysRecord(api, dataZoomModel, getRange) {\n inner(api).coordSysRecordMap.each(function (coordSysRecord) {\n var dzInfo = coordSysRecord.dataZoomInfoMap.get(dataZoomModel.uid);\n if (dzInfo) {\n dzInfo.getRange = getRange;\n }\n });\n}\nexport function disposeCoordSysRecordIfNeeded(api, dataZoomModel) {\n var coordSysRecordMap = inner(api).coordSysRecordMap;\n var coordSysKeyArr = coordSysRecordMap.keys();\n for (var i = 0; i < coordSysKeyArr.length; i++) {\n var coordSysKey = coordSysKeyArr[i];\n var coordSysRecord = coordSysRecordMap.get(coordSysKey);\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap;\n if (dataZoomInfoMap) {\n var dzUid = dataZoomModel.uid;\n var dzInfo = dataZoomInfoMap.get(dzUid);\n if (dzInfo) {\n dataZoomInfoMap.removeKey(dzUid);\n if (!dataZoomInfoMap.keys().length) {\n disposeCoordSysRecord(coordSysRecordMap, coordSysRecord);\n }\n }\n }\n }\n}\nfunction disposeCoordSysRecord(coordSysRecordMap, coordSysRecord) {\n if (coordSysRecord) {\n coordSysRecordMap.removeKey(coordSysRecord.model.uid);\n var controller = coordSysRecord.controller;\n controller && controller.dispose();\n }\n}\nfunction createCoordSysRecord(api, coordSysModel) {\n // These init props will never change after record created.\n var coordSysRecord = {\n model: coordSysModel,\n containsPoint: curry(containsPoint, coordSysModel),\n dispatchAction: curry(dispatchAction, api),\n dataZoomInfoMap: null,\n controller: null\n };\n // Must not do anything depends on coordSysRecord outside the event handler here,\n // because coordSysRecord not completed yet.\n var controller = coordSysRecord.controller = new RoamController(api.getZr());\n each(['pan', 'zoom', 'scrollMove'], function (eventName) {\n controller.on(eventName, function (event) {\n var batch = [];\n coordSysRecord.dataZoomInfoMap.each(function (dzInfo) {\n // Check whether the behaviors (zoomOnMouseWheel, moveOnMouseMove,\n // moveOnMouseWheel, ...) enabled.\n if (!event.isAvailableBehavior(dzInfo.model.option)) {\n return;\n }\n var method = (dzInfo.getRange || {})[eventName];\n var range = method && method(dzInfo.dzReferCoordSysInfo, coordSysRecord.model.mainType, coordSysRecord.controller, event);\n !dzInfo.model.get('disabled', true) && range && batch.push({\n dataZoomId: dzInfo.model.id,\n start: range[0],\n end: range[1]\n });\n });\n batch.length && coordSysRecord.dispatchAction(batch);\n });\n });\n return coordSysRecord;\n}\n/**\n * This action will be throttled.\n */\nfunction dispatchAction(api, batch) {\n if (!api.isDisposed()) {\n api.dispatchAction({\n type: 'dataZoom',\n animation: {\n easing: 'cubicOut',\n duration: 100\n },\n batch: batch\n });\n }\n}\nfunction containsPoint(coordSysModel, e, x, y) {\n return coordSysModel.coordinateSystem.containPoint([x, y]);\n}\n/**\n * Merge roamController settings when multiple dataZooms share one roamController.\n */\nfunction mergeControllerParams(dataZoomInfoMap) {\n var controlType;\n // DO NOT use reserved word (true, false, undefined) as key literally. Even if encapsulated\n // as string, it is probably revert to reserved word by compress tool. See #7411.\n var prefix = 'type_';\n var typePriority = {\n 'type_true': 2,\n 'type_move': 1,\n 'type_false': 0,\n 'type_undefined': -1\n };\n var preventDefaultMouseMove = true;\n dataZoomInfoMap.each(function (dataZoomInfo) {\n var dataZoomModel = dataZoomInfo.model;\n var oneType = dataZoomModel.get('disabled', true) ? false : dataZoomModel.get('zoomLock', true) ? 'move' : true;\n if (typePriority[prefix + oneType] > typePriority[prefix + controlType]) {\n controlType = oneType;\n }\n // Prevent default move event by default. If one false, do not prevent. Otherwise\n // users may be confused why it does not work when multiple insideZooms exist.\n preventDefaultMouseMove = preventDefaultMouseMove && dataZoomModel.get('preventDefaultMouseMove', true);\n });\n return {\n controlType: controlType,\n opt: {\n // RoamController will enable all of these functionalities,\n // and the final behavior is determined by its event listener\n // provided by each inside zoom.\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n moveOnMouseWheel: true,\n preventDefaultMouseMove: !!preventDefaultMouseMove\n }\n };\n}\nexport function installDataZoomRoamProcessor(registers) {\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, function (ecModel, api) {\n var apiInner = inner(api);\n var coordSysRecordMap = apiInner.coordSysRecordMap || (apiInner.coordSysRecordMap = createHashMap());\n coordSysRecordMap.each(function (coordSysRecord) {\n // `coordSysRecordMap` always exists (because it holds the `roam controller`, which should\n // better not re-create each time), but clear `dataZoomInfoMap` each round of the workflow.\n coordSysRecord.dataZoomInfoMap = null;\n });\n ecModel.eachComponent({\n mainType: 'dataZoom',\n subType: 'inside'\n }, function (dataZoomModel) {\n var dzReferCoordSysWrap = collectReferCoordSysModelInfo(dataZoomModel);\n each(dzReferCoordSysWrap.infoList, function (dzCoordSysInfo) {\n var coordSysUid = dzCoordSysInfo.model.uid;\n var coordSysRecord = coordSysRecordMap.get(coordSysUid) || coordSysRecordMap.set(coordSysUid, createCoordSysRecord(api, dzCoordSysInfo.model));\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap || (coordSysRecord.dataZoomInfoMap = createHashMap());\n // Notice these props might be changed each time for a single dataZoomModel.\n dataZoomInfoMap.set(dataZoomModel.uid, {\n dzReferCoordSysInfo: dzCoordSysInfo,\n model: dataZoomModel,\n getRange: null\n });\n });\n });\n // (1) Merge dataZoom settings for each coord sys and set to the roam controller.\n // (2) Clear coord sys if not refered by any dataZoom.\n coordSysRecordMap.each(function (coordSysRecord) {\n var controller = coordSysRecord.controller;\n var firstDzInfo;\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap;\n if (dataZoomInfoMap) {\n var firstDzKey = dataZoomInfoMap.keys()[0];\n if (firstDzKey != null) {\n firstDzInfo = dataZoomInfoMap.get(firstDzKey);\n }\n }\n if (!firstDzInfo) {\n disposeCoordSysRecord(coordSysRecordMap, coordSysRecord);\n return;\n }\n var controllerParams = mergeControllerParams(dataZoomInfoMap);\n controller.enable(controllerParams.controlType, controllerParams.opt);\n controller.setPointerChecker(coordSysRecord.containsPoint);\n throttleUtil.createOrUpdate(coordSysRecord, 'dispatchAction', firstDzInfo.model.get('throttle', true), 'fixRate');\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomView from './DataZoomView.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport * as roams from './roams.js';\nimport { bind } from 'zrender/lib/core/util.js';\nvar InsideZoomView = /** @class */function (_super) {\n __extends(InsideZoomView, _super);\n function InsideZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataZoom.inside';\n return _this;\n }\n InsideZoomView.prototype.render = function (dataZoomModel, ecModel, api) {\n _super.prototype.render.apply(this, arguments);\n if (dataZoomModel.noTarget()) {\n this._clear();\n return;\n }\n // Hence the `throttle` util ensures to preserve command order,\n // here simply updating range all the time will not cause missing\n // any of the the roam change.\n this.range = dataZoomModel.getPercentRange();\n // Reset controllers.\n roams.setViewInfoToCoordSysRecord(api, dataZoomModel, {\n pan: bind(getRangeHandlers.pan, this),\n zoom: bind(getRangeHandlers.zoom, this),\n scrollMove: bind(getRangeHandlers.scrollMove, this)\n });\n };\n InsideZoomView.prototype.dispose = function () {\n this._clear();\n _super.prototype.dispose.apply(this, arguments);\n };\n InsideZoomView.prototype._clear = function () {\n roams.disposeCoordSysRecordIfNeeded(this.api, this.dataZoomModel);\n this.range = null;\n };\n InsideZoomView.type = 'dataZoom.inside';\n return InsideZoomView;\n}(DataZoomView);\nvar getRangeHandlers = {\n zoom: function (coordSysInfo, coordSysMainType, controller, e) {\n var lastRange = this.range;\n var range = lastRange.slice();\n // Calculate transform by the first axis.\n var axisModel = coordSysInfo.axisModels[0];\n if (!axisModel) {\n return;\n }\n var directionInfo = getDirectionInfo[coordSysMainType](null, [e.originX, e.originY], axisModel, controller, coordSysInfo);\n var percentPoint = (directionInfo.signal > 0 ? directionInfo.pixelStart + directionInfo.pixelLength - directionInfo.pixel : directionInfo.pixel - directionInfo.pixelStart) / directionInfo.pixelLength * (range[1] - range[0]) + range[0];\n var scale = Math.max(1 / e.scale, 0);\n range[0] = (range[0] - percentPoint) * scale + percentPoint;\n range[1] = (range[1] - percentPoint) * scale + percentPoint;\n // Restrict range.\n var minMaxSpan = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n sliderMove(0, range, [0, 100], 0, minMaxSpan.minSpan, minMaxSpan.maxSpan);\n this.range = range;\n if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) {\n return range;\n }\n },\n pan: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) {\n var directionInfo = getDirectionInfo[coordSysMainType]([e.oldX, e.oldY], [e.newX, e.newY], axisModel, controller, coordSysInfo);\n return directionInfo.signal * (range[1] - range[0]) * directionInfo.pixel / directionInfo.pixelLength;\n }),\n scrollMove: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) {\n var directionInfo = getDirectionInfo[coordSysMainType]([0, 0], [e.scrollDelta, e.scrollDelta], axisModel, controller, coordSysInfo);\n return directionInfo.signal * (range[1] - range[0]) * e.scrollDelta;\n })\n};\nfunction makeMover(getPercentDelta) {\n return function (coordSysInfo, coordSysMainType, controller, e) {\n var lastRange = this.range;\n var range = lastRange.slice();\n // Calculate transform by the first axis.\n var axisModel = coordSysInfo.axisModels[0];\n if (!axisModel) {\n return;\n }\n var percentDelta = getPercentDelta(range, axisModel, coordSysInfo, coordSysMainType, controller, e);\n sliderMove(percentDelta, range, [0, 100], 'all');\n this.range = range;\n if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) {\n return range;\n }\n };\n}\nvar getDirectionInfo = {\n grid: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var ret = {};\n var rect = coordSysInfo.model.coordinateSystem.getRect();\n oldPoint = oldPoint || [0, 0];\n if (axis.dim === 'x') {\n ret.pixel = newPoint[0] - oldPoint[0];\n ret.pixelLength = rect.width;\n ret.pixelStart = rect.x;\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // axis.dim === 'y'\n ret.pixel = newPoint[1] - oldPoint[1];\n ret.pixelLength = rect.height;\n ret.pixelStart = rect.y;\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n },\n polar: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var ret = {};\n var polar = coordSysInfo.model.coordinateSystem;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var angleExtent = polar.getAngleAxis().getExtent();\n oldPoint = oldPoint ? polar.pointToCoord(oldPoint) : [0, 0];\n newPoint = polar.pointToCoord(newPoint);\n if (axisModel.mainType === 'radiusAxis') {\n ret.pixel = newPoint[0] - oldPoint[0];\n // ret.pixelLength = Math.abs(radiusExtent[1] - radiusExtent[0]);\n // ret.pixelStart = Math.min(radiusExtent[0], radiusExtent[1]);\n ret.pixelLength = radiusExtent[1] - radiusExtent[0];\n ret.pixelStart = radiusExtent[0];\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // 'angleAxis'\n ret.pixel = newPoint[1] - oldPoint[1];\n // ret.pixelLength = Math.abs(angleExtent[1] - angleExtent[0]);\n // ret.pixelStart = Math.min(angleExtent[0], angleExtent[1]);\n ret.pixelLength = angleExtent[1] - angleExtent[0];\n ret.pixelStart = angleExtent[0];\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n },\n singleAxis: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var rect = coordSysInfo.model.coordinateSystem.getRect();\n var ret = {};\n oldPoint = oldPoint || [0, 0];\n if (axis.orient === 'horizontal') {\n ret.pixel = newPoint[0] - oldPoint[0];\n ret.pixelLength = rect.width;\n ret.pixelStart = rect.x;\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // 'vertical'\n ret.pixel = newPoint[1] - oldPoint[1];\n ret.pixelLength = rect.height;\n ret.pixelStart = rect.y;\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n }\n};\nexport default InsideZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport InsideZoomModel from './InsideZoomModel.js';\nimport InsideZoomView from './InsideZoomView.js';\nimport { installDataZoomRoamProcessor } from './roams.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n installCommon(registers);\n registers.registerComponentModel(InsideZoomModel);\n registers.registerComponentView(InsideZoomView);\n installDataZoomRoamProcessor(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar SliderZoomModel = /** @class */function (_super) {\n __extends(SliderZoomModel, _super);\n function SliderZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderZoomModel.type;\n return _this;\n }\n SliderZoomModel.type = 'dataZoom.slider';\n SliderZoomModel.layoutMode = 'box';\n SliderZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, {\n show: true,\n // deault value can only be drived in view stage.\n right: 'ph',\n top: 'ph',\n width: 'ph',\n height: 'ph',\n left: null,\n bottom: null,\n borderColor: '#d2dbee',\n borderRadius: 3,\n backgroundColor: 'rgba(47,69,84,0)',\n // dataBackgroundColor: '#ddd',\n dataBackground: {\n lineStyle: {\n color: '#d2dbee',\n width: 0.5\n },\n areaStyle: {\n color: '#d2dbee',\n opacity: 0.2\n }\n },\n selectedDataBackground: {\n lineStyle: {\n color: '#8fb0f7',\n width: 0.5\n },\n areaStyle: {\n color: '#8fb0f7',\n opacity: 0.2\n }\n },\n // Color of selected window.\n fillerColor: 'rgba(135,175,274,0.2)',\n handleIcon: 'path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z',\n // Percent of the slider height\n handleSize: '100%',\n handleStyle: {\n color: '#fff',\n borderColor: '#ACB8D1'\n },\n moveHandleSize: 7,\n moveHandleIcon: 'path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z',\n moveHandleStyle: {\n color: '#D2DBEE',\n opacity: 0.7\n },\n showDetail: true,\n showDataShadow: 'auto',\n realtime: true,\n zoomLock: false,\n textStyle: {\n color: '#6E7079'\n },\n brushSelect: true,\n brushStyle: {\n color: 'rgba(135,175,274,0.15)'\n },\n emphasis: {\n handleStyle: {\n borderColor: '#8FB0F7'\n },\n moveHandleStyle: {\n color: '#8FB0F7'\n }\n }\n });\n return SliderZoomModel;\n}(DataZoomModel);\nexport default SliderZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { bind, each, isFunction, isString, indexOf } from 'zrender/lib/core/util.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as throttle from '../../util/throttle.js';\nimport DataZoomView from './DataZoomView.js';\nimport { linearMap, asc, parsePercent } from '../../util/number.js';\nimport * as layout from '../../util/layout.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport { getAxisMainType, collectReferCoordSysModelInfo } from './helper.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { createSymbol, symbolBuildProxies } from '../../util/symbol.js';\nimport { deprecateLog } from '../../util/log.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nvar Rect = graphic.Rect;\n// Constants\nvar DEFAULT_LOCATION_EDGE_GAP = 7;\nvar DEFAULT_FRAME_BORDER_WIDTH = 1;\nvar DEFAULT_FILLER_SIZE = 30;\nvar DEFAULT_MOVE_HANDLE_SIZE = 7;\nvar HORIZONTAL = 'horizontal';\nvar VERTICAL = 'vertical';\nvar LABEL_GAP = 5;\nvar SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter'];\nvar REALTIME_ANIMATION_CONFIG = {\n easing: 'cubicOut',\n duration: 100,\n delay: 0\n};\nvar SliderZoomView = /** @class */function (_super) {\n __extends(SliderZoomView, _super);\n function SliderZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderZoomView.type;\n _this._displayables = {};\n return _this;\n }\n SliderZoomView.prototype.init = function (ecModel, api) {\n this.api = api;\n // A unique handler for each dataZoom component\n this._onBrush = bind(this._onBrush, this);\n this._onBrushEnd = bind(this._onBrushEnd, this);\n };\n SliderZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) {\n _super.prototype.render.apply(this, arguments);\n throttle.createOrUpdate(this, '_dispatchZoomAction', dataZoomModel.get('throttle'), 'fixRate');\n this._orient = dataZoomModel.getOrient();\n if (dataZoomModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n if (dataZoomModel.noTarget()) {\n this._clear();\n this.group.removeAll();\n return;\n }\n // Notice: this._resetInterval() should not be executed when payload.type\n // is 'dataZoom', origin this._range should be maintained, otherwise 'pan'\n // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction,\n if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) {\n this._buildView();\n }\n this._updateView();\n };\n SliderZoomView.prototype.dispose = function () {\n this._clear();\n _super.prototype.dispose.apply(this, arguments);\n };\n SliderZoomView.prototype._clear = function () {\n throttle.clear(this, '_dispatchZoomAction');\n var zr = this.api.getZr();\n zr.off('mousemove', this._onBrush);\n zr.off('mouseup', this._onBrushEnd);\n };\n SliderZoomView.prototype._buildView = function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n this._brushing = false;\n this._displayables.brushRect = null;\n this._resetLocation();\n this._resetInterval();\n var barGroup = this._displayables.sliderGroup = new graphic.Group();\n this._renderBackground();\n this._renderHandle();\n this._renderDataShadow();\n thisGroup.add(barGroup);\n this._positionGroup();\n };\n SliderZoomView.prototype._resetLocation = function () {\n var dataZoomModel = this.dataZoomModel;\n var api = this.api;\n var showMoveHandle = dataZoomModel.get('brushSelect');\n var moveHandleSize = showMoveHandle ? DEFAULT_MOVE_HANDLE_SIZE : 0;\n // If some of x/y/width/height are not specified,\n // auto-adapt according to target grid.\n var coordRect = this._findCoordRect();\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n // Default align by coordinate system rect.\n var positionInfo = this._orient === HORIZONTAL ? {\n // Why using 'right', because right should be used in vertical,\n // and it is better to be consistent for dealing with position param merge.\n right: ecSize.width - coordRect.x - coordRect.width,\n top: ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP - moveHandleSize,\n width: coordRect.width,\n height: DEFAULT_FILLER_SIZE\n } : {\n right: DEFAULT_LOCATION_EDGE_GAP,\n top: coordRect.y,\n width: DEFAULT_FILLER_SIZE,\n height: coordRect.height\n };\n // Do not write back to option and replace value 'ph', because\n // the 'ph' value should be recalculated when resize.\n var layoutParams = layout.getLayoutParams(dataZoomModel.option);\n // Replace the placeholder value.\n each(['right', 'top', 'width', 'height'], function (name) {\n if (layoutParams[name] === 'ph') {\n layoutParams[name] = positionInfo[name];\n }\n });\n var layoutRect = layout.getLayoutRect(layoutParams, ecSize);\n this._location = {\n x: layoutRect.x,\n y: layoutRect.y\n };\n this._size = [layoutRect.width, layoutRect.height];\n this._orient === VERTICAL && this._size.reverse();\n };\n SliderZoomView.prototype._positionGroup = function () {\n var thisGroup = this.group;\n var location = this._location;\n var orient = this._orient;\n // Just use the first axis to determine mapping.\n var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel();\n var inverse = targetAxisModel && targetAxisModel.get('inverse');\n var sliderGroup = this._displayables.sliderGroup;\n var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse;\n // Transform barGroup.\n sliderGroup.attr(orient === HORIZONTAL && !inverse ? {\n scaleY: otherAxisInverse ? 1 : -1,\n scaleX: 1\n } : orient === HORIZONTAL && inverse ? {\n scaleY: otherAxisInverse ? 1 : -1,\n scaleX: -1\n } : orient === VERTICAL && !inverse ? {\n scaleY: otherAxisInverse ? -1 : 1,\n scaleX: 1,\n rotation: Math.PI / 2\n }\n // Don't use Math.PI, considering shadow direction.\n : {\n scaleY: otherAxisInverse ? -1 : 1,\n scaleX: -1,\n rotation: Math.PI / 2\n });\n // Position barGroup\n var rect = thisGroup.getBoundingRect([sliderGroup]);\n thisGroup.x = location.x - rect.x;\n thisGroup.y = location.y - rect.y;\n thisGroup.markRedraw();\n };\n SliderZoomView.prototype._getViewExtent = function () {\n return [0, this._size[0]];\n };\n SliderZoomView.prototype._renderBackground = function () {\n var dataZoomModel = this.dataZoomModel;\n var size = this._size;\n var barGroup = this._displayables.sliderGroup;\n var brushSelect = dataZoomModel.get('brushSelect');\n barGroup.add(new Rect({\n silent: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: dataZoomModel.get('backgroundColor')\n },\n z2: -40\n }));\n // Click panel, over shadow, below handles.\n var clickPanel = new Rect({\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: 'transparent'\n },\n z2: 0,\n onclick: bind(this._onClickPanel, this)\n });\n var zr = this.api.getZr();\n if (brushSelect) {\n clickPanel.on('mousedown', this._onBrushStart, this);\n clickPanel.cursor = 'crosshair';\n zr.on('mousemove', this._onBrush);\n zr.on('mouseup', this._onBrushEnd);\n } else {\n zr.off('mousemove', this._onBrush);\n zr.off('mouseup', this._onBrushEnd);\n }\n barGroup.add(clickPanel);\n };\n SliderZoomView.prototype._renderDataShadow = function () {\n var info = this._dataShadowInfo = this._prepareDataShadowInfo();\n this._displayables.dataShadowSegs = [];\n if (!info) {\n return;\n }\n var size = this._size;\n var oldSize = this._shadowSize || [];\n var seriesModel = info.series;\n var data = seriesModel.getRawData();\n var candlestickDim = seriesModel.getShadowDim && seriesModel.getShadowDim();\n var otherDim = candlestickDim && data.getDimensionInfo(candlestickDim) ? seriesModel.getShadowDim() // @see candlestick\n : info.otherDim;\n if (otherDim == null) {\n return;\n }\n var polygonPts = this._shadowPolygonPts;\n var polylinePts = this._shadowPolylinePts;\n // Not re-render if data doesn't change.\n if (data !== this._shadowData || otherDim !== this._shadowDim || size[0] !== oldSize[0] || size[1] !== oldSize[1]) {\n var otherDataExtent_1 = data.getDataExtent(otherDim);\n // Nice extent.\n var otherOffset = (otherDataExtent_1[1] - otherDataExtent_1[0]) * 0.3;\n otherDataExtent_1 = [otherDataExtent_1[0] - otherOffset, otherDataExtent_1[1] + otherOffset];\n var otherShadowExtent_1 = [0, size[1]];\n var thisShadowExtent = [0, size[0]];\n var areaPoints_1 = [[size[0], 0], [0, 0]];\n var linePoints_1 = [];\n var step_1 = thisShadowExtent[1] / (data.count() - 1);\n var thisCoord_1 = 0;\n // Optimize for large data shadow\n var stride_1 = Math.round(data.count() / size[0]);\n var lastIsEmpty_1;\n data.each([otherDim], function (value, index) {\n if (stride_1 > 0 && index % stride_1) {\n thisCoord_1 += step_1;\n return;\n }\n // FIXME\n // Should consider axis.min/axis.max when drawing dataShadow.\n // FIXME\n // 应该使用统一的空判断?还是在list里进行空判断?\n var isEmpty = value == null || isNaN(value) || value === '';\n // See #4235.\n var otherCoord = isEmpty ? 0 : linearMap(value, otherDataExtent_1, otherShadowExtent_1, true);\n // Attempt to draw data shadow precisely when there are empty value.\n if (isEmpty && !lastIsEmpty_1 && index) {\n areaPoints_1.push([areaPoints_1[areaPoints_1.length - 1][0], 0]);\n linePoints_1.push([linePoints_1[linePoints_1.length - 1][0], 0]);\n } else if (!isEmpty && lastIsEmpty_1) {\n areaPoints_1.push([thisCoord_1, 0]);\n linePoints_1.push([thisCoord_1, 0]);\n }\n areaPoints_1.push([thisCoord_1, otherCoord]);\n linePoints_1.push([thisCoord_1, otherCoord]);\n thisCoord_1 += step_1;\n lastIsEmpty_1 = isEmpty;\n });\n polygonPts = this._shadowPolygonPts = areaPoints_1;\n polylinePts = this._shadowPolylinePts = linePoints_1;\n }\n this._shadowData = data;\n this._shadowDim = otherDim;\n this._shadowSize = [size[0], size[1]];\n var dataZoomModel = this.dataZoomModel;\n function createDataShadowGroup(isSelectedArea) {\n var model = dataZoomModel.getModel(isSelectedArea ? 'selectedDataBackground' : 'dataBackground');\n var group = new graphic.Group();\n var polygon = new graphic.Polygon({\n shape: {\n points: polygonPts\n },\n segmentIgnoreThreshold: 1,\n style: model.getModel('areaStyle').getAreaStyle(),\n silent: true,\n z2: -20\n });\n var polyline = new graphic.Polyline({\n shape: {\n points: polylinePts\n },\n segmentIgnoreThreshold: 1,\n style: model.getModel('lineStyle').getLineStyle(),\n silent: true,\n z2: -19\n });\n group.add(polygon);\n group.add(polyline);\n return group;\n }\n // let dataBackgroundModel = dataZoomModel.getModel('dataBackground');\n for (var i = 0; i < 3; i++) {\n var group = createDataShadowGroup(i === 1);\n this._displayables.sliderGroup.add(group);\n this._displayables.dataShadowSegs.push(group);\n }\n };\n SliderZoomView.prototype._prepareDataShadowInfo = function () {\n var dataZoomModel = this.dataZoomModel;\n var showDataShadow = dataZoomModel.get('showDataShadow');\n if (showDataShadow === false) {\n return;\n }\n // Find a representative series.\n var result;\n var ecModel = this.ecModel;\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var seriesModels = dataZoomModel.getAxisProxy(axisDim, axisIndex).getTargetSeriesModels();\n each(seriesModels, function (seriesModel) {\n if (result) {\n return;\n }\n if (showDataShadow !== true && indexOf(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) {\n return;\n }\n var thisAxis = ecModel.getComponent(getAxisMainType(axisDim), axisIndex).axis;\n var otherDim = getOtherDim(axisDim);\n var otherAxisInverse;\n var coordSys = seriesModel.coordinateSystem;\n if (otherDim != null && coordSys.getOtherAxis) {\n otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse;\n }\n otherDim = seriesModel.getData().mapDimension(otherDim);\n result = {\n thisAxis: thisAxis,\n series: seriesModel,\n thisDim: axisDim,\n otherDim: otherDim,\n otherAxisInverse: otherAxisInverse\n };\n }, this);\n }, this);\n return result;\n };\n SliderZoomView.prototype._renderHandle = function () {\n var thisGroup = this.group;\n var displayables = this._displayables;\n var handles = displayables.handles = [null, null];\n var handleLabels = displayables.handleLabels = [null, null];\n var sliderGroup = this._displayables.sliderGroup;\n var size = this._size;\n var dataZoomModel = this.dataZoomModel;\n var api = this.api;\n var borderRadius = dataZoomModel.get('borderRadius') || 0;\n var brushSelect = dataZoomModel.get('brushSelect');\n var filler = displayables.filler = new Rect({\n silent: brushSelect,\n style: {\n fill: dataZoomModel.get('fillerColor')\n },\n textConfig: {\n position: 'inside'\n }\n });\n sliderGroup.add(filler);\n // Frame border.\n sliderGroup.add(new Rect({\n silent: true,\n subPixelOptimize: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1],\n r: borderRadius\n },\n style: {\n // deprecated option\n stroke: dataZoomModel.get('dataBackgroundColor') || dataZoomModel.get('borderColor'),\n lineWidth: DEFAULT_FRAME_BORDER_WIDTH,\n fill: 'rgba(0,0,0,0)'\n }\n }));\n // Left and right handle to resize\n each([0, 1], function (handleIndex) {\n var iconStr = dataZoomModel.get('handleIcon');\n if (!symbolBuildProxies[iconStr] && iconStr.indexOf('path://') < 0 && iconStr.indexOf('image://') < 0) {\n // Compatitable with the old icon parsers. Which can use a path string without path://\n iconStr = 'path://' + iconStr;\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog('handleIcon now needs \\'path://\\' prefix when using a path string');\n }\n }\n var path = createSymbol(iconStr, -1, 0, 2, 2, null, true);\n path.attr({\n cursor: getCursor(this._orient),\n draggable: true,\n drift: bind(this._onDragMove, this, handleIndex),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false),\n z2: 5\n });\n var bRect = path.getBoundingRect();\n var handleSize = dataZoomModel.get('handleSize');\n this._handleHeight = parsePercent(handleSize, this._size[1]);\n this._handleWidth = bRect.width / bRect.height * this._handleHeight;\n path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle());\n path.style.strokeNoScale = true;\n path.rectHover = true;\n path.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'handleStyle']).getItemStyle();\n enableHoverEmphasis(path);\n var handleColor = dataZoomModel.get('handleColor'); // deprecated option\n // Compatitable with previous version\n if (handleColor != null) {\n path.style.fill = handleColor;\n }\n sliderGroup.add(handles[handleIndex] = path);\n var textStyleModel = dataZoomModel.getModel('textStyle');\n thisGroup.add(handleLabels[handleIndex] = new graphic.Text({\n silent: true,\n invisible: true,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: '',\n verticalAlign: 'middle',\n align: 'center',\n fill: textStyleModel.getTextColor(),\n font: textStyleModel.getFont()\n }),\n z2: 10\n }));\n }, this);\n // Handle to move. Only visible when brushSelect is set true.\n var actualMoveZone = filler;\n if (brushSelect) {\n var moveHandleHeight = parsePercent(dataZoomModel.get('moveHandleSize'), size[1]);\n var moveHandle_1 = displayables.moveHandle = new graphic.Rect({\n style: dataZoomModel.getModel('moveHandleStyle').getItemStyle(),\n silent: true,\n shape: {\n r: [0, 0, 2, 2],\n y: size[1] - 0.5,\n height: moveHandleHeight\n }\n });\n var iconSize = moveHandleHeight * 0.8;\n var moveHandleIcon = displayables.moveHandleIcon = createSymbol(dataZoomModel.get('moveHandleIcon'), -iconSize / 2, -iconSize / 2, iconSize, iconSize, '#fff', true);\n moveHandleIcon.silent = true;\n moveHandleIcon.y = size[1] + moveHandleHeight / 2 - 0.5;\n moveHandle_1.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'moveHandleStyle']).getItemStyle();\n var moveZoneExpandSize = Math.min(size[1] / 2, Math.max(moveHandleHeight, 10));\n actualMoveZone = displayables.moveZone = new graphic.Rect({\n invisible: true,\n shape: {\n y: size[1] - moveZoneExpandSize,\n height: moveHandleHeight + moveZoneExpandSize\n }\n });\n actualMoveZone.on('mouseover', function () {\n api.enterEmphasis(moveHandle_1);\n }).on('mouseout', function () {\n api.leaveEmphasis(moveHandle_1);\n });\n sliderGroup.add(moveHandle_1);\n sliderGroup.add(moveHandleIcon);\n sliderGroup.add(actualMoveZone);\n }\n actualMoveZone.attr({\n draggable: true,\n cursor: getCursor(this._orient),\n drift: bind(this._onDragMove, this, 'all'),\n ondragstart: bind(this._showDataInfo, this, true),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false)\n });\n };\n SliderZoomView.prototype._resetInterval = function () {\n var range = this._range = this.dataZoomModel.getPercentRange();\n var viewExtent = this._getViewExtent();\n this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)];\n };\n SliderZoomView.prototype._updateInterval = function (handleIndex, delta) {\n var dataZoomModel = this.dataZoomModel;\n var handleEnds = this._handleEnds;\n var viewExtend = this._getViewExtent();\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n var percentExtent = [0, 100];\n sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null);\n var lastRange = this._range;\n var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]);\n return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1];\n };\n SliderZoomView.prototype._updateView = function (nonRealtime) {\n var displaybles = this._displayables;\n var handleEnds = this._handleEnds;\n var handleInterval = asc(handleEnds.slice());\n var size = this._size;\n each([0, 1], function (handleIndex) {\n // Handles\n var handle = displaybles.handles[handleIndex];\n var handleHeight = this._handleHeight;\n handle.attr({\n scaleX: handleHeight / 2,\n scaleY: handleHeight / 2,\n // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.\n // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.\n x: handleEnds[handleIndex] + (handleIndex ? -1 : 1),\n y: size[1] / 2 - handleHeight / 2\n });\n }, this);\n // Filler\n displaybles.filler.setShape({\n x: handleInterval[0],\n y: 0,\n width: handleInterval[1] - handleInterval[0],\n height: size[1]\n });\n var viewExtent = {\n x: handleInterval[0],\n width: handleInterval[1] - handleInterval[0]\n };\n // Move handle\n if (displaybles.moveHandle) {\n displaybles.moveHandle.setShape(viewExtent);\n displaybles.moveZone.setShape(viewExtent);\n // Force update path on the invisible object\n displaybles.moveZone.getBoundingRect();\n displaybles.moveHandleIcon && displaybles.moveHandleIcon.attr('x', viewExtent.x + viewExtent.width / 2);\n }\n // update clip path of shadow.\n var dataShadowSegs = displaybles.dataShadowSegs;\n var segIntervals = [0, handleInterval[0], handleInterval[1], size[0]];\n for (var i = 0; i < dataShadowSegs.length; i++) {\n var segGroup = dataShadowSegs[i];\n var clipPath = segGroup.getClipPath();\n if (!clipPath) {\n clipPath = new graphic.Rect();\n segGroup.setClipPath(clipPath);\n }\n clipPath.setShape({\n x: segIntervals[i],\n y: 0,\n width: segIntervals[i + 1] - segIntervals[i],\n height: size[1]\n });\n }\n this._updateDataInfo(nonRealtime);\n };\n SliderZoomView.prototype._updateDataInfo = function (nonRealtime) {\n var dataZoomModel = this.dataZoomModel;\n var displaybles = this._displayables;\n var handleLabels = displaybles.handleLabels;\n var orient = this._orient;\n var labelTexts = ['', ''];\n // FIXME\n // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter)\n if (dataZoomModel.get('showDetail')) {\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n if (axisProxy) {\n var axis = axisProxy.getAxisModel().axis;\n var range = this._range;\n var dataInterval = nonRealtime\n // See #4434, data and axis are not processed and reset yet in non-realtime mode.\n ? axisProxy.calculateDataWindow({\n start: range[0],\n end: range[1]\n }).valueWindow : axisProxy.getDataValueWindow();\n labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)];\n }\n }\n var orderedHandleEnds = asc(this._handleEnds.slice());\n setLabel.call(this, 0);\n setLabel.call(this, 1);\n function setLabel(handleIndex) {\n // Label\n // Text should not transform by barGroup.\n // Ignore handlers transform\n var barTransform = graphic.getTransform(displaybles.handles[handleIndex].parent, this.group);\n var direction = graphic.transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform);\n var offset = this._handleWidth / 2 + LABEL_GAP;\n var textPoint = graphic.applyTransform([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform);\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n verticalAlign: orient === HORIZONTAL ? 'middle' : direction,\n align: orient === HORIZONTAL ? direction : 'center',\n text: labelTexts[handleIndex]\n });\n }\n };\n SliderZoomView.prototype._formatLabel = function (value, axis) {\n var dataZoomModel = this.dataZoomModel;\n var labelFormatter = dataZoomModel.get('labelFormatter');\n var labelPrecision = dataZoomModel.get('labelPrecision');\n if (labelPrecision == null || labelPrecision === 'auto') {\n labelPrecision = axis.getPixelPrecision();\n }\n var valueStr = value == null || isNaN(value) ? ''\n // FIXME Glue code\n : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel({\n value: Math.round(value)\n })\n // param of toFixed should less then 20.\n : value.toFixed(Math.min(labelPrecision, 20));\n return isFunction(labelFormatter) ? labelFormatter(value, valueStr) : isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr;\n };\n /**\n * @param showOrHide true: show, false: hide\n */\n SliderZoomView.prototype._showDataInfo = function (showOrHide) {\n // Always show when drgging.\n showOrHide = this._dragging || showOrHide;\n var displayables = this._displayables;\n var handleLabels = displayables.handleLabels;\n handleLabels[0].attr('invisible', !showOrHide);\n handleLabels[1].attr('invisible', !showOrHide);\n // Highlight move handle\n displayables.moveHandle && this.api[showOrHide ? 'enterEmphasis' : 'leaveEmphasis'](displayables.moveHandle, 1);\n };\n SliderZoomView.prototype._onDragMove = function (handleIndex, dx, dy, event) {\n this._dragging = true;\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(event.event);\n // Transform dx, dy to bar coordination.\n var barTransform = this._displayables.sliderGroup.getLocalTransform();\n var vertex = graphic.applyTransform([dx, dy], barTransform, true);\n var changed = this._updateInterval(handleIndex, vertex[0]);\n var realtime = this.dataZoomModel.get('realtime');\n this._updateView(!realtime);\n // Avoid dispatch dataZoom repeatly but range not changed,\n // which cause bad visual effect when progressive enabled.\n changed && realtime && this._dispatchZoomAction(true);\n };\n SliderZoomView.prototype._onDragEnd = function () {\n this._dragging = false;\n this._showDataInfo(false);\n // While in realtime mode and stream mode, dispatch action when\n // drag end will cause the whole view rerender, which is unnecessary.\n var realtime = this.dataZoomModel.get('realtime');\n !realtime && this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onClickPanel = function (e) {\n var size = this._size;\n var localPoint = this._displayables.sliderGroup.transformCoordToLocal(e.offsetX, e.offsetY);\n if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) {\n return;\n }\n var handleEnds = this._handleEnds;\n var center = (handleEnds[0] + handleEnds[1]) / 2;\n var changed = this._updateInterval('all', localPoint[0] - center);\n this._updateView();\n changed && this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onBrushStart = function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n this._brushStart = new graphic.Point(x, y);\n this._brushing = true;\n this._brushStartTime = +new Date();\n // this._updateBrushRect(x, y);\n };\n\n SliderZoomView.prototype._onBrushEnd = function (e) {\n if (!this._brushing) {\n return;\n }\n var brushRect = this._displayables.brushRect;\n this._brushing = false;\n if (!brushRect) {\n return;\n }\n brushRect.attr('ignore', true);\n var brushShape = brushRect.shape;\n var brushEndTime = +new Date();\n // console.log(brushEndTime - this._brushStartTime);\n if (brushEndTime - this._brushStartTime < 200 && Math.abs(brushShape.width) < 5) {\n // Will treat it as a click\n return;\n }\n var viewExtend = this._getViewExtent();\n var percentExtent = [0, 100];\n this._range = asc([linearMap(brushShape.x, viewExtend, percentExtent, true), linearMap(brushShape.x + brushShape.width, viewExtend, percentExtent, true)]);\n this._handleEnds = [brushShape.x, brushShape.x + brushShape.width];\n this._updateView();\n this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onBrush = function (e) {\n if (this._brushing) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n this._updateBrushRect(e.offsetX, e.offsetY);\n }\n };\n SliderZoomView.prototype._updateBrushRect = function (mouseX, mouseY) {\n var displayables = this._displayables;\n var dataZoomModel = this.dataZoomModel;\n var brushRect = displayables.brushRect;\n if (!brushRect) {\n brushRect = displayables.brushRect = new Rect({\n silent: true,\n style: dataZoomModel.getModel('brushStyle').getItemStyle()\n });\n displayables.sliderGroup.add(brushRect);\n }\n brushRect.attr('ignore', false);\n var brushStart = this._brushStart;\n var sliderGroup = this._displayables.sliderGroup;\n var endPoint = sliderGroup.transformCoordToLocal(mouseX, mouseY);\n var startPoint = sliderGroup.transformCoordToLocal(brushStart.x, brushStart.y);\n var size = this._size;\n endPoint[0] = Math.max(Math.min(size[0], endPoint[0]), 0);\n brushRect.setShape({\n x: startPoint[0],\n y: 0,\n width: endPoint[0] - startPoint[0],\n height: size[1]\n });\n };\n /**\n * This action will be throttled.\n */\n SliderZoomView.prototype._dispatchZoomAction = function (realtime) {\n var range = this._range;\n this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n dataZoomId: this.dataZoomModel.id,\n animation: realtime ? REALTIME_ANIMATION_CONFIG : null,\n start: range[0],\n end: range[1]\n });\n };\n SliderZoomView.prototype._findCoordRect = function () {\n // Find the grid corresponding to the first axis referred by dataZoom.\n var rect;\n var coordSysInfoList = collectReferCoordSysModelInfo(this.dataZoomModel).infoList;\n if (!rect && coordSysInfoList.length) {\n var coordSys = coordSysInfoList[0].model.coordinateSystem;\n rect = coordSys.getRect && coordSys.getRect();\n }\n if (!rect) {\n var width = this.api.getWidth();\n var height = this.api.getHeight();\n rect = {\n x: width * 0.2,\n y: height * 0.2,\n width: width * 0.6,\n height: height * 0.6\n };\n }\n return rect;\n };\n SliderZoomView.type = 'dataZoom.slider';\n return SliderZoomView;\n}(DataZoomView);\nfunction getOtherDim(thisDim) {\n // FIXME\n // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好\n var map = {\n x: 'y',\n y: 'x',\n radius: 'angle',\n angle: 'radius'\n };\n return map[thisDim];\n}\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\nexport default SliderZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SliderZoomModel from './SliderZoomModel.js';\nimport SliderZoomView from './SliderZoomView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(SliderZoomModel);\n registers.registerComponentView(SliderZoomView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installDataZoomInside } from './installDataZoomInside.js';\nimport { install as installDataZoomSlider } from './installDataZoomSlider.js';\nexport function install(registers) {\n use(installDataZoomInside);\n use(installDataZoomSlider);\n // Do not install './dataZoomSelect',\n // since it only work for toolbox dataZoom.\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * @file Visual mapping.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar visualDefault = {\n /**\n * @public\n */\n get: function (visualType, key, isCategory) {\n var value = zrUtil.clone((defaultOption[visualType] || {})[key]);\n return isCategory ? zrUtil.isArray(value) ? value[value.length - 1] : value : value;\n }\n};\nvar defaultOption = {\n color: {\n active: ['#006edd', '#e0ffff'],\n inactive: ['rgba(0,0,0,0)']\n },\n colorHue: {\n active: [0, 360],\n inactive: [0, 0]\n },\n colorSaturation: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n colorLightness: {\n active: [0.9, 0.5],\n inactive: [0, 0]\n },\n colorAlpha: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n opacity: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n symbol: {\n active: ['circle', 'roundRect', 'diamond'],\n inactive: ['none']\n },\n symbolSize: {\n active: [10, 50],\n inactive: [0, 0]\n }\n};\nexport default visualDefault;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport visualDefault from '../../visual/visualDefault.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport * as modelUtil from '../../util/model.js';\nimport * as numberUtil from '../../util/number.js';\nimport ComponentModel from '../../model/Component.js';\nvar mapVisual = VisualMapping.mapVisual;\nvar eachVisual = VisualMapping.eachVisual;\nvar isArray = zrUtil.isArray;\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\nvar linearMap = numberUtil.linearMap;\nvar VisualMapModel = /** @class */function (_super) {\n __extends(VisualMapModel, _super);\n function VisualMapModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = VisualMapModel.type;\n _this.stateList = ['inRange', 'outOfRange'];\n _this.replacableOptionKeys = ['inRange', 'outOfRange', 'target', 'controller', 'color'];\n _this.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n /**\n * [lowerBound, upperBound]\n */\n _this.dataBound = [-Infinity, Infinity];\n _this.targetVisuals = {};\n _this.controllerVisuals = {};\n return _this;\n }\n VisualMapModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, this.replacableOptionKeys);\n this.textStyleModel = this.getModel('textStyle');\n this.resetItemSize();\n this.completeVisualOption();\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.resetVisual = function (supplementVisualOption) {\n var stateList = this.stateList;\n supplementVisualOption = zrUtil.bind(supplementVisualOption, this);\n this.controllerVisuals = visualSolution.createVisualMappings(this.option.controller, stateList, supplementVisualOption);\n this.targetVisuals = visualSolution.createVisualMappings(this.option.target, stateList, supplementVisualOption);\n };\n /**\n * @public\n */\n VisualMapModel.prototype.getItemSymbol = function () {\n return null;\n };\n /**\n * @protected\n * @return {Array.} An array of series indices.\n */\n VisualMapModel.prototype.getTargetSeriesIndices = function () {\n var optionSeriesIndex = this.option.seriesIndex;\n var seriesIndices = [];\n if (optionSeriesIndex == null || optionSeriesIndex === 'all') {\n this.ecModel.eachSeries(function (seriesModel, index) {\n seriesIndices.push(index);\n });\n } else {\n seriesIndices = modelUtil.normalizeToArray(optionSeriesIndex);\n }\n return seriesIndices;\n };\n /**\n * @public\n */\n VisualMapModel.prototype.eachTargetSeries = function (callback, context) {\n zrUtil.each(this.getTargetSeriesIndices(), function (seriesIndex) {\n var seriesModel = this.ecModel.getSeriesByIndex(seriesIndex);\n if (seriesModel) {\n callback.call(context, seriesModel);\n }\n }, this);\n };\n /**\n * @pubilc\n */\n VisualMapModel.prototype.isTargetSeries = function (seriesModel) {\n var is = false;\n this.eachTargetSeries(function (model) {\n model === seriesModel && (is = true);\n });\n return is;\n };\n /**\n * @example\n * this.formatValueText(someVal); // format single numeric value to text.\n * this.formatValueText(someVal, true); // format single category value to text.\n * this.formatValueText([min, max]); // format numeric min-max to text.\n * this.formatValueText([this.dataBound[0], max]); // using data lower bound.\n * this.formatValueText([min, this.dataBound[1]]); // using data upper bound.\n *\n * @param value Real value, or this.dataBound[0 or 1].\n * @param isCategory Only available when value is number.\n * @param edgeSymbols Open-close symbol when value is interval.\n * @protected\n */\n VisualMapModel.prototype.formatValueText = function (value, isCategory, edgeSymbols) {\n var option = this.option;\n var precision = option.precision;\n var dataBound = this.dataBound;\n var formatter = option.formatter;\n var isMinMax;\n edgeSymbols = edgeSymbols || ['<', '>'];\n if (zrUtil.isArray(value)) {\n value = value.slice();\n isMinMax = true;\n }\n var textValue = isCategory ? value // Value is string when isCategory\n : isMinMax ? [toFixed(value[0]), toFixed(value[1])] : toFixed(value);\n if (zrUtil.isString(formatter)) {\n return formatter.replace('{value}', isMinMax ? textValue[0] : textValue).replace('{value2}', isMinMax ? textValue[1] : textValue);\n } else if (zrUtil.isFunction(formatter)) {\n return isMinMax ? formatter(value[0], value[1]) : formatter(value);\n }\n if (isMinMax) {\n if (value[0] === dataBound[0]) {\n return edgeSymbols[0] + ' ' + textValue[1];\n } else if (value[1] === dataBound[1]) {\n return edgeSymbols[1] + ' ' + textValue[0];\n } else {\n return textValue[0] + ' - ' + textValue[1];\n }\n } else {\n // Format single value (includes category case).\n return textValue;\n }\n function toFixed(val) {\n return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20));\n }\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.resetExtent = function () {\n var thisOption = this.option;\n // Can not calculate data extent by data here.\n // Because series and data may be modified in processing stage.\n // So we do not support the feature \"auto min/max\".\n var extent = asc([thisOption.min, thisOption.max]);\n this._dataExtent = extent;\n };\n /**\n * PENDING:\n * delete this method if no outer usage.\n *\n * Return Concrete dimension. If null/undefined is returned, no dimension is used.\n */\n // getDataDimension(data: SeriesData) {\n // const optDim = this.option.dimension;\n // if (optDim != null) {\n // return data.getDimension(optDim);\n // }\n // const dimNames = data.dimensions;\n // for (let i = dimNames.length - 1; i >= 0; i--) {\n // const dimName = dimNames[i];\n // const dimInfo = data.getDimensionInfo(dimName);\n // if (!dimInfo.isCalculationCoord) {\n // return dimName;\n // }\n // }\n // }\n VisualMapModel.prototype.getDataDimensionIndex = function (data) {\n var optDim = this.option.dimension;\n if (optDim != null) {\n return data.getDimensionIndex(optDim);\n }\n var dimNames = data.dimensions;\n for (var i = dimNames.length - 1; i >= 0; i--) {\n var dimName = dimNames[i];\n var dimInfo = data.getDimensionInfo(dimName);\n if (!dimInfo.isCalculationCoord) {\n return dimInfo.storeDimIndex;\n }\n }\n };\n VisualMapModel.prototype.getExtent = function () {\n return this._dataExtent.slice();\n };\n VisualMapModel.prototype.completeVisualOption = function () {\n var ecModel = this.ecModel;\n var thisOption = this.option;\n var base = {\n inRange: thisOption.inRange,\n outOfRange: thisOption.outOfRange\n };\n var target = thisOption.target || (thisOption.target = {});\n var controller = thisOption.controller || (thisOption.controller = {});\n zrUtil.merge(target, base); // Do not override\n zrUtil.merge(controller, base); // Do not override\n var isCategory = this.isCategory();\n completeSingle.call(this, target);\n completeSingle.call(this, controller);\n completeInactive.call(this, target, 'inRange', 'outOfRange');\n // completeInactive.call(this, target, 'outOfRange', 'inRange');\n completeController.call(this, controller);\n function completeSingle(base) {\n // Compatible with ec2 dataRange.color.\n // The mapping order of dataRange.color is: [high value, ..., low value]\n // whereas inRange.color and outOfRange.color is [low value, ..., high value]\n // Notice: ec2 has no inverse.\n if (isArray(thisOption.color)\n // If there has been inRange: {symbol: ...}, adding color is a mistake.\n // So adding color only when no inRange defined.\n && !base.inRange) {\n base.inRange = {\n color: thisOption.color.slice().reverse()\n };\n }\n // Compatible with previous logic, always give a default color, otherwise\n // simple config with no inRange and outOfRange will not work.\n // Originally we use visualMap.color as the default color, but setOption at\n // the second time the default color will be erased. So we change to use\n // constant DEFAULT_COLOR.\n // If user do not want the default color, set inRange: {color: null}.\n base.inRange = base.inRange || {\n color: ecModel.get('gradientColor')\n };\n }\n function completeInactive(base, stateExist, stateAbsent) {\n var optExist = base[stateExist];\n var optAbsent = base[stateAbsent];\n if (optExist && !optAbsent) {\n optAbsent = base[stateAbsent] = {};\n each(optExist, function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n var defa = visualDefault.get(visualType, 'inactive', isCategory);\n if (defa != null) {\n optAbsent[visualType] = defa;\n // Compatibable with ec2:\n // Only inactive color to rgba(0,0,0,0) can not\n // make label transparent, so use opacity also.\n if (visualType === 'color' && !optAbsent.hasOwnProperty('opacity') && !optAbsent.hasOwnProperty('colorAlpha')) {\n optAbsent.opacity = [0, 0];\n }\n }\n });\n }\n }\n function completeController(controller) {\n var symbolExists = (controller.inRange || {}).symbol || (controller.outOfRange || {}).symbol;\n var symbolSizeExists = (controller.inRange || {}).symbolSize || (controller.outOfRange || {}).symbolSize;\n var inactiveColor = this.get('inactiveColor');\n var itemSymbol = this.getItemSymbol();\n var defaultSymbol = itemSymbol || 'roundRect';\n each(this.stateList, function (state) {\n var itemSize = this.itemSize;\n var visuals = controller[state];\n // Set inactive color for controller if no other color\n // attr (like colorAlpha) specified.\n if (!visuals) {\n visuals = controller[state] = {\n color: isCategory ? inactiveColor : [inactiveColor]\n };\n }\n // Consistent symbol and symbolSize if not specified.\n if (visuals.symbol == null) {\n visuals.symbol = symbolExists && zrUtil.clone(symbolExists) || (isCategory ? defaultSymbol : [defaultSymbol]);\n }\n if (visuals.symbolSize == null) {\n visuals.symbolSize = symbolSizeExists && zrUtil.clone(symbolSizeExists) || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]);\n }\n // Filter none\n visuals.symbol = mapVisual(visuals.symbol, function (symbol) {\n return symbol === 'none' ? defaultSymbol : symbol;\n });\n // Normalize symbolSize\n var symbolSize = visuals.symbolSize;\n if (symbolSize != null) {\n var max_1 = -Infinity;\n // symbolSize can be object when categories defined.\n eachVisual(symbolSize, function (value) {\n value > max_1 && (max_1 = value);\n });\n visuals.symbolSize = mapVisual(symbolSize, function (value) {\n return linearMap(value, [0, max_1], [0, itemSize[0]], true);\n });\n }\n }, this);\n }\n };\n VisualMapModel.prototype.resetItemSize = function () {\n this.itemSize = [parseFloat(this.get('itemWidth')), parseFloat(this.get('itemHeight'))];\n };\n VisualMapModel.prototype.isCategory = function () {\n return !!this.option.categories;\n };\n /**\n * @public\n * @abstract\n */\n VisualMapModel.prototype.setSelected = function (selected) {};\n VisualMapModel.prototype.getSelected = function () {\n return null;\n };\n /**\n * @public\n * @abstract\n */\n VisualMapModel.prototype.getValueState = function (value) {\n return null;\n };\n /**\n * FIXME\n * Do not publish to thirt-part-dev temporarily\n * util the interface is stable. (Should it return\n * a function but not visual meta?)\n *\n * @pubilc\n * @abstract\n * @param getColorVisual\n * params: value, valueState\n * return: color\n * @return {Object} visualMeta\n * should includes {stops, outerColors}\n * outerColor means [colorBeyondMinValue, colorBeyondMaxValue]\n */\n VisualMapModel.prototype.getVisualMeta = function (getColorVisual) {\n return null;\n };\n VisualMapModel.type = 'visualMap';\n VisualMapModel.dependencies = ['series'];\n VisualMapModel.defaultOption = {\n show: true,\n // zlevel: 0,\n z: 4,\n seriesIndex: 'all',\n min: 0,\n max: 200,\n left: 0,\n right: null,\n top: null,\n bottom: 0,\n itemWidth: null,\n itemHeight: null,\n inverse: false,\n orient: 'vertical',\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n contentColor: '#5793f3',\n inactiveColor: '#aaa',\n borderWidth: 0,\n padding: 5,\n // 接受数组分别设定上右下左边距,同css\n textGap: 10,\n precision: 0,\n textStyle: {\n color: '#333' // 值域文字颜色\n }\n };\n\n return VisualMapModel;\n}(ComponentModel);\nexport default VisualMapModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapModel from './VisualMapModel.js';\nimport * as numberUtil from '../../util/number.js';\nimport { inheritDefaultOption } from '../../util/component.js';\n// Constant\nvar DEFAULT_BAR_BOUND = [20, 140];\nvar ContinuousModel = /** @class */function (_super) {\n __extends(ContinuousModel, _super);\n function ContinuousModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ContinuousModel.type;\n return _this;\n }\n /**\n * @override\n */\n ContinuousModel.prototype.optionUpdated = function (newOption, isInit) {\n _super.prototype.optionUpdated.apply(this, arguments);\n this.resetExtent();\n this.resetVisual(function (mappingOption) {\n mappingOption.mappingMethod = 'linear';\n mappingOption.dataExtent = this.getExtent();\n });\n this._resetRange();\n };\n /**\n * @protected\n * @override\n */\n ContinuousModel.prototype.resetItemSize = function () {\n _super.prototype.resetItemSize.apply(this, arguments);\n var itemSize = this.itemSize;\n (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]);\n (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]);\n };\n /**\n * @private\n */\n ContinuousModel.prototype._resetRange = function () {\n var dataExtent = this.getExtent();\n var range = this.option.range;\n if (!range || range.auto) {\n // `range` should always be array (so we don't use other\n // value like 'auto') for user-friend. (consider getOption).\n dataExtent.auto = 1;\n this.option.range = dataExtent;\n } else if (zrUtil.isArray(range)) {\n if (range[0] > range[1]) {\n range.reverse();\n }\n range[0] = Math.max(range[0], dataExtent[0]);\n range[1] = Math.min(range[1], dataExtent[1]);\n }\n };\n /**\n * @protected\n * @override\n */\n ContinuousModel.prototype.completeVisualOption = function () {\n _super.prototype.completeVisualOption.apply(this, arguments);\n zrUtil.each(this.stateList, function (state) {\n var symbolSize = this.option.controller[state].symbolSize;\n if (symbolSize && symbolSize[0] !== symbolSize[1]) {\n symbolSize[0] = symbolSize[1] / 3; // For good looking.\n }\n }, this);\n };\n /**\n * @override\n */\n ContinuousModel.prototype.setSelected = function (selected) {\n this.option.range = selected.slice();\n this._resetRange();\n };\n /**\n * @public\n */\n ContinuousModel.prototype.getSelected = function () {\n var dataExtent = this.getExtent();\n var dataInterval = numberUtil.asc((this.get('range') || []).slice());\n // Clamp\n dataInterval[0] > dataExtent[1] && (dataInterval[0] = dataExtent[1]);\n dataInterval[1] > dataExtent[1] && (dataInterval[1] = dataExtent[1]);\n dataInterval[0] < dataExtent[0] && (dataInterval[0] = dataExtent[0]);\n dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]);\n return dataInterval;\n };\n /**\n * @override\n */\n ContinuousModel.prototype.getValueState = function (value) {\n var range = this.option.range;\n var dataExtent = this.getExtent();\n // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'.\n // range[1] is processed likewise.\n return (range[0] <= dataExtent[0] || range[0] <= value) && (range[1] >= dataExtent[1] || value <= range[1]) ? 'inRange' : 'outOfRange';\n };\n ContinuousModel.prototype.findTargetDataIndices = function (range) {\n var result = [];\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimensionIndex(data), function (value, dataIndex) {\n range[0] <= value && value <= range[1] && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n };\n /**\n * @implement\n */\n ContinuousModel.prototype.getVisualMeta = function (getColorVisual) {\n var oVals = getColorStopValues(this, 'outOfRange', this.getExtent());\n var iVals = getColorStopValues(this, 'inRange', this.option.range.slice());\n var stops = [];\n function setStop(value, valueState) {\n stops.push({\n value: value,\n color: getColorVisual(value, valueState)\n });\n }\n // Format to: outOfRange -- inRange -- outOfRange.\n var iIdx = 0;\n var oIdx = 0;\n var iLen = iVals.length;\n var oLen = oVals.length;\n for (; oIdx < oLen && (!iVals.length || oVals[oIdx] <= iVals[0]); oIdx++) {\n // If oVal[oIdx] === iVals[iIdx], oVal[oIdx] should be ignored.\n if (oVals[oIdx] < iVals[iIdx]) {\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n for (var first = 1; iIdx < iLen; iIdx++, first = 0) {\n // If range is full, value beyond min, max will be clamped.\n // make a singularity\n first && stops.length && setStop(iVals[iIdx], 'outOfRange');\n setStop(iVals[iIdx], 'inRange');\n }\n for (var first = 1; oIdx < oLen; oIdx++) {\n if (!iVals.length || iVals[iVals.length - 1] < oVals[oIdx]) {\n // make a singularity\n if (first) {\n stops.length && setStop(stops[stops.length - 1].value, 'outOfRange');\n first = 0;\n }\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n var stopsLen = stops.length;\n return {\n stops: stops,\n outerColors: [stopsLen ? stops[0].color : 'transparent', stopsLen ? stops[stopsLen - 1].color : 'transparent']\n };\n };\n ContinuousModel.type = 'visualMap.continuous';\n ContinuousModel.defaultOption = inheritDefaultOption(VisualMapModel.defaultOption, {\n align: 'auto',\n calculable: false,\n hoverLink: true,\n realtime: true,\n handleIcon: 'path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z',\n handleSize: '120%',\n handleStyle: {\n borderColor: '#fff',\n borderWidth: 1\n },\n indicatorIcon: 'circle',\n indicatorSize: '50%',\n indicatorStyle: {\n borderColor: '#fff',\n borderWidth: 2,\n shadowBlur: 2,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.2)'\n }\n // emphasis: {\n // handleStyle: {\n // shadowBlur: 3,\n // shadowOffsetX: 1,\n // shadowOffsetY: 1,\n // shadowColor: 'rgba(0,0,0,0.2)'\n // }\n // }\n });\n\n return ContinuousModel;\n}(VisualMapModel);\nfunction getColorStopValues(visualMapModel, valueState, dataExtent) {\n if (dataExtent[0] === dataExtent[1]) {\n return dataExtent.slice();\n }\n // When using colorHue mapping, it is not linear color any more.\n // Moreover, canvas gradient seems not to be accurate linear.\n // FIXME\n // Should be arbitrary value 100? or based on pixel size?\n var count = 200;\n var step = (dataExtent[1] - dataExtent[0]) / count;\n var value = dataExtent[0];\n var stopValues = [];\n for (var i = 0; i <= count && value < dataExtent[1]; i++) {\n stopValues.push(value);\n value += step;\n }\n stopValues.push(dataExtent[1]);\n return stopValues;\n}\nexport default ContinuousModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { Rect } from '../../util/graphic.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as layout from '../../util/layout.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport ComponentView from '../../view/Component.js';\nvar VisualMapView = /** @class */function (_super) {\n __extends(VisualMapView, _super);\n function VisualMapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = VisualMapView.type;\n _this.autoPositionValues = {\n left: 1,\n right: 1,\n top: 1,\n bottom: 1\n };\n return _this;\n }\n VisualMapView.prototype.init = function (ecModel, api) {\n this.ecModel = ecModel;\n this.api = api;\n };\n /**\n * @protected\n */\n VisualMapView.prototype.render = function (visualMapModel, ecModel, api, payload // TODO: TYPE\n ) {\n this.visualMapModel = visualMapModel;\n if (visualMapModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n this.doRender(visualMapModel, ecModel, api, payload);\n };\n /**\n * @protected\n */\n VisualMapView.prototype.renderBackground = function (group) {\n var visualMapModel = this.visualMapModel;\n var padding = formatUtil.normalizeCssArray(visualMapModel.get('padding') || 0);\n var rect = group.getBoundingRect();\n group.add(new Rect({\n z2: -1,\n silent: true,\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[3] + padding[1],\n height: rect.height + padding[0] + padding[2]\n },\n style: {\n fill: visualMapModel.get('backgroundColor'),\n stroke: visualMapModel.get('borderColor'),\n lineWidth: visualMapModel.get('borderWidth')\n }\n }));\n };\n /**\n * @protected\n * @param targetValue can be Infinity or -Infinity\n * @param visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize'\n * @param opts\n * @param opts.forceState Specify state, instead of using getValueState method.\n * @param opts.convertOpacityToAlpha For color gradient in controller widget.\n * @return {*} Visual value.\n */\n VisualMapView.prototype.getControllerVisual = function (targetValue, visualCluster, opts) {\n opts = opts || {};\n var forceState = opts.forceState;\n var visualMapModel = this.visualMapModel;\n var visualObj = {};\n // Default values.\n if (visualCluster === 'color') {\n var defaultColor = visualMapModel.get('contentColor');\n visualObj.color = defaultColor;\n }\n function getter(key) {\n return visualObj[key];\n }\n function setter(key, value) {\n visualObj[key] = value;\n }\n var mappings = visualMapModel.controllerVisuals[forceState || visualMapModel.getValueState(targetValue)];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n zrUtil.each(visualTypes, function (type) {\n var visualMapping = mappings[type];\n if (opts.convertOpacityToAlpha && type === 'opacity') {\n type = 'colorAlpha';\n visualMapping = mappings.__alphaForOpacity;\n }\n if (VisualMapping.dependsOn(type, visualCluster)) {\n visualMapping && visualMapping.applyVisual(targetValue, getter, setter);\n }\n });\n return visualObj[visualCluster];\n };\n VisualMapView.prototype.positionGroup = function (group) {\n var model = this.visualMapModel;\n var api = this.api;\n layout.positionElement(group, model.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n };\n VisualMapView.prototype.doRender = function (visualMapModel, ecModel, api, payload) {};\n VisualMapView.type = 'visualMap';\n return VisualMapView;\n}(ComponentView);\nexport default VisualMapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getLayoutRect } from '../../util/layout.js';\nvar paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']];\n/**\n * @param visualMapModel\n * @param api\n * @param itemSize always [short, long]\n * @return {string} 'left' or 'right' or 'top' or 'bottom'\n */\nexport function getItemAlign(visualMapModel, api, itemSize) {\n var modelOption = visualMapModel.option;\n var itemAlign = modelOption.align;\n if (itemAlign != null && itemAlign !== 'auto') {\n return itemAlign;\n }\n // Auto decision align.\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;\n var reals = paramsSet[realIndex];\n var fakeValue = [0, null, 10];\n var layoutInput = {};\n for (var i = 0; i < 3; i++) {\n layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i];\n layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]];\n }\n var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex];\n var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding);\n return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1];\n}\n/**\n * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and\n * dataIndexInside means filtered index.\n */\n// TODO: TYPE more specified payload types.\nexport function makeHighDownBatch(batch, visualMapModel) {\n zrUtil.each(batch || [], function (batchItem) {\n if (batchItem.dataIndex != null) {\n batchItem.dataIndexInside = batchItem.dataIndex;\n batchItem.dataIndex = null;\n }\n batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : '');\n });\n return batch;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport LinearGradient from 'zrender/lib/graphic/LinearGradient.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport VisualMapView from './VisualMapView.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport * as helper from './helper.js';\nimport * as modelUtil from '../../util/model.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nimport { setAsHighDownDispatcher } from '../../util/states.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { findEventDispatcher } from '../../util/event.js';\nvar linearMap = numberUtil.linearMap;\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\n// Arbitrary value\nvar HOVER_LINK_SIZE = 12;\nvar HOVER_LINK_OUT = 6;\n// Notice:\n// Any \"interval\" should be by the order of [low, high].\n// \"handle0\" (handleIndex === 0) maps to\n// low data value: this._dataInterval[0] and has low coord.\n// \"handle1\" (handleIndex === 1) maps to\n// high data value: this._dataInterval[1] and has high coord.\n// The logic of transform is implemented in this._createBarGroup.\nvar ContinuousView = /** @class */function (_super) {\n __extends(ContinuousView, _super);\n function ContinuousView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ContinuousView.type;\n _this._shapes = {};\n _this._dataInterval = [];\n _this._handleEnds = [];\n _this._hoverLinkDataIndices = [];\n return _this;\n }\n ContinuousView.prototype.init = function (ecModel, api) {\n _super.prototype.init.call(this, ecModel, api);\n this._hoverLinkFromSeriesMouseOver = zrUtil.bind(this._hoverLinkFromSeriesMouseOver, this);\n this._hideIndicator = zrUtil.bind(this._hideIndicator, this);\n };\n ContinuousView.prototype.doRender = function (visualMapModel, ecModel, api, payload) {\n if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) {\n this._buildView();\n }\n };\n ContinuousView.prototype._buildView = function () {\n this.group.removeAll();\n var visualMapModel = this.visualMapModel;\n var thisGroup = this.group;\n this._orient = visualMapModel.get('orient');\n this._useHandle = visualMapModel.get('calculable');\n this._resetInterval();\n this._renderBar(thisGroup);\n var dataRangeText = visualMapModel.get('text');\n this._renderEndsText(thisGroup, dataRangeText, 0);\n this._renderEndsText(thisGroup, dataRangeText, 1);\n // Do this for background size calculation.\n this._updateView(true);\n // After updating view, inner shapes is built completely,\n // and then background can be rendered.\n this.renderBackground(thisGroup);\n // Real update view\n this._updateView();\n this._enableHoverLinkToSeries();\n this._enableHoverLinkFromSeries();\n this.positionGroup(thisGroup);\n };\n ContinuousView.prototype._renderEndsText = function (group, dataRangeText, endsIndex) {\n if (!dataRangeText) {\n return;\n }\n // Compatible with ec2, text[0] map to high value, text[1] map low value.\n var text = dataRangeText[1 - endsIndex];\n text = text != null ? text + '' : '';\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var itemSize = visualMapModel.itemSize;\n var barGroup = this._shapes.mainGroup;\n var position = this._applyTransform([itemSize[0] / 2, endsIndex === 0 ? -textGap : itemSize[1] + textGap], barGroup);\n var align = this._applyTransform(endsIndex === 0 ? 'bottom' : 'top', barGroup);\n var orient = this._orient;\n var textStyleModel = this.visualMapModel.textStyleModel;\n this.group.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n x: position[0],\n y: position[1],\n verticalAlign: orient === 'horizontal' ? 'middle' : align,\n align: orient === 'horizontal' ? align : 'center',\n text: text\n })\n }));\n };\n ContinuousView.prototype._renderBar = function (targetGroup) {\n var visualMapModel = this.visualMapModel;\n var shapes = this._shapes;\n var itemSize = visualMapModel.itemSize;\n var orient = this._orient;\n var useHandle = this._useHandle;\n var itemAlign = helper.getItemAlign(visualMapModel, this.api, itemSize);\n var mainGroup = shapes.mainGroup = this._createBarGroup(itemAlign);\n var gradientBarGroup = new graphic.Group();\n mainGroup.add(gradientBarGroup);\n // Bar\n gradientBarGroup.add(shapes.outOfRange = createPolygon());\n gradientBarGroup.add(shapes.inRange = createPolygon(null, useHandle ? getCursor(this._orient) : null, zrUtil.bind(this._dragHandle, this, 'all', false), zrUtil.bind(this._dragHandle, this, 'all', true)));\n // A border radius clip.\n gradientBarGroup.setClipPath(new graphic.Rect({\n shape: {\n x: 0,\n y: 0,\n width: itemSize[0],\n height: itemSize[1],\n r: 3\n }\n }));\n var textRect = visualMapModel.textStyleModel.getTextRect('国');\n var textSize = mathMax(textRect.width, textRect.height);\n // Handle\n if (useHandle) {\n shapes.handleThumbs = [];\n shapes.handleLabels = [];\n shapes.handleLabelPoints = [];\n this._createHandle(visualMapModel, mainGroup, 0, itemSize, textSize, orient);\n this._createHandle(visualMapModel, mainGroup, 1, itemSize, textSize, orient);\n }\n this._createIndicator(visualMapModel, mainGroup, itemSize, textSize, orient);\n targetGroup.add(mainGroup);\n };\n ContinuousView.prototype._createHandle = function (visualMapModel, mainGroup, handleIndex, itemSize, textSize, orient) {\n var onDrift = zrUtil.bind(this._dragHandle, this, handleIndex, false);\n var onDragEnd = zrUtil.bind(this._dragHandle, this, handleIndex, true);\n var handleSize = parsePercent(visualMapModel.get('handleSize'), itemSize[0]);\n var handleThumb = createSymbol(visualMapModel.get('handleIcon'), -handleSize / 2, -handleSize / 2, handleSize, handleSize, null, true);\n var cursor = getCursor(this._orient);\n handleThumb.attr({\n cursor: cursor,\n draggable: true,\n drift: onDrift,\n ondragend: onDragEnd,\n onmousemove: function (e) {\n eventTool.stop(e.event);\n }\n });\n handleThumb.x = itemSize[0] / 2;\n handleThumb.useStyle(visualMapModel.getModel('handleStyle').getItemStyle());\n handleThumb.setStyle({\n strokeNoScale: true,\n strokeFirst: true\n });\n handleThumb.style.lineWidth *= 2;\n handleThumb.ensureState('emphasis').style = visualMapModel.getModel(['emphasis', 'handleStyle']).getItemStyle();\n setAsHighDownDispatcher(handleThumb, true);\n mainGroup.add(handleThumb);\n // Text is always horizontal layout but should not be effected by\n // transform (orient/inverse). So label is built separately but not\n // use zrender/graphic/helper/RectText, and is located based on view\n // group (according to handleLabelPoint) but not barGroup.\n var textStyleModel = this.visualMapModel.textStyleModel;\n var handleLabel = new graphic.Text({\n cursor: cursor,\n draggable: true,\n drift: onDrift,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: ''\n })\n });\n handleLabel.ensureState('blur').style = {\n opacity: 0.1\n };\n handleLabel.stateTransition = {\n duration: 200\n };\n this.group.add(handleLabel);\n var handleLabelPoint = [handleSize, 0];\n var shapes = this._shapes;\n shapes.handleThumbs[handleIndex] = handleThumb;\n shapes.handleLabelPoints[handleIndex] = handleLabelPoint;\n shapes.handleLabels[handleIndex] = handleLabel;\n };\n ContinuousView.prototype._createIndicator = function (visualMapModel, mainGroup, itemSize, textSize, orient) {\n var scale = parsePercent(visualMapModel.get('indicatorSize'), itemSize[0]);\n var indicator = createSymbol(visualMapModel.get('indicatorIcon'), -scale / 2, -scale / 2, scale, scale, null, true);\n indicator.attr({\n cursor: 'move',\n invisible: true,\n silent: true,\n x: itemSize[0] / 2\n });\n var indicatorStyle = visualMapModel.getModel('indicatorStyle').getItemStyle();\n if (indicator instanceof ZRImage) {\n var pathStyle = indicator.style;\n indicator.useStyle(zrUtil.extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, indicatorStyle));\n } else {\n indicator.useStyle(indicatorStyle);\n }\n mainGroup.add(indicator);\n var textStyleModel = this.visualMapModel.textStyleModel;\n var indicatorLabel = new graphic.Text({\n silent: true,\n invisible: true,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: ''\n })\n });\n this.group.add(indicatorLabel);\n var indicatorLabelPoint = [(orient === 'horizontal' ? textSize / 2 : HOVER_LINK_OUT) + itemSize[0] / 2, 0];\n var shapes = this._shapes;\n shapes.indicator = indicator;\n shapes.indicatorLabel = indicatorLabel;\n shapes.indicatorLabelPoint = indicatorLabelPoint;\n this._firstShowIndicator = true;\n };\n ContinuousView.prototype._dragHandle = function (handleIndex, isEnd,\n // dx is event from ondragend if isEnd is true. It's not used\n dx, dy) {\n if (!this._useHandle) {\n return;\n }\n this._dragging = !isEnd;\n if (!isEnd) {\n // Transform dx, dy to bar coordination.\n var vertex = this._applyTransform([dx, dy], this._shapes.mainGroup, true);\n this._updateInterval(handleIndex, vertex[1]);\n this._hideIndicator();\n // Considering realtime, update view should be executed\n // before dispatch action.\n this._updateView();\n }\n // dragEnd do not dispatch action when realtime.\n if (isEnd === !this.visualMapModel.get('realtime')) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: this._dataInterval.slice()\n });\n }\n if (isEnd) {\n !this._hovering && this._clearHoverLinkToSeries();\n } else if (useHoverLinkOnHandle(this.visualMapModel)) {\n this._doHoverLinkToSeries(this._handleEnds[handleIndex], false);\n }\n };\n ContinuousView.prototype._resetInterval = function () {\n var visualMapModel = this.visualMapModel;\n var dataInterval = this._dataInterval = visualMapModel.getSelected();\n var dataExtent = visualMapModel.getExtent();\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n this._handleEnds = [linearMap(dataInterval[0], dataExtent, sizeExtent, true), linearMap(dataInterval[1], dataExtent, sizeExtent, true)];\n };\n /**\n * @private\n * @param {(number|string)} handleIndex 0 or 1 or 'all'\n * @param {number} dx\n * @param {number} dy\n */\n ContinuousView.prototype._updateInterval = function (handleIndex, delta) {\n delta = delta || 0;\n var visualMapModel = this.visualMapModel;\n var handleEnds = this._handleEnds;\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n sliderMove(delta, handleEnds, sizeExtent, handleIndex,\n // cross is forbidden\n 0);\n var dataExtent = visualMapModel.getExtent();\n // Update data interval.\n this._dataInterval = [linearMap(handleEnds[0], sizeExtent, dataExtent, true), linearMap(handleEnds[1], sizeExtent, dataExtent, true)];\n };\n ContinuousView.prototype._updateView = function (forSketch) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var shapes = this._shapes;\n var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]];\n var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds;\n var visualInRange = this._createBarVisual(this._dataInterval, dataExtent, inRangeHandleEnds, 'inRange');\n var visualOutOfRange = this._createBarVisual(dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange');\n shapes.inRange.setStyle({\n fill: visualInRange.barColor\n // opacity: visualInRange.opacity\n }).setShape('points', visualInRange.barPoints);\n shapes.outOfRange.setStyle({\n fill: visualOutOfRange.barColor\n // opacity: visualOutOfRange.opacity\n }).setShape('points', visualOutOfRange.barPoints);\n this._updateHandle(inRangeHandleEnds, visualInRange);\n };\n ContinuousView.prototype._createBarVisual = function (dataInterval, dataExtent, handleEnds, forceState) {\n var opts = {\n forceState: forceState,\n convertOpacityToAlpha: true\n };\n var colorStops = this._makeColorGradient(dataInterval, opts);\n var symbolSizes = [this.getControllerVisual(dataInterval[0], 'symbolSize', opts), this.getControllerVisual(dataInterval[1], 'symbolSize', opts)];\n var barPoints = this._createBarPoints(handleEnds, symbolSizes);\n return {\n barColor: new LinearGradient(0, 0, 0, 1, colorStops),\n barPoints: barPoints,\n handlesColor: [colorStops[0].color, colorStops[colorStops.length - 1].color]\n };\n };\n ContinuousView.prototype._makeColorGradient = function (dataInterval, opts) {\n // Considering colorHue, which is not linear, so we have to sample\n // to calculate gradient color stops, but not only calculate head\n // and tail.\n var sampleNumber = 100; // Arbitrary value.\n var colorStops = [];\n var step = (dataInterval[1] - dataInterval[0]) / sampleNumber;\n colorStops.push({\n color: this.getControllerVisual(dataInterval[0], 'color', opts),\n offset: 0\n });\n for (var i = 1; i < sampleNumber; i++) {\n var currValue = dataInterval[0] + step * i;\n if (currValue > dataInterval[1]) {\n break;\n }\n colorStops.push({\n color: this.getControllerVisual(currValue, 'color', opts),\n offset: i / sampleNumber\n });\n }\n colorStops.push({\n color: this.getControllerVisual(dataInterval[1], 'color', opts),\n offset: 1\n });\n return colorStops;\n };\n ContinuousView.prototype._createBarPoints = function (handleEnds, symbolSizes) {\n var itemSize = this.visualMapModel.itemSize;\n return [[itemSize[0] - symbolSizes[0], handleEnds[0]], [itemSize[0], handleEnds[0]], [itemSize[0], handleEnds[1]], [itemSize[0] - symbolSizes[1], handleEnds[1]]];\n };\n ContinuousView.prototype._createBarGroup = function (itemAlign) {\n var orient = this._orient;\n var inverse = this.visualMapModel.get('inverse');\n return new graphic.Group(orient === 'horizontal' && !inverse ? {\n scaleX: itemAlign === 'bottom' ? 1 : -1,\n rotation: Math.PI / 2\n } : orient === 'horizontal' && inverse ? {\n scaleX: itemAlign === 'bottom' ? -1 : 1,\n rotation: -Math.PI / 2\n } : orient === 'vertical' && !inverse ? {\n scaleX: itemAlign === 'left' ? 1 : -1,\n scaleY: -1\n } : {\n scaleX: itemAlign === 'left' ? 1 : -1\n });\n };\n ContinuousView.prototype._updateHandle = function (handleEnds, visualInRange) {\n if (!this._useHandle) {\n return;\n }\n var shapes = this._shapes;\n var visualMapModel = this.visualMapModel;\n var handleThumbs = shapes.handleThumbs;\n var handleLabels = shapes.handleLabels;\n var itemSize = visualMapModel.itemSize;\n var dataExtent = visualMapModel.getExtent();\n each([0, 1], function (handleIndex) {\n var handleThumb = handleThumbs[handleIndex];\n handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]);\n handleThumb.y = handleEnds[handleIndex];\n var val = linearMap(handleEnds[handleIndex], [0, itemSize[1]], dataExtent, true);\n var symbolSize = this.getControllerVisual(val, 'symbolSize');\n handleThumb.scaleX = handleThumb.scaleY = symbolSize / itemSize[0];\n handleThumb.x = itemSize[0] - symbolSize / 2;\n // Update handle label position.\n var textPoint = graphic.applyTransform(shapes.handleLabelPoints[handleIndex], graphic.getTransform(handleThumb, this.group));\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n text: visualMapModel.formatValueText(this._dataInterval[handleIndex]),\n verticalAlign: 'middle',\n align: this._orient === 'vertical' ? this._applyTransform('left', shapes.mainGroup) : 'center'\n });\n }, this);\n };\n ContinuousView.prototype._showIndicator = function (cursorValue, textValue, rangeSymbol, halfHoverLinkSize) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var itemSize = visualMapModel.itemSize;\n var sizeExtent = [0, itemSize[1]];\n var shapes = this._shapes;\n var indicator = shapes.indicator;\n if (!indicator) {\n return;\n }\n indicator.attr('invisible', false);\n var opts = {\n convertOpacityToAlpha: true\n };\n var color = this.getControllerVisual(cursorValue, 'color', opts);\n var symbolSize = this.getControllerVisual(cursorValue, 'symbolSize');\n var y = linearMap(cursorValue, dataExtent, sizeExtent, true);\n var x = itemSize[0] - symbolSize / 2;\n var oldIndicatorPos = {\n x: indicator.x,\n y: indicator.y\n };\n // Update handle label position.\n indicator.y = y;\n indicator.x = x;\n var textPoint = graphic.applyTransform(shapes.indicatorLabelPoint, graphic.getTransform(indicator, this.group));\n var indicatorLabel = shapes.indicatorLabel;\n indicatorLabel.attr('invisible', false);\n var align = this._applyTransform('left', shapes.mainGroup);\n var orient = this._orient;\n var isHorizontal = orient === 'horizontal';\n indicatorLabel.setStyle({\n text: (rangeSymbol ? rangeSymbol : '') + visualMapModel.formatValueText(textValue),\n verticalAlign: isHorizontal ? align : 'middle',\n align: isHorizontal ? 'center' : align\n });\n var indicatorNewProps = {\n x: x,\n y: y,\n style: {\n fill: color\n }\n };\n var labelNewProps = {\n style: {\n x: textPoint[0],\n y: textPoint[1]\n }\n };\n if (visualMapModel.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {\n var animationCfg = {\n duration: 100,\n easing: 'cubicInOut',\n additive: true\n };\n indicator.x = oldIndicatorPos.x;\n indicator.y = oldIndicatorPos.y;\n indicator.animateTo(indicatorNewProps, animationCfg);\n indicatorLabel.animateTo(labelNewProps, animationCfg);\n } else {\n indicator.attr(indicatorNewProps);\n indicatorLabel.attr(labelNewProps);\n }\n this._firstShowIndicator = false;\n var handleLabels = this._shapes.handleLabels;\n if (handleLabels) {\n for (var i = 0; i < handleLabels.length; i++) {\n // Fade out handle labels.\n // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it.\n this.api.enterBlur(handleLabels[i]);\n }\n }\n };\n ContinuousView.prototype._enableHoverLinkToSeries = function () {\n var self = this;\n this._shapes.mainGroup.on('mousemove', function (e) {\n self._hovering = true;\n if (!self._dragging) {\n var itemSize = self.visualMapModel.itemSize;\n var pos = self._applyTransform([e.offsetX, e.offsetY], self._shapes.mainGroup, true, true);\n // For hover link show when hover handle, which might be\n // below or upper than sizeExtent.\n pos[1] = mathMin(mathMax(0, pos[1]), itemSize[1]);\n self._doHoverLinkToSeries(pos[1], 0 <= pos[0] && pos[0] <= itemSize[0]);\n }\n }).on('mouseout', function () {\n // When mouse is out of handle, hoverLink still need\n // to be displayed when realtime is set as false.\n self._hovering = false;\n !self._dragging && self._clearHoverLinkToSeries();\n });\n };\n ContinuousView.prototype._enableHoverLinkFromSeries = function () {\n var zr = this.api.getZr();\n if (this.visualMapModel.option.hoverLink) {\n zr.on('mouseover', this._hoverLinkFromSeriesMouseOver, this);\n zr.on('mouseout', this._hideIndicator, this);\n } else {\n this._clearHoverLinkFromSeries();\n }\n };\n ContinuousView.prototype._doHoverLinkToSeries = function (cursorPos, hoverOnBar) {\n var visualMapModel = this.visualMapModel;\n var itemSize = visualMapModel.itemSize;\n if (!visualMapModel.option.hoverLink) {\n return;\n }\n var sizeExtent = [0, itemSize[1]];\n var dataExtent = visualMapModel.getExtent();\n // For hover link show when hover handle, which might be below or upper than sizeExtent.\n cursorPos = mathMin(mathMax(sizeExtent[0], cursorPos), sizeExtent[1]);\n var halfHoverLinkSize = getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent);\n var hoverRange = [cursorPos - halfHoverLinkSize, cursorPos + halfHoverLinkSize];\n var cursorValue = linearMap(cursorPos, sizeExtent, dataExtent, true);\n var valueRange = [linearMap(hoverRange[0], sizeExtent, dataExtent, true), linearMap(hoverRange[1], sizeExtent, dataExtent, true)];\n // Consider data range is out of visualMap range, see test/visualMap-continuous.html,\n // where china and india has very large population.\n hoverRange[0] < sizeExtent[0] && (valueRange[0] = -Infinity);\n hoverRange[1] > sizeExtent[1] && (valueRange[1] = Infinity);\n // Do not show indicator when mouse is over handle,\n // otherwise labels overlap, especially when dragging.\n if (hoverOnBar) {\n if (valueRange[0] === -Infinity) {\n this._showIndicator(cursorValue, valueRange[1], '< ', halfHoverLinkSize);\n } else if (valueRange[1] === Infinity) {\n this._showIndicator(cursorValue, valueRange[0], '> ', halfHoverLinkSize);\n } else {\n this._showIndicator(cursorValue, cursorValue, '≈ ', halfHoverLinkSize);\n }\n }\n // When realtime is set as false, handles, which are in barGroup,\n // also trigger hoverLink, which help user to realize where they\n // focus on when dragging. (see test/heatmap-large.html)\n // When realtime is set as true, highlight will not show when hover\n // handle, because the label on handle, which displays a exact value\n // but not range, might mislead users.\n var oldBatch = this._hoverLinkDataIndices;\n var newBatch = [];\n if (hoverOnBar || useHoverLinkOnHandle(visualMapModel)) {\n newBatch = this._hoverLinkDataIndices = visualMapModel.findTargetDataIndices(valueRange);\n }\n var resultBatches = modelUtil.compressBatches(oldBatch, newBatch);\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(resultBatches[0], visualMapModel));\n this._dispatchHighDown('highlight', helper.makeHighDownBatch(resultBatches[1], visualMapModel));\n };\n ContinuousView.prototype._hoverLinkFromSeriesMouseOver = function (e) {\n var ecData;\n findEventDispatcher(e.target, function (target) {\n var currECData = getECData(target);\n if (currECData.dataIndex != null) {\n ecData = currECData;\n return true;\n }\n }, true);\n if (!ecData) {\n return;\n }\n var dataModel = this.ecModel.getSeriesByIndex(ecData.seriesIndex);\n var visualMapModel = this.visualMapModel;\n if (!visualMapModel.isTargetSeries(dataModel)) {\n return;\n }\n var data = dataModel.getData(ecData.dataType);\n var value = data.getStore().get(visualMapModel.getDataDimensionIndex(data), ecData.dataIndex);\n if (!isNaN(value)) {\n this._showIndicator(value, value);\n }\n };\n ContinuousView.prototype._hideIndicator = function () {\n var shapes = this._shapes;\n shapes.indicator && shapes.indicator.attr('invisible', true);\n shapes.indicatorLabel && shapes.indicatorLabel.attr('invisible', true);\n var handleLabels = this._shapes.handleLabels;\n if (handleLabels) {\n for (var i = 0; i < handleLabels.length; i++) {\n // Fade out handle labels.\n // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it.\n this.api.leaveBlur(handleLabels[i]);\n }\n }\n };\n ContinuousView.prototype._clearHoverLinkToSeries = function () {\n this._hideIndicator();\n var indices = this._hoverLinkDataIndices;\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(indices, this.visualMapModel));\n indices.length = 0;\n };\n ContinuousView.prototype._clearHoverLinkFromSeries = function () {\n this._hideIndicator();\n var zr = this.api.getZr();\n zr.off('mouseover', this._hoverLinkFromSeriesMouseOver);\n zr.off('mouseout', this._hideIndicator);\n };\n ContinuousView.prototype._applyTransform = function (vertex, element, inverse, global) {\n var transform = graphic.getTransform(element, global ? null : this.group);\n return zrUtil.isArray(vertex) ? graphic.applyTransform(vertex, transform, inverse) : graphic.transformDirection(vertex, transform, inverse);\n };\n // TODO: TYPE more specified payload types.\n ContinuousView.prototype._dispatchHighDown = function (type, batch) {\n batch && batch.length && this.api.dispatchAction({\n type: type,\n batch: batch\n });\n };\n /**\n * @override\n */\n ContinuousView.prototype.dispose = function () {\n this._clearHoverLinkFromSeries();\n this._clearHoverLinkToSeries();\n };\n ContinuousView.type = 'visualMap.continuous';\n return ContinuousView;\n}(VisualMapView);\nfunction createPolygon(points, cursor, onDrift, onDragEnd) {\n return new graphic.Polygon({\n shape: {\n points: points\n },\n draggable: !!onDrift,\n cursor: cursor,\n drift: onDrift,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd\n });\n}\nfunction getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent) {\n var halfHoverLinkSize = HOVER_LINK_SIZE / 2;\n var hoverLinkDataSize = visualMapModel.get('hoverLinkDataSize');\n if (hoverLinkDataSize) {\n halfHoverLinkSize = linearMap(hoverLinkDataSize, dataExtent, sizeExtent, true) / 2;\n }\n return halfHoverLinkSize;\n}\nfunction useHoverLinkOnHandle(visualMapModel) {\n var hoverLinkOnHandle = visualMapModel.get('hoverLinkOnHandle');\n return !!(hoverLinkOnHandle == null ? visualMapModel.get('realtime') : hoverLinkOnHandle);\n}\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\nexport default ContinuousView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport var visualMapActionInfo = {\n type: 'selectDataRange',\n event: 'dataRangeSelected',\n // FIXME use updateView appears wrong\n update: 'update'\n};\nexport var visualMapActionHander = function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'visualMap',\n query: payload\n }, function (model) {\n model.setSelected(payload.selected);\n });\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nexport var visualMapEncodingHandlers = [{\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var resetDefines = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n var pipelineContext = seriesModel.pipelineContext;\n if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) {\n return;\n }\n resetDefines.push(visualSolution.incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, zrUtil.bind(visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimensionIndex(seriesModel.getData())));\n });\n return resetDefines;\n }\n},\n// Only support color.\n{\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var visualMetaList = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n if (visualMapModel.isTargetSeries(seriesModel)) {\n var visualMeta = visualMapModel.getVisualMeta(zrUtil.bind(getColorVisual, null, seriesModel, visualMapModel)) || {\n stops: [],\n outerColors: []\n };\n var dimIdx = visualMapModel.getDataDimensionIndex(data);\n if (dimIdx >= 0) {\n // visualMeta.dimension should be dimension index, but not concrete dimension.\n visualMeta.dimension = dimIdx;\n visualMetaList.push(visualMeta);\n }\n }\n });\n // console.log(JSON.stringify(visualMetaList.map(a => a.stops)));\n seriesModel.getData().setVisual('visualMeta', visualMetaList);\n }\n}];\n// FIXME\n// performance and export for heatmap?\n// value can be Infinity or -Infinity\nfunction getColorVisual(seriesModel, visualMapModel, value, valueState) {\n var mappings = visualMapModel.targetVisuals[valueState];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n var resultVisual = {\n color: getVisualFromData(seriesModel.getData(), 'color') // default color.\n };\n\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n var mapping = mappings[type === 'opacity' ? '__alphaForOpacity' : type];\n mapping && mapping.applyVisual(value, getVisual, setVisual);\n }\n return resultVisual.color;\n function getVisual(key) {\n return resultVisual[key];\n }\n function setVisual(key, value) {\n resultVisual[key] = value;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar each = zrUtil.each;\nexport default function visualMapPreprocessor(option) {\n var visualMap = option && option.visualMap;\n if (!zrUtil.isArray(visualMap)) {\n visualMap = visualMap ? [visualMap] : [];\n }\n each(visualMap, function (opt) {\n if (!opt) {\n return;\n }\n // rename splitList to pieces\n if (has(opt, 'splitList') && !has(opt, 'pieces')) {\n opt.pieces = opt.splitList;\n delete opt.splitList;\n }\n var pieces = opt.pieces;\n if (pieces && zrUtil.isArray(pieces)) {\n each(pieces, function (piece) {\n if (zrUtil.isObject(piece)) {\n if (has(piece, 'start') && !has(piece, 'min')) {\n piece.min = piece.start;\n }\n if (has(piece, 'end') && !has(piece, 'max')) {\n piece.max = piece.end;\n }\n }\n });\n }\n });\n}\nfunction has(obj, name) {\n return obj && obj.hasOwnProperty && obj.hasOwnProperty(name);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { visualMapActionInfo, visualMapActionHander } from './visualMapAction.js';\nimport { visualMapEncodingHandlers } from './visualEncoding.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport preprocessor from './preprocessor.js';\nvar installed = false;\nexport default function installCommon(registers) {\n if (installed) {\n return;\n }\n installed = true;\n registers.registerSubTypeDefaulter('visualMap', function (option) {\n // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used.\n return !option.categories && (!(option.pieces ? option.pieces.length > 0 : option.splitNumber > 0) || option.calculable) ? 'continuous' : 'piecewise';\n });\n registers.registerAction(visualMapActionInfo, visualMapActionHander);\n each(visualMapEncodingHandlers, function (handler) {\n registers.registerVisual(registers.PRIORITY.VISUAL.COMPONENT, handler);\n });\n registers.registerPreprocessor(preprocessor);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport ContinuousModel from './ContinuousModel.js';\nimport ContinuousView from './ContinuousView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(ContinuousModel);\n registers.registerComponentView(ContinuousView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapModel from './VisualMapModel.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport visualDefault from '../../visual/visualDefault.js';\nimport { reformIntervals } from '../../util/number.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar PiecewiseModel = /** @class */function (_super) {\n __extends(PiecewiseModel, _super);\n function PiecewiseModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PiecewiseModel.type;\n /**\n * The order is always [low, ..., high].\n * [{text: string, interval: Array.}, ...]\n */\n _this._pieceList = [];\n return _this;\n }\n PiecewiseModel.prototype.optionUpdated = function (newOption, isInit) {\n _super.prototype.optionUpdated.apply(this, arguments);\n this.resetExtent();\n var mode = this._mode = this._determineMode();\n this._pieceList = [];\n resetMethods[this._mode].call(this, this._pieceList);\n this._resetSelected(newOption, isInit);\n var categories = this.option.categories;\n this.resetVisual(function (mappingOption, state) {\n if (mode === 'categories') {\n mappingOption.mappingMethod = 'category';\n mappingOption.categories = zrUtil.clone(categories);\n } else {\n mappingOption.dataExtent = this.getExtent();\n mappingOption.mappingMethod = 'piecewise';\n mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) {\n piece = zrUtil.clone(piece);\n if (state !== 'inRange') {\n // FIXME\n // outOfRange do not support special visual in pieces.\n piece.visual = null;\n }\n return piece;\n });\n }\n });\n };\n /**\n * @protected\n * @override\n */\n PiecewiseModel.prototype.completeVisualOption = function () {\n // Consider this case:\n // visualMap: {\n // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}]\n // }\n // where no inRange/outOfRange set but only pieces. So we should make\n // default inRange/outOfRange for this case, otherwise visuals that only\n // appear in `pieces` will not be taken into account in visual encoding.\n var option = this.option;\n var visualTypesInPieces = {};\n var visualTypes = VisualMapping.listVisualTypes();\n var isCategory = this.isCategory();\n zrUtil.each(option.pieces, function (piece) {\n zrUtil.each(visualTypes, function (visualType) {\n if (piece.hasOwnProperty(visualType)) {\n visualTypesInPieces[visualType] = 1;\n }\n });\n });\n zrUtil.each(visualTypesInPieces, function (v, visualType) {\n var exists = false;\n zrUtil.each(this.stateList, function (state) {\n exists = exists || has(option, state, visualType) || has(option.target, state, visualType);\n }, this);\n !exists && zrUtil.each(this.stateList, function (state) {\n (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory);\n });\n }, this);\n function has(obj, state, visualType) {\n return obj && obj[state] && obj[state].hasOwnProperty(visualType);\n }\n _super.prototype.completeVisualOption.apply(this, arguments);\n };\n PiecewiseModel.prototype._resetSelected = function (newOption, isInit) {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n // Selected do not merge but all override.\n var selected = (isInit ? thisOption : newOption).selected || {};\n thisOption.selected = selected;\n // Consider 'not specified' means true.\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n if (!selected.hasOwnProperty(key)) {\n selected[key] = true;\n }\n }, this);\n if (thisOption.selectedMode === 'single') {\n // Ensure there is only one selected.\n var hasSel_1 = false;\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n if (selected[key]) {\n hasSel_1 ? selected[key] = false : hasSel_1 = true;\n }\n }, this);\n }\n // thisOption.selectedMode === 'multiple', default: all selected.\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getItemSymbol = function () {\n return this.get('itemSymbol');\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getSelectedMapKey = function (piece) {\n return this._mode === 'categories' ? piece.value + '' : piece.index + '';\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getPieceList = function () {\n return this._pieceList;\n };\n /**\n * @return {string}\n */\n PiecewiseModel.prototype._determineMode = function () {\n var option = this.option;\n return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber';\n };\n /**\n * @override\n */\n PiecewiseModel.prototype.setSelected = function (selected) {\n this.option.selected = zrUtil.clone(selected);\n };\n /**\n * @override\n */\n PiecewiseModel.prototype.getValueState = function (value) {\n var index = VisualMapping.findPieceIndex(value, this._pieceList);\n return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange';\n };\n /**\n * @public\n * @param pieceIndex piece index in visualMapModel.getPieceList()\n */\n PiecewiseModel.prototype.findTargetDataIndices = function (pieceIndex) {\n var result = [];\n var pieceList = this._pieceList;\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimensionIndex(data), function (value, dataIndex) {\n // Should always base on model pieceList, because it is order sensitive.\n var pIdx = VisualMapping.findPieceIndex(value, pieceList);\n pIdx === pieceIndex && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n };\n /**\n * @private\n * @param piece piece.value or piece.interval is required.\n * @return Can be Infinity or -Infinity\n */\n PiecewiseModel.prototype.getRepresentValue = function (piece) {\n var representValue;\n if (this.isCategory()) {\n representValue = piece.value;\n } else {\n if (piece.value != null) {\n representValue = piece.value;\n } else {\n var pieceInterval = piece.interval || [];\n representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2;\n }\n }\n return representValue;\n };\n PiecewiseModel.prototype.getVisualMeta = function (getColorVisual) {\n // Do not support category. (category axis is ordinal, numerical)\n if (this.isCategory()) {\n return;\n }\n var stops = [];\n var outerColors = ['', ''];\n var visualMapModel = this;\n function setStop(interval, valueState) {\n var representValue = visualMapModel.getRepresentValue({\n interval: interval\n }); // Not category\n if (!valueState) {\n valueState = visualMapModel.getValueState(representValue);\n }\n var color = getColorVisual(representValue, valueState);\n if (interval[0] === -Infinity) {\n outerColors[0] = color;\n } else if (interval[1] === Infinity) {\n outerColors[1] = color;\n } else {\n stops.push({\n value: interval[0],\n color: color\n }, {\n value: interval[1],\n color: color\n });\n }\n }\n // Suplement\n var pieceList = this._pieceList.slice();\n if (!pieceList.length) {\n pieceList.push({\n interval: [-Infinity, Infinity]\n });\n } else {\n var edge = pieceList[0].interval[0];\n edge !== -Infinity && pieceList.unshift({\n interval: [-Infinity, edge]\n });\n edge = pieceList[pieceList.length - 1].interval[1];\n edge !== Infinity && pieceList.push({\n interval: [edge, Infinity]\n });\n }\n var curr = -Infinity;\n zrUtil.each(pieceList, function (piece) {\n var interval = piece.interval;\n if (interval) {\n // Fulfill gap.\n interval[0] > curr && setStop([curr, interval[0]], 'outOfRange');\n setStop(interval.slice());\n curr = interval[1];\n }\n }, this);\n return {\n stops: stops,\n outerColors: outerColors\n };\n };\n PiecewiseModel.type = 'visualMap.piecewise';\n PiecewiseModel.defaultOption = inheritDefaultOption(VisualMapModel.defaultOption, {\n selected: null,\n minOpen: false,\n maxOpen: false,\n align: 'auto',\n itemWidth: 20,\n itemHeight: 14,\n itemSymbol: 'roundRect',\n pieces: null,\n categories: null,\n splitNumber: 5,\n selectedMode: 'multiple',\n itemGap: 10,\n hoverLink: true // Enable hover highlight.\n });\n\n return PiecewiseModel;\n}(VisualMapModel);\n;\n/**\n * Key is this._mode\n * @type {Object}\n * @this {module:echarts/component/viusalMap/PiecewiseMode}\n */\nvar resetMethods = {\n splitNumber: function (outPieceList) {\n var thisOption = this.option;\n var precision = Math.min(thisOption.precision, 20);\n var dataExtent = this.getExtent();\n var splitNumber = thisOption.splitNumber;\n splitNumber = Math.max(parseInt(splitNumber, 10), 1);\n thisOption.splitNumber = splitNumber;\n var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber;\n // Precision auto-adaption\n while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {\n precision++;\n }\n thisOption.precision = precision;\n splitStep = +splitStep.toFixed(precision);\n if (thisOption.minOpen) {\n outPieceList.push({\n interval: [-Infinity, dataExtent[0]],\n close: [0, 0]\n });\n }\n for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) {\n var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep;\n outPieceList.push({\n interval: [curr, max],\n close: [1, 1]\n });\n }\n if (thisOption.maxOpen) {\n outPieceList.push({\n interval: [dataExtent[1], Infinity],\n close: [0, 0]\n });\n }\n reformIntervals(outPieceList);\n zrUtil.each(outPieceList, function (piece, index) {\n piece.index = index;\n piece.text = this.formatValueText(piece.interval);\n }, this);\n },\n categories: function (outPieceList) {\n var thisOption = this.option;\n zrUtil.each(thisOption.categories, function (cate) {\n // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。\n // 是否改一致。\n outPieceList.push({\n text: this.formatValueText(cate, true),\n value: cate\n });\n }, this);\n // See \"Order Rule\".\n normalizeReverse(thisOption, outPieceList);\n },\n pieces: function (outPieceList) {\n var thisOption = this.option;\n zrUtil.each(thisOption.pieces, function (pieceListItem, index) {\n if (!zrUtil.isObject(pieceListItem)) {\n pieceListItem = {\n value: pieceListItem\n };\n }\n var item = {\n text: '',\n index: index\n };\n if (pieceListItem.label != null) {\n item.text = pieceListItem.label;\n }\n if (pieceListItem.hasOwnProperty('value')) {\n var value = item.value = pieceListItem.value;\n item.interval = [value, value];\n item.close = [1, 1];\n } else {\n // `min` `max` is legacy option.\n // `lt` `gt` `lte` `gte` is recommended.\n var interval = item.interval = [];\n var close_1 = item.close = [0, 0];\n var closeList = [1, 0, 1];\n var infinityList = [-Infinity, Infinity];\n var useMinMax = [];\n for (var lg = 0; lg < 2; lg++) {\n var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg];\n for (var i = 0; i < 3 && interval[lg] == null; i++) {\n interval[lg] = pieceListItem[names[i]];\n close_1[lg] = closeList[i];\n useMinMax[lg] = i === 2;\n }\n interval[lg] == null && (interval[lg] = infinityList[lg]);\n }\n useMinMax[0] && interval[1] === Infinity && (close_1[0] = 0);\n useMinMax[1] && interval[0] === -Infinity && (close_1[1] = 0);\n if (process.env.NODE_ENV !== 'production') {\n if (interval[0] > interval[1]) {\n console.warn('Piece ' + index + 'is illegal: ' + interval + ' lower bound should not greater then uppper bound.');\n }\n }\n if (interval[0] === interval[1] && close_1[0] && close_1[1]) {\n // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}],\n // we use value to lift the priority when min === max\n item.value = interval[0];\n }\n }\n item.visual = VisualMapping.retrieveVisuals(pieceListItem);\n outPieceList.push(item);\n }, this);\n // See \"Order Rule\".\n normalizeReverse(thisOption, outPieceList);\n // Only pieces\n reformIntervals(outPieceList);\n zrUtil.each(outPieceList, function (piece) {\n var close = piece.close;\n var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]];\n piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols);\n }, this);\n }\n};\nfunction normalizeReverse(thisOption, pieceList) {\n var inverse = thisOption.inverse;\n if (thisOption.orient === 'vertical' ? !inverse : inverse) {\n pieceList.reverse();\n }\n}\nexport default PiecewiseModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapView from './VisualMapView.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport * as layout from '../../util/layout.js';\nimport * as helper from './helper.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nvar PiecewiseVisualMapView = /** @class */function (_super) {\n __extends(PiecewiseVisualMapView, _super);\n function PiecewiseVisualMapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PiecewiseVisualMapView.type;\n return _this;\n }\n PiecewiseVisualMapView.prototype.doRender = function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var textStyleModel = visualMapModel.textStyleModel;\n var textFont = textStyleModel.getFont();\n var textFill = textStyleModel.getTextColor();\n var itemAlign = this._getItemAlign();\n var itemSize = visualMapModel.itemSize;\n var viewData = this._getViewData();\n var endsText = viewData.endsText;\n var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText);\n endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign);\n zrUtil.each(viewData.viewPieceList, function (item) {\n var piece = item.piece;\n var itemGroup = new graphic.Group();\n itemGroup.onclick = zrUtil.bind(this._onItemClick, this, piece);\n this._enableHoverLink(itemGroup, item.indexInModelPieceList);\n // TODO Category\n var representValue = visualMapModel.getRepresentValue(piece);\n this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]);\n if (showLabel) {\n var visualState = this.visualMapModel.getValueState(representValue);\n itemGroup.add(new graphic.Text({\n style: {\n x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap,\n y: itemSize[1] / 2,\n text: piece.text,\n verticalAlign: 'middle',\n align: itemAlign,\n font: textFont,\n fill: textFill,\n opacity: visualState === 'outOfRange' ? 0.5 : 1\n }\n }));\n }\n thisGroup.add(itemGroup);\n }, this);\n endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign);\n layout.box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap'));\n this.renderBackground(thisGroup);\n this.positionGroup(thisGroup);\n };\n PiecewiseVisualMapView.prototype._enableHoverLink = function (itemGroup, pieceIndex) {\n var _this = this;\n itemGroup.on('mouseover', function () {\n return onHoverLink('highlight');\n }).on('mouseout', function () {\n return onHoverLink('downplay');\n });\n var onHoverLink = function (method) {\n var visualMapModel = _this.visualMapModel;\n // TODO: TYPE More detailed action types\n visualMapModel.option.hoverLink && _this.api.dispatchAction({\n type: method,\n batch: helper.makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel)\n });\n };\n };\n PiecewiseVisualMapView.prototype._getItemAlign = function () {\n var visualMapModel = this.visualMapModel;\n var modelOption = visualMapModel.option;\n if (modelOption.orient === 'vertical') {\n return helper.getItemAlign(visualMapModel, this.api, visualMapModel.itemSize);\n } else {\n // horizontal, most case left unless specifying right.\n var align = modelOption.align;\n if (!align || align === 'auto') {\n align = 'left';\n }\n return align;\n }\n };\n PiecewiseVisualMapView.prototype._renderEndsText = function (group, text, itemSize, showLabel, itemAlign) {\n if (!text) {\n return;\n }\n var itemGroup = new graphic.Group();\n var textStyleModel = this.visualMapModel.textStyleModel;\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2,\n y: itemSize[1] / 2,\n verticalAlign: 'middle',\n align: showLabel ? itemAlign : 'center',\n text: text\n })\n }));\n group.add(itemGroup);\n };\n /**\n * @private\n * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.\n */\n PiecewiseVisualMapView.prototype._getViewData = function () {\n var visualMapModel = this.visualMapModel;\n var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) {\n return {\n piece: piece,\n indexInModelPieceList: index\n };\n });\n var endsText = visualMapModel.get('text');\n // Consider orient and inverse.\n var orient = visualMapModel.get('orient');\n var inverse = visualMapModel.get('inverse');\n // Order of model pieceList is always [low, ..., high]\n if (orient === 'horizontal' ? inverse : !inverse) {\n viewPieceList.reverse();\n }\n // Origin order of endsText is [high, low]\n else if (endsText) {\n endsText = endsText.slice().reverse();\n }\n return {\n viewPieceList: viewPieceList,\n endsText: endsText\n };\n };\n PiecewiseVisualMapView.prototype._createItemSymbol = function (group, representValue, shapeParam) {\n group.add(createSymbol(\n // symbol will be string\n this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3],\n // color will be string\n this.getControllerVisual(representValue, 'color')));\n };\n PiecewiseVisualMapView.prototype._onItemClick = function (piece) {\n var visualMapModel = this.visualMapModel;\n var option = visualMapModel.option;\n var selectedMode = option.selectedMode;\n if (!selectedMode) {\n return;\n }\n var selected = zrUtil.clone(option.selected);\n var newKey = visualMapModel.getSelectedMapKey(piece);\n if (selectedMode === 'single' || selectedMode === true) {\n selected[newKey] = true;\n zrUtil.each(selected, function (o, key) {\n selected[key] = key === newKey;\n });\n } else {\n selected[newKey] = !selected[newKey];\n }\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: selected\n });\n };\n PiecewiseVisualMapView.type = 'visualMap.piecewise';\n return PiecewiseVisualMapView;\n}(VisualMapView);\nexport default PiecewiseVisualMapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport PiecewiseModel from './PiecewiseModel.js';\nimport PiecewiseView from './PiecewiseView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(PiecewiseModel);\n registers.registerComponentView(PiecewiseView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installVisualMapContinuous } from './installVisualMapContinuous.js';\nimport { install as installVisualMapPiecewise } from './installVisualMapPiecewise.js';\nexport function install(registers) {\n use(installVisualMapContinuous);\n use(installVisualMapPiecewise);\n // Do not install './dataZoomSelect',\n // since it only work for toolbox dataZoom.\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { makeInner } from '../util/model.js';\nimport { getDecalFromPalette } from '../model/mixin/palette.js';\nvar DEFAULT_OPTION = {\n label: {\n enabled: true\n },\n decal: {\n show: false\n }\n};\nvar inner = makeInner();\nvar decalPaletteScope = {};\nexport default function ariaVisual(ecModel, api) {\n var ariaModel = ecModel.getModel('aria');\n // See \"area enabled\" detection code in `GlobalModel.ts`.\n if (!ariaModel.get('enabled')) {\n return;\n }\n var defaultOption = zrUtil.clone(DEFAULT_OPTION);\n zrUtil.merge(defaultOption.label, ecModel.getLocaleModel().get('aria'), false);\n zrUtil.merge(ariaModel.option, defaultOption, false);\n setDecal();\n setLabel();\n function setDecal() {\n var decalModel = ariaModel.getModel('decal');\n var useDecal = decalModel.get('show');\n if (useDecal) {\n // Each type of series use one scope.\n // Pie and funnel are using different scopes.\n var paletteScopeGroupByType_1 = zrUtil.createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.isColorBySeries()) {\n return;\n }\n var decalScope = paletteScopeGroupByType_1.get(seriesModel.type);\n if (!decalScope) {\n decalScope = {};\n paletteScopeGroupByType_1.set(seriesModel.type, decalScope);\n }\n inner(seriesModel).scope = decalScope;\n });\n ecModel.eachRawSeries(function (seriesModel) {\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n if (zrUtil.isFunction(seriesModel.enableAriaDecal)) {\n // Let series define how to use decal palette on data\n seriesModel.enableAriaDecal();\n return;\n }\n var data = seriesModel.getData();\n if (!seriesModel.isColorBySeries()) {\n var dataAll_1 = seriesModel.getRawData();\n var idxMap_1 = {};\n var decalScope_1 = inner(seriesModel).scope;\n data.each(function (idx) {\n var rawIdx = data.getRawIndex(idx);\n idxMap_1[rawIdx] = idx;\n });\n var dataCount_1 = dataAll_1.count();\n dataAll_1.each(function (rawIdx) {\n var idx = idxMap_1[rawIdx];\n var name = dataAll_1.getName(rawIdx) || rawIdx + '';\n var paletteDecal = getDecalFromPalette(seriesModel.ecModel, name, decalScope_1, dataCount_1);\n var specifiedDecal = data.getItemVisual(idx, 'decal');\n data.setItemVisual(idx, 'decal', mergeDecal(specifiedDecal, paletteDecal));\n });\n } else {\n var paletteDecal = getDecalFromPalette(seriesModel.ecModel, seriesModel.name, decalPaletteScope, ecModel.getSeriesCount());\n var specifiedDecal = data.getVisual('decal');\n data.setVisual('decal', mergeDecal(specifiedDecal, paletteDecal));\n }\n function mergeDecal(specifiedDecal, paletteDecal) {\n // Merge decal from palette to decal from itemStyle.\n // User do not need to specify all of the decal props.\n var resultDecal = specifiedDecal ? zrUtil.extend(zrUtil.extend({}, paletteDecal), specifiedDecal) : paletteDecal;\n resultDecal.dirty = true;\n return resultDecal;\n }\n });\n }\n }\n function setLabel() {\n var dom = api.getZr().dom;\n // TODO: support for SSR\n if (!dom) {\n return;\n }\n var labelLocale = ecModel.getLocaleModel().get('aria');\n var labelModel = ariaModel.getModel('label');\n labelModel.option = zrUtil.defaults(labelModel.option, labelLocale);\n if (!labelModel.get('enabled')) {\n return;\n }\n if (labelModel.get('description')) {\n dom.setAttribute('aria-label', labelModel.get('description'));\n return;\n }\n var seriesCnt = ecModel.getSeriesCount();\n var maxDataCnt = labelModel.get(['data', 'maxCount']) || 10;\n var maxSeriesCnt = labelModel.get(['series', 'maxCount']) || 10;\n var displaySeriesCnt = Math.min(seriesCnt, maxSeriesCnt);\n var ariaLabel;\n if (seriesCnt < 1) {\n // No series, no aria label\n return;\n } else {\n var title = getTitle();\n if (title) {\n var withTitle = labelModel.get(['general', 'withTitle']);\n ariaLabel = replace(withTitle, {\n title: title\n });\n } else {\n ariaLabel = labelModel.get(['general', 'withoutTitle']);\n }\n var seriesLabels_1 = [];\n var prefix = seriesCnt > 1 ? labelModel.get(['series', 'multiple', 'prefix']) : labelModel.get(['series', 'single', 'prefix']);\n ariaLabel += replace(prefix, {\n seriesCount: seriesCnt\n });\n ecModel.eachSeries(function (seriesModel, idx) {\n if (idx < displaySeriesCnt) {\n var seriesLabel = void 0;\n var seriesName = seriesModel.get('name');\n var withName = seriesName ? 'withName' : 'withoutName';\n seriesLabel = seriesCnt > 1 ? labelModel.get(['series', 'multiple', withName]) : labelModel.get(['series', 'single', withName]);\n seriesLabel = replace(seriesLabel, {\n seriesId: seriesModel.seriesIndex,\n seriesName: seriesModel.get('name'),\n seriesType: getSeriesTypeName(seriesModel.subType)\n });\n var data = seriesModel.getData();\n if (data.count() > maxDataCnt) {\n // Show part of data\n var partialLabel = labelModel.get(['data', 'partialData']);\n seriesLabel += replace(partialLabel, {\n displayCnt: maxDataCnt\n });\n } else {\n seriesLabel += labelModel.get(['data', 'allData']);\n }\n var middleSeparator_1 = labelModel.get(['data', 'separator', 'middle']);\n var endSeparator_1 = labelModel.get(['data', 'separator', 'end']);\n var dataLabels = [];\n for (var i = 0; i < data.count(); i++) {\n if (i < maxDataCnt) {\n var name_1 = data.getName(i);\n var value = data.getValues(i);\n var dataLabel = labelModel.get(['data', name_1 ? 'withName' : 'withoutName']);\n dataLabels.push(replace(dataLabel, {\n name: name_1,\n value: value.join(middleSeparator_1)\n }));\n }\n }\n seriesLabel += dataLabels.join(middleSeparator_1) + endSeparator_1;\n seriesLabels_1.push(seriesLabel);\n }\n });\n var separatorModel = labelModel.getModel(['series', 'multiple', 'separator']);\n var middleSeparator = separatorModel.get('middle');\n var endSeparator = separatorModel.get('end');\n ariaLabel += seriesLabels_1.join(middleSeparator) + endSeparator;\n dom.setAttribute('aria-label', ariaLabel);\n }\n }\n function replace(str, keyValues) {\n if (!zrUtil.isString(str)) {\n return str;\n }\n var result = str;\n zrUtil.each(keyValues, function (value, key) {\n result = result.replace(new RegExp('\\\\{\\\\s*' + key + '\\\\s*\\\\}', 'g'), value);\n });\n return result;\n }\n function getTitle() {\n var title = ecModel.get('title');\n if (title && title.length) {\n title = title[0];\n }\n return title && title.text;\n }\n function getSeriesTypeName(type) {\n var typeNames = ecModel.getLocaleModel().get(['series', 'typeNames']);\n return typeNames[type] || typeNames.chart;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function ariaPreprocessor(option) {\n if (!option || !option.aria) {\n return;\n }\n var aria = option.aria;\n // aria.show is deprecated and should use aria.enabled instead\n if (aria.show != null) {\n aria.enabled = aria.show;\n }\n aria.label = aria.label || {};\n // move description, general, series, data to be under aria.label\n zrUtil.each(['description', 'general', 'series', 'data'], function (name) {\n if (aria[name] != null) {\n aria.label[name] = aria[name];\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport ariaVisual from '../../visual/aria.js';\nimport ariaPreprocessor from './preprocessor.js';\nexport function install(registers) {\n registers.registerPreprocessor(ariaPreprocessor);\n registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { keys, isArray, map, isObject, isString, isRegExp, isArrayLike, hasOwn, isNumber } from 'zrender/lib/core/util.js';\nimport { throwError, makePrintable } from './log.js';\nimport { getRawValueParser, createFilterComparator } from '../data/helper/dataValueHelper.js';\n;\nvar RELATIONAL_EXPRESSION_OP_ALIAS_MAP = {\n value: 'eq',\n // PENDING: not good for literal semantic?\n '<': 'lt',\n '<=': 'lte',\n '>': 'gt',\n '>=': 'gte',\n '=': 'eq',\n '!=': 'ne',\n '<>': 'ne'\n // Might be misleading for sake of the difference between '==' and '===',\n // so don't support them.\n // '==': 'eq',\n // '===': 'seq',\n // '!==': 'sne'\n // PENDING: Whether support some common alias \"ge\", \"le\", \"neq\"?\n // ge: 'gte',\n // le: 'lte',\n // neq: 'ne',\n};\n// type RelationalExpressionOpEvaluate = (tarVal: unknown, condVal: unknown) => boolean;\nvar RegExpEvaluator = /** @class */function () {\n function RegExpEvaluator(rVal) {\n // Support condVal: RegExp | string\n var condValue = this._condVal = isString(rVal) ? new RegExp(rVal) : isRegExp(rVal) ? rVal : null;\n if (condValue == null) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal regexp', rVal, 'in');\n }\n throwError(errMsg);\n }\n }\n RegExpEvaluator.prototype.evaluate = function (lVal) {\n var type = typeof lVal;\n return isString(type) ? this._condVal.test(lVal) : isNumber(type) ? this._condVal.test(lVal + '') : false;\n };\n return RegExpEvaluator;\n}();\nvar ConstConditionInternal = /** @class */function () {\n function ConstConditionInternal() {}\n ConstConditionInternal.prototype.evaluate = function () {\n return this.value;\n };\n return ConstConditionInternal;\n}();\nvar AndConditionInternal = /** @class */function () {\n function AndConditionInternal() {}\n AndConditionInternal.prototype.evaluate = function () {\n var children = this.children;\n for (var i = 0; i < children.length; i++) {\n if (!children[i].evaluate()) {\n return false;\n }\n }\n return true;\n };\n return AndConditionInternal;\n}();\nvar OrConditionInternal = /** @class */function () {\n function OrConditionInternal() {}\n OrConditionInternal.prototype.evaluate = function () {\n var children = this.children;\n for (var i = 0; i < children.length; i++) {\n if (children[i].evaluate()) {\n return true;\n }\n }\n return false;\n };\n return OrConditionInternal;\n}();\nvar NotConditionInternal = /** @class */function () {\n function NotConditionInternal() {}\n NotConditionInternal.prototype.evaluate = function () {\n return !this.child.evaluate();\n };\n return NotConditionInternal;\n}();\nvar RelationalConditionInternal = /** @class */function () {\n function RelationalConditionInternal() {}\n RelationalConditionInternal.prototype.evaluate = function () {\n var needParse = !!this.valueParser;\n // Call getValue with no `this`.\n var getValue = this.getValue;\n var tarValRaw = getValue(this.valueGetterParam);\n var tarValParsed = needParse ? this.valueParser(tarValRaw) : null;\n // Relational cond follow \"and\" logic internally.\n for (var i = 0; i < this.subCondList.length; i++) {\n if (!this.subCondList[i].evaluate(needParse ? tarValParsed : tarValRaw)) {\n return false;\n }\n }\n return true;\n };\n return RelationalConditionInternal;\n}();\nfunction parseOption(exprOption, getters) {\n if (exprOption === true || exprOption === false) {\n var cond = new ConstConditionInternal();\n cond.value = exprOption;\n return cond;\n }\n var errMsg = '';\n if (!isObjectNotArray(exprOption)) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal config. Expect a plain object but actually', exprOption);\n }\n throwError(errMsg);\n }\n if (exprOption.and) {\n return parseAndOrOption('and', exprOption, getters);\n } else if (exprOption.or) {\n return parseAndOrOption('or', exprOption, getters);\n } else if (exprOption.not) {\n return parseNotOption(exprOption, getters);\n }\n return parseRelationalOption(exprOption, getters);\n}\nfunction parseAndOrOption(op, exprOption, getters) {\n var subOptionArr = exprOption[op];\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('\"and\"/\"or\" condition should only be `' + op + ': [...]` and must not be empty array.', 'Illegal condition:', exprOption);\n }\n if (!isArray(subOptionArr)) {\n throwError(errMsg);\n }\n if (!subOptionArr.length) {\n throwError(errMsg);\n }\n var cond = op === 'and' ? new AndConditionInternal() : new OrConditionInternal();\n cond.children = map(subOptionArr, function (subOption) {\n return parseOption(subOption, getters);\n });\n if (!cond.children.length) {\n throwError(errMsg);\n }\n return cond;\n}\nfunction parseNotOption(exprOption, getters) {\n var subOption = exprOption.not;\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('\"not\" condition should only be `not: {}`.', 'Illegal condition:', exprOption);\n }\n if (!isObjectNotArray(subOption)) {\n throwError(errMsg);\n }\n var cond = new NotConditionInternal();\n cond.child = parseOption(subOption, getters);\n if (!cond.child) {\n throwError(errMsg);\n }\n return cond;\n}\nfunction parseRelationalOption(exprOption, getters) {\n var errMsg = '';\n var valueGetterParam = getters.prepareGetValue(exprOption);\n var subCondList = [];\n var exprKeys = keys(exprOption);\n var parserName = exprOption.parser;\n var valueParser = parserName ? getRawValueParser(parserName) : null;\n for (var i = 0; i < exprKeys.length; i++) {\n var keyRaw = exprKeys[i];\n if (keyRaw === 'parser' || getters.valueGetterAttrMap.get(keyRaw)) {\n continue;\n }\n var op = hasOwn(RELATIONAL_EXPRESSION_OP_ALIAS_MAP, keyRaw) ? RELATIONAL_EXPRESSION_OP_ALIAS_MAP[keyRaw] : keyRaw;\n var condValueRaw = exprOption[keyRaw];\n var condValueParsed = valueParser ? valueParser(condValueRaw) : condValueRaw;\n var evaluator = createFilterComparator(op, condValueParsed) || op === 'reg' && new RegExpEvaluator(condValueParsed);\n if (!evaluator) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal relational operation: \"' + keyRaw + '\" in condition:', exprOption);\n }\n throwError(errMsg);\n }\n subCondList.push(evaluator);\n }\n if (!subCondList.length) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Relational condition must have at least one operator.', 'Illegal condition:', exprOption);\n }\n // No relational operator always disabled in case of dangers result.\n throwError(errMsg);\n }\n var cond = new RelationalConditionInternal();\n cond.valueGetterParam = valueGetterParam;\n cond.valueParser = valueParser;\n cond.getValue = getters.getValue;\n cond.subCondList = subCondList;\n return cond;\n}\nfunction isObjectNotArray(val) {\n return isObject(val) && !isArrayLike(val);\n}\nvar ConditionalExpressionParsed = /** @class */function () {\n function ConditionalExpressionParsed(exprOption, getters) {\n this._cond = parseOption(exprOption, getters);\n }\n ConditionalExpressionParsed.prototype.evaluate = function () {\n return this._cond.evaluate();\n };\n return ConditionalExpressionParsed;\n}();\n;\nexport function parseConditionalExpression(exprOption, getters) {\n return new ConditionalExpressionParsed(exprOption, getters);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseConditionalExpression } from '../../util/conditionalExpression.js';\nimport { hasOwn, createHashMap } from 'zrender/lib/core/util.js';\nimport { makePrintable, throwError } from '../../util/log.js';\nexport var filterTransform = {\n type: 'echarts:filter',\n // PENDING: enhance to filter by index rather than create new data\n transform: function (params) {\n // [Caveat] Fail-Fast:\n // Do not return the whole dataset unless user config indicates it explicitly.\n // For example, if no condition is specified by mistake, returning an empty result\n // is better than returning the entire raw source for the user to find the mistake.\n var upstream = params.upstream;\n var rawItem;\n var condition = parseConditionalExpression(params.config, {\n valueGetterAttrMap: createHashMap({\n dimension: true\n }),\n prepareGetValue: function (exprOption) {\n var errMsg = '';\n var dimLoose = exprOption.dimension;\n if (!hasOwn(exprOption, 'dimension')) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Relation condition must has prop \"dimension\" specified.', 'Illegal condition:', exprOption);\n }\n throwError(errMsg);\n }\n var dimInfo = upstream.getDimensionInfo(dimLoose);\n if (!dimInfo) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\\n', 'Illegal condition:', exprOption, '.\\n');\n }\n throwError(errMsg);\n }\n return {\n dimIdx: dimInfo.index\n };\n },\n getValue: function (param) {\n return upstream.retrieveValueFromItem(rawItem, param.dimIdx);\n }\n });\n var resultData = [];\n for (var i = 0, len = upstream.count(); i < len; i++) {\n rawItem = upstream.getRawDataItem(i);\n if (condition.evaluate()) {\n resultData.push(rawItem);\n }\n }\n return {\n data: resultData\n };\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { SOURCE_FORMAT_ARRAY_ROWS, SOURCE_FORMAT_OBJECT_ROWS } from '../../util/types.js';\nimport { makePrintable, throwError } from '../../util/log.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport { normalizeToArray } from '../../util/model.js';\nimport { getRawValueParser, SortOrderComparator } from '../../data/helper/dataValueHelper.js';\nvar sampleLog = '';\nif (process.env.NODE_ENV !== 'production') {\n sampleLog = ['Valid config is like:', '{ dimension: \"age\", order: \"asc\" }', 'or [{ dimension: \"age\", order: \"asc\"], { dimension: \"date\", order: \"desc\" }]'].join(' ');\n}\nexport var sortTransform = {\n type: 'echarts:sort',\n transform: function (params) {\n var upstream = params.upstream;\n var config = params.config;\n var errMsg = '';\n // Normalize\n // const orderExprList: OrderExpression[] = isArray(config[0])\n // ? config as OrderExpression[]\n // : [config as OrderExpression];\n var orderExprList = normalizeToArray(config);\n if (!orderExprList.length) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Empty `config` in sort transform.';\n }\n throwError(errMsg);\n }\n var orderDefList = [];\n each(orderExprList, function (orderExpr) {\n var dimLoose = orderExpr.dimension;\n var order = orderExpr.order;\n var parserName = orderExpr.parser;\n var incomparable = orderExpr.incomparable;\n if (dimLoose == null) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Sort transform config must has \"dimension\" specified.' + sampleLog;\n }\n throwError(errMsg);\n }\n if (order !== 'asc' && order !== 'desc') {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Sort transform config must has \"order\" specified.' + sampleLog;\n }\n throwError(errMsg);\n }\n if (incomparable && incomparable !== 'min' && incomparable !== 'max') {\n var errMsg_1 = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg_1 = 'incomparable must be \"min\" or \"max\" rather than \"' + incomparable + '\".';\n }\n throwError(errMsg_1);\n }\n if (order !== 'asc' && order !== 'desc') {\n var errMsg_2 = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg_2 = 'order must be \"asc\" or \"desc\" rather than \"' + order + '\".';\n }\n throwError(errMsg_2);\n }\n var dimInfo = upstream.getDimensionInfo(dimLoose);\n if (!dimInfo) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\\n', 'Illegal config:', orderExpr, '.\\n');\n }\n throwError(errMsg);\n }\n var parser = parserName ? getRawValueParser(parserName) : null;\n if (parserName && !parser) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Invalid parser name ' + parserName + '.\\n', 'Illegal config:', orderExpr, '.\\n');\n }\n throwError(errMsg);\n }\n orderDefList.push({\n dimIdx: dimInfo.index,\n parser: parser,\n comparator: new SortOrderComparator(order, incomparable)\n });\n });\n // TODO: support it?\n var sourceFormat = upstream.sourceFormat;\n if (sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'sourceFormat \"' + sourceFormat + '\" is not supported yet';\n }\n throwError(errMsg);\n }\n // Other upstream format are all array.\n var resultData = [];\n for (var i = 0, len = upstream.count(); i < len; i++) {\n resultData.push(upstream.getRawDataItem(i));\n }\n resultData.sort(function (item0, item1) {\n for (var i = 0; i < orderDefList.length; i++) {\n var orderDef = orderDefList[i];\n var val0 = upstream.retrieveValueFromItem(item0, orderDef.dimIdx);\n var val1 = upstream.retrieveValueFromItem(item1, orderDef.dimIdx);\n if (orderDef.parser) {\n val0 = orderDef.parser(val0);\n val1 = orderDef.parser(val1);\n }\n var result = orderDef.comparator.evaluate(val0, val1);\n if (result !== 0) {\n return result;\n }\n }\n return 0;\n });\n return {\n data: resultData\n };\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { filterTransform } from './filterTransform.js';\nimport { sortTransform } from './sortTransform.js';\nexport function install(registers) {\n registers.registerTransform(filterTransform);\n registers.registerTransform(sortTransform);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * This module is imported by echarts directly.\n *\n * Notice:\n * Always keep this file exists for backward compatibility.\n * Because before 4.1.0, dataset is an optional component,\n * some users may import this module manually.\n */\nimport ComponentModel from '../../model/Component.js';\nimport ComponentView from '../../view/Component.js';\nimport { SERIES_LAYOUT_BY_COLUMN } from '../../util/types.js';\nimport { disableTransformOptionMerge, SourceManager } from '../../data/helper/sourceManager.js';\nvar DatasetModel = /** @class */function (_super) {\n __extends(DatasetModel, _super);\n function DatasetModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataset';\n return _this;\n }\n DatasetModel.prototype.init = function (option, parentModel, ecModel) {\n _super.prototype.init.call(this, option, parentModel, ecModel);\n this._sourceManager = new SourceManager(this);\n disableTransformOptionMerge(this);\n };\n DatasetModel.prototype.mergeOption = function (newOption, ecModel) {\n _super.prototype.mergeOption.call(this, newOption, ecModel);\n disableTransformOptionMerge(this);\n };\n DatasetModel.prototype.optionUpdated = function () {\n this._sourceManager.dirty();\n };\n DatasetModel.prototype.getSourceManager = function () {\n return this._sourceManager;\n };\n DatasetModel.type = 'dataset';\n DatasetModel.defaultOption = {\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN\n };\n return DatasetModel;\n}(ComponentModel);\nexport { DatasetModel };\nvar DatasetView = /** @class */function (_super) {\n __extends(DatasetView, _super);\n function DatasetView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataset';\n return _this;\n }\n DatasetView.type = 'dataset';\n return DatasetView;\n}(ComponentView);\nexport function install(registers) {\n registers.registerComponentModel(DatasetModel);\n registers.registerComponentView(DatasetView);\n}","import { cubicSubdivide } from '../core/curve.js';\nimport PathProxy from '../core/PathProxy.js';\nvar CMD = PathProxy.CMD;\nfunction aroundEqual(a, b) {\n return Math.abs(a - b) < 1e-5;\n}\nexport function pathToBezierCurves(path) {\n var data = path.data;\n var len = path.len();\n var bezierArrayGroups = [];\n var currentSubpath;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n function createNewSubpath(x, y) {\n if (currentSubpath && currentSubpath.length > 2) {\n bezierArrayGroups.push(currentSubpath);\n }\n currentSubpath = [x, y];\n }\n function addLine(x0, y0, x1, y1) {\n if (!(aroundEqual(x0, x1) && aroundEqual(y0, y1))) {\n currentSubpath.push(x0, y0, x1, y1, x1, y1);\n }\n }\n function addArc(startAngle, endAngle, cx, cy, rx, ry) {\n var delta = Math.abs(endAngle - startAngle);\n var len = Math.tan(delta / 4) * 4 / 3;\n var dir = endAngle < startAngle ? -1 : 1;\n var c1 = Math.cos(startAngle);\n var s1 = Math.sin(startAngle);\n var c2 = Math.cos(endAngle);\n var s2 = Math.sin(endAngle);\n var x1 = c1 * rx + cx;\n var y1 = s1 * ry + cy;\n var x4 = c2 * rx + cx;\n var y4 = s2 * ry + cy;\n var hx = rx * len * dir;\n var hy = ry * len * dir;\n currentSubpath.push(x1 - hx * s1, y1 + hy * c1, x4 + hx * s2, y4 - hy * c2, x4, y4);\n }\n var x1;\n var y1;\n var x2;\n var y2;\n for (var i = 0; i < len;) {\n var cmd = data[i++];\n var isFirst = i === 1;\n if (isFirst) {\n xi = data[i];\n yi = data[i + 1];\n x0 = xi;\n y0 = yi;\n if (cmd === CMD.L || cmd === CMD.C || cmd === CMD.Q) {\n currentSubpath = [x0, y0];\n }\n }\n switch (cmd) {\n case CMD.M:\n xi = x0 = data[i++];\n yi = y0 = data[i++];\n createNewSubpath(x0, y0);\n break;\n case CMD.L:\n x1 = data[i++];\n y1 = data[i++];\n addLine(xi, yi, x1, y1);\n xi = x1;\n yi = y1;\n break;\n case CMD.C:\n currentSubpath.push(data[i++], data[i++], data[i++], data[i++], xi = data[i++], yi = data[i++]);\n break;\n case CMD.Q:\n x1 = data[i++];\n y1 = data[i++];\n x2 = data[i++];\n y2 = data[i++];\n currentSubpath.push(xi + 2 / 3 * (x1 - xi), yi + 2 / 3 * (y1 - yi), x2 + 2 / 3 * (x1 - x2), y2 + 2 / 3 * (y1 - y2), x2, y2);\n xi = x2;\n yi = y2;\n break;\n case CMD.A:\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++];\n var endAngle = data[i++] + startAngle;\n i += 1;\n var anticlockwise = !data[i++];\n x1 = Math.cos(startAngle) * rx + cx;\n y1 = Math.sin(startAngle) * ry + cy;\n if (isFirst) {\n x0 = x1;\n y0 = y1;\n createNewSubpath(x0, y0);\n }\n else {\n addLine(xi, yi, x1, y1);\n }\n xi = Math.cos(endAngle) * rx + cx;\n yi = Math.sin(endAngle) * ry + cy;\n var step = (anticlockwise ? -1 : 1) * Math.PI / 2;\n for (var angle = startAngle; anticlockwise ? angle > endAngle : angle < endAngle; angle += step) {\n var nextAngle = anticlockwise ? Math.max(angle + step, endAngle)\n : Math.min(angle + step, endAngle);\n addArc(angle, nextAngle, cx, cy, rx, ry);\n }\n break;\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n x1 = x0 + data[i++];\n y1 = y0 + data[i++];\n createNewSubpath(x1, y0);\n addLine(x1, y0, x1, y1);\n addLine(x1, y1, x0, y1);\n addLine(x0, y1, x0, y0);\n addLine(x0, y0, x1, y0);\n break;\n case CMD.Z:\n currentSubpath && addLine(xi, yi, x0, y0);\n xi = x0;\n yi = y0;\n break;\n }\n }\n if (currentSubpath && currentSubpath.length > 2) {\n bezierArrayGroups.push(currentSubpath);\n }\n return bezierArrayGroups;\n}\nfunction adpativeBezier(x0, y0, x1, y1, x2, y2, x3, y3, out, scale) {\n if (aroundEqual(x0, x1) && aroundEqual(y0, y1) && aroundEqual(x2, x3) && aroundEqual(y2, y3)) {\n out.push(x3, y3);\n return;\n }\n var PIXEL_DISTANCE = 2 / scale;\n var PIXEL_DISTANCE_SQR = PIXEL_DISTANCE * PIXEL_DISTANCE;\n var dx = x3 - x0;\n var dy = y3 - y0;\n var d = Math.sqrt(dx * dx + dy * dy);\n dx /= d;\n dy /= d;\n var dx1 = x1 - x0;\n var dy1 = y1 - y0;\n var dx2 = x2 - x3;\n var dy2 = y2 - y3;\n var cp1LenSqr = dx1 * dx1 + dy1 * dy1;\n var cp2LenSqr = dx2 * dx2 + dy2 * dy2;\n if (cp1LenSqr < PIXEL_DISTANCE_SQR && cp2LenSqr < PIXEL_DISTANCE_SQR) {\n out.push(x3, y3);\n return;\n }\n var projLen1 = dx * dx1 + dy * dy1;\n var projLen2 = -dx * dx2 - dy * dy2;\n var d1Sqr = cp1LenSqr - projLen1 * projLen1;\n var d2Sqr = cp2LenSqr - projLen2 * projLen2;\n if (d1Sqr < PIXEL_DISTANCE_SQR && projLen1 >= 0\n && d2Sqr < PIXEL_DISTANCE_SQR && projLen2 >= 0) {\n out.push(x3, y3);\n return;\n }\n var tmpSegX = [];\n var tmpSegY = [];\n cubicSubdivide(x0, x1, x2, x3, 0.5, tmpSegX);\n cubicSubdivide(y0, y1, y2, y3, 0.5, tmpSegY);\n adpativeBezier(tmpSegX[0], tmpSegY[0], tmpSegX[1], tmpSegY[1], tmpSegX[2], tmpSegY[2], tmpSegX[3], tmpSegY[3], out, scale);\n adpativeBezier(tmpSegX[4], tmpSegY[4], tmpSegX[5], tmpSegY[5], tmpSegX[6], tmpSegY[6], tmpSegX[7], tmpSegY[7], out, scale);\n}\nexport function pathToPolygons(path, scale) {\n var bezierArrayGroups = pathToBezierCurves(path);\n var polygons = [];\n scale = scale || 1;\n for (var i = 0; i < bezierArrayGroups.length; i++) {\n var beziers = bezierArrayGroups[i];\n var polygon = [];\n var x0 = beziers[0];\n var y0 = beziers[1];\n polygon.push(x0, y0);\n for (var k = 2; k < beziers.length;) {\n var x1 = beziers[k++];\n var y1 = beziers[k++];\n var x2 = beziers[k++];\n var y2 = beziers[k++];\n var x3 = beziers[k++];\n var y3 = beziers[k++];\n adpativeBezier(x0, y0, x1, y1, x2, y2, x3, y3, polygon, scale);\n x0 = x3;\n y0 = y3;\n }\n polygons.push(polygon);\n }\n return polygons;\n}\n","import { fromPoints } from '../core/bbox.js';\nimport BoundingRect from '../core/BoundingRect.js';\nimport Point from '../core/Point.js';\nimport { map } from '../core/util.js';\nimport Polygon from '../graphic/shape/Polygon.js';\nimport Rect from '../graphic/shape/Rect.js';\nimport Sector from '../graphic/shape/Sector.js';\nimport { pathToPolygons } from './convertPath.js';\nimport { clonePath } from './path.js';\nfunction getDividingGrids(dimSize, rowDim, count) {\n var rowSize = dimSize[rowDim];\n var columnSize = dimSize[1 - rowDim];\n var ratio = Math.abs(rowSize / columnSize);\n var rowCount = Math.ceil(Math.sqrt(ratio * count));\n var columnCount = Math.floor(count / rowCount);\n if (columnCount === 0) {\n columnCount = 1;\n rowCount = count;\n }\n var grids = [];\n for (var i = 0; i < rowCount; i++) {\n grids.push(columnCount);\n }\n var currentCount = rowCount * columnCount;\n var remained = count - currentCount;\n if (remained > 0) {\n for (var i = 0; i < remained; i++) {\n grids[i % rowCount] += 1;\n }\n }\n return grids;\n}\nfunction divideSector(sectorShape, count, outShapes) {\n var r0 = sectorShape.r0;\n var r = sectorShape.r;\n var startAngle = sectorShape.startAngle;\n var endAngle = sectorShape.endAngle;\n var angle = Math.abs(endAngle - startAngle);\n var arcLen = angle * r;\n var deltaR = r - r0;\n var isAngleRow = arcLen > Math.abs(deltaR);\n var grids = getDividingGrids([arcLen, deltaR], isAngleRow ? 0 : 1, count);\n var rowSize = (isAngleRow ? angle : deltaR) / grids.length;\n for (var row = 0; row < grids.length; row++) {\n var columnSize = (isAngleRow ? deltaR : angle) / grids[row];\n for (var column = 0; column < grids[row]; column++) {\n var newShape = {};\n if (isAngleRow) {\n newShape.startAngle = startAngle + rowSize * row;\n newShape.endAngle = startAngle + rowSize * (row + 1);\n newShape.r0 = r0 + columnSize * column;\n newShape.r = r0 + columnSize * (column + 1);\n }\n else {\n newShape.startAngle = startAngle + columnSize * column;\n newShape.endAngle = startAngle + columnSize * (column + 1);\n newShape.r0 = r0 + rowSize * row;\n newShape.r = r0 + rowSize * (row + 1);\n }\n newShape.clockwise = sectorShape.clockwise;\n newShape.cx = sectorShape.cx;\n newShape.cy = sectorShape.cy;\n outShapes.push(newShape);\n }\n }\n}\nfunction divideRect(rectShape, count, outShapes) {\n var width = rectShape.width;\n var height = rectShape.height;\n var isHorizontalRow = width > height;\n var grids = getDividingGrids([width, height], isHorizontalRow ? 0 : 1, count);\n var rowSizeDim = isHorizontalRow ? 'width' : 'height';\n var columnSizeDim = isHorizontalRow ? 'height' : 'width';\n var rowDim = isHorizontalRow ? 'x' : 'y';\n var columnDim = isHorizontalRow ? 'y' : 'x';\n var rowSize = rectShape[rowSizeDim] / grids.length;\n for (var row = 0; row < grids.length; row++) {\n var columnSize = rectShape[columnSizeDim] / grids[row];\n for (var column = 0; column < grids[row]; column++) {\n var newShape = {};\n newShape[rowDim] = row * rowSize;\n newShape[columnDim] = column * columnSize;\n newShape[rowSizeDim] = rowSize;\n newShape[columnSizeDim] = columnSize;\n newShape.x += rectShape.x;\n newShape.y += rectShape.y;\n outShapes.push(newShape);\n }\n }\n}\nfunction crossProduct2d(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\nfunction lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) {\n var mx = a2x - a1x;\n var my = a2y - a1y;\n var nx = b2x - b1x;\n var ny = b2y - b1y;\n var nmCrossProduct = crossProduct2d(nx, ny, mx, my);\n if (Math.abs(nmCrossProduct) < 1e-6) {\n return null;\n }\n var b1a1x = a1x - b1x;\n var b1a1y = a1y - b1y;\n var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct;\n if (p < 0 || p > 1) {\n return null;\n }\n return new Point(p * mx + a1x, p * my + a1y);\n}\nfunction projPtOnLine(pt, lineA, lineB) {\n var dir = new Point();\n Point.sub(dir, lineB, lineA);\n dir.normalize();\n var dir2 = new Point();\n Point.sub(dir2, pt, lineA);\n var len = dir2.dot(dir);\n return len;\n}\nfunction addToPoly(poly, pt) {\n var last = poly[poly.length - 1];\n if (last && last[0] === pt[0] && last[1] === pt[1]) {\n return;\n }\n poly.push(pt);\n}\nfunction splitPolygonByLine(points, lineA, lineB) {\n var len = points.length;\n var intersections = [];\n for (var i = 0; i < len; i++) {\n var p0 = points[i];\n var p1 = points[(i + 1) % len];\n var intersectionPt = lineLineIntersect(p0[0], p0[1], p1[0], p1[1], lineA.x, lineA.y, lineB.x, lineB.y);\n if (intersectionPt) {\n intersections.push({\n projPt: projPtOnLine(intersectionPt, lineA, lineB),\n pt: intersectionPt,\n idx: i\n });\n }\n }\n if (intersections.length < 2) {\n return [{ points: points }, { points: points }];\n }\n intersections.sort(function (a, b) {\n return a.projPt - b.projPt;\n });\n var splitPt0 = intersections[0];\n var splitPt1 = intersections[intersections.length - 1];\n if (splitPt1.idx < splitPt0.idx) {\n var tmp = splitPt0;\n splitPt0 = splitPt1;\n splitPt1 = tmp;\n }\n var splitPt0Arr = [splitPt0.pt.x, splitPt0.pt.y];\n var splitPt1Arr = [splitPt1.pt.x, splitPt1.pt.y];\n var newPolyA = [splitPt0Arr];\n var newPolyB = [splitPt1Arr];\n for (var i = splitPt0.idx + 1; i <= splitPt1.idx; i++) {\n addToPoly(newPolyA, points[i].slice());\n }\n addToPoly(newPolyA, splitPt1Arr);\n addToPoly(newPolyA, splitPt0Arr);\n for (var i = splitPt1.idx + 1; i <= splitPt0.idx + len; i++) {\n addToPoly(newPolyB, points[i % len].slice());\n }\n addToPoly(newPolyB, splitPt0Arr);\n addToPoly(newPolyB, splitPt1Arr);\n return [{\n points: newPolyA\n }, {\n points: newPolyB\n }];\n}\nfunction binaryDividePolygon(polygonShape) {\n var points = polygonShape.points;\n var min = [];\n var max = [];\n fromPoints(points, min, max);\n var boundingRect = new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n var width = boundingRect.width;\n var height = boundingRect.height;\n var x = boundingRect.x;\n var y = boundingRect.y;\n var pt0 = new Point();\n var pt1 = new Point();\n if (width > height) {\n pt0.x = pt1.x = x + width / 2;\n pt0.y = y;\n pt1.y = y + height;\n }\n else {\n pt0.y = pt1.y = y + height / 2;\n pt0.x = x;\n pt1.x = x + width;\n }\n return splitPolygonByLine(points, pt0, pt1);\n}\nfunction binaryDivideRecursive(divider, shape, count, out) {\n if (count === 1) {\n out.push(shape);\n }\n else {\n var mid = Math.floor(count / 2);\n var sub = divider(shape);\n binaryDivideRecursive(divider, sub[0], mid, out);\n binaryDivideRecursive(divider, sub[1], count - mid, out);\n }\n return out;\n}\nexport function clone(path, count) {\n var paths = [];\n for (var i = 0; i < count; i++) {\n paths.push(clonePath(path));\n }\n return paths;\n}\nfunction copyPathProps(source, target) {\n target.setStyle(source.style);\n target.z = source.z;\n target.z2 = source.z2;\n target.zlevel = source.zlevel;\n}\nfunction polygonConvert(points) {\n var out = [];\n for (var i = 0; i < points.length;) {\n out.push([points[i++], points[i++]]);\n }\n return out;\n}\nexport function split(path, count) {\n var outShapes = [];\n var shape = path.shape;\n var OutShapeCtor;\n switch (path.type) {\n case 'rect':\n divideRect(shape, count, outShapes);\n OutShapeCtor = Rect;\n break;\n case 'sector':\n divideSector(shape, count, outShapes);\n OutShapeCtor = Sector;\n break;\n case 'circle':\n divideSector({\n r0: 0, r: shape.r, startAngle: 0, endAngle: Math.PI * 2,\n cx: shape.cx, cy: shape.cy\n }, count, outShapes);\n OutShapeCtor = Sector;\n break;\n default:\n var m = path.getComputedTransform();\n var scale = m ? Math.sqrt(Math.max(m[0] * m[0] + m[1] * m[1], m[2] * m[2] + m[3] * m[3])) : 1;\n var polygons = map(pathToPolygons(path.getUpdatedPathProxy(), scale), function (poly) { return polygonConvert(poly); });\n var polygonCount = polygons.length;\n if (polygonCount === 0) {\n binaryDivideRecursive(binaryDividePolygon, {\n points: polygons[0]\n }, count, outShapes);\n }\n else if (polygonCount === count) {\n for (var i = 0; i < polygonCount; i++) {\n outShapes.push({\n points: polygons[i]\n });\n }\n }\n else {\n var totalArea_1 = 0;\n var items = map(polygons, function (poly) {\n var min = [];\n var max = [];\n fromPoints(poly, min, max);\n var area = (max[1] - min[1]) * (max[0] - min[0]);\n totalArea_1 += area;\n return { poly: poly, area: area };\n });\n items.sort(function (a, b) { return b.area - a.area; });\n var left = count;\n for (var i = 0; i < polygonCount; i++) {\n var item = items[i];\n if (left <= 0) {\n break;\n }\n var selfCount = i === polygonCount - 1\n ? left\n : Math.ceil(item.area / totalArea_1 * count);\n if (selfCount < 0) {\n continue;\n }\n binaryDivideRecursive(binaryDividePolygon, {\n points: item.poly\n }, selfCount, outShapes);\n left -= selfCount;\n }\n ;\n }\n OutShapeCtor = Polygon;\n break;\n }\n if (!OutShapeCtor) {\n return clone(path, count);\n }\n var out = [];\n for (var i = 0; i < outShapes.length; i++) {\n var subPath = new OutShapeCtor();\n subPath.setShape(outShapes[i]);\n copyPathProps(path, subPath);\n out.push(subPath);\n }\n return out;\n}\n","import { cubicSubdivide } from '../core/curve.js';\nimport Path from '../graphic/Path.js';\nimport { defaults, map } from '../core/util.js';\nimport { lerp } from '../core/vector.js';\nimport { clonePath } from './path.js';\nimport Transformable from '../core/Transformable.js';\nimport { split } from './dividePath.js';\nimport { pathToBezierCurves } from './convertPath.js';\nfunction alignSubpath(subpath1, subpath2) {\n var len1 = subpath1.length;\n var len2 = subpath2.length;\n if (len1 === len2) {\n return [subpath1, subpath2];\n }\n var tmpSegX = [];\n var tmpSegY = [];\n var shorterPath = len1 < len2 ? subpath1 : subpath2;\n var shorterLen = Math.min(len1, len2);\n var diff = Math.abs(len2 - len1) / 6;\n var shorterBezierCount = (shorterLen - 2) / 6;\n var eachCurveSubDivCount = Math.ceil(diff / shorterBezierCount) + 1;\n var newSubpath = [shorterPath[0], shorterPath[1]];\n var remained = diff;\n for (var i = 2; i < shorterLen;) {\n var x0 = shorterPath[i - 2];\n var y0 = shorterPath[i - 1];\n var x1 = shorterPath[i++];\n var y1 = shorterPath[i++];\n var x2 = shorterPath[i++];\n var y2 = shorterPath[i++];\n var x3 = shorterPath[i++];\n var y3 = shorterPath[i++];\n if (remained <= 0) {\n newSubpath.push(x1, y1, x2, y2, x3, y3);\n continue;\n }\n var actualSubDivCount = Math.min(remained, eachCurveSubDivCount - 1) + 1;\n for (var k = 1; k <= actualSubDivCount; k++) {\n var p = k / actualSubDivCount;\n cubicSubdivide(x0, x1, x2, x3, p, tmpSegX);\n cubicSubdivide(y0, y1, y2, y3, p, tmpSegY);\n x0 = tmpSegX[3];\n y0 = tmpSegY[3];\n newSubpath.push(tmpSegX[1], tmpSegY[1], tmpSegX[2], tmpSegY[2], x0, y0);\n x1 = tmpSegX[5];\n y1 = tmpSegY[5];\n x2 = tmpSegX[6];\n y2 = tmpSegY[6];\n }\n remained -= actualSubDivCount - 1;\n }\n return shorterPath === subpath1 ? [newSubpath, subpath2] : [subpath1, newSubpath];\n}\nfunction createSubpath(lastSubpathSubpath, otherSubpath) {\n var len = lastSubpathSubpath.length;\n var lastX = lastSubpathSubpath[len - 2];\n var lastY = lastSubpathSubpath[len - 1];\n var newSubpath = [];\n for (var i = 0; i < otherSubpath.length;) {\n newSubpath[i++] = lastX;\n newSubpath[i++] = lastY;\n }\n return newSubpath;\n}\nexport function alignBezierCurves(array1, array2) {\n var _a;\n var lastSubpath1;\n var lastSubpath2;\n var newArray1 = [];\n var newArray2 = [];\n for (var i = 0; i < Math.max(array1.length, array2.length); i++) {\n var subpath1 = array1[i];\n var subpath2 = array2[i];\n var newSubpath1 = void 0;\n var newSubpath2 = void 0;\n if (!subpath1) {\n newSubpath1 = createSubpath(lastSubpath1 || subpath2, subpath2);\n newSubpath2 = subpath2;\n }\n else if (!subpath2) {\n newSubpath2 = createSubpath(lastSubpath2 || subpath1, subpath1);\n newSubpath1 = subpath1;\n }\n else {\n _a = alignSubpath(subpath1, subpath2), newSubpath1 = _a[0], newSubpath2 = _a[1];\n lastSubpath1 = newSubpath1;\n lastSubpath2 = newSubpath2;\n }\n newArray1.push(newSubpath1);\n newArray2.push(newSubpath2);\n }\n return [newArray1, newArray2];\n}\nexport function centroid(array) {\n var signedArea = 0;\n var cx = 0;\n var cy = 0;\n var len = array.length;\n for (var i = 0, j = len - 2; i < len; j = i, i += 2) {\n var x0 = array[j];\n var y0 = array[j + 1];\n var x1 = array[i];\n var y1 = array[i + 1];\n var a = x0 * y1 - x1 * y0;\n signedArea += a;\n cx += (x0 + x1) * a;\n cy += (y0 + y1) * a;\n }\n if (signedArea === 0) {\n return [array[0] || 0, array[1] || 0];\n }\n return [cx / signedArea / 3, cy / signedArea / 3, signedArea];\n}\nfunction findBestRingOffset(fromSubBeziers, toSubBeziers, fromCp, toCp) {\n var bezierCount = (fromSubBeziers.length - 2) / 6;\n var bestScore = Infinity;\n var bestOffset = 0;\n var len = fromSubBeziers.length;\n var len2 = len - 2;\n for (var offset = 0; offset < bezierCount; offset++) {\n var cursorOffset = offset * 6;\n var score = 0;\n for (var k = 0; k < len; k += 2) {\n var idx = k === 0 ? cursorOffset : ((cursorOffset + k - 2) % len2 + 2);\n var x0 = fromSubBeziers[idx] - fromCp[0];\n var y0 = fromSubBeziers[idx + 1] - fromCp[1];\n var x1 = toSubBeziers[k] - toCp[0];\n var y1 = toSubBeziers[k + 1] - toCp[1];\n var dx = x1 - x0;\n var dy = y1 - y0;\n score += dx * dx + dy * dy;\n }\n if (score < bestScore) {\n bestScore = score;\n bestOffset = offset;\n }\n }\n return bestOffset;\n}\nfunction reverse(array) {\n var newArr = [];\n var len = array.length;\n for (var i = 0; i < len; i += 2) {\n newArr[i] = array[len - i - 2];\n newArr[i + 1] = array[len - i - 1];\n }\n return newArr;\n}\nfunction findBestMorphingRotation(fromArr, toArr, searchAngleIteration, searchAngleRange) {\n var result = [];\n var fromNeedsReverse;\n for (var i = 0; i < fromArr.length; i++) {\n var fromSubpathBezier = fromArr[i];\n var toSubpathBezier = toArr[i];\n var fromCp = centroid(fromSubpathBezier);\n var toCp = centroid(toSubpathBezier);\n if (fromNeedsReverse == null) {\n fromNeedsReverse = fromCp[2] < 0 !== toCp[2] < 0;\n }\n var newFromSubpathBezier = [];\n var newToSubpathBezier = [];\n var bestAngle = 0;\n var bestScore = Infinity;\n var tmpArr = [];\n var len = fromSubpathBezier.length;\n if (fromNeedsReverse) {\n fromSubpathBezier = reverse(fromSubpathBezier);\n }\n var offset = findBestRingOffset(fromSubpathBezier, toSubpathBezier, fromCp, toCp) * 6;\n var len2 = len - 2;\n for (var k = 0; k < len2; k += 2) {\n var idx = (offset + k) % len2 + 2;\n newFromSubpathBezier[k + 2] = fromSubpathBezier[idx] - fromCp[0];\n newFromSubpathBezier[k + 3] = fromSubpathBezier[idx + 1] - fromCp[1];\n }\n newFromSubpathBezier[0] = fromSubpathBezier[offset] - fromCp[0];\n newFromSubpathBezier[1] = fromSubpathBezier[offset + 1] - fromCp[1];\n if (searchAngleIteration > 0) {\n var step = searchAngleRange / searchAngleIteration;\n for (var angle = -searchAngleRange / 2; angle <= searchAngleRange / 2; angle += step) {\n var sa = Math.sin(angle);\n var ca = Math.cos(angle);\n var score = 0;\n for (var k = 0; k < fromSubpathBezier.length; k += 2) {\n var x0 = newFromSubpathBezier[k];\n var y0 = newFromSubpathBezier[k + 1];\n var x1 = toSubpathBezier[k] - toCp[0];\n var y1 = toSubpathBezier[k + 1] - toCp[1];\n var newX1 = x1 * ca - y1 * sa;\n var newY1 = x1 * sa + y1 * ca;\n tmpArr[k] = newX1;\n tmpArr[k + 1] = newY1;\n var dx = newX1 - x0;\n var dy = newY1 - y0;\n score += dx * dx + dy * dy;\n }\n if (score < bestScore) {\n bestScore = score;\n bestAngle = angle;\n for (var m = 0; m < tmpArr.length; m++) {\n newToSubpathBezier[m] = tmpArr[m];\n }\n }\n }\n }\n else {\n for (var i_1 = 0; i_1 < len; i_1 += 2) {\n newToSubpathBezier[i_1] = toSubpathBezier[i_1] - toCp[0];\n newToSubpathBezier[i_1 + 1] = toSubpathBezier[i_1 + 1] - toCp[1];\n }\n }\n result.push({\n from: newFromSubpathBezier,\n to: newToSubpathBezier,\n fromCp: fromCp,\n toCp: toCp,\n rotation: -bestAngle\n });\n }\n return result;\n}\nexport function isCombineMorphing(path) {\n return path.__isCombineMorphing;\n}\nexport function isMorphing(el) {\n return el.__morphT >= 0;\n}\nvar SAVED_METHOD_PREFIX = '__mOriginal_';\nfunction saveAndModifyMethod(obj, methodName, modifiers) {\n var savedMethodName = SAVED_METHOD_PREFIX + methodName;\n var originalMethod = obj[savedMethodName] || obj[methodName];\n if (!obj[savedMethodName]) {\n obj[savedMethodName] = obj[methodName];\n }\n var replace = modifiers.replace;\n var after = modifiers.after;\n var before = modifiers.before;\n obj[methodName] = function () {\n var args = arguments;\n var res;\n before && before.apply(this, args);\n if (replace) {\n res = replace.apply(this, args);\n }\n else {\n res = originalMethod.apply(this, args);\n }\n after && after.apply(this, args);\n return res;\n };\n}\nfunction restoreMethod(obj, methodName) {\n var savedMethodName = SAVED_METHOD_PREFIX + methodName;\n if (obj[savedMethodName]) {\n obj[methodName] = obj[savedMethodName];\n obj[savedMethodName] = null;\n }\n}\nfunction applyTransformOnBeziers(bezierCurves, mm) {\n for (var i = 0; i < bezierCurves.length; i++) {\n var subBeziers = bezierCurves[i];\n for (var k = 0; k < subBeziers.length;) {\n var x = subBeziers[k];\n var y = subBeziers[k + 1];\n subBeziers[k++] = mm[0] * x + mm[2] * y + mm[4];\n subBeziers[k++] = mm[1] * x + mm[3] * y + mm[5];\n }\n }\n}\nfunction prepareMorphPath(fromPath, toPath) {\n var fromPathProxy = fromPath.getUpdatedPathProxy();\n var toPathProxy = toPath.getUpdatedPathProxy();\n var _a = alignBezierCurves(pathToBezierCurves(fromPathProxy), pathToBezierCurves(toPathProxy)), fromBezierCurves = _a[0], toBezierCurves = _a[1];\n var fromPathTransform = fromPath.getComputedTransform();\n var toPathTransform = toPath.getComputedTransform();\n function updateIdentityTransform() {\n this.transform = null;\n }\n fromPathTransform && applyTransformOnBeziers(fromBezierCurves, fromPathTransform);\n toPathTransform && applyTransformOnBeziers(toBezierCurves, toPathTransform);\n saveAndModifyMethod(toPath, 'updateTransform', { replace: updateIdentityTransform });\n toPath.transform = null;\n var morphingData = findBestMorphingRotation(fromBezierCurves, toBezierCurves, 10, Math.PI);\n var tmpArr = [];\n saveAndModifyMethod(toPath, 'buildPath', { replace: function (path) {\n var t = toPath.__morphT;\n var onet = 1 - t;\n var newCp = [];\n for (var i = 0; i < morphingData.length; i++) {\n var item = morphingData[i];\n var from = item.from;\n var to = item.to;\n var angle = item.rotation * t;\n var fromCp = item.fromCp;\n var toCp = item.toCp;\n var sa = Math.sin(angle);\n var ca = Math.cos(angle);\n lerp(newCp, fromCp, toCp, t);\n for (var m = 0; m < from.length; m += 2) {\n var x0_1 = from[m];\n var y0_1 = from[m + 1];\n var x1 = to[m];\n var y1 = to[m + 1];\n var x = x0_1 * onet + x1 * t;\n var y = y0_1 * onet + y1 * t;\n tmpArr[m] = (x * ca - y * sa) + newCp[0];\n tmpArr[m + 1] = (x * sa + y * ca) + newCp[1];\n }\n var x0 = tmpArr[0];\n var y0 = tmpArr[1];\n path.moveTo(x0, y0);\n for (var m = 2; m < from.length;) {\n var x1 = tmpArr[m++];\n var y1 = tmpArr[m++];\n var x2 = tmpArr[m++];\n var y2 = tmpArr[m++];\n var x3 = tmpArr[m++];\n var y3 = tmpArr[m++];\n if (x0 === x1 && y0 === y1 && x2 === x3 && y2 === y3) {\n path.lineTo(x3, y3);\n }\n else {\n path.bezierCurveTo(x1, y1, x2, y2, x3, y3);\n }\n x0 = x3;\n y0 = y3;\n }\n }\n } });\n}\nexport function morphPath(fromPath, toPath, animationOpts) {\n if (!fromPath || !toPath) {\n return toPath;\n }\n var oldDone = animationOpts.done;\n var oldDuring = animationOpts.during;\n prepareMorphPath(fromPath, toPath);\n toPath.__morphT = 0;\n function restoreToPath() {\n restoreMethod(toPath, 'buildPath');\n restoreMethod(toPath, 'updateTransform');\n toPath.__morphT = -1;\n toPath.createPathProxy();\n toPath.dirtyShape();\n }\n toPath.animateTo({\n __morphT: 1\n }, defaults({\n during: function (p) {\n toPath.dirtyShape();\n oldDuring && oldDuring(p);\n },\n done: function () {\n restoreToPath();\n oldDone && oldDone();\n }\n }, animationOpts));\n return toPath;\n}\nfunction hilbert(x, y, minX, minY, maxX, maxY) {\n var bits = 16;\n x = (maxX === minX) ? 0 : Math.round(32767 * (x - minX) / (maxX - minX));\n y = (maxY === minY) ? 0 : Math.round(32767 * (y - minY) / (maxY - minY));\n var d = 0;\n var tmp;\n for (var s = (1 << bits) / 2; s > 0; s /= 2) {\n var rx = 0;\n var ry = 0;\n if ((x & s) > 0) {\n rx = 1;\n }\n if ((y & s) > 0) {\n ry = 1;\n }\n d += s * s * ((3 * rx) ^ ry);\n if (ry === 0) {\n if (rx === 1) {\n x = s - 1 - x;\n y = s - 1 - y;\n }\n tmp = x;\n x = y;\n y = tmp;\n }\n }\n return d;\n}\nfunction sortPaths(pathList) {\n var xMin = Infinity;\n var yMin = Infinity;\n var xMax = -Infinity;\n var yMax = -Infinity;\n var cps = map(pathList, function (path) {\n var rect = path.getBoundingRect();\n var m = path.getComputedTransform();\n var x = rect.x + rect.width / 2 + (m ? m[4] : 0);\n var y = rect.y + rect.height / 2 + (m ? m[5] : 0);\n xMin = Math.min(x, xMin);\n yMin = Math.min(y, yMin);\n xMax = Math.max(x, xMax);\n yMax = Math.max(y, yMax);\n return [x, y];\n });\n var items = map(cps, function (cp, idx) {\n return {\n cp: cp,\n z: hilbert(cp[0], cp[1], xMin, yMin, xMax, yMax),\n path: pathList[idx]\n };\n });\n return items.sort(function (a, b) { return a.z - b.z; }).map(function (item) { return item.path; });\n}\n;\nfunction defaultDividePath(param) {\n return split(param.path, param.count);\n}\nfunction createEmptyReturn() {\n return {\n fromIndividuals: [],\n toIndividuals: [],\n count: 0\n };\n}\nexport function combineMorph(fromList, toPath, animationOpts) {\n var fromPathList = [];\n function addFromPath(fromList) {\n for (var i = 0; i < fromList.length; i++) {\n var from = fromList[i];\n if (isCombineMorphing(from)) {\n addFromPath(from.childrenRef());\n }\n else if (from instanceof Path) {\n fromPathList.push(from);\n }\n }\n }\n addFromPath(fromList);\n var separateCount = fromPathList.length;\n if (!separateCount) {\n return createEmptyReturn();\n }\n var dividePath = animationOpts.dividePath || defaultDividePath;\n var toSubPathList = dividePath({\n path: toPath, count: separateCount\n });\n if (toSubPathList.length !== separateCount) {\n console.error('Invalid morphing: unmatched splitted path');\n return createEmptyReturn();\n }\n fromPathList = sortPaths(fromPathList);\n toSubPathList = sortPaths(toSubPathList);\n var oldDone = animationOpts.done;\n var oldDuring = animationOpts.during;\n var individualDelay = animationOpts.individualDelay;\n var identityTransform = new Transformable();\n for (var i = 0; i < separateCount; i++) {\n var from = fromPathList[i];\n var to = toSubPathList[i];\n to.parent = toPath;\n to.copyTransform(identityTransform);\n if (!individualDelay) {\n prepareMorphPath(from, to);\n }\n }\n toPath.__isCombineMorphing = true;\n toPath.childrenRef = function () {\n return toSubPathList;\n };\n function addToSubPathListToZr(zr) {\n for (var i = 0; i < toSubPathList.length; i++) {\n toSubPathList[i].addSelfToZr(zr);\n }\n }\n saveAndModifyMethod(toPath, 'addSelfToZr', {\n after: function (zr) {\n addToSubPathListToZr(zr);\n }\n });\n saveAndModifyMethod(toPath, 'removeSelfFromZr', {\n after: function (zr) {\n for (var i = 0; i < toSubPathList.length; i++) {\n toSubPathList[i].removeSelfFromZr(zr);\n }\n }\n });\n function restoreToPath() {\n toPath.__isCombineMorphing = false;\n toPath.__morphT = -1;\n toPath.childrenRef = null;\n restoreMethod(toPath, 'addSelfToZr');\n restoreMethod(toPath, 'removeSelfFromZr');\n }\n var toLen = toSubPathList.length;\n if (individualDelay) {\n var animating_1 = toLen;\n var eachDone = function () {\n animating_1--;\n if (animating_1 === 0) {\n restoreToPath();\n oldDone && oldDone();\n }\n };\n for (var i = 0; i < toLen; i++) {\n var indivdualAnimationOpts = individualDelay ? defaults({\n delay: (animationOpts.delay || 0) + individualDelay(i, toLen, fromPathList[i], toSubPathList[i]),\n done: eachDone\n }, animationOpts) : animationOpts;\n morphPath(fromPathList[i], toSubPathList[i], indivdualAnimationOpts);\n }\n }\n else {\n toPath.__morphT = 0;\n toPath.animateTo({\n __morphT: 1\n }, defaults({\n during: function (p) {\n for (var i = 0; i < toLen; i++) {\n var child = toSubPathList[i];\n child.__morphT = toPath.__morphT;\n child.dirtyShape();\n }\n oldDuring && oldDuring(p);\n },\n done: function () {\n restoreToPath();\n for (var i = 0; i < fromList.length; i++) {\n restoreMethod(fromList[i], 'updateTransform');\n }\n oldDone && oldDone();\n }\n }, animationOpts));\n }\n if (toPath.__zr) {\n addToSubPathListToZr(toPath.__zr);\n }\n return {\n fromIndividuals: fromPathList,\n toIndividuals: toSubPathList,\n count: toLen\n };\n}\nexport function separateMorph(fromPath, toPathList, animationOpts) {\n var toLen = toPathList.length;\n var fromPathList = [];\n var dividePath = animationOpts.dividePath || defaultDividePath;\n function addFromPath(fromList) {\n for (var i = 0; i < fromList.length; i++) {\n var from = fromList[i];\n if (isCombineMorphing(from)) {\n addFromPath(from.childrenRef());\n }\n else if (from instanceof Path) {\n fromPathList.push(from);\n }\n }\n }\n if (isCombineMorphing(fromPath)) {\n addFromPath(fromPath.childrenRef());\n var fromLen = fromPathList.length;\n if (fromLen < toLen) {\n var k = 0;\n for (var i = fromLen; i < toLen; i++) {\n fromPathList.push(clonePath(fromPathList[k++ % fromLen]));\n }\n }\n fromPathList.length = toLen;\n }\n else {\n fromPathList = dividePath({ path: fromPath, count: toLen });\n var fromPathTransform = fromPath.getComputedTransform();\n for (var i = 0; i < fromPathList.length; i++) {\n fromPathList[i].setLocalTransform(fromPathTransform);\n }\n if (fromPathList.length !== toLen) {\n console.error('Invalid morphing: unmatched splitted path');\n return createEmptyReturn();\n }\n }\n fromPathList = sortPaths(fromPathList);\n toPathList = sortPaths(toPathList);\n var individualDelay = animationOpts.individualDelay;\n for (var i = 0; i < toLen; i++) {\n var indivdualAnimationOpts = individualDelay ? defaults({\n delay: (animationOpts.delay || 0) + individualDelay(i, toLen, fromPathList[i], toPathList[i])\n }, animationOpts) : animationOpts;\n morphPath(fromPathList[i], toPathList[i], indivdualAnimationOpts);\n }\n return {\n fromIndividuals: fromPathList,\n toIndividuals: toPathList,\n count: toPathList.length\n };\n}\nexport { split as defaultDividePath };\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { separateMorph, combineMorph, morphPath, isCombineMorphing } from 'zrender/lib/tool/morphPath.js';\nimport { Path } from '../util/graphic.js';\nimport { defaults, isArray } from 'zrender/lib/core/util.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { clonePath } from 'zrender/lib/tool/path.js';\nfunction isMultiple(elements) {\n return isArray(elements[0]);\n}\nfunction prepareMorphBatches(one, many) {\n var batches = [];\n var batchCount = one.length;\n for (var i = 0; i < batchCount; i++) {\n batches.push({\n one: one[i],\n many: []\n });\n }\n for (var i = 0; i < many.length; i++) {\n var len = many[i].length;\n var k = void 0;\n for (k = 0; k < len; k++) {\n batches[k % batchCount].many.push(many[i][k]);\n }\n }\n var off = 0;\n // If one has more paths than each one of many. average them.\n for (var i = batchCount - 1; i >= 0; i--) {\n if (!batches[i].many.length) {\n var moveFrom = batches[off].many;\n if (moveFrom.length <= 1) {\n // Not enough\n // Start from the first one.\n if (off) {\n off = 0;\n } else {\n return batches;\n }\n }\n var len = moveFrom.length;\n var mid = Math.ceil(len / 2);\n batches[i].many = moveFrom.slice(mid, len);\n batches[off].many = moveFrom.slice(0, mid);\n off++;\n }\n }\n return batches;\n}\nvar pathDividers = {\n clone: function (params) {\n var ret = [];\n // Fitting the alpha\n var approxOpacity = 1 - Math.pow(1 - params.path.style.opacity, 1 / params.count);\n for (var i = 0; i < params.count; i++) {\n var cloned = clonePath(params.path);\n cloned.setStyle('opacity', approxOpacity);\n ret.push(cloned);\n }\n return ret;\n },\n // Use the default divider\n split: null\n};\nexport function applyMorphAnimation(from, to, divideShape, seriesModel, dataIndex, animateOtherProps) {\n if (!from.length || !to.length) {\n return;\n }\n var updateAnimationCfg = getAnimationConfig('update', seriesModel, dataIndex);\n if (!(updateAnimationCfg && updateAnimationCfg.duration > 0)) {\n return;\n }\n var animationDelay = seriesModel.getModel('universalTransition').get('delay');\n var animationCfg = Object.assign({\n // Need to setToFinal so the further calculation based on the style can be correct.\n // Like emphasis color.\n setToFinal: true\n }, updateAnimationCfg);\n var many;\n var one;\n if (isMultiple(from)) {\n // manyToOne\n many = from;\n one = to;\n }\n if (isMultiple(to)) {\n // oneToMany\n many = to;\n one = from;\n }\n function morphOneBatch(batch, fromIsMany, animateIndex, animateCount, forceManyOne) {\n var batchMany = batch.many;\n var batchOne = batch.one;\n if (batchMany.length === 1 && !forceManyOne) {\n // Is one to one\n var batchFrom = fromIsMany ? batchMany[0] : batchOne;\n var batchTo = fromIsMany ? batchOne : batchMany[0];\n if (isCombineMorphing(batchFrom)) {\n // Keep doing combine animation.\n morphOneBatch({\n many: [batchFrom],\n one: batchTo\n }, true, animateIndex, animateCount, true);\n } else {\n var individualAnimationCfg = animationDelay ? defaults({\n delay: animationDelay(animateIndex, animateCount)\n }, animationCfg) : animationCfg;\n morphPath(batchFrom, batchTo, individualAnimationCfg);\n animateOtherProps(batchFrom, batchTo, batchFrom, batchTo, individualAnimationCfg);\n }\n } else {\n var separateAnimationCfg = defaults({\n dividePath: pathDividers[divideShape],\n individualDelay: animationDelay && function (idx, count, fromPath, toPath) {\n return animationDelay(idx + animateIndex, animateCount);\n }\n }, animationCfg);\n var _a = fromIsMany ? combineMorph(batchMany, batchOne, separateAnimationCfg) : separateMorph(batchOne, batchMany, separateAnimationCfg),\n fromIndividuals = _a.fromIndividuals,\n toIndividuals = _a.toIndividuals;\n var count = fromIndividuals.length;\n for (var k = 0; k < count; k++) {\n var individualAnimationCfg = animationDelay ? defaults({\n delay: animationDelay(k, count)\n }, animationCfg) : animationCfg;\n animateOtherProps(fromIndividuals[k], toIndividuals[k], fromIsMany ? batchMany[k] : batch.one, fromIsMany ? batch.one : batchMany[k], individualAnimationCfg);\n }\n }\n }\n var fromIsMany = many ? many === from\n // Is one to one. If the path number not match. also needs do merge and separate morphing.\n : from.length > to.length;\n var morphBatches = many ? prepareMorphBatches(one, many) : prepareMorphBatches(fromIsMany ? to : from, [fromIsMany ? from : to]);\n var animateCount = 0;\n for (var i = 0; i < morphBatches.length; i++) {\n animateCount += morphBatches[i].many.length;\n }\n var animateIndex = 0;\n for (var i = 0; i < morphBatches.length; i++) {\n morphOneBatch(morphBatches[i], fromIsMany, animateIndex, animateCount);\n animateIndex += morphBatches[i].many.length;\n }\n}\nexport function getPathList(elements) {\n if (!elements) {\n return [];\n }\n if (isArray(elements)) {\n var pathList_1 = [];\n for (var i = 0; i < elements.length; i++) {\n pathList_1.push(getPathList(elements[i]));\n }\n return pathList_1;\n }\n var pathList = [];\n elements.traverse(function (el) {\n if (el instanceof Path && !el.disableMorphing && !el.invisible && !el.ignore) {\n pathList.push(el);\n }\n });\n return pathList;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Universal transitions that can animate between any shapes(series) and any properties in any amounts.\nimport { SERIES_UNIVERSAL_TRANSITION_PROP } from '../model/Series.js';\nimport { createHashMap, each, map, filter, isArray, extend } from 'zrender/lib/core/util.js';\nimport { applyMorphAnimation, getPathList } from './morphTransitionHelper.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { initProps } from '../util/graphic.js';\nimport DataDiffer from '../data/DataDiffer.js';\nimport { makeInner, normalizeToArray } from '../util/model.js';\nimport { warn } from '../util/log.js';\nimport { getAnimationConfig, getOldStyle } from './basicTransition.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nvar DATA_COUNT_THRESHOLD = 1e4;\nvar TRANSITION_NONE = 0;\nvar TRANSITION_P2C = 1;\nvar TRANSITION_C2P = 2;\n;\nvar getUniversalTransitionGlobalStore = makeInner();\nfunction getDimension(data, visualDimension) {\n var dimensions = data.dimensions;\n for (var i = 0; i < dimensions.length; i++) {\n var dimInfo = data.getDimensionInfo(dimensions[i]);\n if (dimInfo && dimInfo.otherDims[visualDimension] === 0) {\n return dimensions[i];\n }\n }\n}\n// get value by dimension. (only get value of itemGroupId or childGroupId, so convert it to string)\nfunction getValueByDimension(data, dataIndex, dimension) {\n var dimInfo = data.getDimensionInfo(dimension);\n var dimOrdinalMeta = dimInfo && dimInfo.ordinalMeta;\n if (dimInfo) {\n var value = data.get(dimInfo.name, dataIndex);\n if (dimOrdinalMeta) {\n return dimOrdinalMeta.categories[value] || value + '';\n }\n return value + '';\n }\n}\nfunction getGroupId(data, dataIndex, dataGroupId, isChild) {\n // try to get groupId from encode\n var visualDimension = isChild ? 'itemChildGroupId' : 'itemGroupId';\n var groupIdDim = getDimension(data, visualDimension);\n if (groupIdDim) {\n var groupId = getValueByDimension(data, dataIndex, groupIdDim);\n return groupId;\n }\n // try to get groupId from raw data item\n var rawDataItem = data.getRawDataItem(dataIndex);\n var property = isChild ? 'childGroupId' : 'groupId';\n if (rawDataItem && rawDataItem[property]) {\n return rawDataItem[property] + '';\n }\n // fallback\n if (isChild) {\n return;\n }\n // try to use series.dataGroupId as groupId, otherwise use dataItem's id as groupId\n return dataGroupId || data.getId(dataIndex);\n}\n// flatten all data items from different serieses into one arrary\nfunction flattenDataDiffItems(list) {\n var items = [];\n each(list, function (seriesInfo) {\n var data = seriesInfo.data;\n var dataGroupId = seriesInfo.dataGroupId;\n if (data.count() > DATA_COUNT_THRESHOLD) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Universal transition is disabled on large data > 10k.');\n }\n return;\n }\n var indices = data.getIndices();\n for (var dataIndex = 0; dataIndex < indices.length; dataIndex++) {\n items.push({\n data: data,\n groupId: getGroupId(data, dataIndex, dataGroupId, false),\n childGroupId: getGroupId(data, dataIndex, dataGroupId, true),\n divide: seriesInfo.divide,\n dataIndex: dataIndex\n });\n }\n });\n return items;\n}\nfunction fadeInElement(newEl, newSeries, newIndex) {\n newEl.traverse(function (el) {\n if (el instanceof Path) {\n // TODO use fade in animation for target element.\n initProps(el, {\n style: {\n opacity: 0\n }\n }, newSeries, {\n dataIndex: newIndex,\n isFrom: true\n });\n }\n });\n}\nfunction removeEl(el) {\n if (el.parent) {\n // Bake parent transform to element.\n // So it can still have proper transform to transition after it's removed.\n var computedTransform = el.getComputedTransform();\n el.setLocalTransform(computedTransform);\n el.parent.remove(el);\n }\n}\nfunction stopAnimation(el) {\n el.stopAnimation();\n if (el.isGroup) {\n el.traverse(function (child) {\n child.stopAnimation();\n });\n }\n}\nfunction animateElementStyles(el, dataIndex, seriesModel) {\n var animationConfig = getAnimationConfig('update', seriesModel, dataIndex);\n animationConfig && el.traverse(function (child) {\n if (child instanceof Displayable) {\n var oldStyle = getOldStyle(child);\n if (oldStyle) {\n child.animateFrom({\n style: oldStyle\n }, animationConfig);\n }\n }\n });\n}\nfunction isAllIdSame(oldDiffItems, newDiffItems) {\n var len = oldDiffItems.length;\n if (len !== newDiffItems.length) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n var oldItem = oldDiffItems[i];\n var newItem = newDiffItems[i];\n if (oldItem.data.getId(oldItem.dataIndex) !== newItem.data.getId(newItem.dataIndex)) {\n return false;\n }\n }\n return true;\n}\nfunction transitionBetween(oldList, newList, api) {\n var oldDiffItems = flattenDataDiffItems(oldList);\n var newDiffItems = flattenDataDiffItems(newList);\n function updateMorphingPathProps(from, to, rawFrom, rawTo, animationCfg) {\n if (rawFrom || from) {\n to.animateFrom({\n style: rawFrom && rawFrom !== from\n // dividingMethod like clone may override the style(opacity)\n // So extend it to raw style.\n ? extend(extend({}, rawFrom.style), from.style) : from.style\n }, animationCfg);\n }\n }\n var hasMorphAnimation = false;\n /**\n * With groupId and childGroupId, we can build parent-child relationships between dataItems.\n * However, we should mind the parent-child \"direction\" between old and new options.\n *\n * For example, suppose we have two dataItems from two series.data:\n *\n * dataA: [ dataB: [\n * { {\n * value: 5, value: 3,\n * groupId: 'creatures', groupId: 'animals',\n * childGroupId: 'animals' childGroupId: 'dogs'\n * }, },\n * ... ...\n * ] ]\n *\n * where dataA is belong to optionA and dataB is belong to optionB.\n *\n * When we `setOption(optionB)` from optionA, we choose childGroupId of dataItemA and groupId of\n * dataItemB as keys so the two keys are matched (both are 'animals'), then universalTransition\n * will work. This derection is \"parent -> child\".\n *\n * If we `setOption(optionA)` from optionB, we also choose groupId of dataItemB and childGroupId\n * of dataItemA as keys and universalTransition will work. This derection is \"child -> parent\".\n *\n * If there is no childGroupId specified, which means no multiLevelDrillDown/Up is needed and no\n * parent-child relationship exists. This direction is \"none\".\n *\n * So we need to know whether to use groupId or childGroupId as the key when we call the keyGetter\n * functions. Thus, we need to decide the direction first.\n *\n * The rule is:\n *\n * if (all childGroupIds in oldDiffItems and all groupIds in newDiffItems have common value) {\n * direction = 'parent -> child';\n * } else if (all groupIds in oldDiffItems and all childGroupIds in newDiffItems have common value) {\n * direction = 'child -> parent';\n * } else {\n * direction = 'none';\n * }\n */\n var direction = TRANSITION_NONE;\n // find all groupIds and childGroupIds from oldDiffItems\n var oldGroupIds = createHashMap();\n var oldChildGroupIds = createHashMap();\n oldDiffItems.forEach(function (item) {\n item.groupId && oldGroupIds.set(item.groupId, true);\n item.childGroupId && oldChildGroupIds.set(item.childGroupId, true);\n });\n // traverse newDiffItems and decide the direction according to the rule\n for (var i = 0; i < newDiffItems.length; i++) {\n var newGroupId = newDiffItems[i].groupId;\n if (oldChildGroupIds.get(newGroupId)) {\n direction = TRANSITION_P2C;\n break;\n }\n var newChildGroupId = newDiffItems[i].childGroupId;\n if (newChildGroupId && oldGroupIds.get(newChildGroupId)) {\n direction = TRANSITION_C2P;\n break;\n }\n }\n function createKeyGetter(isOld, onlyGetId) {\n return function (diffItem) {\n var data = diffItem.data;\n var dataIndex = diffItem.dataIndex;\n // TODO if specified dim\n if (onlyGetId) {\n return data.getId(dataIndex);\n }\n if (isOld) {\n return direction === TRANSITION_P2C ? diffItem.childGroupId : diffItem.groupId;\n } else {\n return direction === TRANSITION_C2P ? diffItem.childGroupId : diffItem.groupId;\n }\n };\n }\n // Use id if it's very likely to be an one to one animation\n // It's more robust than groupId\n // TODO Check if key dimension is specified.\n var useId = isAllIdSame(oldDiffItems, newDiffItems);\n var isElementStillInChart = {};\n if (!useId) {\n // We may have different diff strategy with basicTransition if we use other dimension as key.\n // If so, we can't simply check if oldEl is same with newEl. We need a map to check if oldEl is still being used in the new chart.\n // We can't use the elements that already being morphed. Let it keep it's original basic transition.\n for (var i = 0; i < newDiffItems.length; i++) {\n var newItem = newDiffItems[i];\n var el = newItem.data.getItemGraphicEl(newItem.dataIndex);\n if (el) {\n isElementStillInChart[el.id] = true;\n }\n }\n }\n function updateOneToOne(newIndex, oldIndex) {\n var oldItem = oldDiffItems[oldIndex];\n var newItem = newDiffItems[newIndex];\n var newSeries = newItem.data.hostModel;\n // TODO Mark this elements is morphed and don't morph them anymore\n var oldEl = oldItem.data.getItemGraphicEl(oldItem.dataIndex);\n var newEl = newItem.data.getItemGraphicEl(newItem.dataIndex);\n // Can't handle same elements.\n if (oldEl === newEl) {\n newEl && animateElementStyles(newEl, newItem.dataIndex, newSeries);\n return;\n }\n if (\n // We can't use the elements that already being morphed\n oldEl && isElementStillInChart[oldEl.id]) {\n return;\n }\n if (newEl) {\n // TODO: If keep animating the group in case\n // some of the elements don't want to be morphed.\n // TODO Label?\n stopAnimation(newEl);\n if (oldEl) {\n stopAnimation(oldEl);\n // If old element is doing leaving animation. stop it and remove it immediately.\n removeEl(oldEl);\n hasMorphAnimation = true;\n applyMorphAnimation(getPathList(oldEl), getPathList(newEl), newItem.divide, newSeries, newIndex, updateMorphingPathProps);\n } else {\n fadeInElement(newEl, newSeries, newIndex);\n }\n }\n // else keep oldEl leaving animation.\n }\n\n new DataDiffer(oldDiffItems, newDiffItems, createKeyGetter(true, useId), createKeyGetter(false, useId), null, 'multiple').update(updateOneToOne).updateManyToOne(function (newIndex, oldIndices) {\n var newItem = newDiffItems[newIndex];\n var newData = newItem.data;\n var newSeries = newData.hostModel;\n var newEl = newData.getItemGraphicEl(newItem.dataIndex);\n var oldElsList = filter(map(oldIndices, function (idx) {\n return oldDiffItems[idx].data.getItemGraphicEl(oldDiffItems[idx].dataIndex);\n }), function (oldEl) {\n return oldEl && oldEl !== newEl && !isElementStillInChart[oldEl.id];\n });\n if (newEl) {\n stopAnimation(newEl);\n if (oldElsList.length) {\n // If old element is doing leaving animation. stop it and remove it immediately.\n each(oldElsList, function (oldEl) {\n stopAnimation(oldEl);\n removeEl(oldEl);\n });\n hasMorphAnimation = true;\n applyMorphAnimation(getPathList(oldElsList), getPathList(newEl), newItem.divide, newSeries, newIndex, updateMorphingPathProps);\n } else {\n fadeInElement(newEl, newSeries, newItem.dataIndex);\n }\n }\n // else keep oldEl leaving animation.\n }).updateOneToMany(function (newIndices, oldIndex) {\n var oldItem = oldDiffItems[oldIndex];\n var oldEl = oldItem.data.getItemGraphicEl(oldItem.dataIndex);\n // We can't use the elements that already being morphed\n if (oldEl && isElementStillInChart[oldEl.id]) {\n return;\n }\n var newElsList = filter(map(newIndices, function (idx) {\n return newDiffItems[idx].data.getItemGraphicEl(newDiffItems[idx].dataIndex);\n }), function (el) {\n return el && el !== oldEl;\n });\n var newSeris = newDiffItems[newIndices[0]].data.hostModel;\n if (newElsList.length) {\n each(newElsList, function (newEl) {\n return stopAnimation(newEl);\n });\n if (oldEl) {\n stopAnimation(oldEl);\n // If old element is doing leaving animation. stop it and remove it immediately.\n removeEl(oldEl);\n hasMorphAnimation = true;\n applyMorphAnimation(getPathList(oldEl), getPathList(newElsList), oldItem.divide,\n // Use divide on old.\n newSeris, newIndices[0], updateMorphingPathProps);\n } else {\n each(newElsList, function (newEl) {\n return fadeInElement(newEl, newSeris, newIndices[0]);\n });\n }\n }\n // else keep oldEl leaving animation.\n }).updateManyToMany(function (newIndices, oldIndices) {\n // If two data are same and both have groupId.\n // Normally they should be diff by id.\n new DataDiffer(oldIndices, newIndices, function (rawIdx) {\n return oldDiffItems[rawIdx].data.getId(oldDiffItems[rawIdx].dataIndex);\n }, function (rawIdx) {\n return newDiffItems[rawIdx].data.getId(newDiffItems[rawIdx].dataIndex);\n }).update(function (newIndex, oldIndex) {\n // Use the original index\n updateOneToOne(newIndices[newIndex], oldIndices[oldIndex]);\n }).execute();\n }).execute();\n if (hasMorphAnimation) {\n each(newList, function (_a) {\n var data = _a.data;\n var seriesModel = data.hostModel;\n var view = seriesModel && api.getViewOfSeriesModel(seriesModel);\n var animationCfg = getAnimationConfig('update', seriesModel, 0); // use 0 index.\n if (view && seriesModel.isAnimationEnabled() && animationCfg && animationCfg.duration > 0) {\n view.group.traverse(function (el) {\n if (el instanceof Path && !el.animators.length) {\n // We can't accept there still exists element that has no animation\n // if universalTransition is enabled\n el.animateFrom({\n style: {\n opacity: 0\n }\n }, animationCfg);\n }\n });\n }\n });\n }\n}\nfunction getSeriesTransitionKey(series) {\n var seriesKey = series.getModel('universalTransition').get('seriesKey');\n if (!seriesKey) {\n // Use series id by default.\n return series.id;\n }\n return seriesKey;\n}\nfunction convertArraySeriesKeyToString(seriesKey) {\n if (isArray(seriesKey)) {\n // Order independent.\n return seriesKey.sort().join(',');\n }\n return seriesKey;\n}\nfunction getDivideShapeFromData(data) {\n if (data.hostModel) {\n return data.hostModel.getModel('universalTransition').get('divideShape');\n }\n}\nfunction findTransitionSeriesBatches(globalStore, params) {\n var updateBatches = createHashMap();\n var oldDataMap = createHashMap();\n // Map that only store key in array seriesKey.\n // Which is used to query the old data when transition from one to multiple series.\n var oldDataMapForSplit = createHashMap();\n each(globalStore.oldSeries, function (series, idx) {\n var oldDataGroupId = globalStore.oldDataGroupIds[idx];\n var oldData = globalStore.oldData[idx];\n var transitionKey = getSeriesTransitionKey(series);\n var transitionKeyStr = convertArraySeriesKeyToString(transitionKey);\n oldDataMap.set(transitionKeyStr, {\n dataGroupId: oldDataGroupId,\n data: oldData\n });\n if (isArray(transitionKey)) {\n // Same key can't in different array seriesKey.\n each(transitionKey, function (key) {\n oldDataMapForSplit.set(key, {\n key: transitionKeyStr,\n dataGroupId: oldDataGroupId,\n data: oldData\n });\n });\n }\n });\n function checkTransitionSeriesKeyDuplicated(transitionKeyStr) {\n if (updateBatches.get(transitionKeyStr)) {\n warn(\"Duplicated seriesKey in universalTransition \" + transitionKeyStr);\n }\n }\n each(params.updatedSeries, function (series) {\n if (series.isUniversalTransitionEnabled() && series.isAnimationEnabled()) {\n var newDataGroupId = series.get('dataGroupId');\n var newData = series.getData();\n var transitionKey = getSeriesTransitionKey(series);\n var transitionKeyStr = convertArraySeriesKeyToString(transitionKey);\n // Only transition between series with same id.\n var oldData = oldDataMap.get(transitionKeyStr);\n // string transition key is the best match.\n if (oldData) {\n if (process.env.NODE_ENV !== 'production') {\n checkTransitionSeriesKeyDuplicated(transitionKeyStr);\n }\n // TODO check if data is same?\n updateBatches.set(transitionKeyStr, {\n oldSeries: [{\n dataGroupId: oldData.dataGroupId,\n divide: getDivideShapeFromData(oldData.data),\n data: oldData.data\n }],\n newSeries: [{\n dataGroupId: newDataGroupId,\n divide: getDivideShapeFromData(newData),\n data: newData\n }]\n });\n } else {\n // Transition from multiple series.\n // e.g. 'female', 'male' -> ['female', 'male']\n if (isArray(transitionKey)) {\n if (process.env.NODE_ENV !== 'production') {\n checkTransitionSeriesKeyDuplicated(transitionKeyStr);\n }\n var oldSeries_1 = [];\n each(transitionKey, function (key) {\n var oldData = oldDataMap.get(key);\n if (oldData.data) {\n oldSeries_1.push({\n dataGroupId: oldData.dataGroupId,\n divide: getDivideShapeFromData(oldData.data),\n data: oldData.data\n });\n }\n });\n if (oldSeries_1.length) {\n updateBatches.set(transitionKeyStr, {\n oldSeries: oldSeries_1,\n newSeries: [{\n dataGroupId: newDataGroupId,\n data: newData,\n divide: getDivideShapeFromData(newData)\n }]\n });\n }\n } else {\n // Try transition to multiple series.\n // e.g. ['female', 'male'] -> 'female', 'male'\n var oldData_1 = oldDataMapForSplit.get(transitionKey);\n if (oldData_1) {\n var batch = updateBatches.get(oldData_1.key);\n if (!batch) {\n batch = {\n oldSeries: [{\n dataGroupId: oldData_1.dataGroupId,\n data: oldData_1.data,\n divide: getDivideShapeFromData(oldData_1.data)\n }],\n newSeries: []\n };\n updateBatches.set(oldData_1.key, batch);\n }\n batch.newSeries.push({\n dataGroupId: newDataGroupId,\n data: newData,\n divide: getDivideShapeFromData(newData)\n });\n }\n }\n }\n }\n });\n return updateBatches;\n}\nfunction querySeries(series, finder) {\n for (var i = 0; i < series.length; i++) {\n var found = finder.seriesIndex != null && finder.seriesIndex === series[i].seriesIndex || finder.seriesId != null && finder.seriesId === series[i].id;\n if (found) {\n return i;\n }\n }\n}\nfunction transitionSeriesFromOpt(transitionOpt, globalStore, params, api) {\n var from = [];\n var to = [];\n each(normalizeToArray(transitionOpt.from), function (finder) {\n var idx = querySeries(globalStore.oldSeries, finder);\n if (idx >= 0) {\n from.push({\n dataGroupId: globalStore.oldDataGroupIds[idx],\n data: globalStore.oldData[idx],\n // TODO can specify divideShape in transition.\n divide: getDivideShapeFromData(globalStore.oldData[idx]),\n groupIdDim: finder.dimension\n });\n }\n });\n each(normalizeToArray(transitionOpt.to), function (finder) {\n var idx = querySeries(params.updatedSeries, finder);\n if (idx >= 0) {\n var data = params.updatedSeries[idx].getData();\n to.push({\n dataGroupId: globalStore.oldDataGroupIds[idx],\n data: data,\n divide: getDivideShapeFromData(data),\n groupIdDim: finder.dimension\n });\n }\n });\n if (from.length > 0 && to.length > 0) {\n transitionBetween(from, to, api);\n }\n}\nexport function installUniversalTransition(registers) {\n registers.registerUpdateLifecycle('series:beforeupdate', function (ecMOdel, api, params) {\n each(normalizeToArray(params.seriesTransition), function (transOpt) {\n each(normalizeToArray(transOpt.to), function (finder) {\n var series = params.updatedSeries;\n for (var i = 0; i < series.length; i++) {\n if (finder.seriesIndex != null && finder.seriesIndex === series[i].seriesIndex || finder.seriesId != null && finder.seriesId === series[i].id) {\n series[i][SERIES_UNIVERSAL_TRANSITION_PROP] = true;\n }\n }\n });\n });\n });\n registers.registerUpdateLifecycle('series:transition', function (ecModel, api, params) {\n // TODO api provide an namespace that can save stuff per instance\n var globalStore = getUniversalTransitionGlobalStore(api);\n // TODO multiple to multiple series.\n if (globalStore.oldSeries && params.updatedSeries && params.optionChanged) {\n // TODO transitionOpt was used in an old implementation and can be removed now\n // Use give transition config if its' give;\n var transitionOpt = params.seriesTransition;\n if (transitionOpt) {\n each(normalizeToArray(transitionOpt), function (opt) {\n transitionSeriesFromOpt(opt, globalStore, params, api);\n });\n } else {\n // Else guess from series based on transition series key.\n var updateBatches_1 = findTransitionSeriesBatches(globalStore, params);\n each(updateBatches_1.keys(), function (key) {\n var batch = updateBatches_1.get(key);\n transitionBetween(batch.oldSeries, batch.newSeries, api);\n });\n }\n // Reset\n each(params.updatedSeries, function (series) {\n // Reset;\n if (series[SERIES_UNIVERSAL_TRANSITION_PROP]) {\n series[SERIES_UNIVERSAL_TRANSITION_PROP] = false;\n }\n });\n }\n // Save all series of current update. Not only the updated one.\n var allSeries = ecModel.getSeries();\n var savedSeries = globalStore.oldSeries = [];\n var savedDataGroupIds = globalStore.oldDataGroupIds = [];\n var savedData = globalStore.oldData = [];\n for (var i = 0; i < allSeries.length; i++) {\n var data = allSeries[i].getData();\n // Only save the data that can have transition.\n // Avoid large data costing too much extra memory\n if (data.count() < DATA_COUNT_THRESHOLD) {\n savedSeries.push(allSeries[i]);\n savedDataGroupIds.push(allSeries[i].get('dataGroupId'));\n savedData.push(data);\n }\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from './lib/extension.js';\nexport * from './lib/export/core.js';\n// ----------------------------------------------\n// All of the modules that are allowed to be\n// imported are listed below.\n//\n// Users MUST NOT import other modules that are\n// not included in this list.\n// ----------------------------------------------\nimport { SVGRenderer, CanvasRenderer } from './lib/export/renderers.js';\nimport { LineChart, BarChart, PieChart, ScatterChart, RadarChart, MapChart, TreeChart, TreemapChart, GraphChart, GaugeChart, FunnelChart, ParallelChart, SankeyChart, BoxplotChart, CandlestickChart, EffectScatterChart, LinesChart, HeatmapChart, PictorialBarChart, ThemeRiverChart, SunburstChart, CustomChart } from './lib/export/charts.js';\nimport { GridComponent, PolarComponent, GeoComponent, SingleAxisComponent, ParallelComponent, CalendarComponent, GraphicComponent, ToolboxComponent, TooltipComponent, AxisPointerComponent, BrushComponent, TitleComponent, TimelineComponent, MarkPointComponent, MarkLineComponent, MarkAreaComponent, LegendComponent, DataZoomComponent, DataZoomInsideComponent, DataZoomSliderComponent, VisualMapComponent, VisualMapContinuousComponent, VisualMapPiecewiseComponent, AriaComponent, DatasetComponent, TransformComponent } from './lib/export/components.js';\nimport { UniversalTransition, LabelLayout } from './lib/export/features.js';\n// -----------------\n// Render engines\n// -----------------\n// Render via Canvas.\n// echarts.init(dom, null, { renderer: 'canvas' })\nuse([CanvasRenderer]);\n// Render via SVG.\n// echarts.init(dom, null, { renderer: 'svg' })\nuse([SVGRenderer]);\n// ----------------\n// Charts (series)\n// ----------------\n// All of the series types, for example:\n// chart.setOption({\n// series: [{\n// type: 'line' // or 'bar', 'pie', ...\n// }]\n// });\nuse([LineChart, BarChart, PieChart, ScatterChart, RadarChart, MapChart, TreeChart, TreemapChart, GraphChart, GaugeChart, FunnelChart, ParallelChart, SankeyChart, BoxplotChart, CandlestickChart, EffectScatterChart, LinesChart, HeatmapChart, PictorialBarChart, ThemeRiverChart, SunburstChart, CustomChart]);\n// -------------------\n// Coordinate systems\n// -------------------\n// All of the axis modules have been included in the\n// coordinate system module below, do not need to\n// make extra import.\n// `cartesian` coordinate system. For some historical\n// reasons, it is named as grid, for example:\n// chart.setOption({\n// grid: {...},\n// xAxis: {...},\n// yAxis: {...},\n// series: [{...}]\n// });\nuse(GridComponent);\n// `polar` coordinate system, for example:\n// chart.setOption({\n// polar: {...},\n// radiusAxis: {...},\n// angleAxis: {...},\n// series: [{\n// coordinateSystem: 'polar'\n// }]\n// });\nuse(PolarComponent);\n// `geo` coordinate system, for example:\n// chart.setOption({\n// geo: {...},\n// series: [{\n// coordinateSystem: 'geo'\n// }]\n// });\nuse(GeoComponent);\n// `singleAxis` coordinate system (notice, it is a coordinate system\n// with only one axis, work for chart like theme river), for example:\n// chart.setOption({\n// singleAxis: {...}\n// series: [{type: 'themeRiver', ...}]\n// });\nuse(SingleAxisComponent);\n// `parallel` coordinate system, only work for parallel series, for example:\n// chart.setOption({\n// parallel: {...},\n// parallelAxis: [{...}, ...],\n// series: [{\n// type: 'parallel'\n// }]\n// });\nuse(ParallelComponent);\n// `calendar` coordinate system. for example,\n// chart.setOption({\n// calendar: {...},\n// series: [{\n// coordinateSystem: 'calendar'\n// }]\n// );\nuse(CalendarComponent);\n// ------------------\n// Other components\n// ------------------\n// `graphic` component, for example:\n// chart.setOption({\n// graphic: {...}\n// });\nuse(GraphicComponent);\n// `toolbox` component, for example:\n// chart.setOption({\n// toolbox: {...}\n// });\nuse(ToolboxComponent);\n// `tooltip` component, for example:\n// chart.setOption({\n// tooltip: {...}\n// });\nuse(TooltipComponent);\n// `axisPointer` component, for example:\n// chart.setOption({\n// tooltip: {axisPointer: {...}, ...}\n// });\n// Or\n// chart.setOption({\n// axisPointer: {...}\n// });\nuse(AxisPointerComponent);\n// `brush` component, for example:\n// chart.setOption({\n// brush: {...}\n// });\n// Or\n// chart.setOption({\n// tooltip: {feature: {brush: {...}}\n// })\nuse(BrushComponent);\n// `title` component, for example:\n// chart.setOption({\n// title: {...}\n// });\nuse(TitleComponent);\n// `timeline` component, for example:\n// chart.setOption({\n// timeline: {...}\n// });\nuse(TimelineComponent);\n// `markPoint` component, for example:\n// chart.setOption({\n// series: [{markPoint: {...}}]\n// });\nuse(MarkPointComponent);\n// `markLine` component, for example:\n// chart.setOption({\n// series: [{markLine: {...}}]\n// });\nuse(MarkLineComponent);\n// `markArea` component, for example:\n// chart.setOption({\n// series: [{markArea: {...}}]\n// });\nuse(MarkAreaComponent);\n// `legend` component not scrollable. for example:\n// chart.setOption({\n// legend: {...}\n// });\nuse(LegendComponent);\n// `dataZoom` component including both `dataZoomInside` and `dataZoomSlider`.\nuse(DataZoomComponent);\n// `dataZoom` component providing drag, pinch, wheel behaviors\n// inside coordinate system, for example:\n// chart.setOption({\n// dataZoom: {type: 'inside'}\n// });\nuse(DataZoomInsideComponent);\n// `dataZoom` component providing a slider bar, for example:\n// chart.setOption({\n// dataZoom: {type: 'slider'}\n// });\nuse(DataZoomSliderComponent);\n// `visualMap` component including both `visualMapContinuous` and `visualMapPiecewise`.\nuse(VisualMapComponent);\n// `visualMap` component providing continuous bar, for example:\n// chart.setOption({\n// visualMap: {type: 'continuous'}\n// });\nuse(VisualMapContinuousComponent);\n// `visualMap` component providing pieces bar, for example:\n// chart.setOption({\n// visualMap: {type: 'piecewise'}\n// });\nuse(VisualMapPiecewiseComponent);\n// `aria` component providing aria, for example:\n// chart.setOption({\n// aria: {...}\n// });\nuse(AriaComponent);\n// dataset transform\n// chart.setOption({\n// dataset: {\n// transform: []\n// }\n// });\nuse(TransformComponent);\nuse(DatasetComponent);\n// universal transition\n// chart.setOption({\n// series: {\n// universalTransition: { enabled: true }\n// }\n// })\nuse(UniversalTransition);\n// label layout\n// chart.setOption({\n// series: {\n// labelLayout: { hideOverlap: true }\n// }\n// })\nuse(LabelLayout);","/**\n * 保留 object 中的部分内容\n * @param obj\n * @param keys\n */\nexport function pick(obj, keys) {\n var r = {};\n keys.forEach(function (key) {\n r[key] = obj[key];\n });\n return r;\n}\n//# sourceMappingURL=pick.js.map","export function isFunction(v) {\n return typeof v === 'function';\n}\n//# sourceMappingURL=is-function.js.map","export function isString(v) {\n return typeof v === 'string';\n}\n//# sourceMappingURL=is-string.js.map","import { __assign, __extends } from \"tslib\";\nimport React, { PureComponent } from 'react';\nimport { bind, clear } from 'size-sensor';\nimport { pick } from './helper/pick';\nimport { isFunction } from './helper/is-function';\nimport { isString } from './helper/is-string';\nimport { isEqual } from './helper/is-equal';\n/**\n * core component for echarts binding\n */\nvar EChartsReactCore = /** @class */ (function (_super) {\n __extends(EChartsReactCore, _super);\n function EChartsReactCore(props) {\n var _this = _super.call(this, props) || this;\n _this.echarts = props.echarts;\n _this.ele = null;\n _this.isInitialResize = true;\n return _this;\n }\n EChartsReactCore.prototype.componentDidMount = function () {\n this.renderNewEcharts();\n };\n // update\n EChartsReactCore.prototype.componentDidUpdate = function (prevProps) {\n /**\n * if shouldSetOption return false, then return, not update echarts options\n * default is true\n */\n var shouldSetOption = this.props.shouldSetOption;\n if (isFunction(shouldSetOption) && !shouldSetOption(prevProps, this.props)) {\n return;\n }\n // 以下属性修改的时候,需要 dispose 之后再新建\n // 1. 切换 theme 的时候\n // 2. 修改 opts 的时候\n // 3. 修改 onEvents 的时候,这样可以取消所有之前绑定的事件 issue #151\n if (!isEqual(prevProps.theme, this.props.theme) ||\n !isEqual(prevProps.opts, this.props.opts) ||\n !isEqual(prevProps.onEvents, this.props.onEvents)) {\n this.dispose();\n this.renderNewEcharts(); // 重建\n return;\n }\n // when these props are not isEqual, update echarts\n var pickKeys = ['option', 'notMerge', 'lazyUpdate', 'showLoading', 'loadingOption'];\n if (!isEqual(pick(this.props, pickKeys), pick(prevProps, pickKeys))) {\n this.updateEChartsOption();\n }\n /**\n * when style or class name updated, change size.\n */\n if (!isEqual(prevProps.style, this.props.style) || !isEqual(prevProps.className, this.props.className)) {\n this.resize();\n }\n };\n EChartsReactCore.prototype.componentWillUnmount = function () {\n this.dispose();\n };\n /**\n * return the echart object\n * 1. if exist, return the existed instance\n * 2. or new one instance\n */\n EChartsReactCore.prototype.getEchartsInstance = function () {\n return this.echarts.getInstanceByDom(this.ele) || this.echarts.init(this.ele, this.props.theme, this.props.opts);\n };\n /**\n * dispose echarts and clear size-sensor\n */\n EChartsReactCore.prototype.dispose = function () {\n if (this.ele) {\n try {\n clear(this.ele);\n }\n catch (e) {\n console.warn(e);\n }\n // dispose echarts instance\n this.echarts.dispose(this.ele);\n }\n };\n /**\n * render a new echarts instance\n */\n EChartsReactCore.prototype.renderNewEcharts = function () {\n var _this = this;\n var _a = this.props, onEvents = _a.onEvents, onChartReady = _a.onChartReady;\n // 1. new echarts instance\n var echartsInstance = this.updateEChartsOption();\n // 2. bind events\n this.bindEvents(echartsInstance, onEvents || {});\n // 3. on chart ready\n if (isFunction(onChartReady))\n onChartReady(echartsInstance);\n // 4. on resize\n if (this.ele) {\n bind(this.ele, function () {\n _this.resize();\n });\n }\n };\n // bind the events\n EChartsReactCore.prototype.bindEvents = function (instance, events) {\n function _bindEvent(eventName, func) {\n // ignore the event config which not satisfy\n if (isString(eventName) && isFunction(func)) {\n // binding event\n instance.on(eventName, function (param) {\n func(param, instance);\n });\n }\n }\n // loop and bind\n for (var eventName in events) {\n if (Object.prototype.hasOwnProperty.call(events, eventName)) {\n _bindEvent(eventName, events[eventName]);\n }\n }\n };\n /**\n * render the echarts\n */\n EChartsReactCore.prototype.updateEChartsOption = function () {\n var _a = this.props, option = _a.option, _b = _a.notMerge, notMerge = _b === void 0 ? false : _b, _c = _a.lazyUpdate, lazyUpdate = _c === void 0 ? false : _c, showLoading = _a.showLoading, _d = _a.loadingOption, loadingOption = _d === void 0 ? null : _d;\n // 1. get or initial the echarts object\n var echartInstance = this.getEchartsInstance();\n // 2. set the echarts option\n echartInstance.setOption(option, notMerge, lazyUpdate);\n // 3. set loading mask\n if (showLoading)\n echartInstance.showLoading(loadingOption);\n else\n echartInstance.hideLoading();\n return echartInstance;\n };\n /**\n * resize wrapper\n */\n EChartsReactCore.prototype.resize = function () {\n // 1. get the echarts object\n var echartsInstance = this.getEchartsInstance();\n // 2. call echarts instance resize if not the initial resize\n // resize should not happen on first render as it will cancel initial echarts animations\n if (!this.isInitialResize) {\n try {\n echartsInstance.resize();\n }\n catch (e) {\n console.warn(e);\n }\n }\n // 3. update variable for future calls\n this.isInitialResize = false;\n };\n EChartsReactCore.prototype.render = function () {\n var _this = this;\n var _a = this.props, style = _a.style, _b = _a.className, className = _b === void 0 ? '' : _b;\n // default height = 300\n var newStyle = __assign({ height: 300 }, style);\n return (React.createElement(\"div\", { ref: function (e) {\n _this.ele = e;\n }, style: newStyle, className: \"echarts-for-react \" + className }));\n };\n return EChartsReactCore;\n}(PureComponent));\nexport default EChartsReactCore;\n//# sourceMappingURL=core.js.map","import { __extends } from \"tslib\";\nimport * as echarts from 'echarts';\nimport EChartsReactCore from './core';\n// export the Component the echarts Object.\nvar EChartsReact = /** @class */ (function (_super) {\n __extends(EChartsReact, _super);\n function EChartsReact(props) {\n var _this = _super.call(this, props) || this;\n // 初始化为 echarts 整个包\n _this.echarts = echarts;\n return _this;\n }\n return EChartsReact;\n}(EChartsReactCore));\nexport default EChartsReact;\n//# sourceMappingURL=index.js.map","\"use strict\";var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));var _react=_interopRequireDefault(require(\"react\"));function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r 1 && arguments[1] !== undefined ? arguments[1] : 60;\n var timer = null;\n return function () {\n var _this = this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n clearTimeout(timer);\n timer = setTimeout(function () {\n fn.apply(_this, args);\n }, delay);\n };\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n/**\n * Created by hustcc on 18/6/9.\n * Contract: i@hust.cc\n */\n\nvar id = 1;\n\n/**\n * generate unique id in application\n * @return {string}\n */\nvar _default = function _default() {\n return \"\".concat(id++);\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ver = exports.clear = exports.bind = void 0;\nvar _sensorPool = require(\"./sensorPool\");\n/**\n * Created by hustcc on 18/6/9.[高考时间]\n * Contract: i@hust.cc\n */\n\n/**\n * bind an element with resize callback function\n * @param {*} element\n * @param {*} cb\n */\nvar bind = function bind(element, cb) {\n var sensor = (0, _sensorPool.getSensor)(element);\n\n // listen with callback\n sensor.bind(cb);\n\n // return unbind function\n return function () {\n sensor.unbind(cb);\n };\n};\n\n/**\n * clear all the listener and sensor of an element\n * @param element\n */\nexports.bind = bind;\nvar clear = function clear(element) {\n var sensor = (0, _sensorPool.getSensor)(element);\n (0, _sensorPool.removeSensor)(sensor);\n};\nexports.clear = clear;\nvar ver = \"1.0.2\";\nexports.ver = ver;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.removeSensor = exports.getSensor = exports.Sensors = void 0;\nvar _id = _interopRequireDefault(require(\"./id\"));\nvar _sensors = require(\"./sensors\");\nvar _constant = require(\"./constant\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/**\n * Created by hustcc on 18/6/9.\n * Contract: i@hust.cc\n */\n\n/**\n * all the sensor objects.\n * sensor pool\n */\nvar Sensors = {};\n\n/**\n * When destroy the sensor, remove it from the pool\n */\nexports.Sensors = Sensors;\nfunction clean(sensorId) {\n // exist, then remove from pool\n if (sensorId && Sensors[sensorId]) {\n delete Sensors[sensorId];\n }\n}\n\n/**\n * get one sensor\n * @param element\n * @returns {*}\n */\nvar getSensor = function getSensor(element) {\n var sensorId = element.getAttribute(_constant.SizeSensorId);\n\n // 1. if the sensor exists, then use it\n if (sensorId && Sensors[sensorId]) {\n return Sensors[sensorId];\n }\n\n // 2. not exist, then create one\n var newId = (0, _id[\"default\"])();\n element.setAttribute(_constant.SizeSensorId, newId);\n var sensor = (0, _sensors.createSensor)(element, function () {\n return clean(newId);\n });\n // add sensor into pool\n Sensors[newId] = sensor;\n return sensor;\n};\n\n/**\n * 移除 sensor\n * @param sensor\n */\nexports.getSensor = getSensor;\nvar removeSensor = function removeSensor(sensor) {\n var sensorId = sensor.element.getAttribute(_constant.SizeSensorId);\n // remove event, dom of the sensor used\n sensor.destroy();\n clean(sensorId);\n};\nexports.removeSensor = removeSensor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createSensor = void 0;\nvar _object = require(\"./object\");\nvar _resizeObserver = require(\"./resizeObserver\");\n/**\n * Created by hustcc on 18/7/5.\n * Contract: i@hust.cc\n */\n\n/**\n * sensor strategies\n */\n// export const createSensor = createObjectSensor;\nvar createSensor = typeof ResizeObserver !== 'undefined' ? _resizeObserver.createSensor : _object.createSensor;\nexports.createSensor = createSensor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createSensor = void 0;\nvar _debounce = _interopRequireDefault(require(\"../debounce\"));\nvar _constant = require(\"../constant\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/**\n * Created by hustcc on 18/6/9.\n * Contract: i@hust.cc\n */\n\nvar createSensor = function createSensor(element, whenDestroy) {\n var sensor = undefined;\n // callback\n var listeners = [];\n\n /**\n * create object DOM of sensor\n * @returns {HTMLObjectElement}\n */\n var newSensor = function newSensor() {\n // adjust style\n if (getComputedStyle(element).position === 'static') {\n element.style.position = 'relative';\n }\n var obj = document.createElement('object');\n obj.onload = function () {\n obj.contentDocument.defaultView.addEventListener('resize', resizeListener);\n // 直接触发一次 resize\n resizeListener();\n };\n obj.style.display = 'block';\n obj.style.position = 'absolute';\n obj.style.top = '0';\n obj.style.left = '0';\n obj.style.height = '100%';\n obj.style.width = '100%';\n obj.style.overflow = 'hidden';\n obj.style.pointerEvents = 'none';\n obj.style.zIndex = '-1';\n obj.style.opacity = '0';\n obj.setAttribute('class', _constant.SensorClassName);\n obj.setAttribute('tabindex', _constant.SensorTabIndex);\n obj.type = 'text/html';\n\n // append into dom\n element.appendChild(obj);\n // for ie, should set data attribute delay, or will be white screen\n obj.data = 'about:blank';\n return obj;\n };\n\n /**\n * trigger listeners\n */\n var resizeListener = (0, _debounce[\"default\"])(function () {\n // trigger all listener\n listeners.forEach(function (listener) {\n listener(element);\n });\n });\n\n /**\n * listen with one callback function\n * @param cb\n */\n var bind = function bind(cb) {\n // if not exist sensor, then create one\n if (!sensor) {\n sensor = newSensor();\n }\n if (listeners.indexOf(cb) === -1) {\n listeners.push(cb);\n }\n };\n\n /**\n * destroy all\n */\n var destroy = function destroy() {\n if (sensor && sensor.parentNode) {\n if (sensor.contentDocument) {\n // remote event\n sensor.contentDocument.defaultView.removeEventListener('resize', resizeListener);\n }\n // remove dom\n sensor.parentNode.removeChild(sensor);\n // initial variable\n element.removeAttribute(_constant.SizeSensorId);\n sensor = undefined;\n listeners = [];\n whenDestroy && whenDestroy();\n }\n };\n\n /**\n * cancel listener bind\n * @param cb\n */\n var unbind = function unbind(cb) {\n var idx = listeners.indexOf(cb);\n if (idx !== -1) {\n listeners.splice(idx, 1);\n }\n\n // no listener, and sensor is exist\n // then destroy the sensor\n if (listeners.length === 0 && sensor) {\n destroy();\n }\n };\n return {\n element: element,\n bind: bind,\n destroy: destroy,\n unbind: unbind\n };\n};\nexports.createSensor = createSensor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createSensor = void 0;\nvar _constant = require(\"../constant\");\nvar _debounce = _interopRequireDefault(require(\"../debounce\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/**\n * Created by hustcc on 18/7/5.\n * Contract: i@hust.cc\n */\n\nvar createSensor = function createSensor(element, whenDestroy) {\n var sensor = undefined;\n // callback\n var listeners = [];\n\n /**\n * trigger listeners\n */\n var resizeListener = (0, _debounce[\"default\"])(function () {\n // trigger all\n listeners.forEach(function (listener) {\n listener(element);\n });\n });\n\n /**\n * create ResizeObserver sensor\n * @returns\n */\n var newSensor = function newSensor() {\n var s = new ResizeObserver(resizeListener);\n // listen element\n s.observe(element);\n\n // trigger once\n resizeListener();\n return s;\n };\n\n /**\n * listen with callback\n * @param cb\n */\n var bind = function bind(cb) {\n if (!sensor) {\n sensor = newSensor();\n }\n if (listeners.indexOf(cb) === -1) {\n listeners.push(cb);\n }\n };\n\n /**\n * destroy\n */\n var destroy = function destroy() {\n sensor.disconnect();\n listeners = [];\n sensor = undefined;\n element.removeAttribute(_constant.SizeSensorId);\n whenDestroy && whenDestroy();\n };\n\n /**\n * cancel bind\n * @param cb\n */\n var unbind = function unbind(cb) {\n var idx = listeners.indexOf(cb);\n if (idx !== -1) {\n listeners.splice(idx, 1);\n }\n\n // no listener, and sensor is exist\n // then destroy the sensor\n if (listeners.length === 0 && sensor) {\n destroy();\n }\n };\n return {\n element: element,\n bind: bind,\n destroy: destroy,\n unbind: unbind\n };\n};\nexports.createSensor = createSensor;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n"],"names":["createDom","id","painter","dpr","newDom","platform","width","height","newDomStyle","Layer","_super","_this","dom","util","domStyle","displayList","prevList","viewWidth","viewHeight","mergedRepaintRects","maxRepaintRectCount","full","pendingRect","BoundingRect","addRectToMergePool","rect","boundingRect","isMerged","minDeltaArea","bestRectToMergeIdx","i","mergedRect","pendingRect_1","aArea","bArea","pendingArea","deltaArea","el","shouldPaint","prevRect","curRect","hasIntersections","j","domBack","clearAll","clearColor","repaintRects","ctx","haveMotionBLur","lastFrameAlpha","self","doClear","x","clearColorGradientOrPattern","shouldCache","Eventful","HOVER_LAYER_ZLEVEL","CANVAS_ZLEVEL","EL_AFTER_INCREMENTAL_INC","INCREMENTAL_INC","isLayerValid","layer","createRoot","domRoot","CanvasPainter","root","storage","opts","singleCanvas","rootStyle","zlevelList","layers","rootCanvas","mainLayer","viewportRoot","paintAll","list","z","len","hoverLayer","scope","redrawId","_a","finished","needsRefreshHover","self_1","requestAnimationFrame","layerList","useDirtyRect","zi","zlevel","_loop_1","k","this_1","start","useTimer","startTime","firstEl","repaint","repaintRect","dTime","r","env","currentLayer","isLast","paintRect","virtual","layersMap","prevLayer","prevDom","cb","context","updatePrevLayer","idx","i_1","incrementalLayerCount","prevZlevel","backgroundColor","config","layerConfig","_zlevel","imageLayer","width_1","height_1","install","registers","mathSin","mathCos","PI","PI2","degree","SVGPathRebuilder","precision","y","x2","y2","x3","y3","cx","cy","startAngle","endAngle","anticlockwise","rx","ry","psi","dTheta","clockwise","dThetaPositive","isCircle","unifiedTheta","large","x0","y0","xRot","p","dTheta_1","w","h","cmd","a","b","c","d","e","f","g","vals","val","NONE","mathRound","pathHasFill","style","fill","pathHasStroke","stroke","strokeProps","svgStrokeProps","prop","mapStyleToAttrs","updateAttr","forceUpdate","opacity","fillOpacity","strokeScale","strokeWidth","strokeOpacity","strokeFirst","lineDash","lineDashOffset","propName","SVGNS","XLINKNS","XMLNS","XML_NAMESPACE","META_DATA_PREFIX","createElement","name","createVNode","tag","key","attrs","children","text","createElementOpen","attrsStr","part","createElementClose","vNodeToString","S","convertElToString","child","getCssString","selectorNodes","animationNodes","bracketBegin","bracketEnd","selectors","className","attrName","animations","animationName","percent","createBrushScope","zrId","createSVGVNode","useViewBox","cssClassIdx","getClassId","EASING_MAP","transformOriginKey","buildPathString","kfShape","path","shape","svgPathBuilder","setTransformOrigin","target","transform","originX","originY","ANIMATE_STYLE_MAP","addAnimation","cssAnim","createCompoundPathCSSAnimation","paths","composedAnim","cssAnimationCfg","cssAnimationName","subScope","createCSSAnimation","cssAnims","cssNodes","animNames","lastAnim","kf","getEasingFunc","easing","onlyShape","animators","cssAnimations","CompoundPath","animationCfg","groupAnimators","animator","cfgArr","delay","cfg","createSingleCSSAnimation","groupAnimator","transformKfs","shapeKfs","finalKfs","animationTimingFunctionAttrName","saveAnimatorTrackToCssKfs","cssKfs","toCssAttrName","tracks","maxTime","track","kfs","kfEasing","rawValue","targetProp","str","timingFunction","canAnimateShape","isFirst","PathProxy","len_1","newLen","percents","allTransformOriginSame","transformOrigin","p0","p1","createCSSEmphasis","setClassAttribute","emphasisStyle","normalFill","selectFill","fromFill","lineWidth","scaleX","withHover","styleKey","round","isImageLike","isCanvasLike","setStyleAttrs","isFillStroke","setGradient","setPattern","setShadow","setMetaData","metaData","noRotateScale","m","noTranslate","setTransform","compress","mul","convertPolyShape","points","strArr","validatePolyShape","createAttrsConvert","desc","normalizedDesc","item","builtinShapesDef","hasShapeAnimation","brushSVGPath","builtinShpDef","needsAnimate","svgElType","strokePercent","needBuildPath","pathVersion","elExt","brushSVGImage","image","dw","dh","brushSVGTSpan","font","textAlign","separatedFontStr","fontStyle","fontSize","fontFamily","fontWeight","brush","Path","TSpan","shadowKey","shadowCache","shadowId","globalScale","scaleY","offsetX","offsetY","blur_1","color","stdDx","stdDy","stdDeviation","gradientTag","gradientAttrs","colors","colorStops","offset","stopColor","stopsAttrs","gradientVNode","gradientKey","gradientCache","gradientId","patternAttrs","repeat","noRepeat","repeatX","repeatY","imageWidth_1","imageHeight_1","imageSrc","patternImage","errMsg","setSizeToVNode_1","vNode","img","svgEl","createdImage","patternVNode","patternWidth","patternHeight","patternTransform","patternKey","patternCache","patternId","setClipPath","clipPath","clipPathCache","defs","clipPathId","clipPathAttrs","createTextNode","createComment","insertBefore","parentNode","newNode","referenceNode","removeChild","node","appendChild","nextSibling","tagName","elm","setTextContent","getTextContent","isElement","isText","isComment","colonChar","xChar","emptyNode","isUndef","s","isDef","createKeyToOldIdx","beginIdx","endIdx","map","sameVnode","vnode1","vnode2","isSameKey","isSameTag","createElm","vnode","updateAttrs","ch","addVnodes","parentElm","before","vnodes","startIdx","removeVnodes","parent_1","oldVnode","oldAttrs","cur","old","updateChildren","oldCh","newCh","oldStartIdx","newStartIdx","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","oldKeyToIdx","idxInOld","elmToMove","patchVnode","patch","parent_2","svgId","SVGPainter","createMethodNotSupport","viewport","svgDom","bgVNode","createBackgroundVNode","mainVNode","animationCssStr","styleNode","out","listLen","clipPathsGroupsStack","clipPathsGroupsStackDepth","currentClipPathGroup","prevClipPaths","clipGroupNodeIdx","displayable","clipPaths","prevLen","lca","i_2","groupAttrs","ret","viewportStyle","bgEl","base64","prefix","method","LineSeriesModel","option","createSeriesData","opt","group","Group","line","visualType","visualRotate","symbolType","size","symbol","symbolRotate","Series","getDefaultLabel","data","dataIndex","labelDims","rawVal","getDefaultInterpolatedLabel","interpolatedValue","dimIndex","Symbol","seriesScope","symbolSize","keepAspect","symbolPath","driftSymbol","toLastFrame","draggable","hasCursorOption","seriesModel","isInit","disableAnimation","emphasisItemStyle","blurItemStyle","selectItemStyle","focus","blurScope","emphasisDisabled","labelStatesModels","hoverScale","cursorStyle","itemModel","emphasisModel","symbolOffset","symbolStyle","visualColor","pathStyle","liftZ","z2Origin","useNameLabel","getLabelDefaultText","emphasisState","scaleRatio","scale","animationOpt","textContent","dx","dy","symbolNeedsDraw","point","normalizeUpdateOpt","makeSeriesScope","SymbolDraw","SymbolCtor","oldData","symbolUpdateOpt","getSymbolPoint","newIdx","symbolEl","oldIdx","newSymbolType","oldSymbolType","taskParams","updateIncrementalAndHover","enableAnimation","prepareDataCoordInfo","coordSys","valueOrigin","baseAxis","valueAxis","valueStart","getValueStart","baseAxisDim","valueAxisDim","valueDim","baseDim","baseDataOffset","dims","coordDim","stacked","stackResultDim","extent","getStackedOnPoint","dataCoordInfo","value","stackedData","diffData","newData","diffResult","lineAnimationDiff","oldStackedOnPoints","newStackedOnPoints","oldCoordSys","newCoordSys","oldValueOrigin","newValueOrigin","diff","currPoints","nextPoints","currStackedPoints","nextStackedPoints","status","sortedIndices","rawIndices","newDataOldCoordInfo","oldPoints","newPoints","diffItem","pointAdded","oldIdx2","newIdx2","currentX","currentY","nextX","nextY","newDataDimsForPoint","oldPt","stackedOnPoint","sortedCurrPoints","sortedNextPoints","sortedCurrStackedPoints","sortedNextStackedPoints","sortedStatus","i2","idx2","mathMin","mathMax","isPointNull","drawSegment","segLen","allLen","dir","smooth","smoothMonotone","connectNulls","prevX","prevY","cpx0","cpy0","cpx1","cpy1","nextIdx","tmpK","ratioNextSeg","vx","vy","nextCpx0","nextCpy0","dx0","dx1","dy0","dy1","lenPrevSeg","lenNextSeg","dir_1","dir_2","ECPolylineShape","ECPolyline","xOrY","dim","CMD","isDimX","roots","t","nRoot","t_1","ECPolygonShape","ECPolygon","stackedOnPoints","createGridClipPath","cartesian","hasAnimation","done","during","isHorizontal","isAxisInversed","duringCb","createPolarClipPath","polar","sectorArea","r0","isRadial","createClipPath","isCoordinateSystemType","type","isPointsSame","points1","points2","bboxFromPoints","minX","minY","maxX","maxY","getBoundingDiff","min1","max1","_b","min2","max2","getSmooth","getStackedOnPoints","pt","turnPointsIntoStep","stepTurnAt","baseIndex","stepPoints","stepPt","nextPt","filteredPoints","middle","stepPt2","clipColorStops","maxSize","newColorStops","prevOutOfRangeColorStop","prevInRangeColorStop","lerpStop","stop0","stop1","clippedCoord","coord0","stop_1","coord","getVisualGradient","api","visualMetaList","visualMeta","dimInfo","axis","stop","stopLen","outerColors","colorStopsInRange","inRangeStopLen","tinyExtent","minCoord","maxCoord","coordSpan","gradient","getIsIgnoreFunc","showAllSymbol","isAuto","categoryAxis","canShowAllSymbolForCategory","categoryDataDim","labelMap","labelItem","ordinalNumber","axisExtent","availSize","dataLen","step","getLastIndexNotNull","getPointAtIndex","getIndexRange","dimIdx","prevIndex","nextIndex","anyStateShowEndLabel","createLineClipPath","lineView","endLabelModel_1","valueAnimation_1","data_1","labelAnimationRecord_1","clipRect","endLabel","rectShape","expandSize","getEndLabelStateSpecified","endLabelModel","isBaseInversed","align","verticalAlign","LineView","lineGroup","symbolDraw","ecModel","lineStyleModel","areaStyleModel","isCoordSysPolar","prevCoordSys","polyline","polygon","isAreaChart","showSymbol","isIgnoreFunc","clipShapeForSymbol","oldClipPath","newClipPath","emphasisLineStyle","stackedOnSeries","stackedOnSmooth","changePolyState","toState","payload","symbolLabel","Chart","clipShape","isHorizontalOrRadial","isAxisInverse","seriesDuration","seriesDelay","seriesDelayValue","end","current","polarClip","gridClip","ratio","inheritColor","data_2","animationRecord","valueAnimation","distance","distanceX","distanceY","dataIndexRange","indices","startValue","endValue","inner","stackedOnCurrent","next","stackedOnNext","updatedDataInfo","diffStatus","pointsLayout","seriesType","forceStoreInTypedArray","createRenderPlanner","pipelineContext","useTypedArray","dimLen","store","dimIdx0","dimIdx1","params","segCount","tmpIn","tmpOut","samplers","frame","sum","count","max","min","turningPointAbsoluteValue","turningPointOriginalValue","originalValue","absoluteValue","indexSampler","dataSample","sampling","rate","sampler","LineSeries","lineStyle","BaseBarSeriesModel","startingAtTick","clampData_1","pt_1","tickCoords","alignTicksWithLabel","targetTickId","isEnd","leftCoord","stepTickValue","tickCoord","tickValue","offsetIndex","BarSeriesModel","progressiveThreshold","largeThreshold","BaseBarSeries","SausageShape","SausagePath","dr","rCenter","lessThanCircle","unitStartX","unitStartY","unitEndX","unitEndY","createSectorCalculateTextPosition","positionMapping","isRoundCap","textPosition","mappedSectorPosition","sector","middleR","middleAngle","extraDist","textVerticalAlign","adjustAngleDistanceX","adjustAngleDistanceY","setSectorTextRotation","rotateType","anchorAngle","rotate","angle","getSectorCornerRadius","model","zeroIfNull","cornerRadius","cr","getClipArea","coordSysClipArea","expandWidth","BarView","coordinateSystemType","isLargeDraw","animationModel","realtimeSortCfg","shouldRealtimeSort","needsClip","roundCap","drawBackground","backgroundModel","barBorderRadius","bgEls","oldBgEls","isInitSort","isChangeOrder","createBackground","bgLayout","getLayout","createBackgroundEl","layout","isValidLayout","isClipped","clip","elementCreator","updateStyle","updateRealtimeAnimation","newIndex","oldIndex","createBackgroundShape","textEl","labelInnerStore","bgGroup","createLarge","orderMapping_1","orderMapping","info","dataIdx","mappedValue","ordinalDataDim","lastValue","tickNum","rawIdx","orderInfo","tickMax","sortInfo","sortResult","coordSysBoundingRect","signWidth","signHeight","coordSysX2","coordSysY2","xClipped","yClipped","signR","tmp","clipped","axisModel","isUpdate","Rect","animateProperty","ShapeClass","Sector","positionMap","createPolarPositionMapping","sectorShape","animateTarget","realtimeSortOption","seriesAnimationModel","seriesTarget","axisTarget","axisAnimationModel","checkPropertiesNotValid","obj","props","rectPropties","polarPropties","fixedLineWidth","getLineWidth","signX","signY","isZeroOnPolar","arcOrAngle","position","isPolar","borderRadius","labelPositionOutside","label","state","rawLayout","borderColor","LagePathShape","LargePath","baseDimIdx","valueDimIdx","startPoint","barWidth","progressiveEls","incremental","largeDataIndices","bgPoints","largePathUpdateDataIndex","throttle","event","largePath","largePathFindDataIndex","ii","coordLayout","ElementClz","BarSeries","componentType","componentModel","RADIAN","getViewRect","getBasicPieLayout","viewRect","center","radius","pieLayout","padAngle","minAngle","minAndPadAngle","validDataCount","unitRadian","roseType","stillShowZeroSum","angles","halfPadAngle","layoutData","getSeriesLayoutData","angleRange","restAngle","valueSumLargerThanMinAngle","currentAngle","actualStartAngle","actualEndAngle","angle_1","layout_1","layout_2","dataFilter","legendModels","adjustSingleSide","viewLeft","viewTop","farthestX","recalculateXOnSemiToAlignOnEllipseCurve","semi","rB","rB2","rA","rA2","newX","deltaX","newTargetWidth","constrainTextWidth","recalculateX","items","topSemi","bottomSemi","avoidOverlap","labelLayoutList","leftList","rightList","leftmostX","rightmostX","isPositionCenter","linePoints","targetTextWidth","isAlignToEdge","padding","paddingH","extraPaddingH","realTextWidth","dist","availableWidth","forceRecalculate","textRect","bgColor","overflow","oldOuterWidth","oldHeight","innerRect","availableInnerWidth","newWidth","newRect","margin","pieLabelLayout","hasLabelRotate","minShowLabelRadian","setNotShow","isLabelShown","labelLine","labelModel","labelPosition","labelDistance","labelAlignTo","edgeDistance","bleedMargin","labelLineModel","labelLineLen","labelLineLen2","midAngle","nx","ny","textX","textY","isLabelInside","x1","y1","labelRotate","radialAngle","rad","isDown","selectState","Point","notShowLabel","PiePiece","firstCreate","animationType","labelText","visualOpacity","PieView","piePiece","itemLayout","createSeriesDataSimply","nameList","source","dimensions","SeriesData","LegendVisualProvider","getDataWithEncodedVisual","getRawData","rawData","dataWithEncodedVisual","innerData","PieSeriesModel","dataInner","seats","valueList_1","labelLineNormalOpt","labelLineEmphasisOpt","negativeDataFilter","curValue","PieSeries","ScatterSeriesModel","progressive","BOOST_SIZE_THRESHOLD","LargeSymbolPathShape","LargeSymbolPath","symbolProxy","symbolProxyShape","canBoost","softClipShape","localPos","LargeSymbolDraw","byteOffset","lastAdded","oldLen","hostModel","extrudeShadow","globalStyle","ecData","ScatterView","res","GridModel","CartesianAxisModel","defaultOption","timeAxis","logAxis","AXIS_TYPES","axisModelCreator","axisName","BaseAxisModelClass","extraDefaultOption","v","axisType","axisDefault","AxisModel","layoutMode","inputPositionParams","themeModel","getAxisType","thisOption","OrdinalMeta","Cartesian","scaleType","cartesian2DDimensions","canCalculateAffineTransform","Cartesian2D","xAxisScale","yAxisScale","xScaleExtent","yScaleExtent","xScaleSpan","yScaleSpan","translateX","translateY","axisX","axisY","data1","data2","zoneDiag1","zoneDiag2","area","zone","clamp","xVal","yVal","xAxis","yAxis","xScale","yScale","xAxisExtent","yAxisExtent","tolerance","xExtent","yExtent","Axis2D","coordExtent","asc","Axis","gridModel","grid","otherAxisOnZeroOf","rawAxisPosition","axisPosition","axisDim","rectBound","axisOffset","posBound","onZeroCoord","dirMap","isCartesian2DSeries","findAxisModels","axisModelMap","mathLog","alignScaleTicks","alignToScale","intervalScaleProto","Interval","alignToTicks","alignToNicedTicks","alignToSplitNumber","alignToInterval","scaleExtent","rawExtent","isMinFixed","isMaxFixed","logBase","interval","nicedSplitNumber","range","t0","t1","Grid","axesMap","updateAxisTicks","axes","alignTo","axesIndices","axisNeedsAlign","onZeroRecords","fixAxisOnZero","ignoreContainLabel","boxLayoutParams","isContainLabel","gridRect","axesList","adjustAxes","labelUnionRect","updateAxisTransform","axisIndex","axesMapOnDim","xAxisIndex","yAxisIndex","coordList","finder","xAxisModel","yAxisModel","coordsList","axisPositionUsed","axesCount","createAxisCreator","dimName","isAxisUsedInTheGrid","isCategory","categorySortInfo","axesModelMap","unionExtent","baseAxes","otherAxes","otherAxis","grids","otherAxisDim","onZero","onZeroAxisIndex","canOnZeroToAxis","getOnZeroRecordKey","coordBase","axisExtentSum","AxisBuilder","transformGroup","builders","axisRotation","textRotation","direction","rotationDiff","eventData","tooltipOpt","shown","matrix","pt1","pt2","inverse","arrows","arrowSize","arrowOffset","symbolWidth_1","symbolHeight_1","index","ticksEls","buildAxisMajorTicks","labelEls","buildAxisLabel","fixMinMaxLabelShow","buildAxisMinorTicks","labelList","nameLocation","nameDirection","textStyleModel","gap","gapSignal","pos","isNameLocationCenter","labelLayout","nameRotation","axisNameAvailableWidth","endTextLayout","textFont","truncateOpt","ellipsis","maxWidth","rotation","textRotate","onLeft","tickEls","showMinLabel","showMaxLabel","firstLabel","nextLabel","lastLabel","prevLabel","firstTick","nextTick","lastTick","prevTick","ignoreEl","isTwoLabelOverlapped","firstRect","nextRect","mRotationBack","createTicks","ticksCoords","tickTransform","tickEndCoord","tickLineStyle","anidPrefix","tickEl","tickModel","tickDirection","minorTickModel","minorTicksCoords","minorTickLineStyle","minorTicksEls","show","labelMargin","labels","labelRotation","rawCategoryData","silent","triggerEvent","formattedLabel","rawLabel","itemLabelModel","rawCategoryItem","Model","textColor","alignMin","alignMax","verticalAlignMin","verticalAlignMax","collect","result","collectAxesInfo","collectSeriesInfo","globalTooltipModel","globalAxisPointerModel","linksOption","linkGroups","coordSysKey","makeKey","axesInfoInCoordSys","coordSysModel","baseTooltipModel","saveTooltipAxisInfo","triggerAxis","cross","tooltipAxes","fromTooltip","triggerTooltip","axisPointerModel","axisPointerShow","isHandleTrigger","makeAxisPointerModel","snap","triggerEmphasis","axisKey","involveSeries","axisInfo","groupIndex","getLinkGroupIndex","linkGroup","tooltipAxisPointerModel","fields","volatileOption","field","labelOption","tooltipAxisPointerLabelShow","crossStyle","seriesTooltipTrigger","seriesTooltipShow","linkOption","checkPropInLink","linkPropValue","axisPropValue","fixValue","getAxisInfo","useHandle","coordSysAxesInfo","getAxisPointerModel","axisPointerClazz","AxisView","axisPointer","forceRender","Clazz","clazz","Component","rectCoordAxisBuildSplitArea","axisView","axisGroup","splitAreaModel","areaColors","areaColorsLen","lastSplitAreaColors","newSplitAreaColors","colorIndex","cIndex","prev","areaStyle","rectCoordAxisHandleRemove","axisBuilderAttrs","selfBuilderAttrs","CartesianAxisView","oldAxisGroup","axisBuilder","elementType","cartesians","axisElementBuilders","isInitialSortFromBarRacing","splitLineModel","lineColors","lineCount","p2","minorSplitLineModel","CartesianXAxisView","CartesianYAxisView","GridView","extraOption","ScatterSeries","radarLayout","isValidPoint","getValueMissingPoint","firstPoint","radarBackwardCompat","polarOptArr","polarNotRadar_1","polarOpt","seriesOpt","RadarView","createSymbol","updateSymbols","symbolGroup","getInitialPoints","itemGroup","itemStyle","polygonIgnore","stateName","stateModel","stateIgnore","itemHoverStyle","pathEmphasisState","defaultText","RadarSeriesModel","multipleSeries","dataType","indicatorAxes","nameToDisplay","markerColor","values","valueAxisDefault","defaultsShow","RadarModel","boundaryGap","splitNumber","axisLine","axisTick","axisLabel","nameTextStyle","showName","nameFormatter","nameGap","indicatorModels","indicatorOpt","iNameTextStyle","innerIndicatorOpt","indName","radarModel","radar","axisBuilders","indicatorAxis","showSplitLine","showSplitArea","splitLineColors","splitAreaColors","splitLineColorsArr","splitAreaColorsArr","splitLines","splitAreas","getColorIndex","areaOrLine","areaOrLineColorList","ticksRadius","realSplitNumber_1","axesTicksPoints","prevPoints","IndicatorAxis","radiusExtent","Radar","indicatorModel","indicatorIndex","radian","minRadianDiff","closestAxis","closestAxisIdx","viewSize","number","radarSeries","dummyScale","pixel","radarList","RadarSeries","ATTR","take","zr","resourceKey","userKey","getStore","release","uKey","isTaken","echarts","RoamController","mousedownHandler","mousemoveHandler","mouseupHandler","mousewheelHandler","pinchHandler","controlType","pointerChecker","isAvailableBehavior","oldX","oldY","trigger","shouldZoom","shouldMove","wheelDelta","absWheelDeltaDelta","factor","checkPointerAndTrigger","absDelta","scrollDelta","controller","eventName","behaviorToCheck","contollerEvent","settings","setting","updateViewOnPan","controllerHost","updateViewOnZoom","zoomDelta","zoomX","zoomY","zoomLimit","newZoom","zoomMin","zoomMax","zoomScale","IRRELEVANT_EXCLUDES","onIrrelevantElement","targetCoordSysModel","parseXML","svg","parser","svgNode","nodeParsers","INHERITABLE_STYLE_ATTRIBUTES_MAP","INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS","SELF_STYLE_ATTRIBUTES_MAP","SELF_STYLE_ATTRIBUTES_MAP_KEYS","SVGParser","xml","named","viewBox","parseAttributes","applyDefs","viewBoxRect","viewBoxTransform","viewBoxArr","splitNumberSequence","makeViewBoxTransform","elRoot","xmlNode","parentGroup","namedFrom","isInDefs","isInText","nodeName","namedFromForSub","parser_1","nameAttr","newNamed","paintServerParsers","def","inheritStyle","applyTextAlignment","textStyle","circle","Circle","Line","ellipse","Ellipse","pointsStr","pointsArr","parsePoints","Polygon","LinearGradient","parsePaintServerUnit","parseGradientColorStops","RadialGradient","gradientUnits","offsetStr","styleVals","parseInlineStyle","parent","pointsString","defsUsePending","onlyInlineStyle","isTextGroup","disp","inheritedStyle","selfStyle","parseTransformAttribute","parseAttributeStyle","getFillStrokeStyle","parentSelfStyle","textBaseline","zrTextBaseline","parentInheritedStyle","zrTextAlign","urlRegex","urlMatch","url","numberReg","rawStr","transformRegex","DEGREE_TO_ANGLE","transformOps_1","mt","valueArr","sx","sy","styleRegex","inheritableStyleResult","selfStyleResult","styleRegResult","svgStlAttr","zrInheritableStlAttr","zrSelfStlAttr","svgAttrName","attrValue","parseSVG","REGION_AVAILABLE_SVG_TAG_MAP","GeoSVGResource","mapName","firstGraphic","createRegions","regions","regionsMap","svgXML","rootFromParse","svgWidth","svgHeight","bRectX","bRectY","bRectWidth","bRectHeight","calculatedBoundingRect","namedItem","setSilent","hostKey","usedRootMap","svgGraphic","region","geoCoord","nanhaiName","fixNanhai","mapType","exterior","coordsOffsetMap","fixTextCoords","coordFix","cp","fixDiaoyuIsland","DEFAULT_NAME_PROPERTY","GeoJSONResource","geoJSON","specialAreas","parseInput","nameMap","nameProperty","parsed","rawRegions","calculateBoundingRect","finalRegions","regionName","parseGeoJson","specialArea","regionRect","rawDef","rawSpecialAreas","resource","OPTION_STYLE_ENABLED_TAGS","OPTION_STYLE_ENABLED_TAG_MAP","STATE_TRIGGER_TAG_MAP","LABEL_HOST_MAP","mapLabelRaw","getFixedItemStyle","areaColor","fixLineStyle","styleHost","MapDraw","mapOrGeoModel","fromView","isGeo","mapSeries","geo","regionsGroup","transformInfo","transformInfoRaw","transformInfoRoam","isFirstDraw","isVisualEncodedByVisualMap","viewBuildCtx","regionsGroupByName","regionsInfoByName","projection","projectionStream","transformPoint","project","transformPolygonPoints","inPoints","outPoints","newPt","getPolyShape","regionGroup","regionModel","polygonSubpaths","polylineSubpaths","geometry","polys","projectPolys","poly","centerPt","createCompoundPath","subpaths","isLine","compoundPath","applyOptionStyleForRegion","resetLabelForRegion","resetEventTriggerForRegion","resetTooltipForRegion","resetStateTriggerForRegion","svgDispatcherMap","focusSelf","svgNodeTagLower","Displayable","focus_1","els","blurStyle","opacity_1","geoModel","geoSourceManager","mainType","makeActionBase","action","mapDraw","normalStyleModel","emphasisStyleModel","blurStyleModel","selectStyleModel","normalStyle","selectStyle","decal","labelXY","isDataNaN","query","labelFetcher","specifiedTextOpt","eventTrigger","rings","createStream","polygons","curPoly","startPolygon","endPolygon","stream","ring","MapView","mapModel","originalData","originalDataIndex","fullData","name_1","fullIndex_1","MapSeries","dataNameMap","toAppendNames","name_2","geoSource","geoIndex","seriesGroup","seriesNames","otherIndex","zoom","iconType","icon","dataStatistics","datas","statisticType","mapKey","mapDataStatistic","seriesGroups","hostGeoModel","seriesList","mapSymbolLayout","processedMapType","mapSymbolOffsets","subMapSeries","v2ApplyTransform","vector","View","Transformable","rawTransform","rawParent","centerCoord","rawRect","rawTransformMatrix","roamTransform","defaultCenter","roamTransformable","rawTransformable","dummyTransformable","noRoam","invTransform","getCoordSys","GEO_DEFAULT_PARAMS","geo2DDimensions","Geo","resourceType","defaultParams","invertLongitute","projected","resizeGeo","boundingCoords","leftTop_1","rightBottom_1","projection_1","xMin","yMin","xMax","yMax","sampleLine","centerOption","sizeOption","aspect","useCenterAndSize","boxLayoutOption","setGeoCoords","GeoCreator","geoList","getCommonGeoProperties","mapModelGroupBySeries","nameMapList","singleMapSeries","originRegionArr","regionsArr","geoCreator","GeoModel","parentModel","selectedMap","optionModelMap","regionOpt","formatter","selectedMode","getCenterCoord","view","updateCenterAndZoom","previousZoom","fixX","fixY","GeoView","registerMap","geoJson","makeAction","actionInfo","selected","allSelected","names","init","inRoot","nodes","firstWalk","separation","siblings","subtreeW","executeShifts","midPoint","apportion","secondWalk","nodeX","defaultSeparation","radialCoordinate","n","shift","change","subtreeV","ancestor","nodeOutRight","nodeInRight","nodeOutLeft","nodeInLeft","sumOutRight","sumInRight","sumOutLeft","sumInLeft","nextRight","nextLeft","moveSubtree","nextAncestor","wl","wr","node1","node2","TreeEdgeShape","TreePath","childPoints","childLen","parentPoint","firstChildPos","lastChildPos","orient","forkDim","otherDim","forkPosition","tmpPoint","TreeView","layoutInfo","updateNode","removeNode","bbox","oldMin","oldMax","viewCoordSys","nodeScale","nodeScaleRatio","groupZoom","roamZoom","symbolInnerColor","virtualRoot","sourceSymbolEl","sourceLayout","sourceOldLayout","targetLayout","realRoot","rootLayout","length_1","isLeft","normalLabelModel","labelRotateRadian","focusDataIndices","drawEdge","parentEl","edgeShape","curvature","edgeForkPosition","edge","getEdgeShape","childLayout","removeNodeEdge","removeAnimationOpt","getSourceNode","sourceEdge","layoutOpt","childNode","cpx2","cpy2","radialCoor1","radialCoor2","radialCoor3","radialCoor4","linkSeriesData","mainData","linkAll","methodName","transferInjection","cloneShallowInjection","changeInjection","isMainData","linkSingle","getLinkedData","getLinkedDataAll","TreeNode","hostTree","options","order","suppressVisitSub","depth","includeSelf","ancestors","currNode","dimension","merge","Tree","rawIndex","dataRoot","beforeLink","tree","listData","dimMax","buildHierarchy","dataNode","addChild","retrieveTargetInfo","validPayloadTypes","targetNode","targetNodeId","getPathToRoot","aboveViewRoot","viewRoot","viewPath","wrapTreePathInfo","treePathInfo","nodeDataIndex","TreeSeriesModel","leaves","leavesModel","nodeData","treeDepth","expandAndCollapse","expandTreeDepth","eachAfter","callback","eachBefore","treeLayout","commonLayout","left_1","right_1","bottom_1","delta","tx_1","kx_1","ky_1","coorX_1","coorY_1","finalCoor","orient_1","treeVisual","existsStyle","installTreeAction","TreeSeries","actionTypes","installTreemapAction","handleRootToNode","types","targetInfo","originViewRoot","enableAriaDecalForTree","decalPaletteScope","TreemapSeriesModel","completeTreeValue","levels","designatedVisualItemStyle","designatedVisualModel","setDefault","levelModels","levelDefine","levelModel","idIndexMap","childValue","thisValue","globalColorList","globalDecalList","hasColorDefine","hasDecalDefine","modelColor","modelDecal","level0","TEXT_PADDING","ITEM_GAP","ARRAY_LENGTH","Breadcrumb","containerGroup","onSelect","thisGroup","emphasisTextStyleModel","layoutParam","itemWidth","lastX","emptyItemWidth","availableSize","totalWidth","renderList","itemNode","makeItemPoints","packEventData","itemHeight","head","tail","AnimationWrap","duration","checkTerminate","createWrap","DRAG_THRESHOLD","PATH_LABEL_NOAMAL","PATH_UPPERLABEL_NORMAL","Z2_BASE","Z2_BG","Z2_CONTENT","getStateItemStyle","makeStyleMapper","getItemStyleNormal","TreemapView","createStorage","models","payloadType","thisStorage","reRoot","renderResult","thisTree","oldTree","lastsForAnimation","oldStorage","willInvisibleEls","doRenderNode","thisNode","oldNode","renderNode","dualTravel","willDeleteEls","clearStorage","_oldRootLayout","renderFinally","thisViewChildren","oldViewChildren","sameTree","processNode","DataDiffer","getKey","storageName","delEls","durationOption","easingOption","animationWrap","innerStore","targetX","targetY","last","mouseX","mouseY","_controllerHost","nodeClick","link","linkTarget","thisLayout","nodeModel","thisWidth","thisHeight","borderWidth","thisInvisible","thisRawIndex","oldRawIndex","upperHeight","isParent","itemStyleNormalModel","itemStyleEmphasisModel","itemStyleBlurModel","itemStyleSelectModel","giveGraphic","bg","renderBackground","isDisabled","focusOrIndices","content","renderContent","useUpperLabel","processInvisible","visualBorderColor","upperLabelWidth","prepareText","contentWidth","contentHeight","nodeStyle","element","rectEl","upperLabelRect","isShow","textPadding","addDrillDownIcon","textEmphasisState","iconChar","Ctor","lasts","prepareAnimationWhenHasOld","calculateZ2","prepareAnimationWhenNoOld","lastCfg","isGroup","parentOldX","parentOldY","parentOldBg","z2InLevel","each","isObject","CATEGORY_DEFAULT_VISUAL_INDEX","VisualMapping","mappingMethod","normalizers","visualHandler","normalizeVisualRange","preprocessForPiecewise","preprocessForSpecifiedCategory","normalized","visual","isPrimary","newVisual","newVal","hasVisual","visualTypes","types_1","type1","type2","visualType1","visualType2","pieceList","findClosestWhenOutside","possibleI","abs","pieceValue","updatePossible","piece","close_1","littleThan","newAbs","makeApplyVisual","isNormalized","doMapCategory","returnRGBArray","getSpecifiedVisual","doMapFixed","makePartialColorVisualHandler","createNormalizedToNumericVisual","getter","setter","symbolCfg","doMapToArray","categories","categoryMap","cate","visualArr_1","setVisualToOption","visualArr","doNotNeedPair","applyValue","colorChannel","sourceExtent","pieceIndex","close","ITEM_STYLE_NORMAL","travelTree","designatedVisual","viewRootAncestors","nodeLayout","nodeItemStyleModel","visuals","buildVisuals","borderColorSaturation","thisNodeColor","calculateColor","calculateBorderColor","viewChildren","mapping_1","buildVisualMapping","childVisual","mapVisual","visualName","getValueVisualDefine","colorAlpha","colorSaturation","rangeVisual","getRangeVisual","visualMin","visualMax","dataExtent","colorMappingBy","mapping","childVisuals","mappingType","retrieveValue","PATH_BORDER_WIDTH","PATH_GAP_WIDTH","PATH_UPPER_LABEL_SHOW","PATH_UPPER_LABEL_HEIGHT","ecWidth","ecHeight","seriesOption","containerWidth","containerHeight","rootRect","viewAbovePath","rootSize","estimateRootSize","sort_1","viewRootLayout_1","squarify","treeRoot","calculateRootPosition","prunning","hideChildren","halfGapWidth","upperLabelHeight","getUpperLabelHeight","layoutOffset","layoutOffsetUpper","totalArea","initChildren","rowFixedLength","best","row","score","worst","childrenVisibleMin","orderBy","overLeafDepth","sort","statistic","filterByThreshold","orderedChildren","visibleMin","deletePoint","areaMax","areaMin","squareArea","flush","idx0WhenH","idx1WhenH","xy","wh","rowOtherLength","rowLen","wh1","remain","modWH","wh0","defaultSize","viewArea","currNodeValue","defaultPosition","targetCenter","nodeInViewAbovePath","isAboveViewRoot","childClipRect","TreemapSeries","treemapVisual","treemapLayout","categoryFilter","graphSeries","categoriesData","graph","categoryNames","category","categoryVisual","paletteScope","categoryNameIdxMap","symbolVisualList","symbolVisual","categoryIdx","categoryStyle","visualList","normalize","graphEdgeVisual","edgeData","KEY_DELIMITER","getAutoCurvenessParams","createCurveness","appendLength","autoCurvenessParmas","length","curvenessList","getKeyOfEdges","n1","n2","getOppositeKey","keys","getEdgeFromMap","getTotalLengthBetweenNodes","getEdgeMapLengthWithKey","lenV","edgeMap","initCurvenessList","createEdgeMapForCurveness","oppositeEdges","getCurvenessForEdge","needReverse","autoCurvenessParams","isArrayParam","edgeArray","edgeIndex","totalLen","curKey","parityCorrection","oppositeKey","resValue","simpleLayout","simpleLayoutEdge","curveness","graphSimpleLayout","dimensions_1","hasValue","getNodeGlobalScale","getSymbolSize","_symbolRadiansHalf","circularLayout","basedOn","draggingNode","pointer","tempX","tempY","circularRotateLabel","rotateNodeLabel","_layoutNodesBasedOn","cp1","x12","y12","unitAngle","radianHalf","sumRadian","symbolRadianHalf","halfRemainRadian","graphCircularLayout","scaleAndAdd","forceLayout","inNodes","inEdges","edges","gravity","initialFriction","friction","beforeStepCallback","afterStepCallback","v12","nLen","repFact","graphForceLayout","preservedPoints_1","graph_1","nodeData_1","forceModel","initLayout","nodeDataExtent_1","edgeDataExtent_1","repulsion","edgeLength","repulsionArr_1","edgeLengthArr_1","nodes_1","rep","edgeModel","forceInstance","l","stopped","createViewCoordSys","viewList","coordSysType","positions","bbWidth","bbHeight","straightLineProto","bezierCurveProto","StraightLineShape","CurveShape","isStraightLine","ECLinePath","SYMBOL_CATEGORIES","makeSymbolTypeKey","symbolCategory","makeSymbolTypeValue","lineData","symbolKeepAspect","symbolSizeArr","symbolOffsetArr","createLine","setLinePoints","targetShape","blurLineStyle","selectLineStyle","lineState","lineStateStyle","stateStyle","labelNormalModel","linePath","symbolFrom","symbolTo","invScale","fromPos","toPos","setSymbolRotation","specifiedRotation","tangent","halfPercent","LineDraw","LineCtor","lineDraw","oldLineData","isEffectObject","lineNeedsDraw","newLineData","itemEl","isPointNaN","pts","v1","v2","v3","quadraticAt","curve","v2DistSquare","mathAbs","intersectCurveCircle","curvePoints","radiusSquare","_t","nextDiff","adjustEdge","tmp0","quadraticSubdivide","pts2","fromSymbol","toSymbol","originalPoints","isViewCoordSys","GraphView","groupNewProp","layoutAnimation","generateNodeKey","Graph","directed","nodesMap","GraphNode","edgesMap","GraphEdge","startNode","edgeType","queue","currentNode","otherNode","dataIndices","adjacentEdge","connectedEdgesMap","connectedNodesMap","sourceNodesQueue","targetNodesQueue","nodeIteratorIndex","sourceNode","sourceNodes","targetNodes","createGraphDataProxyMixin","hostName","dataName","createGraphFromNodeEdge","linkNameList","validEdges","linkCount","coordSysCtor","CoordinateSystem","coordDimensions","GraphSeriesModel","getCategoriesData","categoriesModels","categoryModel","oldGetModel","newGetModel","resolveParentPath","pathArr","newPathArr","sourceName","targetName","nameArr","nodeMarkup","GraphSeries","PointerShape","PointerPath","parsePosition","formatLabel","labelFormatter","GaugeView","colorList","posInfo","axisLineModel","MainPath","showAxis","axisLineWidth","angleRangeSpan","prevEndAngle","sectors","getColor","minVal","maxVal","subSplitNumber","splitLineLen","tickLen","subStep","splitLineStyle","splitLineDistance","unitX","unitY","splitLine","autoColor","textStyleX","textStyleY","tickLine","oldProgressData","progressList","showPointer","progressModel","showProgress","valueExtent","angleExtent","createPointer","pointerModel","pointerWidth","pointerLength","pointerStr","pointerOffset","pointerOffsetX","pointerOffsetY","pointerKeepAspect","createProgress","ProgressPath","isOverlap","progressWidth","progress","isClip","previousPointer","previousRotate","previousProgress","previousEndAngle","anchorModel","showAnchor","anchorSize","anchorType","offsetCenter","anchorKeepAspect","anchor","contentGroup","newTitleEls","newDetailEls","showPointerAbove","itemTitleModel","titleOffsetCenter","titleX","titleY","labelEl","itemDetailModel","detailOffsetCenter","detailX","detailY","detailColor","formatter_1","labelDataIndex","labelDimIndex","fmt","extendParams","GaugeSeriesModel","GaugeSeries","opacityAccessPath","FunnelPiece","FunnelView","funnelPiece","FunnelSeriesModel","getSortedIndices","isAscending","funnelLayout","sizeExtent","funnelAlign","itemSize","getLinePoints","val_1","FunnelSeries","DEFAULT_SMOOTH","ParallelView","dataGroup","add","update","remove","newDataIndex","addEl","updateElCommon","oldDataIndex","createLinePoints","createGridClipShape","parallelModel","isEmptyValue","ParallelSeriesModel","makeDefaultEncode","activeState","theActiveState","encodeDefine","dataDimIndex","convertDimNameToNumber","parallelVisual","opacityMap","itemOpacity","parallelPreprocessor","createParallelIfNeeded","mergeAxisOptionFromParallel","hasParallelSeries","axisOption","parallelIndex","parallelOption","CLICK_THRESHOLD","handlers","handler","checkTrigger","mouseDownPoint","behavior","triggerOn","ParallelModel","newOption","parallelAxisIndex","axisModels","ParallelAxis","sliderMove","handleEnds","handleIndex","minSpan","maxSpan","extentSpan","restrict","handleSpan","originalDistSign","getSpanSign","extentMinSpan","realExtent","currDistSign","extend","mathFloor","mathCeil","Parallel","axisHelper","axisBase","layoutBase","pixelDimIndex","pAxis","pLayout","layoutLength","layoutExtent","axisCount","axisExpandWidth","axisExpandCount","axisExpandable","axisExpandWindow","winSize","axisExpandCenter","axisCollapseWidth","winInnerIndices","axisExpandWindow0Pos","layoutAxisWithExpand","layoutAxisWithoutExpand","positionTable","rotationTable","dataDimensions","hasActiveSet","lenj","axisLayout","pointCoord","triggerArea","useJump","winSize2","axisLabelShow","nameTruncateMaxWidth","createParallelCoordSys","coordSysList","parallelCoordSysCreator","ParallelAxisModel","intervals","activeIntervals","BRUSH_PANEL_GLOBAL","mathPow","COVER_Z","UNSELECT_THRESHOLD","MIN_RESIZE_LINE_WIDTH","MUTEX_RESOURCE_KEY","DIRECTION_MAP","CURSOR_MAP","DEFAULT_BRUSH_OPT","baseUID","BrushController","pointerHandlers","brushOption","panelOpts","panels_1","coverConfigList","coverConfig","tmpIdPrefix","oldCovers","newCovers","creatingCover","oldGetKey","addOrUpdate","cover","newBrushInternal","endCreating","createCover","updateCoverAfterCreation","clearCovers","coverRenderers","updateZ","coverRenderer","getCoverRenderer","updateCoverShape","getPanelByPoint","localCursorPoint","panels","panel","pn","getPanelByCover","panelId","covers","originalLength","areas","shouldShowCover","getTrackEnds","createBaseRectCover","rectRangeConverter","edgeNameSequences","makeStyle","driftRect","nameSequence","updateBaseRect","localRange","handleSize","xa","ya","x2a","y2a","widtha","heighta","updateRectShape","updateCommon","transformable","mainEl","globalDir","getGlobalDirection1","getGlobalDirection2","pointsToRect","clipByPanel","formatRectRange","getTransform","localDirName","inverseMap","localDirNameSeq","dirNameSequence","rectRange","localDelta","toLocalDelta","dirName","ind","driftPolygon","localD","localZero","xmin","ymin","xmax","ymax","resetCursor","isOutsideZrArea","currPanel","preventDefault","rawE","mainShapeContain","updateCoverByMouse","thisBrushOption","eventParams","determineBrushType","coverBrushOption","brushType","handleDragEnd","getLineRenderer","returnInput","localTrack","ends","xyIndex","otherExtent","makeRectPanelClipPath","normalizeRect","localPoints","makeLinearBrushOtherExtent","specifiedXYIndex","brushWidth","base","makeRectIsTargetByCursor","targetModel","elementList","ParallelAxisView","fromAxisAreaSelect","getCoordSysModel","areaSelectStyle","areaWidth","builderOpt","extentLen","extra","getCoverInfoList","eventParam","coverInfoList","coverInfo","installParallelActions","parallelAxisModel","defaultAxisOption","ParallelSeries","SankeyPathShape","SankeyPath","SankeyView","sankeyView","n1Layout","node1Model","dragX1","dragY1","n2Layout","node2Model","dragX2","dragY2","edgeLayout","applyCurveStyle","defaultEdgeLabelText","edgeLabelStateModels","dragX","dragY","curveProps","sourceColor","targetColor","SankeySeriesModel","links","nodeDepth","localPosition","dataItem","noValue","rawDataOpt","edgeValue","edgeName","nodeValue","sankeyLayout","nodeWidth","nodeGap","computeNodeValues","filteredNodes","iterations","nodeAlign","layoutSankey","computeNodeBreadths","computeNodeDepths","computeEdgeDepths","value1","getEdgeValue","value2","nodeRawValue","remainEdges","indegreeArr","zeroIndegrees","nextTargetNode","maxNodeDepth","isItemDepth","edgeIdx","indexEdge","nodeIndex","maxDepth","adjustNodeWithNodeAlign","kx","scaleNodeBreadths","isNodeDepth","nextSourceNode","remainNodes","nodeHeight","moveSinksRight","nodesByBreadth","prepareNodesByBreadth","initializeNodeDepth","resolveCollisions","alpha","relaxRightToLeft","relaxLeftToRight","keyAttr","groupResult","minKy","ky","nodeDy","edgeDy","nodeDyAttr","weightedTarget","centerTarget","nodeY","weightedSource","centerSource","array","ty","sankeyVisual","minValue_1","maxValue_1","mapValueToColor","customColor","edgeStyle","SankeySeries","WhiskerBoxCommonMixin","ordinalMeta","xAxisType","yAxisType","addOrdinal","coordDims","baseAxisDimIndex","baseAxisType","otherAxisType","newOptionData_1","newItem","defaultValueDimensions","BoxplotSeriesModel","BoxplotView","constDim","createNormalBox","updateNormalBoxData","BoxPathShape","BoxPath","transInit","updateMethod","boxplotLayout","groupSeriesByAxis","groupItem","seriesModels","calculateBase","layoutSingleSeries","axisList","seriesCount","boxWidthList","boxOffsetList","boundList","bandWidth","maxDataCount_1","boxWidthBound","boxGap","boxWidth","halfWidth","cDimIdx","vDimIdx","cDim","vDims","axisDimVal","median","getPoint","end1","end2","end4","end5","addBodyEnd","layEndLine","point1","point2","endCenter","from","to","prepareBoxplotData","boxData","outliers","boundIQR","useExtreme","ascList","Q1","Q2","Q3","bound","low","high","itemNameFormatter","itemName","outlier","boxplotTransform","upstream","BoxplotSeries","SKIP_PROPS","CandlestickView","isSimpleBox","clipArea","isNormalBoxClipped","setBoxCommon","NormalBoxPathShape","NormalBoxPath","LargeBoxPathShape","LargeBoxPath","largePoints","elP","elN","elDoji","setLargeStyle","sign","CandlestickSeriesModel","candlestickPreprocessor","seriesItem","positiveBorderColorQuery","negativeBorderColorQuery","dojiBorderColorQuery","positiveColorQuery","negativeColorQuery","candlestickVisual","getBorderColor","isLargeRender","candlestickLayout","candleWidth","calculateCandleWidth","cDimI","vDimsI","openDimI","closeDimI","lowestDimI","highestDimI","largeProgress","normalProgress","openVal","closeVal","lowestVal","highestVal","ocLow","ocHigh","ocLowPoint","ocHighPoint","lowestPoint","highestPoint","subPixelOptimizePoint","hasDojiColor","getSign","makeBrushRect","pmin","pmax","barMaxWidth","barMinWidth","CandlestickSeries","updateRipplePath","rippleGroup","effectCfg","ripplePath","EffectSymbol","rippleNumber","oldEffectCfg","DIFFICULT_PROPS","EffectScatterView","effectSymbolDraw","EffectScatterSeriesModel","EffectScatterSeries","EffectLine","effectModel","period","loop","roundTrip","constantSpeed","delayExpr","delayNum","lastPos","quadraticDerivativeAt","tx","Polyline","lineEmphasisState","EffectPolyline","accLenArr","offsets","lastFrame","LargeLinesPathShape","LargeLinesPath","segs","quadratic","LargeLineDraw","lineEl","oldSegs","newSegs","isIncremental","linesLayout","isPolyline","isLarge","lineCoords","totalCoordsCount","LinesView","trailLength","isSvg","hasEffect","Uint32Arr","Float64Arr","compatEc2","itemOpt","coords","LinesSeriesModel","startOffset","coordsOffsetAndLenStorage","coordsStorage","coordsCursor","offsetCursor","dataCount","fromName","toName","linesVisual","dataEach","LinesSeries","GRADIENT_LEVELS","HeatmapLayer","canvas","colorFunc","isInRange","gradientInRange","gradientOutOfRange","imageData","pixels","pixelLen","minOpacity","maxOpacity","diffOpacity","gradientOffset","brushCanvas","gradientPixels","pixelsSingleState","off","getIsInPiecewiseRange","dataSpan","lastIndex","getIsInContinuousRange","isGeoCoordSys","HeatmapView","visualMapOfThisSeries","visualMap","targetSeries","isCartesian2d","dataDims","dataDimX","dataDimY","emphasisModel_1","visualMapModel","inRangeVisuals","outOfRangeVisuals","hmLayer","lng","lat","HeatmapSeriesModel","coordSysCreator","HeatmapSeries","BAR_BORDER_WIDTH_QUERY","LAYOUT_ATTRS","pathForLineWidth","PictorialBarView","coordSysRect","getItemModel","symbolMeta","getSymbolMeta","bar","createBar","pictorialShapeStr","getShapeStr","updateBar","removeBar","symbolRepeat","symbolClip","symbolPosition","symbolPatternSize","isAnimationEnabled","prepareBarLength","prepareSymbolSize","prepareLineWidth","prepareLayoutInfo","outputSymbolMeta","symbolBoundingData","zeroPx","pxSignIdx","boundingLength","symbolBoundingExtent","convertToCoordOnAxis","pxSign","categoryDim","categorySize","parsedSymbolSize","symbolScale","valueLineWidth","repeatCutLength","unitLength","pathLen","absBoundingLength","symbolMargin","hasEndGap","symbolMarginNumeric","uLenWithMargin","endFix","repeatSpecified","repeatTimes","toIntTimes","mDiff","sizeFix","pathPosition","bundlePosition","barRectShape","createPath","createOrUpdateRepeatSymbols","bundle","unit","eachPath","makeTarget","createOrUpdateSingleSymbol","mainPath","createOrUpdateBarRect","barRect","createOrUpdateClip","getAnimationDelayParams","labelRect","immediateAttrs","animationAttrs","barPositionOutside","times","roundedTimes","PictorialBarSeriesModel","PictorialBarSeries","ThemeRiverView","layersSeries","keyGetter","dataDiffer","newLayersGroups","process","oldLayersGroups","points0","textLayout","layerGroup","DATA_NAME_INDEX","ThemeRiverSeriesModel","rawDataLength","timeValueKeys","layerData","layerNum","timeValue","singleAxisModel","filterData","lenCount","indexArr","timeDim","layerSeries","index1","index2","nestestValue","minDist","nearestIdx","pointNum","theValue","themeRiverLayout","single","doThemeRiverLayout","layerPoints","singleLayer","computeBaseline","baseLine","baseY0","sums","temp","ThemeRiverSeries","DEFAULT_SECTOR_Z","DEFAULT_TEXT_Z","SunburstPiece","itemStyleModel","labelMinAngle","isNormalShown","labelStateModel","isNormal","isShown","getLabelAttr","sectorState","labelColor","labelPadding","flipStartAngle","flipEndAngle","midAngleNormal","needsFlip","stateAttr","ROOT_TO_NODE_ACTION","HIGHLIGHT_ACTION","UNHIGHLIGHT_ACTION","installSunburstAction","handleHighlight","SunburstView","newRoot","renderLabelForZeroData","newChildren","oldChildren","renderRollUp","targetFound","SunburstSeriesModel","sunburstLayout","rootDepth","renderRollupNode","rPerLevel","rStart","rEnd","r0_1","r_1","radius_1","siblingAngle_1","sortOrder","sortTargets","isAsc_1","sunburstVisual","pickColor","treeHeight","SunburstSeries","STYLE_VISUAL_TYPE","NON_STYLE_VISUAL_PROPS","customInnerStore","CustomSeriesModel","dataToCoordSize","dataSize","halfSize","cartesianPrepareCustom","geoPrepareCustom","singlePrepareCustom","getterName","polarPrepareCustom","radiusAxis","angleAxis","calendarPrepareCustom","rangeInfo","deprecatedLogs","isEC4CompatibleStyle","elType","hasOwnTextContentOption","hasOwnTextConfig","convertFromEC4CompatibleStyle","hostStyle","srcStyle","textConfig","textContentStyle","hasOwnPos","convertEC4CompatibleRichItem","richItem","convertToEC4StyleForCustomSerise","itemStl","txStl","txCfg","isInside","hostFill","convertToEC4RichItem","textFillNotSet","warnDeprecated","deprecated","insteadApproach","LEGACY_TRANSFORM_PROPS_MAP","LEGACY_TRANSFORM_PROPS","TRANSFORM_PROPS_MAP","transformPropNamesStr","ELEMENT_ANIMATABLE_PROPS","transitionInnerStore","getElementAnimationConfig","elOption","animationProp","userDuring","duringCall","applyUpdateTransition","animatableModel","clearStyle","styleOpt","transFromProps","propsToSet","prepareTransformAllPropsFinal","prepareShapeOrExtraAllPropsFinal","prepareTransformTransitionFrom","prepareShapeOrExtraTransitionFrom","prepareStyleTransitionFrom","applyPropsDirectly","applyMiscProps","enterFromProps_1","applyPropsTransition","updateLeaveTo","leaveToProps","applyLeaveTransition","onRemove","isTransitionAll","transition","allPropsFinal","tmpDuringScope","transitionDuringAPI","assertNotReserved","latestUserDuring","scopeUserDuring","mainAttr","fromEl","attrOpt","elPropsInAttr","transFromPropsInAttr","attrTransition","transitionKeys","elVal","elPropsInAttrKeys","isNonStyleTransitionEnabled","allProps","allPropsInAttr","keysInAttr","legacyName","xyName","legacyArr","fromElStyle","transFromStyleProps","styleTransition","elTransition","animationProps","animationStyleProps","styleKeys","optVal","checkTransformPropRefer","getStateToRestore","KEYFRAME_EXCLUDE_KEYS","stopPreviousKeyframeAnimationAndRestore","applyKeyframeAnimation","animationOpts","singleAnimationOpts","keyframes","stateToRestore","targetPropName","endFrameIsSet","kfValues","propKeys","savedTarget","EMPHASIS","NORMAL","BLUR","SELECT","STATES","PATH_ITEM_STYLE","PATH_LABEL","DEFAULT_TRANSITION","GROUP_DIFF_PREFIX","attachedTxInfoTmp","prepareCustoms","isPath","isDisplayable","copyElement","sourceEl","targetEl","CustomChartView","customSeries","renderItem","makeRenderItem","createOrUpdateItem","oldEl","setIncrementalAndHoverLayer","eventType","packedEvent","elementName","createEl","graphicType","pathRect","pathData","getPathData","Clz","updateElNormal","attachedTxInfo","txCfgOpt","textOptionStyle","decalPattern","decalObj","updateElOnState","elStateOpt","elDisplayable","stateObj","existingEmphasisState","currentZ","currentZLevel","optZ2","updateZForEachState","retrieveStateOption","prepareResult","userAPI","ordinalRawValue","styleEmphasis","barLayout","currentSeriesIndices","userParams","wrapEncodeDef","currDataIndexInside","currItemModel","currItemStyleModels","currLabelModels","seriesItemStyleModels","seriesLabelModels","dataIndexInside","getItemStyleModel","getLabelModel","userProps","labelStyle","preFetchFromExtra","applyUserPropsAfter","style_1","encodeDef","existsEl","doCreateOrUpdateEl","toBeReplacedIdx","doesElNeedRecreate","doCreateOrUpdateAttachedTx","doCreateOrUpdateClipPath","otherStateOpt","otherStyleOpt","retrieveStyleOptionOnState","mergeChildren","elInner","elOptionType","elOptionShape","elOptionStyle","hasOwnPathData","clipPathOpt","processTxInfo","txConOptNormal","txConOptEmphasis","txConOptBlur","txConOptSelect","txConStlOptNormal","txConOptOtherState","stateOpt","txConOpt","convertResult","txConOptNormal_1","stateOptionNormal","stateOption","byName","notMerge","diffGroupChildren","newChild","oldChild","removeChildFromGroup","processAddUpdate","processRemove","childOption","CustomSeries","clone","bind","BaseAxisPointer","handle","graphicKey","moveAnimation","doUpdateProps","updateProps","updateMandatoryProps","animation","isCategoryAxis","useSnap","animationThreshold","seriesDataCount","pointerOption","pointerEl","updateLabelShowHide","handleModel","getHandleTransProps","trans","payloadInfo","xDimIndex","propsEqual","lastProps","newProps","equals_1","buildElStyle","axisPointerType","styleModel","buildLabelElOption","labelPos","getValueLabel","paddings","format","confineInContainer","seriesDataIndices","params_1","idxItem","series","dataParams","getTransformedPosition","buildCartesianSingleLabelElOption","makeLineShape","makeRectShape","makeSectorShape","CartesianAxisPointer","getCartesian","pixelValue","elStyle","pointerShapeBuilder","currPosition","cursorOtherValue","cursorPoint","tooltipOptions","getAxisDimIndex","span","AxisPointerModel","register","initGlobalListeners","record","useHandler","doEnter","onLeave","dis","makeDispatchAction","dispatchTooltipFinally","pendings","showLen","hideLen","actuallyPayload","dispatchAction","currTrigger","pendingList","unregister","AxisPointerView","findPointFromSeries","seriesIndex","axisTrigger","illegalPoint","isIllegalPoint","inputAxesInfo","axesInfo","shouldHide","outputPayload","showValueMap","dataByCoordSys","updaters","showTooltip","coordSysContainsPoint","inputAxisInfo","findInputAxisInfo","processOnAxis","linkTriggers","tarAxisInfo","tarKey","srcAxisInfo","srcKey","srcValItem","makeMapperParam","updateModelActually","dispatchTooltipActually","dispatchHighDownActually","newValue","noSnap","outputFinder","buildPayloadsBySeries","payloadBatch","snapToValue","minDiff","dataDim","seriesNestestValue","coordSysItem","outputAxesInfo","valItem","sampleItem","highDownKey","lastHighlights","newHighlights","batchItem","toHighlight","toDownplay","PolarAxisPointer","coordValue","getLabelPosition","axisAngle","PolarModel","foundAxisModel","PolarAxisModel","AngleAxisModel","RadiusAxisModel","RadiusAxis","AngleAxis","ordinalScale","ordinalExtent","tickCount","unitSpan","unitH","maxH","cache","lastAutoInterval","lastTickCount","polarDimensions","Polar","maxAngle","d2","polarModel","resizePolar","parsedRadius","updatePolarScale","isAngleAxisModel","setAxis","polarCreator","polarList","radiusAxisModel","angleAxisModel","getAxisLineShape","rExtent","getRadiusIdx","fixAngleOverlap","firstItem","lastItem","AngleAxisView","ticksAngles","minorTickAngles","angelAxisElementsBuilders","rId","r0Id","shapeType","lines","tickAngleItem","tickAngles","commonLabelModel","labelTextAlign","labelTextVerticalAlign","prevAngle","r1","RadiusAxisView","newAxisGroup","layoutAxis","prevRadius","getSeriesStackId","getAxisKey","barLayoutPolar","lastStackCoords","barWidthAndOffset","calRadialBar","stackId","columnLayoutInfo","columnOffset","columnWidth","barMinHeight","barMinAngle","clampLayout","valueAxisModel","valueAxisStart","baseValue","baseCoord","radiusSpan","angleSpan","barSeries","columnsMap","columnsOnAxis","stacks","barGap","barCategoryGap","coordSysName","categoryGap","barGapPercent","remainedWidth","autoWidthCount","autoWidth","column","stack","widthSum","lastColumn","angleAxisExtraOption","radiusAxisExtraOption","PolarView","directionMap","SingleAxisView","SingleAxisModel","SingleAxis","singleDimensions","Single","extentSum","singleModel","create","singles","singleCreator","XY","WH","SingleAxisPointer","getGlobalExtent","getPointDimIndex","SingleView","CalendarModel","mergeAndNormalizeLayoutParams","raw","cellSize","cellSizeArr","ignoreSize","hvIdx","CalendarView","calendarModel","rangeData","localeModel","itemRectStyleModel","sw","sh","firstDay","addPoints","date","rs","poyline","parsedDate","tmpD","aligns","yearLabel","xc","yc","posPoints","yearText","isCenter","vAlign","monthLabel","termPoints","firstDayPoints","monthText","isStart","dayLabel","firstDayOfWeek","dayOfWeekShort","day","weekText","PROXIMATE_ONE_DAY","Calendar","mStr","dStr","weeks","whNames","layoutParams","cellNumbers","cellSizeSpecified","whGlobal","calendarRect","dayInfo","week","nthWeek","nthX","nthY","normalizedRange","rangeStr","parsedRange","reversed","allDay","startDateNum","endDateNum","dateNum","nthDay","calendarList","calendar","calendarSeries","setKeyInfoToNewElOption","resultItem","newElOption","existElOption","newElParentOption","isSetLoc","isSet","mergeNewElOptionToExist","existList","newElOptCopy","$action","copyTransitionInfo","TRANSITION_PROPS_TO_COPY","ROOT_TRANSITION_PROPS_TO_COPY","setLayoutInfoToExist","existItem","existingGroupOpt","newGroupOpt","GraphicComponentModel","elements","newList","flattenedList","mappingResult","elOptionsToUpdate","optionList","parentOption","nonShapeGraphicElements","GraphicComponentView","graphicModel","elMap","rootGroup","globalZ","globalZLevel","elExisting","parentId","targetElParent","textContentOption","elOptionCleaned","getCleanedElOption","isMerge","isReplace","el_1","updateCommonAttrs","removeEl","el_2","textContentExisting","clipPathOption","clipPathType","newEl","setEventData","elOptions","apiWidth","apiHeight","isParentRoot","parentElInner","containerInfo","layoutPos","layouted","animatePos","existElParent","defaultZ","defaultZlevel","graphicOption","DATA_ZOOM_AXIS_DIMENSIONS","SERIES_COORDS","isCoordSupported","coordType","getAxisMainType","getAxisIndexPropName","getAxisIdPropName","findEffectedDataZooms","axisRecords","effectedModels","effectedModelMap","dataZoomModel","addToEffected","foundNewLink","processSingle","isLinked","dataZoom","markAxisControlled","isLink","axisIdxArr","collectReferCoordSysModelInfo","coordSysInfoWrap","coordSysUid","coordSysInfo","DataZoomAxisInfo","axisCmptIdx","DataZoomModel","inputRawOption","retrieveRawOption","settledOption","optionOrient","targetAxisIndexMap","hasAxisSpecified","refering","needAuto","setParallelAxis","gridModel_1","axModel","globalOption","rangePropMode","rangeModeInOption","percentSpecified","valueSpecified","firstAxisModel","axisProxy","firstProxy","axisDimList","proxy","SelectDataZoomModel","DataZoomView","SelectDataZoomView","AxisProxy","axisMainType","percentExtent","percentWindow","valueWindow","hasPropModeValue","boundPercent","boundValue","spans","restrictSet","fromWindow","toWindow","fromExtent","toExtent","toValue","suffix","calculateDataExtent","dataWindow","filterMode","seriesData","store_1","dataDimIndices_1","leftOut","rightOut","thisHasValue","thisLeftOut","thisRightOut","isInWindow","minMaxSpan","minMax","percentSpan","valueSpan","rawExtentInfo","rawExtentResult","dataZoomProcessor","eachAxisModel","proxyList","seriesModelMap","percentRange","valueRange","installDataZoomAction","installed","installCommon","SelectZoomModel","SelectZoomView","ToolboxFeature","features","registerFeature","ctor","getFeature","ToolboxModel","featureOpt","featureName","Feature","viewportSize","makeBackground","ToolboxView","toolboxModel","isVertical","featureOpts","featureNames","processFeature","oldName","featureModel","feature","isUserFeatureName","isToolboxFeature","createIconPaths","iconName","iconPaths","iconStyleModel","iconStyleEmphasisModel","icons","titles","iconsMap","titlesMap","iconStr","hoverStyle","defaultTextPosition","titleText","emphasisTextConfig","emphasisTextState","emphasisTextStyle","needPutOnTop","topOffset","SaveAsImage","title","browser","$a","evt","parts","base64Encoded","bstr","filename","u8arr","blob","cw","doc","lang","html","tab","INNER_STACK_KEYWORD","ICON_TYPES","TITLE_TYPES","radioTypes","MagicType","availableIcons","seriesOptGenreator","generateNewSeriesTypes","seriesId","newSeriesOpt","radio","newTitle","currentType","isStack","BLOCK_SPLITER","ITEM_SPLITER","groupSeries","seriesGroupByCategoryAxis","otherSeries","meta","assembleSeriesWithCategoryAxis","groups","tables","headers","columns","assembleOtherSeries","argLen","getContentFromModel","trim","isTSVFormat","block","firstLine","itemSplitRegex","parseTSVContents","tsv","tsvLines","header","parseListContents","seriesName","hasName","parseContents","blockMetaList","blocks","blockMeta","DataView","container","viewMain","textarea","optionToContent","contentToOption","htmlOrDom","buttonContainer","buttonStyle","closeButton","refreshButton","tryMergeDataOption","original","newValIsObject","shouldDeleteName","newSeriesOptList","push","newSnapshot","storedSnapshots","getStoreSnapshots","dataZoomId","snapshot","pop","clear","RestoreOption","INCLUDE_FINDER_MAIN_TYPES","BrushTargetManager","foundCpts","parseFinder","targetInfoBuilders","builder","coordRange","coordConvert","diffProcessor","rangeOffset","getScales","getDefaultBrushType","targetInfoList","areaPanelId","targetInfoMatchers","formatMinMax","xAxisModels","yAxisModels","gridModels","gridModelMap","xAxesHas","yAxesHas","panelRectBuilders","axisConvert","rangeOrCoordRange","xminymin","xmaxymax","xyMinMax","axisNameIndex","axisDiffProcessor","refer","scales","xyMinMaxCurr","xyMinMaxOrigin","sizeCurr","getSize","sizeOrigin","DATA_ZOOM_ID_BASE","DataZoomFeature","updateZoomBtnStatus","updateBackBtnStatus","brushTargetManager","makeAxisFinder","setBatch","findDataZoom","found","dzModel","has","batch","nextActive","dzFeatureModel","zoomActive","featureDataZoomPath","dzOptions","finderResult","buildInternalOptions","axisIndexPropName","newOpt","DataZoom","Restore","TooltipModel","shouldTooltipConfine","tooltipModel","confineOption","testStyle","styleProps","TRANSFORM_VENDOR","TRANSITION_VENDOR","toCSSVendorPrefix","styleVendor","styleProp","getComputedStyle","stl","CSS_TRANSITION_VENDOR","CSS_TRANSFORM_VENDOR","gCssText","mirrorPos","assembleArrow","arrowPosition","arrowPos","positionStyle","transformStyle","rotateDeg","rotateRadian","arrowWH","rotatedWH","borderStyle","styleCss","assembleTransition","onlyFade","transitionCurve","transitionOption","transitionText","assembleTransform","toString","is3d","translate","assembleFont","cssText","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","assembleCssText","enableTransition","transitionDuration","boxShadow","borderName","camelCase","makeStyleCoord","zrX","zrY","zrPainter","zrViewportRoot","viewportRootOffset","TooltipHTMLContent","appendTo","alwaysShowContent","nearPointColor","styleCoord","markers","arrow","arrowEl","enterable","transforms","ratioX","ratioY","time","TooltipRichContent","markupStyleCreator","bounding","shadowOuterSize","calcShadowOuterSize","mathMaxWith0","proxyRect","TooltipView","renderMode","tooltipContent","cmptRef","findComponentReference","pointInfo","tooltipCascadedModel","buildTooltipModel","seriesDispatcher_1","cmptDispatcher_1","singleTooltipModel","cbParamsList","articleMarkup","markupTextArrLegacy","itemCoordSys","axisItem","axisValue","axisValueLabel","axisSectionMarkup","cbParams","seriesTooltipResult","frag","valueFormatter","positionExpr","orderMode","builtMarkupText","blockBreak","allMarkupText","dispatcher","dataModel","positionDefault","tooltipTrigger","markupText","asyncTicket","isHTMLRenderMode","tooltipConfig","encodeHTMLContent","tooltipModelCascade","cmpt","subTooltipModel","defaultHtml","formatterParams","nearPoint","useUTC","params0","isTimeAxis","cbTicket","tooltipDataParams","contentSize","boxLayoutPosition","layoutRect","calcTooltipPosition","refixTooltipPosition","isCenterAlign","confineTooltipPosition","lastCoordSys","lastCbParamsList","contentNotChanged","lastItemCoordSys","indexCoordSys","lastDataByAxis","thisItemCoordSys","thisDataByAxis","indexAxis","thisItem","lastIndices","newIndices","lastIdxItem","newIdxItem","seriesIdx","lastCbParams","modelCascade","defaultTooltipOption","resultModel","gapH","gapV","domWidth","domHeight","rectWidth","rectHeight","queryOptionMap","componentMainType","queryResult","subEl","DEFAULT_TOOLBOX_BTNS","brushPreprocessor","isNew","brushComponents","brushComponentSpecifiedBtns","brushOpt","tbs","toolbox","toolboxFeature","toolboxBrush","brushTypes","removeDuplicate","arr","flag","hasKeys","createVisualMappings","stateList","supplementVisualOption","visualMappings","mappings","createMappings","visualData","mappingOption","Creater","replaceVisualOption","applyVisual","getValueState","visualTypesMap","getVisual","setVisual","eachItem","valueOrIndex","rawDataItem","valueState","incrementalApplyVisual","makeBrushCommonSelectorForSeries","selector","getLineSelectors","inLineRange","layoutRange","STATE_LIST","DISPATCH_METHOD","DISPATCH_FLAG","layoutCovers","brushModel","brushVisual","brushSelected","throttleType","throttleDelay","brushIndex","thisBrushSelected","brushLink","linkedSeriesMap","selectedDataIndexForLink","rangeInfoBySeries","hasBrushExists","boundingRectBuilders","selectableArea","linkOthers","brushed","rangeInfoList","stepAParallel","stepAOthers","brushModelNotControll","checkInRange","seriesBrushSelected","doDispatch","fn","seriesIndices","getBoundingRectFromMinMax","rg","BrushView","modelId","DEFAULT_OUT_OF_BRUSH_COLOR","BrushModel","inBrush","generateBrushOption","BrushFeature","brushMode","isBrushed","Brush","TitleModel","TitleView","titleModel","subtextStyleModel","subText","subTextEl","sublink","groupRect","layoutOption","alignStyle","TimelineModel","currentIndex","dataArr","processedDataArr","dimType","SliderTimelineModel","TimelineView","TimelineAxis","labelDataIndexStore","SliderTimelineView","timelineModel","layoutInfo_1","mainGroup_1","labelGroup","axis_1","labelPosOpt","parsedLabelPos","labelAlignMap","labelBaselineMap","rotationMap","mainLength","controlModel","showControl","controlSize","controlGap","sizePlusGap","playPosition","prevBtnPosition","nextBtnPosition","controlPosition","showPlayBtn","showPrevBtn","showNextBtn","xLeft","xRight","mainGroup","rotateOriginX","rotateOriginY","viewBound","getBound","mainBound","labelBound","mainPosition","labelsPosition","mainBoundIdx","toBound","setOrigin","targetGroup","boundIdx","createScaleByModel","newGroup","progressLine","ticks","tick","hoverStyleModel","progressStyleModel","symbolOpt","giveSymbol","hoverLabelModel","progressLabelModel","playState","makeBtn","onclick","willRotate","iconSize","btn","makeControlIcon","me","pointerMoveTo","nextState","mousePos","toCoord","targetDataIndex","vertex","axisCoord","tickSymbols","tickLabels","Ordinal","Time","objPath","noAnimation","installTimelineAction","timelinePreprocessor","timelineOpt","compatibleEC2","ec2Types","transferItem","controlStyle","itemStyleEmphasis","labelNormal","excludeLabelAttr","attr","checkMarkerInSeries","seriesOpts","markerType","seriesOptArr","fillLabel","MarkerModel","hostSeries","createdBySelf","markerOpt","markerModel","MarkPointModel","masterMarkerModel","hasXOrY","hasXAndY","markerTypeCalculatorWithExtent","otherDataDim","targetDataDim","otherCoordIndex","targetCoordIndex","coordArr","calcDataDim","numCalculate","coordArrValue","markerTypeCalculator","dataTransform","coordInfo","dataDimToCoordDim","dimItem","zoneFilter","item1","item2","createMarkerDimValueGetter","inCoordSys","valueDataDim","sum_1","count_1","MarkerView","markerGroupMap","drawGroup","seriesModelList","isBlur","updateMarkerLayout","mpData","xPx","yPx","MarkPointView","markPointModel","mpModel","symbolDrawMap","createData","coordDimsInfos","dataOpt","dimValueGetter","MarkLineModel","markLineTransform","mlModel","itemArray","mlType","valueIndex","mlFrom","mlTo","normalizedItem","isInfinity","ifMarkLineHasOnlyDim","fromCoord","otherDimIndex","markLineFilter","updateSingleMarkerEndLayout","isFrom","MarkLineView","markLineModel","mlData_1","fromData_1","toData_1","lineDrawMap","mlData","createList","fromData","toData","updateDataVisualAndLayout","optData","MarkAreaModel","markAreaTransform","maModel","item0","lt","rb","ltCoord","rbCoord","ifMarkAreaHasOnlyDim","markAreaFilter","getSingleMarkerEndPoint","pointValue0","pointValue1","clampPointValue0","clampPointValue1","pointValue","dimPermutations","MarkAreaView","markAreaModel","areaData_1","areaGroupMap","polygonGroup","areaData","xPointExtent","yPointExtent","overlapped","allClipped","coordDimsInfos_1","getDefaultSelectorOptions","LegendModel","legendData","hasSelected","potentialData","availableNames","isPotential","provider","legendNameMap","curry","LegendView","legendModel","isFirstRender","itemAlign","selectorPosition","positionInfo","mainRect","legendDrawnMap","selectMode","excludeSeriesId","legendItemModel","lineVisualStyle","legendIcon","dispatchSelectAction","dispatchHighlightAction","dispatchDownplayAction","colorArr","selectorGroup","selectorItem","emphasisLabelModel","itemVisualStyle","drawType","isSelected","iconRotate","legendIconType","getLegendStyle","getDefaultLegendIcon","hitRect","contentRect","contentPos","selectorRect","selectorPos","selectorButtonGap","orientIdx","hw","yx","handleCommonProps","visualStyle","propVal","iconBrushType","decalStyle","legendLineModel","visualHasBorder","symboType","isUseHoverLayer","legendFilter","legendSelectActionHandler","isToggleSelect","isItemSelected","installLegendAction","ScrollableLegendModel","scrollDataIndex","ScrollableLegendView","controllerGroup","pageIconSize","pageIconSizeArr","createPageButton","pageTextStyleModel","iconIdx","pageDataIndexName","processMaxSize","controllerRect","showController","containerPos","controllerPos","pageButtonGap","pageButtonPosition","pageInfo","canJump","pageText","pageFormatter","pageIndex","total","containerRectSize","targetItemIndex","targetItem","itemCount","pCount","targetItemInfo","getItemInfo","winStartItemInfo","winEndItemInfo","currItemInfo","intersect","itemRect","itemInfo","winStart","defaultIndex","legendDataIdx","installScrollableLegendAction","InsideZoomModel","setViewInfoToCoordSysRecord","getRange","coordSysRecord","dzInfo","disposeCoordSysRecordIfNeeded","coordSysRecordMap","coordSysKeyArr","dataZoomInfoMap","dzUid","disposeCoordSysRecord","createCoordSysRecord","containsPoint","mergeControllerParams","typePriority","preventDefaultMouseMove","dataZoomInfo","oneType","installDataZoomRoamProcessor","apiInner","dzReferCoordSysWrap","dzCoordSysInfo","firstDzInfo","firstDzKey","controllerParams","InsideZoomView","getRangeHandlers","coordSysMainType","lastRange","directionInfo","getDirectionInfo","percentPoint","makeMover","getPercentDelta","percentDelta","oldPoint","newPoint","SliderZoomModel","DEFAULT_LOCATION_EDGE_GAP","DEFAULT_FRAME_BORDER_WIDTH","DEFAULT_FILLER_SIZE","DEFAULT_MOVE_HANDLE_SIZE","HORIZONTAL","VERTICAL","LABEL_GAP","SHOW_DATA_SHADOW_SERIES_TYPE","REALTIME_ANIMATION_CONFIG","SliderZoomView","barGroup","showMoveHandle","moveHandleSize","coordRect","ecSize","location","targetAxisModel","sliderGroup","otherAxisInverse","brushSelect","clickPanel","oldSize","candlestickDim","polygonPts","polylinePts","otherDataExtent_1","otherOffset","otherShadowExtent_1","thisShadowExtent","areaPoints_1","linePoints_1","step_1","thisCoord_1","stride_1","lastIsEmpty_1","isEmpty","otherCoord","createDataShadowGroup","isSelectedArea","showDataShadow","thisAxis","getOtherDim","displayables","handles","handleLabels","filler","getCursor","bRect","handleColor","actualMoveZone","moveHandleHeight","moveHandle_1","moveHandleIcon","moveZoneExpandSize","viewExtent","viewExtend","nonRealtime","displaybles","handleInterval","handleHeight","dataShadowSegs","segIntervals","segGroup","labelTexts","dataInterval","orderedHandleEnds","setLabel","barTransform","textPoint","labelPrecision","valueStr","showOrHide","changed","realtime","localPoint","brushRect","brushShape","brushEndTime","brushStart","endPoint","coordSysInfoList","thisDim","visualDefault","eachVisual","isArray","linearMap","VisualMapModel","optionSeriesIndex","is","edgeSymbols","dataBound","isMinMax","textValue","toFixed","optDim","dimNames","completeSingle","completeInactive","completeController","stateExist","stateAbsent","optExist","optAbsent","defa","symbolExists","symbolSizeExists","inactiveColor","itemSymbol","defaultSymbol","max_1","getColorVisual","DEFAULT_BAR_BOUND","ContinuousModel","oVals","getColorStopValues","iVals","stops","setStop","iIdx","oIdx","iLen","oLen","first","stopsLen","stopValues","VisualMapView","targetValue","visualCluster","forceState","visualObj","defaultColor","visualMapping","paramsSet","getItemAlign","modelOption","realIndex","reals","fakeValue","layoutInput","rParam","makeHighDownBatch","HOVER_LINK_SIZE","HOVER_LINK_OUT","ContinuousView","dataRangeText","endsIndex","textGap","shapes","gradientBarGroup","createPolygon","textSize","onDrift","onDragEnd","handleThumb","cursor","handleLabel","handleLabelPoint","indicator","indicatorStyle","indicatorLabel","indicatorLabelPoint","useHoverLinkOnHandle","forSketch","outOfRangeHandleEnds","inRangeHandleEnds","visualInRange","visualOutOfRange","symbolSizes","barPoints","sampleNumber","currValue","handleThumbs","cursorValue","rangeSymbol","halfHoverLinkSize","oldIndicatorPos","indicatorNewProps","labelNewProps","cursorPos","hoverOnBar","getHalfHoverLinkSize","hoverRange","oldBatch","newBatch","resultBatches","currECData","global","hoverLinkDataSize","hoverLinkOnHandle","visualMapActionInfo","visualMapActionHander","visualMapEncodingHandlers","resetDefines","resultVisual","visualMapPreprocessor","pieces","PiecewiseModel","mode","resetMethods","visualTypesInPieces","exists","hasSel_1","pIdx","representValue","pieceInterval","curr","outPieceList","splitStep","normalizeReverse","pieceListItem","closeList","infinityList","useMinMax","lg","PiecewiseVisualMapView","textFill","viewData","endsText","showLabel","visualState","onHoverLink","viewPieceList","shapeParam","newKey","o","PiecewiseView","DEFAULT_OPTION","ariaVisual","ariaModel","setDecal","decalModel","useDecal","paletteScopeGroupByType_1","decalScope","paletteDecal","specifiedDecal","mergeDecal","dataAll_1","idxMap_1","decalScope_1","dataCount_1","resultDecal","labelLocale","seriesCnt","maxDataCnt","maxSeriesCnt","displaySeriesCnt","ariaLabel","getTitle","withTitle","replace","seriesLabels_1","seriesLabel","withName","getSeriesTypeName","partialLabel","middleSeparator_1","endSeparator_1","dataLabels","dataLabel","separatorModel","middleSeparator","endSeparator","keyValues","typeNames","ariaPreprocessor","aria","RELATIONAL_EXPRESSION_OP_ALIAS_MAP","RegExpEvaluator","rVal","condValue","lVal","ConstConditionInternal","AndConditionInternal","OrConditionInternal","NotConditionInternal","RelationalConditionInternal","needParse","getValue","tarValRaw","tarValParsed","parseOption","exprOption","getters","cond","isObjectNotArray","parseAndOrOption","parseNotOption","parseRelationalOption","op","subOptionArr","subOption","valueGetterParam","subCondList","exprKeys","parserName","valueParser","keyRaw","condValueRaw","condValueParsed","evaluator","ConditionalExpressionParsed","parseConditionalExpression","filterTransform","rawItem","condition","dimLoose","param","resultData","sampleLog","sortTransform","orderExprList","orderDefList","orderExpr","incomparable","errMsg_1","errMsg_2","sourceFormat","orderDef","val0","val1","DatasetModel","DatasetView","aroundEqual","pathToBezierCurves","bezierArrayGroups","currentSubpath","xi","yi","createNewSubpath","addLine","addArc","c1","s1","c2","s2","x4","y4","hx","hy","nextAngle","adpativeBezier","PIXEL_DISTANCE","PIXEL_DISTANCE_SQR","dx2","dy2","cp1LenSqr","cp2LenSqr","projLen1","projLen2","d1Sqr","d2Sqr","tmpSegX","tmpSegY","pathToPolygons","beziers","getDividingGrids","dimSize","rowDim","rowSize","columnSize","rowCount","columnCount","currentCount","remained","divideSector","outShapes","arcLen","deltaR","isAngleRow","newShape","divideRect","isHorizontalRow","rowSizeDim","columnSizeDim","columnDim","crossProduct2d","lineLineIntersect","a1x","a1y","a2x","a2y","b1x","b1y","b2x","b2y","mx","my","nmCrossProduct","b1a1x","b1a1y","projPtOnLine","lineA","lineB","dir2","addToPoly","splitPolygonByLine","intersections","intersectionPt","splitPt0","splitPt1","splitPt0Arr","splitPt1Arr","newPolyA","newPolyB","binaryDividePolygon","polygonShape","pt0","binaryDivideRecursive","divider","mid","sub","copyPathProps","polygonConvert","split","OutShapeCtor","polygonCount","totalArea_1","left","selfCount","subPath","alignSubpath","subpath1","subpath2","len1","len2","shorterPath","shorterLen","shorterBezierCount","eachCurveSubDivCount","newSubpath","actualSubDivCount","createSubpath","lastSubpathSubpath","otherSubpath","lastY","alignBezierCurves","array1","array2","lastSubpath1","lastSubpath2","newArray1","newArray2","newSubpath1","newSubpath2","centroid","signedArea","findBestRingOffset","fromSubBeziers","toSubBeziers","fromCp","toCp","bezierCount","bestScore","bestOffset","cursorOffset","reverse","newArr","findBestMorphingRotation","fromArr","toArr","searchAngleIteration","searchAngleRange","fromNeedsReverse","fromSubpathBezier","toSubpathBezier","newFromSubpathBezier","newToSubpathBezier","bestAngle","tmpArr","sa","ca","newX1","newY1","isCombineMorphing","isMorphing","SAVED_METHOD_PREFIX","saveAndModifyMethod","modifiers","savedMethodName","originalMethod","after","args","restoreMethod","applyTransformOnBeziers","bezierCurves","mm","subBeziers","prepareMorphPath","fromPath","toPath","fromPathProxy","toPathProxy","fromBezierCurves","toBezierCurves","fromPathTransform","toPathTransform","updateIdentityTransform","morphingData","onet","newCp","x0_1","y0_1","morphPath","oldDone","oldDuring","restoreToPath","hilbert","bits","sortPaths","pathList","cps","defaultDividePath","createEmptyReturn","combineMorph","fromList","fromPathList","addFromPath","separateCount","dividePath","toSubPathList","individualDelay","identityTransform","addToSubPathListToZr","toLen","animating_1","eachDone","indivdualAnimationOpts","separateMorph","toPathList","fromLen","isMultiple","prepareMorphBatches","one","many","batches","batchCount","moveFrom","pathDividers","approxOpacity","cloned","applyMorphAnimation","divideShape","animateOtherProps","updateAnimationCfg","animationDelay","morphOneBatch","fromIsMany","animateIndex","animateCount","forceManyOne","batchMany","batchOne","batchFrom","batchTo","individualAnimationCfg","separateAnimationCfg","fromIndividuals","toIndividuals","morphBatches","getPathList","pathList_1","DATA_COUNT_THRESHOLD","TRANSITION_NONE","TRANSITION_P2C","TRANSITION_C2P","getUniversalTransitionGlobalStore","getDimension","visualDimension","getValueByDimension","dimOrdinalMeta","getGroupId","dataGroupId","isChild","groupIdDim","groupId","property","flattenDataDiffItems","seriesInfo","fadeInElement","newSeries","computedTransform","stopAnimation","animateElementStyles","animationConfig","oldStyle","isAllIdSame","oldDiffItems","newDiffItems","oldItem","transitionBetween","oldList","updateMorphingPathProps","rawFrom","rawTo","hasMorphAnimation","oldGroupIds","oldChildGroupIds","newGroupId","newChildGroupId","createKeyGetter","isOld","onlyGetId","useId","isElementStillInChart","updateOneToOne","oldIndices","oldElsList","newElsList","newSeris","getSeriesTransitionKey","seriesKey","convertArraySeriesKeyToString","getDivideShapeFromData","findTransitionSeriesBatches","globalStore","updateBatches","oldDataMap","oldDataMapForSplit","oldDataGroupId","transitionKey","transitionKeyStr","checkTransitionSeriesKeyDuplicated","newDataGroupId","oldSeries_1","oldData_1","querySeries","transitionSeriesFromOpt","transitionOpt","installUniversalTransition","ecMOdel","transOpt","updateBatches_1","allSeries","savedSeries","savedDataGroupIds","savedData","pick","isFunction","isString","EChartsReactCore","prevProps","shouldSetOption","pickKeys","onEvents","onChartReady","echartsInstance","instance","events","_bindEvent","func","_c","lazyUpdate","showLoading","_d","loadingOption","echartInstance","newStyle","EChartsReact","_interopRequireDefault","exports","_defineProperty2","_react","ownKeys","_objectSpread","FixTabPanel","_ref","_default","_FixTabPanel","_echartsForReact","Echarts","module","equal","SizeSensorId","SensorClassName","SensorTabIndex","timer","_len","_key","_sensorPool","sensor","ver","_id","_sensors","_constant","Sensors","clean","sensorId","getSensor","newId","removeSensor","_object","_resizeObserver","createSensor","_debounce","whenDestroy","listeners","newSensor","resizeListener","listener","destroy","unbind","toPropertyKey","_defineProperty","_typeof","toPrimitive","extendStatics","__extends","__","__assign","__rest","__decorate","decorators","__param","paramIndex","decorator","__esDecorate","descriptorIn","contextIn","initializers","extraInitializers","accept","kind","descriptor","_","__runInitializers","thisArg","useValue","__propKey","__setFunctionName","__metadata","metadataKey","metadataValue","__awaiter","_arguments","P","generator","adopt","resolve","reject","fulfilled","rejected","__generator","body","verb","__createBinding","k2","__exportStar","__values","__read","ar","error","__spread","__spreadArrays","il","jl","__spreadArray","pack","__await","__asyncGenerator","q","awaitReturn","resume","settle","fulfill","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","__setModuleDefault","__importStar","mod","__importDefault","__classPrivateFieldGet","receiver","__classPrivateFieldSet","__classPrivateFieldIn","__addDisposableResource","async","dispose","_SuppressedError","suppressed","message","__disposeResources","fail","__rewriteRelativeImportExtension","preserveJsx","tsx","ext","cm"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/3971.20c5a168732a0363e328.js","mappings":"s3EASA,SAASA,GAAUC,EAAIC,EAASC,EAAK,CACjC,IAAIC,EAASC,GAAA,G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E52K,CACT,CAEA,WAAe,CACb,UAAA0xK,GACA,SAAAE,EACA,OAAAC,EACA,WAAAC,GACA,QAAAE,EACA,aAAAG,GACA,kBAAAS,GACA,UAAAG,GACA,kBAAAC,GACA,WAAAC,GACA,UAAAG,GACA,YAAAS,GACA,gBAAAG,GACA,aAAAE,GACA,SAAAC,GACA,OAAAC,GACA,SAAAG,GACA,eAAAC,GACA,cAAAG,GACA,QAAAE,GACA,iBAAAC,GACA,iBAAAM,GACA,cAAAC,GACA,qBAAAC,GACA,aAAAG,GACA,gBAAAE,GACA,uBAAAC,GACA,uBAAAE,GACA,sBAAAC,GACA,wBAAAC,GACA,mBAAAM,GACA,iCAAAE,EACF,C","sources":["webpack://pro-react-admin/./node_modules/zrender/lib/canvas/Layer.js","webpack://pro-react-admin/./node_modules/zrender/lib/canvas/Painter.js","webpack://pro-react-admin/./node_modules/echarts/lib/renderer/installCanvasRenderer.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/SVGPathRebuilder.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/mapStyleToAttrs.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/core.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/cssClassId.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/cssAnimation.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/cssEmphasis.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/graphic.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/domapi.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/patch.js","webpack://pro-react-admin/./node_modules/zrender/lib/svg/Painter.js","webpack://pro-react-admin/./node_modules/echarts/lib/renderer/installSVGRenderer.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/LineSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/labelHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/Symbol.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/SymbolDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/helper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/lineAnimationDiff.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/poly.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/CoordinateSystem.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/LineView.js","webpack://pro-react-admin/./node_modules/echarts/lib/layout/points.js","webpack://pro-react-admin/./node_modules/echarts/lib/processor/dataSample.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/line/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/BaseBarSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/BarSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/util/shape/sausage.js","webpack://pro-react-admin/./node_modules/echarts/lib/label/sectorLabel.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/sectorHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/BarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/pieLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/processor/dataFilter.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/labelLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/PieView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/LegendVisualProvider.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/PieSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/processor/negativeDataFilter.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/pie/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/scatter/ScatterSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/LargeSymbolDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/scatter/ScatterView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/GridModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/AxisModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/axisDefault.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/axisCommonTypes.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/axisModelCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/Cartesian.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/Cartesian2D.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/Axis2D.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/axisAlignTicks.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/Grid.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/AxisBuilder.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/modelHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/AxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/axisSplitHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/CartesianAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/grid/installSimple.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/scatter/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/radarLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/backwardCompat.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/RadarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/RadarSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/radar/RadarModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/radar/RadarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/radar/IndicatorAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/radar/Radar.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/radar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/radar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/interactionMutex.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/RoamController.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/roamHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/cursorHelper.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/parseXML.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/parseSVG.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/GeoSVGResource.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/fix/nanhai.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/fix/textCoord.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/fix/diaoyuIsland.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/GeoJSONResource.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/geoSourceManager.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/MapDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/MapView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/MapSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/mapDataStatistic.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/mapSymbolLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/View.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/Geo.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/geoCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/GeoModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/action/roamHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/geo/GeoView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/geo/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/map/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/layoutHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/TreeView.js","webpack://pro-react-admin/./node_modules/echarts/lib/data/helper/linkSeriesData.js","webpack://pro-react-admin/./node_modules/echarts/lib/data/Tree.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/treeHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/TreeSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/traversalHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/treeLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/treeVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/treeAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/tree/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/treemapAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/enableAriaDecalForTree.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/TreemapSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/Breadcrumb.js","webpack://pro-react-admin/./node_modules/echarts/lib/util/animation.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/TreemapView.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/VisualMapping.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/treemapVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/treemapLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/treemap/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/categoryFilter.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/categoryVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/edgeVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/multipleGraphEdgeHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/simpleLayoutHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/simpleLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/graphHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/circularLayoutHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/circularLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/forceHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/forceLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/createView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/LinePath.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/Line.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/LineDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/adjustEdge.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/GraphView.js","webpack://pro-react-admin/./node_modules/echarts/lib/data/Graph.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/createGraphFromNodeEdge.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/GraphSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/graph/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/gauge/PointerPath.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/gauge/GaugeView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/gauge/GaugeSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/gauge/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/funnel/FunnelView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/funnel/FunnelSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/funnel/funnelLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/funnel/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/parallel/ParallelView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/parallel/ParallelSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/parallel/parallelVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/parallelPreprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/parallel/ParallelView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/ParallelModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/ParallelAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/sliderMove.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/Parallel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/parallelCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/parallel/AxisModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/BrushController.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/brushHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/ParallelAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/parallelAxisAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/parallel/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/parallel/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/SankeyView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/SankeySeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/sankeyLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/sankeyVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sankey/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/whiskerBoxCommon.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/BoxplotSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/BoxplotView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/boxplotLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/prepareBoxplotData.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/boxplotTransform.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/boxplot/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/CandlestickView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/CandlestickSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/candlestickVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/candlestickLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/candlestick/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/EffectSymbol.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/effectScatter/EffectScatterView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/effectScatter/EffectScatterSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/effectScatter/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/EffectLine.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/Polyline.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/EffectPolyline.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/helper/LargeLineDraw.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/linesLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/LinesView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/LinesSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/linesVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/lines/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/heatmap/HeatmapLayer.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/heatmap/HeatmapView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/heatmap/HeatmapSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/heatmap/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/PictorialBarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/PictorialBarSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/bar/installPictorialBar.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/themeRiver/ThemeRiverView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/themeRiver/ThemeRiverSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/themeRiver/themeRiverLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/themeRiver/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/SunburstPiece.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/sunburstAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/SunburstView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/SunburstSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/sunburstLayout.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/sunburstVisual.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/sunburst/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/custom/CustomSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/cartesian/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/geo/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/calendar/prepareCustom.js","webpack://pro-react-admin/./node_modules/echarts/lib/util/styleCompat.js","webpack://pro-react-admin/./node_modules/echarts/lib/animation/customGraphicTransition.js","webpack://pro-react-admin/./node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/custom/CustomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/chart/custom/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/viewHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/AxisPointerModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/globalListener.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/AxisPointerView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/axisTrigger.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/grid/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/PolarAxisPointer.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/PolarModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/AxisModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/RadiusAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/AngleAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/Polar.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/polar/polarCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/AngleAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/RadiusAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/layout/barPolar.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/polar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/singleAxisHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axis/SingleAxisView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/AxisModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/SingleAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/Single.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/single/singleCreator.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/axisPointer/SingleAxisPointer.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/singleAxis/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/calendar/CalendarModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/calendar/CalendarView.js","webpack://pro-react-admin/./node_modules/echarts/lib/coord/calendar/Calendar.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/calendar/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/graphic/GraphicModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/graphic/GraphicView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/graphic/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/helper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/DataZoomModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/SelectZoomModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/DataZoomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/SelectZoomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/AxisProxy.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/dataZoomAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/installCommon.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/installDataZoomSelect.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/featureManager.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/ToolboxModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/listComponent.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/ToolboxView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/SaveAsImage.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/MagicType.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/DataView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/history.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/Restore.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/helper/BrushTargetManager.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/DataZoom.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/TooltipModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/helper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/TooltipRichContent.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/TooltipView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/tooltip/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/visualSolution.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/selector.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/visualEncoding.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/BrushView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/BrushModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/toolbox/feature/Brush.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/brush/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/title/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/TimelineModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/SliderTimelineModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/TimelineView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/TimelineAxis.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/SliderTimelineView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/timelineAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/timeline/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/checkMarkerInSeries.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkerModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkPointModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/markerHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkerView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkPointView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/installMarkPoint.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkLineModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkLineView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/installMarkLine.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkAreaModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/MarkAreaView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/marker/installMarkArea.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/LegendModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/LegendView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/legendFilter.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/legendAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/installLegendPlain.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/ScrollableLegendView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/scrollableLegendAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/installLegendScroll.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/legend/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/roams.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/InsideZoomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/SliderZoomView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataZoom/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/visualDefault.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/VisualMapModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/ContinuousModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/VisualMapView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/helper.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/ContinuousView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/visualMapAction.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/visualEncoding.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/installCommon.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/installVisualMapContinuous.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/PiecewiseModel.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/PiecewiseView.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/installVisualMapPiecewise.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/visualMap/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/visual/aria.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/aria/preprocessor.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/aria/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/util/conditionalExpression.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/transform/filterTransform.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/transform/sortTransform.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/transform/install.js","webpack://pro-react-admin/./node_modules/echarts/lib/component/dataset/install.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/convertPath.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/dividePath.js","webpack://pro-react-admin/./node_modules/zrender/lib/tool/morphPath.js","webpack://pro-react-admin/./node_modules/echarts/lib/animation/morphTransitionHelper.js","webpack://pro-react-admin/./node_modules/echarts/lib/animation/universalTransition.js","webpack://pro-react-admin/./node_modules/echarts/index.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/helper/pick.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/helper/is-function.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/helper/is-string.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/core.js","webpack://pro-react-admin/./node_modules/echarts-for-react/esm/index.js","webpack://pro-react-admin/./src/components/stateless/FixTabPanel/index.jsx","webpack://pro-react-admin/./src/pages/echarts/index.jsx","webpack://pro-react-admin/./node_modules/fast-deep-equal/index.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/constant.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/debounce.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/id.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/index.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/sensorPool.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/sensors/index.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/sensors/object.js","webpack://pro-react-admin/./node_modules/size-sensor/lib/sensors/resizeObserver.js","webpack://pro-react-admin/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://pro-react-admin/./node_modules/@babel/runtime/helpers/toPrimitive.js","webpack://pro-react-admin/./node_modules/@babel/runtime/helpers/toPropertyKey.js","webpack://pro-react-admin/./node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["import { __extends } from \"tslib\";\nimport * as util from '../core/util.js';\nimport { devicePixelRatio } from '../config.js';\nimport Eventful from '../core/Eventful.js';\nimport { getCanvasGradient } from './helper.js';\nimport { createCanvasPattern } from './graphic.js';\nimport BoundingRect from '../core/BoundingRect.js';\nimport { REDRAW_BIT } from '../graphic/constants.js';\nimport { platformApi } from '../core/platform.js';\nfunction createDom(id, painter, dpr) {\n var newDom = platformApi.createCanvas();\n var width = painter.getWidth();\n var height = painter.getHeight();\n var newDomStyle = newDom.style;\n if (newDomStyle) {\n newDomStyle.position = 'absolute';\n newDomStyle.left = '0';\n newDomStyle.top = '0';\n newDomStyle.width = width + 'px';\n newDomStyle.height = height + 'px';\n newDom.setAttribute('data-zr-dom-id', id);\n }\n newDom.width = width * dpr;\n newDom.height = height * dpr;\n return newDom;\n}\n;\nvar Layer = (function (_super) {\n __extends(Layer, _super);\n function Layer(id, painter, dpr) {\n var _this = _super.call(this) || this;\n _this.motionBlur = false;\n _this.lastFrameAlpha = 0.7;\n _this.dpr = 1;\n _this.virtual = false;\n _this.config = {};\n _this.incremental = false;\n _this.zlevel = 0;\n _this.maxRepaintRectCount = 5;\n _this.__dirty = true;\n _this.__firstTimePaint = true;\n _this.__used = false;\n _this.__drawIndex = 0;\n _this.__startIndex = 0;\n _this.__endIndex = 0;\n _this.__prevStartIndex = null;\n _this.__prevEndIndex = null;\n var dom;\n dpr = dpr || devicePixelRatio;\n if (typeof id === 'string') {\n dom = createDom(id, painter, dpr);\n }\n else if (util.isObject(id)) {\n dom = id;\n id = dom.id;\n }\n _this.id = id;\n _this.dom = dom;\n var domStyle = dom.style;\n if (domStyle) {\n util.disableUserSelect(dom);\n dom.onselectstart = function () { return false; };\n domStyle.padding = '0';\n domStyle.margin = '0';\n domStyle.borderWidth = '0';\n }\n _this.painter = painter;\n _this.dpr = dpr;\n return _this;\n }\n Layer.prototype.getElementCount = function () {\n return this.__endIndex - this.__startIndex;\n };\n Layer.prototype.afterBrush = function () {\n this.__prevStartIndex = this.__startIndex;\n this.__prevEndIndex = this.__endIndex;\n };\n Layer.prototype.initContext = function () {\n this.ctx = this.dom.getContext('2d');\n this.ctx.dpr = this.dpr;\n };\n Layer.prototype.setUnpainted = function () {\n this.__firstTimePaint = true;\n };\n Layer.prototype.createBackBuffer = function () {\n var dpr = this.dpr;\n this.domBack = createDom('back-' + this.id, this.painter, dpr);\n this.ctxBack = this.domBack.getContext('2d');\n if (dpr !== 1) {\n this.ctxBack.scale(dpr, dpr);\n }\n };\n Layer.prototype.createRepaintRects = function (displayList, prevList, viewWidth, viewHeight) {\n if (this.__firstTimePaint) {\n this.__firstTimePaint = false;\n return null;\n }\n var mergedRepaintRects = [];\n var maxRepaintRectCount = this.maxRepaintRectCount;\n var full = false;\n var pendingRect = new BoundingRect(0, 0, 0, 0);\n function addRectToMergePool(rect) {\n if (!rect.isFinite() || rect.isZero()) {\n return;\n }\n if (mergedRepaintRects.length === 0) {\n var boundingRect = new BoundingRect(0, 0, 0, 0);\n boundingRect.copy(rect);\n mergedRepaintRects.push(boundingRect);\n }\n else {\n var isMerged = false;\n var minDeltaArea = Infinity;\n var bestRectToMergeIdx = 0;\n for (var i = 0; i < mergedRepaintRects.length; ++i) {\n var mergedRect = mergedRepaintRects[i];\n if (mergedRect.intersect(rect)) {\n var pendingRect_1 = new BoundingRect(0, 0, 0, 0);\n pendingRect_1.copy(mergedRect);\n pendingRect_1.union(rect);\n mergedRepaintRects[i] = pendingRect_1;\n isMerged = true;\n break;\n }\n else if (full) {\n pendingRect.copy(rect);\n pendingRect.union(mergedRect);\n var aArea = rect.width * rect.height;\n var bArea = mergedRect.width * mergedRect.height;\n var pendingArea = pendingRect.width * pendingRect.height;\n var deltaArea = pendingArea - aArea - bArea;\n if (deltaArea < minDeltaArea) {\n minDeltaArea = deltaArea;\n bestRectToMergeIdx = i;\n }\n }\n }\n if (full) {\n mergedRepaintRects[bestRectToMergeIdx].union(rect);\n isMerged = true;\n }\n if (!isMerged) {\n var boundingRect = new BoundingRect(0, 0, 0, 0);\n boundingRect.copy(rect);\n mergedRepaintRects.push(boundingRect);\n }\n if (!full) {\n full = mergedRepaintRects.length >= maxRepaintRectCount;\n }\n }\n }\n for (var i = this.__startIndex; i < this.__endIndex; ++i) {\n var el = displayList[i];\n if (el) {\n var shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true);\n var prevRect = el.__isRendered && ((el.__dirty & REDRAW_BIT) || !shouldPaint)\n ? el.getPrevPaintRect()\n : null;\n if (prevRect) {\n addRectToMergePool(prevRect);\n }\n var curRect = shouldPaint && ((el.__dirty & REDRAW_BIT) || !el.__isRendered)\n ? el.getPaintRect()\n : null;\n if (curRect) {\n addRectToMergePool(curRect);\n }\n }\n }\n for (var i = this.__prevStartIndex; i < this.__prevEndIndex; ++i) {\n var el = prevList[i];\n var shouldPaint = el && el.shouldBePainted(viewWidth, viewHeight, true, true);\n if (el && (!shouldPaint || !el.__zr) && el.__isRendered) {\n var prevRect = el.getPrevPaintRect();\n if (prevRect) {\n addRectToMergePool(prevRect);\n }\n }\n }\n var hasIntersections;\n do {\n hasIntersections = false;\n for (var i = 0; i < mergedRepaintRects.length;) {\n if (mergedRepaintRects[i].isZero()) {\n mergedRepaintRects.splice(i, 1);\n continue;\n }\n for (var j = i + 1; j < mergedRepaintRects.length;) {\n if (mergedRepaintRects[i].intersect(mergedRepaintRects[j])) {\n hasIntersections = true;\n mergedRepaintRects[i].union(mergedRepaintRects[j]);\n mergedRepaintRects.splice(j, 1);\n }\n else {\n j++;\n }\n }\n i++;\n }\n } while (hasIntersections);\n this._paintRects = mergedRepaintRects;\n return mergedRepaintRects;\n };\n Layer.prototype.debugGetPaintRects = function () {\n return (this._paintRects || []).slice();\n };\n Layer.prototype.resize = function (width, height) {\n var dpr = this.dpr;\n var dom = this.dom;\n var domStyle = dom.style;\n var domBack = this.domBack;\n if (domStyle) {\n domStyle.width = width + 'px';\n domStyle.height = height + 'px';\n }\n dom.width = width * dpr;\n dom.height = height * dpr;\n if (domBack) {\n domBack.width = width * dpr;\n domBack.height = height * dpr;\n if (dpr !== 1) {\n this.ctxBack.scale(dpr, dpr);\n }\n }\n };\n Layer.prototype.clear = function (clearAll, clearColor, repaintRects) {\n var dom = this.dom;\n var ctx = this.ctx;\n var width = dom.width;\n var height = dom.height;\n clearColor = clearColor || this.clearColor;\n var haveMotionBLur = this.motionBlur && !clearAll;\n var lastFrameAlpha = this.lastFrameAlpha;\n var dpr = this.dpr;\n var self = this;\n if (haveMotionBLur) {\n if (!this.domBack) {\n this.createBackBuffer();\n }\n this.ctxBack.globalCompositeOperation = 'copy';\n this.ctxBack.drawImage(dom, 0, 0, width / dpr, height / dpr);\n }\n var domBack = this.domBack;\n function doClear(x, y, width, height) {\n ctx.clearRect(x, y, width, height);\n if (clearColor && clearColor !== 'transparent') {\n var clearColorGradientOrPattern = void 0;\n if (util.isGradientObject(clearColor)) {\n var shouldCache = clearColor.global || (clearColor.__width === width\n && clearColor.__height === height);\n clearColorGradientOrPattern = shouldCache\n && clearColor.__canvasGradient\n || getCanvasGradient(ctx, clearColor, {\n x: 0,\n y: 0,\n width: width,\n height: height\n });\n clearColor.__canvasGradient = clearColorGradientOrPattern;\n clearColor.__width = width;\n clearColor.__height = height;\n }\n else if (util.isImagePatternObject(clearColor)) {\n clearColor.scaleX = clearColor.scaleX || dpr;\n clearColor.scaleY = clearColor.scaleY || dpr;\n clearColorGradientOrPattern = createCanvasPattern(ctx, clearColor, {\n dirty: function () {\n self.setUnpainted();\n self.painter.refresh();\n }\n });\n }\n ctx.save();\n ctx.fillStyle = clearColorGradientOrPattern || clearColor;\n ctx.fillRect(x, y, width, height);\n ctx.restore();\n }\n if (haveMotionBLur) {\n ctx.save();\n ctx.globalAlpha = lastFrameAlpha;\n ctx.drawImage(domBack, x, y, width, height);\n ctx.restore();\n }\n }\n ;\n if (!repaintRects || haveMotionBLur) {\n doClear(0, 0, width, height);\n }\n else if (repaintRects.length) {\n util.each(repaintRects, function (rect) {\n doClear(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr);\n });\n }\n };\n return Layer;\n}(Eventful));\nexport default Layer;\n","import { devicePixelRatio } from '../config.js';\nimport * as util from '../core/util.js';\nimport Layer from './Layer.js';\nimport requestAnimationFrame from '../animation/requestAnimationFrame.js';\nimport env from '../core/env.js';\nimport { brush, brushSingle } from './graphic.js';\nimport { REDRAW_BIT } from '../graphic/constants.js';\nimport { getSize } from './helper.js';\nvar HOVER_LAYER_ZLEVEL = 1e5;\nvar CANVAS_ZLEVEL = 314159;\nvar EL_AFTER_INCREMENTAL_INC = 0.01;\nvar INCREMENTAL_INC = 0.001;\nfunction isLayerValid(layer) {\n if (!layer) {\n return false;\n }\n if (layer.__builtin__) {\n return true;\n }\n if (typeof (layer.resize) !== 'function'\n || typeof (layer.refresh) !== 'function') {\n return false;\n }\n return true;\n}\nfunction createRoot(width, height) {\n var domRoot = document.createElement('div');\n domRoot.style.cssText = [\n 'position:relative',\n 'width:' + width + 'px',\n 'height:' + height + 'px',\n 'padding:0',\n 'margin:0',\n 'border-width:0'\n ].join(';') + ';';\n return domRoot;\n}\nvar CanvasPainter = (function () {\n function CanvasPainter(root, storage, opts, id) {\n this.type = 'canvas';\n this._zlevelList = [];\n this._prevDisplayList = [];\n this._layers = {};\n this._layerConfig = {};\n this._needsManuallyCompositing = false;\n this.type = 'canvas';\n var singleCanvas = !root.nodeName\n || root.nodeName.toUpperCase() === 'CANVAS';\n this._opts = opts = util.extend({}, opts || {});\n this.dpr = opts.devicePixelRatio || devicePixelRatio;\n this._singleCanvas = singleCanvas;\n this.root = root;\n var rootStyle = root.style;\n if (rootStyle) {\n util.disableUserSelect(root);\n root.innerHTML = '';\n }\n this.storage = storage;\n var zlevelList = this._zlevelList;\n this._prevDisplayList = [];\n var layers = this._layers;\n if (!singleCanvas) {\n this._width = getSize(root, 0, opts);\n this._height = getSize(root, 1, opts);\n var domRoot = this._domRoot = createRoot(this._width, this._height);\n root.appendChild(domRoot);\n }\n else {\n var rootCanvas = root;\n var width = rootCanvas.width;\n var height = rootCanvas.height;\n if (opts.width != null) {\n width = opts.width;\n }\n if (opts.height != null) {\n height = opts.height;\n }\n this.dpr = opts.devicePixelRatio || 1;\n rootCanvas.width = width * this.dpr;\n rootCanvas.height = height * this.dpr;\n this._width = width;\n this._height = height;\n var mainLayer = new Layer(rootCanvas, this, this.dpr);\n mainLayer.__builtin__ = true;\n mainLayer.initContext();\n layers[CANVAS_ZLEVEL] = mainLayer;\n mainLayer.zlevel = CANVAS_ZLEVEL;\n zlevelList.push(CANVAS_ZLEVEL);\n this._domRoot = root;\n }\n }\n CanvasPainter.prototype.getType = function () {\n return 'canvas';\n };\n CanvasPainter.prototype.isSingleCanvas = function () {\n return this._singleCanvas;\n };\n CanvasPainter.prototype.getViewportRoot = function () {\n return this._domRoot;\n };\n CanvasPainter.prototype.getViewportRootOffset = function () {\n var viewportRoot = this.getViewportRoot();\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n };\n CanvasPainter.prototype.refresh = function (paintAll) {\n var list = this.storage.getDisplayList(true);\n var prevList = this._prevDisplayList;\n var zlevelList = this._zlevelList;\n this._redrawId = Math.random();\n this._paintList(list, prevList, paintAll, this._redrawId);\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (!layer.__builtin__ && layer.refresh) {\n var clearColor = i === 0 ? this._backgroundColor : null;\n layer.refresh(clearColor);\n }\n }\n if (this._opts.useDirtyRect) {\n this._prevDisplayList = list.slice();\n }\n return this;\n };\n CanvasPainter.prototype.refreshHover = function () {\n this._paintHoverList(this.storage.getDisplayList(false));\n };\n CanvasPainter.prototype._paintHoverList = function (list) {\n var len = list.length;\n var hoverLayer = this._hoverlayer;\n hoverLayer && hoverLayer.clear();\n if (!len) {\n return;\n }\n var scope = {\n inHover: true,\n viewWidth: this._width,\n viewHeight: this._height\n };\n var ctx;\n for (var i = 0; i < len; i++) {\n var el = list[i];\n if (el.__inHover) {\n if (!hoverLayer) {\n hoverLayer = this._hoverlayer = this.getLayer(HOVER_LAYER_ZLEVEL);\n }\n if (!ctx) {\n ctx = hoverLayer.ctx;\n ctx.save();\n }\n brush(ctx, el, scope, i === len - 1);\n }\n }\n if (ctx) {\n ctx.restore();\n }\n };\n CanvasPainter.prototype.getHoverLayer = function () {\n return this.getLayer(HOVER_LAYER_ZLEVEL);\n };\n CanvasPainter.prototype.paintOne = function (ctx, el) {\n brushSingle(ctx, el);\n };\n CanvasPainter.prototype._paintList = function (list, prevList, paintAll, redrawId) {\n if (this._redrawId !== redrawId) {\n return;\n }\n paintAll = paintAll || false;\n this._updateLayerStatus(list);\n var _a = this._doPaintList(list, prevList, paintAll), finished = _a.finished, needsRefreshHover = _a.needsRefreshHover;\n if (this._needsManuallyCompositing) {\n this._compositeManually();\n }\n if (needsRefreshHover) {\n this._paintHoverList(list);\n }\n if (!finished) {\n var self_1 = this;\n requestAnimationFrame(function () {\n self_1._paintList(list, prevList, paintAll, redrawId);\n });\n }\n else {\n this.eachLayer(function (layer) {\n layer.afterBrush && layer.afterBrush();\n });\n }\n };\n CanvasPainter.prototype._compositeManually = function () {\n var ctx = this.getLayer(CANVAS_ZLEVEL).ctx;\n var width = this._domRoot.width;\n var height = this._domRoot.height;\n ctx.clearRect(0, 0, width, height);\n this.eachBuiltinLayer(function (layer) {\n if (layer.virtual) {\n ctx.drawImage(layer.dom, 0, 0, width, height);\n }\n });\n };\n CanvasPainter.prototype._doPaintList = function (list, prevList, paintAll) {\n var _this = this;\n var layerList = [];\n var useDirtyRect = this._opts.useDirtyRect;\n for (var zi = 0; zi < this._zlevelList.length; zi++) {\n var zlevel = this._zlevelList[zi];\n var layer = this._layers[zlevel];\n if (layer.__builtin__\n && layer !== this._hoverlayer\n && (layer.__dirty || paintAll)) {\n layerList.push(layer);\n }\n }\n var finished = true;\n var needsRefreshHover = false;\n var _loop_1 = function (k) {\n var layer = layerList[k];\n var ctx = layer.ctx;\n var repaintRects = useDirtyRect\n && layer.createRepaintRects(list, prevList, this_1._width, this_1._height);\n var start = paintAll ? layer.__startIndex : layer.__drawIndex;\n var useTimer = !paintAll && layer.incremental && Date.now;\n var startTime = useTimer && Date.now();\n var clearColor = layer.zlevel === this_1._zlevelList[0]\n ? this_1._backgroundColor : null;\n if (layer.__startIndex === layer.__endIndex) {\n layer.clear(false, clearColor, repaintRects);\n }\n else if (start === layer.__startIndex) {\n var firstEl = list[start];\n if (!firstEl.incremental || !firstEl.notClear || paintAll) {\n layer.clear(false, clearColor, repaintRects);\n }\n }\n if (start === -1) {\n console.error('For some unknown reason. drawIndex is -1');\n start = layer.__startIndex;\n }\n var i;\n var repaint = function (repaintRect) {\n var scope = {\n inHover: false,\n allClipped: false,\n prevEl: null,\n viewWidth: _this._width,\n viewHeight: _this._height\n };\n for (i = start; i < layer.__endIndex; i++) {\n var el = list[i];\n if (el.__inHover) {\n needsRefreshHover = true;\n }\n _this._doPaintEl(el, layer, useDirtyRect, repaintRect, scope, i === layer.__endIndex - 1);\n if (useTimer) {\n var dTime = Date.now() - startTime;\n if (dTime > 15) {\n break;\n }\n }\n }\n if (scope.prevElClipPaths) {\n ctx.restore();\n }\n };\n if (repaintRects) {\n if (repaintRects.length === 0) {\n i = layer.__endIndex;\n }\n else {\n var dpr = this_1.dpr;\n for (var r = 0; r < repaintRects.length; ++r) {\n var rect = repaintRects[r];\n ctx.save();\n ctx.beginPath();\n ctx.rect(rect.x * dpr, rect.y * dpr, rect.width * dpr, rect.height * dpr);\n ctx.clip();\n repaint(rect);\n ctx.restore();\n }\n }\n }\n else {\n ctx.save();\n repaint();\n ctx.restore();\n }\n layer.__drawIndex = i;\n if (layer.__drawIndex < layer.__endIndex) {\n finished = false;\n }\n };\n var this_1 = this;\n for (var k = 0; k < layerList.length; k++) {\n _loop_1(k);\n }\n if (env.wxa) {\n util.each(this._layers, function (layer) {\n if (layer && layer.ctx && layer.ctx.draw) {\n layer.ctx.draw();\n }\n });\n }\n return {\n finished: finished,\n needsRefreshHover: needsRefreshHover\n };\n };\n CanvasPainter.prototype._doPaintEl = function (el, currentLayer, useDirtyRect, repaintRect, scope, isLast) {\n var ctx = currentLayer.ctx;\n if (useDirtyRect) {\n var paintRect = el.getPaintRect();\n if (!repaintRect || paintRect && paintRect.intersect(repaintRect)) {\n brush(ctx, el, scope, isLast);\n el.setPrevPaintRect(paintRect);\n }\n }\n else {\n brush(ctx, el, scope, isLast);\n }\n };\n CanvasPainter.prototype.getLayer = function (zlevel, virtual) {\n if (this._singleCanvas && !this._needsManuallyCompositing) {\n zlevel = CANVAS_ZLEVEL;\n }\n var layer = this._layers[zlevel];\n if (!layer) {\n layer = new Layer('zr_' + zlevel, this, this.dpr);\n layer.zlevel = zlevel;\n layer.__builtin__ = true;\n if (this._layerConfig[zlevel]) {\n util.merge(layer, this._layerConfig[zlevel], true);\n }\n else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {\n util.merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);\n }\n if (virtual) {\n layer.virtual = virtual;\n }\n this.insertLayer(zlevel, layer);\n layer.initContext();\n }\n return layer;\n };\n CanvasPainter.prototype.insertLayer = function (zlevel, layer) {\n var layersMap = this._layers;\n var zlevelList = this._zlevelList;\n var len = zlevelList.length;\n var domRoot = this._domRoot;\n var prevLayer = null;\n var i = -1;\n if (layersMap[zlevel]) {\n if (process.env.NODE_ENV !== 'production') {\n util.logError('ZLevel ' + zlevel + ' has been used already');\n }\n return;\n }\n if (!isLayerValid(layer)) {\n if (process.env.NODE_ENV !== 'production') {\n util.logError('Layer of zlevel ' + zlevel + ' is not valid');\n }\n return;\n }\n if (len > 0 && zlevel > zlevelList[0]) {\n for (i = 0; i < len - 1; i++) {\n if (zlevelList[i] < zlevel\n && zlevelList[i + 1] > zlevel) {\n break;\n }\n }\n prevLayer = layersMap[zlevelList[i]];\n }\n zlevelList.splice(i + 1, 0, zlevel);\n layersMap[zlevel] = layer;\n if (!layer.virtual) {\n if (prevLayer) {\n var prevDom = prevLayer.dom;\n if (prevDom.nextSibling) {\n domRoot.insertBefore(layer.dom, prevDom.nextSibling);\n }\n else {\n domRoot.appendChild(layer.dom);\n }\n }\n else {\n if (domRoot.firstChild) {\n domRoot.insertBefore(layer.dom, domRoot.firstChild);\n }\n else {\n domRoot.appendChild(layer.dom);\n }\n }\n }\n layer.painter || (layer.painter = this);\n };\n CanvasPainter.prototype.eachLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n cb.call(context, this._layers[z], z);\n }\n };\n CanvasPainter.prototype.eachBuiltinLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (layer.__builtin__) {\n cb.call(context, layer, z);\n }\n }\n };\n CanvasPainter.prototype.eachOtherLayer = function (cb, context) {\n var zlevelList = this._zlevelList;\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (!layer.__builtin__) {\n cb.call(context, layer, z);\n }\n }\n };\n CanvasPainter.prototype.getLayers = function () {\n return this._layers;\n };\n CanvasPainter.prototype._updateLayerStatus = function (list) {\n this.eachBuiltinLayer(function (layer, z) {\n layer.__dirty = layer.__used = false;\n });\n function updatePrevLayer(idx) {\n if (prevLayer) {\n if (prevLayer.__endIndex !== idx) {\n prevLayer.__dirty = true;\n }\n prevLayer.__endIndex = idx;\n }\n }\n if (this._singleCanvas) {\n for (var i_1 = 1; i_1 < list.length; i_1++) {\n var el = list[i_1];\n if (el.zlevel !== list[i_1 - 1].zlevel || el.incremental) {\n this._needsManuallyCompositing = true;\n break;\n }\n }\n }\n var prevLayer = null;\n var incrementalLayerCount = 0;\n var prevZlevel;\n var i;\n for (i = 0; i < list.length; i++) {\n var el = list[i];\n var zlevel = el.zlevel;\n var layer = void 0;\n if (prevZlevel !== zlevel) {\n prevZlevel = zlevel;\n incrementalLayerCount = 0;\n }\n if (el.incremental) {\n layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);\n layer.incremental = true;\n incrementalLayerCount = 1;\n }\n else {\n layer = this.getLayer(zlevel + (incrementalLayerCount > 0 ? EL_AFTER_INCREMENTAL_INC : 0), this._needsManuallyCompositing);\n }\n if (!layer.__builtin__) {\n util.logError('ZLevel ' + zlevel + ' has been used by unkown layer ' + layer.id);\n }\n if (layer !== prevLayer) {\n layer.__used = true;\n if (layer.__startIndex !== i) {\n layer.__dirty = true;\n }\n layer.__startIndex = i;\n if (!layer.incremental) {\n layer.__drawIndex = i;\n }\n else {\n layer.__drawIndex = -1;\n }\n updatePrevLayer(i);\n prevLayer = layer;\n }\n if ((el.__dirty & REDRAW_BIT) && !el.__inHover) {\n layer.__dirty = true;\n if (layer.incremental && layer.__drawIndex < 0) {\n layer.__drawIndex = i;\n }\n }\n }\n updatePrevLayer(i);\n this.eachBuiltinLayer(function (layer, z) {\n if (!layer.__used && layer.getElementCount() > 0) {\n layer.__dirty = true;\n layer.__startIndex = layer.__endIndex = layer.__drawIndex = 0;\n }\n if (layer.__dirty && layer.__drawIndex < 0) {\n layer.__drawIndex = layer.__startIndex;\n }\n });\n };\n CanvasPainter.prototype.clear = function () {\n this.eachBuiltinLayer(this._clearLayer);\n return this;\n };\n CanvasPainter.prototype._clearLayer = function (layer) {\n layer.clear();\n };\n CanvasPainter.prototype.setBackgroundColor = function (backgroundColor) {\n this._backgroundColor = backgroundColor;\n util.each(this._layers, function (layer) {\n layer.setUnpainted();\n });\n };\n CanvasPainter.prototype.configLayer = function (zlevel, config) {\n if (config) {\n var layerConfig = this._layerConfig;\n if (!layerConfig[zlevel]) {\n layerConfig[zlevel] = config;\n }\n else {\n util.merge(layerConfig[zlevel], config, true);\n }\n for (var i = 0; i < this._zlevelList.length; i++) {\n var _zlevel = this._zlevelList[i];\n if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {\n var layer = this._layers[_zlevel];\n util.merge(layer, layerConfig[zlevel], true);\n }\n }\n }\n };\n CanvasPainter.prototype.delLayer = function (zlevel) {\n var layers = this._layers;\n var zlevelList = this._zlevelList;\n var layer = layers[zlevel];\n if (!layer) {\n return;\n }\n layer.dom.parentNode.removeChild(layer.dom);\n delete layers[zlevel];\n zlevelList.splice(util.indexOf(zlevelList, zlevel), 1);\n };\n CanvasPainter.prototype.resize = function (width, height) {\n if (!this._domRoot.style) {\n if (width == null || height == null) {\n return;\n }\n this._width = width;\n this._height = height;\n this.getLayer(CANVAS_ZLEVEL).resize(width, height);\n }\n else {\n var domRoot = this._domRoot;\n domRoot.style.display = 'none';\n var opts = this._opts;\n var root = this.root;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n width = getSize(root, 0, opts);\n height = getSize(root, 1, opts);\n domRoot.style.display = '';\n if (this._width !== width || height !== this._height) {\n domRoot.style.width = width + 'px';\n domRoot.style.height = height + 'px';\n for (var id in this._layers) {\n if (this._layers.hasOwnProperty(id)) {\n this._layers[id].resize(width, height);\n }\n }\n this.refresh(true);\n }\n this._width = width;\n this._height = height;\n }\n return this;\n };\n CanvasPainter.prototype.clearLayer = function (zlevel) {\n var layer = this._layers[zlevel];\n if (layer) {\n layer.clear();\n }\n };\n CanvasPainter.prototype.dispose = function () {\n this.root.innerHTML = '';\n this.root =\n this.storage =\n this._domRoot =\n this._layers = null;\n };\n CanvasPainter.prototype.getRenderedCanvas = function (opts) {\n opts = opts || {};\n if (this._singleCanvas && !this._compositeManually) {\n return this._layers[CANVAS_ZLEVEL].dom;\n }\n var imageLayer = new Layer('image', this, opts.pixelRatio || this.dpr);\n imageLayer.initContext();\n imageLayer.clear(false, opts.backgroundColor || this._backgroundColor);\n var ctx = imageLayer.ctx;\n if (opts.pixelRatio <= this.dpr) {\n this.refresh();\n var width_1 = imageLayer.dom.width;\n var height_1 = imageLayer.dom.height;\n this.eachLayer(function (layer) {\n if (layer.__builtin__) {\n ctx.drawImage(layer.dom, 0, 0, width_1, height_1);\n }\n else if (layer.renderToCanvas) {\n ctx.save();\n layer.renderToCanvas(ctx);\n ctx.restore();\n }\n });\n }\n else {\n var scope = {\n inHover: false,\n viewWidth: this._width,\n viewHeight: this._height\n };\n var displayList = this.storage.getDisplayList(true);\n for (var i = 0, len = displayList.length; i < len; i++) {\n var el = displayList[i];\n brush(ctx, el, scope, i === len - 1);\n }\n }\n return imageLayer.dom;\n };\n CanvasPainter.prototype.getWidth = function () {\n return this._width;\n };\n CanvasPainter.prototype.getHeight = function () {\n return this._height;\n };\n return CanvasPainter;\n}());\nexport default CanvasPainter;\n;\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CanvasPainter from 'zrender/lib/canvas/Painter.js';\nexport function install(registers) {\n registers.registerPainter('canvas', CanvasPainter);\n}","import { isAroundZero } from './helper.js';\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI = Math.PI;\nvar PI2 = Math.PI * 2;\nvar degree = 180 / PI;\nvar SVGPathRebuilder = (function () {\n function SVGPathRebuilder() {\n }\n SVGPathRebuilder.prototype.reset = function (precision) {\n this._start = true;\n this._d = [];\n this._str = '';\n this._p = Math.pow(10, precision || 4);\n };\n SVGPathRebuilder.prototype.moveTo = function (x, y) {\n this._add('M', x, y);\n };\n SVGPathRebuilder.prototype.lineTo = function (x, y) {\n this._add('L', x, y);\n };\n SVGPathRebuilder.prototype.bezierCurveTo = function (x, y, x2, y2, x3, y3) {\n this._add('C', x, y, x2, y2, x3, y3);\n };\n SVGPathRebuilder.prototype.quadraticCurveTo = function (x, y, x2, y2) {\n this._add('Q', x, y, x2, y2);\n };\n SVGPathRebuilder.prototype.arc = function (cx, cy, r, startAngle, endAngle, anticlockwise) {\n this.ellipse(cx, cy, r, r, 0, startAngle, endAngle, anticlockwise);\n };\n SVGPathRebuilder.prototype.ellipse = function (cx, cy, rx, ry, psi, startAngle, endAngle, anticlockwise) {\n var dTheta = endAngle - startAngle;\n var clockwise = !anticlockwise;\n var dThetaPositive = Math.abs(dTheta);\n var isCircle = isAroundZero(dThetaPositive - PI2)\n || (clockwise ? dTheta >= PI2 : -dTheta >= PI2);\n var unifiedTheta = dTheta > 0 ? dTheta % PI2 : (dTheta % PI2 + PI2);\n var large = false;\n if (isCircle) {\n large = true;\n }\n else if (isAroundZero(dThetaPositive)) {\n large = false;\n }\n else {\n large = (unifiedTheta >= PI) === !!clockwise;\n }\n var x0 = cx + rx * mathCos(startAngle);\n var y0 = cy + ry * mathSin(startAngle);\n if (this._start) {\n this._add('M', x0, y0);\n }\n var xRot = Math.round(psi * degree);\n if (isCircle) {\n var p = 1 / this._p;\n var dTheta_1 = (clockwise ? 1 : -1) * (PI2 - p);\n this._add('A', rx, ry, xRot, 1, +clockwise, cx + rx * mathCos(startAngle + dTheta_1), cy + ry * mathSin(startAngle + dTheta_1));\n if (p > 1e-2) {\n this._add('A', rx, ry, xRot, 0, +clockwise, x0, y0);\n }\n }\n else {\n var x = cx + rx * mathCos(endAngle);\n var y = cy + ry * mathSin(endAngle);\n this._add('A', rx, ry, xRot, +large, +clockwise, x, y);\n }\n };\n SVGPathRebuilder.prototype.rect = function (x, y, w, h) {\n this._add('M', x, y);\n this._add('l', w, 0);\n this._add('l', 0, h);\n this._add('l', -w, 0);\n this._add('Z');\n };\n SVGPathRebuilder.prototype.closePath = function () {\n if (this._d.length > 0) {\n this._add('Z');\n }\n };\n SVGPathRebuilder.prototype._add = function (cmd, a, b, c, d, e, f, g, h) {\n var vals = [];\n var p = this._p;\n for (var i = 1; i < arguments.length; i++) {\n var val = arguments[i];\n if (isNaN(val)) {\n this._invalid = true;\n return;\n }\n vals.push(Math.round(val * p) / p);\n }\n this._d.push(cmd + vals.join(' '));\n this._start = cmd === 'Z';\n };\n SVGPathRebuilder.prototype.generateStr = function () {\n this._str = this._invalid ? '' : this._d.join('');\n this._d = [];\n };\n SVGPathRebuilder.prototype.getStr = function () {\n return this._str;\n };\n return SVGPathRebuilder;\n}());\nexport default SVGPathRebuilder;\n","import { DEFAULT_PATH_STYLE } from '../graphic/Path.js';\nimport ZRImage from '../graphic/Image.js';\nimport { getLineDash } from '../canvas/dashStyle.js';\nimport { map } from '../core/util.js';\nimport { normalizeColor } from './helper.js';\nvar NONE = 'none';\nvar mathRound = Math.round;\nfunction pathHasFill(style) {\n var fill = style.fill;\n return fill != null && fill !== NONE;\n}\nfunction pathHasStroke(style) {\n var stroke = style.stroke;\n return stroke != null && stroke !== NONE;\n}\nvar strokeProps = ['lineCap', 'miterLimit', 'lineJoin'];\nvar svgStrokeProps = map(strokeProps, function (prop) { return \"stroke-\" + prop.toLowerCase(); });\nexport default function mapStyleToAttrs(updateAttr, style, el, forceUpdate) {\n var opacity = style.opacity == null ? 1 : style.opacity;\n if (el instanceof ZRImage) {\n updateAttr('opacity', opacity);\n return;\n }\n if (pathHasFill(style)) {\n var fill = normalizeColor(style.fill);\n updateAttr('fill', fill.color);\n var fillOpacity = style.fillOpacity != null\n ? style.fillOpacity * fill.opacity * opacity\n : fill.opacity * opacity;\n if (forceUpdate || fillOpacity < 1) {\n updateAttr('fill-opacity', fillOpacity);\n }\n }\n else {\n updateAttr('fill', NONE);\n }\n if (pathHasStroke(style)) {\n var stroke = normalizeColor(style.stroke);\n updateAttr('stroke', stroke.color);\n var strokeScale = style.strokeNoScale\n ? el.getLineScale()\n : 1;\n var strokeWidth = (strokeScale ? (style.lineWidth || 0) / strokeScale : 0);\n var strokeOpacity = style.strokeOpacity != null\n ? style.strokeOpacity * stroke.opacity * opacity\n : stroke.opacity * opacity;\n var strokeFirst = style.strokeFirst;\n if (forceUpdate || strokeWidth !== 1) {\n updateAttr('stroke-width', strokeWidth);\n }\n if (forceUpdate || strokeFirst) {\n updateAttr('paint-order', strokeFirst ? 'stroke' : 'fill');\n }\n if (forceUpdate || strokeOpacity < 1) {\n updateAttr('stroke-opacity', strokeOpacity);\n }\n if (style.lineDash) {\n var _a = getLineDash(el), lineDash = _a[0], lineDashOffset = _a[1];\n if (lineDash) {\n lineDashOffset = mathRound(lineDashOffset || 0);\n updateAttr('stroke-dasharray', lineDash.join(','));\n if (lineDashOffset || forceUpdate) {\n updateAttr('stroke-dashoffset', lineDashOffset);\n }\n }\n }\n else if (forceUpdate) {\n updateAttr('stroke-dasharray', NONE);\n }\n for (var i = 0; i < strokeProps.length; i++) {\n var propName = strokeProps[i];\n if (forceUpdate || style[propName] !== DEFAULT_PATH_STYLE[propName]) {\n var val = style[propName] || DEFAULT_PATH_STYLE[propName];\n val && updateAttr(svgStrokeProps[i], val);\n }\n }\n }\n else if (forceUpdate) {\n updateAttr('stroke', NONE);\n }\n}\n","import { keys, map } from '../core/util.js';\nimport { encodeHTML } from '../core/dom.js';\nexport var SVGNS = 'http://www.w3.org/2000/svg';\nexport var XLINKNS = 'http://www.w3.org/1999/xlink';\nexport var XMLNS = 'http://www.w3.org/2000/xmlns/';\nexport var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';\nexport var META_DATA_PREFIX = 'ecmeta_';\nexport function createElement(name) {\n return document.createElementNS(SVGNS, name);\n}\n;\nexport function createVNode(tag, key, attrs, children, text) {\n return {\n tag: tag,\n attrs: attrs || {},\n children: children,\n text: text,\n key: key\n };\n}\nfunction createElementOpen(name, attrs) {\n var attrsStr = [];\n if (attrs) {\n for (var key in attrs) {\n var val = attrs[key];\n var part = key;\n if (val === false) {\n continue;\n }\n else if (val !== true && val != null) {\n part += \"=\\\"\" + val + \"\\\"\";\n }\n attrsStr.push(part);\n }\n }\n return \"<\" + name + \" \" + attrsStr.join(' ') + \">\";\n}\nfunction createElementClose(name) {\n return \"\";\n}\nexport function vNodeToString(el, opts) {\n opts = opts || {};\n var S = opts.newline ? '\\n' : '';\n function convertElToString(el) {\n var children = el.children, tag = el.tag, attrs = el.attrs, text = el.text;\n return createElementOpen(tag, attrs)\n + (tag !== 'style' ? encodeHTML(text) : text || '')\n + (children ? \"\" + S + map(children, function (child) { return convertElToString(child); }).join(S) + S : '')\n + createElementClose(tag);\n }\n return convertElToString(el);\n}\nexport function getCssString(selectorNodes, animationNodes, opts) {\n opts = opts || {};\n var S = opts.newline ? '\\n' : '';\n var bracketBegin = \" {\" + S;\n var bracketEnd = S + \"}\";\n var selectors = map(keys(selectorNodes), function (className) {\n return className + bracketBegin + map(keys(selectorNodes[className]), function (attrName) {\n return attrName + \":\" + selectorNodes[className][attrName] + \";\";\n }).join(S) + bracketEnd;\n }).join(S);\n var animations = map(keys(animationNodes), function (animationName) {\n return \"@keyframes \" + animationName + bracketBegin + map(keys(animationNodes[animationName]), function (percent) {\n return percent + bracketBegin + map(keys(animationNodes[animationName][percent]), function (attrName) {\n var val = animationNodes[animationName][percent][attrName];\n if (attrName === 'd') {\n val = \"path(\\\"\" + val + \"\\\")\";\n }\n return attrName + \":\" + val + \";\";\n }).join(S) + bracketEnd;\n }).join(S) + bracketEnd;\n }).join(S);\n if (!selectors && !animations) {\n return '';\n }\n return [''].join(S);\n}\nexport function createBrushScope(zrId) {\n return {\n zrId: zrId,\n shadowCache: {},\n patternCache: {},\n gradientCache: {},\n clipPathCache: {},\n defs: {},\n cssNodes: {},\n cssAnims: {},\n cssStyleCache: {},\n cssAnimIdx: 0,\n shadowIdx: 0,\n gradientIdx: 0,\n patternIdx: 0,\n clipPathIdx: 0\n };\n}\nexport function createSVGVNode(width, height, children, useViewBox) {\n return createVNode('svg', 'root', {\n 'width': width,\n 'height': height,\n 'xmlns': SVGNS,\n 'xmlns:xlink': XLINKNS,\n 'version': '1.1',\n 'baseProfile': 'full',\n 'viewBox': useViewBox ? \"0 0 \" + width + \" \" + height : false\n }, children);\n}\n","var cssClassIdx = 0;\nexport function getClassId() {\n return cssClassIdx++;\n}\n","import { copyTransform } from '../core/Transformable.js';\nimport { createBrushScope } from './core.js';\nimport SVGPathRebuilder from './SVGPathRebuilder.js';\nimport PathProxy from '../core/PathProxy.js';\nimport { getPathPrecision, getSRTTransformString } from './helper.js';\nimport { each, extend, filter, isNumber, isString, keys } from '../core/util.js';\nimport CompoundPath from '../graphic/CompoundPath.js';\nimport { createCubicEasingFunc } from '../animation/cubicEasing.js';\nimport { getClassId } from './cssClassId.js';\nexport var EASING_MAP = {\n cubicIn: '0.32,0,0.67,0',\n cubicOut: '0.33,1,0.68,1',\n cubicInOut: '0.65,0,0.35,1',\n quadraticIn: '0.11,0,0.5,0',\n quadraticOut: '0.5,1,0.89,1',\n quadraticInOut: '0.45,0,0.55,1',\n quarticIn: '0.5,0,0.75,0',\n quarticOut: '0.25,1,0.5,1',\n quarticInOut: '0.76,0,0.24,1',\n quinticIn: '0.64,0,0.78,0',\n quinticOut: '0.22,1,0.36,1',\n quinticInOut: '0.83,0,0.17,1',\n sinusoidalIn: '0.12,0,0.39,0',\n sinusoidalOut: '0.61,1,0.88,1',\n sinusoidalInOut: '0.37,0,0.63,1',\n exponentialIn: '0.7,0,0.84,0',\n exponentialOut: '0.16,1,0.3,1',\n exponentialInOut: '0.87,0,0.13,1',\n circularIn: '0.55,0,1,0.45',\n circularOut: '0,0.55,0.45,1',\n circularInOut: '0.85,0,0.15,1'\n};\nvar transformOriginKey = 'transform-origin';\nfunction buildPathString(el, kfShape, path) {\n var shape = extend({}, el.shape);\n extend(shape, kfShape);\n el.buildPath(path, shape);\n var svgPathBuilder = new SVGPathRebuilder();\n svgPathBuilder.reset(getPathPrecision(el));\n path.rebuildPath(svgPathBuilder, 1);\n svgPathBuilder.generateStr();\n return svgPathBuilder.getStr();\n}\nfunction setTransformOrigin(target, transform) {\n var originX = transform.originX, originY = transform.originY;\n if (originX || originY) {\n target[transformOriginKey] = originX + \"px \" + originY + \"px\";\n }\n}\nexport var ANIMATE_STYLE_MAP = {\n fill: 'fill',\n opacity: 'opacity',\n lineWidth: 'stroke-width',\n lineDashOffset: 'stroke-dashoffset'\n};\nfunction addAnimation(cssAnim, scope) {\n var animationName = scope.zrId + '-ani-' + scope.cssAnimIdx++;\n scope.cssAnims[animationName] = cssAnim;\n return animationName;\n}\nfunction createCompoundPathCSSAnimation(el, attrs, scope) {\n var paths = el.shape.paths;\n var composedAnim = {};\n var cssAnimationCfg;\n var cssAnimationName;\n each(paths, function (path) {\n var subScope = createBrushScope(scope.zrId);\n subScope.animation = true;\n createCSSAnimation(path, {}, subScope, true);\n var cssAnims = subScope.cssAnims;\n var cssNodes = subScope.cssNodes;\n var animNames = keys(cssAnims);\n var len = animNames.length;\n if (!len) {\n return;\n }\n cssAnimationName = animNames[len - 1];\n var lastAnim = cssAnims[cssAnimationName];\n for (var percent in lastAnim) {\n var kf = lastAnim[percent];\n composedAnim[percent] = composedAnim[percent] || { d: '' };\n composedAnim[percent].d += kf.d || '';\n }\n for (var className in cssNodes) {\n var val = cssNodes[className].animation;\n if (val.indexOf(cssAnimationName) >= 0) {\n cssAnimationCfg = val;\n }\n }\n });\n if (!cssAnimationCfg) {\n return;\n }\n attrs.d = false;\n var animationName = addAnimation(composedAnim, scope);\n return cssAnimationCfg.replace(cssAnimationName, animationName);\n}\nfunction getEasingFunc(easing) {\n return isString(easing)\n ? EASING_MAP[easing]\n ? \"cubic-bezier(\" + EASING_MAP[easing] + \")\"\n : createCubicEasingFunc(easing) ? easing : ''\n : '';\n}\nexport function createCSSAnimation(el, attrs, scope, onlyShape) {\n var animators = el.animators;\n var len = animators.length;\n var cssAnimations = [];\n if (el instanceof CompoundPath) {\n var animationCfg = createCompoundPathCSSAnimation(el, attrs, scope);\n if (animationCfg) {\n cssAnimations.push(animationCfg);\n }\n else if (!len) {\n return;\n }\n }\n else if (!len) {\n return;\n }\n var groupAnimators = {};\n for (var i = 0; i < len; i++) {\n var animator = animators[i];\n var cfgArr = [animator.getMaxTime() / 1000 + 's'];\n var easing = getEasingFunc(animator.getClip().easing);\n var delay = animator.getDelay();\n if (easing) {\n cfgArr.push(easing);\n }\n else {\n cfgArr.push('linear');\n }\n if (delay) {\n cfgArr.push(delay / 1000 + 's');\n }\n if (animator.getLoop()) {\n cfgArr.push('infinite');\n }\n var cfg = cfgArr.join(' ');\n groupAnimators[cfg] = groupAnimators[cfg] || [cfg, []];\n groupAnimators[cfg][1].push(animator);\n }\n function createSingleCSSAnimation(groupAnimator) {\n var animators = groupAnimator[1];\n var len = animators.length;\n var transformKfs = {};\n var shapeKfs = {};\n var finalKfs = {};\n var animationTimingFunctionAttrName = 'animation-timing-function';\n function saveAnimatorTrackToCssKfs(animator, cssKfs, toCssAttrName) {\n var tracks = animator.getTracks();\n var maxTime = animator.getMaxTime();\n for (var k = 0; k < tracks.length; k++) {\n var track = tracks[k];\n if (track.needsAnimate()) {\n var kfs = track.keyframes;\n var attrName = track.propName;\n toCssAttrName && (attrName = toCssAttrName(attrName));\n if (attrName) {\n for (var i = 0; i < kfs.length; i++) {\n var kf = kfs[i];\n var percent = Math.round(kf.time / maxTime * 100) + '%';\n var kfEasing = getEasingFunc(kf.easing);\n var rawValue = kf.rawValue;\n if (isString(rawValue) || isNumber(rawValue)) {\n cssKfs[percent] = cssKfs[percent] || {};\n cssKfs[percent][attrName] = kf.rawValue;\n if (kfEasing) {\n cssKfs[percent][animationTimingFunctionAttrName] = kfEasing;\n }\n }\n }\n }\n }\n }\n }\n for (var i = 0; i < len; i++) {\n var animator = animators[i];\n var targetProp = animator.targetName;\n if (!targetProp) {\n !onlyShape && saveAnimatorTrackToCssKfs(animator, transformKfs);\n }\n else if (targetProp === 'shape') {\n saveAnimatorTrackToCssKfs(animator, shapeKfs);\n }\n }\n for (var percent in transformKfs) {\n var transform = {};\n copyTransform(transform, el);\n extend(transform, transformKfs[percent]);\n var str = getSRTTransformString(transform);\n var timingFunction = transformKfs[percent][animationTimingFunctionAttrName];\n finalKfs[percent] = str ? {\n transform: str\n } : {};\n setTransformOrigin(finalKfs[percent], transform);\n if (timingFunction) {\n finalKfs[percent][animationTimingFunctionAttrName] = timingFunction;\n }\n }\n ;\n var path;\n var canAnimateShape = true;\n for (var percent in shapeKfs) {\n finalKfs[percent] = finalKfs[percent] || {};\n var isFirst = !path;\n var timingFunction = shapeKfs[percent][animationTimingFunctionAttrName];\n if (isFirst) {\n path = new PathProxy();\n }\n var len_1 = path.len();\n path.reset();\n finalKfs[percent].d = buildPathString(el, shapeKfs[percent], path);\n var newLen = path.len();\n if (!isFirst && len_1 !== newLen) {\n canAnimateShape = false;\n break;\n }\n if (timingFunction) {\n finalKfs[percent][animationTimingFunctionAttrName] = timingFunction;\n }\n }\n ;\n if (!canAnimateShape) {\n for (var percent in finalKfs) {\n delete finalKfs[percent].d;\n }\n }\n if (!onlyShape) {\n for (var i = 0; i < len; i++) {\n var animator = animators[i];\n var targetProp = animator.targetName;\n if (targetProp === 'style') {\n saveAnimatorTrackToCssKfs(animator, finalKfs, function (propName) { return ANIMATE_STYLE_MAP[propName]; });\n }\n }\n }\n var percents = keys(finalKfs);\n var allTransformOriginSame = true;\n var transformOrigin;\n for (var i = 1; i < percents.length; i++) {\n var p0 = percents[i - 1];\n var p1 = percents[i];\n if (finalKfs[p0][transformOriginKey] !== finalKfs[p1][transformOriginKey]) {\n allTransformOriginSame = false;\n break;\n }\n transformOrigin = finalKfs[p0][transformOriginKey];\n }\n if (allTransformOriginSame && transformOrigin) {\n for (var percent in finalKfs) {\n if (finalKfs[percent][transformOriginKey]) {\n delete finalKfs[percent][transformOriginKey];\n }\n }\n attrs[transformOriginKey] = transformOrigin;\n }\n if (filter(percents, function (percent) { return keys(finalKfs[percent]).length > 0; }).length) {\n var animationName = addAnimation(finalKfs, scope);\n return animationName + \" \" + groupAnimator[0] + \" both\";\n }\n }\n for (var key in groupAnimators) {\n var animationCfg = createSingleCSSAnimation(groupAnimators[key]);\n if (animationCfg) {\n cssAnimations.push(animationCfg);\n }\n }\n if (cssAnimations.length) {\n var className = scope.zrId + '-cls-' + getClassId();\n scope.cssNodes['.' + className] = {\n animation: cssAnimations.join(',')\n };\n attrs[\"class\"] = className;\n }\n}\n","import { liftColor } from '../tool/color.js';\nimport { getClassId } from './cssClassId.js';\nexport function createCSSEmphasis(el, attrs, scope) {\n if (!el.ignore) {\n if (el.isSilent()) {\n var style = {\n 'pointer-events': 'none'\n };\n setClassAttribute(style, attrs, scope, true);\n }\n else {\n var emphasisStyle = el.states.emphasis && el.states.emphasis.style\n ? el.states.emphasis.style\n : {};\n var fill = emphasisStyle.fill;\n if (!fill) {\n var normalFill = el.style && el.style.fill;\n var selectFill = el.states.select\n && el.states.select.style\n && el.states.select.style.fill;\n var fromFill = el.currentStates.indexOf('select') >= 0\n ? (selectFill || normalFill)\n : normalFill;\n if (fromFill) {\n fill = liftColor(fromFill);\n }\n }\n var lineWidth = emphasisStyle.lineWidth;\n if (lineWidth) {\n var scaleX = (!emphasisStyle.strokeNoScale && el.transform)\n ? el.transform[0]\n : 1;\n lineWidth = lineWidth / scaleX;\n }\n var style = {\n cursor: 'pointer'\n };\n if (fill) {\n style.fill = fill;\n }\n if (emphasisStyle.stroke) {\n style.stroke = emphasisStyle.stroke;\n }\n if (lineWidth) {\n style['stroke-width'] = lineWidth;\n }\n setClassAttribute(style, attrs, scope, true);\n }\n }\n}\nfunction setClassAttribute(style, attrs, scope, withHover) {\n var styleKey = JSON.stringify(style);\n var className = scope.cssStyleCache[styleKey];\n if (!className) {\n className = scope.zrId + '-cls-' + getClassId();\n scope.cssStyleCache[styleKey] = className;\n scope.cssNodes['.' + className + (withHover ? ':hover' : '')] = style;\n }\n attrs[\"class\"] = attrs[\"class\"] ? (attrs[\"class\"] + ' ' + className) : className;\n}\n","import { adjustTextY, getIdURL, getMatrixStr, getPathPrecision, getShadowKey, getSRTTransformString, hasShadow, isAroundZero, isGradient, isImagePattern, isLinearGradient, isPattern, isRadialGradient, normalizeColor, round4, TEXT_ALIGN_TO_ANCHOR } from './helper.js';\nimport Path from '../graphic/Path.js';\nimport ZRImage from '../graphic/Image.js';\nimport { getLineHeight } from '../contain/text.js';\nimport TSpan from '../graphic/TSpan.js';\nimport SVGPathRebuilder from './SVGPathRebuilder.js';\nimport mapStyleToAttrs from './mapStyleToAttrs.js';\nimport { createVNode, vNodeToString, META_DATA_PREFIX } from './core.js';\nimport { assert, clone, isFunction, isString, logError, map, retrieve2 } from '../core/util.js';\nimport { createOrUpdateImage } from '../graphic/helper/image.js';\nimport { createCSSAnimation } from './cssAnimation.js';\nimport { hasSeparateFont, parseFontSize } from '../graphic/Text.js';\nimport { DEFAULT_FONT, DEFAULT_FONT_FAMILY } from '../core/platform.js';\nimport { createCSSEmphasis } from './cssEmphasis.js';\nimport { getElementSSRData } from '../zrender.js';\nvar round = Math.round;\nfunction isImageLike(val) {\n return val && isString(val.src);\n}\nfunction isCanvasLike(val) {\n return val && isFunction(val.toDataURL);\n}\nfunction setStyleAttrs(attrs, style, el, scope) {\n mapStyleToAttrs(function (key, val) {\n var isFillStroke = key === 'fill' || key === 'stroke';\n if (isFillStroke && isGradient(val)) {\n setGradient(style, attrs, key, scope);\n }\n else if (isFillStroke && isPattern(val)) {\n setPattern(el, attrs, key, scope);\n }\n else if (isFillStroke && val === 'none') {\n attrs[key] = 'transparent';\n }\n else {\n attrs[key] = val;\n }\n }, style, el, false);\n setShadow(el, attrs, scope);\n}\nfunction setMetaData(attrs, el) {\n var metaData = getElementSSRData(el);\n if (metaData) {\n metaData.each(function (val, key) {\n val != null && (attrs[(META_DATA_PREFIX + key).toLowerCase()] = val + '');\n });\n if (el.isSilent()) {\n attrs[META_DATA_PREFIX + 'silent'] = 'true';\n }\n }\n}\nfunction noRotateScale(m) {\n return isAroundZero(m[0] - 1)\n && isAroundZero(m[1])\n && isAroundZero(m[2])\n && isAroundZero(m[3] - 1);\n}\nfunction noTranslate(m) {\n return isAroundZero(m[4]) && isAroundZero(m[5]);\n}\nfunction setTransform(attrs, m, compress) {\n if (m && !(noTranslate(m) && noRotateScale(m))) {\n var mul = compress ? 10 : 1e4;\n attrs.transform = noRotateScale(m)\n ? \"translate(\" + round(m[4] * mul) / mul + \" \" + round(m[5] * mul) / mul + \")\" : getMatrixStr(m);\n }\n}\nfunction convertPolyShape(shape, attrs, mul) {\n var points = shape.points;\n var strArr = [];\n for (var i = 0; i < points.length; i++) {\n strArr.push(round(points[i][0] * mul) / mul);\n strArr.push(round(points[i][1] * mul) / mul);\n }\n attrs.points = strArr.join(' ');\n}\nfunction validatePolyShape(shape) {\n return !shape.smooth;\n}\nfunction createAttrsConvert(desc) {\n var normalizedDesc = map(desc, function (item) {\n return (typeof item === 'string' ? [item, item] : item);\n });\n return function (shape, attrs, mul) {\n for (var i = 0; i < normalizedDesc.length; i++) {\n var item = normalizedDesc[i];\n var val = shape[item[0]];\n if (val != null) {\n attrs[item[1]] = round(val * mul) / mul;\n }\n }\n };\n}\nvar builtinShapesDef = {\n circle: [createAttrsConvert(['cx', 'cy', 'r'])],\n polyline: [convertPolyShape, validatePolyShape],\n polygon: [convertPolyShape, validatePolyShape]\n};\nfunction hasShapeAnimation(el) {\n var animators = el.animators;\n for (var i = 0; i < animators.length; i++) {\n if (animators[i].targetName === 'shape') {\n return true;\n }\n }\n return false;\n}\nexport function brushSVGPath(el, scope) {\n var style = el.style;\n var shape = el.shape;\n var builtinShpDef = builtinShapesDef[el.type];\n var attrs = {};\n var needsAnimate = scope.animation;\n var svgElType = 'path';\n var strokePercent = el.style.strokePercent;\n var precision = (scope.compress && getPathPrecision(el)) || 4;\n if (builtinShpDef\n && !scope.willUpdate\n && !(builtinShpDef[1] && !builtinShpDef[1](shape))\n && !(needsAnimate && hasShapeAnimation(el))\n && !(strokePercent < 1)) {\n svgElType = el.type;\n var mul = Math.pow(10, precision);\n builtinShpDef[0](shape, attrs, mul);\n }\n else {\n var needBuildPath = !el.path || el.shapeChanged();\n if (!el.path) {\n el.createPathProxy();\n }\n var path = el.path;\n if (needBuildPath) {\n path.beginPath();\n el.buildPath(path, el.shape);\n el.pathUpdated();\n }\n var pathVersion = path.getVersion();\n var elExt = el;\n var svgPathBuilder = elExt.__svgPathBuilder;\n if (elExt.__svgPathVersion !== pathVersion\n || !svgPathBuilder\n || strokePercent !== elExt.__svgPathStrokePercent) {\n if (!svgPathBuilder) {\n svgPathBuilder = elExt.__svgPathBuilder = new SVGPathRebuilder();\n }\n svgPathBuilder.reset(precision);\n path.rebuildPath(svgPathBuilder, strokePercent);\n svgPathBuilder.generateStr();\n elExt.__svgPathVersion = pathVersion;\n elExt.__svgPathStrokePercent = strokePercent;\n }\n attrs.d = svgPathBuilder.getStr();\n }\n setTransform(attrs, el.transform);\n setStyleAttrs(attrs, style, el, scope);\n setMetaData(attrs, el);\n scope.animation && createCSSAnimation(el, attrs, scope);\n scope.emphasis && createCSSEmphasis(el, attrs, scope);\n return createVNode(svgElType, el.id + '', attrs);\n}\nexport function brushSVGImage(el, scope) {\n var style = el.style;\n var image = style.image;\n if (image && !isString(image)) {\n if (isImageLike(image)) {\n image = image.src;\n }\n else if (isCanvasLike(image)) {\n image = image.toDataURL();\n }\n }\n if (!image) {\n return;\n }\n var x = style.x || 0;\n var y = style.y || 0;\n var dw = style.width;\n var dh = style.height;\n var attrs = {\n href: image,\n width: dw,\n height: dh\n };\n if (x) {\n attrs.x = x;\n }\n if (y) {\n attrs.y = y;\n }\n setTransform(attrs, el.transform);\n setStyleAttrs(attrs, style, el, scope);\n setMetaData(attrs, el);\n scope.animation && createCSSAnimation(el, attrs, scope);\n return createVNode('image', el.id + '', attrs);\n}\n;\nexport function brushSVGTSpan(el, scope) {\n var style = el.style;\n var text = style.text;\n text != null && (text += '');\n if (!text || isNaN(style.x) || isNaN(style.y)) {\n return;\n }\n var font = style.font || DEFAULT_FONT;\n var x = style.x || 0;\n var y = adjustTextY(style.y || 0, getLineHeight(font), style.textBaseline);\n var textAlign = TEXT_ALIGN_TO_ANCHOR[style.textAlign]\n || style.textAlign;\n var attrs = {\n 'dominant-baseline': 'central',\n 'text-anchor': textAlign\n };\n if (hasSeparateFont(style)) {\n var separatedFontStr = '';\n var fontStyle = style.fontStyle;\n var fontSize = parseFontSize(style.fontSize);\n if (!parseFloat(fontSize)) {\n return;\n }\n var fontFamily = style.fontFamily || DEFAULT_FONT_FAMILY;\n var fontWeight = style.fontWeight;\n separatedFontStr += \"font-size:\" + fontSize + \";font-family:\" + fontFamily + \";\";\n if (fontStyle && fontStyle !== 'normal') {\n separatedFontStr += \"font-style:\" + fontStyle + \";\";\n }\n if (fontWeight && fontWeight !== 'normal') {\n separatedFontStr += \"font-weight:\" + fontWeight + \";\";\n }\n attrs.style = separatedFontStr;\n }\n else {\n attrs.style = \"font: \" + font;\n }\n if (text.match(/\\s/)) {\n attrs['xml:space'] = 'preserve';\n }\n if (x) {\n attrs.x = x;\n }\n if (y) {\n attrs.y = y;\n }\n setTransform(attrs, el.transform);\n setStyleAttrs(attrs, style, el, scope);\n setMetaData(attrs, el);\n scope.animation && createCSSAnimation(el, attrs, scope);\n return createVNode('text', el.id + '', attrs, undefined, text);\n}\nexport function brush(el, scope) {\n if (el instanceof Path) {\n return brushSVGPath(el, scope);\n }\n else if (el instanceof ZRImage) {\n return brushSVGImage(el, scope);\n }\n else if (el instanceof TSpan) {\n return brushSVGTSpan(el, scope);\n }\n}\nfunction setShadow(el, attrs, scope) {\n var style = el.style;\n if (hasShadow(style)) {\n var shadowKey = getShadowKey(el);\n var shadowCache = scope.shadowCache;\n var shadowId = shadowCache[shadowKey];\n if (!shadowId) {\n var globalScale = el.getGlobalScale();\n var scaleX = globalScale[0];\n var scaleY = globalScale[1];\n if (!scaleX || !scaleY) {\n return;\n }\n var offsetX = style.shadowOffsetX || 0;\n var offsetY = style.shadowOffsetY || 0;\n var blur_1 = style.shadowBlur;\n var _a = normalizeColor(style.shadowColor), opacity = _a.opacity, color = _a.color;\n var stdDx = blur_1 / 2 / scaleX;\n var stdDy = blur_1 / 2 / scaleY;\n var stdDeviation = stdDx + ' ' + stdDy;\n shadowId = scope.zrId + '-s' + scope.shadowIdx++;\n scope.defs[shadowId] = createVNode('filter', shadowId, {\n 'id': shadowId,\n 'x': '-100%',\n 'y': '-100%',\n 'width': '300%',\n 'height': '300%'\n }, [\n createVNode('feDropShadow', '', {\n 'dx': offsetX / scaleX,\n 'dy': offsetY / scaleY,\n 'stdDeviation': stdDeviation,\n 'flood-color': color,\n 'flood-opacity': opacity\n })\n ]);\n shadowCache[shadowKey] = shadowId;\n }\n attrs.filter = getIdURL(shadowId);\n }\n}\nexport function setGradient(style, attrs, target, scope) {\n var val = style[target];\n var gradientTag;\n var gradientAttrs = {\n 'gradientUnits': val.global\n ? 'userSpaceOnUse'\n : 'objectBoundingBox'\n };\n if (isLinearGradient(val)) {\n gradientTag = 'linearGradient';\n gradientAttrs.x1 = val.x;\n gradientAttrs.y1 = val.y;\n gradientAttrs.x2 = val.x2;\n gradientAttrs.y2 = val.y2;\n }\n else if (isRadialGradient(val)) {\n gradientTag = 'radialGradient';\n gradientAttrs.cx = retrieve2(val.x, 0.5);\n gradientAttrs.cy = retrieve2(val.y, 0.5);\n gradientAttrs.r = retrieve2(val.r, 0.5);\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logError('Illegal gradient type.');\n }\n return;\n }\n var colors = val.colorStops;\n var colorStops = [];\n for (var i = 0, len = colors.length; i < len; ++i) {\n var offset = round4(colors[i].offset) * 100 + '%';\n var stopColor = colors[i].color;\n var _a = normalizeColor(stopColor), color = _a.color, opacity = _a.opacity;\n var stopsAttrs = {\n 'offset': offset\n };\n stopsAttrs['stop-color'] = color;\n if (opacity < 1) {\n stopsAttrs['stop-opacity'] = opacity;\n }\n colorStops.push(createVNode('stop', i + '', stopsAttrs));\n }\n var gradientVNode = createVNode(gradientTag, '', gradientAttrs, colorStops);\n var gradientKey = vNodeToString(gradientVNode);\n var gradientCache = scope.gradientCache;\n var gradientId = gradientCache[gradientKey];\n if (!gradientId) {\n gradientId = scope.zrId + '-g' + scope.gradientIdx++;\n gradientCache[gradientKey] = gradientId;\n gradientAttrs.id = gradientId;\n scope.defs[gradientId] = createVNode(gradientTag, gradientId, gradientAttrs, colorStops);\n }\n attrs[target] = getIdURL(gradientId);\n}\nexport function setPattern(el, attrs, target, scope) {\n var val = el.style[target];\n var boundingRect = el.getBoundingRect();\n var patternAttrs = {};\n var repeat = val.repeat;\n var noRepeat = repeat === 'no-repeat';\n var repeatX = repeat === 'repeat-x';\n var repeatY = repeat === 'repeat-y';\n var child;\n if (isImagePattern(val)) {\n var imageWidth_1 = val.imageWidth;\n var imageHeight_1 = val.imageHeight;\n var imageSrc = void 0;\n var patternImage = val.image;\n if (isString(patternImage)) {\n imageSrc = patternImage;\n }\n else if (isImageLike(patternImage)) {\n imageSrc = patternImage.src;\n }\n else if (isCanvasLike(patternImage)) {\n imageSrc = patternImage.toDataURL();\n }\n if (typeof Image === 'undefined') {\n var errMsg = 'Image width/height must been given explictly in svg-ssr renderer.';\n assert(imageWidth_1, errMsg);\n assert(imageHeight_1, errMsg);\n }\n else if (imageWidth_1 == null || imageHeight_1 == null) {\n var setSizeToVNode_1 = function (vNode, img) {\n if (vNode) {\n var svgEl = vNode.elm;\n var width = imageWidth_1 || img.width;\n var height = imageHeight_1 || img.height;\n if (vNode.tag === 'pattern') {\n if (repeatX) {\n height = 1;\n width /= boundingRect.width;\n }\n else if (repeatY) {\n width = 1;\n height /= boundingRect.height;\n }\n }\n vNode.attrs.width = width;\n vNode.attrs.height = height;\n if (svgEl) {\n svgEl.setAttribute('width', width);\n svgEl.setAttribute('height', height);\n }\n }\n };\n var createdImage = createOrUpdateImage(imageSrc, null, el, function (img) {\n noRepeat || setSizeToVNode_1(patternVNode, img);\n setSizeToVNode_1(child, img);\n });\n if (createdImage && createdImage.width && createdImage.height) {\n imageWidth_1 = imageWidth_1 || createdImage.width;\n imageHeight_1 = imageHeight_1 || createdImage.height;\n }\n }\n child = createVNode('image', 'img', {\n href: imageSrc,\n width: imageWidth_1,\n height: imageHeight_1\n });\n patternAttrs.width = imageWidth_1;\n patternAttrs.height = imageHeight_1;\n }\n else if (val.svgElement) {\n child = clone(val.svgElement);\n patternAttrs.width = val.svgWidth;\n patternAttrs.height = val.svgHeight;\n }\n if (!child) {\n return;\n }\n var patternWidth;\n var patternHeight;\n if (noRepeat) {\n patternWidth = patternHeight = 1;\n }\n else if (repeatX) {\n patternHeight = 1;\n patternWidth = patternAttrs.width / boundingRect.width;\n }\n else if (repeatY) {\n patternWidth = 1;\n patternHeight = patternAttrs.height / boundingRect.height;\n }\n else {\n patternAttrs.patternUnits = 'userSpaceOnUse';\n }\n if (patternWidth != null && !isNaN(patternWidth)) {\n patternAttrs.width = patternWidth;\n }\n if (patternHeight != null && !isNaN(patternHeight)) {\n patternAttrs.height = patternHeight;\n }\n var patternTransform = getSRTTransformString(val);\n patternTransform && (patternAttrs.patternTransform = patternTransform);\n var patternVNode = createVNode('pattern', '', patternAttrs, [child]);\n var patternKey = vNodeToString(patternVNode);\n var patternCache = scope.patternCache;\n var patternId = patternCache[patternKey];\n if (!patternId) {\n patternId = scope.zrId + '-p' + scope.patternIdx++;\n patternCache[patternKey] = patternId;\n patternAttrs.id = patternId;\n patternVNode = scope.defs[patternId] = createVNode('pattern', patternId, patternAttrs, [child]);\n }\n attrs[target] = getIdURL(patternId);\n}\nexport function setClipPath(clipPath, attrs, scope) {\n var clipPathCache = scope.clipPathCache, defs = scope.defs;\n var clipPathId = clipPathCache[clipPath.id];\n if (!clipPathId) {\n clipPathId = scope.zrId + '-c' + scope.clipPathIdx++;\n var clipPathAttrs = {\n id: clipPathId\n };\n clipPathCache[clipPath.id] = clipPathId;\n defs[clipPathId] = createVNode('clipPath', clipPathId, clipPathAttrs, [brushSVGPath(clipPath, scope)]);\n }\n attrs['clip-path'] = getIdURL(clipPathId);\n}\n","export function createTextNode(text) {\n return document.createTextNode(text);\n}\nexport function createComment(text) {\n return document.createComment(text);\n}\nexport function insertBefore(parentNode, newNode, referenceNode) {\n parentNode.insertBefore(newNode, referenceNode);\n}\nexport function removeChild(node, child) {\n node.removeChild(child);\n}\nexport function appendChild(node, child) {\n node.appendChild(child);\n}\nexport function parentNode(node) {\n return node.parentNode;\n}\nexport function nextSibling(node) {\n return node.nextSibling;\n}\nexport function tagName(elm) {\n return elm.tagName;\n}\nexport function setTextContent(node, text) {\n node.textContent = text;\n}\nexport function getTextContent(node) {\n return node.textContent;\n}\nexport function isElement(node) {\n return node.nodeType === 1;\n}\nexport function isText(node) {\n return node.nodeType === 3;\n}\nexport function isComment(node) {\n return node.nodeType === 8;\n}\n","import { isArray, isObject } from '../core/util.js';\nimport { createElement, createVNode, XMLNS, XML_NAMESPACE, XLINKNS } from './core.js';\nimport * as api from './domapi.js';\nvar colonChar = 58;\nvar xChar = 120;\nvar emptyNode = createVNode('', '');\nfunction isUndef(s) {\n return s === undefined;\n}\nfunction isDef(s) {\n return s !== undefined;\n}\nfunction createKeyToOldIdx(children, beginIdx, endIdx) {\n var map = {};\n for (var i = beginIdx; i <= endIdx; ++i) {\n var key = children[i].key;\n if (key !== undefined) {\n if (process.env.NODE_ENV !== 'production') {\n if (map[key] != null) {\n console.error(\"Duplicate key \" + key);\n }\n }\n map[key] = i;\n }\n }\n return map;\n}\nfunction sameVnode(vnode1, vnode2) {\n var isSameKey = vnode1.key === vnode2.key;\n var isSameTag = vnode1.tag === vnode2.tag;\n return isSameTag && isSameKey;\n}\nfunction createElm(vnode) {\n var i;\n var children = vnode.children;\n var tag = vnode.tag;\n if (isDef(tag)) {\n var elm = (vnode.elm = createElement(tag));\n updateAttrs(emptyNode, vnode);\n if (isArray(children)) {\n for (i = 0; i < children.length; ++i) {\n var ch = children[i];\n if (ch != null) {\n api.appendChild(elm, createElm(ch));\n }\n }\n }\n else if (isDef(vnode.text) && !isObject(vnode.text)) {\n api.appendChild(elm, api.createTextNode(vnode.text));\n }\n }\n else {\n vnode.elm = api.createTextNode(vnode.text);\n }\n return vnode.elm;\n}\nfunction addVnodes(parentElm, before, vnodes, startIdx, endIdx) {\n for (; startIdx <= endIdx; ++startIdx) {\n var ch = vnodes[startIdx];\n if (ch != null) {\n api.insertBefore(parentElm, createElm(ch), before);\n }\n }\n}\nfunction removeVnodes(parentElm, vnodes, startIdx, endIdx) {\n for (; startIdx <= endIdx; ++startIdx) {\n var ch = vnodes[startIdx];\n if (ch != null) {\n if (isDef(ch.tag)) {\n var parent_1 = api.parentNode(ch.elm);\n api.removeChild(parent_1, ch.elm);\n }\n else {\n api.removeChild(parentElm, ch.elm);\n }\n }\n }\n}\nexport function updateAttrs(oldVnode, vnode) {\n var key;\n var elm = vnode.elm;\n var oldAttrs = oldVnode && oldVnode.attrs || {};\n var attrs = vnode.attrs || {};\n if (oldAttrs === attrs) {\n return;\n }\n for (key in attrs) {\n var cur = attrs[key];\n var old = oldAttrs[key];\n if (old !== cur) {\n if (cur === true) {\n elm.setAttribute(key, '');\n }\n else if (cur === false) {\n elm.removeAttribute(key);\n }\n else {\n if (key === 'style') {\n elm.style.cssText = cur;\n }\n else if (key.charCodeAt(0) !== xChar) {\n elm.setAttribute(key, cur);\n }\n else if (key === 'xmlns:xlink' || key === 'xmlns') {\n elm.setAttributeNS(XMLNS, key, cur);\n }\n else if (key.charCodeAt(3) === colonChar) {\n elm.setAttributeNS(XML_NAMESPACE, key, cur);\n }\n else if (key.charCodeAt(5) === colonChar) {\n elm.setAttributeNS(XLINKNS, key, cur);\n }\n else {\n elm.setAttribute(key, cur);\n }\n }\n }\n }\n for (key in oldAttrs) {\n if (!(key in attrs)) {\n elm.removeAttribute(key);\n }\n }\n}\nfunction updateChildren(parentElm, oldCh, newCh) {\n var oldStartIdx = 0;\n var newStartIdx = 0;\n var oldEndIdx = oldCh.length - 1;\n var oldStartVnode = oldCh[0];\n var oldEndVnode = oldCh[oldEndIdx];\n var newEndIdx = newCh.length - 1;\n var newStartVnode = newCh[0];\n var newEndVnode = newCh[newEndIdx];\n var oldKeyToIdx;\n var idxInOld;\n var elmToMove;\n var before;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n oldStartVnode = oldCh[++oldStartIdx];\n }\n else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n }\n else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n }\n else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldStartVnode, newStartVnode)) {\n patchVnode(oldStartVnode, newStartVnode);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else if (sameVnode(oldEndVnode, newEndVnode)) {\n patchVnode(oldEndVnode, newEndVnode);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldStartVnode, newEndVnode)) {\n patchVnode(oldStartVnode, newEndVnode);\n api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm));\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (sameVnode(oldEndVnode, newStartVnode)) {\n patchVnode(oldEndVnode, newStartVnode);\n api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else {\n if (isUndef(oldKeyToIdx)) {\n oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);\n }\n idxInOld = oldKeyToIdx[newStartVnode.key];\n if (isUndef(idxInOld)) {\n api.insertBefore(parentElm, createElm(newStartVnode), oldStartVnode.elm);\n }\n else {\n elmToMove = oldCh[idxInOld];\n if (elmToMove.tag !== newStartVnode.tag) {\n api.insertBefore(parentElm, createElm(newStartVnode), oldStartVnode.elm);\n }\n else {\n patchVnode(elmToMove, newStartVnode);\n oldCh[idxInOld] = undefined;\n api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);\n }\n }\n newStartVnode = newCh[++newStartIdx];\n }\n }\n if (oldStartIdx <= oldEndIdx || newStartIdx <= newEndIdx) {\n if (oldStartIdx > oldEndIdx) {\n before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm;\n addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx);\n }\n else {\n removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\n }\n }\n}\nfunction patchVnode(oldVnode, vnode) {\n var elm = (vnode.elm = oldVnode.elm);\n var oldCh = oldVnode.children;\n var ch = vnode.children;\n if (oldVnode === vnode) {\n return;\n }\n updateAttrs(oldVnode, vnode);\n if (isUndef(vnode.text)) {\n if (isDef(oldCh) && isDef(ch)) {\n if (oldCh !== ch) {\n updateChildren(elm, oldCh, ch);\n }\n }\n else if (isDef(ch)) {\n if (isDef(oldVnode.text)) {\n api.setTextContent(elm, '');\n }\n addVnodes(elm, null, ch, 0, ch.length - 1);\n }\n else if (isDef(oldCh)) {\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n }\n else if (isDef(oldVnode.text)) {\n api.setTextContent(elm, '');\n }\n }\n else if (oldVnode.text !== vnode.text) {\n if (isDef(oldCh)) {\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\n }\n api.setTextContent(elm, vnode.text);\n }\n}\nexport default function patch(oldVnode, vnode) {\n if (sameVnode(oldVnode, vnode)) {\n patchVnode(oldVnode, vnode);\n }\n else {\n var elm = oldVnode.elm;\n var parent_2 = api.parentNode(elm);\n createElm(vnode);\n if (parent_2 !== null) {\n api.insertBefore(parent_2, vnode.elm, api.nextSibling(elm));\n removeVnodes(parent_2, [oldVnode], 0, 0);\n }\n }\n return vnode;\n}\n","import { brush, setClipPath, setGradient, setPattern } from './graphic.js';\nimport { createElement, createVNode, vNodeToString, getCssString, createBrushScope, createSVGVNode } from './core.js';\nimport { normalizeColor, encodeBase64, isGradient, isPattern } from './helper.js';\nimport { extend, keys, logError, map, noop, retrieve2 } from '../core/util.js';\nimport patch, { updateAttrs } from './patch.js';\nimport { getSize } from '../canvas/helper.js';\nvar svgId = 0;\nvar SVGPainter = (function () {\n function SVGPainter(root, storage, opts) {\n this.type = 'svg';\n this.refreshHover = createMethodNotSupport('refreshHover');\n this.configLayer = createMethodNotSupport('configLayer');\n this.storage = storage;\n this._opts = opts = extend({}, opts);\n this.root = root;\n this._id = 'zr' + svgId++;\n this._oldVNode = createSVGVNode(opts.width, opts.height);\n if (root && !opts.ssr) {\n var viewport = this._viewport = document.createElement('div');\n viewport.style.cssText = 'position:relative;overflow:hidden';\n var svgDom = this._svgDom = this._oldVNode.elm = createElement('svg');\n updateAttrs(null, this._oldVNode);\n viewport.appendChild(svgDom);\n root.appendChild(viewport);\n }\n this.resize(opts.width, opts.height);\n }\n SVGPainter.prototype.getType = function () {\n return this.type;\n };\n SVGPainter.prototype.getViewportRoot = function () {\n return this._viewport;\n };\n SVGPainter.prototype.getViewportRootOffset = function () {\n var viewportRoot = this.getViewportRoot();\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n };\n SVGPainter.prototype.getSvgDom = function () {\n return this._svgDom;\n };\n SVGPainter.prototype.refresh = function () {\n if (this.root) {\n var vnode = this.renderToVNode({\n willUpdate: true\n });\n vnode.attrs.style = 'position:absolute;left:0;top:0;user-select:none';\n patch(this._oldVNode, vnode);\n this._oldVNode = vnode;\n }\n };\n SVGPainter.prototype.renderOneToVNode = function (el) {\n return brush(el, createBrushScope(this._id));\n };\n SVGPainter.prototype.renderToVNode = function (opts) {\n opts = opts || {};\n var list = this.storage.getDisplayList(true);\n var width = this._width;\n var height = this._height;\n var scope = createBrushScope(this._id);\n scope.animation = opts.animation;\n scope.willUpdate = opts.willUpdate;\n scope.compress = opts.compress;\n scope.emphasis = opts.emphasis;\n var children = [];\n var bgVNode = this._bgVNode = createBackgroundVNode(width, height, this._backgroundColor, scope);\n bgVNode && children.push(bgVNode);\n var mainVNode = !opts.compress\n ? (this._mainVNode = createVNode('g', 'main', {}, [])) : null;\n this._paintList(list, scope, mainVNode ? mainVNode.children : children);\n mainVNode && children.push(mainVNode);\n var defs = map(keys(scope.defs), function (id) { return scope.defs[id]; });\n if (defs.length) {\n children.push(createVNode('defs', 'defs', {}, defs));\n }\n if (opts.animation) {\n var animationCssStr = getCssString(scope.cssNodes, scope.cssAnims, { newline: true });\n if (animationCssStr) {\n var styleNode = createVNode('style', 'stl', {}, [], animationCssStr);\n children.push(styleNode);\n }\n }\n return createSVGVNode(width, height, children, opts.useViewBox);\n };\n SVGPainter.prototype.renderToString = function (opts) {\n opts = opts || {};\n return vNodeToString(this.renderToVNode({\n animation: retrieve2(opts.cssAnimation, true),\n emphasis: retrieve2(opts.cssEmphasis, true),\n willUpdate: false,\n compress: true,\n useViewBox: retrieve2(opts.useViewBox, true)\n }), { newline: true });\n };\n SVGPainter.prototype.setBackgroundColor = function (backgroundColor) {\n this._backgroundColor = backgroundColor;\n };\n SVGPainter.prototype.getSvgRoot = function () {\n return this._mainVNode && this._mainVNode.elm;\n };\n SVGPainter.prototype._paintList = function (list, scope, out) {\n var listLen = list.length;\n var clipPathsGroupsStack = [];\n var clipPathsGroupsStackDepth = 0;\n var currentClipPathGroup;\n var prevClipPaths;\n var clipGroupNodeIdx = 0;\n for (var i = 0; i < listLen; i++) {\n var displayable = list[i];\n if (!displayable.invisible) {\n var clipPaths = displayable.__clipPaths;\n var len = clipPaths && clipPaths.length || 0;\n var prevLen = prevClipPaths && prevClipPaths.length || 0;\n var lca = void 0;\n for (lca = Math.max(len - 1, prevLen - 1); lca >= 0; lca--) {\n if (clipPaths && prevClipPaths\n && clipPaths[lca] === prevClipPaths[lca]) {\n break;\n }\n }\n for (var i_1 = prevLen - 1; i_1 > lca; i_1--) {\n clipPathsGroupsStackDepth--;\n currentClipPathGroup = clipPathsGroupsStack[clipPathsGroupsStackDepth - 1];\n }\n for (var i_2 = lca + 1; i_2 < len; i_2++) {\n var groupAttrs = {};\n setClipPath(clipPaths[i_2], groupAttrs, scope);\n var g = createVNode('g', 'clip-g-' + clipGroupNodeIdx++, groupAttrs, []);\n (currentClipPathGroup ? currentClipPathGroup.children : out).push(g);\n clipPathsGroupsStack[clipPathsGroupsStackDepth++] = g;\n currentClipPathGroup = g;\n }\n prevClipPaths = clipPaths;\n var ret = brush(displayable, scope);\n if (ret) {\n (currentClipPathGroup ? currentClipPathGroup.children : out).push(ret);\n }\n }\n }\n };\n SVGPainter.prototype.resize = function (width, height) {\n var opts = this._opts;\n var root = this.root;\n var viewport = this._viewport;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n if (root && viewport) {\n viewport.style.display = 'none';\n width = getSize(root, 0, opts);\n height = getSize(root, 1, opts);\n viewport.style.display = '';\n }\n if (this._width !== width || this._height !== height) {\n this._width = width;\n this._height = height;\n if (viewport) {\n var viewportStyle = viewport.style;\n viewportStyle.width = width + 'px';\n viewportStyle.height = height + 'px';\n }\n if (!isPattern(this._backgroundColor)) {\n var svgDom = this._svgDom;\n if (svgDom) {\n svgDom.setAttribute('width', width);\n svgDom.setAttribute('height', height);\n }\n var bgEl = this._bgVNode && this._bgVNode.elm;\n if (bgEl) {\n bgEl.setAttribute('width', width);\n bgEl.setAttribute('height', height);\n }\n }\n else {\n this.refresh();\n }\n }\n };\n SVGPainter.prototype.getWidth = function () {\n return this._width;\n };\n SVGPainter.prototype.getHeight = function () {\n return this._height;\n };\n SVGPainter.prototype.dispose = function () {\n if (this.root) {\n this.root.innerHTML = '';\n }\n this._svgDom =\n this._viewport =\n this.storage =\n this._oldVNode =\n this._bgVNode =\n this._mainVNode = null;\n };\n SVGPainter.prototype.clear = function () {\n if (this._svgDom) {\n this._svgDom.innerHTML = null;\n }\n this._oldVNode = null;\n };\n SVGPainter.prototype.toDataURL = function (base64) {\n var str = this.renderToString();\n var prefix = 'data:image/svg+xml;';\n if (base64) {\n str = encodeBase64(str);\n return str && prefix + 'base64,' + str;\n }\n return prefix + 'charset=UTF-8,' + encodeURIComponent(str);\n };\n return SVGPainter;\n}());\nfunction createMethodNotSupport(method) {\n return function () {\n if (process.env.NODE_ENV !== 'production') {\n logError('In SVG mode painter not support method \"' + method + '\"');\n }\n };\n}\nfunction createBackgroundVNode(width, height, backgroundColor, scope) {\n var bgVNode;\n if (backgroundColor && backgroundColor !== 'none') {\n bgVNode = createVNode('rect', 'bg', {\n width: width,\n height: height,\n x: '0',\n y: '0'\n });\n if (isGradient(backgroundColor)) {\n setGradient({ fill: backgroundColor }, bgVNode.attrs, 'fill', scope);\n }\n else if (isPattern(backgroundColor)) {\n setPattern({\n style: {\n fill: backgroundColor\n },\n dirty: noop,\n getBoundingRect: function () { return ({ width: width, height: height }); }\n }, bgVNode.attrs, 'fill', scope);\n }\n else {\n var _a = normalizeColor(backgroundColor), color = _a.color, opacity = _a.opacity;\n bgVNode.attrs.fill = color;\n opacity < 1 && (bgVNode.attrs['fill-opacity'] = opacity);\n }\n }\n return bgVNode;\n}\nexport default SVGPainter;\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SVGPainter from 'zrender/lib/svg/Painter.js';\nexport function install(registers) {\n registers.registerPainter('svg', SVGPainter);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { Group } from '../../util/graphic.js';\nvar LineSeriesModel = /** @class */function (_super) {\n __extends(LineSeriesModel, _super);\n function LineSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LineSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n LineSeriesModel.prototype.getInitialData = function (option) {\n if (process.env.NODE_ENV !== 'production') {\n var coordSys = option.coordinateSystem;\n if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {\n throw new Error('Line not support coordinateSystem besides cartesian and polar');\n }\n }\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n LineSeriesModel.prototype.getLegendIcon = function (opt) {\n var group = new Group();\n var line = createSymbol('line', 0, opt.itemHeight / 2, opt.itemWidth, 0, opt.lineStyle.stroke, false);\n group.add(line);\n line.setStyle(opt.lineStyle);\n var visualType = this.getData().getVisual('symbol');\n var visualRotate = this.getData().getVisual('symbolRotate');\n var symbolType = visualType === 'none' ? 'circle' : visualType;\n // Symbol size is 80% when there is a line\n var size = opt.itemHeight * 0.8;\n var symbol = createSymbol(symbolType, (opt.itemWidth - size) / 2, (opt.itemHeight - size) / 2, size, size, opt.itemStyle.fill);\n group.add(symbol);\n symbol.setStyle(opt.itemStyle);\n var symbolRotate = opt.iconRotate === 'inherit' ? visualRotate : opt.iconRotate || 0;\n symbol.rotation = symbolRotate * Math.PI / 180;\n symbol.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symbolType.indexOf('empty') > -1) {\n symbol.style.stroke = symbol.style.fill;\n symbol.style.fill = '#fff';\n symbol.style.lineWidth = 2;\n }\n return group;\n };\n LineSeriesModel.type = 'series.line';\n LineSeriesModel.dependencies = ['grid', 'polar'];\n LineSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 3,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n clip: true,\n label: {\n position: 'top'\n },\n // itemStyle: {\n // },\n endLabel: {\n show: false,\n valueAnimation: true,\n distance: 8\n },\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n emphasis: {\n scale: true\n },\n // areaStyle: {\n // origin of areaStyle. Valid values:\n // `'auto'/null/undefined`: from axisLine to data\n // `'start'`: from min to data\n // `'end'`: from data to max\n // origin: 'auto'\n // },\n // false, 'start', 'end', 'middle'\n step: false,\n // Disabled if step is true\n smooth: false,\n smoothMonotone: null,\n symbol: 'emptyCircle',\n symbolSize: 4,\n symbolRotate: null,\n showSymbol: true,\n // `false`: follow the label interval strategy.\n // `true`: show all symbols.\n // `'auto'`: If possible, show all symbols, otherwise\n // follow the label interval strategy.\n showAllSymbol: 'auto',\n // Whether to connect break point.\n connectNulls: false,\n // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.\n sampling: 'none',\n animationEasing: 'linear',\n // Disable progressive\n progressive: 0,\n hoverLayerThreshold: Infinity,\n universalTransition: {\n divideShape: 'clone'\n },\n triggerLineEvent: false\n };\n return LineSeriesModel;\n}(SeriesModel);\nexport default LineSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieveRawValue } from '../../data/helper/dataProvider.js';\nimport { isArray } from 'zrender/lib/core/util.js';\n/**\n * @return label string. Not null/undefined\n */\nexport function getDefaultLabel(data, dataIndex) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n var len = labelDims.length;\n // Simple optimization (in lots of cases, label dims length is 1)\n if (len === 1) {\n var rawVal = retrieveRawValue(data, dataIndex, labelDims[0]);\n return rawVal != null ? rawVal + '' : null;\n } else if (len) {\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n vals.push(retrieveRawValue(data, dataIndex, labelDims[i]));\n }\n return vals.join(' ');\n }\n}\nexport function getDefaultInterpolatedLabel(data, interpolatedValue) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n if (!isArray(interpolatedValue)) {\n return interpolatedValue + '';\n }\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n var dimIndex = data.getDimensionIndex(labelDims[i]);\n if (dimIndex >= 0) {\n vals.push(interpolatedValue[dimIndex]);\n }\n }\n return vals.join(' ');\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis } from '../../util/states.js';\nimport { getDefaultLabel } from './labelHelper.js';\nimport { extend } from 'zrender/lib/core/util.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar Symbol = /** @class */function (_super) {\n __extends(Symbol, _super);\n function Symbol(data, idx, seriesScope, opts) {\n var _this = _super.call(this) || this;\n _this.updateData(data, idx, seriesScope, opts);\n return _this;\n }\n Symbol.prototype._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) {\n // Remove paths created before\n this.removeAll();\n // let symbolPath = createSymbol(\n // symbolType, -0.5, -0.5, 1, 1, color\n // );\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4150.\n var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect);\n symbolPath.attr({\n z2: 100,\n culling: true,\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n });\n // Rewrite drift method\n symbolPath.drift = driftSymbol;\n this._symbolType = symbolType;\n this.add(symbolPath);\n };\n /**\n * Stop animation\n * @param {boolean} toLastFrame\n */\n Symbol.prototype.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(null, toLastFrame);\n };\n Symbol.prototype.getSymbolType = function () {\n return this._symbolType;\n };\n /**\n * FIXME:\n * Caution: This method breaks the encapsulation of this module,\n * but it indeed brings convenience. So do not use the method\n * unless you detailedly know all the implements of `Symbol`,\n * especially animation.\n *\n * Get symbol path element.\n */\n Symbol.prototype.getSymbolPath = function () {\n return this.childAt(0);\n };\n /**\n * Highlight symbol\n */\n Symbol.prototype.highlight = function () {\n enterEmphasis(this.childAt(0));\n };\n /**\n * Downplay symbol\n */\n Symbol.prototype.downplay = function () {\n leaveEmphasis(this.childAt(0));\n };\n /**\n * @param {number} zlevel\n * @param {number} z\n */\n Symbol.prototype.setZ = function (zlevel, z) {\n var symbolPath = this.childAt(0);\n symbolPath.zlevel = zlevel;\n symbolPath.z = z;\n };\n Symbol.prototype.setDraggable = function (draggable, hasCursorOption) {\n var symbolPath = this.childAt(0);\n symbolPath.draggable = draggable;\n symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor;\n };\n /**\n * Update symbol properties\n */\n Symbol.prototype.updateData = function (data, idx, seriesScope, opts) {\n this.silent = false;\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var seriesModel = data.hostModel;\n var symbolSize = Symbol.getSymbolSize(data, idx);\n var isInit = symbolType !== this._symbolType;\n var disableAnimation = opts && opts.disableAnimation;\n if (isInit) {\n var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect');\n this._createSymbol(symbolType, data, idx, symbolSize, keepAspect);\n } else {\n var symbolPath = this.childAt(0);\n symbolPath.silent = false;\n var target = {\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n };\n disableAnimation ? symbolPath.attr(target) : graphic.updateProps(symbolPath, target, seriesModel, idx);\n saveOldStyle(symbolPath);\n }\n this._updateCommon(data, idx, symbolSize, seriesScope, opts);\n if (isInit) {\n var symbolPath = this.childAt(0);\n if (!disableAnimation) {\n var target = {\n scaleX: this._sizeX,\n scaleY: this._sizeY,\n style: {\n // Always fadeIn. Because it has fadeOut animation when symbol is removed..\n opacity: symbolPath.style.opacity\n }\n };\n symbolPath.scaleX = symbolPath.scaleY = 0;\n symbolPath.style.opacity = 0;\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n }\n if (disableAnimation) {\n // Must stop leave transition manually if don't call initProps or updateProps.\n this.childAt(0).stopAnimation('leave');\n }\n };\n Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) {\n var symbolPath = this.childAt(0);\n var seriesModel = data.hostModel;\n var emphasisItemStyle;\n var blurItemStyle;\n var selectItemStyle;\n var focus;\n var blurScope;\n var emphasisDisabled;\n var labelStatesModels;\n var hoverScale;\n var cursorStyle;\n if (seriesScope) {\n emphasisItemStyle = seriesScope.emphasisItemStyle;\n blurItemStyle = seriesScope.blurItemStyle;\n selectItemStyle = seriesScope.selectItemStyle;\n focus = seriesScope.focus;\n blurScope = seriesScope.blurScope;\n labelStatesModels = seriesScope.labelStatesModels;\n hoverScale = seriesScope.hoverScale;\n cursorStyle = seriesScope.cursorStyle;\n emphasisDisabled = seriesScope.emphasisDisabled;\n }\n if (!seriesScope || data.hasItemOption) {\n var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n selectItemStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n blurItemStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n emphasisDisabled = emphasisModel.get('disabled');\n labelStatesModels = getLabelStatesModels(itemModel);\n hoverScale = emphasisModel.getShallow('scale');\n cursorStyle = itemModel.getShallow('cursor');\n }\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize);\n if (symbolOffset) {\n symbolPath.x = symbolOffset[0];\n symbolPath.y = symbolOffset[1];\n }\n cursorStyle && symbolPath.attr('cursor', cursorStyle);\n var symbolStyle = data.getItemVisual(idx, 'style');\n var visualColor = symbolStyle.fill;\n if (symbolPath instanceof ZRImage) {\n var pathStyle = symbolPath.style;\n symbolPath.useStyle(extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolStyle));\n } else {\n if (symbolPath.__isEmptyBrush) {\n // fill and stroke will be swapped if it's empty.\n // So we cloned a new style to avoid it affecting the original style in visual storage.\n // TODO Better implementation. No empty logic!\n symbolPath.useStyle(extend({}, symbolStyle));\n } else {\n symbolPath.useStyle(symbolStyle);\n }\n // Disable decal because symbol scale will been applied on the decal.\n symbolPath.style.decal = null;\n symbolPath.setColor(visualColor, opts && opts.symbolInnerColor);\n symbolPath.style.strokeNoScale = true;\n }\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = this._z2;\n if (liftZ != null) {\n if (z2Origin == null) {\n this._z2 = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n } else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n this._z2 = null;\n }\n var useNameLabel = opts && opts.useNameLabel;\n setLabelStyle(symbolPath, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n inheritColor: visualColor,\n defaultOpacity: symbolStyle.opacity\n });\n // Do not execute util needed.\n function getLabelDefaultText(idx) {\n return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx);\n }\n this._sizeX = symbolSize[0] / 2;\n this._sizeY = symbolSize[1] / 2;\n var emphasisState = symbolPath.ensureState('emphasis');\n emphasisState.style = emphasisItemStyle;\n symbolPath.ensureState('select').style = selectItemStyle;\n symbolPath.ensureState('blur').style = blurItemStyle;\n // null / undefined / true means to use default strategy.\n // 0 / false / negative number / NaN / Infinity means no scale.\n var scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY)\n // PENDING: restrict hoverScale > 1? It seems unreasonable to scale down\n : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1;\n // always set scale to allow resetting\n emphasisState.scaleX = this._sizeX * scaleRatio;\n emphasisState.scaleY = this._sizeY * scaleRatio;\n this.setSymbolScale(1);\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Symbol.prototype.setSymbolScale = function (scale) {\n this.scaleX = this.scaleY = scale;\n };\n Symbol.prototype.fadeOut = function (cb, seriesModel, opt) {\n var symbolPath = this.childAt(0);\n var dataIndex = getECData(this).dataIndex;\n var animationOpt = opt && opt.animation;\n // Avoid mistaken hover when fading out\n this.silent = symbolPath.silent = true;\n // Not show text when animating\n if (opt && opt.fadeLabel) {\n var textContent = symbolPath.getTextContent();\n if (textContent) {\n graphic.removeElement(textContent, {\n style: {\n opacity: 0\n }\n }, seriesModel, {\n dataIndex: dataIndex,\n removeOpt: animationOpt,\n cb: function () {\n symbolPath.removeTextContent();\n }\n });\n }\n } else {\n symbolPath.removeTextContent();\n }\n graphic.removeElement(symbolPath, {\n style: {\n opacity: 0\n },\n scaleX: 0,\n scaleY: 0\n }, seriesModel, {\n dataIndex: dataIndex,\n cb: cb,\n removeOpt: animationOpt\n });\n };\n Symbol.getSymbolSize = function (data, idx) {\n return normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n };\n return Symbol;\n}(graphic.Group);\nfunction driftSymbol(dx, dy) {\n this.parent.drift(dx, dy);\n}\nexport default Symbol;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport SymbolClz from './Symbol.js';\nimport { isObject } from 'zrender/lib/core/util.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nfunction symbolNeedsDraw(data, point, idx, opt) {\n return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt.isIgnore && opt.isIgnore(idx))\n // We do not set clipShape on group, because it will cut part of\n // the symbol element shape. We use the same clip shape here as\n // the line clip.\n && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none';\n}\nfunction normalizeUpdateOpt(opt) {\n if (opt != null && !isObject(opt)) {\n opt = {\n isIgnore: opt\n };\n }\n return opt || {};\n}\nfunction makeSeriesScope(data) {\n var seriesModel = data.hostModel;\n var emphasisModel = seriesModel.getModel('emphasis');\n return {\n emphasisItemStyle: emphasisModel.getModel('itemStyle').getItemStyle(),\n blurItemStyle: seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(),\n selectItemStyle: seriesModel.getModel(['select', 'itemStyle']).getItemStyle(),\n focus: emphasisModel.get('focus'),\n blurScope: emphasisModel.get('blurScope'),\n emphasisDisabled: emphasisModel.get('disabled'),\n hoverScale: emphasisModel.get('scale'),\n labelStatesModels: getLabelStatesModels(seriesModel),\n cursorStyle: seriesModel.get('cursor')\n };\n}\nvar SymbolDraw = /** @class */function () {\n function SymbolDraw(SymbolCtor) {\n this.group = new graphic.Group();\n this._SymbolCtor = SymbolCtor || SymbolClz;\n }\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.updateData = function (data, opt) {\n // Remove progressive els.\n this._progressiveEls = null;\n opt = normalizeUpdateOpt(opt);\n var group = this.group;\n var seriesModel = data.hostModel;\n var oldData = this._data;\n var SymbolCtor = this._SymbolCtor;\n var disableAnimation = opt.disableAnimation;\n var seriesScope = makeSeriesScope(data);\n var symbolUpdateOpt = {\n disableAnimation: disableAnimation\n };\n var getSymbolPoint = opt.getSymbolPoint || function (idx) {\n return data.getItemLayout(idx);\n };\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldData) {\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n var point = getSymbolPoint(newIdx);\n if (symbolNeedsDraw(data, point, newIdx, opt)) {\n var symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n var point = getSymbolPoint(newIdx);\n if (!symbolNeedsDraw(data, point, newIdx, opt)) {\n group.remove(symbolEl);\n return;\n }\n var newSymbolType = data.getItemVisual(newIdx, 'symbol') || 'circle';\n var oldSymbolType = symbolEl && symbolEl.getSymbolType && symbolEl.getSymbolType();\n if (!symbolEl\n // Create a new if symbol type changed.\n || oldSymbolType && oldSymbolType !== newSymbolType) {\n group.remove(symbolEl);\n symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n } else {\n symbolEl.updateData(data, newIdx, seriesScope, symbolUpdateOpt);\n var target = {\n x: point[0],\n y: point[1]\n };\n disableAnimation ? symbolEl.attr(target) : graphic.updateProps(symbolEl, target, seriesModel);\n }\n // Add back\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && el.fadeOut(function () {\n group.remove(el);\n }, seriesModel);\n }).execute();\n this._getSymbolPoint = getSymbolPoint;\n this._data = data;\n };\n ;\n SymbolDraw.prototype.updateLayout = function () {\n var _this = this;\n var data = this._data;\n if (data) {\n // Not use animation\n data.eachItemGraphicEl(function (el, idx) {\n var point = _this._getSymbolPoint(idx);\n el.setPosition(point);\n el.markRedraw();\n });\n }\n };\n ;\n SymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._seriesScope = makeSeriesScope(data);\n this._data = null;\n this.group.removeAll();\n };\n ;\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {\n // Clear\n this._progressiveEls = [];\n opt = normalizeUpdateOpt(opt);\n function updateIncrementalAndHover(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var point = data.getItemLayout(idx);\n if (symbolNeedsDraw(data, point, idx, opt)) {\n var el = new this._SymbolCtor(data, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n el.setPosition(point);\n this.group.add(el);\n data.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n SymbolDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n SymbolDraw.prototype.remove = function (enableAnimation) {\n var group = this.group;\n var data = this._data;\n // Incremental model do not have this._data.\n if (data && enableAnimation) {\n data.eachItemGraphicEl(function (el) {\n el.fadeOut(function () {\n group.remove(el);\n }, data.hostModel);\n });\n } else {\n group.removeAll();\n }\n };\n ;\n return SymbolDraw;\n}();\nexport default SymbolDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isDimensionStacked } from '../../data/helper/dataStackHelper.js';\nimport { isNumber, map } from 'zrender/lib/core/util.js';\nexport function prepareDataCoordInfo(coordSys, data, valueOrigin) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueStart = getValueStart(valueAxis, valueOrigin);\n var baseAxisDim = baseAxis.dim;\n var valueAxisDim = valueAxis.dim;\n var valueDim = data.mapDimension(valueAxisDim);\n var baseDim = data.mapDimension(baseAxisDim);\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var dims = map(coordSys.dimensions, function (coordDim) {\n return data.mapDimension(coordDim);\n });\n var stacked = false;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0] /* , dims[1] */)) {\n // jshint ignore:line\n stacked = true;\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1] /* , dims[0] */)) {\n // jshint ignore:line\n stacked = true;\n dims[1] = stackResultDim;\n }\n return {\n dataDimsForPoint: dims,\n valueStart: valueStart,\n valueAxisDim: valueAxisDim,\n baseAxisDim: baseAxisDim,\n stacked: !!stacked,\n valueDim: valueDim,\n baseDim: baseDim,\n baseDataOffset: baseDataOffset,\n stackedOverDimension: data.getCalculationInfo('stackedOverDimension')\n };\n}\nfunction getValueStart(valueAxis, valueOrigin) {\n var valueStart = 0;\n var extent = valueAxis.scale.getExtent();\n if (valueOrigin === 'start') {\n valueStart = extent[0];\n } else if (valueOrigin === 'end') {\n valueStart = extent[1];\n }\n // If origin is specified as a number, use it as\n // valueStart directly\n else if (isNumber(valueOrigin) && !isNaN(valueOrigin)) {\n valueStart = valueOrigin;\n }\n // auto\n else {\n // Both positive\n if (extent[0] > 0) {\n valueStart = extent[0];\n }\n // Both negative\n else if (extent[1] < 0) {\n valueStart = extent[1];\n }\n // If is one positive, and one negative, onZero shall be true\n }\n\n return valueStart;\n}\nexport function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) {\n var value = NaN;\n if (dataCoordInfo.stacked) {\n value = data.get(data.getCalculationInfo('stackedOverDimension'), idx);\n }\n if (isNaN(value)) {\n value = dataCoordInfo.valueStart;\n }\n var baseDataOffset = dataCoordInfo.baseDataOffset;\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx);\n stackedData[1 - baseDataOffset] = value;\n return coordSys.dataToPoint(stackedData);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nfunction diffData(oldData, newData) {\n var diffResult = [];\n newData.diff(oldData).add(function (idx) {\n diffResult.push({\n cmd: '+',\n idx: idx\n });\n }).update(function (newIdx, oldIdx) {\n diffResult.push({\n cmd: '=',\n idx: oldIdx,\n idx1: newIdx\n });\n }).remove(function (idx) {\n diffResult.push({\n cmd: '-',\n idx: idx\n });\n }).execute();\n return diffResult;\n}\nexport default function lineAnimationDiff(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) {\n var diff = diffData(oldData, newData);\n // let newIdList = newData.mapArray(newData.getId);\n // let oldIdList = oldData.mapArray(oldData.getId);\n // convertToIntId(newIdList, oldIdList);\n // // FIXME One data ?\n // diff = arrayDiff(oldIdList, newIdList);\n var currPoints = [];\n var nextPoints = [];\n // Points for stacking base line\n var currStackedPoints = [];\n var nextStackedPoints = [];\n var status = [];\n var sortedIndices = [];\n var rawIndices = [];\n var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin);\n // const oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin);\n var oldPoints = oldData.getLayout('points') || [];\n var newPoints = newData.getLayout('points') || [];\n for (var i = 0; i < diff.length; i++) {\n var diffItem = diff[i];\n var pointAdded = true;\n var oldIdx2 = void 0;\n var newIdx2 = void 0;\n // FIXME, animation is not so perfect when dataZoom window moves fast\n // Which is in case remvoing or add more than one data in the tail or head\n switch (diffItem.cmd) {\n case '=':\n oldIdx2 = diffItem.idx * 2;\n newIdx2 = diffItem.idx1 * 2;\n var currentX = oldPoints[oldIdx2];\n var currentY = oldPoints[oldIdx2 + 1];\n var nextX = newPoints[newIdx2];\n var nextY = newPoints[newIdx2 + 1];\n // If previous data is NaN, use next point directly\n if (isNaN(currentX) || isNaN(currentY)) {\n currentX = nextX;\n currentY = nextY;\n }\n currPoints.push(currentX, currentY);\n nextPoints.push(nextX, nextY);\n currStackedPoints.push(oldStackedOnPoints[oldIdx2], oldStackedOnPoints[oldIdx2 + 1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(diffItem.idx1));\n break;\n case '+':\n var newIdx = diffItem.idx;\n var newDataDimsForPoint = newDataOldCoordInfo.dataDimsForPoint;\n var oldPt = oldCoordSys.dataToPoint([newData.get(newDataDimsForPoint[0], newIdx), newData.get(newDataDimsForPoint[1], newIdx)]);\n newIdx2 = newIdx * 2;\n currPoints.push(oldPt[0], oldPt[1]);\n nextPoints.push(newPoints[newIdx2], newPoints[newIdx2 + 1]);\n var stackedOnPoint = getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, newIdx);\n currStackedPoints.push(stackedOnPoint[0], stackedOnPoint[1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(newIdx));\n break;\n case '-':\n pointAdded = false;\n }\n // Original indices\n if (pointAdded) {\n status.push(diffItem);\n sortedIndices.push(sortedIndices.length);\n }\n }\n // Diff result may be crossed if all items are changed\n // Sort by data index\n sortedIndices.sort(function (a, b) {\n return rawIndices[a] - rawIndices[b];\n });\n var len = currPoints.length;\n var sortedCurrPoints = createFloat32Array(len);\n var sortedNextPoints = createFloat32Array(len);\n var sortedCurrStackedPoints = createFloat32Array(len);\n var sortedNextStackedPoints = createFloat32Array(len);\n var sortedStatus = [];\n for (var i = 0; i < sortedIndices.length; i++) {\n var idx = sortedIndices[i];\n var i2 = i * 2;\n var idx2 = idx * 2;\n sortedCurrPoints[i2] = currPoints[idx2];\n sortedCurrPoints[i2 + 1] = currPoints[idx2 + 1];\n sortedNextPoints[i2] = nextPoints[idx2];\n sortedNextPoints[i2 + 1] = nextPoints[idx2 + 1];\n sortedCurrStackedPoints[i2] = currStackedPoints[idx2];\n sortedCurrStackedPoints[i2 + 1] = currStackedPoints[idx2 + 1];\n sortedNextStackedPoints[i2] = nextStackedPoints[idx2];\n sortedNextStackedPoints[i2 + 1] = nextStackedPoints[idx2 + 1];\n sortedStatus[i] = status[idx];\n }\n return {\n current: sortedCurrPoints,\n next: sortedNextPoints,\n stackedOnCurrent: sortedCurrStackedPoints,\n stackedOnNext: sortedNextStackedPoints,\n status: sortedStatus\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// Poly path support NaN point\nimport Path from 'zrender/lib/graphic/Path.js';\nimport PathProxy from 'zrender/lib/core/PathProxy.js';\nimport { cubicRootAt, cubicAt } from 'zrender/lib/core/curve.js';\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nfunction isPointNull(x, y) {\n return isNaN(x) || isNaN(y);\n}\n/**\n * Draw smoothed line in non-monotone, in may cause undesired curve in extreme\n * situations. This should be used when points are non-monotone neither in x or\n * y dimension.\n */\nfunction drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n if (idx >= allLen || idx < 0) {\n break;\n }\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n break;\n }\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY;\n // Ignore tiny segment.\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1];\n // Ignore duplicate point\n while (nextX === x && nextY === y && k < segLen) {\n k++;\n nextIdx += dir;\n idx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n x = points[idx * 2];\n y = points[idx * 2 + 1];\n dx = x - prevX;\n dy = y - prevY;\n }\n var tmpK = k + 1;\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0;\n // Is last point\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n var dir_1 = vx > 0 ? 1 : -1;\n cpx1 = x - dir_1 * lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + dir_1 * lenNextSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n var dir_2 = vy > 0 ? 1 : -1;\n cpx1 = x;\n cpy1 = y - dir_2 * lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + dir_2 * lenNextSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n // Use ratio of seg length\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg);\n // cp0 of next segment\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg;\n // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y));\n // Reclaculate cp1 based on the adjusted cp0 of next seg.\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg;\n // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y));\n // Adjust next cp0 again.\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n prevX = x;\n prevY = y;\n idx += dir;\n }\n return k;\n}\nvar ECPolylineShape = /** @class */function () {\n function ECPolylineShape() {\n this.smooth = 0;\n this.smoothConstraint = true;\n }\n return ECPolylineShape;\n}();\nvar ECPolyline = /** @class */function (_super) {\n __extends(ECPolyline, _super);\n function ECPolyline(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-polyline';\n return _this;\n }\n ECPolyline.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n ECPolyline.prototype.getDefaultShape = function () {\n return new ECPolylineShape();\n };\n ECPolyline.prototype.buildPath = function (ctx, shape) {\n var points = shape.points;\n var i = 0;\n var len = points.length / 2;\n // const result = getBoundingBox(points, shape.smoothConstraint);\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n for (; i < len; i++) {\n if (!isPointNull(points[i * 2], points[i * 2 + 1])) {\n break;\n }\n }\n }\n while (i < len) {\n i += drawSegment(ctx, points, i, len, len, 1, shape.smooth, shape.smoothMonotone, shape.connectNulls) + 1;\n }\n };\n ECPolyline.prototype.getPointOn = function (xOrY, dim) {\n if (!this.path) {\n this.createPathProxy();\n this.buildPath(this.path, this.shape);\n }\n var path = this.path;\n var data = path.data;\n var CMD = PathProxy.CMD;\n var x0;\n var y0;\n var isDimX = dim === 'x';\n var roots = [];\n for (var i = 0; i < data.length;) {\n var cmd = data[i++];\n var x = void 0;\n var y = void 0;\n var x2 = void 0;\n var y2 = void 0;\n var x3 = void 0;\n var y3 = void 0;\n var t = void 0;\n switch (cmd) {\n case CMD.M:\n x0 = data[i++];\n y0 = data[i++];\n break;\n case CMD.L:\n x = data[i++];\n y = data[i++];\n t = isDimX ? (xOrY - x0) / (x - x0) : (xOrY - y0) / (y - y0);\n if (t <= 1 && t >= 0) {\n var val = isDimX ? (y - y0) * t + y0 : (x - x0) * t + x0;\n return isDimX ? [xOrY, val] : [val, xOrY];\n }\n x0 = x;\n y0 = y;\n break;\n case CMD.C:\n x = data[i++];\n y = data[i++];\n x2 = data[i++];\n y2 = data[i++];\n x3 = data[i++];\n y3 = data[i++];\n var nRoot = isDimX ? cubicRootAt(x0, x, x2, x3, xOrY, roots) : cubicRootAt(y0, y, y2, y3, xOrY, roots);\n if (nRoot > 0) {\n for (var i_1 = 0; i_1 < nRoot; i_1++) {\n var t_1 = roots[i_1];\n if (t_1 <= 1 && t_1 >= 0) {\n var val = isDimX ? cubicAt(y0, y, y2, y3, t_1) : cubicAt(x0, x, x2, x3, t_1);\n return isDimX ? [xOrY, val] : [val, xOrY];\n }\n }\n }\n x0 = x3;\n y0 = y3;\n break;\n }\n }\n };\n return ECPolyline;\n}(Path);\nexport { ECPolyline };\nvar ECPolygonShape = /** @class */function (_super) {\n __extends(ECPolygonShape, _super);\n function ECPolygonShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ECPolygonShape;\n}(ECPolylineShape);\nvar ECPolygon = /** @class */function (_super) {\n __extends(ECPolygon, _super);\n function ECPolygon(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-polygon';\n return _this;\n }\n ECPolygon.prototype.getDefaultShape = function () {\n return new ECPolygonShape();\n };\n ECPolygon.prototype.buildPath = function (ctx, shape) {\n var points = shape.points;\n var stackedOnPoints = shape.stackedOnPoints;\n var i = 0;\n var len = points.length / 2;\n var smoothMonotone = shape.smoothMonotone;\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n for (; i < len; i++) {\n if (!isPointNull(points[i * 2], points[i * 2 + 1])) {\n break;\n }\n }\n }\n while (i < len) {\n var k = drawSegment(ctx, points, i, len, len, 1, shape.smooth, smoothMonotone, shape.connectNulls);\n drawSegment(ctx, stackedOnPoints, i + k - 1, k, len, -1, shape.stackedOnSmooth, smoothMonotone, shape.connectNulls);\n i += k + 1;\n ctx.closePath();\n }\n };\n return ECPolygon;\n}(Path);\nexport { ECPolygon };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport { round } from '../../util/number.js';\nimport { isFunction } from 'zrender/lib/core/util.js';\nfunction createGridClipPath(cartesian, hasAnimation, seriesModel, done, during) {\n var rect = cartesian.getArea();\n var x = rect.x;\n var y = rect.y;\n var width = rect.width;\n var height = rect.height;\n var lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;\n // Expand the clip path a bit to avoid the border is clipped and looks thinner\n x -= lineWidth / 2;\n y -= lineWidth / 2;\n width += lineWidth;\n height += lineWidth;\n // fix: https://github.com/apache/incubator-echarts/issues/11369\n width = Math.ceil(width);\n if (x !== Math.floor(x)) {\n x = Math.floor(x);\n // if no extra 1px on `width`, it will still be clipped since `x` is floored\n width++;\n }\n var clipPath = new graphic.Rect({\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n }\n });\n if (hasAnimation) {\n var baseAxis = cartesian.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isAxisInversed = baseAxis.inverse;\n if (isHorizontal) {\n if (isAxisInversed) {\n clipPath.shape.x += width;\n }\n clipPath.shape.width = 0;\n } else {\n if (!isAxisInversed) {\n clipPath.shape.y += height;\n }\n clipPath.shape.height = 0;\n }\n var duringCb = isFunction(during) ? function (percent) {\n during(percent, clipPath);\n } : null;\n graphic.initProps(clipPath, {\n shape: {\n width: width,\n height: height,\n x: x,\n y: y\n }\n }, seriesModel, null, done, duringCb);\n }\n return clipPath;\n}\nfunction createPolarClipPath(polar, hasAnimation, seriesModel) {\n var sectorArea = polar.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n var r0 = round(sectorArea.r0, 1);\n var r = round(sectorArea.r, 1);\n var clipPath = new graphic.Sector({\n shape: {\n cx: round(polar.cx, 1),\n cy: round(polar.cy, 1),\n r0: r0,\n r: r,\n startAngle: sectorArea.startAngle,\n endAngle: sectorArea.endAngle,\n clockwise: sectorArea.clockwise\n }\n });\n if (hasAnimation) {\n var isRadial = polar.getBaseAxis().dim === 'angle';\n if (isRadial) {\n clipPath.shape.endAngle = sectorArea.startAngle;\n } else {\n clipPath.shape.r = r0;\n }\n graphic.initProps(clipPath, {\n shape: {\n endAngle: sectorArea.endAngle,\n r: r\n }\n }, seriesModel);\n }\n return clipPath;\n}\nfunction createClipPath(coordSys, hasAnimation, seriesModel, done, during) {\n if (!coordSys) {\n return null;\n } else if (coordSys.type === 'polar') {\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n } else if (coordSys.type === 'cartesian2d') {\n return createGridClipPath(coordSys, hasAnimation, seriesModel, done, during);\n }\n return null;\n}\nexport { createGridClipPath, createPolarClipPath, createClipPath };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function isCoordinateSystemType(coordSys, type) {\n return coordSys.type === type;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// FIXME step not support polar\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport SymbolClz from '../helper/Symbol.js';\nimport lineAnimationDiff from './lineAnimationDiff.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as modelUtil from '../../util/model.js';\nimport { ECPolyline, ECPolygon } from './poly.js';\nimport ChartView from '../../view/Chart.js';\nimport { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createGridClipPath, createPolarClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { setStatesStylesFromModel, setStatesFlag, toggleHoverEmphasis, SPECIAL_STATES } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels, labelInner } from '../../label/labelStyle.js';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nimport { convertToColorString } from '../../util/format.js';\nimport { lerp } from 'zrender/lib/tool/color.js';\nfunction isPointsSame(points1, points2) {\n if (points1.length !== points2.length) {\n return;\n }\n for (var i = 0; i < points1.length; i++) {\n if (points1[i] !== points2[i]) {\n return;\n }\n }\n return true;\n}\nfunction bboxFromPoints(points) {\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (!isNaN(x)) {\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n }\n if (!isNaN(y)) {\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n }\n return [[minX, minY], [maxX, maxY]];\n}\nfunction getBoundingDiff(points1, points2) {\n var _a = bboxFromPoints(points1),\n min1 = _a[0],\n max1 = _a[1];\n var _b = bboxFromPoints(points2),\n min2 = _b[0],\n max2 = _b[1];\n // Get a max value from each corner of two boundings.\n return Math.max(Math.abs(min1[0] - min2[0]), Math.abs(min1[1] - min2[1]), Math.abs(max1[0] - max2[0]), Math.abs(max1[1] - max2[1]));\n}\nfunction getSmooth(smooth) {\n return zrUtil.isNumber(smooth) ? smooth : smooth ? 0.5 : 0;\n}\nfunction getStackedOnPoints(coordSys, data, dataCoordInfo) {\n if (!dataCoordInfo.valueDim) {\n return [];\n }\n var len = data.count();\n var points = createFloat32Array(len * 2);\n for (var idx = 0; idx < len; idx++) {\n var pt = getStackedOnPoint(dataCoordInfo, coordSys, data, idx);\n points[idx * 2] = pt[0];\n points[idx * 2 + 1] = pt[1];\n }\n return points;\n}\nfunction turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {\n var baseAxis = coordSys.getBaseAxis();\n var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1;\n var stepPoints = [];\n var i = 0;\n var stepPt = [];\n var pt = [];\n var nextPt = [];\n var filteredPoints = [];\n if (connectNulls) {\n for (i = 0; i < points.length; i += 2) {\n if (!isNaN(points[i]) && !isNaN(points[i + 1])) {\n filteredPoints.push(points[i], points[i + 1]);\n }\n }\n points = filteredPoints;\n }\n for (i = 0; i < points.length - 2; i += 2) {\n nextPt[0] = points[i + 2];\n nextPt[1] = points[i + 3];\n pt[0] = points[i];\n pt[1] = points[i + 1];\n stepPoints.push(pt[0], pt[1]);\n switch (stepTurnAt) {\n case 'end':\n stepPt[baseIndex] = nextPt[baseIndex];\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n break;\n case 'middle':\n var middle = (pt[baseIndex] + nextPt[baseIndex]) / 2;\n var stepPt2 = [];\n stepPt[baseIndex] = stepPt2[baseIndex] = middle;\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPt2[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n stepPoints.push(stepPt2[0], stepPt2[1]);\n break;\n default:\n // default is start\n stepPt[baseIndex] = pt[baseIndex];\n stepPt[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n }\n }\n // Last points\n stepPoints.push(points[i++], points[i++]);\n return stepPoints;\n}\n/**\n * Clip color stops to edge. Avoid creating too large gradients.\n * Which may lead to blurry when GPU acceleration is enabled. See #15680\n *\n * The stops has been sorted from small to large.\n */\nfunction clipColorStops(colorStops, maxSize) {\n var newColorStops = [];\n var len = colorStops.length;\n // coord will always < 0 in prevOutOfRangeColorStop.\n var prevOutOfRangeColorStop;\n var prevInRangeColorStop;\n function lerpStop(stop0, stop1, clippedCoord) {\n var coord0 = stop0.coord;\n var p = (clippedCoord - coord0) / (stop1.coord - coord0);\n var color = lerp(p, [stop0.color, stop1.color]);\n return {\n coord: clippedCoord,\n color: color\n };\n }\n for (var i = 0; i < len; i++) {\n var stop_1 = colorStops[i];\n var coord = stop_1.coord;\n if (coord < 0) {\n prevOutOfRangeColorStop = stop_1;\n } else if (coord > maxSize) {\n if (prevInRangeColorStop) {\n newColorStops.push(lerpStop(prevInRangeColorStop, stop_1, maxSize));\n } else if (prevOutOfRangeColorStop) {\n // If there are two stops and coord range is between these two stops\n newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0), lerpStop(prevOutOfRangeColorStop, stop_1, maxSize));\n }\n // All following stop will be out of range. So just ignore them.\n break;\n } else {\n if (prevOutOfRangeColorStop) {\n newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0));\n // Reset\n prevOutOfRangeColorStop = null;\n }\n newColorStops.push(stop_1);\n prevInRangeColorStop = stop_1;\n }\n }\n return newColorStops;\n}\nfunction getVisualGradient(data, coordSys, api) {\n var visualMetaList = data.getVisual('visualMeta');\n if (!visualMetaList || !visualMetaList.length || !data.count()) {\n // When data.count() is 0, gradient range can not be calculated.\n return;\n }\n if (coordSys.type !== 'cartesian2d') {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Visual map on line style is only supported on cartesian2d.');\n }\n return;\n }\n var coordDim;\n var visualMeta;\n for (var i = visualMetaList.length - 1; i >= 0; i--) {\n var dimInfo = data.getDimensionInfo(visualMetaList[i].dimension);\n coordDim = dimInfo && dimInfo.coordDim;\n // Can only be x or y\n if (coordDim === 'x' || coordDim === 'y') {\n visualMeta = visualMetaList[i];\n break;\n }\n }\n if (!visualMeta) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Visual map on line style only support x or y dimension.');\n }\n return;\n }\n // If the area to be rendered is bigger than area defined by LinearGradient,\n // the canvas spec prescribes that the color of the first stop and the last\n // stop should be used. But if two stops are added at offset 0, in effect\n // browsers use the color of the second stop to render area outside\n // LinearGradient. So we can only infinitesimally extend area defined in\n // LinearGradient to render `outerColors`.\n var axis = coordSys.getAxis(coordDim);\n // dataToCoord mapping may not be linear, but must be monotonic.\n var colorStops = zrUtil.map(visualMeta.stops, function (stop) {\n // offset will be calculated later.\n return {\n coord: axis.toGlobalCoord(axis.dataToCoord(stop.value)),\n color: stop.color\n };\n });\n var stopLen = colorStops.length;\n var outerColors = visualMeta.outerColors.slice();\n if (stopLen && colorStops[0].coord > colorStops[stopLen - 1].coord) {\n colorStops.reverse();\n outerColors.reverse();\n }\n var colorStopsInRange = clipColorStops(colorStops, coordDim === 'x' ? api.getWidth() : api.getHeight());\n var inRangeStopLen = colorStopsInRange.length;\n if (!inRangeStopLen && stopLen) {\n // All stops are out of range. All will be the same color.\n return colorStops[0].coord < 0 ? outerColors[1] ? outerColors[1] : colorStops[stopLen - 1].color : outerColors[0] ? outerColors[0] : colorStops[0].color;\n }\n var tinyExtent = 10; // Arbitrary value: 10px\n var minCoord = colorStopsInRange[0].coord - tinyExtent;\n var maxCoord = colorStopsInRange[inRangeStopLen - 1].coord + tinyExtent;\n var coordSpan = maxCoord - minCoord;\n if (coordSpan < 1e-3) {\n return 'transparent';\n }\n zrUtil.each(colorStopsInRange, function (stop) {\n stop.offset = (stop.coord - minCoord) / coordSpan;\n });\n colorStopsInRange.push({\n // NOTE: inRangeStopLen may still be 0 if stoplen is zero.\n offset: inRangeStopLen ? colorStopsInRange[inRangeStopLen - 1].offset : 0.5,\n color: outerColors[1] || 'transparent'\n });\n colorStopsInRange.unshift({\n offset: inRangeStopLen ? colorStopsInRange[0].offset : 0.5,\n color: outerColors[0] || 'transparent'\n });\n var gradient = new graphic.LinearGradient(0, 0, 0, 0, colorStopsInRange, true);\n gradient[coordDim] = minCoord;\n gradient[coordDim + '2'] = maxCoord;\n return gradient;\n}\nfunction getIsIgnoreFunc(seriesModel, data, coordSys) {\n var showAllSymbol = seriesModel.get('showAllSymbol');\n var isAuto = showAllSymbol === 'auto';\n if (showAllSymbol && !isAuto) {\n return;\n }\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n if (!categoryAxis) {\n return;\n }\n // Note that category label interval strategy might bring some weird effect\n // in some scenario: users may wonder why some of the symbols are not\n // displayed. So we show all symbols as possible as we can.\n if (isAuto\n // Simplify the logic, do not determine label overlap here.\n && canShowAllSymbolForCategory(categoryAxis, data)) {\n return;\n }\n // Otherwise follow the label interval strategy on category axis.\n var categoryDataDim = data.mapDimension(categoryAxis.dim);\n var labelMap = {};\n zrUtil.each(categoryAxis.getViewLabels(), function (labelItem) {\n var ordinalNumber = categoryAxis.scale.getRawOrdinalNumber(labelItem.tickValue);\n labelMap[ordinalNumber] = 1;\n });\n return function (dataIndex) {\n return !labelMap.hasOwnProperty(data.get(categoryDataDim, dataIndex));\n };\n}\nfunction canShowAllSymbolForCategory(categoryAxis, data) {\n // In most cases, line is monotonous on category axis, and the label size\n // is close with each other. So we check the symbol size and some of the\n // label size alone with the category axis to estimate whether all symbol\n // can be shown without overlap.\n var axisExtent = categoryAxis.getExtent();\n var availSize = Math.abs(axisExtent[1] - axisExtent[0]) / categoryAxis.scale.count();\n isNaN(availSize) && (availSize = 0); // 0/0 is NaN.\n // Sampling some points, max 5.\n var dataLen = data.count();\n var step = Math.max(1, Math.round(dataLen / 5));\n for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) {\n if (SymbolClz.getSymbolSize(data, dataIndex\n // Only for cartesian, where `isHorizontal` exists.\n )[categoryAxis.isHorizontal() ? 1 : 0]\n // Empirical number\n * 1.5 > availSize) {\n return false;\n }\n }\n return true;\n}\nfunction isPointNull(x, y) {\n return isNaN(x) || isNaN(y);\n}\nfunction getLastIndexNotNull(points) {\n var len = points.length / 2;\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n return len - 1;\n}\nfunction getPointAtIndex(points, idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n}\nfunction getIndexRange(points, xOrY, dim) {\n var len = points.length / 2;\n var dimIdx = dim === 'x' ? 0 : 1;\n var a;\n var b;\n var prevIndex = 0;\n var nextIndex = -1;\n for (var i = 0; i < len; i++) {\n b = points[i * 2 + dimIdx];\n if (isNaN(b) || isNaN(points[i * 2 + 1 - dimIdx])) {\n continue;\n }\n if (i === 0) {\n a = b;\n continue;\n }\n if (a <= xOrY && b >= xOrY || a >= xOrY && b <= xOrY) {\n nextIndex = i;\n break;\n }\n prevIndex = i;\n a = b;\n }\n return {\n range: [prevIndex, nextIndex],\n t: (xOrY - a) / (b - a)\n };\n}\nfunction anyStateShowEndLabel(seriesModel) {\n if (seriesModel.get(['endLabel', 'show'])) {\n return true;\n }\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n if (seriesModel.get([SPECIAL_STATES[i], 'endLabel', 'show'])) {\n return true;\n }\n }\n return false;\n}\nfunction createLineClipPath(lineView, coordSys, hasAnimation, seriesModel) {\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n var endLabelModel_1 = seriesModel.getModel('endLabel');\n var valueAnimation_1 = endLabelModel_1.get('valueAnimation');\n var data_1 = seriesModel.getData();\n var labelAnimationRecord_1 = {\n lastFrameIndex: 0\n };\n var during = anyStateShowEndLabel(seriesModel) ? function (percent, clipRect) {\n lineView._endLabelOnDuring(percent, clipRect, data_1, labelAnimationRecord_1, valueAnimation_1, endLabelModel_1, coordSys);\n } : null;\n var isHorizontal = coordSys.getBaseAxis().isHorizontal();\n var clipPath = createGridClipPath(coordSys, hasAnimation, seriesModel, function () {\n var endLabel = lineView._endLabel;\n if (endLabel && hasAnimation) {\n if (labelAnimationRecord_1.originalX != null) {\n endLabel.attr({\n x: labelAnimationRecord_1.originalX,\n y: labelAnimationRecord_1.originalY\n });\n }\n }\n }, during);\n // Expand clip shape to avoid clipping when line value exceeds axis\n if (!seriesModel.get('clip', true)) {\n var rectShape = clipPath.shape;\n var expandSize = Math.max(rectShape.width, rectShape.height);\n if (isHorizontal) {\n rectShape.y -= expandSize;\n rectShape.height += expandSize * 2;\n } else {\n rectShape.x -= expandSize;\n rectShape.width += expandSize * 2;\n }\n }\n // Set to the final frame. To make sure label layout is right.\n if (during) {\n during(1, clipPath);\n }\n return clipPath;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n if (seriesModel.get(['endLabel', 'show'])) {\n console.warn('endLabel is not supported for lines in polar systems.');\n }\n }\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n }\n}\nfunction getEndLabelStateSpecified(endLabelModel, coordSys) {\n var baseAxis = coordSys.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isBaseInversed = baseAxis.inverse;\n var align = isHorizontal ? isBaseInversed ? 'right' : 'left' : 'center';\n var verticalAlign = isHorizontal ? 'middle' : isBaseInversed ? 'top' : 'bottom';\n return {\n normal: {\n align: endLabelModel.get('align') || align,\n verticalAlign: endLabelModel.get('verticalAlign') || verticalAlign\n }\n };\n}\nvar LineView = /** @class */function (_super) {\n __extends(LineView, _super);\n function LineView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LineView.prototype.init = function () {\n var lineGroup = new graphic.Group();\n var symbolDraw = new SymbolDraw();\n this.group.add(symbolDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineGroup = lineGroup;\n };\n LineView.prototype.render = function (seriesModel, ecModel, api) {\n var _this = this;\n var coordSys = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var lineStyleModel = seriesModel.getModel('lineStyle');\n var areaStyleModel = seriesModel.getModel('areaStyle');\n var points = data.getLayout('points') || [];\n var isCoordSysPolar = coordSys.type === 'polar';\n var prevCoordSys = this._coordSys;\n var symbolDraw = this._symbolDraw;\n var polyline = this._polyline;\n var polygon = this._polygon;\n var lineGroup = this._lineGroup;\n var hasAnimation = !ecModel.ssr && seriesModel.get('animation');\n var isAreaChart = !areaStyleModel.isEmpty();\n var valueOrigin = areaStyleModel.get('origin');\n var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);\n var stackedOnPoints = isAreaChart && getStackedOnPoints(coordSys, data, dataCoordInfo);\n var showSymbol = seriesModel.get('showSymbol');\n var connectNulls = seriesModel.get('connectNulls');\n var isIgnoreFunc = showSymbol && !isCoordSysPolar && getIsIgnoreFunc(seriesModel, data, coordSys);\n // Remove temporary symbols\n var oldData = this._data;\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n // Remove previous created symbols if showSymbol changed to false\n if (!showSymbol) {\n symbolDraw.remove();\n }\n group.add(lineGroup);\n // FIXME step not support polar\n var step = !isCoordSysPolar ? seriesModel.get('step') : false;\n var clipShapeForSymbol;\n if (coordSys && coordSys.getArea && seriesModel.get('clip', true)) {\n clipShapeForSymbol = coordSys.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n // See #7913 and `test/dataZoom-clip.html`.\n if (clipShapeForSymbol.width != null) {\n clipShapeForSymbol.x -= 0.1;\n clipShapeForSymbol.y -= 0.1;\n clipShapeForSymbol.width += 0.2;\n clipShapeForSymbol.height += 0.2;\n } else if (clipShapeForSymbol.r0) {\n clipShapeForSymbol.r0 -= 0.5;\n clipShapeForSymbol.r += 0.5;\n }\n }\n this._clipShapeForSymbol = clipShapeForSymbol;\n var visualColor = getVisualGradient(data, coordSys, api) || data.getVisual('style')[data.getVisual('drawType')];\n // Initialization animation or coordinate system changed\n if (!(polyline && prevCoordSys.type === coordSys.type && step === this._step)) {\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol,\n disableAnimation: true,\n getSymbolPoint: function (idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n }\n });\n hasAnimation && this._initSymbolLabelAnimation(data, coordSys, clipShapeForSymbol);\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step, connectNulls);\n if (stackedOnPoints) {\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);\n }\n }\n polyline = this._newPolyline(points);\n if (isAreaChart) {\n polygon = this._newPolygon(points, stackedOnPoints);\n } // If areaStyle is removed\n else if (polygon) {\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n // NOTE: Must update _endLabel before setClipPath.\n if (!isCoordSysPolar) {\n this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor));\n }\n lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel));\n } else {\n if (isAreaChart && !polygon) {\n // If areaStyle is added\n polygon = this._newPolygon(points, stackedOnPoints);\n } else if (polygon && !isAreaChart) {\n // If areaStyle is removed\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n // NOTE: Must update _endLabel before setClipPath.\n if (!isCoordSysPolar) {\n this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor));\n }\n // Update clipPath\n var oldClipPath = lineGroup.getClipPath();\n if (oldClipPath) {\n var newClipPath = createLineClipPath(this, coordSys, false, seriesModel);\n graphic.initProps(oldClipPath, {\n shape: newClipPath.shape\n }, seriesModel);\n } else {\n lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel));\n }\n // Always update, or it is wrong in the case turning on legend\n // because points are not changed.\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol,\n disableAnimation: true,\n getSymbolPoint: function (idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n }\n });\n // In the case data zoom triggered refreshing frequently\n // Data may not change if line has a category axis. So it should animate nothing.\n if (!isPointsSame(this._stackedOnPoints, stackedOnPoints) || !isPointsSame(this._points, points)) {\n if (hasAnimation) {\n this._doUpdateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls);\n } else {\n // Not do it in update with animation\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step, connectNulls);\n if (stackedOnPoints) {\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);\n }\n }\n polyline.setShape({\n points: points\n });\n polygon && polygon.setShape({\n points: points,\n stackedOnPoints: stackedOnPoints\n });\n }\n }\n }\n var emphasisModel = seriesModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var emphasisDisabled = emphasisModel.get('disabled');\n polyline.useStyle(zrUtil.defaults(\n // Use color in lineStyle first\n lineStyleModel.getLineStyle(), {\n fill: 'none',\n stroke: visualColor,\n lineJoin: 'bevel'\n }));\n setStatesStylesFromModel(polyline, seriesModel, 'lineStyle');\n if (polyline.style.lineWidth > 0 && seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder') {\n var emphasisLineStyle = polyline.getState('emphasis').style;\n emphasisLineStyle.lineWidth = +polyline.style.lineWidth + 1;\n }\n // Needs seriesIndex for focus\n getECData(polyline).seriesIndex = seriesModel.seriesIndex;\n toggleHoverEmphasis(polyline, focus, blurScope, emphasisDisabled);\n var smooth = getSmooth(seriesModel.get('smooth'));\n var smoothMonotone = seriesModel.get('smoothMonotone');\n polyline.setShape({\n smooth: smooth,\n smoothMonotone: smoothMonotone,\n connectNulls: connectNulls\n });\n if (polygon) {\n var stackedOnSeries = data.getCalculationInfo('stackedOnSeries');\n var stackedOnSmooth = 0;\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: visualColor,\n opacity: 0.7,\n lineJoin: 'bevel',\n decal: data.getVisual('style').decal\n }));\n if (stackedOnSeries) {\n stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth'));\n }\n polygon.setShape({\n smooth: smooth,\n stackedOnSmooth: stackedOnSmooth,\n smoothMonotone: smoothMonotone,\n connectNulls: connectNulls\n });\n setStatesStylesFromModel(polygon, seriesModel, 'areaStyle');\n // Needs seriesIndex for focus\n getECData(polygon).seriesIndex = seriesModel.seriesIndex;\n toggleHoverEmphasis(polygon, focus, blurScope, emphasisDisabled);\n }\n var changePolyState = function (toState) {\n _this._changePolyState(toState);\n };\n data.eachItemGraphicEl(function (el) {\n // Switch polyline / polygon state if element changed its state.\n el && (el.onHoverStateChange = changePolyState);\n });\n this._polyline.onHoverStateChange = changePolyState;\n this._data = data;\n // Save the coordinate system for transition animation when data changed\n this._coordSys = coordSys;\n this._stackedOnPoints = stackedOnPoints;\n this._points = points;\n this._step = step;\n this._valueOrigin = valueOrigin;\n if (seriesModel.get('triggerLineEvent')) {\n this.packEventData(seriesModel, polyline);\n polygon && this.packEventData(seriesModel, polygon);\n }\n };\n LineView.prototype.packEventData = function (seriesModel, el) {\n getECData(el).eventData = {\n componentType: 'series',\n componentSubType: 'line',\n componentIndex: seriesModel.componentIndex,\n seriesIndex: seriesModel.seriesIndex,\n seriesName: seriesModel.name,\n seriesType: 'line'\n };\n };\n LineView.prototype.highlight = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n this._changePolyState('emphasis');\n if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) {\n var points = data.getLayout('points');\n var symbol = data.getItemGraphicEl(dataIndex);\n if (!symbol) {\n // Create a temporary symbol if it is not exists\n var x = points[dataIndex * 2];\n var y = points[dataIndex * 2 + 1];\n if (isNaN(x) || isNaN(y)) {\n // Null data\n return;\n }\n // fix #11360: shouldn't draw symbol outside clipShapeForSymbol\n if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(x, y)) {\n return;\n }\n var zlevel = seriesModel.get('zlevel') || 0;\n var z = seriesModel.get('z') || 0;\n symbol = new SymbolClz(data, dataIndex);\n symbol.x = x;\n symbol.y = y;\n symbol.setZ(zlevel, z);\n // ensure label text of the temporary symbol is in front of line and area polygon\n var symbolLabel = symbol.getSymbolPath().getTextContent();\n if (symbolLabel) {\n symbolLabel.zlevel = zlevel;\n symbolLabel.z = z;\n symbolLabel.z2 = this._polyline.z2 + 1;\n }\n symbol.__temp = true;\n data.setItemGraphicEl(dataIndex, symbol);\n // Stop scale animation\n symbol.stopSymbolAnimation(true);\n this.group.add(symbol);\n }\n symbol.highlight();\n } else {\n // Highlight whole series\n ChartView.prototype.highlight.call(this, seriesModel, ecModel, api, payload);\n }\n };\n LineView.prototype.downplay = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n this._changePolyState('normal');\n if (dataIndex != null && dataIndex >= 0) {\n var symbol = data.getItemGraphicEl(dataIndex);\n if (symbol) {\n if (symbol.__temp) {\n data.setItemGraphicEl(dataIndex, null);\n this.group.remove(symbol);\n } else {\n symbol.downplay();\n }\n }\n } else {\n // FIXME\n // can not downplay completely.\n // Downplay whole series\n ChartView.prototype.downplay.call(this, seriesModel, ecModel, api, payload);\n }\n };\n LineView.prototype._changePolyState = function (toState) {\n var polygon = this._polygon;\n setStatesFlag(this._polyline, toState);\n polygon && setStatesFlag(polygon, toState);\n };\n LineView.prototype._newPolyline = function (points) {\n var polyline = this._polyline;\n // Remove previous created polyline\n if (polyline) {\n this._lineGroup.remove(polyline);\n }\n polyline = new ECPolyline({\n shape: {\n points: points\n },\n segmentIgnoreThreshold: 2,\n z2: 10\n });\n this._lineGroup.add(polyline);\n this._polyline = polyline;\n return polyline;\n };\n LineView.prototype._newPolygon = function (points, stackedOnPoints) {\n var polygon = this._polygon;\n // Remove previous created polygon\n if (polygon) {\n this._lineGroup.remove(polygon);\n }\n polygon = new ECPolygon({\n shape: {\n points: points,\n stackedOnPoints: stackedOnPoints\n },\n segmentIgnoreThreshold: 2\n });\n this._lineGroup.add(polygon);\n this._polygon = polygon;\n return polygon;\n };\n LineView.prototype._initSymbolLabelAnimation = function (data, coordSys, clipShape) {\n var isHorizontalOrRadial;\n var isCoordSysPolar;\n var baseAxis = coordSys.getBaseAxis();\n var isAxisInverse = baseAxis.inverse;\n if (coordSys.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n isCoordSysPolar = false;\n } else if (coordSys.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n isCoordSysPolar = true;\n }\n var seriesModel = data.hostModel;\n var seriesDuration = seriesModel.get('animationDuration');\n if (zrUtil.isFunction(seriesDuration)) {\n seriesDuration = seriesDuration(null);\n }\n var seriesDelay = seriesModel.get('animationDelay') || 0;\n var seriesDelayValue = zrUtil.isFunction(seriesDelay) ? seriesDelay(null) : seriesDelay;\n data.eachItemGraphicEl(function (symbol, idx) {\n var el = symbol;\n if (el) {\n var point = [symbol.x, symbol.y];\n var start = void 0;\n var end = void 0;\n var current = void 0;\n if (clipShape) {\n if (isCoordSysPolar) {\n var polarClip = clipShape;\n var coord = coordSys.pointToCoord(point);\n if (isHorizontalOrRadial) {\n start = polarClip.startAngle;\n end = polarClip.endAngle;\n current = -coord[1] / 180 * Math.PI;\n } else {\n start = polarClip.r0;\n end = polarClip.r;\n current = coord[0];\n }\n } else {\n var gridClip = clipShape;\n if (isHorizontalOrRadial) {\n start = gridClip.x;\n end = gridClip.x + gridClip.width;\n current = symbol.x;\n } else {\n start = gridClip.y + gridClip.height;\n end = gridClip.y;\n current = symbol.y;\n }\n }\n }\n var ratio = end === start ? 0 : (current - start) / (end - start);\n if (isAxisInverse) {\n ratio = 1 - ratio;\n }\n var delay = zrUtil.isFunction(seriesDelay) ? seriesDelay(idx) : seriesDuration * ratio + seriesDelayValue;\n var symbolPath = el.getSymbolPath();\n var text = symbolPath.getTextContent();\n el.attr({\n scaleX: 0,\n scaleY: 0\n });\n el.animateTo({\n scaleX: 1,\n scaleY: 1\n }, {\n duration: 200,\n setToFinal: true,\n delay: delay\n });\n if (text) {\n text.animateFrom({\n style: {\n opacity: 0\n }\n }, {\n duration: 300,\n delay: delay\n });\n }\n symbolPath.disableLabelAnimation = true;\n }\n });\n };\n LineView.prototype._initOrUpdateEndLabel = function (seriesModel, coordSys, inheritColor) {\n var endLabelModel = seriesModel.getModel('endLabel');\n if (anyStateShowEndLabel(seriesModel)) {\n var data_2 = seriesModel.getData();\n var polyline = this._polyline;\n // series may be filtered.\n var points = data_2.getLayout('points');\n if (!points) {\n polyline.removeTextContent();\n this._endLabel = null;\n return;\n }\n var endLabel = this._endLabel;\n if (!endLabel) {\n endLabel = this._endLabel = new graphic.Text({\n z2: 200 // should be higher than item symbol\n });\n\n endLabel.ignoreClip = true;\n polyline.setTextContent(this._endLabel);\n polyline.disableLabelAnimation = true;\n }\n // Find last non-NaN data to display data\n var dataIndex = getLastIndexNotNull(points);\n if (dataIndex >= 0) {\n setLabelStyle(polyline, getLabelStatesModels(seriesModel, 'endLabel'), {\n inheritColor: inheritColor,\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: function (dataIndex, opt, interpolatedValue) {\n return interpolatedValue != null ? getDefaultInterpolatedLabel(data_2, interpolatedValue) : getDefaultLabel(data_2, dataIndex);\n },\n enableTextSetter: true\n }, getEndLabelStateSpecified(endLabelModel, coordSys));\n polyline.textConfig.position = null;\n }\n } else if (this._endLabel) {\n this._polyline.removeTextContent();\n this._endLabel = null;\n }\n };\n LineView.prototype._endLabelOnDuring = function (percent, clipRect, data, animationRecord, valueAnimation, endLabelModel, coordSys) {\n var endLabel = this._endLabel;\n var polyline = this._polyline;\n if (endLabel) {\n // NOTE: Don't remove percent < 1. percent === 1 means the first frame during render.\n // The label is not prepared at this time.\n if (percent < 1 && animationRecord.originalX == null) {\n animationRecord.originalX = endLabel.x;\n animationRecord.originalY = endLabel.y;\n }\n var points = data.getLayout('points');\n var seriesModel = data.hostModel;\n var connectNulls = seriesModel.get('connectNulls');\n var precision = endLabelModel.get('precision');\n var distance = endLabelModel.get('distance') || 0;\n var baseAxis = coordSys.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isBaseInversed = baseAxis.inverse;\n var clipShape = clipRect.shape;\n var xOrY = isBaseInversed ? isHorizontal ? clipShape.x : clipShape.y + clipShape.height : isHorizontal ? clipShape.x + clipShape.width : clipShape.y;\n var distanceX = (isHorizontal ? distance : 0) * (isBaseInversed ? -1 : 1);\n var distanceY = (isHorizontal ? 0 : -distance) * (isBaseInversed ? -1 : 1);\n var dim = isHorizontal ? 'x' : 'y';\n var dataIndexRange = getIndexRange(points, xOrY, dim);\n var indices = dataIndexRange.range;\n var diff = indices[1] - indices[0];\n var value = void 0;\n if (diff >= 1) {\n // diff > 1 && connectNulls, which is on the null data.\n if (diff > 1 && !connectNulls) {\n var pt = getPointAtIndex(points, indices[0]);\n endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n valueAnimation && (value = seriesModel.getRawValue(indices[0]));\n } else {\n var pt = polyline.getPointOn(xOrY, dim);\n pt && endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n var startValue = seriesModel.getRawValue(indices[0]);\n var endValue = seriesModel.getRawValue(indices[1]);\n valueAnimation && (value = modelUtil.interpolateRawValues(data, precision, startValue, endValue, dataIndexRange.t));\n }\n animationRecord.lastFrameIndex = indices[0];\n } else {\n // If diff <= 0, which is the range is not found(Include NaN)\n // Choose the first point or last point.\n var idx = percent === 1 || animationRecord.lastFrameIndex > 0 ? indices[0] : 0;\n var pt = getPointAtIndex(points, idx);\n valueAnimation && (value = seriesModel.getRawValue(idx));\n endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n }\n if (valueAnimation) {\n var inner = labelInner(endLabel);\n if (typeof inner.setLabelText === 'function') {\n inner.setLabelText(value);\n }\n }\n }\n };\n /**\n * @private\n */\n // FIXME Two value axis\n LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls) {\n var polyline = this._polyline;\n var polygon = this._polygon;\n var seriesModel = data.hostModel;\n var diff = lineAnimationDiff(this._data, data, this._stackedOnPoints, stackedOnPoints, this._coordSys, coordSys, this._valueOrigin, valueOrigin);\n var current = diff.current;\n var stackedOnCurrent = diff.stackedOnCurrent;\n var next = diff.next;\n var stackedOnNext = diff.stackedOnNext;\n if (step) {\n // TODO If stacked series is not step\n current = turnPointsIntoStep(diff.current, coordSys, step, connectNulls);\n stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step, connectNulls);\n next = turnPointsIntoStep(diff.next, coordSys, step, connectNulls);\n stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step, connectNulls);\n }\n // Don't apply animation if diff is large.\n // For better result and avoid memory explosion problems like\n // https://github.com/apache/incubator-echarts/issues/12229\n if (getBoundingDiff(current, next) > 3000 || polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000) {\n polyline.stopAnimation();\n polyline.setShape({\n points: next\n });\n if (polygon) {\n polygon.stopAnimation();\n polygon.setShape({\n points: next,\n stackedOnPoints: stackedOnNext\n });\n }\n return;\n }\n polyline.shape.__points = diff.current;\n polyline.shape.points = current;\n var target = {\n shape: {\n points: next\n }\n };\n // Also animate the original points.\n // If points reference is changed when turning into step line.\n if (diff.current !== current) {\n target.shape.__points = diff.next;\n }\n // Stop previous animation.\n polyline.stopAnimation();\n graphic.updateProps(polyline, target, seriesModel);\n if (polygon) {\n polygon.setShape({\n // Reuse the points with polyline.\n points: current,\n stackedOnPoints: stackedOnCurrent\n });\n polygon.stopAnimation();\n graphic.updateProps(polygon, {\n shape: {\n stackedOnPoints: stackedOnNext\n }\n }, seriesModel);\n // If use attr directly in updateProps.\n if (polyline.shape.points !== polygon.shape.points) {\n polygon.shape.points = polyline.shape.points;\n }\n }\n var updatedDataInfo = [];\n var diffStatus = diff.status;\n for (var i = 0; i < diffStatus.length; i++) {\n var cmd = diffStatus[i].cmd;\n if (cmd === '=') {\n var el = data.getItemGraphicEl(diffStatus[i].idx1);\n if (el) {\n updatedDataInfo.push({\n el: el,\n ptIdx: i // Index of points\n });\n }\n }\n }\n\n if (polyline.animators && polyline.animators.length) {\n polyline.animators[0].during(function () {\n polygon && polygon.dirtyShape();\n var points = polyline.shape.__points;\n for (var i = 0; i < updatedDataInfo.length; i++) {\n var el = updatedDataInfo[i].el;\n var offset = updatedDataInfo[i].ptIdx * 2;\n el.x = points[offset];\n el.y = points[offset + 1];\n el.markRedraw();\n }\n });\n }\n };\n LineView.prototype.remove = function (ecModel) {\n var group = this.group;\n var oldData = this._data;\n this._lineGroup.removeAll();\n this._symbolDraw.remove(true);\n // Remove temporary created elements when highlighting\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;\n };\n LineView.type = 'line';\n return LineView;\n}(ChartView);\nexport default LineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { map } from 'zrender/lib/core/util.js';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nimport { createFloat32Array } from '../util/vendor.js';\nexport default function pointsLayout(seriesType, forceStoreInTypedArray) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var useTypedArray = forceStoreInTypedArray || pipelineContext.large;\n if (!coordSys) {\n return;\n }\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0])) {\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1])) {\n dims[1] = stackResultDim;\n }\n var store = data.getStore();\n var dimIdx0 = data.getDimensionIndex(dims[0]);\n var dimIdx1 = data.getDimensionIndex(dims[1]);\n return dimLen && {\n progress: function (params, data) {\n var segCount = params.end - params.start;\n var points = useTypedArray && createFloat32Array(segCount * dimLen);\n var tmpIn = [];\n var tmpOut = [];\n for (var i = params.start, offset = 0; i < params.end; i++) {\n var point = void 0;\n if (dimLen === 1) {\n var x = store.get(dimIdx0, i);\n // NOTE: Make sure the second parameter is null to use default strategy.\n point = coordSys.dataToPoint(x, null, tmpOut);\n } else {\n tmpIn[0] = store.get(dimIdx0, i);\n tmpIn[1] = store.get(dimIdx1, i);\n // Let coordinate system to handle the NaN data.\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n if (useTypedArray) {\n points[offset++] = point[0];\n points[offset++] = point[1];\n } else {\n data.setItemLayout(i, point.slice());\n }\n }\n useTypedArray && data.setLayout('points', points);\n }\n };\n }\n };\n}\n;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\nvar samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n }\n // Return NaN if count is 0\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(min) ? min : NaN;\n },\n minmax: function (frame) {\n var turningPointAbsoluteValue = -Infinity;\n var turningPointOriginalValue = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n var originalValue = frame[i];\n var absoluteValue = Math.abs(originalValue);\n if (absoluteValue > turningPointAbsoluteValue) {\n turningPointAbsoluteValue = absoluteValue;\n turningPointOriginalValue = originalValue;\n }\n }\n return isFinite(turningPointOriginalValue) ? turningPointOriginalValue : NaN;\n },\n // TODO\n // Median\n nearest: function (frame) {\n return frame[0];\n }\n};\nvar indexSampler = function (frame) {\n return Math.round(frame.length / 2);\n};\nexport default function dataSample(seriesType) {\n return {\n seriesType: seriesType,\n // FIXME:TS never used, so comment it\n // modifyOutputEnd: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem;\n var count = data.count();\n // Only cartesian2d support down sampling. Disable it when there is few data.\n if (count > 10 && coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent();\n var dpr = api.getDevicePixelRatio();\n // Coordinste system has been resized\n var size = Math.abs(extent[1] - extent[0]) * (dpr || 1);\n var rate = Math.round(count / size);\n if (isFinite(rate) && rate > 1) {\n if (sampling === 'lttb') {\n seriesModel.setData(data.lttbDownSample(data.mapDimension(valueAxis.dim), 1 / rate));\n }\n var sampler = void 0;\n if (isString(sampling)) {\n sampler = samplers[sampling];\n } else if (isFunction(sampling)) {\n sampler = sampling;\n }\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler));\n }\n }\n }\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LineSeries from './LineSeries.js';\nimport LineView from './LineView.js';\n// In case developer forget to include grid component\nimport layoutPoints from '../../layout/points.js';\nimport dataSample from '../../processor/dataSample.js';\nexport function install(registers) {\n registers.registerChartView(LineView);\n registers.registerSeriesModel(LineSeries);\n registers.registerLayout(layoutPoints('line', true));\n registers.registerVisual({\n seriesType: 'line',\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n // Visual coding for legend\n var lineStyle = seriesModel.getModel('lineStyle').getLineStyle();\n if (lineStyle && !lineStyle.stroke) {\n // Fill in visual should be palette color if\n // has color callback\n lineStyle.stroke = data.getVisual('style').fill;\n }\n data.setVisual('legendLineStyle', lineStyle);\n }\n });\n // Down sample after filter\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('line'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { each } from 'zrender/lib/core/util.js';\nvar BaseBarSeriesModel = /** @class */function (_super) {\n __extends(BaseBarSeriesModel, _super);\n function BaseBarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BaseBarSeriesModel.type;\n return _this;\n }\n BaseBarSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n BaseBarSeriesModel.prototype.getMarkerPosition = function (value, dims, startingAtTick) {\n var coordSys = this.coordinateSystem;\n if (coordSys && coordSys.clampData) {\n // PENDING if clamp ?\n var clampData_1 = coordSys.clampData(value);\n var pt_1 = coordSys.dataToPoint(clampData_1);\n if (startingAtTick) {\n each(coordSys.getAxes(), function (axis, idx) {\n // If axis type is category, use tick coords instead\n if (axis.type === 'category' && dims != null) {\n var tickCoords = axis.getTicksCoords();\n var alignTicksWithLabel = axis.getTickModel().get('alignWithLabel');\n var targetTickId = clampData_1[idx];\n // The index of rightmost tick of markArea is 1 larger than x1/y1 index\n var isEnd = dims[idx] === 'x1' || dims[idx] === 'y1';\n if (isEnd && !alignTicksWithLabel) {\n targetTickId += 1;\n }\n // The only contains one tick, tickCoords is\n // like [{coord: 0, tickValue: 0}, {coord: 0}]\n // to the length should always be larger than 1\n if (tickCoords.length < 2) {\n return;\n } else if (tickCoords.length === 2) {\n // The left value and right value of the axis are\n // the same. coord is 0 in both items. Use the max\n // value of the axis as the coord\n pt_1[idx] = axis.toGlobalCoord(axis.getExtent()[isEnd ? 1 : 0]);\n return;\n }\n var leftCoord = void 0;\n var coord = void 0;\n var stepTickValue = 1;\n for (var i = 0; i < tickCoords.length; i++) {\n var tickCoord = tickCoords[i].coord;\n // The last item of tickCoords doesn't contain\n // tickValue\n var tickValue = i === tickCoords.length - 1 ? tickCoords[i - 1].tickValue + stepTickValue : tickCoords[i].tickValue;\n if (tickValue === targetTickId) {\n coord = tickCoord;\n break;\n } else if (tickValue < targetTickId) {\n leftCoord = tickCoord;\n } else if (leftCoord != null && tickValue > targetTickId) {\n coord = (tickCoord + leftCoord) / 2;\n break;\n }\n if (i === 1) {\n // Here we assume the step of category axes is\n // the same\n stepTickValue = tickValue - tickCoords[0].tickValue;\n }\n }\n if (coord == null) {\n if (!leftCoord) {\n // targetTickId is smaller than all tick ids in the\n // visible area, use the leftmost tick coord\n coord = tickCoords[0].coord;\n } else if (leftCoord) {\n // targetTickId is larger than all tick ids in the\n // visible area, use the rightmost tick coord\n coord = tickCoords[tickCoords.length - 1].coord;\n }\n }\n pt_1[idx] = axis.toGlobalCoord(coord);\n }\n });\n } else {\n var data = this.getData();\n var offset = data.getLayout('offset');\n var size = data.getLayout('size');\n var offsetIndex = coordSys.getBaseAxis().isHorizontal() ? 0 : 1;\n pt_1[offsetIndex] += offset + size / 2;\n }\n return pt_1;\n }\n return [NaN, NaN];\n };\n BaseBarSeriesModel.type = 'series.__base_bar__';\n BaseBarSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n // stack: null\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n barMinHeight: 0,\n barMinAngle: 0,\n // cursor: null,\n large: false,\n largeThreshold: 400,\n progressive: 3e3,\n progressiveChunkMode: 'mod'\n };\n return BaseBarSeriesModel;\n}(SeriesModel);\nSeriesModel.registerClass(BaseBarSeriesModel);\nexport default BaseBarSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseBarSeriesModel from './BaseBarSeries.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar BarSeriesModel = /** @class */function (_super) {\n __extends(BarSeriesModel, _super);\n function BarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BarSeriesModel.type;\n return _this;\n }\n BarSeriesModel.prototype.getInitialData = function () {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true,\n createInvertedIndices: !!this.get('realtimeSort', true) || null\n });\n };\n /**\n * @override\n */\n BarSeriesModel.prototype.getProgressive = function () {\n // Do not support progressive in normal mode.\n return this.get('large') ? this.get('progressive') : false;\n };\n /**\n * @override\n */\n BarSeriesModel.prototype.getProgressiveThreshold = function () {\n // Do not support progressive in normal mode.\n var progressiveThreshold = this.get('progressiveThreshold');\n var largeThreshold = this.get('largeThreshold');\n if (largeThreshold > progressiveThreshold) {\n progressiveThreshold = largeThreshold;\n }\n return progressiveThreshold;\n };\n BarSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.rect(data.getItemLayout(dataIndex));\n };\n BarSeriesModel.type = 'series.bar';\n BarSeriesModel.dependencies = ['grid', 'polar'];\n BarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeriesModel.defaultOption, {\n // If clipped\n // Only available on cartesian2d\n clip: true,\n roundCap: false,\n showBackground: false,\n backgroundStyle: {\n color: 'rgba(180, 180, 180, 0.2)',\n borderColor: null,\n borderWidth: 0,\n borderType: 'solid',\n borderRadius: 0,\n shadowBlur: 0,\n shadowColor: null,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n realtimeSort: false\n });\n return BarSeriesModel;\n}(BaseBarSeriesModel);\nexport default BarSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { Path } from '../graphic.js';\n/**\n * Sausage: similar to sector, but have half circle on both sides\n */\nvar SausageShape = /** @class */function () {\n function SausageShape() {\n this.cx = 0;\n this.cy = 0;\n this.r0 = 0;\n this.r = 0;\n this.startAngle = 0;\n this.endAngle = Math.PI * 2;\n this.clockwise = true;\n }\n return SausageShape;\n}();\nvar SausagePath = /** @class */function (_super) {\n __extends(SausagePath, _super);\n function SausagePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'sausage';\n return _this;\n }\n SausagePath.prototype.getDefaultShape = function () {\n return new SausageShape();\n };\n SausagePath.prototype.buildPath = function (ctx, shape) {\n var cx = shape.cx;\n var cy = shape.cy;\n var r0 = Math.max(shape.r0 || 0, 0);\n var r = Math.max(shape.r, 0);\n var dr = (r - r0) * 0.5;\n var rCenter = r0 + dr;\n var startAngle = shape.startAngle;\n var endAngle = shape.endAngle;\n var clockwise = shape.clockwise;\n var PI2 = Math.PI * 2;\n var lessThanCircle = clockwise ? endAngle - startAngle < PI2 : startAngle - endAngle < PI2;\n if (!lessThanCircle) {\n // Normalize angles\n startAngle = endAngle - (clockwise ? PI2 : -PI2);\n }\n var unitStartX = Math.cos(startAngle);\n var unitStartY = Math.sin(startAngle);\n var unitEndX = Math.cos(endAngle);\n var unitEndY = Math.sin(endAngle);\n if (lessThanCircle) {\n ctx.moveTo(unitStartX * r0 + cx, unitStartY * r0 + cy);\n ctx.arc(unitStartX * rCenter + cx, unitStartY * rCenter + cy, dr, -Math.PI + startAngle, startAngle, !clockwise);\n } else {\n ctx.moveTo(unitStartX * r + cx, unitStartY * r + cy);\n }\n ctx.arc(cx, cy, r, startAngle, endAngle, !clockwise);\n ctx.arc(unitEndX * rCenter + cx, unitEndY * rCenter + cy, dr, endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise);\n if (r0 !== 0) {\n ctx.arc(cx, cy, r0, endAngle, startAngle, clockwise);\n }\n // ctx.closePath();\n };\n\n return SausagePath;\n}(Path);\nexport default SausagePath;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { calculateTextPosition } from 'zrender/lib/contain/text.js';\nimport { isArray, isNumber } from 'zrender/lib/core/util.js';\nexport function createSectorCalculateTextPosition(positionMapping, opts) {\n opts = opts || {};\n var isRoundCap = opts.isRoundCap;\n return function (out, opts, boundingRect) {\n var textPosition = opts.position;\n if (!textPosition || textPosition instanceof Array) {\n return calculateTextPosition(out, opts, boundingRect);\n }\n var mappedSectorPosition = positionMapping(textPosition);\n var distance = opts.distance != null ? opts.distance : 5;\n var sector = this.shape;\n var cx = sector.cx;\n var cy = sector.cy;\n var r = sector.r;\n var r0 = sector.r0;\n var middleR = (r + r0) / 2;\n var startAngle = sector.startAngle;\n var endAngle = sector.endAngle;\n var middleAngle = (startAngle + endAngle) / 2;\n var extraDist = isRoundCap ? Math.abs(r - r0) / 2 : 0;\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n // base position: top-left\n var x = cx + r * mathCos(startAngle);\n var y = cy + r * mathSin(startAngle);\n var textAlign = 'left';\n var textVerticalAlign = 'top';\n switch (mappedSectorPosition) {\n case 'startArc':\n x = cx + (r0 - distance) * mathCos(middleAngle);\n y = cy + (r0 - distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'top';\n break;\n case 'insideStartArc':\n x = cx + (r0 + distance) * mathCos(middleAngle);\n y = cy + (r0 + distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'startAngle':\n x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, distance + extraDist, false);\n y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, distance + extraDist, false);\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n case 'insideStartAngle':\n x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, -distance + extraDist, false);\n y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, -distance + extraDist, false);\n textAlign = 'left';\n textVerticalAlign = 'middle';\n break;\n case 'middle':\n x = cx + middleR * mathCos(middleAngle);\n y = cy + middleR * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'middle';\n break;\n case 'endArc':\n x = cx + (r + distance) * mathCos(middleAngle);\n y = cy + (r + distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'insideEndArc':\n x = cx + (r - distance) * mathCos(middleAngle);\n y = cy + (r - distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'top';\n break;\n case 'endAngle':\n x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, distance + extraDist, true);\n y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, distance + extraDist, true);\n textAlign = 'left';\n textVerticalAlign = 'middle';\n break;\n case 'insideEndAngle':\n x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, -distance + extraDist, true);\n y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, -distance + extraDist, true);\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n default:\n return calculateTextPosition(out, opts, boundingRect);\n }\n out = out || {};\n out.x = x;\n out.y = y;\n out.align = textAlign;\n out.verticalAlign = textVerticalAlign;\n return out;\n };\n}\nexport function setSectorTextRotation(sector, textPosition, positionMapping, rotateType) {\n if (isNumber(rotateType)) {\n // user-set rotation\n sector.setTextConfig({\n rotation: rotateType\n });\n return;\n } else if (isArray(textPosition)) {\n // user-set position, use 0 as auto rotation\n sector.setTextConfig({\n rotation: 0\n });\n return;\n }\n var shape = sector.shape;\n var startAngle = shape.clockwise ? shape.startAngle : shape.endAngle;\n var endAngle = shape.clockwise ? shape.endAngle : shape.startAngle;\n var middleAngle = (startAngle + endAngle) / 2;\n var anchorAngle;\n var mappedSectorPosition = positionMapping(textPosition);\n switch (mappedSectorPosition) {\n case 'startArc':\n case 'insideStartArc':\n case 'middle':\n case 'insideEndArc':\n case 'endArc':\n anchorAngle = middleAngle;\n break;\n case 'startAngle':\n case 'insideStartAngle':\n anchorAngle = startAngle;\n break;\n case 'endAngle':\n case 'insideEndAngle':\n anchorAngle = endAngle;\n break;\n default:\n sector.setTextConfig({\n rotation: 0\n });\n return;\n }\n var rotate = Math.PI * 1.5 - anchorAngle;\n /**\n * TODO: labels with rotate > Math.PI / 2 should be rotate another\n * half round flipped to increase readability. However, only middle\n * position supports this for now, because in other positions, the\n * anchor point is not at the center of the text, so the positions\n * after rotating is not as expected.\n */\n if (mappedSectorPosition === 'middle' && rotate > Math.PI / 2 && rotate < Math.PI * 1.5) {\n rotate -= Math.PI;\n }\n sector.setTextConfig({\n rotation: rotate\n });\n}\nfunction adjustAngleDistanceX(angle, distance, isEnd) {\n return distance * Math.sin(angle) * (isEnd ? -1 : 1);\n}\nfunction adjustAngleDistanceY(angle, distance, isEnd) {\n return distance * Math.cos(angle) * (isEnd ? 1 : -1);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray, map } from 'zrender/lib/core/util.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nexport function getSectorCornerRadius(model, shape, zeroIfNull) {\n var cornerRadius = model.get('borderRadius');\n if (cornerRadius == null) {\n return zeroIfNull ? {\n cornerRadius: 0\n } : null;\n }\n if (!isArray(cornerRadius)) {\n cornerRadius = [cornerRadius, cornerRadius, cornerRadius, cornerRadius];\n }\n var dr = Math.abs(shape.r || 0 - shape.r0 || 0);\n return {\n cornerRadius: map(cornerRadius, function (cr) {\n return parsePercent(cr, dr);\n })\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Path from 'zrender/lib/graphic/Path.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport { extend, each, map } from 'zrender/lib/core/util.js';\nimport { Rect, Sector, updateProps, initProps, removeElementWithFadeOut, traverseElements } from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels, setLabelValueAnimation, labelInner } from '../../label/labelStyle.js';\nimport { throttle } from '../../util/throttle.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport Sausage from '../../util/shape/sausage.js';\nimport ChartView from '../../view/Chart.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper.js';\nimport { warn } from '../../util/log.js';\nimport { createSectorCalculateTextPosition, setSectorTextRotation } from '../../label/sectorLabel.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nfunction getClipArea(coord, data) {\n var coordSysClipArea = coord.getArea && coord.getArea();\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var baseAxis = coord.getBaseAxis();\n // When boundaryGap is false or using time axis. bar may exceed the grid.\n // We should not clip this part.\n // See test/bar2.html\n if (baseAxis.type !== 'category' || !baseAxis.onBand) {\n var expandWidth = data.getLayout('bandWidth');\n if (baseAxis.isHorizontal()) {\n coordSysClipArea.x -= expandWidth;\n coordSysClipArea.width += expandWidth * 2;\n } else {\n coordSysClipArea.y -= expandWidth;\n coordSysClipArea.height += expandWidth * 2;\n }\n }\n }\n return coordSysClipArea;\n}\nvar BarView = /** @class */function (_super) {\n __extends(BarView, _super);\n function BarView() {\n var _this = _super.call(this) || this;\n _this.type = BarView.type;\n _this._isFirstFrame = true;\n return _this;\n }\n BarView.prototype.render = function (seriesModel, ecModel, api, payload) {\n this._model = seriesModel;\n this._removeOnRenderedListener(api);\n this._updateDrawMode(seriesModel);\n var coordinateSystemType = seriesModel.get('coordinateSystem');\n if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') {\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n this._isLargeDraw ? this._renderLarge(seriesModel, ecModel, api) : this._renderNormal(seriesModel, ecModel, api, payload);\n } else if (process.env.NODE_ENV !== 'production') {\n warn('Only cartesian2d and polar supported for bar.');\n }\n };\n BarView.prototype.incrementalPrepareRender = function (seriesModel) {\n this._clear();\n this._updateDrawMode(seriesModel);\n // incremental also need to clip, otherwise might be overlow.\n // But must not set clip in each frame, otherwise all of the children will be marked redraw.\n this._updateLargeClip(seriesModel);\n };\n BarView.prototype.incrementalRender = function (params, seriesModel) {\n // Reset\n this._progressiveEls = [];\n // Do not support progressive in normal mode.\n this._incrementalRenderLarge(params, seriesModel);\n };\n BarView.prototype.eachRendered = function (cb) {\n traverseElements(this._progressiveEls || this.group, cb);\n };\n BarView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n this._clear();\n }\n };\n BarView.prototype._renderNormal = function (seriesModel, ecModel, api, payload) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n var coord = seriesModel.coordinateSystem;\n var baseAxis = coord.getBaseAxis();\n var isHorizontalOrRadial;\n if (coord.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n } else if (coord.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n }\n var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null;\n var realtimeSortCfg = shouldRealtimeSort(seriesModel, coord);\n if (realtimeSortCfg) {\n this._enableRealtimeSort(realtimeSortCfg, data, api);\n }\n var needsClip = seriesModel.get('clip', true) || realtimeSortCfg;\n var coordSysClipArea = getClipArea(coord, data);\n // If there is clipPath created in large mode. Remove it.\n group.removeClipPath();\n // We don't use clipPath in normal mode because we needs a perfect animation\n // And don't want the label are clipped.\n var roundCap = seriesModel.get('roundCap', true);\n var drawBackground = seriesModel.get('showBackground', true);\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var barBorderRadius = backgroundModel.get('borderRadius') || 0;\n var bgEls = [];\n var oldBgEls = this._backgroundEls;\n var isInitSort = payload && payload.isInitSort;\n var isChangeOrder = payload && payload.type === 'changeAxisOrder';\n function createBackground(dataIndex) {\n var bgLayout = getLayout[coord.type](data, dataIndex);\n var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);\n bgEl.useStyle(backgroundModel.getItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n } else {\n bgEl.setShape('cornerRadius', barBorderRadius);\n }\n bgEls[dataIndex] = bgEl;\n return bgEl;\n }\n ;\n data.diff(oldData).add(function (dataIndex) {\n var itemModel = data.getItemModel(dataIndex);\n var layout = getLayout[coord.type](data, dataIndex, itemModel);\n if (drawBackground) {\n createBackground(dataIndex);\n }\n // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in \"axisProxy\".\n if (!data.hasValue(dataIndex) || !isValidLayout[coord.type](layout)) {\n return;\n }\n var isClipped = false;\n if (needsClip) {\n // Clip will modify the layout params.\n // And return a boolean to determine if the shape are fully clipped.\n isClipped = clip[coord.type](coordSysClipArea, layout);\n }\n var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap);\n if (realtimeSortCfg) {\n /**\n * Force label animation because even if the element is\n * ignored because it's clipped, it may not be clipped after\n * changing order. Then, if not using forceLabelAnimation,\n * the label animation was never started, in which case,\n * the label will be the final value and doesn't have label\n * animation.\n */\n el.forceLabelAnimation = true;\n }\n updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n if (isInitSort) {\n el.attr({\n shape: layout\n });\n } else if (realtimeSortCfg) {\n updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, dataIndex, isHorizontalOrRadial, false, false);\n } else {\n initProps(el, {\n shape: layout\n }, seriesModel, dataIndex);\n }\n data.setItemGraphicEl(dataIndex, el);\n group.add(el);\n el.ignore = isClipped;\n }).update(function (newIndex, oldIndex) {\n var itemModel = data.getItemModel(newIndex);\n var layout = getLayout[coord.type](data, newIndex, itemModel);\n if (drawBackground) {\n var bgEl = void 0;\n if (oldBgEls.length === 0) {\n bgEl = createBackground(oldIndex);\n } else {\n bgEl = oldBgEls[oldIndex];\n bgEl.useStyle(backgroundModel.getItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n } else {\n bgEl.setShape('cornerRadius', barBorderRadius);\n }\n bgEls[newIndex] = bgEl;\n }\n var bgLayout = getLayout[coord.type](data, newIndex);\n var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);\n updateProps(bgEl, {\n shape: shape\n }, animationModel, newIndex);\n }\n var el = oldData.getItemGraphicEl(oldIndex);\n if (!data.hasValue(newIndex) || !isValidLayout[coord.type](layout)) {\n group.remove(el);\n return;\n }\n var isClipped = false;\n if (needsClip) {\n isClipped = clip[coord.type](coordSysClipArea, layout);\n if (isClipped) {\n group.remove(el);\n }\n }\n if (!el) {\n el = elementCreator[coord.type](seriesModel, data, newIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, !!el, roundCap);\n } else {\n saveOldStyle(el);\n }\n if (realtimeSortCfg) {\n el.forceLabelAnimation = true;\n }\n if (isChangeOrder) {\n var textEl = el.getTextContent();\n if (textEl) {\n var labelInnerStore = labelInner(textEl);\n if (labelInnerStore.prevValue != null) {\n /**\n * Set preValue to be value so that no new label\n * should be started, otherwise, it will take a full\n * `animationDurationUpdate` time to finish the\n * animation, which is not expected.\n */\n labelInnerStore.prevValue = labelInnerStore.value;\n }\n }\n }\n // Not change anything if only order changed.\n // Especially not change label.\n else {\n updateStyle(el, data, newIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n }\n if (isInitSort) {\n el.attr({\n shape: layout\n });\n } else if (realtimeSortCfg) {\n updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, newIndex, isHorizontalOrRadial, true, isChangeOrder);\n } else {\n updateProps(el, {\n shape: layout\n }, seriesModel, newIndex, null);\n }\n data.setItemGraphicEl(newIndex, el);\n el.ignore = isClipped;\n group.add(el);\n }).remove(function (dataIndex) {\n var el = oldData.getItemGraphicEl(dataIndex);\n el && removeElementWithFadeOut(el, seriesModel, dataIndex);\n }).execute();\n var bgGroup = this._backgroundGroup || (this._backgroundGroup = new Group());\n bgGroup.removeAll();\n for (var i = 0; i < bgEls.length; ++i) {\n bgGroup.add(bgEls[i]);\n }\n group.add(bgGroup);\n this._backgroundEls = bgEls;\n this._data = data;\n };\n BarView.prototype._renderLarge = function (seriesModel, ecModel, api) {\n this._clear();\n createLarge(seriesModel, this.group);\n this._updateLargeClip(seriesModel);\n };\n BarView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n this._removeBackground();\n createLarge(seriesModel, this.group, this._progressiveEls, true);\n };\n BarView.prototype._updateLargeClip = function (seriesModel) {\n // Use clipPath in large mode.\n var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);\n var group = this.group;\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n };\n BarView.prototype._enableRealtimeSort = function (realtimeSortCfg, data, api) {\n var _this = this;\n // If no data in the first frame, wait for data to initSort\n if (!data.count()) {\n return;\n }\n var baseAxis = realtimeSortCfg.baseAxis;\n if (this._isFirstFrame) {\n this._dispatchInitSort(data, realtimeSortCfg, api);\n this._isFirstFrame = false;\n } else {\n var orderMapping_1 = function (idx) {\n var el = data.getItemGraphicEl(idx);\n var shape = el && el.shape;\n return shape &&\n // The result should be consistent with the initial sort by data value.\n // Do not support the case that both positive and negative exist.\n Math.abs(baseAxis.isHorizontal() ? shape.height : shape.width)\n // If data is NaN, shape.xxx may be NaN, so use || 0 here in case\n || 0;\n };\n this._onRendered = function () {\n _this._updateSortWithinSameData(data, orderMapping_1, baseAxis, api);\n };\n api.getZr().on('rendered', this._onRendered);\n }\n };\n BarView.prototype._dataSort = function (data, baseAxis, orderMapping) {\n var info = [];\n data.each(data.mapDimension(baseAxis.dim), function (ordinalNumber, dataIdx) {\n var mappedValue = orderMapping(dataIdx);\n mappedValue = mappedValue == null ? NaN : mappedValue;\n info.push({\n dataIndex: dataIdx,\n mappedValue: mappedValue,\n ordinalNumber: ordinalNumber\n });\n });\n info.sort(function (a, b) {\n // If NaN, it will be treated as min val.\n return b.mappedValue - a.mappedValue;\n });\n return {\n ordinalNumbers: map(info, function (item) {\n return item.ordinalNumber;\n })\n };\n };\n BarView.prototype._isOrderChangedWithinSameData = function (data, orderMapping, baseAxis) {\n var scale = baseAxis.scale;\n var ordinalDataDim = data.mapDimension(baseAxis.dim);\n var lastValue = Number.MAX_VALUE;\n for (var tickNum = 0, len = scale.getOrdinalMeta().categories.length; tickNum < len; ++tickNum) {\n var rawIdx = data.rawIndexOf(ordinalDataDim, scale.getRawOrdinalNumber(tickNum));\n var value = rawIdx < 0\n // If some tick have no bar, the tick will be treated as min.\n ? Number.MIN_VALUE\n // PENDING: if dataZoom on baseAxis exits, is it a performance issue?\n : orderMapping(data.indexOfRawIndex(rawIdx));\n if (value > lastValue) {\n return true;\n }\n lastValue = value;\n }\n return false;\n };\n /*\n * Consider the case when A and B changed order, whose representing\n * bars are both out of sight, we don't wish to trigger reorder action\n * as long as the order in the view doesn't change.\n */\n BarView.prototype._isOrderDifferentInView = function (orderInfo, baseAxis) {\n var scale = baseAxis.scale;\n var extent = scale.getExtent();\n var tickNum = Math.max(0, extent[0]);\n var tickMax = Math.min(extent[1], scale.getOrdinalMeta().categories.length - 1);\n for (; tickNum <= tickMax; ++tickNum) {\n if (orderInfo.ordinalNumbers[tickNum] !== scale.getRawOrdinalNumber(tickNum)) {\n return true;\n }\n }\n };\n BarView.prototype._updateSortWithinSameData = function (data, orderMapping, baseAxis, api) {\n if (!this._isOrderChangedWithinSameData(data, orderMapping, baseAxis)) {\n return;\n }\n var sortInfo = this._dataSort(data, baseAxis, orderMapping);\n if (this._isOrderDifferentInView(sortInfo, baseAxis)) {\n this._removeOnRenderedListener(api);\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n axisId: baseAxis.index,\n sortInfo: sortInfo\n });\n }\n };\n BarView.prototype._dispatchInitSort = function (data, realtimeSortCfg, api) {\n var baseAxis = realtimeSortCfg.baseAxis;\n var sortResult = this._dataSort(data, baseAxis, function (dataIdx) {\n return data.get(data.mapDimension(realtimeSortCfg.otherAxis.dim), dataIdx);\n });\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n isInitSort: true,\n axisId: baseAxis.index,\n sortInfo: sortResult\n });\n };\n BarView.prototype.remove = function (ecModel, api) {\n this._clear(this._model);\n this._removeOnRenderedListener(api);\n };\n BarView.prototype.dispose = function (ecModel, api) {\n this._removeOnRenderedListener(api);\n };\n BarView.prototype._removeOnRenderedListener = function (api) {\n if (this._onRendered) {\n api.getZr().off('rendered', this._onRendered);\n this._onRendered = null;\n }\n };\n BarView.prototype._clear = function (model) {\n var group = this.group;\n var data = this._data;\n if (model && model.isAnimationEnabled() && data && !this._isLargeDraw) {\n this._removeBackground();\n this._backgroundEls = [];\n data.eachItemGraphicEl(function (el) {\n removeElementWithFadeOut(el, model, getECData(el).dataIndex);\n });\n } else {\n group.removeAll();\n }\n this._data = null;\n this._isFirstFrame = true;\n };\n BarView.prototype._removeBackground = function () {\n this.group.remove(this._backgroundGroup);\n this._backgroundGroup = null;\n };\n BarView.type = 'bar';\n return BarView;\n}(ChartView);\nvar clip = {\n cartesian2d: function (coordSysBoundingRect, layout) {\n var signWidth = layout.width < 0 ? -1 : 1;\n var signHeight = layout.height < 0 ? -1 : 1;\n // Needs positive width and height\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n var coordSysX2 = coordSysBoundingRect.x + coordSysBoundingRect.width;\n var coordSysY2 = coordSysBoundingRect.y + coordSysBoundingRect.height;\n var x = mathMax(layout.x, coordSysBoundingRect.x);\n var x2 = mathMin(layout.x + layout.width, coordSysX2);\n var y = mathMax(layout.y, coordSysBoundingRect.y);\n var y2 = mathMin(layout.y + layout.height, coordSysY2);\n var xClipped = x2 < x;\n var yClipped = y2 < y;\n // When xClipped or yClipped, the element will be marked as `ignore`.\n // But we should also place the element at the edge of the coord sys bounding rect.\n // Because if data changed and the bar shows again, its transition animation\n // will begin at this place.\n layout.x = xClipped && x > coordSysX2 ? x2 : x;\n layout.y = yClipped && y > coordSysY2 ? y2 : y;\n layout.width = xClipped ? 0 : x2 - x;\n layout.height = yClipped ? 0 : y2 - y;\n // Reverse back\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n return xClipped || yClipped;\n },\n polar: function (coordSysClipArea, layout) {\n var signR = layout.r0 <= layout.r ? 1 : -1;\n // Make sure r is larger than r0\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\n }\n var r = mathMin(layout.r, coordSysClipArea.r);\n var r0 = mathMax(layout.r0, coordSysClipArea.r0);\n layout.r = r;\n layout.r0 = r0;\n var clipped = r - r0 < 0;\n // Reverse back\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\n }\n return clipped;\n }\n};\nvar elementCreator = {\n cartesian2d: function (seriesModel, data, newIndex, layout, isHorizontal, animationModel, axisModel, isUpdate, roundCap) {\n var rect = new Rect({\n shape: extend({}, layout),\n z2: 1\n });\n rect.__dataIndex = newIndex;\n rect.name = 'item';\n if (animationModel) {\n var rectShape = rect.shape;\n var animateProperty = isHorizontal ? 'height' : 'width';\n rectShape[animateProperty] = 0;\n }\n return rect;\n },\n polar: function (seriesModel, data, newIndex, layout, isRadial, animationModel, axisModel, isUpdate, roundCap) {\n var ShapeClass = !isRadial && roundCap ? Sausage : Sector;\n var sector = new ShapeClass({\n shape: layout,\n z2: 1\n });\n sector.name = 'item';\n var positionMap = createPolarPositionMapping(isRadial);\n sector.calculateTextPosition = createSectorCalculateTextPosition(positionMap, {\n isRoundCap: ShapeClass === Sausage\n });\n // Animation\n if (animationModel) {\n var sectorShape = sector.shape;\n var animateProperty = isRadial ? 'r' : 'endAngle';\n var animateTarget = {};\n sectorShape[animateProperty] = isRadial ? layout.r0 : layout.startAngle;\n animateTarget[animateProperty] = layout[animateProperty];\n (isUpdate ? updateProps : initProps)(sector, {\n shape: animateTarget\n // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue\n }, animationModel);\n }\n return sector;\n }\n};\nfunction shouldRealtimeSort(seriesModel, coordSys) {\n var realtimeSortOption = seriesModel.get('realtimeSort', true);\n var baseAxis = coordSys.getBaseAxis();\n if (process.env.NODE_ENV !== 'production') {\n if (realtimeSortOption) {\n if (baseAxis.type !== 'category') {\n warn('`realtimeSort` will not work because this bar series is not based on a category axis.');\n }\n if (coordSys.type !== 'cartesian2d') {\n warn('`realtimeSort` will not work because this bar series is not on cartesian2d.');\n }\n }\n }\n if (realtimeSortOption && baseAxis.type === 'category' && coordSys.type === 'cartesian2d') {\n return {\n baseAxis: baseAxis,\n otherAxis: coordSys.getOtherAxis(baseAxis)\n };\n }\n}\nfunction updateRealtimeAnimation(realtimeSortCfg, seriesAnimationModel, el, layout, newIndex, isHorizontal, isUpdate, isChangeOrder) {\n var seriesTarget;\n var axisTarget;\n if (isHorizontal) {\n axisTarget = {\n x: layout.x,\n width: layout.width\n };\n seriesTarget = {\n y: layout.y,\n height: layout.height\n };\n } else {\n axisTarget = {\n y: layout.y,\n height: layout.height\n };\n seriesTarget = {\n x: layout.x,\n width: layout.width\n };\n }\n if (!isChangeOrder) {\n // Keep the original growth animation if only axis order changed.\n // Not start a new animation.\n (isUpdate ? updateProps : initProps)(el, {\n shape: seriesTarget\n }, seriesAnimationModel, newIndex, null);\n }\n var axisAnimationModel = seriesAnimationModel ? realtimeSortCfg.baseAxis.model : null;\n (isUpdate ? updateProps : initProps)(el, {\n shape: axisTarget\n }, axisAnimationModel, newIndex);\n}\nfunction checkPropertiesNotValid(obj, props) {\n for (var i = 0; i < props.length; i++) {\n if (!isFinite(obj[props[i]])) {\n return true;\n }\n }\n return false;\n}\nvar rectPropties = ['x', 'y', 'width', 'height'];\nvar polarPropties = ['cx', 'cy', 'r', 'startAngle', 'endAngle'];\nvar isValidLayout = {\n cartesian2d: function (layout) {\n return !checkPropertiesNotValid(layout, rectPropties);\n },\n polar: function (layout) {\n return !checkPropertiesNotValid(layout, polarPropties);\n }\n};\nvar getLayout = {\n // itemModel is only used to get borderWidth, which is not needed\n // when calculating bar background layout.\n cartesian2d: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0;\n // fix layout with lineWidth\n var signX = layout.width > 0 ? 1 : -1;\n var signY = layout.height > 0 ? 1 : -1;\n return {\n x: layout.x + signX * fixedLineWidth / 2,\n y: layout.y + signY * fixedLineWidth / 2,\n width: layout.width - signX * fixedLineWidth,\n height: layout.height - signY * fixedLineWidth\n };\n },\n polar: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n return {\n cx: layout.cx,\n cy: layout.cy,\n r0: layout.r0,\n r: layout.r,\n startAngle: layout.startAngle,\n endAngle: layout.endAngle,\n clockwise: layout.clockwise\n };\n }\n};\nfunction isZeroOnPolar(layout) {\n return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle;\n}\nfunction createPolarPositionMapping(isRadial) {\n return function (isRadial) {\n var arcOrAngle = isRadial ? 'Arc' : 'Angle';\n return function (position) {\n switch (position) {\n case 'start':\n case 'insideStart':\n case 'end':\n case 'insideEnd':\n return position + arcOrAngle;\n default:\n return position;\n }\n };\n }(isRadial);\n}\nfunction updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, isPolar) {\n var style = data.getItemVisual(dataIndex, 'style');\n if (!isPolar) {\n var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0;\n el.setShape('r', borderRadius);\n } else if (!seriesModel.get('roundCap')) {\n var sectorShape = el.shape;\n var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true);\n extend(sectorShape, cornerRadius);\n el.setShape(sectorShape);\n }\n el.useStyle(style);\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && el.attr('cursor', cursorStyle);\n var labelPositionOutside = isPolar ? isHorizontalOrRadial ? layout.r >= layout.r0 ? 'endArc' : 'startArc' : layout.endAngle >= layout.startAngle ? 'endAngle' : 'startAngle' : isHorizontalOrRadial ? layout.height >= 0 ? 'bottom' : 'top' : layout.width >= 0 ? 'right' : 'left';\n var labelStatesModels = getLabelStatesModels(itemModel);\n setLabelStyle(el, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: getDefaultLabel(seriesModel.getData(), dataIndex),\n inheritColor: style.fill,\n defaultOpacity: style.opacity,\n defaultOutsidePosition: labelPositionOutside\n });\n var label = el.getTextContent();\n if (isPolar && label) {\n var position = itemModel.get(['label', 'position']);\n el.textConfig.inside = position === 'middle' ? true : null;\n setSectorTextRotation(el, position === 'outside' ? labelPositionOutside : position, createPolarPositionMapping(isHorizontalOrRadial), itemModel.get(['label', 'rotate']));\n }\n setLabelValueAnimation(label, labelStatesModels, seriesModel.getRawValue(dataIndex), function (value) {\n return getDefaultInterpolatedLabel(data, value);\n });\n var emphasisModel = itemModel.getModel(['emphasis']);\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n setStatesStylesFromModel(el, itemModel);\n if (isZeroOnPolar(layout)) {\n el.style.fill = 'none';\n el.style.stroke = 'none';\n each(el.states, function (state) {\n if (state.style) {\n state.style.fill = state.style.stroke = 'none';\n }\n });\n }\n}\n// In case width or height are too small.\nfunction getLineWidth(itemModel, rawLayout) {\n // Has no border.\n var borderColor = itemModel.get(['itemStyle', 'borderColor']);\n if (!borderColor || borderColor === 'none') {\n return 0;\n }\n var lineWidth = itemModel.get(['itemStyle', 'borderWidth']) || 0;\n // width or height may be NaN for empty data\n var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width);\n var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height);\n return Math.min(lineWidth, width, height);\n}\nvar LagePathShape = /** @class */function () {\n function LagePathShape() {}\n return LagePathShape;\n}();\nvar LargePath = /** @class */function (_super) {\n __extends(LargePath, _super);\n function LargePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'largeBar';\n return _this;\n }\n LargePath.prototype.getDefaultShape = function () {\n return new LagePathShape();\n };\n LargePath.prototype.buildPath = function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n var baseDimIdx = this.baseDimIdx;\n var valueDimIdx = 1 - this.baseDimIdx;\n var startPoint = [];\n var size = [];\n var barWidth = this.barWidth;\n for (var i = 0; i < points.length; i += 3) {\n size[baseDimIdx] = barWidth;\n size[valueDimIdx] = points[i + 2];\n startPoint[baseDimIdx] = points[i + baseDimIdx];\n startPoint[valueDimIdx] = points[i + valueDimIdx];\n ctx.rect(startPoint[0], startPoint[1], size[0], size[1]);\n }\n };\n return LargePath;\n}(Path);\nfunction createLarge(seriesModel, group, progressiveEls, incremental) {\n // TODO support polar\n var data = seriesModel.getData();\n var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0;\n var largeDataIndices = data.getLayout('largeDataIndices');\n var barWidth = data.getLayout('size');\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var bgPoints = data.getLayout('largeBackgroundPoints');\n if (bgPoints) {\n var bgEl = new LargePath({\n shape: {\n points: bgPoints\n },\n incremental: !!incremental,\n silent: true,\n z2: 0\n });\n bgEl.baseDimIdx = baseDimIdx;\n bgEl.largeDataIndices = largeDataIndices;\n bgEl.barWidth = barWidth;\n bgEl.useStyle(backgroundModel.getItemStyle());\n group.add(bgEl);\n progressiveEls && progressiveEls.push(bgEl);\n }\n var el = new LargePath({\n shape: {\n points: data.getLayout('largePoints')\n },\n incremental: !!incremental,\n ignoreCoarsePointer: true,\n z2: 1\n });\n el.baseDimIdx = baseDimIdx;\n el.largeDataIndices = largeDataIndices;\n el.barWidth = barWidth;\n group.add(el);\n el.useStyle(data.getVisual('style'));\n // Enable tooltip and user mouse/touch event handlers.\n getECData(el).seriesIndex = seriesModel.seriesIndex;\n if (!seriesModel.get('silent')) {\n el.on('mousedown', largePathUpdateDataIndex);\n el.on('mousemove', largePathUpdateDataIndex);\n }\n progressiveEls && progressiveEls.push(el);\n}\n// Use throttle to avoid frequently traverse to find dataIndex.\nvar largePathUpdateDataIndex = throttle(function (event) {\n var largePath = this;\n var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY);\n getECData(largePath).dataIndex = dataIndex >= 0 ? dataIndex : null;\n}, 30, false);\nfunction largePathFindDataIndex(largePath, x, y) {\n var baseDimIdx = largePath.baseDimIdx;\n var valueDimIdx = 1 - baseDimIdx;\n var points = largePath.shape.points;\n var largeDataIndices = largePath.largeDataIndices;\n var startPoint = [];\n var size = [];\n var barWidth = largePath.barWidth;\n for (var i = 0, len = points.length / 3; i < len; i++) {\n var ii = i * 3;\n size[baseDimIdx] = barWidth;\n size[valueDimIdx] = points[ii + 2];\n startPoint[baseDimIdx] = points[ii + baseDimIdx];\n startPoint[valueDimIdx] = points[ii + valueDimIdx];\n if (size[valueDimIdx] < 0) {\n startPoint[valueDimIdx] += size[valueDimIdx];\n size[valueDimIdx] = -size[valueDimIdx];\n }\n if (x >= startPoint[0] && x <= startPoint[0] + size[0] && y >= startPoint[1] && y <= startPoint[1] + size[1]) {\n return largeDataIndices[i];\n }\n }\n return -1;\n}\nfunction createBackgroundShape(isHorizontalOrRadial, layout, coord) {\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var rectShape = layout;\n var coordLayout = coord.getArea();\n return {\n x: isHorizontalOrRadial ? rectShape.x : coordLayout.x,\n y: isHorizontalOrRadial ? coordLayout.y : rectShape.y,\n width: isHorizontalOrRadial ? rectShape.width : coordLayout.width,\n height: isHorizontalOrRadial ? coordLayout.height : rectShape.height\n };\n } else {\n var coordLayout = coord.getArea();\n var sectorShape = layout;\n return {\n cx: coordLayout.cx,\n cy: coordLayout.cy,\n r0: isHorizontalOrRadial ? coordLayout.r0 : sectorShape.r0,\n r: isHorizontalOrRadial ? coordLayout.r : sectorShape.r,\n startAngle: isHorizontalOrRadial ? sectorShape.startAngle : 0,\n endAngle: isHorizontalOrRadial ? sectorShape.endAngle : Math.PI * 2\n };\n }\n}\nfunction createBackgroundEl(coord, isHorizontalOrRadial, layout) {\n var ElementClz = coord.type === 'polar' ? Sector : Rect;\n return new ElementClz({\n shape: createBackgroundShape(isHorizontalOrRadial, layout, coord),\n silent: true,\n z2: 0\n });\n}\nexport default BarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { layout, createProgressiveLayout } from '../../layout/barGrid.js';\nimport dataSample from '../../processor/dataSample.js';\nimport BarSeries from './BarSeries.js';\nimport BarView from './BarView.js';\nexport function install(registers) {\n registers.registerChartView(BarView);\n registers.registerSeriesModel(BarSeries);\n registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar'));\n // Do layout after other overall layout, which can prepare some information.\n registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('bar'));\n // Down sample after filter\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('bar'));\n /**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n registers.registerAction({\n type: 'changeAxisOrder',\n event: 'changeAxisOrder',\n update: 'update'\n }, function (payload, ecModel) {\n var componentType = payload.componentType || 'series';\n ecModel.eachComponent({\n mainType: componentType,\n query: payload\n }, function (componentModel) {\n if (payload.sortInfo) {\n componentModel.axis.setCategorySortInfo(payload.sortInfo);\n }\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parsePercent, linearMap } from '../../util/number.js';\nimport * as layout from '../../util/layout.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { normalizeArcAngles } from 'zrender/lib/core/PathProxy.js';\nimport { makeInner } from '../../util/model.js';\nvar PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\nexport function getBasicPieLayout(seriesModel, api) {\n var viewRect = getViewRect(seriesModel, api);\n // center can be string or number when coordinateSystem is specified\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n var width = parsePercent(viewRect.width, api.getWidth());\n var height = parsePercent(viewRect.height, api.getHeight());\n var size = Math.min(width, height);\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var cx;\n var cy;\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys) {\n // percentage is not allowed when coordinate system is specified\n var point = coordSys.dataToPoint(center);\n cx = point[0] || 0;\n cy = point[1] || 0;\n } else {\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n cx = parsePercent(center[0], width) + viewRect.x;\n cy = parsePercent(center[1], height) + viewRect.y;\n }\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r\n };\n}\nexport default function pieLayout(seriesType, ecModel, api) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var viewRect = getViewRect(seriesModel, api);\n var _a = getBasicPieLayout(seriesModel, api),\n cx = _a.cx,\n cy = _a.cy,\n r = _a.r,\n r0 = _a.r0;\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var endAngle = seriesModel.get('endAngle');\n var padAngle = seriesModel.get('padAngle') * RADIAN;\n endAngle = endAngle === 'auto' ? startAngle - PI2 : -endAngle * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var minAndPadAngle = minAngle + padAngle;\n var validDataCount = 0;\n data.each(valueDim, function (value) {\n !isNaN(value) && validDataCount++;\n });\n var sum = data.getSum(valueDim);\n // Sum may be 0\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var clockwise = seriesModel.get('clockwise');\n var roseType = seriesModel.get('roseType');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum');\n // [0...max]\n var extent = data.getDataExtent(valueDim);\n extent[0] = 0;\n var dir = clockwise ? 1 : -1;\n var angles = [startAngle, endAngle];\n var halfPadAngle = dir * padAngle / 2;\n normalizeArcAngles(angles, !clockwise);\n startAngle = angles[0], endAngle = angles[1];\n var layoutData = getSeriesLayoutData(seriesModel);\n layoutData.startAngle = startAngle;\n layoutData.endAngle = endAngle;\n layoutData.clockwise = clockwise;\n var angleRange = Math.abs(endAngle - startAngle);\n // In the case some sector angle is smaller than minAngle\n var restAngle = angleRange;\n var valueSumLargerThanMinAngle = 0;\n var currentAngle = startAngle;\n data.setLayout({\n viewRect: viewRect,\n r: r\n });\n data.each(valueDim, function (value, idx) {\n var angle;\n if (isNaN(value)) {\n data.setItemLayout(idx, {\n angle: NaN,\n startAngle: NaN,\n endAngle: NaN,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? NaN : r\n });\n return;\n }\n // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样?\n if (roseType !== 'area') {\n angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n } else {\n angle = angleRange / validDataCount;\n }\n if (angle < minAndPadAngle) {\n angle = minAndPadAngle;\n restAngle -= minAndPadAngle;\n } else {\n valueSumLargerThanMinAngle += value;\n }\n var endAngle = currentAngle + dir * angle;\n // calculate display angle\n var actualStartAngle = 0;\n var actualEndAngle = 0;\n if (padAngle > angle) {\n actualStartAngle = currentAngle + dir * angle / 2;\n actualEndAngle = actualStartAngle;\n } else {\n actualStartAngle = currentAngle + halfPadAngle;\n actualEndAngle = endAngle - halfPadAngle;\n }\n data.setItemLayout(idx, {\n angle: angle,\n startAngle: actualStartAngle,\n endAngle: actualEndAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? linearMap(value, extent, [r0, r]) : r\n });\n currentAngle = endAngle;\n });\n // Some sector is constrained by minAngle and padAngle\n // Rest sectors needs recalculate angle\n if (restAngle < PI2 && validDataCount) {\n // Average the angle if rest angle is not enough after all angles is\n // Constrained by minAngle and padAngle\n if (restAngle <= 1e-3) {\n var angle_1 = angleRange / validDataCount;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout_1 = data.getItemLayout(idx);\n layout_1.angle = angle_1;\n var actualStartAngle = 0;\n var actualEndAngle = 0;\n if (angle_1 < padAngle) {\n actualStartAngle = startAngle + dir * (idx + 1 / 2) * angle_1;\n actualEndAngle = actualStartAngle;\n } else {\n actualStartAngle = startAngle + dir * idx * angle_1 + halfPadAngle;\n actualEndAngle = startAngle + dir * (idx + 1) * angle_1 - halfPadAngle;\n }\n layout_1.startAngle = actualStartAngle;\n layout_1.endAngle = actualEndAngle;\n }\n });\n } else {\n unitRadian = restAngle / valueSumLargerThanMinAngle;\n currentAngle = startAngle;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout_2 = data.getItemLayout(idx);\n var angle = layout_2.angle === minAndPadAngle ? minAndPadAngle : value * unitRadian;\n var actualStartAngle = 0;\n var actualEndAngle = 0;\n if (angle < padAngle) {\n actualStartAngle = currentAngle + dir * angle / 2;\n actualEndAngle = actualStartAngle;\n } else {\n actualStartAngle = currentAngle + halfPadAngle;\n actualEndAngle = currentAngle + dir * angle - halfPadAngle;\n }\n layout_2.startAngle = actualStartAngle;\n layout_2.endAngle = actualEndAngle;\n currentAngle += dir * angle;\n }\n });\n }\n }\n });\n}\nexport var getSeriesLayoutData = makeInner();","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function dataFilter(seriesType) {\n return {\n seriesType: seriesType,\n reset: function (seriesModel, ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (!legendModels || !legendModels.length) {\n return;\n }\n var data = seriesModel.getData();\n data.filterSelf(function (idx) {\n var name = data.getName(idx);\n // If in any legend component the status is not selected.\n for (var i = 0; i < legendModels.length; i++) {\n // @ts-ignore FIXME: LegendModel\n if (!legendModels[i].isSelected(name)) {\n return false;\n }\n }\n return true;\n });\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME emphasis label position is not same with normal label position\nimport { parsePercent } from '../../util/number.js';\nimport { Point } from '../../util/graphic.js';\nimport { each, isNumber } from 'zrender/lib/core/util.js';\nimport { limitTurnAngle, limitSurfaceAngle } from '../../label/labelGuideHelper.js';\nimport { shiftLayoutOnY } from '../../label/labelLayoutHelper.js';\nvar RADIAN = Math.PI / 180;\nfunction adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight, viewLeft, viewTop, farthestX) {\n if (list.length < 2) {\n return;\n }\n ;\n function recalculateXOnSemiToAlignOnEllipseCurve(semi) {\n var rB = semi.rB;\n var rB2 = rB * rB;\n for (var i = 0; i < semi.list.length; i++) {\n var item = semi.list[i];\n var dy = Math.abs(item.label.y - cy);\n // horizontal r is always same with original r because x is not changed.\n var rA = r + item.len;\n var rA2 = rA * rA;\n // Use ellipse implicit function to calculate x\n var dx = Math.sqrt((1 - Math.abs(dy * dy / rB2)) * rA2);\n var newX = cx + (dx + item.len2) * dir;\n var deltaX = newX - item.label.x;\n var newTargetWidth = item.targetTextWidth - deltaX * dir;\n // text x is changed, so need to recalculate width.\n constrainTextWidth(item, newTargetWidth, true);\n item.label.x = newX;\n }\n }\n // Adjust X based on the shifted y. Make tight labels aligned on an ellipse curve.\n function recalculateX(items) {\n // Extremes of\n var topSemi = {\n list: [],\n maxY: 0\n };\n var bottomSemi = {\n list: [],\n maxY: 0\n };\n for (var i = 0; i < items.length; i++) {\n if (items[i].labelAlignTo !== 'none') {\n continue;\n }\n var item = items[i];\n var semi = item.label.y > cy ? bottomSemi : topSemi;\n var dy = Math.abs(item.label.y - cy);\n if (dy >= semi.maxY) {\n var dx = item.label.x - cx - item.len2 * dir;\n // horizontal r is always same with original r because x is not changed.\n var rA = r + item.len;\n // Canculate rB based on the topest / bottemest label.\n var rB = Math.abs(dx) < rA ? Math.sqrt(dy * dy / (1 - dx * dx / rA / rA)) : rA;\n semi.rB = rB;\n semi.maxY = dy;\n }\n semi.list.push(item);\n }\n recalculateXOnSemiToAlignOnEllipseCurve(topSemi);\n recalculateXOnSemiToAlignOnEllipseCurve(bottomSemi);\n }\n var len = list.length;\n for (var i = 0; i < len; i++) {\n if (list[i].position === 'outer' && list[i].labelAlignTo === 'labelLine') {\n var dx = list[i].label.x - farthestX;\n list[i].linePoints[1][0] += dx;\n list[i].label.x = farthestX;\n }\n }\n if (shiftLayoutOnY(list, viewTop, viewTop + viewHeight)) {\n recalculateX(list);\n }\n}\nfunction avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop) {\n var leftList = [];\n var rightList = [];\n var leftmostX = Number.MAX_VALUE;\n var rightmostX = -Number.MAX_VALUE;\n for (var i = 0; i < labelLayoutList.length; i++) {\n var label = labelLayoutList[i].label;\n if (isPositionCenter(labelLayoutList[i])) {\n continue;\n }\n if (label.x < cx) {\n leftmostX = Math.min(leftmostX, label.x);\n leftList.push(labelLayoutList[i]);\n } else {\n rightmostX = Math.max(rightmostX, label.x);\n rightList.push(labelLayoutList[i]);\n }\n }\n for (var i = 0; i < labelLayoutList.length; i++) {\n var layout = labelLayoutList[i];\n if (!isPositionCenter(layout) && layout.linePoints) {\n if (layout.labelStyleWidth != null) {\n continue;\n }\n var label = layout.label;\n var linePoints = layout.linePoints;\n var targetTextWidth = void 0;\n if (layout.labelAlignTo === 'edge') {\n if (label.x < cx) {\n targetTextWidth = linePoints[2][0] - layout.labelDistance - viewLeft - layout.edgeDistance;\n } else {\n targetTextWidth = viewLeft + viewWidth - layout.edgeDistance - linePoints[2][0] - layout.labelDistance;\n }\n } else if (layout.labelAlignTo === 'labelLine') {\n if (label.x < cx) {\n targetTextWidth = leftmostX - viewLeft - layout.bleedMargin;\n } else {\n targetTextWidth = viewLeft + viewWidth - rightmostX - layout.bleedMargin;\n }\n } else {\n if (label.x < cx) {\n targetTextWidth = label.x - viewLeft - layout.bleedMargin;\n } else {\n targetTextWidth = viewLeft + viewWidth - label.x - layout.bleedMargin;\n }\n }\n layout.targetTextWidth = targetTextWidth;\n constrainTextWidth(layout, targetTextWidth);\n }\n }\n adjustSingleSide(rightList, cx, cy, r, 1, viewWidth, viewHeight, viewLeft, viewTop, rightmostX);\n adjustSingleSide(leftList, cx, cy, r, -1, viewWidth, viewHeight, viewLeft, viewTop, leftmostX);\n for (var i = 0; i < labelLayoutList.length; i++) {\n var layout = labelLayoutList[i];\n if (!isPositionCenter(layout) && layout.linePoints) {\n var label = layout.label;\n var linePoints = layout.linePoints;\n var isAlignToEdge = layout.labelAlignTo === 'edge';\n var padding = label.style.padding;\n var paddingH = padding ? padding[1] + padding[3] : 0;\n // textRect.width already contains paddingH if bgColor is set\n var extraPaddingH = label.style.backgroundColor ? 0 : paddingH;\n var realTextWidth = layout.rect.width + extraPaddingH;\n var dist = linePoints[1][0] - linePoints[2][0];\n if (isAlignToEdge) {\n if (label.x < cx) {\n linePoints[2][0] = viewLeft + layout.edgeDistance + realTextWidth + layout.labelDistance;\n } else {\n linePoints[2][0] = viewLeft + viewWidth - layout.edgeDistance - realTextWidth - layout.labelDistance;\n }\n } else {\n if (label.x < cx) {\n linePoints[2][0] = label.x + layout.labelDistance;\n } else {\n linePoints[2][0] = label.x - layout.labelDistance;\n }\n linePoints[1][0] = linePoints[2][0] + dist;\n }\n linePoints[1][1] = linePoints[2][1] = label.y;\n }\n }\n}\n/**\n * Set max width of each label, and then wrap each label to the max width.\n *\n * @param layout label layout\n * @param availableWidth max width for the label to display\n * @param forceRecalculate recaculate the text layout even if the current width\n * is smaller than `availableWidth`. This is useful when the text was previously\n * wrapped by calling `constrainTextWidth` but now `availableWidth` changed, in\n * which case, previous wrapping should be redo.\n */\nfunction constrainTextWidth(layout, availableWidth, forceRecalculate) {\n if (forceRecalculate === void 0) {\n forceRecalculate = false;\n }\n if (layout.labelStyleWidth != null) {\n // User-defined style.width has the highest priority.\n return;\n }\n var label = layout.label;\n var style = label.style;\n var textRect = layout.rect;\n var bgColor = style.backgroundColor;\n var padding = style.padding;\n var paddingH = padding ? padding[1] + padding[3] : 0;\n var overflow = style.overflow;\n // textRect.width already contains paddingH if bgColor is set\n var oldOuterWidth = textRect.width + (bgColor ? 0 : paddingH);\n if (availableWidth < oldOuterWidth || forceRecalculate) {\n var oldHeight = textRect.height;\n if (overflow && overflow.match('break')) {\n // Temporarily set background to be null to calculate\n // the bounding box without background.\n label.setStyle('backgroundColor', null);\n // Set constraining width\n label.setStyle('width', availableWidth - paddingH);\n // This is the real bounding box of the text without padding.\n var innerRect = label.getBoundingRect();\n label.setStyle('width', Math.ceil(innerRect.width));\n label.setStyle('backgroundColor', bgColor);\n } else {\n var availableInnerWidth = availableWidth - paddingH;\n var newWidth = availableWidth < oldOuterWidth\n // Current text is too wide, use `availableWidth` as max width.\n ? availableInnerWidth :\n // Current available width is enough, but the text may have\n // already been wrapped with a smaller available width.\n forceRecalculate ? availableInnerWidth > layout.unconstrainedWidth\n // Current available is larger than text width,\n // so don't constrain width (otherwise it may have\n // empty space in the background).\n ? null\n // Current available is smaller than text width, so\n // use the current available width as constraining\n // width.\n : availableInnerWidth\n // Current available width is enough, so no need to\n // constrain.\n : null;\n label.setStyle('width', newWidth);\n }\n var newRect = label.getBoundingRect();\n textRect.width = newRect.width;\n var margin = (label.style.margin || 0) + 2.1;\n textRect.height = newRect.height + margin;\n textRect.y -= (textRect.height - oldHeight) / 2;\n }\n}\nfunction isPositionCenter(sectorShape) {\n // Not change x for center label\n return sectorShape.position === 'center';\n}\nexport default function pieLabelLayout(seriesModel) {\n var data = seriesModel.getData();\n var labelLayoutList = [];\n var cx;\n var cy;\n var hasLabelRotate = false;\n var minShowLabelRadian = (seriesModel.get('minShowLabelAngle') || 0) * RADIAN;\n var viewRect = data.getLayout('viewRect');\n var r = data.getLayout('r');\n var viewWidth = viewRect.width;\n var viewLeft = viewRect.x;\n var viewTop = viewRect.y;\n var viewHeight = viewRect.height;\n function setNotShow(el) {\n el.ignore = true;\n }\n function isLabelShown(label) {\n if (!label.ignore) {\n return true;\n }\n for (var key in label.states) {\n if (label.states[key].ignore === false) {\n return true;\n }\n }\n return false;\n }\n data.each(function (idx) {\n var sector = data.getItemGraphicEl(idx);\n var sectorShape = sector.shape;\n var label = sector.getTextContent();\n var labelLine = sector.getTextGuideLine();\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label');\n // Use position in normal or emphasis\n var labelPosition = labelModel.get('position') || itemModel.get(['emphasis', 'label', 'position']);\n var labelDistance = labelModel.get('distanceToLabelLine');\n var labelAlignTo = labelModel.get('alignTo');\n var edgeDistance = parsePercent(labelModel.get('edgeDistance'), viewWidth);\n var bleedMargin = labelModel.get('bleedMargin');\n var labelLineModel = itemModel.getModel('labelLine');\n var labelLineLen = labelLineModel.get('length');\n labelLineLen = parsePercent(labelLineLen, viewWidth);\n var labelLineLen2 = labelLineModel.get('length2');\n labelLineLen2 = parsePercent(labelLineLen2, viewWidth);\n if (Math.abs(sectorShape.endAngle - sectorShape.startAngle) < minShowLabelRadian) {\n each(label.states, setNotShow);\n label.ignore = true;\n if (labelLine) {\n each(labelLine.states, setNotShow);\n labelLine.ignore = true;\n }\n return;\n }\n if (!isLabelShown(label)) {\n return;\n }\n var midAngle = (sectorShape.startAngle + sectorShape.endAngle) / 2;\n var nx = Math.cos(midAngle);\n var ny = Math.sin(midAngle);\n var textX;\n var textY;\n var linePoints;\n var textAlign;\n cx = sectorShape.cx;\n cy = sectorShape.cy;\n var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner';\n if (labelPosition === 'center') {\n textX = sectorShape.cx;\n textY = sectorShape.cy;\n textAlign = 'center';\n } else {\n var x1 = (isLabelInside ? (sectorShape.r + sectorShape.r0) / 2 * nx : sectorShape.r * nx) + cx;\n var y1 = (isLabelInside ? (sectorShape.r + sectorShape.r0) / 2 * ny : sectorShape.r * ny) + cy;\n textX = x1 + nx * 3;\n textY = y1 + ny * 3;\n if (!isLabelInside) {\n // For roseType\n var x2 = x1 + nx * (labelLineLen + r - sectorShape.r);\n var y2 = y1 + ny * (labelLineLen + r - sectorShape.r);\n var x3 = x2 + (nx < 0 ? -1 : 1) * labelLineLen2;\n var y3 = y2;\n if (labelAlignTo === 'edge') {\n // Adjust textX because text align of edge is opposite\n textX = nx < 0 ? viewLeft + edgeDistance : viewLeft + viewWidth - edgeDistance;\n } else {\n textX = x3 + (nx < 0 ? -labelDistance : labelDistance);\n }\n textY = y3;\n linePoints = [[x1, y1], [x2, y2], [x3, y3]];\n }\n textAlign = isLabelInside ? 'center' : labelAlignTo === 'edge' ? nx > 0 ? 'right' : 'left' : nx > 0 ? 'left' : 'right';\n }\n var PI = Math.PI;\n var labelRotate = 0;\n var rotate = labelModel.get('rotate');\n if (isNumber(rotate)) {\n labelRotate = rotate * (PI / 180);\n } else if (labelPosition === 'center') {\n labelRotate = 0;\n } else if (rotate === 'radial' || rotate === true) {\n var radialAngle = nx < 0 ? -midAngle + PI : -midAngle;\n labelRotate = radialAngle;\n } else if (rotate === 'tangential' && labelPosition !== 'outside' && labelPosition !== 'outer') {\n var rad = Math.atan2(nx, ny);\n if (rad < 0) {\n rad = PI * 2 + rad;\n }\n var isDown = ny > 0;\n if (isDown) {\n rad = PI + rad;\n }\n labelRotate = rad - PI;\n }\n hasLabelRotate = !!labelRotate;\n label.x = textX;\n label.y = textY;\n label.rotation = labelRotate;\n label.setStyle({\n verticalAlign: 'middle'\n });\n // Not sectorShape the inside label\n if (!isLabelInside) {\n var textRect = label.getBoundingRect().clone();\n textRect.applyTransform(label.getComputedTransform());\n // Text has a default 1px stroke. Exclude this.\n var margin = (label.style.margin || 0) + 2.1;\n textRect.y -= margin / 2;\n textRect.height += margin;\n labelLayoutList.push({\n label: label,\n labelLine: labelLine,\n position: labelPosition,\n len: labelLineLen,\n len2: labelLineLen2,\n minTurnAngle: labelLineModel.get('minTurnAngle'),\n maxSurfaceAngle: labelLineModel.get('maxSurfaceAngle'),\n surfaceNormal: new Point(nx, ny),\n linePoints: linePoints,\n textAlign: textAlign,\n labelDistance: labelDistance,\n labelAlignTo: labelAlignTo,\n edgeDistance: edgeDistance,\n bleedMargin: bleedMargin,\n rect: textRect,\n unconstrainedWidth: textRect.width,\n labelStyleWidth: label.style.width\n });\n } else {\n label.setStyle({\n align: textAlign\n });\n var selectState = label.states.select;\n if (selectState) {\n selectState.x += label.x;\n selectState.y += label.y;\n }\n }\n sector.setTextConfig({\n inside: isLabelInside\n });\n });\n if (!hasLabelRotate && seriesModel.get('avoidLabelOverlap')) {\n avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop);\n }\n for (var i = 0; i < labelLayoutList.length; i++) {\n var layout = labelLayoutList[i];\n var label = layout.label;\n var labelLine = layout.labelLine;\n var notShowLabel = isNaN(label.x) || isNaN(label.y);\n if (label) {\n label.setStyle({\n align: layout.textAlign\n });\n if (notShowLabel) {\n each(label.states, setNotShow);\n label.ignore = true;\n }\n var selectState = label.states.select;\n if (selectState) {\n selectState.x += label.x;\n selectState.y += label.y;\n }\n }\n if (labelLine) {\n var linePoints = layout.linePoints;\n if (notShowLabel || !linePoints) {\n each(labelLine.states, setNotShow);\n labelLine.ignore = true;\n } else {\n limitTurnAngle(linePoints, layout.minTurnAngle);\n limitSurfaceAngle(linePoints, layout.surfaceNormal, layout.maxSurfaceAngle);\n labelLine.setShape({\n points: linePoints\n });\n // Set the anchor to the midpoint of sector\n label.__hostTarget.textGuideLineConfig = {\n anchor: new Point(linePoints[0][0], linePoints[0][1])\n };\n }\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { extend, retrieve3 } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport ChartView from '../../view/Chart.js';\nimport labelLayout from './labelLayout.js';\nimport { setLabelLineStyle, getLabelLineStatesModels } from '../../label/labelGuideHelper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { getBasicPieLayout, getSeriesLayoutData } from './pieLayout.js';\n/**\n * Piece of pie including Sector, Label, LabelLine\n */\nvar PiePiece = /** @class */function (_super) {\n __extends(PiePiece, _super);\n function PiePiece(data, idx, startAngle) {\n var _this = _super.call(this) || this;\n _this.z2 = 2;\n var text = new graphic.Text();\n _this.setTextContent(text);\n _this.updateData(data, idx, startAngle, true);\n return _this;\n }\n PiePiece.prototype.updateData = function (data, idx, startAngle, firstCreate) {\n var sector = this;\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n var layout = data.getItemLayout(idx);\n // cornerRadius & innerCornerRadius doesn't exist in the item layout. Use `0` if null value is specified.\n // see `setItemLayout` in `pieLayout.ts`.\n var sectorShape = extend(getSectorCornerRadius(itemModel.getModel('itemStyle'), layout, true), layout);\n // Ignore NaN data.\n if (isNaN(sectorShape.startAngle)) {\n // Use NaN shape to avoid drawing shape.\n sector.setShape(sectorShape);\n return;\n }\n if (firstCreate) {\n sector.setShape(sectorShape);\n var animationType = seriesModel.getShallow('animationType');\n if (seriesModel.ecModel.ssr) {\n // Use scale animation in SSR mode(opacity?)\n // Because CSS SVG animation doesn't support very customized shape animation.\n graphic.initProps(sector, {\n scaleX: 0,\n scaleY: 0\n }, seriesModel, {\n dataIndex: idx,\n isFrom: true\n });\n sector.originX = sectorShape.cx;\n sector.originY = sectorShape.cy;\n } else if (animationType === 'scale') {\n sector.shape.r = layout.r0;\n graphic.initProps(sector, {\n shape: {\n r: layout.r\n }\n }, seriesModel, idx);\n }\n // Expansion\n else {\n if (startAngle != null) {\n sector.setShape({\n startAngle: startAngle,\n endAngle: startAngle\n });\n graphic.initProps(sector, {\n shape: {\n startAngle: layout.startAngle,\n endAngle: layout.endAngle\n }\n }, seriesModel, idx);\n } else {\n sector.shape.endAngle = layout.startAngle;\n graphic.updateProps(sector, {\n shape: {\n endAngle: layout.endAngle\n }\n }, seriesModel, idx);\n }\n }\n } else {\n saveOldStyle(sector);\n // Transition animation from the old shape\n graphic.updateProps(sector, {\n shape: sectorShape\n }, seriesModel, idx);\n }\n sector.useStyle(data.getItemVisual(idx, 'style'));\n setStatesStylesFromModel(sector, itemModel);\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var offset = seriesModel.get('selectedOffset');\n var dx = Math.cos(midAngle) * offset;\n var dy = Math.sin(midAngle) * offset;\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && sector.attr('cursor', cursorStyle);\n this._updateLabel(seriesModel, data, idx);\n sector.ensureState('emphasis').shape = extend({\n r: layout.r + (emphasisModel.get('scale') ? emphasisModel.get('scaleSize') || 0 : 0)\n }, getSectorCornerRadius(emphasisModel.getModel('itemStyle'), layout));\n extend(sector.ensureState('select'), {\n x: dx,\n y: dy,\n shape: getSectorCornerRadius(itemModel.getModel(['select', 'itemStyle']), layout)\n });\n extend(sector.ensureState('blur'), {\n shape: getSectorCornerRadius(itemModel.getModel(['blur', 'itemStyle']), layout)\n });\n var labelLine = sector.getTextGuideLine();\n var labelText = sector.getTextContent();\n labelLine && extend(labelLine.ensureState('select'), {\n x: dx,\n y: dy\n });\n // TODO: needs dx, dy in zrender?\n extend(labelText.ensureState('select'), {\n x: dx,\n y: dy\n });\n toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n };\n PiePiece.prototype._updateLabel = function (seriesModel, data, idx) {\n var sector = this;\n var itemModel = data.getItemModel(idx);\n var labelLineModel = itemModel.getModel('labelLine');\n var style = data.getItemVisual(idx, 'style');\n var visualColor = style && style.fill;\n var visualOpacity = style && style.opacity;\n setLabelStyle(sector, getLabelStatesModels(itemModel), {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n inheritColor: visualColor,\n defaultOpacity: visualOpacity,\n defaultText: seriesModel.getFormattedLabel(idx, 'normal') || data.getName(idx)\n });\n var labelText = sector.getTextContent();\n // Set textConfig on sector.\n sector.setTextConfig({\n // reset position, rotation\n position: null,\n rotation: null\n });\n // Make sure update style on labelText after setLabelStyle.\n // Because setLabelStyle will replace a new style on it.\n labelText.attr({\n z2: 10\n });\n var labelPosition = seriesModel.get(['label', 'position']);\n if (labelPosition !== 'outside' && labelPosition !== 'outer') {\n sector.removeTextGuideLine();\n } else {\n var polyline = this.getTextGuideLine();\n if (!polyline) {\n polyline = new graphic.Polyline();\n this.setTextGuideLine(polyline);\n }\n // Default use item visual color\n setLabelLineStyle(this, getLabelLineStatesModels(itemModel), {\n stroke: visualColor,\n opacity: retrieve3(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1)\n });\n }\n };\n return PiePiece;\n}(graphic.Sector);\n// Pie view\nvar PieView = /** @class */function (_super) {\n __extends(PieView, _super);\n function PieView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.ignoreLabelLineUpdate = true;\n return _this;\n }\n PieView.prototype.render = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var startAngle;\n // First render\n if (!oldData && data.count() > 0) {\n var shape = data.getItemLayout(0);\n for (var s = 1; isNaN(shape && shape.startAngle) && s < data.count(); ++s) {\n shape = data.getItemLayout(s);\n }\n if (shape) {\n startAngle = shape.startAngle;\n }\n }\n // remove empty-circle if it exists\n if (this._emptyCircleSector) {\n group.remove(this._emptyCircleSector);\n }\n // when all data are filtered, show lightgray empty circle\n if (data.count() === 0 && seriesModel.get('showEmptyCircle')) {\n var layoutData = getSeriesLayoutData(seriesModel);\n var sector = new graphic.Sector({\n shape: extend(getBasicPieLayout(seriesModel, api), layoutData)\n });\n sector.useStyle(seriesModel.getModel('emptyCircleStyle').getItemStyle());\n this._emptyCircleSector = sector;\n group.add(sector);\n }\n data.diff(oldData).add(function (idx) {\n var piePiece = new PiePiece(data, idx, startAngle);\n data.setItemGraphicEl(idx, piePiece);\n group.add(piePiece);\n }).update(function (newIdx, oldIdx) {\n var piePiece = oldData.getItemGraphicEl(oldIdx);\n piePiece.updateData(data, newIdx, startAngle);\n piePiece.off('click');\n group.add(piePiece);\n data.setItemGraphicEl(newIdx, piePiece);\n }).remove(function (idx) {\n var piePiece = oldData.getItemGraphicEl(idx);\n graphic.removeElementWithFadeOut(piePiece, seriesModel, idx);\n }).execute();\n labelLayout(seriesModel);\n // Always use initial animation.\n if (seriesModel.get('animationTypeUpdate') !== 'expansion') {\n this._data = data;\n }\n };\n PieView.prototype.dispose = function () {};\n PieView.prototype.containPoint = function (point, seriesModel) {\n var data = seriesModel.getData();\n var itemLayout = data.getItemLayout(0);\n if (itemLayout) {\n var dx = point[0] - itemLayout.cx;\n var dy = point[1] - itemLayout.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n return radius <= itemLayout.r && radius >= itemLayout.r0;\n }\n };\n PieView.type = 'pie';\n return PieView;\n}(ChartView);\nexport default PieView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport { extend, isArray } from 'zrender/lib/core/util.js';\n/**\n * [Usage]:\n * (1)\n * createListSimply(seriesModel, ['value']);\n * (2)\n * createListSimply(seriesModel, {\n * coordDimensions: ['value'],\n * dimensionsCount: 5\n * });\n */\nexport default function createSeriesDataSimply(seriesModel, opt, nameList) {\n opt = isArray(opt) && {\n coordDimensions: opt\n } || extend({\n encodeDefine: seriesModel.getEncode()\n }, opt);\n var source = seriesModel.getSource();\n var dimensions = prepareSeriesDataSchema(source, opt).dimensions;\n var list = new SeriesData(dimensions, seriesModel);\n list.initData(source, nameList);\n return list;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * LegendVisualProvider is an bridge that pick encoded color from data and\n * provide to the legend component.\n */\nvar LegendVisualProvider = /** @class */function () {\n function LegendVisualProvider(\n // Function to get data after filtered. It stores all the encoding info\n getDataWithEncodedVisual,\n // Function to get raw data before filtered.\n getRawData) {\n this._getDataWithEncodedVisual = getDataWithEncodedVisual;\n this._getRawData = getRawData;\n }\n LegendVisualProvider.prototype.getAllNames = function () {\n var rawData = this._getRawData();\n // We find the name from the raw data. In case it's filtered by the legend component.\n // Normally, the name can be found in rawData, but can't be found in filtered data will display as gray.\n return rawData.mapArray(rawData.getName);\n };\n LegendVisualProvider.prototype.containName = function (name) {\n var rawData = this._getRawData();\n return rawData.indexOfName(name) >= 0;\n };\n LegendVisualProvider.prototype.indexOfName = function (name) {\n // Only get data when necessary.\n // Because LegendVisualProvider constructor may be new in the stage that data is not prepared yet.\n // Invoking Series#getData immediately will throw an error.\n var dataWithEncodedVisual = this._getDataWithEncodedVisual();\n return dataWithEncodedVisual.indexOfName(name);\n };\n LegendVisualProvider.prototype.getItemVisual = function (dataIndex, key) {\n // Get encoded visual properties from final filtered data.\n var dataWithEncodedVisual = this._getDataWithEncodedVisual();\n return dataWithEncodedVisual.getItemVisual(dataIndex, key);\n };\n return LegendVisualProvider;\n}();\nexport default LegendVisualProvider;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport { getPercentSeats } from '../../util/number.js';\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport SeriesModel from '../../model/Series.js';\nvar innerData = modelUtil.makeInner();\nvar PieSeriesModel = /** @class */function (_super) {\n __extends(PieSeriesModel, _super);\n function PieSeriesModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @overwrite\n */\n PieSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n this._defaultLabelLine(option);\n };\n /**\n * @overwrite\n */\n PieSeriesModel.prototype.mergeOption = function () {\n _super.prototype.mergeOption.apply(this, arguments);\n };\n /**\n * @overwrite\n */\n PieSeriesModel.prototype.getInitialData = function () {\n return createSeriesDataSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n };\n /**\n * @overwrite\n */\n PieSeriesModel.prototype.getDataParams = function (dataIndex) {\n var data = this.getData();\n // update seats when data is changed\n var dataInner = innerData(data);\n var seats = dataInner.seats;\n if (!seats) {\n var valueList_1 = [];\n data.each(data.mapDimension('value'), function (value) {\n valueList_1.push(value);\n });\n seats = dataInner.seats = getPercentSeats(valueList_1, data.hostModel.get('percentPrecision'));\n }\n var params = _super.prototype.getDataParams.call(this, dataIndex);\n // seats may be empty when sum is 0\n params.percent = seats[dataIndex] || 0;\n params.$vars.push('percent');\n return params;\n };\n PieSeriesModel.prototype._defaultLabelLine = function (option) {\n // Extend labelLine emphasis\n modelUtil.defaultEmphasis(option, 'labelLine', ['show']);\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine;\n // Not show label line if `label.normal.show = false`\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\n };\n PieSeriesModel.type = 'series.pie';\n PieSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n colorBy: 'data',\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n endAngle: 'auto',\n padAngle: 0,\n // 最小角度改为0\n minAngle: 0,\n // If the angle of a sector less than `minShowLabelAngle`,\n // the label will not be displayed.\n minShowLabelAngle: 0,\n // 选中时扇区偏移量\n selectedOffset: 10,\n // 选择模式,默认关闭,可选single,multiple\n // selectedMode: false,\n // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)\n // roseType: null,\n percentPrecision: 2,\n // If still show when all data zero.\n stillShowZeroSum: true,\n // cursor: null,\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n width: null,\n height: null,\n label: {\n // color: 'inherit',\n // If rotate around circle\n rotate: 0,\n show: true,\n overflow: 'truncate',\n // 'outer', 'inside', 'center'\n position: 'outer',\n // 'none', 'labelLine', 'edge'. Works only when position is 'outer'\n alignTo: 'none',\n // Closest distance between label and chart edge.\n // Works only position is 'outer' and alignTo is 'edge'.\n edgeDistance: '25%',\n // Works only position is 'outer' and alignTo is not 'edge'.\n bleedMargin: 10,\n // Distance between text and label line.\n distanceToLabelLine: 5\n // formatter: 标签文本格式器,同 tooltip.formatter,不支持异步回调\n // 默认使用全局文本样式,详见 textStyle\n // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数\n },\n\n // Enabled when label.normal.position is 'outer'\n labelLine: {\n show: true,\n // 引导线两段中的第一段长度\n length: 15,\n // 引导线两段中的第二段长度\n length2: 15,\n smooth: false,\n minTurnAngle: 90,\n maxSurfaceAngle: 90,\n lineStyle: {\n // color: 各异,\n width: 1,\n type: 'solid'\n }\n },\n itemStyle: {\n borderWidth: 1,\n borderJoin: 'round'\n },\n showEmptyCircle: true,\n emptyCircleStyle: {\n color: 'lightgray',\n opacity: 1\n },\n labelLayout: {\n // Hide the overlapped label.\n hideOverlap: true\n },\n emphasis: {\n scale: true,\n scaleSize: 5\n },\n // If use strategy to avoid label overlapping\n avoidLabelOverlap: true,\n // Animation type. Valid values: expansion, scale\n animationType: 'expansion',\n animationDuration: 1000,\n // Animation type when update. Valid values: transition, expansion\n animationTypeUpdate: 'transition',\n animationEasingUpdate: 'cubicInOut',\n animationDurationUpdate: 500,\n animationEasing: 'cubicInOut'\n };\n return PieSeriesModel;\n}(SeriesModel);\nexport default PieSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isNumber } from 'zrender/lib/core/util.js';\nexport default function negativeDataFilter(seriesType) {\n return {\n seriesType: seriesType,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n data.filterSelf(function (idx) {\n // handle negative value condition\n var valueDim = data.mapDimension('value');\n var curValue = data.get(valueDim, idx);\n if (isNumber(curValue) && !isNaN(curValue) && curValue < 0) {\n return false;\n }\n return true;\n });\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createLegacyDataSelectAction } from '../../legacy/dataSelectAction.js';\nimport pieLayout from '../pie/pieLayout.js';\nimport dataFilter from '../../processor/dataFilter.js';\nimport { curry } from 'zrender/lib/core/util.js';\nimport PieView from './PieView.js';\nimport PieSeriesModel from './PieSeries.js';\nimport negativeDataFilter from '../../processor/negativeDataFilter.js';\nexport function install(registers) {\n registers.registerChartView(PieView);\n registers.registerSeriesModel(PieSeriesModel);\n createLegacyDataSelectAction('pie', registers.registerAction);\n registers.registerLayout(curry(pieLayout, 'pie'));\n registers.registerProcessor(dataFilter('pie'));\n registers.registerProcessor(negativeDataFilter('pie'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nvar ScatterSeriesModel = /** @class */function (_super) {\n __extends(ScatterSeriesModel, _super);\n function ScatterSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScatterSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n ScatterSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n ScatterSeriesModel.prototype.getProgressive = function () {\n var progressive = this.option.progressive;\n if (progressive == null) {\n // PENDING\n return this.option.large ? 5e3 : this.get('progressive');\n }\n return progressive;\n };\n ScatterSeriesModel.prototype.getProgressiveThreshold = function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n if (progressiveThreshold == null) {\n // PENDING\n return this.option.large ? 1e4 : this.get('progressiveThreshold');\n }\n return progressiveThreshold;\n };\n ScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.point(data.getItemLayout(dataIndex));\n };\n ScatterSeriesModel.prototype.getZLevelKey = function () {\n // Each progressive series has individual key.\n return this.getData().count() > this.getProgressiveThreshold() ? this.id : '';\n };\n ScatterSeriesModel.type = 'series.scatter';\n ScatterSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar'];\n ScatterSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n symbolSize: 10,\n // symbolRotate: null, // 图形旋转控制\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n // cursor: null,\n itemStyle: {\n opacity: 0.8\n // color: 各异\n },\n\n emphasis: {\n scale: true\n },\n // If clip the overflow graphics\n // Works on cartesian / polar series\n clip: true,\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n universalTransition: {\n divideShape: 'clone'\n }\n // progressive: null\n };\n\n return ScatterSeriesModel;\n}(SeriesModel);\nexport default ScatterSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global Float32Array */\n// TODO Batch by color\nimport * as graphic from '../../util/graphic.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { getECData } from '../../util/innerStore.js';\nvar BOOST_SIZE_THRESHOLD = 4;\nvar LargeSymbolPathShape = /** @class */function () {\n function LargeSymbolPathShape() {}\n return LargeSymbolPathShape;\n}();\nvar LargeSymbolPath = /** @class */function (_super) {\n __extends(LargeSymbolPath, _super);\n function LargeSymbolPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this._off = 0;\n _this.hoverDataIdx = -1;\n return _this;\n }\n LargeSymbolPath.prototype.getDefaultShape = function () {\n return new LargeSymbolPathShape();\n };\n LargeSymbolPath.prototype.reset = function () {\n this.notClear = false;\n this._off = 0;\n };\n LargeSymbolPath.prototype.buildPath = function (path, shape) {\n var points = shape.points;\n var size = shape.size;\n var symbolProxy = this.symbolProxy;\n var symbolProxyShape = symbolProxy.shape;\n var ctx = path.getContext ? path.getContext() : path;\n var canBoost = ctx && size[0] < BOOST_SIZE_THRESHOLD;\n var softClipShape = this.softClipShape;\n var i;\n // Do draw in afterBrush.\n if (canBoost) {\n this._ctx = ctx;\n return;\n }\n this._ctx = null;\n for (i = this._off; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n if (softClipShape && !softClipShape.contain(x, y)) {\n continue;\n }\n symbolProxyShape.x = x - size[0] / 2;\n symbolProxyShape.y = y - size[1] / 2;\n symbolProxyShape.width = size[0];\n symbolProxyShape.height = size[1];\n symbolProxy.buildPath(path, symbolProxyShape, true);\n }\n if (this.incremental) {\n this._off = i;\n this.notClear = true;\n }\n };\n LargeSymbolPath.prototype.afterBrush = function () {\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var ctx = this._ctx;\n var softClipShape = this.softClipShape;\n var i;\n if (!ctx) {\n return;\n }\n // PENDING If style or other canvas status changed?\n for (i = this._off; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n if (softClipShape && !softClipShape.contain(x, y)) {\n continue;\n }\n // fillRect is faster than building a rect path and draw.\n // And it support light globalCompositeOperation.\n ctx.fillRect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]);\n }\n if (this.incremental) {\n this._off = i;\n this.notClear = true;\n }\n };\n LargeSymbolPath.prototype.findDataIndex = function (x, y) {\n // TODO ???\n // Consider transform\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var w = Math.max(size[0], 4);\n var h = Math.max(size[1], 4);\n // Not consider transform\n // Treat each element as a rect\n // top down traverse\n for (var idx = points.length / 2 - 1; idx >= 0; idx--) {\n var i = idx * 2;\n var x0 = points[i] - w / 2;\n var y0 = points[i + 1] - h / 2;\n if (x >= x0 && y >= y0 && x <= x0 + w && y <= y0 + h) {\n return idx;\n }\n }\n return -1;\n };\n LargeSymbolPath.prototype.contain = function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n x = localPos[0];\n y = localPos[1];\n if (rect.contain(x, y)) {\n // Cache found data index.\n var dataIdx = this.hoverDataIdx = this.findDataIndex(x, y);\n return dataIdx >= 0;\n }\n this.hoverDataIdx = -1;\n return false;\n };\n LargeSymbolPath.prototype.getBoundingRect = function () {\n // Ignore stroke for large symbol draw.\n var rect = this._rect;\n if (!rect) {\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var w = size[0];\n var h = size[1];\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n rect = this._rect = new graphic.BoundingRect(minX - w / 2, minY - h / 2, maxX - minX + w, maxY - minY + h);\n }\n return rect;\n };\n return LargeSymbolPath;\n}(graphic.Path);\nvar LargeSymbolDraw = /** @class */function () {\n function LargeSymbolDraw() {\n this.group = new graphic.Group();\n }\n /**\n * Update symbols draw by new data\n */\n LargeSymbolDraw.prototype.updateData = function (data, opt) {\n this._clear();\n var symbolEl = this._create();\n symbolEl.setShape({\n points: data.getLayout('points')\n });\n this._setCommon(symbolEl, data, opt);\n };\n LargeSymbolDraw.prototype.updateLayout = function (data) {\n var points = data.getLayout('points');\n this.group.eachChild(function (child) {\n if (child.startIndex != null) {\n var len = (child.endIndex - child.startIndex) * 2;\n var byteOffset = child.startIndex * 4 * 2;\n points = new Float32Array(points.buffer, byteOffset, len);\n }\n child.setShape('points', points);\n // Reset draw cursor.\n child.reset();\n });\n };\n LargeSymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._clear();\n };\n LargeSymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {\n var lastAdded = this._newAdded[0];\n var points = data.getLayout('points');\n var oldPoints = lastAdded && lastAdded.shape.points;\n // Merging the exists. Each element has 1e4 points.\n // Consider the performance balance between too much elements and too much points in one shape(may affect hover optimization)\n if (oldPoints && oldPoints.length < 2e4) {\n var oldLen = oldPoints.length;\n var newPoints = new Float32Array(oldLen + points.length);\n // Concat two array\n newPoints.set(oldPoints);\n newPoints.set(points, oldLen);\n // Update endIndex\n lastAdded.endIndex = taskParams.end;\n lastAdded.setShape({\n points: newPoints\n });\n } else {\n // Clear\n this._newAdded = [];\n var symbolEl = this._create();\n symbolEl.startIndex = taskParams.start;\n symbolEl.endIndex = taskParams.end;\n symbolEl.incremental = true;\n symbolEl.setShape({\n points: points\n });\n this._setCommon(symbolEl, data, opt);\n }\n };\n LargeSymbolDraw.prototype.eachRendered = function (cb) {\n this._newAdded[0] && cb(this._newAdded[0]);\n };\n LargeSymbolDraw.prototype._create = function () {\n var symbolEl = new LargeSymbolPath({\n cursor: 'default'\n });\n symbolEl.ignoreCoarsePointer = true;\n this.group.add(symbolEl);\n this._newAdded.push(symbolEl);\n return symbolEl;\n };\n LargeSymbolDraw.prototype._setCommon = function (symbolEl, data, opt) {\n var hostModel = data.hostModel;\n opt = opt || {};\n var size = data.getVisual('symbolSize');\n symbolEl.setShape('size', size instanceof Array ? size : [size, size]);\n symbolEl.softClipShape = opt.clipShape || null;\n // Create symbolProxy to build path for each data\n symbolEl.symbolProxy = createSymbol(data.getVisual('symbol'), 0, 0, 0, 0);\n // Use symbolProxy setColor method\n symbolEl.setColor = symbolEl.symbolProxy.setColor;\n var extrudeShadow = symbolEl.shape.size[0] < BOOST_SIZE_THRESHOLD;\n symbolEl.useStyle(\n // Draw shadow when doing fillRect is extremely slow.\n hostModel.getModel('itemStyle').getItemStyle(extrudeShadow ? ['color', 'shadowBlur', 'shadowColor'] : ['color']));\n var globalStyle = data.getVisual('style');\n var visualColor = globalStyle && globalStyle.fill;\n if (visualColor) {\n symbolEl.setColor(visualColor);\n }\n var ecData = getECData(symbolEl);\n // Enable tooltip\n // PENDING May have performance issue when path is extremely large\n ecData.seriesIndex = hostModel.seriesIndex;\n symbolEl.on('mousemove', function (e) {\n ecData.dataIndex = null;\n var dataIndex = symbolEl.hoverDataIdx;\n if (dataIndex >= 0) {\n // Provide dataIndex for tooltip\n ecData.dataIndex = dataIndex + (symbolEl.startIndex || 0);\n }\n });\n };\n LargeSymbolDraw.prototype.remove = function () {\n this._clear();\n };\n LargeSymbolDraw.prototype._clear = function () {\n this._newAdded = [];\n this.group.removeAll();\n };\n return LargeSymbolDraw;\n}();\nexport default LargeSymbolDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport LargeSymbolDraw from '../helper/LargeSymbolDraw.js';\nimport pointsLayout from '../../layout/points.js';\nimport ChartView from '../../view/Chart.js';\nvar ScatterView = /** @class */function (_super) {\n __extends(ScatterView, _super);\n function ScatterView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScatterView.type;\n return _this;\n }\n ScatterView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n symbolDraw.updateData(data, {\n // TODO\n // If this parameter should be a shape or a bounding volume\n // shape will be more general.\n // But bounding volume like bounding rect will be much faster in the contain calculation\n clipShape: this._getClipShape(seriesModel)\n });\n this._finished = true;\n };\n ScatterView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n symbolDraw.incrementalPrepareUpdate(data);\n this._finished = false;\n };\n ScatterView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) {\n this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), {\n clipShape: this._getClipShape(seriesModel)\n });\n this._finished = taskParams.end === seriesModel.getData().count();\n };\n ScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n // Must mark group dirty and make sure the incremental layer will be cleared\n // PENDING\n this.group.dirty();\n if (!this._finished || data.count() > 1e4) {\n return {\n update: true\n };\n } else {\n var res = pointsLayout('').reset(seriesModel, ecModel, api);\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count(),\n count: data.count()\n }, data);\n }\n this._symbolDraw.updateLayout(data);\n }\n };\n ScatterView.prototype.eachRendered = function (cb) {\n this._symbolDraw && this._symbolDraw.eachRendered(cb);\n };\n ScatterView.prototype._getClipShape = function (seriesModel) {\n if (!seriesModel.get('clip', true)) {\n return;\n }\n var coordSys = seriesModel.coordinateSystem;\n // PENDING make `0.1` configurable, for example, `clipTolerance`?\n return coordSys && coordSys.getArea && coordSys.getArea(.1);\n };\n ScatterView.prototype._updateSymbolDraw = function (data, seriesModel) {\n var symbolDraw = this._symbolDraw;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n if (!symbolDraw || isLargeDraw !== this._isLargeDraw) {\n symbolDraw && symbolDraw.remove();\n symbolDraw = this._symbolDraw = isLargeDraw ? new LargeSymbolDraw() : new SymbolDraw();\n this._isLargeDraw = isLargeDraw;\n this.group.removeAll();\n }\n this.group.add(symbolDraw.group);\n return symbolDraw;\n };\n ScatterView.prototype.remove = function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(true);\n this._symbolDraw = null;\n };\n ScatterView.prototype.dispose = function () {};\n ScatterView.type = 'scatter';\n return ScatterView;\n}(ChartView);\nexport default ScatterView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar GridModel = /** @class */function (_super) {\n __extends(GridModel, _super);\n function GridModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridModel.type = 'grid';\n GridModel.dependencies = ['xAxis', 'yAxis'];\n GridModel.layoutMode = 'box';\n GridModel.defaultOption = {\n show: false,\n // zlevel: 0,\n z: 0,\n left: '10%',\n top: 60,\n right: '10%',\n bottom: 70,\n // If grid size contain label\n containLabel: false,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n backgroundColor: 'rgba(0,0,0,0)',\n borderWidth: 1,\n borderColor: '#ccc'\n };\n return GridModel;\n}(ComponentModel);\nexport default GridModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar CartesianAxisModel = /** @class */function (_super) {\n __extends(CartesianAxisModel, _super);\n function CartesianAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CartesianAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('grid', SINGLE_REFERRING).models[0];\n };\n CartesianAxisModel.type = 'cartesian2dAxis';\n return CartesianAxisModel;\n}(ComponentModel);\nexport { CartesianAxisModel };\nzrUtil.mixin(CartesianAxisModel, AxisModelCommonMixin);\nexport default CartesianAxisModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar defaultOption = {\n show: true,\n // zlevel: 0,\n z: 0,\n // Inverse the axis.\n inverse: false,\n // Axis name displayed.\n name: '',\n // 'start' | 'middle' | 'end'\n nameLocation: 'end',\n // By degree. By default auto rotate by nameLocation.\n nameRotate: null,\n nameTruncate: {\n maxWidth: null,\n ellipsis: '...',\n placeholder: '.'\n },\n // Use global text style by default.\n nameTextStyle: {},\n // The gap between axisName and axisLine.\n nameGap: 15,\n // Default `false` to support tooltip.\n silent: false,\n // Default `false` to avoid legacy user event listener fail.\n triggerEvent: false,\n tooltip: {\n show: false\n },\n axisPointer: {},\n axisLine: {\n show: true,\n onZero: true,\n onZeroAxisIndex: null,\n lineStyle: {\n color: '#6E7079',\n width: 1,\n type: 'solid'\n },\n // The arrow at both ends the the axis.\n symbol: ['none', 'none'],\n symbolSize: [10, 15]\n },\n axisTick: {\n show: true,\n // Whether axisTick is inside the grid or outside the grid.\n inside: false,\n // The length of axisTick.\n length: 5,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n // Whether axisLabel is inside the grid or outside the grid.\n inside: false,\n rotate: 0,\n // true | false | null/undefined (auto)\n showMinLabel: null,\n // true | false | null/undefined (auto)\n showMaxLabel: null,\n margin: 8,\n // formatter: null,\n fontSize: 12\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: ['#E0E6F1'],\n width: 1,\n type: 'solid'\n }\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)']\n }\n }\n};\nvar categoryAxis = zrUtil.merge({\n // The gap at both ends of the axis. For categoryAxis, boolean.\n boundaryGap: true,\n // Set false to faster category collection.\n deduplication: null,\n // splitArea: {\n // show: false\n // },\n splitLine: {\n show: false\n },\n axisTick: {\n // If tick is align with label when boundaryGap is true\n alignWithLabel: false,\n interval: 'auto'\n },\n axisLabel: {\n interval: 'auto'\n }\n}, defaultOption);\nvar valueAxis = zrUtil.merge({\n boundaryGap: [0, 0],\n axisLine: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n axisTick: {\n // Not shown when other axis is categoryAxis in cartesian\n show: 'auto'\n },\n // TODO\n // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]\n splitNumber: 5,\n minorTick: {\n // Minor tick, not available for cateogry axis.\n show: false,\n // Split number of minor ticks. The value should be in range of (0, 100)\n splitNumber: 5,\n // Length of minor tick\n length: 3,\n // Line style\n lineStyle: {\n // Default to be same with axisTick\n }\n },\n minorSplitLine: {\n show: false,\n lineStyle: {\n color: '#F4F7FD',\n width: 1\n }\n }\n}, defaultOption);\nvar timeAxis = zrUtil.merge({\n splitNumber: 6,\n axisLabel: {\n // To eliminate labels that are not nice\n showMinLabel: false,\n showMaxLabel: false,\n rich: {\n primary: {\n fontWeight: 'bold'\n }\n }\n },\n splitLine: {\n show: false\n }\n}, valueAxis);\nvar logAxis = zrUtil.defaults({\n logBase: 10\n}, valueAxis);\nexport default {\n category: categoryAxis,\n value: valueAxis,\n time: timeAxis,\n log: logAxis\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport var AXIS_TYPES = {\n value: 1,\n category: 1,\n time: 1,\n log: 1\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport axisDefault from './axisDefault.js';\nimport { getLayoutParams, mergeLayoutParam, fetchLayoutMode } from '../util/layout.js';\nimport OrdinalMeta from '../data/OrdinalMeta.js';\nimport { AXIS_TYPES } from './axisCommonTypes.js';\nimport { each, merge } from 'zrender/lib/core/util.js';\n/**\n * Generate sub axis model class\n * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ...\n */\nexport default function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) {\n each(AXIS_TYPES, function (v, axisType) {\n var defaultOption = merge(merge({}, axisDefault[axisType], true), extraDefaultOption, true);\n var AxisModel = /** @class */function (_super) {\n __extends(AxisModel, _super);\n function AxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = axisName + 'Axis.' + axisType;\n return _this;\n }\n AxisModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n merge(option, themeModel.get(axisType + 'Axis'));\n merge(option, this.getDefaultOption());\n option.type = getAxisType(option);\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n AxisModel.prototype.optionUpdated = function () {\n var thisOption = this.option;\n if (thisOption.type === 'category') {\n this.__ordinalMeta = OrdinalMeta.createByAxisModel(this);\n }\n };\n /**\n * Should not be called before all of 'getInitailData' finished.\n * Because categories are collected during initializing data.\n */\n AxisModel.prototype.getCategories = function (rawData) {\n var option = this.option;\n // FIXME\n // warning if called before all of 'getInitailData' finished.\n if (option.type === 'category') {\n if (rawData) {\n return option.data;\n }\n return this.__ordinalMeta.categories;\n }\n };\n AxisModel.prototype.getOrdinalMeta = function () {\n return this.__ordinalMeta;\n };\n AxisModel.type = axisName + 'Axis.' + axisType;\n AxisModel.defaultOption = defaultOption;\n return AxisModel;\n }(BaseAxisModelClass);\n registers.registerComponentModel(AxisModel);\n });\n registers.registerSubTypeDefaulter(axisName + 'Axis', getAxisType);\n}\nfunction getAxisType(option) {\n // Default axis with data is category axis\n return option.type || (option.data ? 'category' : 'value');\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar Cartesian = /** @class */function () {\n function Cartesian(name) {\n this.type = 'cartesian';\n this._dimList = [];\n this._axes = {};\n this.name = name || '';\n }\n Cartesian.prototype.getAxis = function (dim) {\n return this._axes[dim];\n };\n Cartesian.prototype.getAxes = function () {\n return zrUtil.map(this._dimList, function (dim) {\n return this._axes[dim];\n }, this);\n };\n Cartesian.prototype.getAxesByScale = function (scaleType) {\n scaleType = scaleType.toLowerCase();\n return zrUtil.filter(this.getAxes(), function (axis) {\n return axis.scale.type === scaleType;\n });\n };\n Cartesian.prototype.addAxis = function (axis) {\n var dim = axis.dim;\n this._axes[dim] = axis;\n this._dimList.push(dim);\n };\n return Cartesian;\n}();\n;\nexport default Cartesian;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Cartesian from './Cartesian.js';\nimport { invert } from 'zrender/lib/core/matrix.js';\nimport { applyTransform } from 'zrender/lib/core/vector.js';\nexport var cartesian2DDimensions = ['x', 'y'];\nfunction canCalculateAffineTransform(scale) {\n return scale.type === 'interval' || scale.type === 'time';\n}\nvar Cartesian2D = /** @class */function (_super) {\n __extends(Cartesian2D, _super);\n function Cartesian2D() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'cartesian2d';\n _this.dimensions = cartesian2DDimensions;\n return _this;\n }\n /**\n * Calculate an affine transform matrix if two axes are time or value.\n * It's mainly for accelartion on the large time series data.\n */\n Cartesian2D.prototype.calcAffineTransform = function () {\n this._transform = this._invTransform = null;\n var xAxisScale = this.getAxis('x').scale;\n var yAxisScale = this.getAxis('y').scale;\n if (!canCalculateAffineTransform(xAxisScale) || !canCalculateAffineTransform(yAxisScale)) {\n return;\n }\n var xScaleExtent = xAxisScale.getExtent();\n var yScaleExtent = yAxisScale.getExtent();\n var start = this.dataToPoint([xScaleExtent[0], yScaleExtent[0]]);\n var end = this.dataToPoint([xScaleExtent[1], yScaleExtent[1]]);\n var xScaleSpan = xScaleExtent[1] - xScaleExtent[0];\n var yScaleSpan = yScaleExtent[1] - yScaleExtent[0];\n if (!xScaleSpan || !yScaleSpan) {\n return;\n }\n // Accelerate data to point calculation on the special large time series data.\n var scaleX = (end[0] - start[0]) / xScaleSpan;\n var scaleY = (end[1] - start[1]) / yScaleSpan;\n var translateX = start[0] - xScaleExtent[0] * scaleX;\n var translateY = start[1] - yScaleExtent[0] * scaleY;\n var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY];\n this._invTransform = invert([], m);\n };\n /**\n * Base axis will be used on stacking.\n */\n Cartesian2D.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x');\n };\n Cartesian2D.prototype.containPoint = function (point) {\n var axisX = this.getAxis('x');\n var axisY = this.getAxis('y');\n return axisX.contain(axisX.toLocalCoord(point[0])) && axisY.contain(axisY.toLocalCoord(point[1]));\n };\n Cartesian2D.prototype.containData = function (data) {\n return this.getAxis('x').containData(data[0]) && this.getAxis('y').containData(data[1]);\n };\n Cartesian2D.prototype.containZone = function (data1, data2) {\n var zoneDiag1 = this.dataToPoint(data1);\n var zoneDiag2 = this.dataToPoint(data2);\n var area = this.getArea();\n var zone = new BoundingRect(zoneDiag1[0], zoneDiag1[1], zoneDiag2[0] - zoneDiag1[0], zoneDiag2[1] - zoneDiag1[1]);\n return area.intersect(zone);\n };\n Cartesian2D.prototype.dataToPoint = function (data, clamp, out) {\n out = out || [];\n var xVal = data[0];\n var yVal = data[1];\n // Fast path\n if (this._transform\n // It's supported that if data is like `[Inifity, 123]`, where only Y pixel calculated.\n && xVal != null && isFinite(xVal) && yVal != null && isFinite(yVal)) {\n return applyTransform(out, data, this._transform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(xVal, clamp));\n out[1] = yAxis.toGlobalCoord(yAxis.dataToCoord(yVal, clamp));\n return out;\n };\n Cartesian2D.prototype.clampData = function (data, out) {\n var xScale = this.getAxis('x').scale;\n var yScale = this.getAxis('y').scale;\n var xAxisExtent = xScale.getExtent();\n var yAxisExtent = yScale.getExtent();\n var x = xScale.parse(data[0]);\n var y = yScale.parse(data[1]);\n out = out || [];\n out[0] = Math.min(Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x), Math.max(xAxisExtent[0], xAxisExtent[1]));\n out[1] = Math.min(Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y), Math.max(yAxisExtent[0], yAxisExtent[1]));\n return out;\n };\n Cartesian2D.prototype.pointToData = function (point, clamp) {\n var out = [];\n if (this._invTransform) {\n return applyTransform(out, point, this._invTransform);\n }\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out[0] = xAxis.coordToData(xAxis.toLocalCoord(point[0]), clamp);\n out[1] = yAxis.coordToData(yAxis.toLocalCoord(point[1]), clamp);\n return out;\n };\n Cartesian2D.prototype.getOtherAxis = function (axis) {\n return this.getAxis(axis.dim === 'x' ? 'y' : 'x');\n };\n /**\n * Get rect area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Cartesian2D.prototype.getArea = function (tolerance) {\n tolerance = tolerance || 0;\n var xExtent = this.getAxis('x').getGlobalExtent();\n var yExtent = this.getAxis('y').getGlobalExtent();\n var x = Math.min(xExtent[0], xExtent[1]) - tolerance;\n var y = Math.min(yExtent[0], yExtent[1]) - tolerance;\n var width = Math.max(xExtent[0], xExtent[1]) - x + tolerance;\n var height = Math.max(yExtent[0], yExtent[1]) - y + tolerance;\n return new BoundingRect(x, y, width, height);\n };\n return Cartesian2D;\n}(Cartesian);\n;\nexport default Cartesian2D;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar Axis2D = /** @class */function (_super) {\n __extends(Axis2D, _super);\n function Axis2D(dim, scale, coordExtent, axisType, position) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n /**\n * Index of axis, can be used as key\n * Injected outside.\n */\n _this.index = 0;\n _this.type = axisType || 'value';\n _this.position = position || 'bottom';\n return _this;\n }\n Axis2D.prototype.isHorizontal = function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n };\n /**\n * Each item cooresponds to this.getExtent(), which\n * means globalExtent[0] may greater than globalExtent[1],\n * unless `asc` is input.\n *\n * @param {boolean} [asc]\n * @return {Array.}\n */\n Axis2D.prototype.getGlobalExtent = function (asc) {\n var ret = this.getExtent();\n ret[0] = this.toGlobalCoord(ret[0]);\n ret[1] = this.toGlobalCoord(ret[1]);\n asc && ret[0] > ret[1] && ret.reverse();\n return ret;\n };\n Axis2D.prototype.pointToData = function (point, clamp) {\n return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp);\n };\n /**\n * Set ordinalSortInfo\n * @param info new OrdinalSortInfo\n */\n Axis2D.prototype.setCategorySortInfo = function (info) {\n if (this.type !== 'category') {\n return false;\n }\n this.model.option.categorySortInfo = info;\n this.scale.setSortInfo(info);\n };\n return Axis2D;\n}(Axis);\nexport default Axis2D;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Can only be called after coordinate system creation stage.\n * (Can be called before coordinate system update stage).\n */\nexport function layout(gridModel, axisModel, opt) {\n opt = opt || {};\n var grid = gridModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0];\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n var rect = grid.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {\n left: 0,\n right: 1,\n top: 0,\n bottom: 1,\n onZero: 2\n };\n var axisOffset = axisModel.get('offset') || 0;\n var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset];\n if (otherAxisOnZeroOf) {\n var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0));\n posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]);\n }\n // Axis position\n layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]];\n // Axis rotation\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1);\n // Tick and label direction, x y is axisDim\n var dirMap = {\n top: -1,\n bottom: 1,\n left: -1,\n right: 1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];\n layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0;\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n if (zrUtil.retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n }\n // Special label rotation\n var labelRotate = axisModel.get(['axisLabel', 'rotate']);\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate;\n // Over splitLine and splitArea\n layout.z2 = 1;\n return layout;\n}\nexport function isCartesian2DSeries(seriesModel) {\n return seriesModel.get('coordinateSystem') === 'cartesian2d';\n}\nexport function findAxisModels(seriesModel) {\n var axisModelMap = {\n xAxisModel: null,\n yAxisModel: null\n };\n zrUtil.each(axisModelMap, function (v, key) {\n var axisType = key.replace(/Model$/, '');\n var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!axisModel) {\n throw new Error(axisType + ' \"' + zrUtil.retrieve3(seriesModel.get(axisType + 'Index'), seriesModel.get(axisType + 'Id'), 0) + '\" not found');\n }\n }\n axisModelMap[key] = axisModel;\n });\n return axisModelMap;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getPrecisionSafe, round } from '../util/number.js';\nimport IntervalScale from '../scale/Interval.js';\nimport { getScaleExtent } from './axisHelper.js';\nimport { warn } from '../util/log.js';\nimport { increaseInterval, isValueNice } from '../scale/helper.js';\nvar mathLog = Math.log;\nexport function alignScaleTicks(scale, axisModel, alignToScale) {\n var intervalScaleProto = IntervalScale.prototype;\n // NOTE: There is a precondition for log scale here:\n // In log scale we store _interval and _extent of exponent value.\n // So if we use the method of InternalScale to set/get these data.\n // It process the exponent value, which is linear and what we want here.\n var alignToTicks = intervalScaleProto.getTicks.call(alignToScale);\n var alignToNicedTicks = intervalScaleProto.getTicks.call(alignToScale, true);\n var alignToSplitNumber = alignToTicks.length - 1;\n var alignToInterval = intervalScaleProto.getInterval.call(alignToScale);\n var scaleExtent = getScaleExtent(scale, axisModel);\n var rawExtent = scaleExtent.extent;\n var isMinFixed = scaleExtent.fixMin;\n var isMaxFixed = scaleExtent.fixMax;\n if (scale.type === 'log') {\n var logBase = mathLog(scale.base);\n rawExtent = [mathLog(rawExtent[0]) / logBase, mathLog(rawExtent[1]) / logBase];\n }\n scale.setExtent(rawExtent[0], rawExtent[1]);\n scale.calcNiceExtent({\n splitNumber: alignToSplitNumber,\n fixMin: isMinFixed,\n fixMax: isMaxFixed\n });\n var extent = intervalScaleProto.getExtent.call(scale);\n // Need to update the rawExtent.\n // Because value in rawExtent may be not parsed. e.g. 'dataMin', 'dataMax'\n if (isMinFixed) {\n rawExtent[0] = extent[0];\n }\n if (isMaxFixed) {\n rawExtent[1] = extent[1];\n }\n var interval = intervalScaleProto.getInterval.call(scale);\n var min = rawExtent[0];\n var max = rawExtent[1];\n if (isMinFixed && isMaxFixed) {\n // User set min, max, divide to get new interval\n interval = (max - min) / alignToSplitNumber;\n } else if (isMinFixed) {\n max = rawExtent[0] + interval * alignToSplitNumber;\n // User set min, expand extent on the other side\n while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1])) {\n interval = increaseInterval(interval);\n max = rawExtent[0] + interval * alignToSplitNumber;\n }\n } else if (isMaxFixed) {\n // User set max, expand extent on the other side\n min = rawExtent[1] - interval * alignToSplitNumber;\n while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0])) {\n interval = increaseInterval(interval);\n min = rawExtent[1] - interval * alignToSplitNumber;\n }\n } else {\n var nicedSplitNumber = scale.getTicks().length - 1;\n if (nicedSplitNumber > alignToSplitNumber) {\n interval = increaseInterval(interval);\n }\n var range = interval * alignToSplitNumber;\n max = Math.ceil(rawExtent[1] / interval) * interval;\n min = round(max - range);\n // Not change the result that crossing zero.\n if (min < 0 && rawExtent[0] >= 0) {\n min = 0;\n max = round(range);\n } else if (max > 0 && rawExtent[1] <= 0) {\n max = 0;\n min = -round(range);\n }\n }\n // Adjust min, max based on the extent of alignTo. When min or max is set in alignTo scale\n var t0 = (alignToTicks[0].value - alignToNicedTicks[0].value) / alignToInterval;\n var t1 = (alignToTicks[alignToSplitNumber].value - alignToNicedTicks[alignToSplitNumber].value) / alignToInterval;\n // NOTE: Must in setExtent -> setInterval -> setNiceExtent order.\n intervalScaleProto.setExtent.call(scale, min + interval * t0, max + interval * t1);\n intervalScaleProto.setInterval.call(scale, interval);\n if (t0 || t1) {\n intervalScaleProto.setNiceExtent.call(scale, min + interval, max - interval);\n }\n if (process.env.NODE_ENV !== 'production') {\n var ticks = intervalScaleProto.getTicks.call(scale);\n if (ticks[1] && (!isValueNice(interval) || getPrecisionSafe(ticks[1].value) > getPrecisionSafe(interval))) {\n warn(\n // eslint-disable-next-line\n \"The ticks may be not readable when set min: \" + axisModel.get('min') + \", max: \" + axisModel.get('max') + \" and alignTicks: true\");\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Grid is a region which contains at most 4 cartesian systems\n *\n * TODO Default cartesian\n */\nimport { isObject, each, indexOf, retrieve3, keys } from 'zrender/lib/core/util.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport { createScaleByModel, ifAxisCrossZero, niceScaleExtent, estimateLabelUnionRect, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\nimport Cartesian2D, { cartesian2DDimensions } from './Cartesian2D.js';\nimport Axis2D from './Axis2D.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { isCartesian2DSeries, findAxisModels } from './cartesianAxisHelper.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\nimport { alignScaleTicks } from '../axisAlignTicks.js';\nvar Grid = /** @class */function () {\n function Grid(gridModel, ecModel, api) {\n // FIXME:TS where used (different from registered type 'cartesian2d')?\n this.type = 'grid';\n this._coordsMap = {};\n this._coordsList = [];\n this._axesMap = {};\n this._axesList = [];\n this.axisPointerEnabled = true;\n this.dimensions = cartesian2DDimensions;\n this._initCartesian(gridModel, ecModel, api);\n this.model = gridModel;\n }\n Grid.prototype.getRect = function () {\n return this._rect;\n };\n Grid.prototype.update = function (ecModel, api) {\n var axesMap = this._axesMap;\n this._updateScale(ecModel, this.model);\n function updateAxisTicks(axes) {\n var alignTo;\n // Axis is added in order of axisIndex.\n var axesIndices = keys(axes);\n var len = axesIndices.length;\n if (!len) {\n return;\n }\n var axisNeedsAlign = [];\n // Process once and calculate the ticks for those don't use alignTicks.\n for (var i = len - 1; i >= 0; i--) {\n var idx = +axesIndices[i]; // Convert to number.\n var axis = axes[idx];\n var model = axis.model;\n var scale = axis.scale;\n if (\n // Only value and log axis without interval support alignTicks.\n isIntervalOrLogScale(scale) && model.get('alignTicks') && model.get('interval') == null) {\n axisNeedsAlign.push(axis);\n } else {\n niceScaleExtent(scale, model);\n if (isIntervalOrLogScale(scale)) {\n // Can only align to interval or log axis.\n alignTo = axis;\n }\n }\n }\n ;\n // All axes has set alignTicks. Pick the first one.\n // PENDING. Should we find the axis that both set interval, min, max and align to this one?\n if (axisNeedsAlign.length) {\n if (!alignTo) {\n alignTo = axisNeedsAlign.pop();\n niceScaleExtent(alignTo.scale, alignTo.model);\n }\n each(axisNeedsAlign, function (axis) {\n alignScaleTicks(axis.scale, axis.model, alignTo.scale);\n });\n }\n }\n updateAxisTicks(axesMap.x);\n updateAxisTicks(axesMap.y);\n // Key: axisDim_axisIndex, value: boolean, whether onZero target.\n var onZeroRecords = {};\n each(axesMap.x, function (xAxis) {\n fixAxisOnZero(axesMap, 'y', xAxis, onZeroRecords);\n });\n each(axesMap.y, function (yAxis) {\n fixAxisOnZero(axesMap, 'x', yAxis, onZeroRecords);\n });\n // Resize again if containLabel is enabled\n // FIXME It may cause getting wrong grid size in data processing stage\n this.resize(this.model, api);\n };\n /**\n * Resize the grid\n */\n Grid.prototype.resize = function (gridModel, api, ignoreContainLabel) {\n var boxLayoutParams = gridModel.getBoxLayoutParams();\n var isContainLabel = !ignoreContainLabel && gridModel.get('containLabel');\n var gridRect = getLayoutRect(boxLayoutParams, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._rect = gridRect;\n var axesList = this._axesList;\n adjustAxes();\n // Minus label size\n if (isContainLabel) {\n each(axesList, function (axis) {\n if (!axis.model.get(['axisLabel', 'inside'])) {\n var labelUnionRect = estimateLabelUnionRect(axis);\n if (labelUnionRect) {\n var dim = axis.isHorizontal() ? 'height' : 'width';\n var margin = axis.model.get(['axisLabel', 'margin']);\n gridRect[dim] -= labelUnionRect[dim] + margin;\n if (axis.position === 'top') {\n gridRect.y += labelUnionRect.height + margin;\n } else if (axis.position === 'left') {\n gridRect.x += labelUnionRect.width + margin;\n }\n }\n }\n });\n adjustAxes();\n }\n each(this._coordsList, function (coord) {\n // Calculate affine matrix to accelerate the data to point transform.\n // If all the axes scales are time or value.\n coord.calcAffineTransform();\n });\n function adjustAxes() {\n each(axesList, function (axis) {\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, gridRect.width] : [0, gridRect.height];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n updateAxisTransform(axis, isHorizontal ? gridRect.x : gridRect.y);\n });\n }\n };\n Grid.prototype.getAxis = function (dim, axisIndex) {\n var axesMapOnDim = this._axesMap[dim];\n if (axesMapOnDim != null) {\n return axesMapOnDim[axisIndex || 0];\n }\n };\n Grid.prototype.getAxes = function () {\n return this._axesList.slice();\n };\n Grid.prototype.getCartesian = function (xAxisIndex, yAxisIndex) {\n if (xAxisIndex != null && yAxisIndex != null) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n return this._coordsMap[key];\n }\n if (isObject(xAxisIndex)) {\n yAxisIndex = xAxisIndex.yAxisIndex;\n xAxisIndex = xAxisIndex.xAxisIndex;\n }\n for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) {\n if (coordList[i].getAxis('x').index === xAxisIndex || coordList[i].getAxis('y').index === yAxisIndex) {\n return coordList[i];\n }\n }\n };\n Grid.prototype.getCartesians = function () {\n return this._coordsList.slice();\n };\n /**\n * @implements\n */\n Grid.prototype.convertToPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null;\n };\n /**\n * @implements\n */\n Grid.prototype.convertFromPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(finder);\n return target.cartesian ? target.cartesian.pointToData(value) : target.axis ? target.axis.coordToData(target.axis.toLocalCoord(value)) : null;\n };\n Grid.prototype._findConvertTarget = function (finder) {\n var seriesModel = finder.seriesModel;\n var xAxisModel = finder.xAxisModel || seriesModel && seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0];\n var yAxisModel = finder.yAxisModel || seriesModel && seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0];\n var gridModel = finder.gridModel;\n var coordsList = this._coordsList;\n var cartesian;\n var axis;\n if (seriesModel) {\n cartesian = seriesModel.coordinateSystem;\n indexOf(coordsList, cartesian) < 0 && (cartesian = null);\n } else if (xAxisModel && yAxisModel) {\n cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n } else if (xAxisModel) {\n axis = this.getAxis('x', xAxisModel.componentIndex);\n } else if (yAxisModel) {\n axis = this.getAxis('y', yAxisModel.componentIndex);\n }\n // Lowest priority.\n else if (gridModel) {\n var grid = gridModel.coordinateSystem;\n if (grid === this) {\n cartesian = this._coordsList[0];\n }\n }\n return {\n cartesian: cartesian,\n axis: axis\n };\n };\n /**\n * @implements\n */\n Grid.prototype.containPoint = function (point) {\n var coord = this._coordsList[0];\n if (coord) {\n return coord.containPoint(point);\n }\n };\n /**\n * Initialize cartesian coordinate systems\n */\n Grid.prototype._initCartesian = function (gridModel, ecModel, api) {\n var _this = this;\n var grid = this;\n var axisPositionUsed = {\n left: false,\n right: false,\n top: false,\n bottom: false\n };\n var axesMap = {\n x: {},\n y: {}\n };\n var axesCount = {\n x: 0,\n y: 0\n };\n // Create axis\n ecModel.eachComponent('xAxis', createAxisCreator('x'), this);\n ecModel.eachComponent('yAxis', createAxisCreator('y'), this);\n if (!axesCount.x || !axesCount.y) {\n // Roll back when there no either x or y axis\n this._axesMap = {};\n this._axesList = [];\n return;\n }\n this._axesMap = axesMap;\n // Create cartesian2d\n each(axesMap.x, function (xAxis, xAxisIndex) {\n each(axesMap.y, function (yAxis, yAxisIndex) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n var cartesian = new Cartesian2D(key);\n cartesian.master = _this;\n cartesian.model = gridModel;\n _this._coordsMap[key] = cartesian;\n _this._coordsList.push(cartesian);\n cartesian.addAxis(xAxis);\n cartesian.addAxis(yAxis);\n });\n });\n function createAxisCreator(dimName) {\n return function (axisModel, idx) {\n if (!isAxisUsedInTheGrid(axisModel, gridModel)) {\n return;\n }\n var axisPosition = axisModel.get('position');\n if (dimName === 'x') {\n // Fix position\n if (axisPosition !== 'top' && axisPosition !== 'bottom') {\n // Default bottom of X\n axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom';\n }\n } else {\n // Fix position\n if (axisPosition !== 'left' && axisPosition !== 'right') {\n // Default left of Y\n axisPosition = axisPositionUsed.left ? 'right' : 'left';\n }\n }\n axisPositionUsed[axisPosition] = true;\n var axis = new Axis2D(dimName, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisPosition);\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n // Inject axis into axisModel\n axisModel.axis = axis;\n // Inject axisModel into axis\n axis.model = axisModel;\n // Inject grid info axis\n axis.grid = grid;\n // Index of axis, can be used as key\n axis.index = idx;\n grid._axesList.push(axis);\n axesMap[dimName][idx] = axis;\n axesCount[dimName]++;\n };\n }\n };\n /**\n * Update cartesian properties from series.\n */\n Grid.prototype._updateScale = function (ecModel, gridModel) {\n // Reset scale\n each(this._axesList, function (axis) {\n axis.scale.setExtent(Infinity, -Infinity);\n if (axis.type === 'category') {\n var categorySortInfo = axis.model.get('categorySortInfo');\n axis.scale.setSortInfo(categorySortInfo);\n }\n });\n ecModel.eachSeries(function (seriesModel) {\n if (isCartesian2DSeries(seriesModel)) {\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n if (!isAxisUsedInTheGrid(xAxisModel, gridModel) || !isAxisUsedInTheGrid(yAxisModel, gridModel)) {\n return;\n }\n var cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n var data = seriesModel.getData();\n var xAxis = cartesian.getAxis('x');\n var yAxis = cartesian.getAxis('y');\n unionExtent(data, xAxis);\n unionExtent(data, yAxis);\n }\n }, this);\n function unionExtent(data, axis) {\n each(getDataDimensionsOnAxis(data, axis.dim), function (dim) {\n axis.scale.unionExtentFromData(data, dim);\n });\n }\n };\n /**\n * @param dim 'x' or 'y' or 'auto' or null/undefined\n */\n Grid.prototype.getTooltipAxes = function (dim) {\n var baseAxes = [];\n var otherAxes = [];\n each(this.getCartesians(), function (cartesian) {\n var baseAxis = dim != null && dim !== 'auto' ? cartesian.getAxis(dim) : cartesian.getBaseAxis();\n var otherAxis = cartesian.getOtherAxis(baseAxis);\n indexOf(baseAxes, baseAxis) < 0 && baseAxes.push(baseAxis);\n indexOf(otherAxes, otherAxis) < 0 && otherAxes.push(otherAxis);\n });\n return {\n baseAxes: baseAxes,\n otherAxes: otherAxes\n };\n };\n Grid.create = function (ecModel, api) {\n var grids = [];\n ecModel.eachComponent('grid', function (gridModel, idx) {\n var grid = new Grid(gridModel, ecModel, api);\n grid.name = 'grid_' + idx;\n // dataSampling requires axis extent, so resize\n // should be performed in create stage.\n grid.resize(gridModel, api, true);\n gridModel.coordinateSystem = grid;\n grids.push(grid);\n });\n // Inject the coordinateSystems into seriesModel\n ecModel.eachSeries(function (seriesModel) {\n if (!isCartesian2DSeries(seriesModel)) {\n return;\n }\n var axesModelMap = findAxisModels(seriesModel);\n var xAxisModel = axesModelMap.xAxisModel;\n var yAxisModel = axesModelMap.yAxisModel;\n var gridModel = xAxisModel.getCoordSysModel();\n if (process.env.NODE_ENV !== 'production') {\n if (!gridModel) {\n throw new Error('Grid \"' + retrieve3(xAxisModel.get('gridIndex'), xAxisModel.get('gridId'), 0) + '\" not found');\n }\n if (xAxisModel.getCoordSysModel() !== yAxisModel.getCoordSysModel()) {\n throw new Error('xAxis and yAxis must use the same grid');\n }\n }\n var grid = gridModel.coordinateSystem;\n seriesModel.coordinateSystem = grid.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n });\n return grids;\n };\n // For deciding which dimensions to use when creating list data\n Grid.dimensions = cartesian2DDimensions;\n return Grid;\n}();\n/**\n * Check if the axis is used in the specified grid.\n */\nfunction isAxisUsedInTheGrid(axisModel, gridModel) {\n return axisModel.getCoordSysModel() === gridModel;\n}\nfunction fixAxisOnZero(axesMap, otherAxisDim, axis,\n// Key: see `getOnZeroRecordKey`\nonZeroRecords) {\n axis.getAxesOnZeroOf = function () {\n // TODO: onZero of multiple axes.\n return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : [];\n };\n // onZero can not be enabled in these two situations:\n // 1. When any other axis is a category axis.\n // 2. When no axis is cross 0 point.\n var otherAxes = axesMap[otherAxisDim];\n var otherAxisOnZeroOf;\n var axisModel = axis.model;\n var onZero = axisModel.get(['axisLine', 'onZero']);\n var onZeroAxisIndex = axisModel.get(['axisLine', 'onZeroAxisIndex']);\n if (!onZero) {\n return;\n }\n // If target axis is specified.\n if (onZeroAxisIndex != null) {\n if (canOnZeroToAxis(otherAxes[onZeroAxisIndex])) {\n otherAxisOnZeroOf = otherAxes[onZeroAxisIndex];\n }\n } else {\n // Find the first available other axis.\n for (var idx in otherAxes) {\n if (otherAxes.hasOwnProperty(idx) && canOnZeroToAxis(otherAxes[idx])\n // Consider that two Y axes on one value axis,\n // if both onZero, the two Y axes overlap.\n && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]) {\n otherAxisOnZeroOf = otherAxes[idx];\n break;\n }\n }\n }\n if (otherAxisOnZeroOf) {\n onZeroRecords[getOnZeroRecordKey(otherAxisOnZeroOf)] = true;\n }\n function getOnZeroRecordKey(axis) {\n return axis.dim + '_' + axis.index;\n }\n}\nfunction canOnZeroToAxis(axis) {\n return axis && axis.type !== 'category' && axis.type !== 'time' && ifAxisCrossZero(axis);\n}\nfunction updateAxisTransform(axis, coordBase) {\n var axisExtent = axis.getExtent();\n var axisExtentSum = axisExtent[0] + axisExtent[1];\n // Fast transform\n axis.toGlobalCoord = axis.dim === 'x' ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n axis.toLocalCoord = axis.dim === 'x' ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n}\nexport default Grid;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { retrieve, defaults, extend, each, isObject, map, isString, isNumber, isFunction, retrieve2 } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport { isRadianAroundZero, remRadian } from '../../util/number.js';\nimport { createSymbol, normalizeSymbolOffset } from '../../util/symbol.js';\nimport * as matrixUtil from 'zrender/lib/core/matrix.js';\nimport { applyTransform as v2ApplyTransform } from 'zrender/lib/core/vector.js';\nimport { shouldShowAllLabels } from '../../coord/axisHelper.js';\nimport { prepareLayoutList, hideOverlap } from '../../label/labelLayoutHelper.js';\nvar PI = Math.PI;\n/**\n * A final axis is translated and rotated from a \"standard axis\".\n * So opt.position and opt.rotation is required.\n *\n * A standard axis is and axis from [0, 0] to [0, axisExtent[1]],\n * for example: (0, 0) ------------> (0, 50)\n *\n * nameDirection or tickDirection or labelDirection is 1 means tick\n * or label is below the standard axis, whereas is -1 means above\n * the standard axis. labelOffset means offset between label and axis,\n * which is useful when 'onZero', where axisLabel is in the grid and\n * label in outside grid.\n *\n * Tips: like always,\n * positive rotation represents anticlockwise, and negative rotation\n * represents clockwise.\n * The direction of position coordinate is the same as the direction\n * of screen coordinate.\n *\n * Do not need to consider axis 'inverse', which is auto processed by\n * axis extent.\n */\nvar AxisBuilder = /** @class */function () {\n function AxisBuilder(axisModel, opt) {\n this.group = new graphic.Group();\n this.opt = opt;\n this.axisModel = axisModel;\n // Default value\n defaults(opt, {\n labelOffset: 0,\n nameDirection: 1,\n tickDirection: 1,\n labelDirection: 1,\n silent: true,\n handleAutoShown: function () {\n return true;\n }\n });\n // FIXME Not use a separate text group?\n var transformGroup = new graphic.Group({\n x: opt.position[0],\n y: opt.position[1],\n rotation: opt.rotation\n });\n // this.group.add(transformGroup);\n // this._transformGroup = transformGroup;\n transformGroup.updateTransform();\n this._transformGroup = transformGroup;\n }\n AxisBuilder.prototype.hasBuilder = function (name) {\n return !!builders[name];\n };\n AxisBuilder.prototype.add = function (name) {\n builders[name](this.opt, this.axisModel, this.group, this._transformGroup);\n };\n AxisBuilder.prototype.getGroup = function () {\n return this.group;\n };\n AxisBuilder.innerTextLayout = function (axisRotation, textRotation, direction) {\n var rotationDiff = remRadian(textRotation - axisRotation);\n var textAlign;\n var textVerticalAlign;\n if (isRadianAroundZero(rotationDiff)) {\n // Label is parallel with axis line.\n textVerticalAlign = direction > 0 ? 'top' : 'bottom';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI)) {\n // Label is inverse parallel with axis line.\n textVerticalAlign = direction > 0 ? 'bottom' : 'top';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff > 0 && rotationDiff < PI) {\n textAlign = direction > 0 ? 'right' : 'left';\n } else {\n textAlign = direction > 0 ? 'left' : 'right';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n };\n AxisBuilder.makeAxisEventDataBase = function (axisModel) {\n var eventData = {\n componentType: axisModel.mainType,\n componentIndex: axisModel.componentIndex\n };\n eventData[axisModel.mainType + 'Index'] = axisModel.componentIndex;\n return eventData;\n };\n AxisBuilder.isLabelSilent = function (axisModel) {\n var tooltipOpt = axisModel.get('tooltip');\n return axisModel.get('silent')\n // Consider mouse cursor, add these restrictions.\n || !(axisModel.get('triggerEvent') || tooltipOpt && tooltipOpt.show);\n };\n return AxisBuilder;\n}();\n;\nvar builders = {\n axisLine: function (opt, axisModel, group, transformGroup) {\n var shown = axisModel.get(['axisLine', 'show']);\n if (shown === 'auto' && opt.handleAutoShown) {\n shown = opt.handleAutoShown('axisLine');\n }\n if (!shown) {\n return;\n }\n var extent = axisModel.axis.getExtent();\n var matrix = transformGroup.transform;\n var pt1 = [extent[0], 0];\n var pt2 = [extent[1], 0];\n var inverse = pt1[0] > pt2[0];\n if (matrix) {\n v2ApplyTransform(pt1, pt1, matrix);\n v2ApplyTransform(pt2, pt2, matrix);\n }\n var lineStyle = extend({\n lineCap: 'round'\n }, axisModel.getModel(['axisLine', 'lineStyle']).getLineStyle());\n var line = new graphic.Line({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: lineStyle,\n strokeContainThreshold: opt.strokeContainThreshold || 5,\n silent: true,\n z2: 1\n });\n graphic.subPixelOptimizeLine(line.shape, line.style.lineWidth);\n line.anid = 'line';\n group.add(line);\n var arrows = axisModel.get(['axisLine', 'symbol']);\n if (arrows != null) {\n var arrowSize = axisModel.get(['axisLine', 'symbolSize']);\n if (isString(arrows)) {\n // Use the same arrow for start and end point\n arrows = [arrows, arrows];\n }\n if (isString(arrowSize) || isNumber(arrowSize)) {\n // Use the same size for width and height\n arrowSize = [arrowSize, arrowSize];\n }\n var arrowOffset = normalizeSymbolOffset(axisModel.get(['axisLine', 'symbolOffset']) || 0, arrowSize);\n var symbolWidth_1 = arrowSize[0];\n var symbolHeight_1 = arrowSize[1];\n each([{\n rotate: opt.rotation + Math.PI / 2,\n offset: arrowOffset[0],\n r: 0\n }, {\n rotate: opt.rotation - Math.PI / 2,\n offset: arrowOffset[1],\n r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))\n }], function (point, index) {\n if (arrows[index] !== 'none' && arrows[index] != null) {\n var symbol = createSymbol(arrows[index], -symbolWidth_1 / 2, -symbolHeight_1 / 2, symbolWidth_1, symbolHeight_1, lineStyle.stroke, true);\n // Calculate arrow position with offset\n var r = point.r + point.offset;\n var pt = inverse ? pt2 : pt1;\n symbol.attr({\n rotation: point.rotate,\n x: pt[0] + r * Math.cos(opt.rotation),\n y: pt[1] - r * Math.sin(opt.rotation),\n silent: true,\n z2: 11\n });\n group.add(symbol);\n }\n });\n }\n },\n axisTickLabel: function (opt, axisModel, group, transformGroup) {\n var ticksEls = buildAxisMajorTicks(group, transformGroup, axisModel, opt);\n var labelEls = buildAxisLabel(group, transformGroup, axisModel, opt);\n fixMinMaxLabelShow(axisModel, labelEls, ticksEls);\n buildAxisMinorTicks(group, transformGroup, axisModel, opt.tickDirection);\n // This bit fixes the label overlap issue for the time chart.\n // See https://github.com/apache/echarts/issues/14266 for more.\n if (axisModel.get(['axisLabel', 'hideOverlap'])) {\n var labelList = prepareLayoutList(map(labelEls, function (label) {\n return {\n label: label,\n priority: label.z2,\n defaultAttr: {\n ignore: label.ignore\n }\n };\n }));\n hideOverlap(labelList);\n }\n },\n axisName: function (opt, axisModel, group, transformGroup) {\n var name = retrieve(opt.axisName, axisModel.get('name'));\n if (!name) {\n return;\n }\n var nameLocation = axisModel.get('nameLocation');\n var nameDirection = opt.nameDirection;\n var textStyleModel = axisModel.getModel('nameTextStyle');\n var gap = axisModel.get('nameGap') || 0;\n var extent = axisModel.axis.getExtent();\n var gapSignal = extent[0] > extent[1] ? -1 : 1;\n var pos = [nameLocation === 'start' ? extent[0] - gapSignal * gap : nameLocation === 'end' ? extent[1] + gapSignal * gap : (extent[0] + extent[1]) / 2,\n // Reuse labelOffset.\n isNameLocationCenter(nameLocation) ? opt.labelOffset + nameDirection * gap : 0];\n var labelLayout;\n var nameRotation = axisModel.get('nameRotate');\n if (nameRotation != null) {\n nameRotation = nameRotation * PI / 180; // To radian.\n }\n\n var axisNameAvailableWidth;\n if (isNameLocationCenter(nameLocation)) {\n labelLayout = AxisBuilder.innerTextLayout(opt.rotation, nameRotation != null ? nameRotation : opt.rotation,\n // Adapt to axis.\n nameDirection);\n } else {\n labelLayout = endTextLayout(opt.rotation, nameLocation, nameRotation || 0, extent);\n axisNameAvailableWidth = opt.axisNameAvailableWidth;\n if (axisNameAvailableWidth != null) {\n axisNameAvailableWidth = Math.abs(axisNameAvailableWidth / Math.sin(labelLayout.rotation));\n !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null);\n }\n }\n var textFont = textStyleModel.getFont();\n var truncateOpt = axisModel.get('nameTruncate', true) || {};\n var ellipsis = truncateOpt.ellipsis;\n var maxWidth = retrieve(opt.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth);\n var textEl = new graphic.Text({\n x: pos[0],\n y: pos[1],\n rotation: labelLayout.rotation,\n silent: AxisBuilder.isLabelSilent(axisModel),\n style: createTextStyle(textStyleModel, {\n text: name,\n font: textFont,\n overflow: 'truncate',\n width: maxWidth,\n ellipsis: ellipsis,\n fill: textStyleModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']),\n align: textStyleModel.get('align') || labelLayout.textAlign,\n verticalAlign: textStyleModel.get('verticalAlign') || labelLayout.textVerticalAlign\n }),\n z2: 1\n });\n graphic.setTooltipConfig({\n el: textEl,\n componentModel: axisModel,\n itemName: name\n });\n textEl.__fullText = name;\n // Id for animation\n textEl.anid = 'name';\n if (axisModel.get('triggerEvent')) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisName';\n eventData.name = name;\n getECData(textEl).eventData = eventData;\n }\n // FIXME\n transformGroup.add(textEl);\n textEl.updateTransform();\n group.add(textEl);\n textEl.decomposeTransform();\n }\n};\nfunction endTextLayout(rotation, textPosition, textRotate, extent) {\n var rotationDiff = remRadian(textRotate - rotation);\n var textAlign;\n var textVerticalAlign;\n var inverse = extent[0] > extent[1];\n var onLeft = textPosition === 'start' && !inverse || textPosition !== 'start' && inverse;\n if (isRadianAroundZero(rotationDiff - PI / 2)) {\n textVerticalAlign = onLeft ? 'bottom' : 'top';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI * 1.5)) {\n textVerticalAlign = onLeft ? 'top' : 'bottom';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n if (rotationDiff < PI * 1.5 && rotationDiff > PI / 2) {\n textAlign = onLeft ? 'left' : 'right';\n } else {\n textAlign = onLeft ? 'right' : 'left';\n }\n }\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n}\nfunction fixMinMaxLabelShow(axisModel, labelEls, tickEls) {\n if (shouldShowAllLabels(axisModel.axis)) {\n return;\n }\n // If min or max are user set, we need to check\n // If the tick on min(max) are overlap on their neighbour tick\n // If they are overlapped, we need to hide the min(max) tick label\n var showMinLabel = axisModel.get(['axisLabel', 'showMinLabel']);\n var showMaxLabel = axisModel.get(['axisLabel', 'showMaxLabel']);\n // FIXME\n // Have not consider onBand yet, where tick els is more than label els.\n labelEls = labelEls || [];\n tickEls = tickEls || [];\n var firstLabel = labelEls[0];\n var nextLabel = labelEls[1];\n var lastLabel = labelEls[labelEls.length - 1];\n var prevLabel = labelEls[labelEls.length - 2];\n var firstTick = tickEls[0];\n var nextTick = tickEls[1];\n var lastTick = tickEls[tickEls.length - 1];\n var prevTick = tickEls[tickEls.length - 2];\n if (showMinLabel === false) {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n } else if (isTwoLabelOverlapped(firstLabel, nextLabel)) {\n if (showMinLabel) {\n ignoreEl(nextLabel);\n ignoreEl(nextTick);\n } else {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n }\n }\n if (showMaxLabel === false) {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n } else if (isTwoLabelOverlapped(prevLabel, lastLabel)) {\n if (showMaxLabel) {\n ignoreEl(prevLabel);\n ignoreEl(prevTick);\n } else {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n }\n }\n}\nfunction ignoreEl(el) {\n el && (el.ignore = true);\n}\nfunction isTwoLabelOverlapped(current, next) {\n // current and next has the same rotation.\n var firstRect = current && current.getBoundingRect().clone();\n var nextRect = next && next.getBoundingRect().clone();\n if (!firstRect || !nextRect) {\n return;\n }\n // When checking intersect of two rotated labels, we use mRotationBack\n // to avoid that boundingRect is enlarge when using `boundingRect.applyTransform`.\n var mRotationBack = matrixUtil.identity([]);\n matrixUtil.rotate(mRotationBack, mRotationBack, -current.rotation);\n firstRect.applyTransform(matrixUtil.mul([], mRotationBack, current.getLocalTransform()));\n nextRect.applyTransform(matrixUtil.mul([], mRotationBack, next.getLocalTransform()));\n return firstRect.intersect(nextRect);\n}\nfunction isNameLocationCenter(nameLocation) {\n return nameLocation === 'middle' || nameLocation === 'center';\n}\nfunction createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, anidPrefix) {\n var tickEls = [];\n var pt1 = [];\n var pt2 = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = ticksCoords[i].coord;\n pt1[0] = tickCoord;\n pt1[1] = 0;\n pt2[0] = tickCoord;\n pt2[1] = tickEndCoord;\n if (tickTransform) {\n v2ApplyTransform(pt1, pt1, tickTransform);\n v2ApplyTransform(pt2, pt2, tickTransform);\n }\n // Tick line, Not use group transform to have better line draw\n var tickEl = new graphic.Line({\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: tickLineStyle,\n z2: 2,\n autoBatch: true,\n silent: true\n });\n graphic.subPixelOptimizeLine(tickEl.shape, tickEl.style.lineWidth);\n tickEl.anid = anidPrefix + '_' + ticksCoords[i].tickValue;\n tickEls.push(tickEl);\n }\n return tickEls;\n}\nfunction buildAxisMajorTicks(group, transformGroup, axisModel, opt) {\n var axis = axisModel.axis;\n var tickModel = axisModel.getModel('axisTick');\n var shown = tickModel.get('show');\n if (shown === 'auto' && opt.handleAutoShown) {\n shown = opt.handleAutoShown('axisTick');\n }\n if (!shown || axis.scale.isBlank()) {\n return;\n }\n var lineStyleModel = tickModel.getModel('lineStyle');\n var tickEndCoord = opt.tickDirection * tickModel.get('length');\n var ticksCoords = axis.getTicksCoords();\n var ticksEls = createTicks(ticksCoords, transformGroup.transform, tickEndCoord, defaults(lineStyleModel.getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }), 'ticks');\n for (var i = 0; i < ticksEls.length; i++) {\n group.add(ticksEls[i]);\n }\n return ticksEls;\n}\nfunction buildAxisMinorTicks(group, transformGroup, axisModel, tickDirection) {\n var axis = axisModel.axis;\n var minorTickModel = axisModel.getModel('minorTick');\n if (!minorTickModel.get('show') || axis.scale.isBlank()) {\n return;\n }\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var lineStyleModel = minorTickModel.getModel('lineStyle');\n var tickEndCoord = tickDirection * minorTickModel.get('length');\n var minorTickLineStyle = defaults(lineStyleModel.getLineStyle(), defaults(axisModel.getModel('axisTick').getLineStyle(), {\n stroke: axisModel.get(['axisLine', 'lineStyle', 'color'])\n }));\n for (var i = 0; i < minorTicksCoords.length; i++) {\n var minorTicksEls = createTicks(minorTicksCoords[i], transformGroup.transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i);\n for (var k = 0; k < minorTicksEls.length; k++) {\n group.add(minorTicksEls[k]);\n }\n }\n}\nfunction buildAxisLabel(group, transformGroup, axisModel, opt) {\n var axis = axisModel.axis;\n var show = retrieve(opt.axisLabelShow, axisModel.get(['axisLabel', 'show']));\n if (!show || axis.scale.isBlank()) {\n return;\n }\n var labelModel = axisModel.getModel('axisLabel');\n var labelMargin = labelModel.get('margin');\n var labels = axis.getViewLabels();\n // Special label rotate.\n var labelRotation = (retrieve(opt.labelRotate, labelModel.get('rotate')) || 0) * PI / 180;\n var labelLayout = AxisBuilder.innerTextLayout(opt.rotation, labelRotation, opt.labelDirection);\n var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true);\n var labelEls = [];\n var silent = AxisBuilder.isLabelSilent(axisModel);\n var triggerEvent = axisModel.get('triggerEvent');\n each(labels, function (labelItem, index) {\n var tickValue = axis.scale.type === 'ordinal' ? axis.scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue;\n var formattedLabel = labelItem.formattedLabel;\n var rawLabel = labelItem.rawLabel;\n var itemLabelModel = labelModel;\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n itemLabelModel = new Model(rawCategoryItem.textStyle, labelModel, axisModel.ecModel);\n }\n }\n var textColor = itemLabelModel.getTextColor() || axisModel.get(['axisLine', 'lineStyle', 'color']);\n var tickCoord = axis.dataToCoord(tickValue);\n var align = itemLabelModel.getShallow('align', true) || labelLayout.textAlign;\n var alignMin = retrieve2(itemLabelModel.getShallow('alignMinLabel', true), align);\n var alignMax = retrieve2(itemLabelModel.getShallow('alignMaxLabel', true), align);\n var verticalAlign = itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign;\n var verticalAlignMin = retrieve2(itemLabelModel.getShallow('verticalAlignMinLabel', true), verticalAlign);\n var verticalAlignMax = retrieve2(itemLabelModel.getShallow('verticalAlignMaxLabel', true), verticalAlign);\n var textEl = new graphic.Text({\n x: tickCoord,\n y: opt.labelOffset + opt.labelDirection * labelMargin,\n rotation: labelLayout.rotation,\n silent: silent,\n z2: 10 + (labelItem.level || 0),\n style: createTextStyle(itemLabelModel, {\n text: formattedLabel,\n align: index === 0 ? alignMin : index === labels.length - 1 ? alignMax : align,\n verticalAlign: index === 0 ? verticalAlignMin : index === labels.length - 1 ? verticalAlignMax : verticalAlign,\n fill: isFunction(textColor) ? textColor(\n // (1) In category axis with data zoom, tick is not the original\n // index of axis.data. So tick should not be exposed to user\n // in category axis.\n // (2) Compatible with previous version, which always use formatted label as\n // input. But in interval scale the formatted label is like '223,445', which\n // maked user replace ','. So we modify it to return original val but remain\n // it as 'string' to avoid error in replacing.\n axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor\n })\n });\n textEl.anid = 'label_' + tickValue;\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = rawLabel;\n eventData.tickIndex = index;\n if (axis.type === 'category') {\n eventData.dataIndex = tickValue;\n }\n getECData(textEl).eventData = eventData;\n }\n // FIXME\n transformGroup.add(textEl);\n textEl.updateTransform();\n labelEls.push(textEl);\n group.add(textEl);\n textEl.decomposeTransform();\n });\n return labelEls;\n}\nexport default AxisBuilder;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport Model from '../../model/Model.js';\nimport { each, curry, clone, defaults, isArray, indexOf } from 'zrender/lib/core/util.js';\n// Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n// allAxesInfo should be updated when setOption performed.\nexport function collect(ecModel, api) {\n var result = {\n /**\n * key: makeKey(axis.model)\n * value: {\n * axis,\n * coordSys,\n * axisPointerModel,\n * triggerTooltip,\n * triggerEmphasis,\n * involveSeries,\n * snap,\n * seriesModels,\n * seriesDataCount\n * }\n */\n axesInfo: {},\n seriesInvolved: false,\n /**\n * key: makeKey(coordSys.model)\n * value: Object: key makeKey(axis.model), value: axisInfo\n */\n coordSysAxesInfo: {},\n coordSysMap: {}\n };\n collectAxesInfo(result, ecModel, api);\n // Check seriesInvolved for performance, in case too many series in some chart.\n result.seriesInvolved && collectSeriesInfo(result, ecModel);\n return result;\n}\nfunction collectAxesInfo(result, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var globalAxisPointerModel = ecModel.getComponent('axisPointer');\n // links can only be set on global.\n var linksOption = globalAxisPointerModel.get('link', true) || [];\n var linkGroups = [];\n // Collect axes info.\n each(api.getCoordinateSystems(), function (coordSys) {\n // Some coordinate system do not support axes, like geo.\n if (!coordSys.axisPointerEnabled) {\n return;\n }\n var coordSysKey = makeKey(coordSys.model);\n var axesInfoInCoordSys = result.coordSysAxesInfo[coordSysKey] = {};\n result.coordSysMap[coordSysKey] = coordSys;\n // Set tooltip (like 'cross') is a convenient way to show axisPointer\n // for user. So we enable setting tooltip on coordSys model.\n var coordSysModel = coordSys.model;\n var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel);\n each(coordSys.getAxes(), curry(saveTooltipAxisInfo, false, null));\n // If axis tooltip used, choose tooltip axis for each coordSys.\n // Notice this case: coordSys is `grid` but not `cartesian2D` here.\n if (coordSys.getTooltipAxes && globalTooltipModel\n // If tooltip.showContent is set as false, tooltip will not\n // show but axisPointer will show as normal.\n && baseTooltipModel.get('show')) {\n // Compatible with previous logic. But series.tooltip.trigger: 'axis'\n // or series.data[n].tooltip.trigger: 'axis' are not support any more.\n var triggerAxis = baseTooltipModel.get('trigger') === 'axis';\n var cross = baseTooltipModel.get(['axisPointer', 'type']) === 'cross';\n var tooltipAxes = coordSys.getTooltipAxes(baseTooltipModel.get(['axisPointer', 'axis']));\n if (triggerAxis || cross) {\n each(tooltipAxes.baseAxes, curry(saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis));\n }\n if (cross) {\n each(tooltipAxes.otherAxes, curry(saveTooltipAxisInfo, 'cross', false));\n }\n }\n // fromTooltip: true | false | 'cross'\n // triggerTooltip: true | false | null\n function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) {\n var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel);\n var axisPointerShow = axisPointerModel.get('show');\n if (!axisPointerShow || axisPointerShow === 'auto' && !fromTooltip && !isHandleTrigger(axisPointerModel)) {\n return;\n }\n if (triggerTooltip == null) {\n triggerTooltip = axisPointerModel.get('triggerTooltip');\n }\n axisPointerModel = fromTooltip ? makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) : axisPointerModel;\n var snap = axisPointerModel.get('snap');\n var triggerEmphasis = axisPointerModel.get('triggerEmphasis');\n var axisKey = makeKey(axis.model);\n var involveSeries = triggerTooltip || snap || axis.type === 'category';\n // If result.axesInfo[key] exist, override it (tooltip has higher priority).\n var axisInfo = result.axesInfo[axisKey] = {\n key: axisKey,\n axis: axis,\n coordSys: coordSys,\n axisPointerModel: axisPointerModel,\n triggerTooltip: triggerTooltip,\n triggerEmphasis: triggerEmphasis,\n involveSeries: involveSeries,\n snap: snap,\n useHandle: isHandleTrigger(axisPointerModel),\n seriesModels: [],\n linkGroup: null\n };\n axesInfoInCoordSys[axisKey] = axisInfo;\n result.seriesInvolved = result.seriesInvolved || involveSeries;\n var groupIndex = getLinkGroupIndex(linksOption, axis);\n if (groupIndex != null) {\n var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = {\n axesInfo: {}\n });\n linkGroup.axesInfo[axisKey] = axisInfo;\n linkGroup.mapper = linksOption[groupIndex].mapper;\n axisInfo.linkGroup = linkGroup;\n }\n }\n });\n}\nfunction makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) {\n var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer');\n var fields = ['type', 'snap', 'lineStyle', 'shadowStyle', 'label', 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z'];\n var volatileOption = {};\n each(fields, function (field) {\n volatileOption[field] = clone(tooltipAxisPointerModel.get(field));\n });\n // category axis do not auto snap, otherwise some tick that do not\n // has value can not be hovered. value/time/log axis default snap if\n // triggered from tooltip and trigger tooltip.\n volatileOption.snap = axis.type !== 'category' && !!triggerTooltip;\n // Compatible with previous behavior, tooltip axis does not show label by default.\n // Only these properties can be overridden from tooltip to axisPointer.\n if (tooltipAxisPointerModel.get('type') === 'cross') {\n volatileOption.type = 'line';\n }\n var labelOption = volatileOption.label || (volatileOption.label = {});\n // Follow the convention, do not show label when triggered by tooltip by default.\n labelOption.show == null && (labelOption.show = false);\n if (fromTooltip === 'cross') {\n // When 'cross', both axes show labels.\n var tooltipAxisPointerLabelShow = tooltipAxisPointerModel.get(['label', 'show']);\n labelOption.show = tooltipAxisPointerLabelShow != null ? tooltipAxisPointerLabelShow : true;\n // If triggerTooltip, this is a base axis, which should better not use cross style\n // (cross style is dashed by default)\n if (!triggerTooltip) {\n var crossStyle = volatileOption.lineStyle = tooltipAxisPointerModel.get('crossStyle');\n crossStyle && defaults(labelOption, crossStyle.textStyle);\n }\n }\n return axis.model.getModel('axisPointer', new Model(volatileOption, globalAxisPointerModel, ecModel));\n}\nfunction collectSeriesInfo(result, ecModel) {\n // Prepare data for axis trigger\n ecModel.eachSeries(function (seriesModel) {\n // Notice this case: this coordSys is `cartesian2D` but not `grid`.\n var coordSys = seriesModel.coordinateSystem;\n var seriesTooltipTrigger = seriesModel.get(['tooltip', 'trigger'], true);\n var seriesTooltipShow = seriesModel.get(['tooltip', 'show'], true);\n if (!coordSys || seriesTooltipTrigger === 'none' || seriesTooltipTrigger === false || seriesTooltipTrigger === 'item' || seriesTooltipShow === false || seriesModel.get(['axisPointer', 'show'], true) === false) {\n return;\n }\n each(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) {\n var axis = axisInfo.axis;\n if (coordSys.getAxis(axis.dim) === axis) {\n axisInfo.seriesModels.push(seriesModel);\n axisInfo.seriesDataCount == null && (axisInfo.seriesDataCount = 0);\n axisInfo.seriesDataCount += seriesModel.getData().count();\n }\n });\n });\n}\n/**\n * For example:\n * {\n * axisPointer: {\n * links: [{\n * xAxisIndex: [2, 4],\n * yAxisIndex: 'all'\n * }, {\n * xAxisId: ['a5', 'a7'],\n * xAxisName: 'xxx'\n * }]\n * }\n * }\n */\nfunction getLinkGroupIndex(linksOption, axis) {\n var axisModel = axis.model;\n var dim = axis.dim;\n for (var i = 0; i < linksOption.length; i++) {\n var linkOption = linksOption[i] || {};\n if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id) || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex) || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)) {\n return i;\n }\n }\n}\nfunction checkPropInLink(linkPropValue, axisPropValue) {\n return linkPropValue === 'all' || isArray(linkPropValue) && indexOf(linkPropValue, axisPropValue) >= 0 || linkPropValue === axisPropValue;\n}\nexport function fixValue(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n if (!axisInfo) {\n return;\n }\n var axisPointerModel = axisInfo.axisPointerModel;\n var scale = axisInfo.axis.scale;\n var option = axisPointerModel.option;\n var status = axisPointerModel.get('status');\n var value = axisPointerModel.get('value');\n // Parse init value for category and time axis.\n if (value != null) {\n value = scale.parse(value);\n }\n var useHandle = isHandleTrigger(axisPointerModel);\n // If `handle` used, `axisPointer` will always be displayed, so value\n // and status should be initialized.\n if (status == null) {\n option.status = useHandle ? 'show' : 'hide';\n }\n var extent = scale.getExtent().slice();\n extent[0] > extent[1] && extent.reverse();\n if (\n // Pick a value on axis when initializing.\n value == null\n // If both `handle` and `dataZoom` are used, value may be out of axis extent,\n // where we should re-pick a value to keep `handle` displaying normally.\n || value > extent[1]) {\n // Make handle displayed on the end of the axis when init, which looks better.\n value = extent[1];\n }\n if (value < extent[0]) {\n value = extent[0];\n }\n option.value = value;\n if (useHandle) {\n option.status = axisInfo.axis.scale.isBlank() ? 'hide' : 'show';\n }\n}\nexport function getAxisInfo(axisModel) {\n var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo;\n return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)];\n}\nexport function getAxisPointerModel(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n return axisInfo && axisInfo.axisPointerModel;\n}\nfunction isHandleTrigger(axisPointerModel) {\n return !!axisPointerModel.get(['handle', 'show']);\n}\n/**\n * @param {module:echarts/model/Model} model\n * @return {string} unique key\n */\nexport function makeKey(model) {\n return model.type + '||' + model.id;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as axisPointerModelHelper from '../axisPointer/modelHelper.js';\nimport ComponentView from '../../view/Component.js';\nvar axisPointerClazz = {};\n/**\n * Base class of AxisView.\n */\nvar AxisView = /** @class */function (_super) {\n __extends(AxisView, _super);\n function AxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisView.type;\n return _this;\n }\n /**\n * @override\n */\n AxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n // FIXME\n // This process should proformed after coordinate systems updated\n // (axis scale updated), and should be performed each time update.\n // So put it here temporarily, although it is not appropriate to\n // put a model-writing procedure in `view`.\n this.axisPointerClass && axisPointerModelHelper.fixValue(axisModel);\n _super.prototype.render.apply(this, arguments);\n this._doUpdateAxisPointerClass(axisModel, api, true);\n };\n /**\n * Action handler.\n */\n AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) {\n this._doUpdateAxisPointerClass(axisModel, api, false);\n };\n /**\n * @override\n */\n AxisView.prototype.remove = function (ecModel, api) {\n var axisPointer = this._axisPointer;\n axisPointer && axisPointer.remove(api);\n };\n /**\n * @override\n */\n AxisView.prototype.dispose = function (ecModel, api) {\n this._disposeAxisPointer(api);\n _super.prototype.dispose.apply(this, arguments);\n };\n AxisView.prototype._doUpdateAxisPointerClass = function (axisModel, api, forceRender) {\n var Clazz = AxisView.getAxisPointerClass(this.axisPointerClass);\n if (!Clazz) {\n return;\n }\n var axisPointerModel = axisPointerModelHelper.getAxisPointerModel(axisModel);\n axisPointerModel ? (this._axisPointer || (this._axisPointer = new Clazz())).render(axisModel, axisPointerModel, api, forceRender) : this._disposeAxisPointer(api);\n };\n AxisView.prototype._disposeAxisPointer = function (api) {\n this._axisPointer && this._axisPointer.dispose(api);\n this._axisPointer = null;\n };\n AxisView.registerAxisPointerClass = function (type, clazz) {\n if (process.env.NODE_ENV !== 'production') {\n if (axisPointerClazz[type]) {\n throw new Error('axisPointer ' + type + ' exists');\n }\n }\n axisPointerClazz[type] = clazz;\n };\n ;\n AxisView.getAxisPointerClass = function (type) {\n return type && axisPointerClazz[type];\n };\n ;\n AxisView.type = 'axis';\n return AxisView;\n}(ComponentView);\nexport default AxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nexport function rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n // TODO: TYPE\n var splitAreaModel = axisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var gridRect = gridModel.coordinateSystem.getRect();\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitAreaModel,\n clamp: true\n });\n if (!ticksCoords.length) {\n return;\n }\n // For Making appropriate splitArea animation, the color and anid\n // should be corresponding to previous one if possible.\n var areaColorsLen = areaColors.length;\n var lastSplitAreaColors = inner(axisView).splitAreaColors;\n var newSplitAreaColors = zrUtil.createHashMap();\n var colorIndex = 0;\n if (lastSplitAreaColors) {\n for (var i = 0; i < ticksCoords.length; i++) {\n var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);\n if (cIndex != null) {\n colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen;\n break;\n }\n }\n }\n var prev = axis.toGlobalCoord(ticksCoords[0].coord);\n var areaStyle = areaStyleModel.getAreaStyle();\n areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors];\n for (var i = 1; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n var x = void 0;\n var y = void 0;\n var width = void 0;\n var height = void 0;\n if (axis.isHorizontal()) {\n x = prev;\n y = gridRect.y;\n width = tickCoord - x;\n height = gridRect.height;\n prev = x + width;\n } else {\n x = gridRect.x;\n y = prev;\n width = gridRect.width;\n height = tickCoord - y;\n prev = y + height;\n }\n var tickValue = ticksCoords[i - 1].tickValue;\n tickValue != null && newSplitAreaColors.set(tickValue, colorIndex);\n axisGroup.add(new graphic.Rect({\n anid: tickValue != null ? 'area_' + tickValue : null,\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n },\n style: zrUtil.defaults({\n fill: areaColors[colorIndex]\n }, areaStyle),\n autoBatch: true,\n silent: true\n }));\n colorIndex = (colorIndex + 1) % areaColorsLen;\n }\n inner(axisView).splitAreaColors = newSplitAreaColors;\n}\nexport function rectCoordAxisHandleRemove(axisView) {\n inner(axisView).splitAreaColors = null;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport AxisView from './AxisView.js';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nimport { isIntervalOrLogScale } from '../../scale/helper.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitArea', 'splitLine', 'minorSplitLine'];\nvar CartesianAxisView = /** @class */function (_super) {\n __extends(CartesianAxisView, _super);\n function CartesianAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianAxisView.type;\n _this.axisPointerClass = 'CartesianAxisPointer';\n return _this;\n }\n /**\n * @override\n */\n CartesianAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n if (!axisModel.get('show')) {\n return;\n }\n var gridModel = axisModel.getCoordSysModel();\n var layout = cartesianAxisHelper.layout(gridModel, axisModel);\n var axisBuilder = new AxisBuilder(axisModel, zrUtil.extend({\n handleAutoShown: function (elementType) {\n var cartesians = gridModel.coordinateSystem.getCartesians();\n for (var i = 0; i < cartesians.length; i++) {\n if (isIntervalOrLogScale(cartesians[i].getOtherAxis(axisModel.axis).scale)) {\n // Still show axis tick or axisLine if other axis is value / log\n return true;\n }\n }\n // Not show axisTick or axisLine if other axis is category / time\n return false;\n }\n }, layout));\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this._axisGroup.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this._axisGroup, axisModel, gridModel);\n }\n }, this);\n // THIS is a special case for bar racing chart.\n // Update the axis label from the natural initial layout to\n // sorted layout should has no animation.\n var isInitialSortFromBarRacing = payload && payload.type === 'changeAxisOrder' && payload.isInitSort;\n if (!isInitialSortFromBarRacing) {\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n }\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n CartesianAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n CartesianAxisView.type = 'cartesianAxis';\n return CartesianAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var colorIndex = lineCount++ % lineColors.length;\n var tickValue = ticksCoords[i].tickValue;\n var line = new graphic.Line({\n anid: tickValue != null ? 'line_' + ticksCoords[i].tickValue : null,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: zrUtil.defaults({\n stroke: lineColors[colorIndex]\n }, lineStyle),\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n },\n minorSplitLine: function (axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n var minorSplitLineModel = axisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var line = new graphic.Line({\n anid: 'minor_line_' + minorTicksCoords[i][k].tickValue,\n autoBatch: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: lineStyle,\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineStyle.lineWidth);\n axisGroup.add(line);\n }\n }\n },\n splitArea: function (axisView, axisGroup, axisModel, gridModel) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel);\n }\n};\nvar CartesianXAxisView = /** @class */function (_super) {\n __extends(CartesianXAxisView, _super);\n function CartesianXAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianXAxisView.type = 'xAxis';\n return CartesianXAxisView;\n}(CartesianAxisView);\nexport { CartesianXAxisView };\nvar CartesianYAxisView = /** @class */function (_super) {\n __extends(CartesianYAxisView, _super);\n function CartesianYAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CartesianXAxisView.type;\n return _this;\n }\n CartesianYAxisView.type = 'yAxis';\n return CartesianYAxisView;\n}(CartesianAxisView);\nexport { CartesianYAxisView };\nexport default CartesianAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport GridModel from '../../coord/cartesian/GridModel.js';\nimport { Rect } from '../../util/graphic.js';\nimport { defaults } from 'zrender/lib/core/util.js';\nimport { CartesianAxisModel } from '../../coord/cartesian/AxisModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport Grid from '../../coord/cartesian/Grid.js';\nimport { CartesianXAxisView, CartesianYAxisView } from '../axis/CartesianAxisView.js';\n// Grid view\nvar GridView = /** @class */function (_super) {\n __extends(GridView, _super);\n function GridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'grid';\n return _this;\n }\n GridView.prototype.render = function (gridModel, ecModel) {\n this.group.removeAll();\n if (gridModel.get('show')) {\n this.group.add(new Rect({\n shape: gridModel.coordinateSystem.getRect(),\n style: defaults({\n fill: gridModel.get('backgroundColor')\n }, gridModel.getItemStyle()),\n silent: true,\n z2: -1\n }));\n }\n };\n GridView.type = 'grid';\n return GridView;\n}(ComponentView);\nvar extraOption = {\n // gridIndex: 0,\n // gridId: '',\n offset: 0\n};\nexport function install(registers) {\n registers.registerComponentView(GridView);\n registers.registerComponentModel(GridModel);\n registers.registerCoordinateSystem('cartesian2d', Grid);\n axisModelCreator(registers, 'x', CartesianAxisModel, extraOption);\n axisModelCreator(registers, 'y', CartesianAxisModel, extraOption);\n registers.registerComponentView(CartesianXAxisView);\n registers.registerComponentView(CartesianYAxisView);\n registers.registerPreprocessor(function (option) {\n // Only create grid when need\n if (option.xAxis && option.yAxis && !option.grid) {\n option.grid = {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport ScatterSeriesModel from './ScatterSeries.js';\nimport ScatterView from './ScatterView.js';\nimport { install as installGridSimple } from '../../component/grid/installSimple.js';\nimport layoutPoints from '../../layout/points.js';\nexport function install(registers) {\n // In case developer forget to include grid component\n use(installGridSimple);\n registers.registerSeriesModel(ScatterSeriesModel);\n registers.registerChartView(ScatterView);\n registers.registerLayout(layoutPoints('scatter'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function radarLayout(ecModel) {\n ecModel.eachSeriesByType('radar', function (seriesModel) {\n var data = seriesModel.getData();\n var points = [];\n var coordSys = seriesModel.coordinateSystem;\n if (!coordSys) {\n return;\n }\n var axes = coordSys.getIndicatorAxes();\n zrUtil.each(axes, function (axis, axisIndex) {\n data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) {\n points[dataIndex] = points[dataIndex] || [];\n var point = coordSys.dataToPoint(val, axisIndex);\n points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys);\n });\n });\n // Close polygon\n data.each(function (idx) {\n // TODO\n // Is it appropriate to connect to the next data when some data is missing?\n // Or, should trade it like `connectNull` in line chart?\n var firstPoint = zrUtil.find(points[idx], function (point) {\n return isValidPoint(point);\n }) || getValueMissingPoint(coordSys);\n // Copy the first actual point to the end of the array\n points[idx].push(firstPoint.slice());\n data.setItemLayout(idx, points[idx]);\n });\n });\n}\nfunction isValidPoint(point) {\n return !isNaN(point[0]) && !isNaN(point[1]);\n}\nfunction getValueMissingPoint(coordSys) {\n // It is error-prone to input [NaN, NaN] into polygon, polygon.\n // (probably cause problem when refreshing or animating)\n return [coordSys.cx, coordSys.cy];\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\n// Backward compat for radar chart in 2\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function radarBackwardCompat(option) {\n var polarOptArr = option.polar;\n if (polarOptArr) {\n if (!zrUtil.isArray(polarOptArr)) {\n polarOptArr = [polarOptArr];\n }\n var polarNotRadar_1 = [];\n zrUtil.each(polarOptArr, function (polarOpt, idx) {\n if (polarOpt.indicator) {\n if (polarOpt.type && !polarOpt.shape) {\n polarOpt.shape = polarOpt.type;\n }\n option.radar = option.radar || [];\n if (!zrUtil.isArray(option.radar)) {\n option.radar = [option.radar];\n }\n option.radar.push(polarOpt);\n } else {\n polarNotRadar_1.push(polarOpt);\n }\n });\n option.polar = polarNotRadar_1;\n }\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'radar' && seriesOpt.polarIndex) {\n seriesOpt.radarIndex = seriesOpt.polarIndex;\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as symbolUtil from '../../util/symbol.js';\nimport ChartView from '../../view/Chart.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar RadarView = /** @class */function (_super) {\n __extends(RadarView, _super);\n function RadarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarView.type;\n return _this;\n }\n RadarView.prototype.render = function (seriesModel, ecModel, api) {\n var polar = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n function createSymbol(data, idx) {\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n if (symbolType === 'none') {\n return;\n }\n var symbolSize = symbolUtil.normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var symbolPath = symbolUtil.createSymbol(symbolType, -1, -1, 2, 2);\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate') || 0;\n symbolPath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 100,\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2,\n rotation: symbolRotate * Math.PI / 180 || 0\n });\n return symbolPath;\n }\n function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) {\n // Simply rerender all\n symbolGroup.removeAll();\n for (var i = 0; i < newPoints.length - 1; i++) {\n var symbolPath = createSymbol(data, idx);\n if (symbolPath) {\n symbolPath.__dimIdx = i;\n if (oldPoints[i]) {\n symbolPath.setPosition(oldPoints[i]);\n graphic[isInit ? 'initProps' : 'updateProps'](symbolPath, {\n x: newPoints[i][0],\n y: newPoints[i][1]\n }, seriesModel, idx);\n } else {\n symbolPath.setPosition(newPoints[i]);\n }\n symbolGroup.add(symbolPath);\n }\n }\n }\n function getInitialPoints(points) {\n return zrUtil.map(points, function (pt) {\n return [polar.cx, polar.cy];\n });\n }\n data.diff(oldData).add(function (idx) {\n var points = data.getItemLayout(idx);\n if (!points) {\n return;\n }\n var polygon = new graphic.Polygon();\n var polyline = new graphic.Polyline();\n var target = {\n shape: {\n points: points\n }\n };\n polygon.shape.points = getInitialPoints(points);\n polyline.shape.points = getInitialPoints(points);\n graphic.initProps(polygon, target, seriesModel, idx);\n graphic.initProps(polyline, target, seriesModel, idx);\n var itemGroup = new graphic.Group();\n var symbolGroup = new graphic.Group();\n itemGroup.add(polyline);\n itemGroup.add(polygon);\n itemGroup.add(symbolGroup);\n updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true);\n data.setItemGraphicEl(idx, itemGroup);\n }).update(function (newIdx, oldIdx) {\n var itemGroup = oldData.getItemGraphicEl(oldIdx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n var target = {\n shape: {\n points: data.getItemLayout(newIdx)\n }\n };\n if (!target.shape.points) {\n return;\n }\n updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false);\n saveOldStyle(polygon);\n saveOldStyle(polyline);\n graphic.updateProps(polyline, target, seriesModel);\n graphic.updateProps(polygon, target, seriesModel);\n data.setItemGraphicEl(newIdx, itemGroup);\n }).remove(function (idx) {\n group.remove(oldData.getItemGraphicEl(idx));\n }).execute();\n data.eachItemGraphicEl(function (itemGroup, idx) {\n var itemModel = data.getItemModel(idx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n // Radar uses the visual encoded from itemStyle.\n var itemStyle = data.getItemVisual(idx, 'style');\n var color = itemStyle.fill;\n group.add(itemGroup);\n polyline.useStyle(zrUtil.defaults(itemModel.getModel('lineStyle').getLineStyle(), {\n fill: 'none',\n stroke: color\n }));\n setStatesStylesFromModel(polyline, itemModel, 'lineStyle');\n setStatesStylesFromModel(polygon, itemModel, 'areaStyle');\n var areaStyleModel = itemModel.getModel('areaStyle');\n var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty();\n polygon.ignore = polygonIgnore;\n zrUtil.each(['emphasis', 'select', 'blur'], function (stateName) {\n var stateModel = itemModel.getModel([stateName, 'areaStyle']);\n var stateIgnore = stateModel.isEmpty() && stateModel.parentModel.isEmpty();\n // Won't be ignore if normal state is not ignore.\n polygon.ensureState(stateName).ignore = stateIgnore && polygonIgnore;\n });\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: color,\n opacity: 0.7,\n decal: itemStyle.decal\n }));\n var emphasisModel = itemModel.getModel('emphasis');\n var itemHoverStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n symbolGroup.eachChild(function (symbolPath) {\n if (symbolPath instanceof ZRImage) {\n var pathStyle = symbolPath.style;\n symbolPath.useStyle(zrUtil.extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, itemStyle));\n } else {\n symbolPath.useStyle(itemStyle);\n symbolPath.setColor(color);\n symbolPath.style.strokeNoScale = true;\n }\n var pathEmphasisState = symbolPath.ensureState('emphasis');\n pathEmphasisState.style = zrUtil.clone(itemHoverStyle);\n var defaultText = data.getStore().get(data.getDimensionIndex(symbolPath.__dimIdx), idx);\n (defaultText == null || isNaN(defaultText)) && (defaultText = '');\n setLabelStyle(symbolPath, getLabelStatesModels(itemModel), {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n labelDimIndex: symbolPath.__dimIdx,\n defaultText: defaultText,\n inheritColor: color,\n defaultOpacity: itemStyle.opacity\n });\n });\n toggleHoverEmphasis(itemGroup, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n });\n this._data = data;\n };\n RadarView.prototype.remove = function () {\n this.group.removeAll();\n this._data = null;\n };\n RadarView.type = 'radar';\n return RadarView;\n}(ChartView);\nexport default RadarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport { createTooltipMarkup, retrieveVisualColorForTooltipMarker } from '../../component/tooltip/tooltipMarkup.js';\nvar RadarSeriesModel = /** @class */function (_super) {\n __extends(RadarSeriesModel, _super);\n function RadarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n // Overwrite\n RadarSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n };\n RadarSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesDataSimply(this, {\n generateCoord: 'indicator_',\n generateCoordCount: Infinity\n });\n };\n RadarSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var coordSys = this.coordinateSystem;\n var indicatorAxes = coordSys.getIndicatorAxes();\n var name = this.getData().getName(dataIndex);\n var nameToDisplay = name === '' ? this.name : name;\n var markerColor = retrieveVisualColorForTooltipMarker(this, dataIndex);\n return createTooltipMarkup('section', {\n header: nameToDisplay,\n sortBlocks: true,\n blocks: zrUtil.map(indicatorAxes, function (axis) {\n var val = data.get(data.mapDimension(axis.dim), dataIndex);\n return createTooltipMarkup('nameValue', {\n markerType: 'subItem',\n markerColor: markerColor,\n name: axis.name,\n value: val,\n sortParam: val\n });\n })\n });\n };\n RadarSeriesModel.prototype.getTooltipPosition = function (dataIndex) {\n if (dataIndex != null) {\n var data_1 = this.getData();\n var coordSys = this.coordinateSystem;\n var values = data_1.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data_1.mapDimension(dim);\n }), dataIndex);\n for (var i = 0, len = values.length; i < len; i++) {\n if (!isNaN(values[i])) {\n var indicatorAxes = coordSys.getIndicatorAxes();\n return coordSys.coordToPoint(indicatorAxes[i].dataToCoord(values[i]), i);\n }\n }\n }\n };\n RadarSeriesModel.type = 'series.radar';\n RadarSeriesModel.dependencies = ['radar'];\n RadarSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n colorBy: 'data',\n coordinateSystem: 'radar',\n legendHoverLink: true,\n radarIndex: 0,\n lineStyle: {\n width: 2,\n type: 'solid',\n join: 'round'\n },\n label: {\n position: 'top'\n },\n // areaStyle: {\n // },\n // itemStyle: {}\n symbolSize: 8\n // symbolRotate: null\n };\n\n return RadarSeriesModel;\n}(SeriesModel);\nexport default RadarSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport axisDefault from '../axisDefault.js';\nimport Model from '../../model/Model.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport ComponentModel from '../../model/Component.js';\nvar valueAxisDefault = axisDefault.value;\nfunction defaultsShow(opt, show) {\n return zrUtil.defaults({\n show: show\n }, opt);\n}\nvar RadarModel = /** @class */function (_super) {\n __extends(RadarModel, _super);\n function RadarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarModel.type;\n return _this;\n }\n RadarModel.prototype.optionUpdated = function () {\n var boundaryGap = this.get('boundaryGap');\n var splitNumber = this.get('splitNumber');\n var scale = this.get('scale');\n var axisLine = this.get('axisLine');\n var axisTick = this.get('axisTick');\n // let axisType = this.get('axisType');\n var axisLabel = this.get('axisLabel');\n var nameTextStyle = this.get('axisName');\n var showName = this.get(['axisName', 'show']);\n var nameFormatter = this.get(['axisName', 'formatter']);\n var nameGap = this.get('axisNameGap');\n var triggerEvent = this.get('triggerEvent');\n var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {\n // PENDING\n if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {\n indicatorOpt.min = 0;\n } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n var iNameTextStyle = nameTextStyle;\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({\n color: indicatorOpt.color\n }, nameTextStyle);\n }\n // Use same configuration\n var innerIndicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {\n boundaryGap: boundaryGap,\n splitNumber: splitNumber,\n scale: scale,\n axisLine: axisLine,\n axisTick: axisTick,\n // axisType: axisType,\n axisLabel: axisLabel,\n // Compatible with 2 and use text\n name: indicatorOpt.text,\n showName: showName,\n nameLocation: 'end',\n nameGap: nameGap,\n // min: 0,\n nameTextStyle: iNameTextStyle,\n triggerEvent: triggerEvent\n }, false);\n if (zrUtil.isString(nameFormatter)) {\n var indName = innerIndicatorOpt.name;\n innerIndicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n } else if (zrUtil.isFunction(nameFormatter)) {\n innerIndicatorOpt.name = nameFormatter(innerIndicatorOpt.name, innerIndicatorOpt);\n }\n var model = new Model(innerIndicatorOpt, null, this.ecModel);\n zrUtil.mixin(model, AxisModelCommonMixin.prototype);\n // For triggerEvent.\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n return model;\n }, this);\n this._indicatorModels = indicatorModels;\n };\n RadarModel.prototype.getIndicatorModels = function () {\n return this._indicatorModels;\n };\n RadarModel.type = 'radar';\n RadarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '75%',\n startAngle: 90,\n axisName: {\n show: true\n // formatter: null\n // textStyle: {}\n },\n\n boundaryGap: [0, 0],\n splitNumber: 5,\n axisNameGap: 15,\n scale: false,\n // Polygon or circle\n shape: 'polygon',\n axisLine: zrUtil.merge({\n lineStyle: {\n color: '#bbb'\n }\n }, valueAxisDefault.axisLine),\n axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),\n axisTick: defaultsShow(valueAxisDefault.axisTick, false),\n // axisType: 'value',\n splitLine: defaultsShow(valueAxisDefault.splitLine, true),\n splitArea: defaultsShow(valueAxisDefault.splitArea, true),\n // {text, min, max}\n indicator: []\n };\n return RadarModel;\n}(ComponentModel);\nexport default RadarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nimport * as graphic from '../../util/graphic.js';\nimport ComponentView from '../../view/Component.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar RadarView = /** @class */function (_super) {\n __extends(RadarView, _super);\n function RadarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarView.type;\n return _this;\n }\n RadarView.prototype.render = function (radarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n this._buildAxes(radarModel);\n this._buildSplitLineAndArea(radarModel);\n };\n RadarView.prototype._buildAxes = function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n var axisBuilders = zrUtil.map(indicatorAxes, function (indicatorAxis) {\n var axisName = indicatorAxis.model.get('showName') ? indicatorAxis.name : ''; // hide name\n var axisBuilder = new AxisBuilder(indicatorAxis.model, {\n axisName: axisName,\n position: [radar.cx, radar.cy],\n rotation: indicatorAxis.angle,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1\n });\n return axisBuilder;\n });\n zrUtil.each(axisBuilders, function (axisBuilder) {\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this.group.add(axisBuilder.getGroup());\n }, this);\n };\n RadarView.prototype._buildSplitLineAndArea = function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n if (!indicatorAxes.length) {\n return;\n }\n var shape = radarModel.get('shape');\n var splitLineModel = radarModel.getModel('splitLine');\n var splitAreaModel = radarModel.getModel('splitArea');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var showSplitLine = splitLineModel.get('show');\n var showSplitArea = splitAreaModel.get('show');\n var splitLineColors = lineStyleModel.get('color');\n var splitAreaColors = areaStyleModel.get('color');\n var splitLineColorsArr = zrUtil.isArray(splitLineColors) ? splitLineColors : [splitLineColors];\n var splitAreaColorsArr = zrUtil.isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors];\n var splitLines = [];\n var splitAreas = [];\n function getColorIndex(areaOrLine, areaOrLineColorList, idx) {\n var colorIndex = idx % areaOrLineColorList.length;\n areaOrLine[colorIndex] = areaOrLine[colorIndex] || [];\n return colorIndex;\n }\n if (shape === 'circle') {\n var ticksRadius = indicatorAxes[0].getTicksCoords();\n var cx = radar.cx;\n var cy = radar.cy;\n for (var i = 0; i < ticksRadius.length; i++) {\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i);\n splitLines[colorIndex].push(new graphic.Circle({\n shape: {\n cx: cx,\n cy: cy,\n r: ticksRadius[i].coord\n }\n }));\n }\n if (showSplitArea && i < ticksRadius.length - 1) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i);\n splitAreas[colorIndex].push(new graphic.Ring({\n shape: {\n cx: cx,\n cy: cy,\n r0: ticksRadius[i].coord,\n r: ticksRadius[i + 1].coord\n }\n }));\n }\n }\n }\n // Polyyon\n else {\n var realSplitNumber_1;\n var axesTicksPoints = zrUtil.map(indicatorAxes, function (indicatorAxis, idx) {\n var ticksCoords = indicatorAxis.getTicksCoords();\n realSplitNumber_1 = realSplitNumber_1 == null ? ticksCoords.length - 1 : Math.min(ticksCoords.length - 1, realSplitNumber_1);\n return zrUtil.map(ticksCoords, function (tickCoord) {\n return radar.coordToPoint(tickCoord.coord, idx);\n });\n });\n var prevPoints = [];\n for (var i = 0; i <= realSplitNumber_1; i++) {\n var points = [];\n for (var j = 0; j < indicatorAxes.length; j++) {\n points.push(axesTicksPoints[j][i]);\n }\n // Close\n if (points[0]) {\n points.push(points[0].slice());\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Can\\'t draw value axis ' + i);\n }\n }\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColorsArr, i);\n splitLines[colorIndex].push(new graphic.Polyline({\n shape: {\n points: points\n }\n }));\n }\n if (showSplitArea && prevPoints) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColorsArr, i - 1);\n splitAreas[colorIndex].push(new graphic.Polygon({\n shape: {\n points: points.concat(prevPoints)\n }\n }));\n }\n prevPoints = points.slice().reverse();\n }\n }\n var lineStyle = lineStyleModel.getLineStyle();\n var areaStyle = areaStyleModel.getAreaStyle();\n // Add splitArea before splitLine\n zrUtil.each(splitAreas, function (splitAreas, idx) {\n this.group.add(graphic.mergePath(splitAreas, {\n style: zrUtil.defaults({\n stroke: 'none',\n fill: splitAreaColorsArr[idx % splitAreaColorsArr.length]\n }, areaStyle),\n silent: true\n }));\n }, this);\n zrUtil.each(splitLines, function (splitLines, idx) {\n this.group.add(graphic.mergePath(splitLines, {\n style: zrUtil.defaults({\n fill: 'none',\n stroke: splitLineColorsArr[idx % splitLineColorsArr.length]\n }, lineStyle),\n silent: true\n }));\n }, this);\n };\n RadarView.type = 'radar';\n return RadarView;\n}(ComponentView);\nexport default RadarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar IndicatorAxis = /** @class */function (_super) {\n __extends(IndicatorAxis, _super);\n function IndicatorAxis(dim, scale, radiusExtent) {\n var _this = _super.call(this, dim, scale, radiusExtent) || this;\n _this.type = 'value';\n _this.angle = 0;\n _this.name = '';\n return _this;\n }\n return IndicatorAxis;\n}(Axis);\nexport default IndicatorAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO clockwise\nimport IndicatorAxis from './IndicatorAxis.js';\nimport IntervalScale from '../../scale/Interval.js';\nimport * as numberUtil from '../../util/number.js';\nimport { map, each, isString, isNumber } from 'zrender/lib/core/util.js';\nimport { alignScaleTicks } from '../axisAlignTicks.js';\nvar Radar = /** @class */function () {\n function Radar(radarModel, ecModel, api) {\n /**\n *\n * Radar dimensions\n */\n this.dimensions = [];\n this._model = radarModel;\n this._indicatorAxes = map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, new IntervalScale()\n // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()\n );\n\n indicatorAxis.name = indicatorModel.get('name');\n // Inject model and axis\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n }\n Radar.prototype.getIndicatorAxes = function () {\n return this._indicatorAxes;\n };\n Radar.prototype.dataToPoint = function (value, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex);\n };\n // TODO: API should be coordToPoint([coord, indicatorIndex])\n Radar.prototype.coordToPoint = function (coord, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n var angle = indicatorAxis.angle;\n var x = this.cx + coord * Math.cos(angle);\n var y = this.cy - coord * Math.sin(angle);\n return [x, y];\n };\n Radar.prototype.pointToData = function (pt) {\n var dx = pt[0] - this.cx;\n var dy = pt[1] - this.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx);\n // Find the closest angle\n // FIXME index can calculated directly\n var minRadianDiff = Infinity;\n var closestAxis;\n var closestAxisIdx = -1;\n for (var i = 0; i < this._indicatorAxes.length; i++) {\n var indicatorAxis = this._indicatorAxes[i];\n var diff = Math.abs(radian - indicatorAxis.angle);\n if (diff < minRadianDiff) {\n closestAxis = indicatorAxis;\n closestAxisIdx = i;\n minRadianDiff = diff;\n }\n }\n return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))];\n };\n Radar.prototype.resize = function (radarModel, api) {\n var center = radarModel.get('center');\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n var viewSize = Math.min(viewWidth, viewHeight) / 2;\n this.cx = numberUtil.parsePercent(center[0], viewWidth);\n this.cy = numberUtil.parsePercent(center[1], viewHeight);\n this.startAngle = radarModel.get('startAngle') * Math.PI / 180;\n // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`\n var radius = radarModel.get('radius');\n if (isString(radius) || isNumber(radius)) {\n radius = [0, radius];\n }\n this.r0 = numberUtil.parsePercent(radius[0], viewSize);\n this.r = numberUtil.parsePercent(radius[1], viewSize);\n each(this._indicatorAxes, function (indicatorAxis, idx) {\n indicatorAxis.setExtent(this.r0, this.r);\n var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length;\n // Normalize to [-PI, PI]\n angle = Math.atan2(Math.sin(angle), Math.cos(angle));\n indicatorAxis.angle = angle;\n }, this);\n };\n Radar.prototype.update = function (ecModel, api) {\n var indicatorAxes = this._indicatorAxes;\n var radarModel = this._model;\n each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.setExtent(Infinity, -Infinity);\n });\n ecModel.eachSeriesByType('radar', function (radarSeries, idx) {\n if (radarSeries.get('coordinateSystem') !== 'radar'\n // @ts-ignore\n || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) {\n return;\n }\n var data = radarSeries.getData();\n each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim));\n });\n }, this);\n var splitNumber = radarModel.get('splitNumber');\n var dummyScale = new IntervalScale();\n dummyScale.setExtent(0, splitNumber);\n dummyScale.setInterval(1);\n // Force all the axis fixing the maxSplitNumber.\n each(indicatorAxes, function (indicatorAxis, idx) {\n alignScaleTicks(indicatorAxis.scale, indicatorAxis.model, dummyScale);\n });\n };\n Radar.prototype.convertToPixel = function (ecModel, finder, value) {\n console.warn('Not implemented.');\n return null;\n };\n Radar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n console.warn('Not implemented.');\n return null;\n };\n Radar.prototype.containPoint = function (point) {\n console.warn('Not implemented.');\n return false;\n };\n Radar.create = function (ecModel, api) {\n var radarList = [];\n ecModel.eachComponent('radar', function (radarModel) {\n var radar = new Radar(radarModel, ecModel, api);\n radarList.push(radar);\n radarModel.coordinateSystem = radar;\n });\n ecModel.eachSeriesByType('radar', function (radarSeries) {\n if (radarSeries.get('coordinateSystem') === 'radar') {\n // Inject coordinate system\n // @ts-ignore\n radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0];\n }\n });\n return radarList;\n };\n /**\n * Radar dimensions is based on the data\n */\n Radar.dimensions = [];\n return Radar;\n}();\nexport default Radar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport RadarModel from '../../coord/radar/RadarModel.js';\nimport RadarView from './RadarView.js';\nimport Radar from '../../coord/radar/Radar.js';\nexport function install(registers) {\n registers.registerCoordinateSystem('radar', Radar);\n registers.registerComponentModel(RadarModel);\n registers.registerComponentView(RadarView);\n registers.registerVisual({\n seriesType: 'radar',\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n // itemVisual symbol is for selected data\n data.each(function (idx) {\n data.setItemVisual(idx, 'legendIcon', 'roundRect');\n });\n // visual is for unselected data\n data.setVisual('legendIcon', 'roundRect');\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport radarLayout from '../radar/radarLayout.js';\nimport dataFilter from '../../processor/dataFilter.js';\nimport backwardCompat from '../radar/backwardCompat.js';\nimport RadarView from './RadarView.js';\nimport RadarSeriesModel from './RadarSeries.js';\nimport { install as installRadarComponent } from '../../component/radar/install.js';\nexport function install(registers) {\n use(installRadarComponent);\n registers.registerChartView(RadarView);\n registers.registerSeriesModel(RadarSeriesModel);\n registers.registerLayout(radarLayout);\n registers.registerProcessor(dataFilter('radar'));\n registers.registerPreprocessor(backwardCompat);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as echarts from '../../core/echarts.js';\nimport { noop } from 'zrender/lib/core/util.js';\nvar ATTR = '\\0_ec_interaction_mutex';\nexport function take(zr, resourceKey, userKey) {\n var store = getStore(zr);\n store[resourceKey] = userKey;\n}\nexport function release(zr, resourceKey, userKey) {\n var store = getStore(zr);\n var uKey = store[resourceKey];\n if (uKey === userKey) {\n store[resourceKey] = null;\n }\n}\nexport function isTaken(zr, resourceKey) {\n return !!getStore(zr)[resourceKey];\n}\nfunction getStore(zr) {\n return zr[ATTR] || (zr[ATTR] = {});\n}\n/**\n * payload: {\n * type: 'takeGlobalCursor',\n * key: 'dataZoomSelect', or 'brush', or ...,\n * If no userKey, release global cursor.\n * }\n */\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'takeGlobalCursor',\n event: 'globalCursorTaken',\n update: 'update'\n}, noop);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as interactionMutex from './interactionMutex.js';\nimport { isString, bind, defaults, clone } from 'zrender/lib/core/util.js';\n;\nvar RoamController = /** @class */function (_super) {\n __extends(RoamController, _super);\n function RoamController(zr) {\n var _this = _super.call(this) || this;\n _this._zr = zr;\n // Avoid two roamController bind the same handler\n var mousedownHandler = bind(_this._mousedownHandler, _this);\n var mousemoveHandler = bind(_this._mousemoveHandler, _this);\n var mouseupHandler = bind(_this._mouseupHandler, _this);\n var mousewheelHandler = bind(_this._mousewheelHandler, _this);\n var pinchHandler = bind(_this._pinchHandler, _this);\n /**\n * Notice: only enable needed types. For example, if 'zoom'\n * is not needed, 'zoom' should not be enabled, otherwise\n * default mousewheel behaviour (scroll page) will be disabled.\n */\n _this.enable = function (controlType, opt) {\n // Disable previous first\n this.disable();\n this._opt = defaults(clone(opt) || {}, {\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n // By default, wheel do not trigger move.\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true\n });\n if (controlType == null) {\n controlType = true;\n }\n if (controlType === true || controlType === 'move' || controlType === 'pan') {\n zr.on('mousedown', mousedownHandler);\n zr.on('mousemove', mousemoveHandler);\n zr.on('mouseup', mouseupHandler);\n }\n if (controlType === true || controlType === 'scale' || controlType === 'zoom') {\n zr.on('mousewheel', mousewheelHandler);\n zr.on('pinch', pinchHandler);\n }\n };\n _this.disable = function () {\n zr.off('mousedown', mousedownHandler);\n zr.off('mousemove', mousemoveHandler);\n zr.off('mouseup', mouseupHandler);\n zr.off('mousewheel', mousewheelHandler);\n zr.off('pinch', pinchHandler);\n };\n return _this;\n }\n RoamController.prototype.isDragging = function () {\n return this._dragging;\n };\n RoamController.prototype.isPinching = function () {\n return this._pinching;\n };\n RoamController.prototype.setPointerChecker = function (pointerChecker) {\n this.pointerChecker = pointerChecker;\n };\n RoamController.prototype.dispose = function () {\n this.disable();\n };\n RoamController.prototype._mousedownHandler = function (e) {\n if (eventTool.isMiddleOrRightButtonOnMouseUpDown(e)) {\n return;\n }\n var el = e.target;\n while (el) {\n if (el.draggable) {\n return;\n }\n // check if host is draggable\n el = el.__hostTarget || el.parent;\n }\n var x = e.offsetX;\n var y = e.offsetY;\n // Only check on mosedown, but not mousemove.\n // Mouse can be out of target when mouse moving.\n if (this.pointerChecker && this.pointerChecker(e, x, y)) {\n this._x = x;\n this._y = y;\n this._dragging = true;\n }\n };\n RoamController.prototype._mousemoveHandler = function (e) {\n if (!this._dragging || !isAvailableBehavior('moveOnMouseMove', e, this._opt) || e.gestureEvent === 'pinch' || interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n var x = e.offsetX;\n var y = e.offsetY;\n var oldX = this._x;\n var oldY = this._y;\n var dx = x - oldX;\n var dy = y - oldY;\n this._x = x;\n this._y = y;\n this._opt.preventDefaultMouseMove && eventTool.stop(e.event);\n trigger(this, 'pan', 'moveOnMouseMove', e, {\n dx: dx,\n dy: dy,\n oldX: oldX,\n oldY: oldY,\n newX: x,\n newY: y,\n isAvailableBehavior: null\n });\n };\n RoamController.prototype._mouseupHandler = function (e) {\n if (!eventTool.isMiddleOrRightButtonOnMouseUpDown(e)) {\n this._dragging = false;\n }\n };\n RoamController.prototype._mousewheelHandler = function (e) {\n var shouldZoom = isAvailableBehavior('zoomOnMouseWheel', e, this._opt);\n var shouldMove = isAvailableBehavior('moveOnMouseWheel', e, this._opt);\n var wheelDelta = e.wheelDelta;\n var absWheelDeltaDelta = Math.abs(wheelDelta);\n var originX = e.offsetX;\n var originY = e.offsetY;\n // wheelDelta maybe -0 in chrome mac.\n if (wheelDelta === 0 || !shouldZoom && !shouldMove) {\n return;\n }\n // If both `shouldZoom` and `shouldMove` is true, trigger\n // their event both, and the final behavior is determined\n // by event listener themselves.\n if (shouldZoom) {\n // Convenience:\n // Mac and VM Windows on Mac: scroll up: zoom out.\n // Windows: scroll up: zoom in.\n // FIXME: Should do more test in different environment.\n // wheelDelta is too complicated in difference nvironment\n // (https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel),\n // although it has been normallized by zrender.\n // wheelDelta of mouse wheel is bigger than touch pad.\n var factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1;\n var scale = wheelDelta > 0 ? factor : 1 / factor;\n checkPointerAndTrigger(this, 'zoom', 'zoomOnMouseWheel', e, {\n scale: scale,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n if (shouldMove) {\n // FIXME: Should do more test in different environment.\n var absDelta = Math.abs(wheelDelta);\n // wheelDelta of mouse wheel is bigger than touch pad.\n var scrollDelta = (wheelDelta > 0 ? 1 : -1) * (absDelta > 3 ? 0.4 : absDelta > 1 ? 0.15 : 0.05);\n checkPointerAndTrigger(this, 'scrollMove', 'moveOnMouseWheel', e, {\n scrollDelta: scrollDelta,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n };\n RoamController.prototype._pinchHandler = function (e) {\n if (interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1;\n checkPointerAndTrigger(this, 'zoom', null, e, {\n scale: scale,\n originX: e.pinchX,\n originY: e.pinchY,\n isAvailableBehavior: null\n });\n };\n return RoamController;\n}(Eventful);\nfunction checkPointerAndTrigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n if (controller.pointerChecker && controller.pointerChecker(e, contollerEvent.originX, contollerEvent.originY)) {\n // When mouse is out of roamController rect,\n // default befavoius should not be be disabled, otherwise\n // page sliding is disabled, contrary to expectation.\n eventTool.stop(e.event);\n trigger(controller, eventName, behaviorToCheck, e, contollerEvent);\n }\n}\nfunction trigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n // Also provide behavior checker for event listener, for some case that\n // multiple components share one listener.\n contollerEvent.isAvailableBehavior = bind(isAvailableBehavior, null, behaviorToCheck, e);\n // TODO should not have type issue.\n controller.trigger(eventName, contollerEvent);\n}\n// settings: {\n// zoomOnMouseWheel\n// moveOnMouseMove\n// moveOnMouseWheel\n// }\n// The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\nfunction isAvailableBehavior(behaviorToCheck, e, settings) {\n var setting = settings[behaviorToCheck];\n return !behaviorToCheck || setting && (!isString(setting) || e.event[setting + 'Key']);\n}\nexport default RoamController;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * For geo and graph.\n */\nexport function updateViewOnPan(controllerHost, dx, dy) {\n var target = controllerHost.target;\n target.x += dx;\n target.y += dy;\n target.dirty();\n}\n/**\n * For geo and graph.\n */\nexport function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) {\n var target = controllerHost.target;\n var zoomLimit = controllerHost.zoomLimit;\n var newZoom = controllerHost.zoom = controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n var zoomScale = newZoom / controllerHost.zoom;\n controllerHost.zoom = newZoom;\n // Keep the mouse center when scaling\n target.x -= (zoomX - target.x) * (zoomScale - 1);\n target.y -= (zoomY - target.y) * (zoomScale - 1);\n target.scaleX *= zoomScale;\n target.scaleY *= zoomScale;\n target.dirty();\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar IRRELEVANT_EXCLUDES = {\n 'axisPointer': 1,\n 'tooltip': 1,\n 'brush': 1\n};\n/**\n * Avoid that: mouse click on a elements that is over geo or graph,\n * but roam is triggered.\n */\nexport function onIrrelevantElement(e, api, targetCoordSysModel) {\n var model = api.getComponentByElement(e.topTarget);\n // If model is axisModel, it works only if it is injected with coordinateSystem.\n var coordSys = model && model.coordinateSystem;\n return model && model !== targetCoordSysModel && !IRRELEVANT_EXCLUDES.hasOwnProperty(model.mainType) && coordSys && coordSys.model !== targetCoordSysModel;\n}","import { isString } from '../core/util.js';\nexport function parseXML(svg) {\n if (isString(svg)) {\n var parser = new DOMParser();\n svg = parser.parseFromString(svg, 'text/xml');\n }\n var svgNode = svg;\n if (svgNode.nodeType === 9) {\n svgNode = svgNode.firstChild;\n }\n while (svgNode.nodeName.toLowerCase() !== 'svg' || svgNode.nodeType !== 1) {\n svgNode = svgNode.nextSibling;\n }\n return svgNode;\n}\n","import Group from '../graphic/Group.js';\nimport ZRImage from '../graphic/Image.js';\nimport Circle from '../graphic/shape/Circle.js';\nimport Rect from '../graphic/shape/Rect.js';\nimport Ellipse from '../graphic/shape/Ellipse.js';\nimport Line from '../graphic/shape/Line.js';\nimport Polygon from '../graphic/shape/Polygon.js';\nimport Polyline from '../graphic/shape/Polyline.js';\nimport * as matrix from '../core/matrix.js';\nimport { createFromString } from './path.js';\nimport { defaults, trim, each, map, keys, hasOwn } from '../core/util.js';\nimport LinearGradient from '../graphic/LinearGradient.js';\nimport RadialGradient from '../graphic/RadialGradient.js';\nimport TSpan from '../graphic/TSpan.js';\nimport { parseXML } from './parseXML.js';\n;\nvar nodeParsers;\nvar INHERITABLE_STYLE_ATTRIBUTES_MAP = {\n 'fill': 'fill',\n 'stroke': 'stroke',\n 'stroke-width': 'lineWidth',\n 'opacity': 'opacity',\n 'fill-opacity': 'fillOpacity',\n 'stroke-opacity': 'strokeOpacity',\n 'stroke-dasharray': 'lineDash',\n 'stroke-dashoffset': 'lineDashOffset',\n 'stroke-linecap': 'lineCap',\n 'stroke-linejoin': 'lineJoin',\n 'stroke-miterlimit': 'miterLimit',\n 'font-family': 'fontFamily',\n 'font-size': 'fontSize',\n 'font-style': 'fontStyle',\n 'font-weight': 'fontWeight',\n 'text-anchor': 'textAlign',\n 'visibility': 'visibility',\n 'display': 'display'\n};\nvar INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS = keys(INHERITABLE_STYLE_ATTRIBUTES_MAP);\nvar SELF_STYLE_ATTRIBUTES_MAP = {\n 'alignment-baseline': 'textBaseline',\n 'stop-color': 'stopColor'\n};\nvar SELF_STYLE_ATTRIBUTES_MAP_KEYS = keys(SELF_STYLE_ATTRIBUTES_MAP);\nvar SVGParser = (function () {\n function SVGParser() {\n this._defs = {};\n this._root = null;\n }\n SVGParser.prototype.parse = function (xml, opt) {\n opt = opt || {};\n var svg = parseXML(xml);\n if (process.env.NODE_ENV !== 'production') {\n if (!svg) {\n throw new Error('Illegal svg');\n }\n }\n this._defsUsePending = [];\n var root = new Group();\n this._root = root;\n var named = [];\n var viewBox = svg.getAttribute('viewBox') || '';\n var width = parseFloat((svg.getAttribute('width') || opt.width));\n var height = parseFloat((svg.getAttribute('height') || opt.height));\n isNaN(width) && (width = null);\n isNaN(height) && (height = null);\n parseAttributes(svg, root, null, true, false);\n var child = svg.firstChild;\n while (child) {\n this._parseNode(child, root, named, null, false, false);\n child = child.nextSibling;\n }\n applyDefs(this._defs, this._defsUsePending);\n this._defsUsePending = [];\n var viewBoxRect;\n var viewBoxTransform;\n if (viewBox) {\n var viewBoxArr = splitNumberSequence(viewBox);\n if (viewBoxArr.length >= 4) {\n viewBoxRect = {\n x: parseFloat((viewBoxArr[0] || 0)),\n y: parseFloat((viewBoxArr[1] || 0)),\n width: parseFloat(viewBoxArr[2]),\n height: parseFloat(viewBoxArr[3])\n };\n }\n }\n if (viewBoxRect && width != null && height != null) {\n viewBoxTransform = makeViewBoxTransform(viewBoxRect, { x: 0, y: 0, width: width, height: height });\n if (!opt.ignoreViewBox) {\n var elRoot = root;\n root = new Group();\n root.add(elRoot);\n elRoot.scaleX = elRoot.scaleY = viewBoxTransform.scale;\n elRoot.x = viewBoxTransform.x;\n elRoot.y = viewBoxTransform.y;\n }\n }\n if (!opt.ignoreRootClip && width != null && height != null) {\n root.setClipPath(new Rect({\n shape: { x: 0, y: 0, width: width, height: height }\n }));\n }\n return {\n root: root,\n width: width,\n height: height,\n viewBoxRect: viewBoxRect,\n viewBoxTransform: viewBoxTransform,\n named: named\n };\n };\n SVGParser.prototype._parseNode = function (xmlNode, parentGroup, named, namedFrom, isInDefs, isInText) {\n var nodeName = xmlNode.nodeName.toLowerCase();\n var el;\n var namedFromForSub = namedFrom;\n if (nodeName === 'defs') {\n isInDefs = true;\n }\n if (nodeName === 'text') {\n isInText = true;\n }\n if (nodeName === 'defs' || nodeName === 'switch') {\n el = parentGroup;\n }\n else {\n if (!isInDefs) {\n var parser_1 = nodeParsers[nodeName];\n if (parser_1 && hasOwn(nodeParsers, nodeName)) {\n el = parser_1.call(this, xmlNode, parentGroup);\n var nameAttr = xmlNode.getAttribute('name');\n if (nameAttr) {\n var newNamed = {\n name: nameAttr,\n namedFrom: null,\n svgNodeTagLower: nodeName,\n el: el\n };\n named.push(newNamed);\n if (nodeName === 'g') {\n namedFromForSub = newNamed;\n }\n }\n else if (namedFrom) {\n named.push({\n name: namedFrom.name,\n namedFrom: namedFrom,\n svgNodeTagLower: nodeName,\n el: el\n });\n }\n parentGroup.add(el);\n }\n }\n var parser = paintServerParsers[nodeName];\n if (parser && hasOwn(paintServerParsers, nodeName)) {\n var def = parser.call(this, xmlNode);\n var id = xmlNode.getAttribute('id');\n if (id) {\n this._defs[id] = def;\n }\n }\n }\n if (el && el.isGroup) {\n var child = xmlNode.firstChild;\n while (child) {\n if (child.nodeType === 1) {\n this._parseNode(child, el, named, namedFromForSub, isInDefs, isInText);\n }\n else if (child.nodeType === 3 && isInText) {\n this._parseText(child, el);\n }\n child = child.nextSibling;\n }\n }\n };\n SVGParser.prototype._parseText = function (xmlNode, parentGroup) {\n var text = new TSpan({\n style: {\n text: xmlNode.textContent\n },\n silent: true,\n x: this._textX || 0,\n y: this._textY || 0\n });\n inheritStyle(parentGroup, text);\n parseAttributes(xmlNode, text, this._defsUsePending, false, false);\n applyTextAlignment(text, parentGroup);\n var textStyle = text.style;\n var fontSize = textStyle.fontSize;\n if (fontSize && fontSize < 9) {\n textStyle.fontSize = 9;\n text.scaleX *= fontSize / 9;\n text.scaleY *= fontSize / 9;\n }\n var font = (textStyle.fontSize || textStyle.fontFamily) && [\n textStyle.fontStyle,\n textStyle.fontWeight,\n (textStyle.fontSize || 12) + 'px',\n textStyle.fontFamily || 'sans-serif'\n ].join(' ');\n textStyle.font = font;\n var rect = text.getBoundingRect();\n this._textX += rect.width;\n parentGroup.add(text);\n return text;\n };\n SVGParser.internalField = (function () {\n nodeParsers = {\n 'g': function (xmlNode, parentGroup) {\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, false);\n return g;\n },\n 'rect': function (xmlNode, parentGroup) {\n var rect = new Rect();\n inheritStyle(parentGroup, rect);\n parseAttributes(xmlNode, rect, this._defsUsePending, false, false);\n rect.setShape({\n x: parseFloat(xmlNode.getAttribute('x') || '0'),\n y: parseFloat(xmlNode.getAttribute('y') || '0'),\n width: parseFloat(xmlNode.getAttribute('width') || '0'),\n height: parseFloat(xmlNode.getAttribute('height') || '0')\n });\n rect.silent = true;\n return rect;\n },\n 'circle': function (xmlNode, parentGroup) {\n var circle = new Circle();\n inheritStyle(parentGroup, circle);\n parseAttributes(xmlNode, circle, this._defsUsePending, false, false);\n circle.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || '0'),\n cy: parseFloat(xmlNode.getAttribute('cy') || '0'),\n r: parseFloat(xmlNode.getAttribute('r') || '0')\n });\n circle.silent = true;\n return circle;\n },\n 'line': function (xmlNode, parentGroup) {\n var line = new Line();\n inheritStyle(parentGroup, line);\n parseAttributes(xmlNode, line, this._defsUsePending, false, false);\n line.setShape({\n x1: parseFloat(xmlNode.getAttribute('x1') || '0'),\n y1: parseFloat(xmlNode.getAttribute('y1') || '0'),\n x2: parseFloat(xmlNode.getAttribute('x2') || '0'),\n y2: parseFloat(xmlNode.getAttribute('y2') || '0')\n });\n line.silent = true;\n return line;\n },\n 'ellipse': function (xmlNode, parentGroup) {\n var ellipse = new Ellipse();\n inheritStyle(parentGroup, ellipse);\n parseAttributes(xmlNode, ellipse, this._defsUsePending, false, false);\n ellipse.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || '0'),\n cy: parseFloat(xmlNode.getAttribute('cy') || '0'),\n rx: parseFloat(xmlNode.getAttribute('rx') || '0'),\n ry: parseFloat(xmlNode.getAttribute('ry') || '0')\n });\n ellipse.silent = true;\n return ellipse;\n },\n 'polygon': function (xmlNode, parentGroup) {\n var pointsStr = xmlNode.getAttribute('points');\n var pointsArr;\n if (pointsStr) {\n pointsArr = parsePoints(pointsStr);\n }\n var polygon = new Polygon({\n shape: {\n points: pointsArr || []\n },\n silent: true\n });\n inheritStyle(parentGroup, polygon);\n parseAttributes(xmlNode, polygon, this._defsUsePending, false, false);\n return polygon;\n },\n 'polyline': function (xmlNode, parentGroup) {\n var pointsStr = xmlNode.getAttribute('points');\n var pointsArr;\n if (pointsStr) {\n pointsArr = parsePoints(pointsStr);\n }\n var polyline = new Polyline({\n shape: {\n points: pointsArr || []\n },\n silent: true\n });\n inheritStyle(parentGroup, polyline);\n parseAttributes(xmlNode, polyline, this._defsUsePending, false, false);\n return polyline;\n },\n 'image': function (xmlNode, parentGroup) {\n var img = new ZRImage();\n inheritStyle(parentGroup, img);\n parseAttributes(xmlNode, img, this._defsUsePending, false, false);\n img.setStyle({\n image: xmlNode.getAttribute('xlink:href') || xmlNode.getAttribute('href'),\n x: +xmlNode.getAttribute('x'),\n y: +xmlNode.getAttribute('y'),\n width: +xmlNode.getAttribute('width'),\n height: +xmlNode.getAttribute('height')\n });\n img.silent = true;\n return img;\n },\n 'text': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x') || '0';\n var y = xmlNode.getAttribute('y') || '0';\n var dx = xmlNode.getAttribute('dx') || '0';\n var dy = xmlNode.getAttribute('dy') || '0';\n this._textX = parseFloat(x) + parseFloat(dx);\n this._textY = parseFloat(y) + parseFloat(dy);\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, true);\n return g;\n },\n 'tspan': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x');\n var y = xmlNode.getAttribute('y');\n if (x != null) {\n this._textX = parseFloat(x);\n }\n if (y != null) {\n this._textY = parseFloat(y);\n }\n var dx = xmlNode.getAttribute('dx') || '0';\n var dy = xmlNode.getAttribute('dy') || '0';\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defsUsePending, false, true);\n this._textX += parseFloat(dx);\n this._textY += parseFloat(dy);\n return g;\n },\n 'path': function (xmlNode, parentGroup) {\n var d = xmlNode.getAttribute('d') || '';\n var path = createFromString(d);\n inheritStyle(parentGroup, path);\n parseAttributes(xmlNode, path, this._defsUsePending, false, false);\n path.silent = true;\n return path;\n }\n };\n })();\n return SVGParser;\n}());\nvar paintServerParsers = {\n 'lineargradient': function (xmlNode) {\n var x1 = parseInt(xmlNode.getAttribute('x1') || '0', 10);\n var y1 = parseInt(xmlNode.getAttribute('y1') || '0', 10);\n var x2 = parseInt(xmlNode.getAttribute('x2') || '10', 10);\n var y2 = parseInt(xmlNode.getAttribute('y2') || '0', 10);\n var gradient = new LinearGradient(x1, y1, x2, y2);\n parsePaintServerUnit(xmlNode, gradient);\n parseGradientColorStops(xmlNode, gradient);\n return gradient;\n },\n 'radialgradient': function (xmlNode) {\n var cx = parseInt(xmlNode.getAttribute('cx') || '0', 10);\n var cy = parseInt(xmlNode.getAttribute('cy') || '0', 10);\n var r = parseInt(xmlNode.getAttribute('r') || '0', 10);\n var gradient = new RadialGradient(cx, cy, r);\n parsePaintServerUnit(xmlNode, gradient);\n parseGradientColorStops(xmlNode, gradient);\n return gradient;\n }\n};\nfunction parsePaintServerUnit(xmlNode, gradient) {\n var gradientUnits = xmlNode.getAttribute('gradientUnits');\n if (gradientUnits === 'userSpaceOnUse') {\n gradient.global = true;\n }\n}\nfunction parseGradientColorStops(xmlNode, gradient) {\n var stop = xmlNode.firstChild;\n while (stop) {\n if (stop.nodeType === 1\n && stop.nodeName.toLocaleLowerCase() === 'stop') {\n var offsetStr = stop.getAttribute('offset');\n var offset = void 0;\n if (offsetStr && offsetStr.indexOf('%') > 0) {\n offset = parseInt(offsetStr, 10) / 100;\n }\n else if (offsetStr) {\n offset = parseFloat(offsetStr);\n }\n else {\n offset = 0;\n }\n var styleVals = {};\n parseInlineStyle(stop, styleVals, styleVals);\n var stopColor = styleVals.stopColor\n || stop.getAttribute('stop-color')\n || '#000000';\n gradient.colorStops.push({\n offset: offset,\n color: stopColor\n });\n }\n stop = stop.nextSibling;\n }\n}\nfunction inheritStyle(parent, child) {\n if (parent && parent.__inheritedStyle) {\n if (!child.__inheritedStyle) {\n child.__inheritedStyle = {};\n }\n defaults(child.__inheritedStyle, parent.__inheritedStyle);\n }\n}\nfunction parsePoints(pointsString) {\n var list = splitNumberSequence(pointsString);\n var points = [];\n for (var i = 0; i < list.length; i += 2) {\n var x = parseFloat(list[i]);\n var y = parseFloat(list[i + 1]);\n points.push([x, y]);\n }\n return points;\n}\nfunction parseAttributes(xmlNode, el, defsUsePending, onlyInlineStyle, isTextGroup) {\n var disp = el;\n var inheritedStyle = disp.__inheritedStyle = disp.__inheritedStyle || {};\n var selfStyle = {};\n if (xmlNode.nodeType === 1) {\n parseTransformAttribute(xmlNode, el);\n parseInlineStyle(xmlNode, inheritedStyle, selfStyle);\n if (!onlyInlineStyle) {\n parseAttributeStyle(xmlNode, inheritedStyle, selfStyle);\n }\n }\n disp.style = disp.style || {};\n if (inheritedStyle.fill != null) {\n disp.style.fill = getFillStrokeStyle(disp, 'fill', inheritedStyle.fill, defsUsePending);\n }\n if (inheritedStyle.stroke != null) {\n disp.style.stroke = getFillStrokeStyle(disp, 'stroke', inheritedStyle.stroke, defsUsePending);\n }\n each([\n 'lineWidth', 'opacity', 'fillOpacity', 'strokeOpacity', 'miterLimit', 'fontSize'\n ], function (propName) {\n if (inheritedStyle[propName] != null) {\n disp.style[propName] = parseFloat(inheritedStyle[propName]);\n }\n });\n each([\n 'lineDashOffset', 'lineCap', 'lineJoin', 'fontWeight', 'fontFamily', 'fontStyle', 'textAlign'\n ], function (propName) {\n if (inheritedStyle[propName] != null) {\n disp.style[propName] = inheritedStyle[propName];\n }\n });\n if (isTextGroup) {\n disp.__selfStyle = selfStyle;\n }\n if (inheritedStyle.lineDash) {\n disp.style.lineDash = map(splitNumberSequence(inheritedStyle.lineDash), function (str) {\n return parseFloat(str);\n });\n }\n if (inheritedStyle.visibility === 'hidden' || inheritedStyle.visibility === 'collapse') {\n disp.invisible = true;\n }\n if (inheritedStyle.display === 'none') {\n disp.ignore = true;\n }\n}\nfunction applyTextAlignment(text, parentGroup) {\n var parentSelfStyle = parentGroup.__selfStyle;\n if (parentSelfStyle) {\n var textBaseline = parentSelfStyle.textBaseline;\n var zrTextBaseline = textBaseline;\n if (!textBaseline || textBaseline === 'auto') {\n zrTextBaseline = 'alphabetic';\n }\n else if (textBaseline === 'baseline') {\n zrTextBaseline = 'alphabetic';\n }\n else if (textBaseline === 'before-edge' || textBaseline === 'text-before-edge') {\n zrTextBaseline = 'top';\n }\n else if (textBaseline === 'after-edge' || textBaseline === 'text-after-edge') {\n zrTextBaseline = 'bottom';\n }\n else if (textBaseline === 'central' || textBaseline === 'mathematical') {\n zrTextBaseline = 'middle';\n }\n text.style.textBaseline = zrTextBaseline;\n }\n var parentInheritedStyle = parentGroup.__inheritedStyle;\n if (parentInheritedStyle) {\n var textAlign = parentInheritedStyle.textAlign;\n var zrTextAlign = textAlign;\n if (textAlign) {\n if (textAlign === 'middle') {\n zrTextAlign = 'center';\n }\n text.style.textAlign = zrTextAlign;\n }\n }\n}\nvar urlRegex = /^url\\(\\s*#(.*?)\\)/;\nfunction getFillStrokeStyle(el, method, str, defsUsePending) {\n var urlMatch = str && str.match(urlRegex);\n if (urlMatch) {\n var url = trim(urlMatch[1]);\n defsUsePending.push([el, method, url]);\n return;\n }\n if (str === 'none') {\n str = null;\n }\n return str;\n}\nfunction applyDefs(defs, defsUsePending) {\n for (var i = 0; i < defsUsePending.length; i++) {\n var item = defsUsePending[i];\n item[0].style[item[1]] = defs[item[2]];\n }\n}\nvar numberReg = /-?([0-9]*\\.)?[0-9]+([eE]-?[0-9]+)?/g;\nfunction splitNumberSequence(rawStr) {\n return rawStr.match(numberReg) || [];\n}\nvar transformRegex = /(translate|scale|rotate|skewX|skewY|matrix)\\(([\\-\\s0-9\\.eE,]*)\\)/g;\nvar DEGREE_TO_ANGLE = Math.PI / 180;\nfunction parseTransformAttribute(xmlNode, node) {\n var transform = xmlNode.getAttribute('transform');\n if (transform) {\n transform = transform.replace(/,/g, ' ');\n var transformOps_1 = [];\n var mt = null;\n transform.replace(transformRegex, function (str, type, value) {\n transformOps_1.push(type, value);\n return '';\n });\n for (var i = transformOps_1.length - 1; i > 0; i -= 2) {\n var value = transformOps_1[i];\n var type = transformOps_1[i - 1];\n var valueArr = splitNumberSequence(value);\n mt = mt || matrix.create();\n switch (type) {\n case 'translate':\n matrix.translate(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || '0')]);\n break;\n case 'scale':\n matrix.scale(mt, mt, [parseFloat(valueArr[0]), parseFloat(valueArr[1] || valueArr[0])]);\n break;\n case 'rotate':\n matrix.rotate(mt, mt, -parseFloat(valueArr[0]) * DEGREE_TO_ANGLE, [\n parseFloat(valueArr[1] || '0'),\n parseFloat(valueArr[2] || '0')\n ]);\n break;\n case 'skewX':\n var sx = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE);\n matrix.mul(mt, [1, 0, sx, 1, 0, 0], mt);\n break;\n case 'skewY':\n var sy = Math.tan(parseFloat(valueArr[0]) * DEGREE_TO_ANGLE);\n matrix.mul(mt, [1, sy, 0, 1, 0, 0], mt);\n break;\n case 'matrix':\n mt[0] = parseFloat(valueArr[0]);\n mt[1] = parseFloat(valueArr[1]);\n mt[2] = parseFloat(valueArr[2]);\n mt[3] = parseFloat(valueArr[3]);\n mt[4] = parseFloat(valueArr[4]);\n mt[5] = parseFloat(valueArr[5]);\n break;\n }\n }\n node.setLocalTransform(mt);\n }\n}\nvar styleRegex = /([^\\s:;]+)\\s*:\\s*([^:;]+)/g;\nfunction parseInlineStyle(xmlNode, inheritableStyleResult, selfStyleResult) {\n var style = xmlNode.getAttribute('style');\n if (!style) {\n return;\n }\n styleRegex.lastIndex = 0;\n var styleRegResult;\n while ((styleRegResult = styleRegex.exec(style)) != null) {\n var svgStlAttr = styleRegResult[1];\n var zrInheritableStlAttr = hasOwn(INHERITABLE_STYLE_ATTRIBUTES_MAP, svgStlAttr)\n ? INHERITABLE_STYLE_ATTRIBUTES_MAP[svgStlAttr]\n : null;\n if (zrInheritableStlAttr) {\n inheritableStyleResult[zrInheritableStlAttr] = styleRegResult[2];\n }\n var zrSelfStlAttr = hasOwn(SELF_STYLE_ATTRIBUTES_MAP, svgStlAttr)\n ? SELF_STYLE_ATTRIBUTES_MAP[svgStlAttr]\n : null;\n if (zrSelfStlAttr) {\n selfStyleResult[zrSelfStlAttr] = styleRegResult[2];\n }\n }\n}\nfunction parseAttributeStyle(xmlNode, inheritableStyleResult, selfStyleResult) {\n for (var i = 0; i < INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) {\n var svgAttrName = INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[i];\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n inheritableStyleResult[INHERITABLE_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue;\n }\n }\n for (var i = 0; i < SELF_STYLE_ATTRIBUTES_MAP_KEYS.length; i++) {\n var svgAttrName = SELF_STYLE_ATTRIBUTES_MAP_KEYS[i];\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n selfStyleResult[SELF_STYLE_ATTRIBUTES_MAP[svgAttrName]] = attrValue;\n }\n }\n}\nexport function makeViewBoxTransform(viewBoxRect, boundingRect) {\n var scaleX = boundingRect.width / viewBoxRect.width;\n var scaleY = boundingRect.height / viewBoxRect.height;\n var scale = Math.min(scaleX, scaleY);\n return {\n scale: scale,\n x: -(viewBoxRect.x + viewBoxRect.width / 2) * scale + (boundingRect.x + boundingRect.width / 2),\n y: -(viewBoxRect.y + viewBoxRect.height / 2) * scale + (boundingRect.y + boundingRect.height / 2)\n };\n}\nexport function parseSVG(xml, opt) {\n var parser = new SVGParser();\n return parser.parse(xml, opt);\n}\nexport { parseXML };\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseSVG, makeViewBoxTransform } from 'zrender/lib/tool/parseSVG.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport Rect from 'zrender/lib/graphic/shape/Rect.js';\nimport { assert, createHashMap, each } from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { parseXML } from 'zrender/lib/tool/parseXML.js';\nimport { GeoSVGRegion } from './Region.js';\n/**\n * \"region available\" means that: enable users to set attribute `name=\"xxx\"` on those tags\n * to make it be a region.\n * 1. region styles and its label styles can be defined in echarts opton:\n * ```js\n * geo: {\n * regions: [{\n * name: 'xxx',\n * itemStyle: { ... },\n * label: { ... }\n * }, {\n * ...\n * },\n * ...]\n * };\n * ```\n * 2. name can be duplicated in different SVG tag. All of the tags with the same name share\n * a region option. For exampel if there are two representing two lung lobes. They have\n * no common parents but both of them need to display label \"lung\" inside.\n */\nvar REGION_AVAILABLE_SVG_TAG_MAP = createHashMap(['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path',\n// are also enabled because some SVG might paint text itself,\n// but still need to trigger events or tooltip.\n'text', 'tspan',\n// is also enabled because this case: if multiple tags share one name\n// and need label displayed, every tags will display the name, which is not\n// expected. So we can put them into a . Thereby only one label\n// displayed and located based on the bounding rect of the .\n'g']);\nvar GeoSVGResource = /** @class */function () {\n function GeoSVGResource(mapName, svg) {\n this.type = 'geoSVG';\n // All used graphics. key: hostKey, value: root\n this._usedGraphicMap = createHashMap();\n // All unused graphics.\n this._freedGraphics = [];\n this._mapName = mapName;\n // Only perform parse to XML object here, which might be time\n // consiming for large SVG.\n // Although convert XML to zrender element is also time consiming,\n // if we do it here, the clone of zrender elements has to be\n // required. So we do it once for each geo instance, util real\n // performance issues call for optimizing it.\n this._parsedXML = parseXML(svg);\n }\n GeoSVGResource.prototype.load = function /* nameMap: NameMap */\n () {\n // In the \"load\" stage, graphic need to be built to\n // get boundingRect for geo coordinate system.\n var firstGraphic = this._firstGraphic;\n // Create the return data structure only when first graphic created.\n // Because they will be used in geo coordinate system update stage,\n // and `regions` will be mounted at `geo` coordinate system,\n // in which there is no \"view\" info, so that it should better not to\n // make references to graphic elements.\n if (!firstGraphic) {\n firstGraphic = this._firstGraphic = this._buildGraphic(this._parsedXML);\n this._freedGraphics.push(firstGraphic);\n this._boundingRect = this._firstGraphic.boundingRect.clone();\n // PENDING: `nameMap` will not be supported until some real requirement come.\n // if (nameMap) {\n // named = applyNameMap(named, nameMap);\n // }\n var _a = createRegions(firstGraphic.named),\n regions = _a.regions,\n regionsMap = _a.regionsMap;\n this._regions = regions;\n this._regionsMap = regionsMap;\n }\n return {\n boundingRect: this._boundingRect,\n regions: this._regions,\n regionsMap: this._regionsMap\n };\n };\n GeoSVGResource.prototype._buildGraphic = function (svgXML) {\n var result;\n var rootFromParse;\n try {\n result = svgXML && parseSVG(svgXML, {\n ignoreViewBox: true,\n ignoreRootClip: true\n }) || {};\n rootFromParse = result.root;\n assert(rootFromParse != null);\n } catch (e) {\n throw new Error('Invalid svg format\\n' + e.message);\n }\n // Note: we keep the covenant that the root has no transform. So always add an extra root.\n var root = new Group();\n root.add(rootFromParse);\n root.isGeoSVGGraphicRoot = true;\n // [THE_RULE_OF_VIEWPORT_AND_VIEWBOX]\n //\n // Consider: ``\n // - the `width/height` we call it `svgWidth/svgHeight` for short.\n // - `(0, 0, svgWidth, svgHeight)` defines the viewport of the SVG, or say,\n // \"viewport boundingRect\", or `boundingRect` for short.\n // - `viewBox` defines the transform from the real content ot the viewport.\n // `viewBox` has the same unit as the content of SVG.\n // If `viewBox` exists, a transform is defined, so the unit of `svgWidth/svgHeight` become\n // different from the content of SVG. Otherwise, they are the same.\n //\n // If both `svgWidth/svgHeight/viewBox` are specified in a SVG file, the transform rule will be:\n // 0. `boundingRect` is `(0, 0, svgWidth, svgHeight)`. Set it to Geo['_rect'] (View['_rect']).\n // 1. Make a transform from `viewBox` to `boundingRect`.\n // Note: only support `preserveAspectRatio 'xMidYMid'` here. That is, this transform will preserve\n // the aspect ratio.\n // 2. Make a transform from boundingRect to Geo['_viewRect'] (View['_viewRect'])\n // (`Geo`/`View` will do this job).\n // Note: this transform might not preserve aspect radio, which depending on how users specify\n // viewRect in echarts option (e.g., `geo.left/top/width/height` will not preserve aspect ratio,\n // but `geo.layoutCenter/layoutSize` will preserve aspect ratio).\n //\n // If `svgWidth/svgHeight` not specified, we use `viewBox` as the `boundingRect` to make the SVG\n // layout look good.\n //\n // If neither `svgWidth/svgHeight` nor `viewBox` are not specified, we calculate the boundingRect\n // of the SVG content and use them to make SVG layout look good.\n var svgWidth = result.width;\n var svgHeight = result.height;\n var viewBoxRect = result.viewBoxRect;\n var boundingRect = this._boundingRect;\n if (!boundingRect) {\n var bRectX = void 0;\n var bRectY = void 0;\n var bRectWidth = void 0;\n var bRectHeight = void 0;\n if (svgWidth != null) {\n bRectX = 0;\n bRectWidth = svgWidth;\n } else if (viewBoxRect) {\n bRectX = viewBoxRect.x;\n bRectWidth = viewBoxRect.width;\n }\n if (svgHeight != null) {\n bRectY = 0;\n bRectHeight = svgHeight;\n } else if (viewBoxRect) {\n bRectY = viewBoxRect.y;\n bRectHeight = viewBoxRect.height;\n }\n // If both viewBox and svgWidth/svgHeight not specified,\n // we have to determine how to layout those element to make them look good.\n if (bRectX == null || bRectY == null) {\n var calculatedBoundingRect = rootFromParse.getBoundingRect();\n if (bRectX == null) {\n bRectX = calculatedBoundingRect.x;\n bRectWidth = calculatedBoundingRect.width;\n }\n if (bRectY == null) {\n bRectY = calculatedBoundingRect.y;\n bRectHeight = calculatedBoundingRect.height;\n }\n }\n boundingRect = this._boundingRect = new BoundingRect(bRectX, bRectY, bRectWidth, bRectHeight);\n }\n if (viewBoxRect) {\n var viewBoxTransform = makeViewBoxTransform(viewBoxRect, boundingRect);\n // Only support `preserveAspectRatio 'xMidYMid'`\n rootFromParse.scaleX = rootFromParse.scaleY = viewBoxTransform.scale;\n rootFromParse.x = viewBoxTransform.x;\n rootFromParse.y = viewBoxTransform.y;\n }\n // SVG needs to clip based on `viewBox`. And some SVG files really rely on this feature.\n // They do not strictly confine all of the content inside a display rect, but deliberately\n // use a `viewBox` to define a displayable rect.\n // PENDING:\n // The drawback of the `setClipPath` here is: the region label (genereted by echarts) near the\n // edge might also be clipped, because region labels are put as `textContent` of the SVG path.\n root.setClipPath(new Rect({\n shape: boundingRect.plain()\n }));\n var named = [];\n each(result.named, function (namedItem) {\n if (REGION_AVAILABLE_SVG_TAG_MAP.get(namedItem.svgNodeTagLower) != null) {\n named.push(namedItem);\n setSilent(namedItem.el);\n }\n });\n return {\n root: root,\n boundingRect: boundingRect,\n named: named\n };\n };\n /**\n * Consider:\n * (1) One graphic element can not be shared by different `geoView` running simultaneously.\n * Notice, also need to consider multiple echarts instances share a `mapRecord`.\n * (2) Converting SVG to graphic elements is time consuming.\n * (3) In the current architecture, `load` should be called frequently to get boundingRect,\n * and it is called without view info.\n * So we maintain graphic elements in this module, and enables `view` to use/return these\n * graphics from/to the pool with it's uid.\n */\n GeoSVGResource.prototype.useGraphic = function (hostKey /* , nameMap: NameMap */) {\n var usedRootMap = this._usedGraphicMap;\n var svgGraphic = usedRootMap.get(hostKey);\n if (svgGraphic) {\n return svgGraphic;\n }\n svgGraphic = this._freedGraphics.pop()\n // use the first boundingRect to avoid duplicated boundingRect calculation.\n || this._buildGraphic(this._parsedXML);\n usedRootMap.set(hostKey, svgGraphic);\n // PENDING: `nameMap` will not be supported until some real requirement come.\n // `nameMap` can only be obtained from echarts option.\n // The original `named` must not be modified.\n // if (nameMap) {\n // svgGraphic = extend({}, svgGraphic);\n // svgGraphic.named = applyNameMap(svgGraphic.named, nameMap);\n // }\n return svgGraphic;\n };\n GeoSVGResource.prototype.freeGraphic = function (hostKey) {\n var usedRootMap = this._usedGraphicMap;\n var svgGraphic = usedRootMap.get(hostKey);\n if (svgGraphic) {\n usedRootMap.removeKey(hostKey);\n this._freedGraphics.push(svgGraphic);\n }\n };\n return GeoSVGResource;\n}();\nexport { GeoSVGResource };\nfunction setSilent(el) {\n // Only named element has silent: false, other elements should\n // act as background and has no user interaction.\n el.silent = false;\n // text|tspan will be converted to group.\n if (el.isGroup) {\n el.traverse(function (child) {\n child.silent = false;\n });\n }\n}\nfunction createRegions(named) {\n var regions = [];\n var regionsMap = createHashMap();\n // Create resions only for the first graphic.\n each(named, function (namedItem) {\n // Region has feature to calculate center for tooltip or other features.\n // If there is a , the center should be the center of the\n // bounding rect of the g.\n if (namedItem.namedFrom != null) {\n return;\n }\n var region = new GeoSVGRegion(namedItem.name, namedItem.el);\n // PENDING: if `nameMap` supported, this region can not be mounted on\n // `this`, but can only be created each time `load()` called.\n regions.push(region);\n // PENDING: if multiple tag named with the same name, only one will be\n // found by `_regionsMap`. `_regionsMap` is used to find a coordinate\n // by name. We use `region.getCenter()` as the coordinate.\n regionsMap.set(namedItem.name, region);\n });\n return {\n regions: regions,\n regionsMap: regionsMap\n };\n}\n// PENDING: `nameMap` will not be supported until some real requirement come.\n// /**\n// * Use the alias in geoNameMap.\n// * The input `named` must not be modified.\n// */\n// function applyNameMap(\n// named: GeoSVGGraphicRecord['named'],\n// nameMap: NameMap\n// ): GeoSVGGraphicRecord['named'] {\n// const result = [] as GeoSVGGraphicRecord['named'];\n// for (let i = 0; i < named.length; i++) {\n// let regionGraphic = named[i];\n// const name = regionGraphic.name;\n// if (nameMap && nameMap.hasOwnProperty(name)) {\n// regionGraphic = extend({}, regionGraphic);\n// regionGraphic.name = name;\n// }\n// result.push(regionGraphic);\n// }\n// return result;\n// }","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 南海诸岛\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { GeoJSONRegion } from '../Region.js';\nvar geoCoord = [126, 25];\nvar nanhaiName = '南海诸岛';\nvar points = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];\nfor (var i = 0; i < points.length; i++) {\n for (var k = 0; k < points[i].length; k++) {\n points[i][k][0] /= 10.5;\n points[i][k][1] /= -10.5 / 0.75;\n points[i][k][0] += geoCoord[0];\n points[i][k][1] += geoCoord[1];\n }\n}\nexport default function fixNanhai(mapType, regions) {\n if (mapType === 'china') {\n for (var i = 0; i < regions.length; i++) {\n // Already exists.\n if (regions[i].name === nanhaiName) {\n return;\n }\n }\n regions.push(new GeoJSONRegion(nanhaiName, zrUtil.map(points, function (exterior) {\n return {\n type: 'polygon',\n exterior: exterior\n };\n }), geoCoord));\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar coordsOffsetMap = {\n '南海诸岛': [32, 80],\n // 全国\n '广东': [0, -10],\n '香港': [10, 5],\n '澳门': [-10, 10],\n // '北京': [-10, 0],\n '天津': [5, 5]\n};\nexport default function fixTextCoords(mapType, region) {\n if (mapType === 'china') {\n var coordFix = coordsOffsetMap[region.name];\n if (coordFix) {\n var cp = region.getCenter();\n cp[0] += coordFix[0] / 10.5;\n cp[1] += -coordFix[1] / (10.5 / 0.75);\n region.setCenter(cp);\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 钓鱼岛\n// let Region = require('../Region');\n// let zrUtil = require('zrender/lib/core/util');\n// let geoCoord = [126, 25];\nvar points = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];\nexport default function fixDiaoyuIsland(mapType, region) {\n if (mapType === 'china' && region.name === '台湾') {\n region.geometries.push({\n type: 'polygon',\n exterior: points[0]\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isString, createHashMap, hasOwn } from 'zrender/lib/core/util.js';\nimport parseGeoJson from './parseGeoJson.js';\n// Built-in GEO fixer.\nimport fixNanhai from './fix/nanhai.js';\nimport fixTextCoord from './fix/textCoord.js';\nimport fixDiaoyuIsland from './fix/diaoyuIsland.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nvar DEFAULT_NAME_PROPERTY = 'name';\nvar GeoJSONResource = /** @class */function () {\n function GeoJSONResource(mapName, geoJSON, specialAreas) {\n this.type = 'geoJSON';\n this._parsedMap = createHashMap();\n this._mapName = mapName;\n this._specialAreas = specialAreas;\n // PENDING: delay the parse to the first usage to rapid up the FMP?\n this._geoJSON = parseInput(geoJSON);\n }\n /**\n * @param nameMap can be null/undefined\n * @param nameProperty can be null/undefined\n */\n GeoJSONResource.prototype.load = function (nameMap, nameProperty) {\n nameProperty = nameProperty || DEFAULT_NAME_PROPERTY;\n var parsed = this._parsedMap.get(nameProperty);\n if (!parsed) {\n var rawRegions = this._parseToRegions(nameProperty);\n parsed = this._parsedMap.set(nameProperty, {\n regions: rawRegions,\n boundingRect: calculateBoundingRect(rawRegions)\n });\n }\n var regionsMap = createHashMap();\n var finalRegions = [];\n each(parsed.regions, function (region) {\n var regionName = region.name;\n // Try use the alias in geoNameMap\n if (nameMap && hasOwn(nameMap, regionName)) {\n region = region.cloneShallow(regionName = nameMap[regionName]);\n }\n finalRegions.push(region);\n regionsMap.set(regionName, region);\n });\n return {\n regions: finalRegions,\n boundingRect: parsed.boundingRect || new BoundingRect(0, 0, 0, 0),\n regionsMap: regionsMap\n };\n };\n GeoJSONResource.prototype._parseToRegions = function (nameProperty) {\n var mapName = this._mapName;\n var geoJSON = this._geoJSON;\n var rawRegions;\n // https://jsperf.com/try-catch-performance-overhead\n try {\n rawRegions = geoJSON ? parseGeoJson(geoJSON, nameProperty) : [];\n } catch (e) {\n throw new Error('Invalid geoJson format\\n' + e.message);\n }\n fixNanhai(mapName, rawRegions);\n each(rawRegions, function (region) {\n var regionName = region.name;\n fixTextCoord(mapName, region);\n fixDiaoyuIsland(mapName, region);\n // Some area like Alaska in USA map needs to be tansformed\n // to look better\n var specialArea = this._specialAreas && this._specialAreas[regionName];\n if (specialArea) {\n region.transformTo(specialArea.left, specialArea.top, specialArea.width, specialArea.height);\n }\n }, this);\n return rawRegions;\n };\n /**\n * Only for exporting to users.\n * **MUST NOT** used internally.\n */\n GeoJSONResource.prototype.getMapForUser = function () {\n return {\n // For backward compatibility, use geoJson\n // PENDING: it has been returning them without clone.\n // do we need to avoid outsite modification?\n geoJson: this._geoJSON,\n geoJSON: this._geoJSON,\n specialAreas: this._specialAreas\n };\n };\n return GeoJSONResource;\n}();\nexport { GeoJSONResource };\nfunction calculateBoundingRect(regions) {\n var rect;\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect();\n rect = rect || regionRect.clone();\n rect.union(regionRect);\n }\n return rect;\n}\nfunction parseInput(source) {\n return !isString(source) ? source : typeof JSON !== 'undefined' && JSON.parse ? JSON.parse(source) : new Function('return (' + source + ');')();\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap } from 'zrender/lib/core/util.js';\nimport { GeoSVGResource } from './GeoSVGResource.js';\nimport { GeoJSONResource } from './GeoJSONResource.js';\nvar storage = createHashMap();\nexport default {\n /**\n * Compatible with previous `echarts.registerMap`.\n *\n * @usage\n * ```js\n *\n * echarts.registerMap('USA', geoJson, specialAreas);\n *\n * echarts.registerMap('USA', {\n * geoJson: geoJson,\n * specialAreas: {...}\n * });\n * echarts.registerMap('USA', {\n * geoJSON: geoJson,\n * specialAreas: {...}\n * });\n *\n * echarts.registerMap('airport', {\n * svg: svg\n * }\n * ```\n *\n * Note:\n * Do not support that register multiple geoJSON or SVG\n * one map name. Because different geoJSON and SVG have\n * different unit. It's not easy to make sure how those\n * units are mapping/normalize.\n * If intending to use multiple geoJSON or SVG, we can\n * use multiple geo coordinate system.\n */\n registerMap: function (mapName, rawDef, rawSpecialAreas) {\n if (rawDef.svg) {\n var resource = new GeoSVGResource(mapName, rawDef.svg);\n storage.set(mapName, resource);\n } else {\n // Recommend:\n // echarts.registerMap('eu', { geoJSON: xxx, specialAreas: xxx });\n // Backward compatibility:\n // echarts.registerMap('eu', geoJSON, specialAreas);\n // echarts.registerMap('eu', { geoJson: xxx, specialAreas: xxx });\n var geoJSON = rawDef.geoJson || rawDef.geoJSON;\n if (geoJSON && !rawDef.features) {\n rawSpecialAreas = rawDef.specialAreas;\n } else {\n geoJSON = rawDef;\n }\n var resource = new GeoJSONResource(mapName, geoJSON, rawSpecialAreas);\n storage.set(mapName, resource);\n }\n },\n getGeoResource: function (mapName) {\n return storage.get(mapName);\n },\n /**\n * Only for exporting to users.\n * **MUST NOT** used internally.\n */\n getMapForUser: function (mapName) {\n var resource = storage.get(mapName);\n // Do not support return SVG until some real requirement come.\n return resource && resource.type === 'geoJSON' && resource.getMapForUser();\n },\n load: function (mapName, nameMap, nameProperty) {\n var resource = storage.get(mapName);\n if (!resource) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.');\n }\n return;\n }\n return resource.load(nameMap, nameProperty);\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport RoamController from './RoamController.js';\nimport * as roamHelper from '../../component/helper/roamHelper.js';\nimport { onIrrelevantElement } from '../../component/helper/cursorHelper.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, enableComponentHighDownFeatures, setDefaultStateProxy } from '../../util/states.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nimport { getUID } from '../../util/component.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { makeInner } from '../../util/model.js';\n/**\n * Only these tags enable use `itemStyle` if they are named in SVG.\n * Other tags like might not suitable for `itemStyle`.\n * They will not be considered to be styled until some requirements come.\n */\nvar OPTION_STYLE_ENABLED_TAGS = ['rect', 'circle', 'line', 'ellipse', 'polygon', 'polyline', 'path'];\nvar OPTION_STYLE_ENABLED_TAG_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS);\nvar STATE_TRIGGER_TAG_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g']));\nvar LABEL_HOST_MAP = zrUtil.createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(['g']));\nvar mapLabelRaw = makeInner();\nfunction getFixedItemStyle(model) {\n var itemStyle = model.getItemStyle();\n var areaColor = model.get('areaColor');\n // If user want the color not to be changed when hover,\n // they should both set areaColor and color to be null.\n if (areaColor != null) {\n itemStyle.fill = areaColor;\n }\n return itemStyle;\n}\n// Only stroke can be used for line.\n// Using fill in style if stroke not exits.\n// TODO Not sure yet. Perhaps a separate `lineStyle`?\nfunction fixLineStyle(styleHost) {\n var style = styleHost.style;\n if (style) {\n style.stroke = style.stroke || style.fill;\n style.fill = null;\n }\n}\nvar MapDraw = /** @class */function () {\n function MapDraw(api) {\n var group = new graphic.Group();\n this.uid = getUID('ec_map_draw');\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: group\n };\n this.group = group;\n group.add(this._regionsGroup = new graphic.Group());\n group.add(this._svgGroup = new graphic.Group());\n }\n MapDraw.prototype.draw = function (mapOrGeoModel, ecModel, api, fromView, payload) {\n var isGeo = mapOrGeoModel.mainType === 'geo';\n // Map series has data. GEO model that controlled by map series\n // will be assigned with map data. Other GEO model has no data.\n var data = mapOrGeoModel.getData && mapOrGeoModel.getData();\n isGeo && ecModel.eachComponent({\n mainType: 'series',\n subType: 'map'\n }, function (mapSeries) {\n if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) {\n data = mapSeries.getData();\n }\n });\n var geo = mapOrGeoModel.coordinateSystem;\n var regionsGroup = this._regionsGroup;\n var group = this.group;\n var transformInfo = geo.getTransformInfo();\n var transformInfoRaw = transformInfo.raw;\n var transformInfoRoam = transformInfo.roam;\n // No animation when first draw or in action\n var isFirstDraw = !regionsGroup.childAt(0) || payload;\n if (isFirstDraw) {\n group.x = transformInfoRoam.x;\n group.y = transformInfoRoam.y;\n group.scaleX = transformInfoRoam.scaleX;\n group.scaleY = transformInfoRoam.scaleY;\n group.dirty();\n } else {\n graphic.updateProps(group, transformInfoRoam, mapOrGeoModel);\n }\n var isVisualEncodedByVisualMap = data && data.getVisual('visualMeta') && data.getVisual('visualMeta').length > 0;\n var viewBuildCtx = {\n api: api,\n geo: geo,\n mapOrGeoModel: mapOrGeoModel,\n data: data,\n isVisualEncodedByVisualMap: isVisualEncodedByVisualMap,\n isGeo: isGeo,\n transformInfoRaw: transformInfoRaw\n };\n if (geo.resourceType === 'geoJSON') {\n this._buildGeoJSON(viewBuildCtx);\n } else if (geo.resourceType === 'geoSVG') {\n this._buildSVG(viewBuildCtx);\n }\n this._updateController(mapOrGeoModel, ecModel, api);\n this._updateMapSelectHandler(mapOrGeoModel, regionsGroup, api, fromView);\n };\n MapDraw.prototype._buildGeoJSON = function (viewBuildCtx) {\n var regionsGroupByName = this._regionsGroupByName = zrUtil.createHashMap();\n var regionsInfoByName = zrUtil.createHashMap();\n var regionsGroup = this._regionsGroup;\n var transformInfoRaw = viewBuildCtx.transformInfoRaw;\n var mapOrGeoModel = viewBuildCtx.mapOrGeoModel;\n var data = viewBuildCtx.data;\n var projection = viewBuildCtx.geo.projection;\n var projectionStream = projection && projection.stream;\n function transformPoint(point, project) {\n if (project) {\n // projection may return null point.\n point = project(point);\n }\n return point && [point[0] * transformInfoRaw.scaleX + transformInfoRaw.x, point[1] * transformInfoRaw.scaleY + transformInfoRaw.y];\n }\n ;\n function transformPolygonPoints(inPoints) {\n var outPoints = [];\n // If projectionStream is provided. Use it instead of single point project.\n var project = !projectionStream && projection && projection.project;\n for (var i = 0; i < inPoints.length; ++i) {\n var newPt = transformPoint(inPoints[i], project);\n newPt && outPoints.push(newPt);\n }\n return outPoints;\n }\n function getPolyShape(points) {\n return {\n shape: {\n points: transformPolygonPoints(points)\n }\n };\n }\n regionsGroup.removeAll();\n // Only when the resource is GeoJSON, there is `geo.regions`.\n zrUtil.each(viewBuildCtx.geo.regions, function (region) {\n var regionName = region.name;\n // Consider in GeoJson properties.name may be duplicated, for example,\n // there is multiple region named \"United Kindom\" or \"France\" (so many\n // colonies). And it is not appropriate to merge them in geo, which\n // will make them share the same label and bring trouble in label\n // location calculation.\n var regionGroup = regionsGroupByName.get(regionName);\n var _a = regionsInfoByName.get(regionName) || {},\n dataIdx = _a.dataIdx,\n regionModel = _a.regionModel;\n if (!regionGroup) {\n regionGroup = regionsGroupByName.set(regionName, new graphic.Group());\n regionsGroup.add(regionGroup);\n dataIdx = data ? data.indexOfName(regionName) : null;\n regionModel = viewBuildCtx.isGeo ? mapOrGeoModel.getRegionModel(regionName) : data ? data.getItemModel(dataIdx) : null;\n regionsInfoByName.set(regionName, {\n dataIdx: dataIdx,\n regionModel: regionModel\n });\n }\n var polygonSubpaths = [];\n var polylineSubpaths = [];\n zrUtil.each(region.geometries, function (geometry) {\n // Polygon and MultiPolygon\n if (geometry.type === 'polygon') {\n var polys = [geometry.exterior].concat(geometry.interiors || []);\n if (projectionStream) {\n polys = projectPolys(polys, projectionStream);\n }\n zrUtil.each(polys, function (poly) {\n polygonSubpaths.push(new graphic.Polygon(getPolyShape(poly)));\n });\n }\n // LineString and MultiLineString\n else {\n var points = geometry.points;\n if (projectionStream) {\n points = projectPolys(points, projectionStream, true);\n }\n zrUtil.each(points, function (points) {\n polylineSubpaths.push(new graphic.Polyline(getPolyShape(points)));\n });\n }\n });\n var centerPt = transformPoint(region.getCenter(), projection && projection.project);\n function createCompoundPath(subpaths, isLine) {\n if (!subpaths.length) {\n return;\n }\n var compoundPath = new graphic.CompoundPath({\n culling: true,\n segmentIgnoreThreshold: 1,\n shape: {\n paths: subpaths\n }\n });\n regionGroup.add(compoundPath);\n applyOptionStyleForRegion(viewBuildCtx, compoundPath, dataIdx, regionModel);\n resetLabelForRegion(viewBuildCtx, compoundPath, regionName, regionModel, mapOrGeoModel, dataIdx, centerPt);\n if (isLine) {\n fixLineStyle(compoundPath);\n zrUtil.each(compoundPath.states, fixLineStyle);\n }\n }\n createCompoundPath(polygonSubpaths);\n createCompoundPath(polylineSubpaths, true);\n });\n // Ensure children have been added to `regionGroup` before calling them.\n regionsGroupByName.each(function (regionGroup, regionName) {\n var _a = regionsInfoByName.get(regionName),\n dataIdx = _a.dataIdx,\n regionModel = _a.regionModel;\n resetEventTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel, dataIdx);\n resetTooltipForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);\n resetStateTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);\n }, this);\n };\n MapDraw.prototype._buildSVG = function (viewBuildCtx) {\n var mapName = viewBuildCtx.geo.map;\n var transformInfoRaw = viewBuildCtx.transformInfoRaw;\n this._svgGroup.x = transformInfoRaw.x;\n this._svgGroup.y = transformInfoRaw.y;\n this._svgGroup.scaleX = transformInfoRaw.scaleX;\n this._svgGroup.scaleY = transformInfoRaw.scaleY;\n if (this._svgResourceChanged(mapName)) {\n this._freeSVG();\n this._useSVG(mapName);\n }\n var svgDispatcherMap = this._svgDispatcherMap = zrUtil.createHashMap();\n var focusSelf = false;\n zrUtil.each(this._svgGraphicRecord.named, function (namedItem) {\n // Note that we also allow different elements have the same name.\n // For example, a glyph of a city and the label of the city have\n // the same name and their tooltip info can be defined in a single\n // region option.\n var regionName = namedItem.name;\n var mapOrGeoModel = viewBuildCtx.mapOrGeoModel;\n var data = viewBuildCtx.data;\n var svgNodeTagLower = namedItem.svgNodeTagLower;\n var el = namedItem.el;\n var dataIdx = data ? data.indexOfName(regionName) : null;\n var regionModel = mapOrGeoModel.getRegionModel(regionName);\n if (OPTION_STYLE_ENABLED_TAG_MAP.get(svgNodeTagLower) != null && el instanceof Displayable) {\n applyOptionStyleForRegion(viewBuildCtx, el, dataIdx, regionModel);\n }\n if (el instanceof Displayable) {\n el.culling = true;\n }\n // We do not know how the SVG like so we'd better not to change z2.\n // Otherwise it might bring some unexpected result. For example,\n // an area hovered that make some inner city can not be clicked.\n el.z2EmphasisLift = 0;\n // If self named:\n if (!namedItem.namedFrom) {\n // label should batter to be displayed based on the center of \n // if it is named rather than displayed on each child.\n if (LABEL_HOST_MAP.get(svgNodeTagLower) != null) {\n resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx, null);\n }\n resetEventTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel, dataIdx);\n resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel);\n if (STATE_TRIGGER_TAG_MAP.get(svgNodeTagLower) != null) {\n var focus_1 = resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel);\n if (focus_1 === 'self') {\n focusSelf = true;\n }\n var els = svgDispatcherMap.get(regionName) || svgDispatcherMap.set(regionName, []);\n els.push(el);\n }\n }\n }, this);\n this._enableBlurEntireSVG(focusSelf, viewBuildCtx);\n };\n MapDraw.prototype._enableBlurEntireSVG = function (focusSelf, viewBuildCtx) {\n // It's a little complicated to support blurring the entire geoSVG in series-map.\n // So do not support it until some requirements come.\n // At present, in series-map, only regions can be blurred.\n if (focusSelf && viewBuildCtx.isGeo) {\n var blurStyle = viewBuildCtx.mapOrGeoModel.getModel(['blur', 'itemStyle']).getItemStyle();\n // Only support `opacity` here. Because not sure that other props are suitable for\n // all of the elements generated by SVG (especially for Text/TSpan/Image/... ).\n var opacity_1 = blurStyle.opacity;\n this._svgGraphicRecord.root.traverse(function (el) {\n if (!el.isGroup) {\n // PENDING: clear those settings to SVG elements when `_freeSVG`.\n // (Currently it happen not to be needed.)\n setDefaultStateProxy(el);\n var style = el.ensureState('blur').style || {};\n // Do not overwrite the region style that already set from region option.\n if (style.opacity == null && opacity_1 != null) {\n style.opacity = opacity_1;\n }\n // If `ensureState('blur').style = {}`, there will be default opacity.\n // Enable `stateTransition` (animation).\n el.ensureState('emphasis');\n }\n });\n }\n };\n MapDraw.prototype.remove = function () {\n this._regionsGroup.removeAll();\n this._regionsGroupByName = null;\n this._svgGroup.removeAll();\n this._freeSVG();\n this._controller.dispose();\n this._controllerHost = null;\n };\n MapDraw.prototype.findHighDownDispatchers = function (name, geoModel) {\n if (name == null) {\n return [];\n }\n var geo = geoModel.coordinateSystem;\n if (geo.resourceType === 'geoJSON') {\n var regionsGroupByName = this._regionsGroupByName;\n if (regionsGroupByName) {\n var regionGroup = regionsGroupByName.get(name);\n return regionGroup ? [regionGroup] : [];\n }\n } else if (geo.resourceType === 'geoSVG') {\n return this._svgDispatcherMap && this._svgDispatcherMap.get(name) || [];\n }\n };\n MapDraw.prototype._svgResourceChanged = function (mapName) {\n return this._svgMapName !== mapName;\n };\n MapDraw.prototype._useSVG = function (mapName) {\n var resource = geoSourceManager.getGeoResource(mapName);\n if (resource && resource.type === 'geoSVG') {\n var svgGraphic = resource.useGraphic(this.uid);\n this._svgGroup.add(svgGraphic.root);\n this._svgGraphicRecord = svgGraphic;\n this._svgMapName = mapName;\n }\n };\n MapDraw.prototype._freeSVG = function () {\n var mapName = this._svgMapName;\n if (mapName == null) {\n return;\n }\n var resource = geoSourceManager.getGeoResource(mapName);\n if (resource && resource.type === 'geoSVG') {\n resource.freeGraphic(this.uid);\n }\n this._svgGraphicRecord = null;\n this._svgDispatcherMap = null;\n this._svgGroup.removeAll();\n this._svgMapName = null;\n };\n MapDraw.prototype._updateController = function (mapOrGeoModel, ecModel, api) {\n var geo = mapOrGeoModel.coordinateSystem;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n // @ts-ignore FIXME:TS\n controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit');\n controllerHost.zoom = geo.getZoom();\n // roamType is will be set default true if it is null\n // @ts-ignore FIXME:TS\n controller.enable(mapOrGeoModel.get('roam') || false);\n var mainType = mapOrGeoModel.mainType;\n function makeActionBase() {\n var action = {\n type: 'geoRoam',\n componentType: mainType\n };\n action[mainType + 'Id'] = mapOrGeoModel.id;\n return action;\n }\n controller.off('pan').on('pan', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n dx: e.dx,\n dy: e.dy,\n animation: {\n duration: 0\n }\n }));\n }, this);\n controller.off('zoom').on('zoom', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n totalZoom: controllerHost.zoom,\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY,\n animation: {\n duration: 0\n }\n }));\n }, this);\n controller.setPointerChecker(function (e, x, y) {\n return geo.containPoint([x, y]) && !onIrrelevantElement(e, api, mapOrGeoModel);\n });\n };\n /**\n * FIXME: this is a temporarily workaround.\n * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like\n * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries`\n * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified\n * props will have no chance to be restored.\n * Note: This reset should be after `clearStates` in `renderSeries` because `useStates` in\n * `renderSeries` will cache the modified `ignore` to `el._normalState`.\n * TODO:\n * Use clone/immutable in `LabelManager`?\n */\n MapDraw.prototype.resetForLabelLayout = function () {\n this.group.traverse(function (el) {\n var label = el.getTextContent();\n if (label) {\n label.ignore = mapLabelRaw(label).ignore;\n }\n });\n };\n MapDraw.prototype._updateMapSelectHandler = function (mapOrGeoModel, regionsGroup, api, fromView) {\n var mapDraw = this;\n regionsGroup.off('mousedown');\n regionsGroup.off('click');\n // @ts-ignore FIXME:TS resolve type conflict\n if (mapOrGeoModel.get('selectedMode')) {\n regionsGroup.on('mousedown', function () {\n mapDraw._mouseDownFlag = true;\n });\n regionsGroup.on('click', function (e) {\n if (!mapDraw._mouseDownFlag) {\n return;\n }\n mapDraw._mouseDownFlag = false;\n });\n }\n };\n return MapDraw;\n}();\n;\nfunction applyOptionStyleForRegion(viewBuildCtx, el, dataIndex, regionModel) {\n // All of the path are using `itemStyle`, because\n // (1) Some SVG also use fill on polyline (The different between\n // polyline and polygon is \"open\" or \"close\" but not fill or not).\n // (2) For the common props like opacity, if some use itemStyle\n // and some use `lineStyle`, it might confuse users.\n // (3) Most SVG use , where can not detect whether to draw a \"line\"\n // or a filled shape, so use `itemStyle` for .\n var normalStyleModel = regionModel.getModel('itemStyle');\n var emphasisStyleModel = regionModel.getModel(['emphasis', 'itemStyle']);\n var blurStyleModel = regionModel.getModel(['blur', 'itemStyle']);\n var selectStyleModel = regionModel.getModel(['select', 'itemStyle']);\n // NOTE: DON'T use 'style' in visual when drawing map.\n // This component is used for drawing underlying map for both geo component and map series.\n var normalStyle = getFixedItemStyle(normalStyleModel);\n var emphasisStyle = getFixedItemStyle(emphasisStyleModel);\n var selectStyle = getFixedItemStyle(selectStyleModel);\n var blurStyle = getFixedItemStyle(blurStyleModel);\n // Update the itemStyle if has data visual\n var data = viewBuildCtx.data;\n if (data) {\n // Only visual color of each item will be used. It can be encoded by visualMap\n // But visual color of series is used in symbol drawing\n // Visual color for each series is for the symbol draw\n var style = data.getItemVisual(dataIndex, 'style');\n var decal = data.getItemVisual(dataIndex, 'decal');\n if (viewBuildCtx.isVisualEncodedByVisualMap && style.fill) {\n normalStyle.fill = style.fill;\n }\n if (decal) {\n normalStyle.decal = createOrUpdatePatternFromDecal(decal, viewBuildCtx.api);\n }\n }\n // SVG text, tspan and image can be named but not supporeted\n // to be styled by region option yet.\n el.setStyle(normalStyle);\n el.style.strokeNoScale = true;\n el.ensureState('emphasis').style = emphasisStyle;\n el.ensureState('select').style = selectStyle;\n el.ensureState('blur').style = blurStyle;\n // Enable blur\n setDefaultStateProxy(el);\n}\nfunction resetLabelForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel,\n// Exist only if `viewBuildCtx.data` exists.\ndataIdx,\n// If labelXY not provided, use `textConfig.position: 'inside'`\nlabelXY) {\n var data = viewBuildCtx.data;\n var isGeo = viewBuildCtx.isGeo;\n var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx));\n var itemLayout = data && data.getItemLayout(dataIdx);\n // In the following cases label will be drawn\n // 1. In map series and data value is NaN\n // 2. In geo component\n // 3. Region has no series legendIcon, which will be add a showLabel flag in mapSymbolLayout\n if (isGeo || isDataNaN || itemLayout && itemLayout.showLabel) {\n var query = !isGeo ? dataIdx : regionName;\n var labelFetcher = void 0;\n // Consider dataIdx not found.\n if (!data || dataIdx >= 0) {\n labelFetcher = mapOrGeoModel;\n }\n var specifiedTextOpt = labelXY ? {\n normal: {\n align: 'center',\n verticalAlign: 'middle'\n }\n } : null;\n // Caveat: must be called after `setDefaultStateProxy(el);` called.\n // because textContent will be assign with `el.stateProxy` inside.\n setLabelStyle(el, getLabelStatesModels(regionModel), {\n labelFetcher: labelFetcher,\n labelDataIndex: query,\n defaultText: regionName\n }, specifiedTextOpt);\n var textEl = el.getTextContent();\n if (textEl) {\n mapLabelRaw(textEl).ignore = textEl.ignore;\n if (el.textConfig && labelXY) {\n // Compute a relative offset based on the el bounding rect.\n var rect = el.getBoundingRect().clone();\n // Need to make sure the percent position base on the same rect in normal and\n // emphasis state. Otherwise if using boundingRect of el, but the emphasis state\n // has borderWidth (even 0.5px), the text position will be changed obviously\n // if the position is very big like ['1234%', '1345%'].\n el.textConfig.layoutRect = rect;\n el.textConfig.position = [(labelXY[0] - rect.x) / rect.width * 100 + '%', (labelXY[1] - rect.y) / rect.height * 100 + '%'];\n }\n }\n // PENDING:\n // If labelLayout is enabled (test/label-layout.html), el.dataIndex should be specified.\n // But el.dataIndex is also used to determine whether user event should be triggered,\n // where el.seriesIndex or el.dataModel must be specified. At present for a single el\n // there is not case that \"only label layout enabled but user event disabled\", so here\n // we depends `resetEventTriggerForRegion` to do the job of setting `el.dataIndex`.\n el.disableLabelAnimation = true;\n } else {\n el.removeTextContent();\n el.removeTextConfig();\n el.disableLabelAnimation = null;\n }\n}\nfunction resetEventTriggerForRegion(viewBuildCtx, eventTrigger, regionName, regionModel, mapOrGeoModel,\n// Exist only if `viewBuildCtx.data` exists.\ndataIdx) {\n // setItemGraphicEl, setHoverStyle after all polygons and labels\n // are added to the regionGroup\n if (viewBuildCtx.data) {\n // FIXME: when series-map use a SVG map, and there are duplicated name specified\n // on different SVG elements, after `data.setItemGraphicEl(...)`:\n // (1) all of them will be mounted with `dataIndex`, `seriesIndex`, so that tooltip\n // can be triggered only mouse hover. That's correct.\n // (2) only the last element will be kept in `data`, so that if trigger tooltip\n // by `dispatchAction`, only the last one can be found and triggered. That might be\n // not correct. We will fix it in future if anyone demanding that.\n viewBuildCtx.data.setItemGraphicEl(dataIdx, eventTrigger);\n }\n // series-map will not trigger \"geoselectchange\" no matter it is\n // based on a declared geo component. Because series-map will\n // trigger \"selectchange\". If it trigger both the two events,\n // If users call `chart.dispatchAction({type: 'toggleSelect'})`,\n // it not easy to also fire event \"geoselectchanged\".\n else {\n // Package custom mouse event for geo component\n getECData(eventTrigger).eventData = {\n componentType: 'geo',\n componentIndex: mapOrGeoModel.componentIndex,\n geoIndex: mapOrGeoModel.componentIndex,\n name: regionName,\n region: regionModel && regionModel.option || {}\n };\n }\n}\nfunction resetTooltipForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) {\n if (!viewBuildCtx.data) {\n graphic.setTooltipConfig({\n el: el,\n componentModel: mapOrGeoModel,\n itemName: regionName,\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n itemTooltipOption: regionModel.get('tooltip')\n });\n }\n}\nfunction resetStateTriggerForRegion(viewBuildCtx, el, regionName, regionModel, mapOrGeoModel) {\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n el.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode');\n // @ts-ignore FIXME:TS fix the \"compatible with each other\"?\n var emphasisModel = regionModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n toggleHoverEmphasis(el, focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n if (viewBuildCtx.isGeo) {\n enableComponentHighDownFeatures(el, mapOrGeoModel, regionName);\n }\n return focus;\n}\nfunction projectPolys(rings,\n// Polygons include exterior and interiors. Or polylines.\ncreateStream, isLine) {\n var polygons = [];\n var curPoly;\n function startPolygon() {\n curPoly = [];\n }\n function endPolygon() {\n if (curPoly.length) {\n polygons.push(curPoly);\n curPoly = [];\n }\n }\n var stream = createStream({\n polygonStart: startPolygon,\n polygonEnd: endPolygon,\n lineStart: startPolygon,\n lineEnd: endPolygon,\n point: function (x, y) {\n // May have NaN values from stream.\n if (isFinite(x) && isFinite(y)) {\n curPoly.push([x, y]);\n }\n },\n sphere: function () {}\n });\n !isLine && stream.polygonStart();\n zrUtil.each(rings, function (ring) {\n stream.lineStart();\n for (var i = 0; i < ring.length; i++) {\n stream.point(ring[i][0], ring[i][1]);\n }\n stream.lineEnd();\n });\n !isLine && stream.polygonEnd();\n return polygons;\n}\nexport default MapDraw;\n// @ts-ignore FIXME:TS fix the \"compatible with each other\"?","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport MapDraw from '../../component/helper/MapDraw.js';\nimport ChartView from '../../view/Chart.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { setStatesFlag, Z2_EMPHASIS_LIFT } from '../../util/states.js';\nvar MapView = /** @class */function (_super) {\n __extends(MapView, _super);\n function MapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MapView.type;\n return _this;\n }\n MapView.prototype.render = function (mapModel, ecModel, api, payload) {\n // Not render if it is an toggleSelect action from self\n if (payload && payload.type === 'mapToggleSelect' && payload.from === this.uid) {\n return;\n }\n var group = this.group;\n group.removeAll();\n if (mapModel.getHostGeoModel()) {\n return;\n }\n if (this._mapDraw && payload && payload.type === 'geoRoam') {\n this._mapDraw.resetForLabelLayout();\n }\n // Not update map if it is an roam action from self\n if (!(payload && payload.type === 'geoRoam' && payload.componentType === 'series' && payload.seriesId === mapModel.id)) {\n if (mapModel.needsDrawMap) {\n var mapDraw = this._mapDraw || new MapDraw(api);\n group.add(mapDraw.group);\n mapDraw.draw(mapModel, ecModel, api, this, payload);\n this._mapDraw = mapDraw;\n } else {\n // Remove drawn map\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n }\n } else {\n var mapDraw = this._mapDraw;\n mapDraw && group.add(mapDraw.group);\n }\n mapModel.get('showLegendSymbol') && ecModel.getComponent('legend') && this._renderSymbols(mapModel, ecModel, api);\n };\n MapView.prototype.remove = function () {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n this.group.removeAll();\n };\n MapView.prototype.dispose = function () {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n };\n MapView.prototype._renderSymbols = function (mapModel, ecModel, api) {\n var originalData = mapModel.originalData;\n var group = this.group;\n originalData.each(originalData.mapDimension('value'), function (value, originalDataIndex) {\n if (isNaN(value)) {\n return;\n }\n var layout = originalData.getItemLayout(originalDataIndex);\n if (!layout || !layout.point) {\n // Not exists in map\n return;\n }\n var point = layout.point;\n var offset = layout.offset;\n var circle = new graphic.Circle({\n style: {\n // Because the special of map draw.\n // Which needs statistic of multiple series and draw on one map.\n // And each series also need a symbol with legend color\n //\n // Layout and visual are put one the different data\n // TODO\n fill: mapModel.getData().getVisual('style').fill\n },\n shape: {\n cx: point[0] + offset * 9,\n cy: point[1],\n r: 3\n },\n silent: true,\n // Do not overlap the first series, on which labels are displayed.\n z2: 8 + (!offset ? Z2_EMPHASIS_LIFT + 1 : 0)\n });\n // Only the series that has the first value on the same region is in charge of rendering the label.\n // But consider the case:\n // series: [\n // {id: 'X', type: 'map', map: 'm', {data: [{name: 'A', value: 11}, {name: 'B', {value: 22}]},\n // {id: 'Y', type: 'map', map: 'm', {data: [{name: 'A', value: 21}, {name: 'C', {value: 33}]}\n // ]\n // The offset `0` of item `A` is at series `X`, but of item `C` is at series `Y`.\n // For backward compatibility, we follow the rule that render label `A` by the\n // settings on series `X` but render label `C` by the settings on series `Y`.\n if (!offset) {\n var fullData = mapModel.mainSeries.getData();\n var name_1 = originalData.getName(originalDataIndex);\n var fullIndex_1 = fullData.indexOfName(name_1);\n var itemModel = originalData.getItemModel(originalDataIndex);\n var labelModel = itemModel.getModel('label');\n var regionGroup = fullData.getItemGraphicEl(fullIndex_1);\n // `getFormattedLabel` needs to use `getData` inside. Here\n // `mapModel.getData()` is shallow cloned from `mainSeries.getData()`.\n // FIXME\n // If this is not the `mainSeries`, the item model (like label formatter)\n // set on original data item will never get. But it has been working\n // like that from the beginning, and this scenario is rarely encountered.\n // So it won't be fixed until we have to.\n setLabelStyle(circle, getLabelStatesModels(itemModel), {\n labelFetcher: {\n getFormattedLabel: function (idx, state) {\n return mapModel.getFormattedLabel(fullIndex_1, state);\n }\n },\n defaultText: name_1\n });\n circle.disableLabelAnimation = true;\n if (!labelModel.get('position')) {\n circle.setTextConfig({\n position: 'bottom'\n });\n }\n regionGroup.onHoverStateChange = function (toState) {\n setStatesFlag(circle, toState);\n };\n }\n group.add(circle);\n });\n };\n MapView.type = 'map';\n return MapView;\n}(ChartView);\nexport default MapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport SeriesModel from '../../model/Series.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport { createSymbol } from '../../util/symbol.js';\nvar MapSeries = /** @class */function (_super) {\n __extends(MapSeries, _super);\n function MapSeries() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MapSeries.type;\n // Only first map series of same mapType will drawMap.\n _this.needsDrawMap = false;\n // Group of all map series with same mapType\n _this.seriesGroup = [];\n _this.getTooltipPosition = function (dataIndex) {\n if (dataIndex != null) {\n var name_1 = this.getData().getName(dataIndex);\n var geo = this.coordinateSystem;\n var region = geo.getRegion(name_1);\n return region && geo.dataToPoint(region.getCenter());\n }\n };\n return _this;\n }\n MapSeries.prototype.getInitialData = function (option) {\n var data = createSeriesDataSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n var dataNameMap = zrUtil.createHashMap();\n var toAppendNames = [];\n for (var i = 0, len = data.count(); i < len; i++) {\n var name_2 = data.getName(i);\n dataNameMap.set(name_2, true);\n }\n var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);\n zrUtil.each(geoSource.regions, function (region) {\n var name = region.name;\n if (!dataNameMap.get(name)) {\n toAppendNames.push(name);\n }\n });\n // Complete data with missing regions. The consequent processes (like visual\n // map and render) can not be performed without a \"full data\". For example,\n // find `dataIndex` by name.\n data.appendValues([], toAppendNames);\n return data;\n };\n /**\n * If no host geo model, return null, which means using a\n * inner exclusive geo model.\n */\n MapSeries.prototype.getHostGeoModel = function () {\n var geoIndex = this.option.geoIndex;\n return geoIndex != null ? this.ecModel.getComponent('geo', geoIndex) : null;\n };\n MapSeries.prototype.getMapType = function () {\n return (this.getHostGeoModel() || this).option.map;\n };\n // _fillOption(option, mapName) {\n // Shallow clone\n // option = zrUtil.extend({}, option);\n // option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap);\n // return option;\n // }\n MapSeries.prototype.getRawValue = function (dataIndex) {\n // Use value stored in data instead because it is calculated from multiple series\n // FIXME Provide all value of multiple series ?\n var data = this.getData();\n return data.get(data.mapDimension('value'), dataIndex);\n };\n /**\n * Get model of region\n */\n MapSeries.prototype.getRegionModel = function (regionName) {\n var data = this.getData();\n return data.getItemModel(data.indexOfName(regionName));\n };\n /**\n * Map tooltip formatter\n */\n MapSeries.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n // FIXME orignalData and data is a bit confusing\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var name = data.getName(dataIndex);\n var seriesGroup = this.seriesGroup;\n var seriesNames = [];\n for (var i = 0; i < seriesGroup.length; i++) {\n var otherIndex = seriesGroup[i].originalData.indexOfName(name);\n var valueDim = data.mapDimension('value');\n if (!isNaN(seriesGroup[i].originalData.get(valueDim, otherIndex))) {\n seriesNames.push(seriesGroup[i].name);\n }\n }\n return createTooltipMarkup('section', {\n header: seriesNames.join(', '),\n noHeader: !seriesNames.length,\n blocks: [createTooltipMarkup('nameValue', {\n name: name,\n value: value\n })]\n });\n };\n MapSeries.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n MapSeries.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n MapSeries.prototype.getLegendIcon = function (opt) {\n var iconType = opt.icon || 'roundRect';\n var icon = createSymbol(iconType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill);\n icon.setStyle(opt.itemStyle);\n // Map do not use itemStyle.borderWidth as border width\n icon.style.stroke = 'none';\n // No rotation because no series visual symbol for map\n if (iconType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = '#fff';\n icon.style.lineWidth = 2;\n }\n return icon;\n };\n MapSeries.type = 'series.map';\n MapSeries.dependencies = ['geo'];\n MapSeries.layoutMode = 'box';\n MapSeries.defaultOption = {\n // 一级层叠\n // zlevel: 0,\n // 二级层叠\n z: 2,\n coordinateSystem: 'geo',\n // map should be explicitly specified since ec3.\n map: '',\n // If `geoIndex` is not specified, a exclusive geo will be\n // created. Otherwise use the specified geo component, and\n // `map` and `mapType` are ignored.\n // geoIndex: 0,\n // 'center' | 'left' | 'right' | 'x%' | {number}\n left: 'center',\n // 'center' | 'top' | 'bottom' | 'x%' | {number}\n top: 'center',\n // right\n // bottom\n // width:\n // height\n // Aspect is width / height. Inited to be geoJson bbox aspect\n // This parameter is used for scale this aspect\n // Default value:\n // for geoSVG source: 1,\n // for geoJSON source: 0.75.\n aspectScale: null,\n // Layout with center and size\n // If you want to put map in a fixed size box with right aspect ratio\n // This two properties may be more convenient.\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n showLegendSymbol: true,\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ],\n // higher priority than center and zoom\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n selectedMode: true,\n label: {\n show: false,\n color: '#000'\n },\n // scaleLimit: null,\n itemStyle: {\n borderWidth: 0.5,\n borderColor: '#444',\n areaColor: '#eee'\n },\n emphasis: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n areaColor: 'rgba(255,215,0,0.8)'\n }\n },\n select: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n color: 'rgba(255,215,0,0.8)'\n }\n },\n nameProperty: 'name'\n };\n return MapSeries;\n}(SeriesModel);\nexport default MapSeries;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\n// FIXME 公用?\nfunction dataStatistics(datas, statisticType) {\n var dataNameMap = {};\n zrUtil.each(datas, function (data) {\n data.each(data.mapDimension('value'), function (value, idx) {\n // Add prefix to avoid conflict with Object.prototype.\n var mapKey = 'ec-' + data.getName(idx);\n dataNameMap[mapKey] = dataNameMap[mapKey] || [];\n if (!isNaN(value)) {\n dataNameMap[mapKey].push(value);\n }\n });\n });\n return datas[0].map(datas[0].mapDimension('value'), function (value, idx) {\n var mapKey = 'ec-' + datas[0].getName(idx);\n var sum = 0;\n var min = Infinity;\n var max = -Infinity;\n var len = dataNameMap[mapKey].length;\n for (var i = 0; i < len; i++) {\n min = Math.min(min, dataNameMap[mapKey][i]);\n max = Math.max(max, dataNameMap[mapKey][i]);\n sum += dataNameMap[mapKey][i];\n }\n var result;\n if (statisticType === 'min') {\n result = min;\n } else if (statisticType === 'max') {\n result = max;\n } else if (statisticType === 'average') {\n result = sum / len;\n } else {\n result = sum;\n }\n return len === 0 ? NaN : result;\n });\n}\nexport default function mapDataStatistic(ecModel) {\n var seriesGroups = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n var hostGeoModel = seriesModel.getHostGeoModel();\n var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType();\n (seriesGroups[key] = seriesGroups[key] || []).push(seriesModel);\n });\n zrUtil.each(seriesGroups, function (seriesList, key) {\n var data = dataStatistics(zrUtil.map(seriesList, function (seriesModel) {\n return seriesModel.getData();\n }), seriesList[0].get('mapValueCalculation'));\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].originalData = seriesList[i].getData();\n }\n // FIXME Put where?\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].seriesGroup = seriesList;\n seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel();\n seriesList[i].setData(data.cloneShallow());\n seriesList[i].mainSeries = seriesList[0];\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function mapSymbolLayout(ecModel) {\n var processedMapType = {};\n ecModel.eachSeriesByType('map', function (mapSeries) {\n var mapType = mapSeries.getMapType();\n if (mapSeries.getHostGeoModel() || processedMapType[mapType]) {\n return;\n }\n var mapSymbolOffsets = {};\n zrUtil.each(mapSeries.seriesGroup, function (subMapSeries) {\n var geo = subMapSeries.coordinateSystem;\n var data = subMapSeries.originalData;\n if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) {\n data.each(data.mapDimension('value'), function (value, idx) {\n var name = data.getName(idx);\n var region = geo.getRegion(name);\n // If input series.data is [11, 22, '-'/null/undefined, 44],\n // it will be filled with NaN: [11, 22, NaN, 44] and NaN will\n // not be drawn. So here must validate if value is NaN.\n if (!region || isNaN(value)) {\n return;\n }\n var offset = mapSymbolOffsets[name] || 0;\n var point = geo.dataToPoint(region.getCenter());\n mapSymbolOffsets[name] = offset + 1;\n data.setItemLayout(idx, {\n point: point,\n offset: offset\n });\n });\n }\n });\n // Show label of those region not has legendIcon (which is offset 0)\n var data = mapSeries.getData();\n data.each(function (idx) {\n var name = data.getName(idx);\n var layout = data.getItemLayout(idx) || {};\n layout.showLabel = !mapSymbolOffsets[name];\n data.setItemLayout(idx, layout);\n });\n processedMapType[mapType] = true;\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Simple view coordinate system\n * Mapping given x, y to transformd view x, y\n */\nimport * as vector from 'zrender/lib/core/vector.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport Transformable from 'zrender/lib/core/Transformable.js';\nimport { parsePercent } from '../util/number.js';\nvar v2ApplyTransform = vector.applyTransform;\nvar View = /** @class */function (_super) {\n __extends(View, _super);\n function View(name) {\n var _this = _super.call(this) || this;\n _this.type = 'view';\n _this.dimensions = ['x', 'y'];\n /**\n * Represents the transform brought by roam/zoom.\n * If `View['_viewRect']` applies roam transform,\n * we can get the final displayed rect.\n */\n _this._roamTransformable = new Transformable();\n /**\n * Represents the transform from `View['_rect']` to `View['_viewRect']`.\n */\n _this._rawTransformable = new Transformable();\n _this.name = name;\n return _this;\n }\n View.prototype.setBoundingRect = function (x, y, width, height) {\n this._rect = new BoundingRect(x, y, width, height);\n return this._rect;\n };\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n View.prototype.getBoundingRect = function () {\n return this._rect;\n };\n View.prototype.setViewRect = function (x, y, width, height) {\n this._transformTo(x, y, width, height);\n this._viewRect = new BoundingRect(x, y, width, height);\n };\n /**\n * Transformed to particular position and size\n */\n View.prototype._transformTo = function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var rawTransform = this._rawTransformable;\n rawTransform.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n var rawParent = rawTransform.parent;\n rawTransform.parent = null;\n rawTransform.decomposeTransform();\n rawTransform.parent = rawParent;\n this._updateTransform();\n };\n /**\n * Set center of view\n */\n View.prototype.setCenter = function (centerCoord, api) {\n if (!centerCoord) {\n return;\n }\n this._center = [parsePercent(centerCoord[0], api.getWidth()), parsePercent(centerCoord[1], api.getHeight())];\n this._updateCenterAndZoom();\n };\n View.prototype.setZoom = function (zoom) {\n zoom = zoom || 1;\n var zoomLimit = this.zoomLimit;\n if (zoomLimit) {\n if (zoomLimit.max != null) {\n zoom = Math.min(zoomLimit.max, zoom);\n }\n if (zoomLimit.min != null) {\n zoom = Math.max(zoomLimit.min, zoom);\n }\n }\n this._zoom = zoom;\n this._updateCenterAndZoom();\n };\n /**\n * Get default center without roam\n */\n View.prototype.getDefaultCenter = function () {\n // Rect before any transform\n var rawRect = this.getBoundingRect();\n var cx = rawRect.x + rawRect.width / 2;\n var cy = rawRect.y + rawRect.height / 2;\n return [cx, cy];\n };\n View.prototype.getCenter = function () {\n return this._center || this.getDefaultCenter();\n };\n View.prototype.getZoom = function () {\n return this._zoom || 1;\n };\n View.prototype.getRoamTransform = function () {\n return this._roamTransformable.getLocalTransform();\n };\n /**\n * Remove roam\n */\n View.prototype._updateCenterAndZoom = function () {\n // Must update after view transform updated\n var rawTransformMatrix = this._rawTransformable.getLocalTransform();\n var roamTransform = this._roamTransformable;\n var defaultCenter = this.getDefaultCenter();\n var center = this.getCenter();\n var zoom = this.getZoom();\n center = vector.applyTransform([], center, rawTransformMatrix);\n defaultCenter = vector.applyTransform([], defaultCenter, rawTransformMatrix);\n roamTransform.originX = center[0];\n roamTransform.originY = center[1];\n roamTransform.x = defaultCenter[0] - center[0];\n roamTransform.y = defaultCenter[1] - center[1];\n roamTransform.scaleX = roamTransform.scaleY = zoom;\n this._updateTransform();\n };\n /**\n * Update transform props on `this` based on the current\n * `this._roamTransformable` and `this._rawTransformable`.\n */\n View.prototype._updateTransform = function () {\n var roamTransformable = this._roamTransformable;\n var rawTransformable = this._rawTransformable;\n rawTransformable.parent = roamTransformable;\n roamTransformable.updateTransform();\n rawTransformable.updateTransform();\n matrix.copy(this.transform || (this.transform = []), rawTransformable.transform || matrix.create());\n this._rawTransform = rawTransformable.getLocalTransform();\n this.invTransform = this.invTransform || [];\n matrix.invert(this.invTransform, this.transform);\n this.decomposeTransform();\n };\n View.prototype.getTransformInfo = function () {\n var rawTransformable = this._rawTransformable;\n var roamTransformable = this._roamTransformable;\n // Because roamTransformabel has `originX/originY` modified,\n // but the caller of `getTransformInfo` can not handle `originX/originY`,\n // so need to recalculate them.\n var dummyTransformable = new Transformable();\n dummyTransformable.transform = roamTransformable.transform;\n dummyTransformable.decomposeTransform();\n return {\n roam: {\n x: dummyTransformable.x,\n y: dummyTransformable.y,\n scaleX: dummyTransformable.scaleX,\n scaleY: dummyTransformable.scaleY\n },\n raw: {\n x: rawTransformable.x,\n y: rawTransformable.y,\n scaleX: rawTransformable.scaleX,\n scaleY: rawTransformable.scaleY\n }\n };\n };\n View.prototype.getViewRect = function () {\n return this._viewRect;\n };\n /**\n * Get view rect after roam transform\n */\n View.prototype.getViewRectAfterRoam = function () {\n var rect = this.getBoundingRect().clone();\n rect.applyTransform(this.transform);\n return rect;\n };\n /**\n * Convert a single (lon, lat) data item to (x, y) point.\n */\n View.prototype.dataToPoint = function (data, noRoam, out) {\n var transform = noRoam ? this._rawTransform : this.transform;\n out = out || [];\n return transform ? v2ApplyTransform(out, data, transform) : vector.copy(out, data);\n };\n /**\n * Convert a (x, y) point to (lon, lat) data\n */\n View.prototype.pointToData = function (point) {\n var invTransform = this.invTransform;\n return invTransform ? v2ApplyTransform([], point, invTransform) : [point[0], point[1]];\n };\n View.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n View.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n /**\n * @implements\n */\n View.prototype.containPoint = function (point) {\n return this.getViewRectAfterRoam().contain(point[0], point[1]);\n };\n View.dimensions = ['x', 'y'];\n return View;\n}(Transformable);\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n return seriesModel ? seriesModel.coordinateSystem : null; // e.g., graph.\n}\n\nexport default View;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport View from '../View.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nimport { warn } from '../../util/log.js';\nvar GEO_DEFAULT_PARAMS = {\n 'geoJSON': {\n aspectScale: 0.75,\n invertLongitute: true\n },\n 'geoSVG': {\n aspectScale: 1,\n invertLongitute: false\n }\n};\nexport var geo2DDimensions = ['lng', 'lat'];\nvar Geo = /** @class */function (_super) {\n __extends(Geo, _super);\n function Geo(name, map, opt) {\n var _this = _super.call(this, name) || this;\n _this.dimensions = geo2DDimensions;\n _this.type = 'geo';\n // Only store specified name coord via `addGeoCoord`.\n _this._nameCoordMap = zrUtil.createHashMap();\n _this.map = map;\n var projection = opt.projection;\n var source = geoSourceManager.load(map, opt.nameMap, opt.nameProperty);\n var resource = geoSourceManager.getGeoResource(map);\n var resourceType = _this.resourceType = resource ? resource.type : null;\n var regions = _this.regions = source.regions;\n var defaultParams = GEO_DEFAULT_PARAMS[resource.type];\n _this._regionsMap = source.regionsMap;\n _this.regions = source.regions;\n if (process.env.NODE_ENV !== 'production' && projection) {\n // Do some check\n if (resourceType === 'geoSVG') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Map \" + map + \" with SVG source can't use projection. Only GeoJSON source supports projection.\");\n }\n projection = null;\n }\n if (!(projection.project && projection.unproject)) {\n if (process.env.NODE_ENV !== 'production') {\n warn('project and unproject must be both provided in the projeciton.');\n }\n projection = null;\n }\n }\n _this.projection = projection;\n var boundingRect;\n if (projection) {\n // Can't reuse the raw bounding rect\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect(projection);\n boundingRect = boundingRect || regionRect.clone();\n boundingRect.union(regionRect);\n }\n } else {\n boundingRect = source.boundingRect;\n }\n _this.setBoundingRect(boundingRect.x, boundingRect.y, boundingRect.width, boundingRect.height);\n // aspectScale and invertLongitute actually is the parameters default raw projection.\n // So we ignore them if projection is given.\n // Ignore default aspect scale if projection exits.\n _this.aspectScale = projection ? 1 : zrUtil.retrieve2(opt.aspectScale, defaultParams.aspectScale);\n // Not invert longitude if projection exits.\n _this._invertLongitute = projection ? false : defaultParams.invertLongitute;\n return _this;\n }\n Geo.prototype._transformTo = function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var invertLongitute = this._invertLongitute;\n rect = rect.clone();\n if (invertLongitute) {\n // Longitude is inverted.\n rect.y = -rect.y - rect.height;\n }\n var rawTransformable = this._rawTransformable;\n rawTransformable.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n var rawParent = rawTransformable.parent;\n rawTransformable.parent = null;\n rawTransformable.decomposeTransform();\n rawTransformable.parent = rawParent;\n if (invertLongitute) {\n rawTransformable.scaleY = -rawTransformable.scaleY;\n }\n this._updateTransform();\n };\n Geo.prototype.getRegion = function (name) {\n return this._regionsMap.get(name);\n };\n Geo.prototype.getRegionByCoord = function (coord) {\n var regions = this.regions;\n for (var i = 0; i < regions.length; i++) {\n var region = regions[i];\n if (region.type === 'geoJSON' && region.contain(coord)) {\n return regions[i];\n }\n }\n };\n /**\n * Add geoCoord for indexing by name\n */\n Geo.prototype.addGeoCoord = function (name, geoCoord) {\n this._nameCoordMap.set(name, geoCoord);\n };\n /**\n * Get geoCoord by name\n */\n Geo.prototype.getGeoCoord = function (name) {\n var region = this._regionsMap.get(name);\n // Calculate center only on demand.\n return this._nameCoordMap.get(name) || region && region.getCenter();\n };\n Geo.prototype.dataToPoint = function (data, noRoam, out) {\n if (zrUtil.isString(data)) {\n // Map area name to geoCoord\n data = this.getGeoCoord(data);\n }\n if (data) {\n var projection = this.projection;\n if (projection) {\n // projection may return null point.\n data = projection.project(data);\n }\n return data && this.projectedToPoint(data, noRoam, out);\n }\n };\n Geo.prototype.pointToData = function (point) {\n var projection = this.projection;\n if (projection) {\n // projection may return null point.\n point = projection.unproject(point);\n }\n return point && this.pointToProjected(point);\n };\n /**\n * Point to projected data. Same with pointToData when projection is used.\n */\n Geo.prototype.pointToProjected = function (point) {\n return _super.prototype.pointToData.call(this, point);\n };\n Geo.prototype.projectedToPoint = function (projected, noRoam, out) {\n return _super.prototype.dataToPoint.call(this, projected, noRoam, out);\n };\n Geo.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n Geo.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n return Geo;\n}(View);\n;\nzrUtil.mixin(Geo, View);\nfunction getCoordSys(finder) {\n var geoModel = finder.geoModel;\n var seriesModel = finder.seriesModel;\n return geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map series.\n || (seriesModel.getReferringComponents('geo', SINGLE_REFERRING).models[0] || {}).coordinateSystem : null;\n}\nexport default Geo;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Geo, { geo2DDimensions } from './Geo.js';\nimport * as layout from '../../util/layout.js';\nimport * as numberUtil from '../../util/number.js';\nimport geoSourceManager from './geoSourceManager.js';\nimport * as vector from 'zrender/lib/core/vector.js';\n/**\n * Resize method bound to the geo\n */\nfunction resizeGeo(geoModel, api) {\n var boundingCoords = geoModel.get('boundingCoords');\n if (boundingCoords != null) {\n var leftTop_1 = boundingCoords[0];\n var rightBottom_1 = boundingCoords[1];\n if (!(isFinite(leftTop_1[0]) && isFinite(leftTop_1[1]) && isFinite(rightBottom_1[0]) && isFinite(rightBottom_1[1]))) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Invalid boundingCoords');\n }\n } else {\n // Sample around the lng/lat rect and use projection to calculate actual bounding rect.\n var projection_1 = this.projection;\n if (projection_1) {\n var xMin = leftTop_1[0];\n var yMin = leftTop_1[1];\n var xMax = rightBottom_1[0];\n var yMax = rightBottom_1[1];\n leftTop_1 = [Infinity, Infinity];\n rightBottom_1 = [-Infinity, -Infinity];\n // TODO better way?\n var sampleLine = function (x0, y0, x1, y1) {\n var dx = x1 - x0;\n var dy = y1 - y0;\n for (var i = 0; i <= 100; i++) {\n var p = i / 100;\n var pt = projection_1.project([x0 + dx * p, y0 + dy * p]);\n vector.min(leftTop_1, leftTop_1, pt);\n vector.max(rightBottom_1, rightBottom_1, pt);\n }\n };\n // Top\n sampleLine(xMin, yMin, xMax, yMin);\n // Right\n sampleLine(xMax, yMin, xMax, yMax);\n // Bottom\n sampleLine(xMax, yMax, xMin, yMax);\n // Left\n sampleLine(xMin, yMax, xMax, yMin);\n }\n this.setBoundingRect(leftTop_1[0], leftTop_1[1], rightBottom_1[0] - leftTop_1[0], rightBottom_1[1] - leftTop_1[1]);\n }\n }\n var rect = this.getBoundingRect();\n var centerOption = geoModel.get('layoutCenter');\n var sizeOption = geoModel.get('layoutSize');\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n var aspect = rect.width / rect.height * this.aspectScale;\n var useCenterAndSize = false;\n var center;\n var size;\n if (centerOption && sizeOption) {\n center = [numberUtil.parsePercent(centerOption[0], viewWidth), numberUtil.parsePercent(centerOption[1], viewHeight)];\n size = numberUtil.parsePercent(sizeOption, Math.min(viewWidth, viewHeight));\n if (!isNaN(center[0]) && !isNaN(center[1]) && !isNaN(size)) {\n useCenterAndSize = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.');\n }\n }\n }\n var viewRect;\n if (useCenterAndSize) {\n viewRect = {};\n if (aspect > 1) {\n // Width is same with size\n viewRect.width = size;\n viewRect.height = size / aspect;\n } else {\n viewRect.height = size;\n viewRect.width = size * aspect;\n }\n viewRect.y = center[1] - viewRect.height / 2;\n viewRect.x = center[0] - viewRect.width / 2;\n } else {\n // Use left/top/width/height\n var boxLayoutOption = geoModel.getBoxLayoutParams();\n boxLayoutOption.aspect = aspect;\n viewRect = layout.getLayoutRect(boxLayoutOption, {\n width: viewWidth,\n height: viewHeight\n });\n }\n this.setViewRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);\n this.setCenter(geoModel.get('center'), api);\n this.setZoom(geoModel.get('zoom'));\n}\n// Back compat for ECharts2, where the coord map is set on map series:\n// {type: 'map', geoCoord: {'cityA': [116.46,39.92], 'cityA': [119.12,24.61]}},\nfunction setGeoCoords(geo, model) {\n zrUtil.each(model.get('geoCoord'), function (geoCoord, name) {\n geo.addGeoCoord(name, geoCoord);\n });\n}\nvar GeoCreator = /** @class */function () {\n function GeoCreator() {\n // For deciding which dimensions to use when creating list data\n this.dimensions = geo2DDimensions;\n }\n GeoCreator.prototype.create = function (ecModel, api) {\n var geoList = [];\n function getCommonGeoProperties(model) {\n return {\n nameProperty: model.get('nameProperty'),\n aspectScale: model.get('aspectScale'),\n projection: model.get('projection')\n };\n }\n // FIXME Create each time may be slow\n ecModel.eachComponent('geo', function (geoModel, idx) {\n var mapName = geoModel.get('map');\n var geo = new Geo(mapName + idx, mapName, zrUtil.extend({\n nameMap: geoModel.get('nameMap')\n }, getCommonGeoProperties(geoModel)));\n geo.zoomLimit = geoModel.get('scaleLimit');\n geoList.push(geo);\n // setGeoCoords(geo, geoModel);\n geoModel.coordinateSystem = geo;\n geo.model = geoModel;\n // Inject resize method\n geo.resize = resizeGeo;\n geo.resize(geoModel, api);\n });\n ecModel.eachSeries(function (seriesModel) {\n var coordSys = seriesModel.get('coordinateSystem');\n if (coordSys === 'geo') {\n var geoIndex = seriesModel.get('geoIndex') || 0;\n seriesModel.coordinateSystem = geoList[geoIndex];\n }\n });\n // If has map series\n var mapModelGroupBySeries = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n if (!seriesModel.getHostGeoModel()) {\n var mapType = seriesModel.getMapType();\n mapModelGroupBySeries[mapType] = mapModelGroupBySeries[mapType] || [];\n mapModelGroupBySeries[mapType].push(seriesModel);\n }\n });\n zrUtil.each(mapModelGroupBySeries, function (mapSeries, mapType) {\n var nameMapList = zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('nameMap');\n });\n var geo = new Geo(mapType, mapType, zrUtil.extend({\n nameMap: zrUtil.mergeAll(nameMapList)\n }, getCommonGeoProperties(mapSeries[0])));\n geo.zoomLimit = zrUtil.retrieve.apply(null, zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('scaleLimit');\n }));\n geoList.push(geo);\n // Inject resize method\n geo.resize = resizeGeo;\n geo.resize(mapSeries[0], api);\n zrUtil.each(mapSeries, function (singleMapSeries) {\n singleMapSeries.coordinateSystem = geo;\n setGeoCoords(geo, singleMapSeries);\n });\n });\n return geoList;\n };\n /**\n * Fill given regions array\n */\n GeoCreator.prototype.getFilledRegions = function (originRegionArr, mapName, nameMap, nameProperty) {\n // Not use the original\n var regionsArr = (originRegionArr || []).slice();\n var dataNameMap = zrUtil.createHashMap();\n for (var i = 0; i < regionsArr.length; i++) {\n dataNameMap.set(regionsArr[i].name, regionsArr[i]);\n }\n var source = geoSourceManager.load(mapName, nameMap, nameProperty);\n zrUtil.each(source.regions, function (region) {\n var name = region.name;\n !dataNameMap.get(name) && regionsArr.push({\n name: name\n });\n });\n return regionsArr;\n };\n return GeoCreator;\n}();\nvar geoCreator = new GeoCreator();\nexport default geoCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nimport Model from '../../model/Model.js';\nimport geoCreator from './geoCreator.js';\nimport geoSourceManager from './geoSourceManager.js';\n;\nvar GeoModel = /** @class */function (_super) {\n __extends(GeoModel, _super);\n function GeoModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GeoModel.type;\n return _this;\n }\n GeoModel.prototype.init = function (option, parentModel, ecModel) {\n var source = geoSourceManager.getGeoResource(option.map);\n if (source && source.type === 'geoJSON') {\n var itemStyle = option.itemStyle = option.itemStyle || {};\n if (!('color' in itemStyle)) {\n itemStyle.color = '#eee';\n }\n }\n this.mergeDefaultAndTheme(option, ecModel);\n // Default label emphasis `show`\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n };\n GeoModel.prototype.optionUpdated = function () {\n var _this = this;\n var option = this.option;\n option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap, option.nameProperty);\n var selectedMap = {};\n this._optionModelMap = zrUtil.reduce(option.regions || [], function (optionModelMap, regionOpt) {\n var regionName = regionOpt.name;\n if (regionName) {\n optionModelMap.set(regionName, new Model(regionOpt, _this, _this.ecModel));\n if (regionOpt.selected) {\n selectedMap[regionName] = true;\n }\n }\n return optionModelMap;\n }, zrUtil.createHashMap());\n if (!option.selectedMap) {\n option.selectedMap = selectedMap;\n }\n };\n /**\n * Get model of region.\n */\n GeoModel.prototype.getRegionModel = function (name) {\n return this._optionModelMap.get(name) || new Model(null, this, this.ecModel);\n };\n /**\n * Format label\n * @param name Region name\n */\n GeoModel.prototype.getFormattedLabel = function (name, status) {\n var regionModel = this.getRegionModel(name);\n var formatter = status === 'normal' ? regionModel.get(['label', 'formatter']) : regionModel.get(['emphasis', 'label', 'formatter']);\n var params = {\n name: name\n };\n if (zrUtil.isFunction(formatter)) {\n params.status = status;\n return formatter(params);\n } else if (zrUtil.isString(formatter)) {\n return formatter.replace('{a}', name != null ? name : '');\n }\n };\n GeoModel.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n GeoModel.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n // PENGING If selectedMode is null ?\n GeoModel.prototype.select = function (name) {\n var option = this.option;\n var selectedMode = option.selectedMode;\n if (!selectedMode) {\n return;\n }\n if (selectedMode !== 'multiple') {\n option.selectedMap = null;\n }\n var selectedMap = option.selectedMap || (option.selectedMap = {});\n selectedMap[name] = true;\n };\n GeoModel.prototype.unSelect = function (name) {\n var selectedMap = this.option.selectedMap;\n if (selectedMap) {\n selectedMap[name] = false;\n }\n };\n GeoModel.prototype.toggleSelected = function (name) {\n this[this.isSelected(name) ? 'unSelect' : 'select'](name);\n };\n GeoModel.prototype.isSelected = function (name) {\n var selectedMap = this.option.selectedMap;\n return !!(selectedMap && selectedMap[name]);\n };\n GeoModel.type = 'geo';\n GeoModel.layoutMode = 'box';\n GeoModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n show: true,\n left: 'center',\n top: 'center',\n // Default value:\n // for geoSVG source: 1,\n // for geoJSON source: 0.75.\n aspectScale: null,\n // /// Layout with center and size\n // If you want to put map in a fixed size box with right aspect ratio\n // This two properties may be more convenient\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n silent: false,\n // Map type\n map: '',\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ]\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n // selectedMode: false\n label: {\n show: false,\n color: '#000'\n },\n itemStyle: {\n borderWidth: 0.5,\n borderColor: '#444'\n // Default color:\n // + geoJSON: #eee\n // + geoSVG: null (use SVG original `fill`)\n // color: '#eee'\n },\n\n emphasis: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n color: 'rgba(255,215,0,0.8)'\n }\n },\n select: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n color: 'rgba(255,215,0,0.8)'\n }\n },\n regions: []\n // tooltip: {\n // show: false\n // }\n };\n\n return GeoModel;\n}(ComponentModel);\nexport default GeoModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction getCenterCoord(view, point) {\n // Use projected coord as center because it's linear.\n return view.pointToProjected ? view.pointToProjected(point) : view.pointToData(point);\n}\nexport function updateCenterAndZoom(view, payload, zoomLimit, api) {\n var previousZoom = view.getZoom();\n var center = view.getCenter();\n var zoom = payload.zoom;\n var point = view.projectedToPoint ? view.projectedToPoint(center) : view.dataToPoint(center);\n if (payload.dx != null && payload.dy != null) {\n point[0] -= payload.dx;\n point[1] -= payload.dy;\n view.setCenter(getCenterCoord(view, point), api);\n }\n if (zoom != null) {\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom;\n }\n // Zoom on given point(originX, originY)\n view.scaleX *= zoom;\n view.scaleY *= zoom;\n var fixX = (payload.originX - view.x) * (zoom - 1);\n var fixY = (payload.originY - view.y) * (zoom - 1);\n view.x -= fixX;\n view.y -= fixY;\n view.updateTransform();\n // Get the new center\n view.setCenter(getCenterCoord(view, point), api);\n view.setZoom(zoom * previousZoom);\n }\n return {\n center: view.getCenter(),\n zoom: view.getZoom()\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MapDraw from '../helper/MapDraw.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { findEventDispatcher } from '../../util/event.js';\nvar GeoView = /** @class */function (_super) {\n __extends(GeoView, _super);\n function GeoView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GeoView.type;\n _this.focusBlurEnabled = true;\n return _this;\n }\n GeoView.prototype.init = function (ecModel, api) {\n this._api = api;\n };\n GeoView.prototype.render = function (geoModel, ecModel, api, payload) {\n this._model = geoModel;\n if (!geoModel.get('show')) {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n return;\n }\n if (!this._mapDraw) {\n this._mapDraw = new MapDraw(api);\n }\n var mapDraw = this._mapDraw;\n mapDraw.draw(geoModel, ecModel, api, this, payload);\n mapDraw.group.on('click', this._handleRegionClick, this);\n mapDraw.group.silent = geoModel.get('silent');\n this.group.add(mapDraw.group);\n this.updateSelectStatus(geoModel, ecModel, api);\n };\n GeoView.prototype._handleRegionClick = function (e) {\n var eventData;\n findEventDispatcher(e.target, function (current) {\n return (eventData = getECData(current).eventData) != null;\n }, true);\n if (eventData) {\n this._api.dispatchAction({\n type: 'geoToggleSelect',\n geoId: this._model.id,\n name: eventData.name\n });\n }\n };\n GeoView.prototype.updateSelectStatus = function (model, ecModel, api) {\n var _this = this;\n this._mapDraw.group.traverse(function (node) {\n var eventData = getECData(node).eventData;\n if (eventData) {\n _this._model.isSelected(eventData.name) ? api.enterSelect(node) : api.leaveSelect(node);\n // No need to traverse children.\n return true;\n }\n });\n };\n GeoView.prototype.findHighDownDispatchers = function (name) {\n return this._mapDraw && this._mapDraw.findHighDownDispatchers(name, this._model);\n };\n GeoView.prototype.dispose = function () {\n this._mapDraw && this._mapDraw.remove();\n };\n GeoView.type = 'geo';\n return GeoView;\n}(ComponentView);\nexport default GeoView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport GeoModel from '../../coord/geo/GeoModel.js';\nimport geoCreator from '../../coord/geo/geoCreator.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport { updateCenterAndZoom } from '../../action/roamHelper.js';\nimport GeoView from './GeoView.js';\nimport geoSourceManager from '../../coord/geo/geoSourceManager.js';\nfunction registerMap(mapName, geoJson, specialAreas) {\n geoSourceManager.registerMap(mapName, geoJson, specialAreas);\n}\nexport function install(registers) {\n registers.registerCoordinateSystem('geo', geoCreator);\n registers.registerComponentModel(GeoModel);\n registers.registerComponentView(GeoView);\n registers.registerImpl('registerMap', registerMap);\n registers.registerImpl('getMap', function (mapName) {\n return geoSourceManager.getMapForUser(mapName);\n });\n function makeAction(method, actionInfo) {\n actionInfo.update = 'geo:updateSelectStatus';\n registers.registerAction(actionInfo, function (payload, ecModel) {\n var selected = {};\n var allSelected = [];\n ecModel.eachComponent({\n mainType: 'geo',\n query: payload\n }, function (geoModel) {\n geoModel[method](payload.name);\n var geo = geoModel.coordinateSystem;\n each(geo.regions, function (region) {\n selected[region.name] = geoModel.isSelected(region.name) || false;\n });\n // Notice: there might be duplicated name in different regions.\n var names = [];\n each(selected, function (v, name) {\n selected[name] && names.push(name);\n });\n allSelected.push({\n geoIndex: geoModel.componentIndex,\n // Use singular, the same naming convention as the event `selectchanged`.\n name: names\n });\n });\n return {\n selected: selected,\n allSelected: allSelected,\n name: payload.name\n };\n });\n }\n makeAction('toggleSelected', {\n type: 'geoToggleSelect',\n event: 'geoselectchanged'\n });\n makeAction('select', {\n type: 'geoSelect',\n event: 'geoselected'\n });\n makeAction('unSelect', {\n type: 'geoUnSelect',\n event: 'geounselected'\n });\n /**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n registers.registerAction({\n type: 'geoRoam',\n event: 'geoRoam',\n update: 'updateTransform'\n }, function (payload, ecModel, api) {\n var componentType = payload.componentType || 'series';\n ecModel.eachComponent({\n mainType: componentType,\n query: payload\n }, function (componentModel) {\n var geo = componentModel.coordinateSystem;\n if (geo.type !== 'geo') {\n return;\n }\n var res = updateCenterAndZoom(geo, payload, componentModel.get('scaleLimit'), api);\n componentModel.setCenter && componentModel.setCenter(res.center);\n componentModel.setZoom && componentModel.setZoom(res.zoom);\n // All map series with same `map` use the same geo coordinate system\n // So the center and zoom must be in sync. Include the series not selected by legend\n if (componentType === 'series') {\n each(componentModel.seriesGroup, function (seriesModel) {\n seriesModel.setCenter(res.center);\n seriesModel.setZoom(res.zoom);\n });\n }\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport MapView from './MapView.js';\nimport MapSeries from './MapSeries.js';\nimport mapDataStatistic from './mapDataStatistic.js';\nimport mapSymbolLayout from './mapSymbolLayout.js';\nimport { createLegacyDataSelectAction } from '../../legacy/dataSelectAction.js';\nimport { install as installGeo } from '../../component/geo/install.js';\nexport function install(registers) {\n use(installGeo);\n registers.registerChartView(MapView);\n registers.registerSeriesModel(MapSeries);\n registers.registerLayout(mapSymbolLayout);\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, mapDataStatistic);\n createLegacyDataSelectAction('map', registers.registerAction);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/*\n* A third-party license is embedded for some of the code in this file:\n* The tree layoutHelper implementation was originally copied from\n* \"d3.js\"(https://github.com/d3/d3-hierarchy) with\n* some modifications made for this project.\n* (see more details in the comment of the specific method below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the licence of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\n/**\n * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing\n * the tree.\n */\nimport * as layout from '../../util/layout.js';\n/**\n * Initialize all computational message for following algorithm.\n */\nexport function init(inRoot) {\n var root = inRoot;\n root.hierNode = {\n defaultAncestor: null,\n ancestor: root,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: 0,\n thread: null\n };\n var nodes = [root];\n var node;\n var children;\n while (node = nodes.pop()) {\n // jshint ignore:line\n children = node.children;\n if (node.isExpand && children.length) {\n var n = children.length;\n for (var i = n - 1; i >= 0; i--) {\n var child = children[i];\n child.hierNode = {\n defaultAncestor: null,\n ancestor: child,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: i,\n thread: null\n };\n nodes.push(child);\n }\n }\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes a preliminary x coordinate for node. Before that, this function is\n * applied recursively to the children of node, as well as the function\n * apportion(). After spacing out the children by calling executeShifts(), the\n * node is placed to the midpoint of its outermost children.\n */\nexport function firstWalk(node, separation) {\n var children = node.isExpand ? node.children : [];\n var siblings = node.parentNode.children;\n var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null;\n if (children.length) {\n executeShifts(node);\n var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2;\n if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n node.hierNode.modifier = node.hierNode.prelim - midPoint;\n } else {\n node.hierNode.prelim = midPoint;\n }\n } else if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n }\n node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation);\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes all real x-coordinates by summing up the modifiers recursively.\n */\nexport function secondWalk(node) {\n var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier;\n node.setLayout({\n x: nodeX\n }, true);\n node.hierNode.modifier += node.parentNode.hierNode.modifier;\n}\nexport function separation(cb) {\n return arguments.length ? cb : defaultSeparation;\n}\n/**\n * Transform the common coordinate to radial coordinate.\n */\nexport function radialCoordinate(rad, r) {\n rad -= Math.PI / 2;\n return {\n x: r * Math.cos(rad),\n y: r * Math.sin(rad)\n };\n}\n/**\n * Get the layout position of the whole view.\n */\nexport function getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n/**\n * All other shifts, applied to the smaller subtrees between w- and w+, are\n * performed by this function.\n *\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\nfunction executeShifts(node) {\n var children = node.children;\n var n = children.length;\n var shift = 0;\n var change = 0;\n while (--n >= 0) {\n var child = children[n];\n child.hierNode.prelim += shift;\n child.hierNode.modifier += shift;\n change += child.hierNode.change;\n shift += child.hierNode.shift + change;\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * The core of the algorithm. Here, a new subtree is combined with the\n * previous subtrees. Threads are used to traverse the inside and outside\n * contours of the left and right subtree up to the highest common level.\n * Whenever two nodes of the inside contours conflict, we compute the left\n * one of the greatest uncommon ancestors using the function nextAncestor()\n * and call moveSubtree() to shift the subtree and prepare the shifts of\n * smaller subtrees. Finally, we add a new thread (if necessary).\n */\nfunction apportion(subtreeV, subtreeW, ancestor, separation) {\n if (subtreeW) {\n var nodeOutRight = subtreeV;\n var nodeInRight = subtreeV;\n var nodeOutLeft = nodeInRight.parentNode.children[0];\n var nodeInLeft = subtreeW;\n var sumOutRight = nodeOutRight.hierNode.modifier;\n var sumInRight = nodeInRight.hierNode.modifier;\n var sumOutLeft = nodeOutLeft.hierNode.modifier;\n var sumInLeft = nodeInLeft.hierNode.modifier;\n while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) {\n nodeOutRight = nextRight(nodeOutRight);\n nodeOutLeft = nextLeft(nodeOutLeft);\n nodeOutRight.hierNode.ancestor = subtreeV;\n var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight);\n if (shift > 0) {\n moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift);\n sumInRight += shift;\n sumOutRight += shift;\n }\n sumInLeft += nodeInLeft.hierNode.modifier;\n sumInRight += nodeInRight.hierNode.modifier;\n sumOutRight += nodeOutRight.hierNode.modifier;\n sumOutLeft += nodeOutLeft.hierNode.modifier;\n }\n if (nodeInLeft && !nextRight(nodeOutRight)) {\n nodeOutRight.hierNode.thread = nodeInLeft;\n nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight;\n }\n if (nodeInRight && !nextLeft(nodeOutLeft)) {\n nodeOutLeft.hierNode.thread = nodeInRight;\n nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft;\n ancestor = subtreeV;\n }\n }\n return ancestor;\n}\n/**\n * This function is used to traverse the right contour of a subtree.\n * It returns the rightmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n */\nfunction nextRight(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread;\n}\n/**\n * This function is used to traverse the left contour of a subtree (or a subforest).\n * It returns the leftmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n */\nfunction nextLeft(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[0] : node.hierNode.thread;\n}\n/**\n * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor.\n * Otherwise, returns the specified ancestor.\n */\nfunction nextAncestor(nodeInLeft, node, ancestor) {\n return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Shifts the current subtree rooted at wr.\n * This is done by increasing prelim(w+) and modifier(w+) by shift.\n */\nfunction moveSubtree(wl, wr, shift) {\n var change = shift / (wr.hierNode.i - wl.hierNode.i);\n wr.hierNode.change -= change;\n wr.hierNode.shift += shift;\n wr.hierNode.modifier += shift;\n wr.hierNode.prelim += shift;\n wl.hierNode.change += change;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\nfunction defaultSeparation(node1, node2) {\n return node1.parentNode === node2.parentNode ? 1 : 2;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport SymbolClz from '../helper/Symbol.js';\nimport { radialCoordinate } from './layoutHelper.js';\nimport * as bbox from 'zrender/lib/core/bbox.js';\nimport View from '../../coord/View.js';\nimport * as roamHelper from '../../component/helper/roamHelper.js';\nimport RoamController from '../../component/helper/RoamController.js';\nimport { onIrrelevantElement } from '../../component/helper/cursorHelper.js';\nimport { parsePercent } from '../../util/number.js';\nimport ChartView from '../../view/Chart.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { setStatesStylesFromModel, setStatesFlag, setDefaultStateProxy, HOVER_STATE_BLUR } from '../../util/states.js';\nvar TreeEdgeShape = /** @class */function () {\n function TreeEdgeShape() {\n this.parentPoint = [];\n this.childPoints = [];\n }\n return TreeEdgeShape;\n}();\nvar TreePath = /** @class */function (_super) {\n __extends(TreePath, _super);\n function TreePath(opts) {\n return _super.call(this, opts) || this;\n }\n TreePath.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n TreePath.prototype.getDefaultShape = function () {\n return new TreeEdgeShape();\n };\n TreePath.prototype.buildPath = function (ctx, shape) {\n var childPoints = shape.childPoints;\n var childLen = childPoints.length;\n var parentPoint = shape.parentPoint;\n var firstChildPos = childPoints[0];\n var lastChildPos = childPoints[childLen - 1];\n if (childLen === 1) {\n ctx.moveTo(parentPoint[0], parentPoint[1]);\n ctx.lineTo(firstChildPos[0], firstChildPos[1]);\n return;\n }\n var orient = shape.orient;\n var forkDim = orient === 'TB' || orient === 'BT' ? 0 : 1;\n var otherDim = 1 - forkDim;\n var forkPosition = parsePercent(shape.forkPosition, 1);\n var tmpPoint = [];\n tmpPoint[forkDim] = parentPoint[forkDim];\n tmpPoint[otherDim] = parentPoint[otherDim] + (lastChildPos[otherDim] - parentPoint[otherDim]) * forkPosition;\n ctx.moveTo(parentPoint[0], parentPoint[1]);\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n ctx.moveTo(firstChildPos[0], firstChildPos[1]);\n tmpPoint[forkDim] = firstChildPos[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n tmpPoint[forkDim] = lastChildPos[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n ctx.lineTo(lastChildPos[0], lastChildPos[1]);\n for (var i = 1; i < childLen - 1; i++) {\n var point = childPoints[i];\n ctx.moveTo(point[0], point[1]);\n tmpPoint[forkDim] = point[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n }\n };\n return TreePath;\n}(Path);\nvar TreeView = /** @class */function (_super) {\n __extends(TreeView, _super);\n function TreeView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TreeView.type;\n _this._mainGroup = new graphic.Group();\n return _this;\n }\n TreeView.prototype.init = function (ecModel, api) {\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: this.group\n };\n this.group.add(this._mainGroup);\n };\n TreeView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var layoutInfo = seriesModel.layoutInfo;\n var group = this._mainGroup;\n var layout = seriesModel.get('layout');\n if (layout === 'radial') {\n group.x = layoutInfo.x + layoutInfo.width / 2;\n group.y = layoutInfo.y + layoutInfo.height / 2;\n } else {\n group.x = layoutInfo.x;\n group.y = layoutInfo.y;\n }\n this._updateViewCoordSys(seriesModel, api);\n this._updateController(seriesModel, ecModel, api);\n var oldData = this._data;\n data.diff(oldData).add(function (newIdx) {\n if (symbolNeedsDraw(data, newIdx)) {\n // Create node and edge\n updateNode(data, newIdx, null, group, seriesModel);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n if (!symbolNeedsDraw(data, newIdx)) {\n symbolEl && removeNode(oldData, oldIdx, symbolEl, group, seriesModel);\n return;\n }\n // Update node and edge\n updateNode(data, newIdx, symbolEl, group, seriesModel);\n }).remove(function (oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n // When remove a collapsed node of subtree, since the collapsed\n // node haven't been initialized with a symbol element,\n // you can't found it's symbol element through index.\n // so if we want to remove the symbol element we should insure\n // that the symbol element is not null.\n if (symbolEl) {\n removeNode(oldData, oldIdx, symbolEl, group, seriesModel);\n }\n }).execute();\n this._nodeScaleRatio = seriesModel.get('nodeScaleRatio');\n this._updateNodeAndLinkScale(seriesModel);\n if (seriesModel.get('expandAndCollapse') === true) {\n data.eachItemGraphicEl(function (el, dataIndex) {\n el.off('click').on('click', function () {\n api.dispatchAction({\n type: 'treeExpandAndCollapse',\n seriesId: seriesModel.id,\n dataIndex: dataIndex\n });\n });\n });\n }\n this._data = data;\n };\n TreeView.prototype._updateViewCoordSys = function (seriesModel, api) {\n var data = seriesModel.getData();\n var points = [];\n data.each(function (idx) {\n var layout = data.getItemLayout(idx);\n if (layout && !isNaN(layout.x) && !isNaN(layout.y)) {\n points.push([+layout.x, +layout.y]);\n }\n });\n var min = [];\n var max = [];\n bbox.fromPoints(points, min, max);\n // If don't Store min max when collapse the root node after roam,\n // the root node will disappear.\n var oldMin = this._min;\n var oldMax = this._max;\n // If width or height is 0\n if (max[0] - min[0] === 0) {\n min[0] = oldMin ? oldMin[0] : min[0] - 1;\n max[0] = oldMax ? oldMax[0] : max[0] + 1;\n }\n if (max[1] - min[1] === 0) {\n min[1] = oldMin ? oldMin[1] : min[1] - 1;\n max[1] = oldMax ? oldMax[1] : max[1] + 1;\n }\n var viewCoordSys = seriesModel.coordinateSystem = new View();\n viewCoordSys.zoomLimit = seriesModel.get('scaleLimit');\n viewCoordSys.setBoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n viewCoordSys.setCenter(seriesModel.get('center'), api);\n viewCoordSys.setZoom(seriesModel.get('zoom'));\n // Here we use viewCoordSys just for computing the 'position' and 'scale' of the group\n this.group.attr({\n x: viewCoordSys.x,\n y: viewCoordSys.y,\n scaleX: viewCoordSys.scaleX,\n scaleY: viewCoordSys.scaleY\n });\n this._min = min;\n this._max = max;\n };\n TreeView.prototype._updateController = function (seriesModel, ecModel, api) {\n var _this = this;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n var group = this.group;\n controller.setPointerChecker(function (e, x, y) {\n var rect = group.getBoundingRect();\n rect.applyTransform(group.transform);\n return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel);\n });\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n controller.off('pan').off('zoom').on('pan', function (e) {\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'treeRoam',\n dx: e.dx,\n dy: e.dy\n });\n }).on('zoom', function (e) {\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'treeRoam',\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n });\n _this._updateNodeAndLinkScale(seriesModel);\n // Only update label layout on zoom\n api.updateLabelLayout();\n });\n };\n TreeView.prototype._updateNodeAndLinkScale = function (seriesModel) {\n var data = seriesModel.getData();\n var nodeScale = this._getNodeGlobalScale(seriesModel);\n data.eachItemGraphicEl(function (el, idx) {\n el.setSymbolScale(nodeScale);\n });\n };\n TreeView.prototype._getNodeGlobalScale = function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type !== 'view') {\n return 1;\n }\n var nodeScaleRatio = this._nodeScaleRatio;\n var groupZoom = coordSys.scaleX || 1;\n // Scale node when zoom changes\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n return nodeScale / groupZoom;\n };\n TreeView.prototype.dispose = function () {\n this._controller && this._controller.dispose();\n this._controllerHost = null;\n };\n TreeView.prototype.remove = function () {\n this._mainGroup.removeAll();\n this._data = null;\n };\n TreeView.type = 'tree';\n return TreeView;\n}(ChartView);\nfunction symbolNeedsDraw(data, dataIndex) {\n var layout = data.getItemLayout(dataIndex);\n return layout && !isNaN(layout.x) && !isNaN(layout.y);\n}\nfunction updateNode(data, dataIndex, symbolEl, group, seriesModel) {\n var isInit = !symbolEl;\n var node = data.tree.getNodeByDataIndex(dataIndex);\n var itemModel = node.getModel();\n var visualColor = node.getVisual('style').fill;\n var symbolInnerColor = node.isExpand === false && node.children.length !== 0 ? visualColor : '#fff';\n var virtualRoot = data.tree.root;\n var source = node.parentNode === virtualRoot ? node : node.parentNode || node;\n var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex);\n var sourceLayout = source.getLayout();\n var sourceOldLayout = sourceSymbolEl ? {\n x: sourceSymbolEl.__oldX,\n y: sourceSymbolEl.__oldY,\n rawX: sourceSymbolEl.__radialOldRawX,\n rawY: sourceSymbolEl.__radialOldRawY\n } : sourceLayout;\n var targetLayout = node.getLayout();\n if (isInit) {\n symbolEl = new SymbolClz(data, dataIndex, null, {\n symbolInnerColor: symbolInnerColor,\n useNameLabel: true\n });\n symbolEl.x = sourceOldLayout.x;\n symbolEl.y = sourceOldLayout.y;\n } else {\n symbolEl.updateData(data, dataIndex, null, {\n symbolInnerColor: symbolInnerColor,\n useNameLabel: true\n });\n }\n symbolEl.__radialOldRawX = symbolEl.__radialRawX;\n symbolEl.__radialOldRawY = symbolEl.__radialRawY;\n symbolEl.__radialRawX = targetLayout.rawX;\n symbolEl.__radialRawY = targetLayout.rawY;\n group.add(symbolEl);\n data.setItemGraphicEl(dataIndex, symbolEl);\n symbolEl.__oldX = symbolEl.x;\n symbolEl.__oldY = symbolEl.y;\n graphic.updateProps(symbolEl, {\n x: targetLayout.x,\n y: targetLayout.y\n }, seriesModel);\n var symbolPath = symbolEl.getSymbolPath();\n if (seriesModel.get('layout') === 'radial') {\n var realRoot = virtualRoot.children[0];\n var rootLayout = realRoot.getLayout();\n var length_1 = realRoot.children.length;\n var rad = void 0;\n var isLeft = void 0;\n if (targetLayout.x === rootLayout.x && node.isExpand === true && realRoot.children.length) {\n var center = {\n x: (realRoot.children[0].getLayout().x + realRoot.children[length_1 - 1].getLayout().x) / 2,\n y: (realRoot.children[0].getLayout().y + realRoot.children[length_1 - 1].getLayout().y) / 2\n };\n rad = Math.atan2(center.y - rootLayout.y, center.x - rootLayout.x);\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n isLeft = center.x < rootLayout.x;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n } else {\n rad = Math.atan2(targetLayout.y - rootLayout.y, targetLayout.x - rootLayout.x);\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n if (node.children.length === 0 || node.children.length !== 0 && node.isExpand === false) {\n isLeft = targetLayout.x < rootLayout.x;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n } else {\n isLeft = targetLayout.x > rootLayout.x;\n if (!isLeft) {\n rad = rad - Math.PI;\n }\n }\n }\n var textPosition = isLeft ? 'left' : 'right';\n var normalLabelModel = itemModel.getModel('label');\n var rotate = normalLabelModel.get('rotate');\n var labelRotateRadian = rotate * (Math.PI / 180);\n var textContent = symbolPath.getTextContent();\n if (textContent) {\n symbolPath.setTextConfig({\n position: normalLabelModel.get('position') || textPosition,\n rotation: rotate == null ? -rad : labelRotateRadian,\n origin: 'center'\n });\n textContent.setStyle('verticalAlign', 'middle');\n }\n }\n // Handle status\n var focus = itemModel.get(['emphasis', 'focus']);\n var focusDataIndices = focus === 'relative' ? zrUtil.concatArray(node.getAncestorsIndices(), node.getDescendantIndices()) : focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : null;\n if (focusDataIndices) {\n // Modify the focus to data indices.\n getECData(symbolEl).focus = focusDataIndices;\n }\n drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group);\n if (symbolEl.__edge) {\n symbolEl.onHoverStateChange = function (toState) {\n if (toState !== 'blur') {\n // NOTE: Ensure the parent elements will been blurred firstly.\n // According to the return of getAncestorsIndices and getDescendantIndices\n // TODO: A bit tricky.\n var parentEl = node.parentNode && data.getItemGraphicEl(node.parentNode.dataIndex);\n if (!(parentEl && parentEl.hoverState === HOVER_STATE_BLUR)) {\n setStatesFlag(symbolEl.__edge, toState);\n }\n }\n };\n }\n}\nfunction drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group) {\n var itemModel = node.getModel();\n var edgeShape = seriesModel.get('edgeShape');\n var layout = seriesModel.get('layout');\n var orient = seriesModel.getOrient();\n var curvature = seriesModel.get(['lineStyle', 'curveness']);\n var edgeForkPosition = seriesModel.get('edgeForkPosition');\n var lineStyle = itemModel.getModel('lineStyle').getLineStyle();\n var edge = symbolEl.__edge;\n // curve edge from node -> parent\n // polyline edge from node -> children\n if (edgeShape === 'curve') {\n if (node.parentNode && node.parentNode !== virtualRoot) {\n if (!edge) {\n edge = symbolEl.__edge = new graphic.BezierCurve({\n shape: getEdgeShape(layout, orient, curvature, sourceOldLayout, sourceOldLayout)\n });\n }\n graphic.updateProps(edge, {\n shape: getEdgeShape(layout, orient, curvature, sourceLayout, targetLayout)\n }, seriesModel);\n }\n } else if (edgeShape === 'polyline') {\n if (layout === 'orthogonal') {\n if (node !== virtualRoot && node.children && node.children.length !== 0 && node.isExpand === true) {\n var children = node.children;\n var childPoints = [];\n for (var i = 0; i < children.length; i++) {\n var childLayout = children[i].getLayout();\n childPoints.push([childLayout.x, childLayout.y]);\n }\n if (!edge) {\n edge = symbolEl.__edge = new TreePath({\n shape: {\n parentPoint: [targetLayout.x, targetLayout.y],\n childPoints: [[targetLayout.x, targetLayout.y]],\n orient: orient,\n forkPosition: edgeForkPosition\n }\n });\n }\n graphic.updateProps(edge, {\n shape: {\n parentPoint: [targetLayout.x, targetLayout.y],\n childPoints: childPoints\n }\n }, seriesModel);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('The polyline edgeShape can only be used in orthogonal layout');\n }\n }\n }\n // show all edge when edgeShape is 'curve', filter node `isExpand` is false when edgeShape is 'polyline'\n if (edge && !(edgeShape === 'polyline' && !node.isExpand)) {\n edge.useStyle(zrUtil.defaults({\n strokeNoScale: true,\n fill: null\n }, lineStyle));\n setStatesStylesFromModel(edge, itemModel, 'lineStyle');\n setDefaultStateProxy(edge);\n group.add(edge);\n }\n}\nfunction removeNodeEdge(node, data, group, seriesModel, removeAnimationOpt) {\n var virtualRoot = data.tree.root;\n var _a = getSourceNode(virtualRoot, node),\n source = _a.source,\n sourceLayout = _a.sourceLayout;\n var symbolEl = data.getItemGraphicEl(node.dataIndex);\n if (!symbolEl) {\n return;\n }\n var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex);\n var sourceEdge = sourceSymbolEl.__edge;\n // 1. when expand the sub tree, delete the children node should delete the edge of\n // the source at the same time. because the polyline edge shape is only owned by the source.\n // 2.when the node is the only children of the source, delete the node should delete the edge of\n // the source at the same time. the same reason as above.\n var edge = symbolEl.__edge || (source.isExpand === false || source.children.length === 1 ? sourceEdge : undefined);\n var edgeShape = seriesModel.get('edgeShape');\n var layoutOpt = seriesModel.get('layout');\n var orient = seriesModel.get('orient');\n var curvature = seriesModel.get(['lineStyle', 'curveness']);\n if (edge) {\n if (edgeShape === 'curve') {\n graphic.removeElement(edge, {\n shape: getEdgeShape(layoutOpt, orient, curvature, sourceLayout, sourceLayout),\n style: {\n opacity: 0\n }\n }, seriesModel, {\n cb: function () {\n group.remove(edge);\n },\n removeOpt: removeAnimationOpt\n });\n } else if (edgeShape === 'polyline' && seriesModel.get('layout') === 'orthogonal') {\n graphic.removeElement(edge, {\n shape: {\n parentPoint: [sourceLayout.x, sourceLayout.y],\n childPoints: [[sourceLayout.x, sourceLayout.y]]\n },\n style: {\n opacity: 0\n }\n }, seriesModel, {\n cb: function () {\n group.remove(edge);\n },\n removeOpt: removeAnimationOpt\n });\n }\n }\n}\nfunction getSourceNode(virtualRoot, node) {\n var source = node.parentNode === virtualRoot ? node : node.parentNode || node;\n var sourceLayout;\n while (sourceLayout = source.getLayout(), sourceLayout == null) {\n source = source.parentNode === virtualRoot ? source : source.parentNode || source;\n }\n return {\n source: source,\n sourceLayout: sourceLayout\n };\n}\nfunction removeNode(data, dataIndex, symbolEl, group, seriesModel) {\n var node = data.tree.getNodeByDataIndex(dataIndex);\n var virtualRoot = data.tree.root;\n var sourceLayout = getSourceNode(virtualRoot, node).sourceLayout;\n // Use same duration and easing with update to have more consistent animation.\n var removeAnimationOpt = {\n duration: seriesModel.get('animationDurationUpdate'),\n easing: seriesModel.get('animationEasingUpdate')\n };\n graphic.removeElement(symbolEl, {\n x: sourceLayout.x + 1,\n y: sourceLayout.y + 1\n }, seriesModel, {\n cb: function () {\n group.remove(symbolEl);\n data.setItemGraphicEl(dataIndex, null);\n },\n removeOpt: removeAnimationOpt\n });\n symbolEl.fadeOut(null, data.hostModel, {\n fadeLabel: true,\n animation: removeAnimationOpt\n });\n // remove edge as parent node\n node.children.forEach(function (childNode) {\n removeNodeEdge(childNode, data, group, seriesModel, removeAnimationOpt);\n });\n // remove edge as child node\n removeNodeEdge(node, data, group, seriesModel, removeAnimationOpt);\n}\nfunction getEdgeShape(layoutOpt, orient, curvature, sourceLayout, targetLayout) {\n var cpx1;\n var cpy1;\n var cpx2;\n var cpy2;\n var x1;\n var x2;\n var y1;\n var y2;\n if (layoutOpt === 'radial') {\n x1 = sourceLayout.rawX;\n y1 = sourceLayout.rawY;\n x2 = targetLayout.rawX;\n y2 = targetLayout.rawY;\n var radialCoor1 = radialCoordinate(x1, y1);\n var radialCoor2 = radialCoordinate(x1, y1 + (y2 - y1) * curvature);\n var radialCoor3 = radialCoordinate(x2, y2 + (y1 - y2) * curvature);\n var radialCoor4 = radialCoordinate(x2, y2);\n return {\n x1: radialCoor1.x || 0,\n y1: radialCoor1.y || 0,\n x2: radialCoor4.x || 0,\n y2: radialCoor4.y || 0,\n cpx1: radialCoor2.x || 0,\n cpy1: radialCoor2.y || 0,\n cpx2: radialCoor3.x || 0,\n cpy2: radialCoor3.y || 0\n };\n } else {\n x1 = sourceLayout.x;\n y1 = sourceLayout.y;\n x2 = targetLayout.x;\n y2 = targetLayout.y;\n if (orient === 'LR' || orient === 'RL') {\n cpx1 = x1 + (x2 - x1) * curvature;\n cpy1 = y1;\n cpx2 = x2 + (x1 - x2) * curvature;\n cpy2 = y2;\n }\n if (orient === 'TB' || orient === 'BT') {\n cpx1 = x1;\n cpy1 = y1 + (y2 - y1) * curvature;\n cpx2 = x2;\n cpy2 = y2 + (y1 - y2) * curvature;\n }\n }\n return {\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n cpx1: cpx1,\n cpy1: cpy1,\n cpx2: cpx2,\n cpy2: cpy2\n };\n}\nexport default TreeView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Link lists and struct (graph or tree)\n */\nimport { curry, each, assert, extend, map, keys } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nfunction linkSeriesData(opt) {\n var mainData = opt.mainData;\n var datas = opt.datas;\n if (!datas) {\n datas = {\n main: mainData\n };\n opt.datasAttr = {\n main: 'data'\n };\n }\n opt.datas = opt.mainData = null;\n linkAll(mainData, datas, opt);\n // Porxy data original methods.\n each(datas, function (data) {\n each(mainData.TRANSFERABLE_METHODS, function (methodName) {\n data.wrapMethod(methodName, curry(transferInjection, opt));\n });\n });\n // Beyond transfer, additional features should be added to `cloneShallow`.\n mainData.wrapMethod('cloneShallow', curry(cloneShallowInjection, opt));\n // Only mainData trigger change, because struct.update may trigger\n // another changable methods, which may bring about dead lock.\n each(mainData.CHANGABLE_METHODS, function (methodName) {\n mainData.wrapMethod(methodName, curry(changeInjection, opt));\n });\n // Make sure datas contains mainData.\n assert(datas[mainData.dataType] === mainData);\n}\nfunction transferInjection(opt, res) {\n if (isMainData(this)) {\n // Transfer datas to new main data.\n var datas = extend({}, inner(this).datas);\n datas[this.dataType] = res;\n linkAll(res, datas, opt);\n } else {\n // Modify the reference in main data to point newData.\n linkSingle(res, this.dataType, inner(this).mainData, opt);\n }\n return res;\n}\nfunction changeInjection(opt, res) {\n opt.struct && opt.struct.update();\n return res;\n}\nfunction cloneShallowInjection(opt, res) {\n // cloneShallow, which brings about some fragilities, may be inappropriate\n // to be exposed as an API. So for implementation simplicity we can make\n // the restriction that cloneShallow of not-mainData should not be invoked\n // outside, but only be invoked here.\n each(inner(res).datas, function (data, dataType) {\n data !== res && linkSingle(data.cloneShallow(), dataType, res, opt);\n });\n return res;\n}\n/**\n * Supplement method to List.\n *\n * @public\n * @param [dataType] If not specified, return mainData.\n */\nfunction getLinkedData(dataType) {\n var mainData = inner(this).mainData;\n return dataType == null || mainData == null ? mainData : inner(mainData).datas[dataType];\n}\n/**\n * Get list of all linked data\n */\nfunction getLinkedDataAll() {\n var mainData = inner(this).mainData;\n return mainData == null ? [{\n data: mainData\n }] : map(keys(inner(mainData).datas), function (type) {\n return {\n type: type,\n data: inner(mainData).datas[type]\n };\n });\n}\nfunction isMainData(data) {\n return inner(data).mainData === data;\n}\nfunction linkAll(mainData, datas, opt) {\n inner(mainData).datas = {};\n each(datas, function (data, dataType) {\n linkSingle(data, dataType, mainData, opt);\n });\n}\nfunction linkSingle(data, dataType, mainData, opt) {\n inner(mainData).datas[dataType] = data;\n inner(data).mainData = mainData;\n data.dataType = dataType;\n if (opt.struct) {\n data[opt.structAttr] = opt.struct;\n opt.struct[opt.datasAttr[dataType]] = data;\n }\n // Supplement method.\n data.getLinkedData = getLinkedData;\n data.getLinkedDataAll = getLinkedDataAll;\n}\nexport default linkSeriesData;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Tree data structure\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport linkSeriesData from './helper/linkSeriesData.js';\nimport SeriesData from './SeriesData.js';\nimport prepareSeriesDataSchema from './helper/createDimensions.js';\nimport { convertOptionIdName } from '../util/model.js';\nvar TreeNode = /** @class */function () {\n function TreeNode(name, hostTree) {\n this.depth = 0;\n this.height = 0;\n /**\n * Reference to list item.\n * Do not persistent dataIndex outside,\n * besause it may be changed by list.\n * If dataIndex -1,\n * this node is logical deleted (filtered) in list.\n */\n this.dataIndex = -1;\n this.children = [];\n this.viewChildren = [];\n this.isExpand = false;\n this.name = name || '';\n this.hostTree = hostTree;\n }\n /**\n * The node is removed.\n */\n TreeNode.prototype.isRemoved = function () {\n return this.dataIndex < 0;\n };\n TreeNode.prototype.eachNode = function (options, cb, context) {\n if (zrUtil.isFunction(options)) {\n context = cb;\n cb = options;\n options = null;\n }\n options = options || {};\n if (zrUtil.isString(options)) {\n options = {\n order: options\n };\n }\n var order = options.order || 'preorder';\n var children = this[options.attr || 'children'];\n var suppressVisitSub;\n order === 'preorder' && (suppressVisitSub = cb.call(context, this));\n for (var i = 0; !suppressVisitSub && i < children.length; i++) {\n children[i].eachNode(options, cb, context);\n }\n order === 'postorder' && cb.call(context, this);\n };\n /**\n * Update depth and height of this subtree.\n */\n TreeNode.prototype.updateDepthAndHeight = function (depth) {\n var height = 0;\n this.depth = depth;\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n child.updateDepthAndHeight(depth + 1);\n if (child.height > height) {\n height = child.height;\n }\n }\n this.height = height + 1;\n };\n TreeNode.prototype.getNodeById = function (id) {\n if (this.getId() === id) {\n return this;\n }\n for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].getNodeById(id);\n if (res) {\n return res;\n }\n }\n };\n TreeNode.prototype.contains = function (node) {\n if (node === this) {\n return true;\n }\n for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].contains(node);\n if (res) {\n return res;\n }\n }\n };\n /**\n * @param includeSelf Default false.\n * @return order: [root, child, grandchild, ...]\n */\n TreeNode.prototype.getAncestors = function (includeSelf) {\n var ancestors = [];\n var node = includeSelf ? this : this.parentNode;\n while (node) {\n ancestors.push(node);\n node = node.parentNode;\n }\n ancestors.reverse();\n return ancestors;\n };\n TreeNode.prototype.getAncestorsIndices = function () {\n var indices = [];\n var currNode = this;\n while (currNode) {\n indices.push(currNode.dataIndex);\n currNode = currNode.parentNode;\n }\n indices.reverse();\n return indices;\n };\n TreeNode.prototype.getDescendantIndices = function () {\n var indices = [];\n this.eachNode(function (childNode) {\n indices.push(childNode.dataIndex);\n });\n return indices;\n };\n TreeNode.prototype.getValue = function (dimension) {\n var data = this.hostTree.data;\n return data.getStore().get(data.getDimensionIndex(dimension || 'value'), this.dataIndex);\n };\n TreeNode.prototype.setLayout = function (layout, merge) {\n this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge);\n };\n /**\n * @return {Object} layout\n */\n TreeNode.prototype.getLayout = function () {\n return this.hostTree.data.getItemLayout(this.dataIndex);\n };\n // @depcrecated\n // getModel(path: S): Model\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n TreeNode.prototype.getModel = function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n var hostTree = this.hostTree;\n var itemModel = hostTree.data.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n };\n // TODO: TYPE More specific model\n TreeNode.prototype.getLevelModel = function () {\n return (this.hostTree.levelModels || [])[this.depth];\n };\n TreeNode.prototype.setVisual = function (key, value) {\n this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value);\n };\n /**\n * Get item visual\n * FIXME: make return type better\n */\n TreeNode.prototype.getVisual = function (key) {\n return this.hostTree.data.getItemVisual(this.dataIndex, key);\n };\n TreeNode.prototype.getRawIndex = function () {\n return this.hostTree.data.getRawIndex(this.dataIndex);\n };\n TreeNode.prototype.getId = function () {\n return this.hostTree.data.getId(this.dataIndex);\n };\n /**\n * index in parent's children\n */\n TreeNode.prototype.getChildIndex = function () {\n if (this.parentNode) {\n var children = this.parentNode.children;\n for (var i = 0; i < children.length; ++i) {\n if (children[i] === this) {\n return i;\n }\n }\n return -1;\n }\n return -1;\n };\n /**\n * if this is an ancestor of another node\n *\n * @param node another node\n * @return if is ancestor\n */\n TreeNode.prototype.isAncestorOf = function (node) {\n var parent = node.parentNode;\n while (parent) {\n if (parent === this) {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n };\n /**\n * if this is an descendant of another node\n *\n * @param node another node\n * @return if is descendant\n */\n TreeNode.prototype.isDescendantOf = function (node) {\n return node !== this && node.isAncestorOf(this);\n };\n return TreeNode;\n}();\nexport { TreeNode };\n;\nvar Tree = /** @class */function () {\n function Tree(hostModel) {\n this.type = 'tree';\n this._nodes = [];\n this.hostModel = hostModel;\n }\n Tree.prototype.eachNode = function (options, cb, context) {\n this.root.eachNode(options, cb, context);\n };\n Tree.prototype.getNodeByDataIndex = function (dataIndex) {\n var rawIndex = this.data.getRawIndex(dataIndex);\n return this._nodes[rawIndex];\n };\n Tree.prototype.getNodeById = function (name) {\n return this.root.getNodeById(name);\n };\n /**\n * Update item available by list,\n * when list has been performed options like 'filterSelf' or 'map'.\n */\n Tree.prototype.update = function () {\n var data = this.data;\n var nodes = this._nodes;\n for (var i = 0, len = nodes.length; i < len; i++) {\n nodes[i].dataIndex = -1;\n }\n for (var i = 0, len = data.count(); i < len; i++) {\n nodes[data.getRawIndex(i)].dataIndex = i;\n }\n };\n /**\n * Clear all layouts\n */\n Tree.prototype.clearLayouts = function () {\n this.data.clearItemLayouts();\n };\n /**\n * data node format:\n * {\n * name: ...\n * value: ...\n * children: [\n * {\n * name: ...\n * value: ...\n * children: ...\n * },\n * ...\n * ]\n * }\n */\n Tree.createTree = function (dataRoot, hostModel, beforeLink) {\n var tree = new Tree(hostModel);\n var listData = [];\n var dimMax = 1;\n buildHierarchy(dataRoot);\n function buildHierarchy(dataNode, parentNode) {\n var value = dataNode.value;\n dimMax = Math.max(dimMax, zrUtil.isArray(value) ? value.length : 1);\n listData.push(dataNode);\n var node = new TreeNode(convertOptionIdName(dataNode.name, ''), tree);\n parentNode ? addChild(node, parentNode) : tree.root = node;\n tree._nodes.push(node);\n var children = dataNode.children;\n if (children) {\n for (var i = 0; i < children.length; i++) {\n buildHierarchy(children[i], node);\n }\n }\n }\n tree.root.updateDepthAndHeight(0);\n var dimensions = prepareSeriesDataSchema(listData, {\n coordDimensions: ['value'],\n dimensionsCount: dimMax\n }).dimensions;\n var list = new SeriesData(dimensions, hostModel);\n list.initData(listData);\n beforeLink && beforeLink(list);\n linkSeriesData({\n mainData: list,\n struct: tree,\n structAttr: 'tree'\n });\n tree.update();\n return tree;\n };\n return Tree;\n}();\n/**\n * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote,\n * so this function is not ready and not necessary to be public.\n */\nfunction addChild(child, node) {\n var children = node.children;\n if (child.parentNode === node) {\n return;\n }\n children.push(child);\n child.parentNode = node;\n}\nexport default Tree;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport function retrieveTargetInfo(payload, validPayloadTypes, seriesModel) {\n if (payload && zrUtil.indexOf(validPayloadTypes, payload.type) >= 0) {\n var root = seriesModel.getData().tree.root;\n var targetNode = payload.targetNode;\n if (zrUtil.isString(targetNode)) {\n targetNode = root.getNodeById(targetNode);\n }\n if (targetNode && root.contains(targetNode)) {\n return {\n node: targetNode\n };\n }\n var targetNodeId = payload.targetNodeId;\n if (targetNodeId != null && (targetNode = root.getNodeById(targetNodeId))) {\n return {\n node: targetNode\n };\n }\n }\n}\n// Not includes the given node at the last item.\nexport function getPathToRoot(node) {\n var path = [];\n while (node) {\n node = node.parentNode;\n node && path.push(node);\n }\n return path.reverse();\n}\nexport function aboveViewRoot(viewRoot, node) {\n var viewPath = getPathToRoot(viewRoot);\n return zrUtil.indexOf(viewPath, node) >= 0;\n}\n// From root to the input node (the input node will be included).\nexport function wrapTreePathInfo(node, seriesModel) {\n var treePathInfo = [];\n while (node) {\n var nodeDataIndex = node.dataIndex;\n treePathInfo.push({\n name: node.name,\n dataIndex: nodeDataIndex,\n value: seriesModel.getRawValue(nodeDataIndex)\n });\n node = node.parentNode;\n }\n treePathInfo.reverse();\n return treePathInfo;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport Tree from '../../data/Tree.js';\nimport Model from '../../model/Model.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nvar TreeSeriesModel = /** @class */function (_super) {\n __extends(TreeSeriesModel, _super);\n function TreeSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hasSymbolVisual = true;\n // Do it self.\n _this.ignoreStyleOnData = true;\n return _this;\n }\n /**\n * Init a tree data structure from data in option series\n */\n TreeSeriesModel.prototype.getInitialData = function (option) {\n // create a virtual root\n var root = {\n name: option.name,\n children: option.data\n };\n var leaves = option.leaves || {};\n var leavesModel = new Model(leaves, this, this.ecModel);\n var tree = Tree.createTree(root, this, beforeLink);\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n if (!(node && node.children.length && node.isExpand)) {\n model.parentModel = leavesModel;\n }\n return model;\n });\n }\n var treeDepth = 0;\n tree.eachNode('preorder', function (node) {\n if (node.depth > treeDepth) {\n treeDepth = node.depth;\n }\n });\n var expandAndCollapse = option.expandAndCollapse;\n var expandTreeDepth = expandAndCollapse && option.initialTreeDepth >= 0 ? option.initialTreeDepth : treeDepth;\n tree.root.eachNode('preorder', function (node) {\n var item = node.hostTree.data.getRawDataItem(node.dataIndex);\n // Add item.collapsed != null, because users can collapse node original in the series.data.\n node.isExpand = item && item.collapsed != null ? !item.collapsed : node.depth <= expandTreeDepth;\n });\n return tree.data;\n };\n /**\n * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'.\n * @returns {string} orient\n */\n TreeSeriesModel.prototype.getOrient = function () {\n var orient = this.get('orient');\n if (orient === 'horizontal') {\n orient = 'LR';\n } else if (orient === 'vertical') {\n orient = 'TB';\n }\n return orient;\n };\n TreeSeriesModel.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n TreeSeriesModel.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n TreeSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var tree = this.getData().tree;\n var realRoot = tree.root.children[0];\n var node = tree.getNodeByDataIndex(dataIndex);\n var value = node.getValue();\n var name = node.name;\n while (node && node !== realRoot) {\n name = node.parentNode.name + '.' + name;\n node = node.parentNode;\n }\n return createTooltipMarkup('nameValue', {\n name: name,\n value: value,\n noValue: isNaN(value) || value == null\n });\n };\n // Add tree path to tooltip param\n TreeSeriesModel.prototype.getDataParams = function (dataIndex) {\n var params = _super.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treeAncestors = wrapTreePathInfo(node, this);\n params.collapsed = !node.isExpand;\n return params;\n };\n TreeSeriesModel.type = 'series.tree';\n // can support the position parameters 'left', 'top','right','bottom', 'width',\n // 'height' in the setOption() with 'merge' mode normal.\n TreeSeriesModel.layoutMode = 'box';\n TreeSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n // the position of the whole view\n left: '12%',\n top: '12%',\n right: '12%',\n bottom: '12%',\n // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'\n layout: 'orthogonal',\n // value can be 'polyline'\n edgeShape: 'curve',\n edgeForkPosition: '50%',\n // true | false | 'move' | 'scale', see module:component/helper/RoamController.\n roam: false,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.4,\n // Default on center of graph\n center: null,\n zoom: 1,\n orient: 'LR',\n symbol: 'emptyCircle',\n symbolSize: 7,\n expandAndCollapse: true,\n initialTreeDepth: 2,\n lineStyle: {\n color: '#ccc',\n width: 1.5,\n curveness: 0.5\n },\n itemStyle: {\n color: 'lightsteelblue',\n // borderColor: '#c23531',\n borderWidth: 1.5\n },\n label: {\n show: true\n },\n animationEasing: 'linear',\n animationDuration: 700,\n animationDurationUpdate: 500\n };\n return TreeSeriesModel;\n}(SeriesModel);\nexport default TreeSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Traverse the tree from bottom to top and do something\n */\nfunction eachAfter(root, callback, separation) {\n var nodes = [root];\n var next = [];\n var node;\n while (node = nodes.pop()) {\n // jshint ignore:line\n next.push(node);\n if (node.isExpand) {\n var children = node.children;\n if (children.length) {\n for (var i = 0; i < children.length; i++) {\n nodes.push(children[i]);\n }\n }\n }\n }\n while (node = next.pop()) {\n // jshint ignore:line\n callback(node, separation);\n }\n}\n/**\n * Traverse the tree from top to bottom and do something\n */\nfunction eachBefore(root, callback) {\n var nodes = [root];\n var node;\n while (node = nodes.pop()) {\n // jshint ignore:line\n callback(node);\n if (node.isExpand) {\n var children = node.children;\n if (children.length) {\n for (var i = children.length - 1; i >= 0; i--) {\n nodes.push(children[i]);\n }\n }\n }\n }\n}\nexport { eachAfter, eachBefore };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { eachAfter, eachBefore } from './traversalHelper.js';\nimport { init, firstWalk, secondWalk, separation as sep, radialCoordinate, getViewRect } from './layoutHelper.js';\nexport default function treeLayout(ecModel, api) {\n ecModel.eachSeriesByType('tree', function (seriesModel) {\n commonLayout(seriesModel, api);\n });\n}\nfunction commonLayout(seriesModel, api) {\n var layoutInfo = getViewRect(seriesModel, api);\n seriesModel.layoutInfo = layoutInfo;\n var layout = seriesModel.get('layout');\n var width = 0;\n var height = 0;\n var separation = null;\n if (layout === 'radial') {\n width = 2 * Math.PI;\n height = Math.min(layoutInfo.height, layoutInfo.width) / 2;\n separation = sep(function (node1, node2) {\n return (node1.parentNode === node2.parentNode ? 1 : 2) / node1.depth;\n });\n } else {\n width = layoutInfo.width;\n height = layoutInfo.height;\n separation = sep();\n }\n var virtualRoot = seriesModel.getData().tree.root;\n var realRoot = virtualRoot.children[0];\n if (realRoot) {\n init(virtualRoot);\n eachAfter(realRoot, firstWalk, separation);\n virtualRoot.hierNode.modifier = -realRoot.hierNode.prelim;\n eachBefore(realRoot, secondWalk);\n var left_1 = realRoot;\n var right_1 = realRoot;\n var bottom_1 = realRoot;\n eachBefore(realRoot, function (node) {\n var x = node.getLayout().x;\n if (x < left_1.getLayout().x) {\n left_1 = node;\n }\n if (x > right_1.getLayout().x) {\n right_1 = node;\n }\n if (node.depth > bottom_1.depth) {\n bottom_1 = node;\n }\n });\n var delta = left_1 === right_1 ? 1 : separation(left_1, right_1) / 2;\n var tx_1 = delta - left_1.getLayout().x;\n var kx_1 = 0;\n var ky_1 = 0;\n var coorX_1 = 0;\n var coorY_1 = 0;\n if (layout === 'radial') {\n kx_1 = width / (right_1.getLayout().x + delta + tx_1);\n // here we use (node.depth - 1), bucause the real root's depth is 1\n ky_1 = height / (bottom_1.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorX_1 = (node.getLayout().x + tx_1) * kx_1;\n coorY_1 = (node.depth - 1) * ky_1;\n var finalCoor = radialCoordinate(coorX_1, coorY_1);\n node.setLayout({\n x: finalCoor.x,\n y: finalCoor.y,\n rawX: coorX_1,\n rawY: coorY_1\n }, true);\n });\n } else {\n var orient_1 = seriesModel.getOrient();\n if (orient_1 === 'RL' || orient_1 === 'LR') {\n ky_1 = height / (right_1.getLayout().x + delta + tx_1);\n kx_1 = width / (bottom_1.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorY_1 = (node.getLayout().x + tx_1) * ky_1;\n coorX_1 = orient_1 === 'LR' ? (node.depth - 1) * kx_1 : width - (node.depth - 1) * kx_1;\n node.setLayout({\n x: coorX_1,\n y: coorY_1\n }, true);\n });\n } else if (orient_1 === 'TB' || orient_1 === 'BT') {\n kx_1 = width / (right_1.getLayout().x + delta + tx_1);\n ky_1 = height / (bottom_1.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorX_1 = (node.getLayout().x + tx_1) * kx_1;\n coorY_1 = orient_1 === 'TB' ? (node.depth - 1) * ky_1 : height - (node.depth - 1) * ky_1;\n node.setLayout({\n x: coorX_1,\n y: coorY_1\n }, true);\n });\n }\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend } from 'zrender/lib/core/util.js';\nexport default function treeVisual(ecModel) {\n ecModel.eachSeriesByType('tree', function (seriesModel) {\n var data = seriesModel.getData();\n var tree = data.tree;\n tree.eachNode(function (node) {\n var model = node.getModel();\n // TODO Optimize\n var style = model.getModel('itemStyle').getItemStyle();\n var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style');\n extend(existsStyle, style);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { updateCenterAndZoom } from '../../action/roamHelper.js';\nexport function installTreeAction(registers) {\n registers.registerAction({\n type: 'treeExpandAndCollapse',\n event: 'treeExpandAndCollapse',\n update: 'update'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'tree',\n query: payload\n }, function (seriesModel) {\n var dataIndex = payload.dataIndex;\n var tree = seriesModel.getData().tree;\n var node = tree.getNodeByDataIndex(dataIndex);\n node.isExpand = !node.isExpand;\n });\n });\n registers.registerAction({\n type: 'treeRoam',\n event: 'treeRoam',\n // Here we set 'none' instead of 'update', because roam action\n // just need to update the transform matrix without having to recalculate\n // the layout. So don't need to go through the whole update process, such\n // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.\n update: 'none'\n }, function (payload, ecModel, api) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'tree',\n query: payload\n }, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var res = updateCenterAndZoom(coordSys, payload, undefined, api);\n seriesModel.setCenter && seriesModel.setCenter(res.center);\n seriesModel.setZoom && seriesModel.setZoom(res.zoom);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport TreeView from './TreeView.js';\nimport TreeSeriesModel from './TreeSeries.js';\nimport treeLayout from './treeLayout.js';\nimport treeVisual from './treeVisual.js';\nimport { installTreeAction } from './treeAction.js';\nexport function install(registers) {\n registers.registerChartView(TreeView);\n registers.registerSeriesModel(TreeSeriesModel);\n registers.registerLayout(treeLayout);\n registers.registerVisual(treeVisual);\n installTreeAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as helper from '../helper/treeHelper.js';\nimport { noop } from 'zrender/lib/core/util.js';\nvar actionTypes = ['treemapZoomToNode', 'treemapRender', 'treemapMove'];\nexport function installTreemapAction(registers) {\n for (var i = 0; i < actionTypes.length; i++) {\n registers.registerAction({\n type: actionTypes[i],\n update: 'updateView'\n }, noop);\n }\n registers.registerAction({\n type: 'treemapRootToNode',\n update: 'updateView'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n }, handleRootToNode);\n function handleRootToNode(model, index) {\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, model);\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n if (originViewRoot) {\n payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown';\n }\n model.resetViewRoot(targetInfo.node);\n }\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { getDecalFromPalette } from '../../model/mixin/palette.js';\nexport default function enableAriaDecalForTree(seriesModel) {\n var data = seriesModel.getData();\n var tree = data.tree;\n var decalPaletteScope = {};\n tree.eachNode(function (node) {\n // Use decal of level 1 node\n var current = node;\n while (current && current.depth > 1) {\n current = current.parentNode;\n }\n var decal = getDecalFromPalette(seriesModel.ecModel, current.name || current.dataIndex + '', decalPaletteScope);\n node.setVisual('decal', decal);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesModel from '../../model/Series.js';\nimport Tree from '../../data/Tree.js';\nimport Model from '../../model/Model.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nimport { normalizeToArray } from '../../util/model.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport enableAriaDecalForTree from '../helper/enableAriaDecalForTree.js';\nvar TreemapSeriesModel = /** @class */function (_super) {\n __extends(TreemapSeriesModel, _super);\n function TreemapSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TreemapSeriesModel.type;\n _this.preventUsingHoverLayer = true;\n return _this;\n }\n /**\n * @override\n */\n TreemapSeriesModel.prototype.getInitialData = function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levels = option.levels || [];\n // Used in \"visual priority\" in `treemapVisual.js`.\n // This way is a little tricky, must satisfy the precondition:\n // 1. There is no `treeNode.getModel('itemStyle.xxx')` used.\n // 2. The `Model.prototype.getModel()` will not use any clone-like way.\n var designatedVisualItemStyle = this.designatedVisualItemStyle = {};\n var designatedVisualModel = new Model({\n itemStyle: designatedVisualItemStyle\n }, this, ecModel);\n levels = option.levels = setDefault(levels, ecModel);\n var levelModels = zrUtil.map(levels || [], function (levelDefine) {\n return new Model(levelDefine, designatedVisualModel, ecModel);\n }, this);\n // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n var tree = Tree.createTree(root, this, beforeLink);\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = node ? levelModels[node.depth] : null;\n // If no levelModel, we also need `designatedVisualModel`.\n model.parentModel = levelModel || designatedVisualModel;\n return model;\n });\n }\n return tree.data;\n };\n TreemapSeriesModel.prototype.optionUpdated = function () {\n this.resetViewRoot();\n };\n /**\n * @override\n * @param {number} dataIndex\n * @param {boolean} [mutipleSeries=false]\n */\n TreemapSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var name = data.getName(dataIndex);\n return createTooltipMarkup('nameValue', {\n name: name,\n value: value\n });\n };\n /**\n * Add tree path to tooltip param\n *\n * @override\n * @param {number} dataIndex\n * @return {Object}\n */\n TreemapSeriesModel.prototype.getDataParams = function (dataIndex) {\n var params = _super.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treeAncestors = wrapTreePathInfo(node, this);\n // compatitable the previous code.\n params.treePathInfo = params.treeAncestors;\n return params;\n };\n /**\n * @public\n * @param {Object} layoutInfo {\n * x: containerGroup x\n * y: containerGroup y\n * width: containerGroup width\n * height: containerGroup height\n * }\n */\n TreemapSeriesModel.prototype.setLayoutInfo = function (layoutInfo) {\n /**\n * @readOnly\n * @type {Object}\n */\n this.layoutInfo = this.layoutInfo || {};\n zrUtil.extend(this.layoutInfo, layoutInfo);\n };\n /**\n * @param {string} id\n * @return {number} index\n */\n TreemapSeriesModel.prototype.mapIdToIndex = function (id) {\n // A feature is implemented:\n // index is monotone increasing with the sequence of\n // input id at the first time.\n // This feature can make sure that each data item and its\n // mapped color have the same index between data list and\n // color list at the beginning, which is useful for user\n // to adjust data-color mapping.\n /**\n * @private\n * @type {Object}\n */\n var idIndexMap = this._idIndexMap;\n if (!idIndexMap) {\n idIndexMap = this._idIndexMap = zrUtil.createHashMap();\n /**\n * @private\n * @type {number}\n */\n this._idIndexMapCount = 0;\n }\n var index = idIndexMap.get(id);\n if (index == null) {\n idIndexMap.set(id, index = this._idIndexMapCount++);\n }\n return index;\n };\n TreemapSeriesModel.prototype.getViewRoot = function () {\n return this._viewRoot;\n };\n TreemapSeriesModel.prototype.resetViewRoot = function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n };\n TreemapSeriesModel.prototype.enableAriaDecal = function () {\n enableAriaDecalForTree(this);\n };\n TreemapSeriesModel.type = 'series.treemap';\n TreemapSeriesModel.layoutMode = 'box';\n TreemapSeriesModel.defaultOption = {\n // Disable progressive rendering\n progressive: 0,\n // size: ['80%', '80%'], // deprecated, compatible with ec2.\n left: 'center',\n top: 'middle',\n width: '80%',\n height: '80%',\n sort: true,\n clipWindow: 'origin',\n squareRatio: 0.5 * (1 + Math.sqrt(5)),\n leafDepth: null,\n drillDownIcon: '▶',\n // to align specialized icon. ▷▶❒❐▼✚\n zoomToNodeRatio: 0.32 * 0.32,\n scaleLimit: null,\n roam: true,\n nodeClick: 'zoomToNode',\n animation: true,\n animationDurationUpdate: 900,\n animationEasing: 'quinticInOut',\n breadcrumb: {\n show: true,\n height: 22,\n left: 'center',\n top: 'bottom',\n // right\n // bottom\n emptyItemWidth: 25,\n itemStyle: {\n color: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#fff'\n }\n },\n emphasis: {\n itemStyle: {\n color: 'rgba(0,0,0,0.9)' // '#5793f3',\n }\n }\n },\n\n label: {\n show: true,\n // Do not use textDistance, for ellipsis rect just the same as treemap node rect.\n distance: 0,\n padding: 5,\n position: 'inside',\n // formatter: null,\n color: '#fff',\n overflow: 'truncate'\n // align\n // verticalAlign\n },\n\n upperLabel: {\n show: false,\n position: [0, '50%'],\n height: 20,\n // formatter: null,\n // color: '#fff',\n overflow: 'truncate',\n // align: null,\n verticalAlign: 'middle'\n },\n itemStyle: {\n color: null,\n colorAlpha: null,\n colorSaturation: null,\n borderWidth: 0,\n gapWidth: 0,\n borderColor: '#fff',\n borderColorSaturation: null // If specified, borderColor will be ineffective, and the\n // border color is evaluated by color of current node and\n // borderColorSaturation.\n },\n\n emphasis: {\n upperLabel: {\n show: true,\n position: [0, '50%'],\n overflow: 'truncate',\n verticalAlign: 'middle'\n }\n },\n visualDimension: 0,\n visualMin: null,\n visualMax: null,\n color: [],\n // level[n].color (if necessary).\n // + Specify color list of each level. level[0].color would be global\n // color list if not specified. (see method `setDefault`).\n // + But set as a empty array to forbid fetch color from global palette\n // when using nodeModel.get('color'), otherwise nodes on deep level\n // will always has color palette set and are not able to inherit color\n // from parent node.\n // + TreemapSeries.color can not be set as 'none', otherwise effect\n // legend color fetching (see seriesColor.js).\n colorAlpha: null,\n colorSaturation: null,\n colorMappingBy: 'index',\n visibleMin: 10,\n // be rendered. Only works when sort is 'asc' or 'desc'.\n childrenVisibleMin: null,\n // grandchildren will not show.\n // Why grandchildren? If not grandchildren but children,\n // some siblings show children and some not,\n // the appearance may be mess and not consistent,\n levels: [] // Each item: {\n // visibleMin, itemStyle, visualDimension, label\n // }\n };\n\n return TreemapSeriesModel;\n}(SeriesModel);\n/**\n * @param {Object} dataNode\n */\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value;\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n }\n // Value should not less than 0.\n if (thisValue < 0) {\n thisValue = 0;\n }\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\n/**\n * set default to level configuration\n */\nfunction setDefault(levels, ecModel) {\n var globalColorList = normalizeToArray(ecModel.get('color'));\n var globalDecalList = normalizeToArray(ecModel.get(['aria', 'decal', 'decals']));\n if (!globalColorList) {\n return;\n }\n levels = levels || [];\n var hasColorDefine;\n var hasDecalDefine;\n zrUtil.each(levels, function (levelDefine) {\n var model = new Model(levelDefine);\n var modelColor = model.get('color');\n var modelDecal = model.get('decal');\n if (model.get(['itemStyle', 'color']) || modelColor && modelColor !== 'none') {\n hasColorDefine = true;\n }\n if (model.get(['itemStyle', 'decal']) || modelDecal && modelDecal !== 'none') {\n hasDecalDefine = true;\n }\n });\n var level0 = levels[0] || (levels[0] = {});\n if (!hasColorDefine) {\n level0.color = globalColorList.slice();\n }\n if (!hasDecalDefine && globalDecalList) {\n level0.decal = globalDecalList.slice();\n }\n return levels;\n}\nexport default TreemapSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport * as layout from '../../util/layout.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nimport { curry, defaults } from 'zrender/lib/core/util.js';\nimport { convertOptionIdName } from '../../util/model.js';\nimport { toggleHoverEmphasis, Z2_EMPHASIS_LIFT } from '../../util/states.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nvar TEXT_PADDING = 8;\nvar ITEM_GAP = 8;\nvar ARRAY_LENGTH = 5;\nvar Breadcrumb = /** @class */function () {\n function Breadcrumb(containerGroup) {\n this.group = new graphic.Group();\n containerGroup.add(this.group);\n }\n Breadcrumb.prototype.render = function (seriesModel, api, targetNode, onSelect) {\n var model = seriesModel.getModel('breadcrumb');\n var thisGroup = this.group;\n thisGroup.removeAll();\n if (!model.get('show') || !targetNode) {\n return;\n }\n var normalStyleModel = model.getModel('itemStyle');\n var emphasisModel = model.getModel('emphasis');\n var textStyleModel = normalStyleModel.getModel('textStyle');\n var emphasisTextStyleModel = emphasisModel.getModel(['itemStyle', 'textStyle']);\n var layoutParam = {\n pos: {\n left: model.get('left'),\n right: model.get('right'),\n top: model.get('top'),\n bottom: model.get('bottom')\n },\n box: {\n width: api.getWidth(),\n height: api.getHeight()\n },\n emptyItemWidth: model.get('emptyItemWidth'),\n totalWidth: 0,\n renderList: []\n };\n this._prepare(targetNode, layoutParam, textStyleModel);\n this._renderContent(seriesModel, layoutParam, normalStyleModel, emphasisModel, textStyleModel, emphasisTextStyleModel, onSelect);\n layout.positionElement(thisGroup, layoutParam.pos, layoutParam.box);\n };\n /**\n * Prepare render list and total width\n * @private\n */\n Breadcrumb.prototype._prepare = function (targetNode, layoutParam, textStyleModel) {\n for (var node = targetNode; node; node = node.parentNode) {\n var text = convertOptionIdName(node.getModel().get('name'), '');\n var textRect = textStyleModel.getTextRect(text);\n var itemWidth = Math.max(textRect.width + TEXT_PADDING * 2, layoutParam.emptyItemWidth);\n layoutParam.totalWidth += itemWidth + ITEM_GAP;\n layoutParam.renderList.push({\n node: node,\n text: text,\n width: itemWidth\n });\n }\n };\n /**\n * @private\n */\n Breadcrumb.prototype._renderContent = function (seriesModel, layoutParam, normalStyleModel, emphasisModel, textStyleModel, emphasisTextStyleModel, onSelect) {\n // Start rendering.\n var lastX = 0;\n var emptyItemWidth = layoutParam.emptyItemWidth;\n var height = seriesModel.get(['breadcrumb', 'height']);\n var availableSize = layout.getAvailableSize(layoutParam.pos, layoutParam.box);\n var totalWidth = layoutParam.totalWidth;\n var renderList = layoutParam.renderList;\n var emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n for (var i = renderList.length - 1; i >= 0; i--) {\n var item = renderList[i];\n var itemNode = item.node;\n var itemWidth = item.width;\n var text = item.text;\n // Hdie text and shorten width if necessary.\n if (totalWidth > availableSize.width) {\n totalWidth -= itemWidth - emptyItemWidth;\n itemWidth = emptyItemWidth;\n text = null;\n }\n var el = new graphic.Polygon({\n shape: {\n points: makeItemPoints(lastX, 0, itemWidth, height, i === renderList.length - 1, i === 0)\n },\n style: defaults(normalStyleModel.getItemStyle(), {\n lineJoin: 'bevel'\n }),\n textContent: new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: text\n })\n }),\n textConfig: {\n position: 'inside'\n },\n z2: Z2_EMPHASIS_LIFT * 1e4,\n onclick: curry(onSelect, itemNode)\n });\n el.disableLabelAnimation = true;\n el.getTextContent().ensureState('emphasis').style = createTextStyle(emphasisTextStyleModel, {\n text: text\n });\n el.ensureState('emphasis').style = emphasisItemStyle;\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n this.group.add(el);\n packEventData(el, seriesModel, itemNode);\n lastX += itemWidth + ITEM_GAP;\n }\n };\n Breadcrumb.prototype.remove = function () {\n this.group.removeAll();\n };\n return Breadcrumb;\n}();\nfunction makeItemPoints(x, y, itemWidth, itemHeight, head, tail) {\n var points = [[head ? x : x - ARRAY_LENGTH, y], [x + itemWidth, y], [x + itemWidth, y + itemHeight], [head ? x : x - ARRAY_LENGTH, y + itemHeight]];\n !tail && points.splice(2, 0, [x + itemWidth + ARRAY_LENGTH, y + itemHeight / 2]);\n !head && points.push([x, y + itemHeight / 2]);\n return points;\n}\n// Package custom mouse event.\nfunction packEventData(el, seriesModel, itemNode) {\n getECData(el).eventData = {\n componentType: 'series',\n componentSubType: 'treemap',\n componentIndex: seriesModel.componentIndex,\n seriesIndex: seriesModel.seriesIndex,\n seriesName: seriesModel.name,\n seriesType: 'treemap',\n selfType: 'breadcrumb',\n nodeData: {\n dataIndex: itemNode && itemNode.dataIndex,\n name: itemNode && itemNode.name\n },\n treePathInfo: itemNode && wrapTreePathInfo(itemNode, seriesModel)\n };\n}\nexport default Breadcrumb;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Animate multiple elements with a single done-callback.\n *\n * @example\n * animation\n * .createWrap()\n * .add(el1, {x: 10, y: 10})\n * .add(el2, {shape: {width: 500}, style: {fill: 'red'}}, 400)\n * .done(function () { // done })\n * .start('cubicOut');\n */\nvar AnimationWrap = /** @class */function () {\n function AnimationWrap() {\n this._storage = [];\n this._elExistsMap = {};\n }\n /**\n * Caution: a el can only be added once, otherwise 'done'\n * might not be called. This method checks this (by el.id),\n * suppresses adding and returns false when existing el found.\n *\n * @return Whether adding succeeded.\n */\n AnimationWrap.prototype.add = function (el, target, duration, delay, easing) {\n if (this._elExistsMap[el.id]) {\n return false;\n }\n this._elExistsMap[el.id] = true;\n this._storage.push({\n el: el,\n target: target,\n duration: duration,\n delay: delay,\n easing: easing\n });\n return true;\n };\n /**\n * Only execute when animation done/aborted.\n */\n AnimationWrap.prototype.finished = function (callback) {\n this._finishedCallback = callback;\n return this;\n };\n /**\n * Will stop exist animation firstly.\n */\n AnimationWrap.prototype.start = function () {\n var _this = this;\n var count = this._storage.length;\n var checkTerminate = function () {\n count--;\n if (count <= 0) {\n // Guard.\n _this._storage.length = 0;\n _this._elExistsMap = {};\n _this._finishedCallback && _this._finishedCallback();\n }\n };\n for (var i = 0, len = this._storage.length; i < len; i++) {\n var item = this._storage[i];\n item.el.animateTo(item.target, {\n duration: item.duration,\n delay: item.delay,\n easing: item.easing,\n setToFinal: true,\n done: checkTerminate,\n aborted: checkTerminate\n });\n }\n return this;\n };\n return AnimationWrap;\n}();\nexport function createWrap() {\n return new AnimationWrap();\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { bind, each, indexOf, curry, extend, normalizeCssArray, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isHighDownDispatcher, setAsHighDownDispatcher, setDefaultStateProxy, enableHoverFocus, Z2_EMPHASIS_LIFT } from '../../util/states.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport * as helper from '../helper/treeHelper.js';\nimport Breadcrumb from './Breadcrumb.js';\nimport RoamController from '../../component/helper/RoamController.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as animationUtil from '../../util/animation.js';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper.js';\nimport ChartView from '../../view/Chart.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { makeInner, convertOptionIdName } from '../../util/model.js';\nimport { windowOpen } from '../../util/format.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nvar Group = graphic.Group;\nvar Rect = graphic.Rect;\nvar DRAG_THRESHOLD = 3;\nvar PATH_LABEL_NOAMAL = 'label';\nvar PATH_UPPERLABEL_NORMAL = 'upperLabel';\n// Should larger than emphasis states lift z\nvar Z2_BASE = Z2_EMPHASIS_LIFT * 10; // Should bigger than every z2.\nvar Z2_BG = Z2_EMPHASIS_LIFT * 2;\nvar Z2_CONTENT = Z2_EMPHASIS_LIFT * 3;\nvar getStateItemStyle = makeStyleMapper([['fill', 'color'],\n// `borderColor` and `borderWidth` has been occupied,\n// so use `stroke` to indicate the stroke of the rect.\n['stroke', 'strokeColor'], ['lineWidth', 'strokeWidth'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']\n// Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n// So do not transfer decal directly.\n]);\n\nvar getItemStyleNormal = function (model) {\n // Normal style props should include emphasis style props.\n var itemStyle = getStateItemStyle(model);\n // Clear styles set by emphasis.\n itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null;\n return itemStyle;\n};\nvar inner = makeInner();\nvar TreemapView = /** @class */function (_super) {\n __extends(TreemapView, _super);\n function TreemapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TreemapView.type;\n _this._state = 'ready';\n _this._storage = createStorage();\n return _this;\n }\n /**\n * @override\n */\n TreemapView.prototype.render = function (seriesModel, ecModel, api, payload) {\n var models = ecModel.findComponents({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n });\n if (indexOf(models, seriesModel) < 0) {\n return;\n }\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var payloadType = payload && payload.type;\n var layoutInfo = seriesModel.layoutInfo;\n var isInit = !this._oldTree;\n var thisStorage = this._storage;\n // Mark new root when action is treemapRootToNode.\n var reRoot = payloadType === 'treemapRootToNode' && targetInfo && thisStorage ? {\n rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()],\n direction: payload.direction\n } : null;\n var containerGroup = this._giveContainerGroup(layoutInfo);\n var hasAnimation = seriesModel.get('animation');\n var renderResult = this._doRender(containerGroup, seriesModel, reRoot);\n hasAnimation && !isInit && (!payloadType || payloadType === 'treemapZoomToNode' || payloadType === 'treemapRootToNode') ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot) : renderResult.renderFinally();\n this._resetController(api);\n this._renderBreadcrumb(seriesModel, api, targetInfo);\n };\n TreemapView.prototype._giveContainerGroup = function (layoutInfo) {\n var containerGroup = this._containerGroup;\n if (!containerGroup) {\n // FIXME\n // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。\n containerGroup = this._containerGroup = new Group();\n this._initEvents(containerGroup);\n this.group.add(containerGroup);\n }\n containerGroup.x = layoutInfo.x;\n containerGroup.y = layoutInfo.y;\n return containerGroup;\n };\n TreemapView.prototype._doRender = function (containerGroup, seriesModel, reRoot) {\n var thisTree = seriesModel.getData().tree;\n var oldTree = this._oldTree;\n // Clear last shape records.\n var lastsForAnimation = createStorage();\n var thisStorage = createStorage();\n var oldStorage = this._storage;\n var willInvisibleEls = [];\n function doRenderNode(thisNode, oldNode, parentGroup, depth) {\n return renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth);\n }\n // Notice: When thisTree and oldTree are the same tree (see list.cloneShallow),\n // the oldTree is actually losted, so we cannot find all of the old graphic\n // elements from tree. So we use this strategy: make element storage, move\n // from old storage to new storage, clear old storage.\n dualTravel(thisTree.root ? [thisTree.root] : [], oldTree && oldTree.root ? [oldTree.root] : [], containerGroup, thisTree === oldTree || !oldTree, 0);\n // Process all removing.\n var willDeleteEls = clearStorage(oldStorage);\n this._oldTree = thisTree;\n this._storage = thisStorage;\n if (this._controllerHost) {\n var _oldRootLayout = this.seriesModel.layoutInfo;\n var rootLayout = thisTree.root.getLayout();\n if (rootLayout.width === _oldRootLayout.width && rootLayout.height === _oldRootLayout.height) {\n this._controllerHost.zoom = 1;\n }\n }\n return {\n lastsForAnimation: lastsForAnimation,\n willDeleteEls: willDeleteEls,\n renderFinally: renderFinally\n };\n function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, depth) {\n // When 'render' is triggered by action,\n // 'this' and 'old' may be the same tree,\n // we use rawIndex in that case.\n if (sameTree) {\n oldViewChildren = thisViewChildren;\n each(thisViewChildren, function (child, index) {\n !child.isRemoved() && processNode(index, index);\n });\n }\n // Diff hierarchically (diff only in each subtree, but not whole).\n // because, consistency of view is important.\n else {\n new DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey).add(processNode).update(processNode).remove(curry(processNode, null)).execute();\n }\n function getKey(node) {\n // Identify by name or raw index.\n return node.getId();\n }\n function processNode(newIndex, oldIndex) {\n var thisNode = newIndex != null ? thisViewChildren[newIndex] : null;\n var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null;\n var group = doRenderNode(thisNode, oldNode, parentGroup, depth);\n group && dualTravel(thisNode && thisNode.viewChildren || [], oldNode && oldNode.viewChildren || [], group, sameTree, depth + 1);\n }\n }\n function clearStorage(storage) {\n var willDeleteEls = createStorage();\n storage && each(storage, function (store, storageName) {\n var delEls = willDeleteEls[storageName];\n each(store, function (el) {\n el && (delEls.push(el), inner(el).willDelete = true);\n });\n });\n return willDeleteEls;\n }\n function renderFinally() {\n each(willDeleteEls, function (els) {\n each(els, function (el) {\n el.parent && el.parent.remove(el);\n });\n });\n each(willInvisibleEls, function (el) {\n el.invisible = true;\n // Setting invisible is for optimizing, so no need to set dirty,\n // just mark as invisible.\n el.dirty();\n });\n }\n };\n TreemapView.prototype._doAnimation = function (containerGroup, renderResult, seriesModel, reRoot) {\n var durationOption = seriesModel.get('animationDurationUpdate');\n var easingOption = seriesModel.get('animationEasing');\n // TODO: do not support function until necessary.\n var duration = (isFunction(durationOption) ? 0 : durationOption) || 0;\n var easing = (isFunction(easingOption) ? null : easingOption) || 'cubicOut';\n var animationWrap = animationUtil.createWrap();\n // Make delete animations.\n each(renderResult.willDeleteEls, function (store, storageName) {\n each(store, function (el, rawIndex) {\n if (el.invisible) {\n return;\n }\n var parent = el.parent; // Always has parent, and parent is nodeGroup.\n var target;\n var innerStore = inner(parent);\n if (reRoot && reRoot.direction === 'drillDown') {\n target = parent === reRoot.rootNodeGroup\n // This is the content element of view root.\n // Only `content` will enter this branch, because\n // `background` and `nodeGroup` will not be deleted.\n ? {\n shape: {\n x: 0,\n y: 0,\n width: innerStore.nodeWidth,\n height: innerStore.nodeHeight\n },\n style: {\n opacity: 0\n }\n }\n // Others.\n : {\n style: {\n opacity: 0\n }\n };\n } else {\n var targetX = 0;\n var targetY = 0;\n if (!innerStore.willDelete) {\n // Let node animate to right-bottom corner, cooperating with fadeout,\n // which is appropriate for user understanding.\n // Divided by 2 for reRoot rolling up effect.\n targetX = innerStore.nodeWidth / 2;\n targetY = innerStore.nodeHeight / 2;\n }\n target = storageName === 'nodeGroup' ? {\n x: targetX,\n y: targetY,\n style: {\n opacity: 0\n }\n } : {\n shape: {\n x: targetX,\n y: targetY,\n width: 0,\n height: 0\n },\n style: {\n opacity: 0\n }\n };\n }\n // TODO: do not support delay until necessary.\n target && animationWrap.add(el, target, duration, 0, easing);\n });\n });\n // Make other animations\n each(this._storage, function (store, storageName) {\n each(store, function (el, rawIndex) {\n var last = renderResult.lastsForAnimation[storageName][rawIndex];\n var target = {};\n if (!last) {\n return;\n }\n if (el instanceof graphic.Group) {\n if (last.oldX != null) {\n target.x = el.x;\n target.y = el.y;\n el.x = last.oldX;\n el.y = last.oldY;\n }\n } else {\n if (last.oldShape) {\n target.shape = extend({}, el.shape);\n el.setShape(last.oldShape);\n }\n if (last.fadein) {\n el.setStyle('opacity', 0);\n target.style = {\n opacity: 1\n };\n }\n // When animation is stopped for succedent animation starting,\n // el.style.opacity might not be 1\n else if (el.style.opacity !== 1) {\n target.style = {\n opacity: 1\n };\n }\n }\n animationWrap.add(el, target, duration, 0, easing);\n });\n }, this);\n this._state = 'animating';\n animationWrap.finished(bind(function () {\n this._state = 'ready';\n renderResult.renderFinally();\n }, this)).start();\n };\n TreemapView.prototype._resetController = function (api) {\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n if (!controllerHost) {\n this._controllerHost = {\n target: this.group\n };\n controllerHost = this._controllerHost;\n }\n // Init controller.\n if (!controller) {\n controller = this._controller = new RoamController(api.getZr());\n controller.enable(this.seriesModel.get('roam'));\n controllerHost.zoomLimit = this.seriesModel.get('scaleLimit');\n controllerHost.zoom = this.seriesModel.get('zoom');\n controller.on('pan', bind(this._onPan, this));\n controller.on('zoom', bind(this._onZoom, this));\n }\n var rect = new BoundingRect(0, 0, api.getWidth(), api.getHeight());\n controller.setPointerChecker(function (e, x, y) {\n return rect.contain(x, y);\n });\n };\n TreemapView.prototype._clearController = function () {\n var controller = this._controller;\n this._controllerHost = null;\n if (controller) {\n controller.dispose();\n controller = null;\n }\n };\n TreemapView.prototype._onPan = function (e) {\n if (this._state !== 'animating' && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)) {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n if (!root) {\n return;\n }\n var rootLayout = root.getLayout();\n if (!rootLayout) {\n return;\n }\n this.api.dispatchAction({\n type: 'treemapMove',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rootLayout.x + e.dx,\n y: rootLayout.y + e.dy,\n width: rootLayout.width,\n height: rootLayout.height\n }\n });\n }\n };\n TreemapView.prototype._onZoom = function (e) {\n var mouseX = e.originX;\n var mouseY = e.originY;\n var zoomDelta = e.scale;\n if (this._state !== 'animating') {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n if (!root) {\n return;\n }\n var rootLayout = root.getLayout();\n if (!rootLayout) {\n return;\n }\n var rect = new BoundingRect(rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height);\n // scaleLimit\n var zoomLimit = null;\n var _controllerHost = this._controllerHost;\n zoomLimit = _controllerHost.zoomLimit;\n var newZoom = _controllerHost.zoom = _controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n var zoomScale = newZoom / _controllerHost.zoom;\n _controllerHost.zoom = newZoom;\n var layoutInfo = this.seriesModel.layoutInfo;\n // Transform mouse coord from global to containerGroup.\n mouseX -= layoutInfo.x;\n mouseY -= layoutInfo.y;\n // Scale root bounding rect.\n var m = matrix.create();\n matrix.translate(m, m, [-mouseX, -mouseY]);\n matrix.scale(m, m, [zoomScale, zoomScale]);\n matrix.translate(m, m, [mouseX, mouseY]);\n rect.applyTransform(m);\n this.api.dispatchAction({\n type: 'treemapRender',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n }\n };\n TreemapView.prototype._initEvents = function (containerGroup) {\n var _this = this;\n containerGroup.on('click', function (e) {\n if (_this._state !== 'ready') {\n return;\n }\n var nodeClick = _this.seriesModel.get('nodeClick', true);\n if (!nodeClick) {\n return;\n }\n var targetInfo = _this.findTarget(e.offsetX, e.offsetY);\n if (!targetInfo) {\n return;\n }\n var node = targetInfo.node;\n if (node.getLayout().isLeafRoot) {\n _this._rootToNode(targetInfo);\n } else {\n if (nodeClick === 'zoomToNode') {\n _this._zoomToNode(targetInfo);\n } else if (nodeClick === 'link') {\n var itemModel = node.hostTree.data.getItemModel(node.dataIndex);\n var link = itemModel.get('link', true);\n var linkTarget = itemModel.get('target', true) || 'blank';\n link && windowOpen(link, linkTarget);\n }\n }\n }, this);\n };\n TreemapView.prototype._renderBreadcrumb = function (seriesModel, api, targetInfo) {\n var _this = this;\n if (!targetInfo) {\n targetInfo = seriesModel.get('leafDepth', true) != null ? {\n node: seriesModel.getViewRoot()\n }\n // FIXME\n // better way?\n // Find breadcrumb tail on center of containerGroup.\n : this.findTarget(api.getWidth() / 2, api.getHeight() / 2);\n if (!targetInfo) {\n targetInfo = {\n node: seriesModel.getData().tree.root\n };\n }\n }\n (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group))).render(seriesModel, api, targetInfo.node, function (node) {\n if (_this._state !== 'animating') {\n helper.aboveViewRoot(seriesModel.getViewRoot(), node) ? _this._rootToNode({\n node: node\n }) : _this._zoomToNode({\n node: node\n });\n }\n });\n };\n /**\n * @override\n */\n TreemapView.prototype.remove = function () {\n this._clearController();\n this._containerGroup && this._containerGroup.removeAll();\n this._storage = createStorage();\n this._state = 'ready';\n this._breadcrumb && this._breadcrumb.remove();\n };\n TreemapView.prototype.dispose = function () {\n this._clearController();\n };\n TreemapView.prototype._zoomToNode = function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapZoomToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n };\n TreemapView.prototype._rootToNode = function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapRootToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n };\n /**\n * @public\n * @param {number} x Global coord x.\n * @param {number} y Global coord y.\n * @return {Object} info If not found, return undefined;\n * @return {number} info.node Target node.\n * @return {number} info.offsetX x refer to target node.\n * @return {number} info.offsetY y refer to target node.\n */\n TreemapView.prototype.findTarget = function (x, y) {\n var targetInfo;\n var viewRoot = this.seriesModel.getViewRoot();\n viewRoot.eachNode({\n attr: 'viewChildren',\n order: 'preorder'\n }, function (node) {\n var bgEl = this._storage.background[node.getRawIndex()];\n // If invisible, there might be no element.\n if (bgEl) {\n var point = bgEl.transformCoordToLocal(x, y);\n var shape = bgEl.shape;\n // For performance consideration, don't use 'getBoundingRect'.\n if (shape.x <= point[0] && point[0] <= shape.x + shape.width && shape.y <= point[1] && point[1] <= shape.y + shape.height) {\n targetInfo = {\n node: node,\n offsetX: point[0],\n offsetY: point[1]\n };\n } else {\n return false; // Suppress visit subtree.\n }\n }\n }, this);\n return targetInfo;\n };\n TreemapView.type = 'treemap';\n return TreemapView;\n}(ChartView);\n/**\n * @inner\n */\nfunction createStorage() {\n return {\n nodeGroup: [],\n background: [],\n content: []\n };\n}\n/**\n * @inner\n * @return Return undefined means do not travel further.\n */\nfunction renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) {\n // Whether under viewRoot.\n if (!thisNode) {\n // Deleting nodes will be performed finally. This method just find\n // element from old storage, or create new element, set them to new\n // storage, and set styles.\n return;\n }\n // -------------------------------------------------------------------\n // Start of closure variables available in \"Procedures in renderNode\".\n var thisLayout = thisNode.getLayout();\n var data = seriesModel.getData();\n var nodeModel = thisNode.getModel();\n // Only for enabling highlight/downplay. Clear firstly.\n // Because some node will not be rendered.\n data.setItemGraphicEl(thisNode.dataIndex, null);\n if (!thisLayout || !thisLayout.isInView) {\n return;\n }\n var thisWidth = thisLayout.width;\n var thisHeight = thisLayout.height;\n var borderWidth = thisLayout.borderWidth;\n var thisInvisible = thisLayout.invisible;\n var thisRawIndex = thisNode.getRawIndex();\n var oldRawIndex = oldNode && oldNode.getRawIndex();\n var thisViewChildren = thisNode.viewChildren;\n var upperHeight = thisLayout.upperHeight;\n var isParent = thisViewChildren && thisViewChildren.length;\n var itemStyleNormalModel = nodeModel.getModel('itemStyle');\n var itemStyleEmphasisModel = nodeModel.getModel(['emphasis', 'itemStyle']);\n var itemStyleBlurModel = nodeModel.getModel(['blur', 'itemStyle']);\n var itemStyleSelectModel = nodeModel.getModel(['select', 'itemStyle']);\n var borderRadius = itemStyleNormalModel.get('borderRadius') || 0;\n // End of closure ariables available in \"Procedures in renderNode\".\n // -----------------------------------------------------------------\n // Node group\n var group = giveGraphic('nodeGroup', Group);\n if (!group) {\n return;\n }\n parentGroup.add(group);\n // x,y are not set when el is above view root.\n group.x = thisLayout.x || 0;\n group.y = thisLayout.y || 0;\n group.markRedraw();\n inner(group).nodeWidth = thisWidth;\n inner(group).nodeHeight = thisHeight;\n if (thisLayout.isAboveViewRoot) {\n return group;\n }\n // Background\n var bg = giveGraphic('background', Rect, depth, Z2_BG);\n bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight);\n var emphasisModel = nodeModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var isDisabled = emphasisModel.get('disabled');\n var focusOrIndices = focus === 'ancestor' ? thisNode.getAncestorsIndices() : focus === 'descendant' ? thisNode.getDescendantIndices() : focus;\n // No children, render content.\n if (isParent) {\n // Because of the implementation about \"traverse\" in graphic hover style, we\n // can not set hover listener on the \"group\" of non-leaf node. Otherwise the\n // hover event from the descendents will be listenered.\n if (isHighDownDispatcher(group)) {\n setAsHighDownDispatcher(group, false);\n }\n if (bg) {\n setAsHighDownDispatcher(bg, !isDisabled);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, bg);\n enableHoverFocus(bg, focusOrIndices, blurScope);\n }\n } else {\n var content = giveGraphic('content', Rect, depth, Z2_CONTENT);\n content && renderContent(group, content);\n bg.disableMorphing = true;\n if (bg && isHighDownDispatcher(bg)) {\n setAsHighDownDispatcher(bg, false);\n }\n setAsHighDownDispatcher(group, !isDisabled);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, group);\n enableHoverFocus(group, focusOrIndices, blurScope);\n }\n return group;\n // ----------------------------\n // | Procedures in renderNode |\n // ----------------------------\n function renderBackground(group, bg, useUpperLabel) {\n var ecData = getECData(bg);\n // For tooltip.\n ecData.dataIndex = thisNode.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n bg.setShape({\n x: 0,\n y: 0,\n width: thisWidth,\n height: thisHeight,\n r: borderRadius\n });\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(bg);\n } else {\n bg.invisible = false;\n var style = thisNode.getVisual('style');\n var visualBorderColor = style.stroke;\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualBorderColor;\n var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel);\n emphasisStyle.fill = itemStyleEmphasisModel.get('borderColor');\n var blurStyle = getStateItemStyle(itemStyleBlurModel);\n blurStyle.fill = itemStyleBlurModel.get('borderColor');\n var selectStyle = getStateItemStyle(itemStyleSelectModel);\n selectStyle.fill = itemStyleSelectModel.get('borderColor');\n if (useUpperLabel) {\n var upperLabelWidth = thisWidth - 2 * borderWidth;\n prepareText(\n // PENDING: convert ZRColor to ColorString for text.\n bg, visualBorderColor, style.opacity, {\n x: borderWidth,\n y: 0,\n width: upperLabelWidth,\n height: upperHeight\n });\n }\n // For old bg.\n else {\n bg.removeTextContent();\n }\n bg.setStyle(normalStyle);\n bg.ensureState('emphasis').style = emphasisStyle;\n bg.ensureState('blur').style = blurStyle;\n bg.ensureState('select').style = selectStyle;\n setDefaultStateProxy(bg);\n }\n group.add(bg);\n }\n function renderContent(group, content) {\n var ecData = getECData(content);\n // For tooltip.\n ecData.dataIndex = thisNode.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);\n var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);\n content.culling = true;\n content.setShape({\n x: borderWidth,\n y: borderWidth,\n width: contentWidth,\n height: contentHeight,\n r: borderRadius\n });\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(content);\n } else {\n content.invisible = false;\n var nodeStyle = thisNode.getVisual('style');\n var visualColor = nodeStyle.fill;\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualColor;\n normalStyle.decal = nodeStyle.decal;\n var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel);\n var blurStyle = getStateItemStyle(itemStyleBlurModel);\n var selectStyle = getStateItemStyle(itemStyleSelectModel);\n // PENDING: convert ZRColor to ColorString for text.\n prepareText(content, visualColor, nodeStyle.opacity, null);\n content.setStyle(normalStyle);\n content.ensureState('emphasis').style = emphasisStyle;\n content.ensureState('blur').style = blurStyle;\n content.ensureState('select').style = selectStyle;\n setDefaultStateProxy(content);\n }\n group.add(content);\n }\n function processInvisible(element) {\n // Delay invisible setting utill animation finished,\n // avoid element vanish suddenly before animation.\n !element.invisible && willInvisibleEls.push(element);\n }\n function prepareText(rectEl, visualColor, visualOpacity,\n // Can be null/undefined\n upperLabelRect) {\n var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL);\n var defaultText = convertOptionIdName(nodeModel.get('name'), null);\n var isShow = normalLabelModel.getShallow('show');\n setLabelStyle(rectEl, getLabelStatesModels(nodeModel, upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL), {\n defaultText: isShow ? defaultText : null,\n inheritColor: visualColor,\n defaultOpacity: visualOpacity,\n labelFetcher: seriesModel,\n labelDataIndex: thisNode.dataIndex\n });\n var textEl = rectEl.getTextContent();\n if (!textEl) {\n return;\n }\n var textStyle = textEl.style;\n var textPadding = normalizeCssArray(textStyle.padding || 0);\n if (upperLabelRect) {\n rectEl.setTextConfig({\n layoutRect: upperLabelRect\n });\n textEl.disableLabelLayout = true;\n }\n textEl.beforeUpdate = function () {\n var width = Math.max((upperLabelRect ? upperLabelRect.width : rectEl.shape.width) - textPadding[1] - textPadding[3], 0);\n var height = Math.max((upperLabelRect ? upperLabelRect.height : rectEl.shape.height) - textPadding[0] - textPadding[2], 0);\n if (textStyle.width !== width || textStyle.height !== height) {\n textEl.setStyle({\n width: width,\n height: height\n });\n }\n };\n textStyle.truncateMinChar = 2;\n textStyle.lineOverflow = 'truncate';\n addDrillDownIcon(textStyle, upperLabelRect, thisLayout);\n var textEmphasisState = textEl.getState('emphasis');\n addDrillDownIcon(textEmphasisState ? textEmphasisState.style : null, upperLabelRect, thisLayout);\n }\n function addDrillDownIcon(style, upperLabelRect, thisLayout) {\n var text = style ? style.text : null;\n if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {\n var iconChar = seriesModel.get('drillDownIcon', true);\n style.text = iconChar ? iconChar + ' ' + text : text;\n }\n }\n function giveGraphic(storageName, Ctor, depth, z) {\n var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];\n var lasts = lastsForAnimation[storageName];\n if (element) {\n // Remove from oldStorage\n oldStorage[storageName][oldRawIndex] = null;\n prepareAnimationWhenHasOld(lasts, element);\n }\n // If invisible and no old element, do not create new element (for optimizing).\n else if (!thisInvisible) {\n element = new Ctor();\n if (element instanceof Displayable) {\n element.z2 = calculateZ2(depth, z);\n }\n prepareAnimationWhenNoOld(lasts, element);\n }\n // Set to thisStorage\n return thisStorage[storageName][thisRawIndex] = element;\n }\n function prepareAnimationWhenHasOld(lasts, element) {\n var lastCfg = lasts[thisRawIndex] = {};\n if (element instanceof Group) {\n lastCfg.oldX = element.x;\n lastCfg.oldY = element.y;\n } else {\n lastCfg.oldShape = extend({}, element.shape);\n }\n }\n // If a element is new, we need to find the animation start point carefully,\n // otherwise it will looks strange when 'zoomToNode'.\n function prepareAnimationWhenNoOld(lasts, element) {\n var lastCfg = lasts[thisRawIndex] = {};\n var parentNode = thisNode.parentNode;\n var isGroup = element instanceof graphic.Group;\n if (parentNode && (!reRoot || reRoot.direction === 'drillDown')) {\n var parentOldX = 0;\n var parentOldY = 0;\n // New nodes appear from right-bottom corner in 'zoomToNode' animation.\n // For convenience, get old bounding rect from background.\n var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()];\n if (!reRoot && parentOldBg && parentOldBg.oldShape) {\n parentOldX = parentOldBg.oldShape.width;\n parentOldY = parentOldBg.oldShape.height;\n }\n // When no parent old shape found, its parent is new too,\n // so we can just use {x:0, y:0}.\n if (isGroup) {\n lastCfg.oldX = 0;\n lastCfg.oldY = parentOldY;\n } else {\n lastCfg.oldShape = {\n x: parentOldX,\n y: parentOldY,\n width: 0,\n height: 0\n };\n }\n }\n // Fade in, user can be aware that these nodes are new.\n lastCfg.fadein = !isGroup;\n }\n}\n// We cannot set all background with the same z, because the behaviour of\n// drill down and roll up differ background creation sequence from tree\n// hierarchy sequence, which cause lower background elements to overlap\n// upper ones. So we calculate z based on depth.\n// Moreover, we try to shrink down z interval to [0, 1] to avoid that\n// treemap with large z overlaps other components.\nfunction calculateZ2(depth, z2InLevel) {\n return depth * Z2_BASE + z2InLevel;\n}\nexport default TreemapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as zrColor from 'zrender/lib/tool/color.js';\nimport { linearMap } from '../util/number.js';\nimport { warn } from '../util/log.js';\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar CATEGORY_DEFAULT_VISUAL_INDEX = -1;\nvar VisualMapping = /** @class */function () {\n function VisualMapping(option) {\n var mappingMethod = option.mappingMethod;\n var visualType = option.type;\n var thisOption = this.option = zrUtil.clone(option);\n this.type = visualType;\n this.mappingMethod = mappingMethod;\n this._normalizeData = normalizers[mappingMethod];\n var visualHandler = VisualMapping.visualHandlers[visualType];\n this.applyVisual = visualHandler.applyVisual;\n this.getColorMapper = visualHandler.getColorMapper;\n this._normalizedToVisual = visualHandler._normalizedToVisual[mappingMethod];\n if (mappingMethod === 'piecewise') {\n normalizeVisualRange(thisOption);\n preprocessForPiecewise(thisOption);\n } else if (mappingMethod === 'category') {\n thisOption.categories ? preprocessForSpecifiedCategory(thisOption)\n // categories is ordinal when thisOption.categories not specified,\n // which need no more preprocess except normalize visual.\n : normalizeVisualRange(thisOption, true);\n } else {\n // mappingMethod === 'linear' or 'fixed'\n zrUtil.assert(mappingMethod !== 'linear' || thisOption.dataExtent);\n normalizeVisualRange(thisOption);\n }\n }\n VisualMapping.prototype.mapValueToVisual = function (value) {\n var normalized = this._normalizeData(value);\n return this._normalizedToVisual(normalized, value);\n };\n VisualMapping.prototype.getNormalizer = function () {\n return zrUtil.bind(this._normalizeData, this);\n };\n /**\n * List available visual types.\n *\n * @public\n * @return {Array.}\n */\n VisualMapping.listVisualTypes = function () {\n return zrUtil.keys(VisualMapping.visualHandlers);\n };\n // /**\n // * @public\n // */\n // static addVisualHandler(name, handler) {\n // visualHandlers[name] = handler;\n // }\n /**\n * @public\n */\n VisualMapping.isValidType = function (visualType) {\n return VisualMapping.visualHandlers.hasOwnProperty(visualType);\n };\n /**\n * Convenient method.\n * Visual can be Object or Array or primary type.\n */\n VisualMapping.eachVisual = function (visual, callback, context) {\n if (zrUtil.isObject(visual)) {\n zrUtil.each(visual, callback, context);\n } else {\n callback.call(context, visual);\n }\n };\n VisualMapping.mapVisual = function (visual, callback, context) {\n var isPrimary;\n var newVisual = zrUtil.isArray(visual) ? [] : zrUtil.isObject(visual) ? {} : (isPrimary = true, null);\n VisualMapping.eachVisual(visual, function (v, key) {\n var newVal = callback.call(context, v, key);\n isPrimary ? newVisual = newVal : newVisual[key] = newVal;\n });\n return newVisual;\n };\n /**\n * Retrieve visual properties from given object.\n */\n VisualMapping.retrieveVisuals = function (obj) {\n var ret = {};\n var hasVisual;\n obj && each(VisualMapping.visualHandlers, function (h, visualType) {\n if (obj.hasOwnProperty(visualType)) {\n ret[visualType] = obj[visualType];\n hasVisual = true;\n }\n });\n return hasVisual ? ret : null;\n };\n /**\n * Give order to visual types, considering colorSaturation, colorAlpha depends on color.\n *\n * @public\n * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...}\n * IF Array, like: ['color', 'symbol', 'colorSaturation']\n * @return {Array.} Sorted visual types.\n */\n VisualMapping.prepareVisualTypes = function (visualTypes) {\n if (zrUtil.isArray(visualTypes)) {\n visualTypes = visualTypes.slice();\n } else if (isObject(visualTypes)) {\n var types_1 = [];\n each(visualTypes, function (item, type) {\n types_1.push(type);\n });\n visualTypes = types_1;\n } else {\n return [];\n }\n visualTypes.sort(function (type1, type2) {\n // color should be front of colorSaturation, colorAlpha, ...\n // symbol and symbolSize do not matter.\n return type2 === 'color' && type1 !== 'color' && type1.indexOf('color') === 0 ? 1 : -1;\n });\n return visualTypes;\n };\n /**\n * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'.\n * Other visuals are only depends on themself.\n */\n VisualMapping.dependsOn = function (visualType1, visualType2) {\n return visualType2 === 'color' ? !!(visualType1 && visualType1.indexOf(visualType2) === 0) : visualType1 === visualType2;\n };\n /**\n * @param value\n * @param pieceList [{value: ..., interval: [min, max]}, ...]\n * Always from small to big.\n * @param findClosestWhenOutside Default to be false\n * @return index\n */\n VisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) {\n var possibleI;\n var abs = Infinity;\n // value has the higher priority.\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var pieceValue = pieceList[i].value;\n if (pieceValue != null) {\n if (pieceValue === value\n // FIXME\n // It is supposed to compare value according to value type of dimension,\n // but currently value type can exactly be string or number.\n // Compromise for numeric-like string (like '12'), especially\n // in the case that visualMap.categories is ['22', '33'].\n || zrUtil.isString(pieceValue) && pieceValue === value + '') {\n return i;\n }\n findClosestWhenOutside && updatePossible(pieceValue, i);\n }\n }\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var piece = pieceList[i];\n var interval = piece.interval;\n var close_1 = piece.close;\n if (interval) {\n if (interval[0] === -Infinity) {\n if (littleThan(close_1[1], value, interval[1])) {\n return i;\n }\n } else if (interval[1] === Infinity) {\n if (littleThan(close_1[0], interval[0], value)) {\n return i;\n }\n } else if (littleThan(close_1[0], interval[0], value) && littleThan(close_1[1], value, interval[1])) {\n return i;\n }\n findClosestWhenOutside && updatePossible(interval[0], i);\n findClosestWhenOutside && updatePossible(interval[1], i);\n }\n }\n if (findClosestWhenOutside) {\n return value === Infinity ? pieceList.length - 1 : value === -Infinity ? 0 : possibleI;\n }\n function updatePossible(val, index) {\n var newAbs = Math.abs(val - value);\n if (newAbs < abs) {\n abs = newAbs;\n possibleI = index;\n }\n }\n };\n VisualMapping.visualHandlers = {\n color: {\n applyVisual: makeApplyVisual('color'),\n getColorMapper: function () {\n var thisOption = this.option;\n return zrUtil.bind(thisOption.mappingMethod === 'category' ? function (value, isNormalized) {\n !isNormalized && (value = this._normalizeData(value));\n return doMapCategory.call(this, value);\n } : function (value, isNormalized, out) {\n // If output rgb array\n // which will be much faster and useful in pixel manipulation\n var returnRGBArray = !!out;\n !isNormalized && (value = this._normalizeData(value));\n out = zrColor.fastLerp(value, thisOption.parsedVisual, out);\n return returnRGBArray ? out : zrColor.stringify(out, 'rgba');\n }, this);\n },\n _normalizedToVisual: {\n linear: function (normalized) {\n return zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n colorHue: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, value);\n }),\n colorSaturation: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, value);\n }),\n colorLightness: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, null, value);\n }),\n colorAlpha: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyAlpha(color, value);\n }),\n decal: {\n applyVisual: makeApplyVisual('decal'),\n _normalizedToVisual: {\n linear: null,\n category: doMapCategory,\n piecewise: null,\n fixed: null\n }\n },\n opacity: {\n applyVisual: makeApplyVisual('opacity'),\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n },\n liftZ: {\n applyVisual: makeApplyVisual('liftZ'),\n _normalizedToVisual: {\n linear: doMapFixed,\n category: doMapFixed,\n piecewise: doMapFixed,\n fixed: doMapFixed\n }\n },\n symbol: {\n applyVisual: function (value, getter, setter) {\n var symbolCfg = this.mapValueToVisual(value);\n setter('symbol', symbolCfg);\n },\n _normalizedToVisual: {\n linear: doMapToArray,\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = doMapToArray.call(this, normalized);\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n symbolSize: {\n applyVisual: makeApplyVisual('symbolSize'),\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n }\n };\n return VisualMapping;\n}();\nfunction preprocessForPiecewise(thisOption) {\n var pieceList = thisOption.pieceList;\n thisOption.hasSpecialVisual = false;\n zrUtil.each(pieceList, function (piece, index) {\n piece.originIndex = index;\n // piece.visual is \"result visual value\" but not\n // a visual range, so it does not need to be normalized.\n if (piece.visual != null) {\n thisOption.hasSpecialVisual = true;\n }\n });\n}\nfunction preprocessForSpecifiedCategory(thisOption) {\n // Hash categories.\n var categories = thisOption.categories;\n var categoryMap = thisOption.categoryMap = {};\n var visual = thisOption.visual;\n each(categories, function (cate, index) {\n categoryMap[cate] = index;\n });\n // Process visual map input.\n if (!zrUtil.isArray(visual)) {\n var visualArr_1 = [];\n if (zrUtil.isObject(visual)) {\n each(visual, function (v, cate) {\n var index = categoryMap[cate];\n visualArr_1[index != null ? index : CATEGORY_DEFAULT_VISUAL_INDEX] = v;\n });\n } else {\n // Is primary type, represents default visual.\n visualArr_1[CATEGORY_DEFAULT_VISUAL_INDEX] = visual;\n }\n visual = setVisualToOption(thisOption, visualArr_1);\n }\n // Remove categories that has no visual,\n // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX.\n for (var i = categories.length - 1; i >= 0; i--) {\n if (visual[i] == null) {\n delete categoryMap[categories[i]];\n categories.pop();\n }\n }\n}\nfunction normalizeVisualRange(thisOption, isCategory) {\n var visual = thisOption.visual;\n var visualArr = [];\n if (zrUtil.isObject(visual)) {\n each(visual, function (v) {\n visualArr.push(v);\n });\n } else if (visual != null) {\n visualArr.push(visual);\n }\n var doNotNeedPair = {\n color: 1,\n symbol: 1\n };\n if (!isCategory && visualArr.length === 1 && !doNotNeedPair.hasOwnProperty(thisOption.type)) {\n // Do not care visualArr.length === 0, which is illegal.\n visualArr[1] = visualArr[0];\n }\n setVisualToOption(thisOption, visualArr);\n}\nfunction makePartialColorVisualHandler(applyValue) {\n return {\n applyVisual: function (value, getter, setter) {\n // Only used in HSL\n var colorChannel = this.mapValueToVisual(value);\n // Must not be array value\n setter('color', applyValue(getter('color'), colorChannel));\n },\n _normalizedToVisual: createNormalizedToNumericVisual([0, 1])\n };\n}\nfunction doMapToArray(normalized) {\n var visual = this.option.visual;\n return visual[Math.round(linearMap(normalized, [0, 1], [0, visual.length - 1], true))] || {}; // TODO {}?\n}\n\nfunction makeApplyVisual(visualType) {\n return function (value, getter, setter) {\n setter(visualType, this.mapValueToVisual(value));\n };\n}\nfunction doMapCategory(normalized) {\n var visual = this.option.visual;\n return visual[this.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX ? normalized % visual.length : normalized];\n}\nfunction doMapFixed() {\n // visual will be convert to array.\n return this.option.visual[0];\n}\n/**\n * Create mapped to numeric visual\n */\nfunction createNormalizedToNumericVisual(sourceExtent) {\n return {\n linear: function (normalized) {\n return linearMap(normalized, sourceExtent, this.option.visual, true);\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = linearMap(normalized, sourceExtent, this.option.visual, true);\n }\n return result;\n },\n fixed: doMapFixed\n };\n}\nfunction getSpecifiedVisual(value) {\n var thisOption = this.option;\n var pieceList = thisOption.pieceList;\n if (thisOption.hasSpecialVisual) {\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList);\n var piece = pieceList[pieceIndex];\n if (piece && piece.visual) {\n return piece.visual[this.type];\n }\n }\n}\nfunction setVisualToOption(thisOption, visualArr) {\n thisOption.visual = visualArr;\n if (thisOption.type === 'color') {\n thisOption.parsedVisual = zrUtil.map(visualArr, function (item) {\n var color = zrColor.parse(item);\n if (!color && process.env.NODE_ENV !== 'production') {\n warn(\"'\" + item + \"' is an illegal color, fallback to '#000000'\", true);\n }\n return color || [0, 0, 0, 1];\n });\n }\n return visualArr;\n}\n/**\n * Normalizers by mapping methods.\n */\nvar normalizers = {\n linear: function (value) {\n return linearMap(value, this.option.dataExtent, [0, 1], true);\n },\n piecewise: function (value) {\n var pieceList = this.option.pieceList;\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList, true);\n if (pieceIndex != null) {\n return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true);\n }\n },\n category: function (value) {\n var index = this.option.categories ? this.option.categoryMap[value] : value; // ordinal value\n return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index;\n },\n fixed: zrUtil.noop\n};\nfunction littleThan(close, a, b) {\n return close ? a <= b : a < b;\n}\nexport default VisualMapping;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport { each, extend, isArray } from 'zrender/lib/core/util.js';\nimport { modifyHSL, modifyAlpha } from 'zrender/lib/tool/color.js';\nimport { makeInner } from '../../util/model.js';\nvar ITEM_STYLE_NORMAL = 'itemStyle';\nvar inner = makeInner();\nexport default {\n seriesType: 'treemap',\n reset: function (seriesModel) {\n var tree = seriesModel.getData().tree;\n var root = tree.root;\n if (root.isRemoved()) {\n return;\n }\n travelTree(root,\n // Visual should calculate from tree root but not view root.\n {}, seriesModel.getViewRoot().getAncestors(), seriesModel);\n }\n};\nfunction travelTree(node, designatedVisual, viewRootAncestors, seriesModel) {\n var nodeModel = node.getModel();\n var nodeLayout = node.getLayout();\n var data = node.hostTree.data;\n // Optimize\n if (!nodeLayout || nodeLayout.invisible || !nodeLayout.isInView) {\n return;\n }\n var nodeItemStyleModel = nodeModel.getModel(ITEM_STYLE_NORMAL);\n var visuals = buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel);\n var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style');\n // calculate border color\n var borderColor = nodeItemStyleModel.get('borderColor');\n var borderColorSaturation = nodeItemStyleModel.get('borderColorSaturation');\n var thisNodeColor;\n if (borderColorSaturation != null) {\n // For performance, do not always execute 'calculateColor'.\n thisNodeColor = calculateColor(visuals);\n borderColor = calculateBorderColor(borderColorSaturation, thisNodeColor);\n }\n existsStyle.stroke = borderColor;\n var viewChildren = node.viewChildren;\n if (!viewChildren || !viewChildren.length) {\n thisNodeColor = calculateColor(visuals);\n // Apply visual to this node.\n existsStyle.fill = thisNodeColor;\n } else {\n var mapping_1 = buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren);\n // Designate visual to children.\n each(viewChildren, function (child, index) {\n // If higher than viewRoot, only ancestors of viewRoot is needed to visit.\n if (child.depth >= viewRootAncestors.length || child === viewRootAncestors[child.depth]) {\n var childVisual = mapVisual(nodeModel, visuals, child, index, mapping_1, seriesModel);\n travelTree(child, childVisual, viewRootAncestors, seriesModel);\n }\n });\n }\n}\nfunction buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel) {\n var visuals = extend({}, designatedVisual);\n var designatedVisualItemStyle = seriesModel.designatedVisualItemStyle;\n each(['color', 'colorAlpha', 'colorSaturation'], function (visualName) {\n // Priority: thisNode > thisLevel > parentNodeDesignated > seriesModel\n designatedVisualItemStyle[visualName] = designatedVisual[visualName];\n var val = nodeItemStyleModel.get(visualName);\n designatedVisualItemStyle[visualName] = null;\n val != null && (visuals[visualName] = val);\n });\n return visuals;\n}\nfunction calculateColor(visuals) {\n var color = getValueVisualDefine(visuals, 'color');\n if (color) {\n var colorAlpha = getValueVisualDefine(visuals, 'colorAlpha');\n var colorSaturation = getValueVisualDefine(visuals, 'colorSaturation');\n if (colorSaturation) {\n color = modifyHSL(color, null, null, colorSaturation);\n }\n if (colorAlpha) {\n color = modifyAlpha(color, colorAlpha);\n }\n return color;\n }\n}\nfunction calculateBorderColor(borderColorSaturation, thisNodeColor) {\n return thisNodeColor != null\n // Can only be string\n ? modifyHSL(thisNodeColor, null, null, borderColorSaturation) : null;\n}\nfunction getValueVisualDefine(visuals, name) {\n var value = visuals[name];\n if (value != null && value !== 'none') {\n return value;\n }\n}\nfunction buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren) {\n if (!viewChildren || !viewChildren.length) {\n return;\n }\n var rangeVisual = getRangeVisual(nodeModel, 'color') || visuals.color != null && visuals.color !== 'none' && (getRangeVisual(nodeModel, 'colorAlpha') || getRangeVisual(nodeModel, 'colorSaturation'));\n if (!rangeVisual) {\n return;\n }\n var visualMin = nodeModel.get('visualMin');\n var visualMax = nodeModel.get('visualMax');\n var dataExtent = nodeLayout.dataExtent.slice();\n visualMin != null && visualMin < dataExtent[0] && (dataExtent[0] = visualMin);\n visualMax != null && visualMax > dataExtent[1] && (dataExtent[1] = visualMax);\n var colorMappingBy = nodeModel.get('colorMappingBy');\n var opt = {\n type: rangeVisual.name,\n dataExtent: dataExtent,\n visual: rangeVisual.range\n };\n if (opt.type === 'color' && (colorMappingBy === 'index' || colorMappingBy === 'id')) {\n opt.mappingMethod = 'category';\n opt.loop = true;\n // categories is ordinal, so do not set opt.categories.\n } else {\n opt.mappingMethod = 'linear';\n }\n var mapping = new VisualMapping(opt);\n inner(mapping).drColorMappingBy = colorMappingBy;\n return mapping;\n}\n// Notice: If we don't have the attribute 'colorRange', but only use\n// attribute 'color' to represent both concepts of 'colorRange' and 'color',\n// (It means 'colorRange' when 'color' is Array, means 'color' when not array),\n// this problem will be encountered:\n// If a level-1 node doesn't have children, and its siblings have children,\n// and colorRange is set on level-1, then the node cannot be colored.\n// So we separate 'colorRange' and 'color' to different attributes.\nfunction getRangeVisual(nodeModel, name) {\n // 'colorRange', 'colorARange', 'colorSRange'.\n // If not exists on this node, fetch from levels and series.\n var range = nodeModel.get(name);\n return isArray(range) && range.length ? {\n name: name,\n range: range\n } : null;\n}\nfunction mapVisual(nodeModel, visuals, child, index, mapping, seriesModel) {\n var childVisuals = extend({}, visuals);\n if (mapping) {\n // Only support color, colorAlpha, colorSaturation.\n var mappingType = mapping.type;\n var colorMappingBy = mappingType === 'color' && inner(mapping).drColorMappingBy;\n var value = colorMappingBy === 'index' ? index : colorMappingBy === 'id' ? seriesModel.mapIdToIndex(child.getId()) : child.getValue(nodeModel.get('visualDimension'));\n childVisuals[mappingType] = mapping.mapValueToVisual(value);\n }\n return childVisuals;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/*\n* A third-party license is embedded for some of the code in this file:\n* The treemap layout implementation was originally copied from\n* \"d3.js\" with some modifications made for this project.\n* (See more details in the comment of the method \"squarify\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { parsePercent, MAX_SAFE_INTEGER } from '../../util/number.js';\nimport * as layout from '../../util/layout.js';\nimport * as helper from '../helper/treeHelper.js';\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar retrieveValue = zrUtil.retrieve;\nvar each = zrUtil.each;\nvar PATH_BORDER_WIDTH = ['itemStyle', 'borderWidth'];\nvar PATH_GAP_WIDTH = ['itemStyle', 'gapWidth'];\nvar PATH_UPPER_LABEL_SHOW = ['upperLabel', 'show'];\nvar PATH_UPPER_LABEL_HEIGHT = ['upperLabel', 'height'];\n;\n/**\n * @public\n */\nexport default {\n seriesType: 'treemap',\n reset: function (seriesModel, ecModel, api, payload) {\n // Layout result in each node:\n // {x, y, width, height, area, borderWidth}\n var ecWidth = api.getWidth();\n var ecHeight = api.getHeight();\n var seriesOption = seriesModel.option;\n var layoutInfo = layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n var size = seriesOption.size || []; // Compatible with ec2.\n var containerWidth = parsePercent(retrieveValue(layoutInfo.width, size[0]), ecWidth);\n var containerHeight = parsePercent(retrieveValue(layoutInfo.height, size[1]), ecHeight);\n // Fetch payload info.\n var payloadType = payload && payload.type;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var rootRect = payloadType === 'treemapRender' || payloadType === 'treemapMove' ? payload.rootRect : null;\n var viewRoot = seriesModel.getViewRoot();\n var viewAbovePath = helper.getPathToRoot(viewRoot);\n if (payloadType !== 'treemapMove') {\n var rootSize = payloadType === 'treemapZoomToNode' ? estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) : rootRect ? [rootRect.width, rootRect.height] : [containerWidth, containerHeight];\n var sort_1 = seriesOption.sort;\n if (sort_1 && sort_1 !== 'asc' && sort_1 !== 'desc') {\n // Default to be desc order.\n sort_1 = 'desc';\n }\n var options = {\n squareRatio: seriesOption.squareRatio,\n sort: sort_1,\n leafDepth: seriesOption.leafDepth\n };\n // layout should be cleared because using updateView but not update.\n viewRoot.hostTree.clearLayouts();\n // TODO\n // optimize: if out of view clip, do not layout.\n // But take care that if do not render node out of view clip,\n // how to calculate start po\n var viewRootLayout_1 = {\n x: 0,\n y: 0,\n width: rootSize[0],\n height: rootSize[1],\n area: rootSize[0] * rootSize[1]\n };\n viewRoot.setLayout(viewRootLayout_1);\n squarify(viewRoot, options, false, 0);\n // Supplement layout.\n viewRootLayout_1 = viewRoot.getLayout();\n each(viewAbovePath, function (node, index) {\n var childValue = (viewAbovePath[index + 1] || viewRoot).getValue();\n node.setLayout(zrUtil.extend({\n dataExtent: [childValue, childValue],\n borderWidth: 0,\n upperHeight: 0\n }, viewRootLayout_1));\n });\n }\n var treeRoot = seriesModel.getData().tree.root;\n treeRoot.setLayout(calculateRootPosition(layoutInfo, rootRect, targetInfo), true);\n seriesModel.setLayoutInfo(layoutInfo);\n // FIXME\n // 现在没有clip功能,暂时取ec高宽。\n prunning(treeRoot,\n // Transform to base element coordinate system.\n new BoundingRect(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight), viewAbovePath, viewRoot, 0);\n }\n};\n/**\n * Layout treemap with squarify algorithm.\n * The original presentation of this algorithm\n * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk\n * .\n * The implementation of this algorithm was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @protected\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Object} options\n * @param {string} options.sort 'asc' or 'desc'\n * @param {number} options.squareRatio\n * @param {boolean} hideChildren\n * @param {number} depth\n */\nfunction squarify(node, options, hideChildren, depth) {\n var width;\n var height;\n if (node.isRemoved()) {\n return;\n }\n var thisLayout = node.getLayout();\n width = thisLayout.width;\n height = thisLayout.height;\n // Considering border and gap\n var nodeModel = node.getModel();\n var borderWidth = nodeModel.get(PATH_BORDER_WIDTH);\n var halfGapWidth = nodeModel.get(PATH_GAP_WIDTH) / 2;\n var upperLabelHeight = getUpperLabelHeight(nodeModel);\n var upperHeight = Math.max(borderWidth, upperLabelHeight);\n var layoutOffset = borderWidth - halfGapWidth;\n var layoutOffsetUpper = upperHeight - halfGapWidth;\n node.setLayout({\n borderWidth: borderWidth,\n upperHeight: upperHeight,\n upperLabelHeight: upperLabelHeight\n }, true);\n width = mathMax(width - 2 * layoutOffset, 0);\n height = mathMax(height - layoutOffset - layoutOffsetUpper, 0);\n var totalArea = width * height;\n var viewChildren = initChildren(node, nodeModel, totalArea, options, hideChildren, depth);\n if (!viewChildren.length) {\n return;\n }\n var rect = {\n x: layoutOffset,\n y: layoutOffsetUpper,\n width: width,\n height: height\n };\n var rowFixedLength = mathMin(width, height);\n var best = Infinity; // the best row score so far\n var row = [];\n row.area = 0;\n for (var i = 0, len = viewChildren.length; i < len;) {\n var child = viewChildren[i];\n row.push(child);\n row.area += child.getLayout().area;\n var score = worst(row, rowFixedLength, options.squareRatio);\n // continue with this orientation\n if (score <= best) {\n i++;\n best = score;\n }\n // abort, and try a different orientation\n else {\n row.area -= row.pop().getLayout().area;\n position(row, rowFixedLength, rect, halfGapWidth, false);\n rowFixedLength = mathMin(rect.width, rect.height);\n row.length = row.area = 0;\n best = Infinity;\n }\n }\n if (row.length) {\n position(row, rowFixedLength, rect, halfGapWidth, true);\n }\n if (!hideChildren) {\n var childrenVisibleMin = nodeModel.get('childrenVisibleMin');\n if (childrenVisibleMin != null && totalArea < childrenVisibleMin) {\n hideChildren = true;\n }\n }\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n squarify(viewChildren[i], options, hideChildren, depth + 1);\n }\n}\n/**\n * Set area to each child, and calculate data extent for visual coding.\n */\nfunction initChildren(node, nodeModel, totalArea, options, hideChildren, depth) {\n var viewChildren = node.children || [];\n var orderBy = options.sort;\n orderBy !== 'asc' && orderBy !== 'desc' && (orderBy = null);\n var overLeafDepth = options.leafDepth != null && options.leafDepth <= depth;\n // leafDepth has higher priority.\n if (hideChildren && !overLeafDepth) {\n return node.viewChildren = [];\n }\n // Sort children, order by desc.\n viewChildren = zrUtil.filter(viewChildren, function (child) {\n return !child.isRemoved();\n });\n sort(viewChildren, orderBy);\n var info = statistic(nodeModel, viewChildren, orderBy);\n if (info.sum === 0) {\n return node.viewChildren = [];\n }\n info.sum = filterByThreshold(nodeModel, totalArea, info.sum, orderBy, viewChildren);\n if (info.sum === 0) {\n return node.viewChildren = [];\n }\n // Set area to each child.\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n var area = viewChildren[i].getValue() / info.sum * totalArea;\n // Do not use setLayout({...}, true), because it is needed to clear last layout.\n viewChildren[i].setLayout({\n area: area\n });\n }\n if (overLeafDepth) {\n viewChildren.length && node.setLayout({\n isLeafRoot: true\n }, true);\n viewChildren.length = 0;\n }\n node.viewChildren = viewChildren;\n node.setLayout({\n dataExtent: info.dataExtent\n }, true);\n return viewChildren;\n}\n/**\n * Consider 'visibleMin'. Modify viewChildren and get new sum.\n */\nfunction filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) {\n // visibleMin is not supported yet when no option.sort.\n if (!orderBy) {\n return sum;\n }\n var visibleMin = nodeModel.get('visibleMin');\n var len = orderedChildren.length;\n var deletePoint = len;\n // Always travel from little value to big value.\n for (var i = len - 1; i >= 0; i--) {\n var value = orderedChildren[orderBy === 'asc' ? len - i - 1 : i].getValue();\n if (value / sum * totalArea < visibleMin) {\n deletePoint = i;\n sum -= value;\n }\n }\n orderBy === 'asc' ? orderedChildren.splice(0, len - deletePoint) : orderedChildren.splice(deletePoint, len - deletePoint);\n return sum;\n}\n/**\n * Sort\n */\nfunction sort(viewChildren, orderBy) {\n if (orderBy) {\n viewChildren.sort(function (a, b) {\n var diff = orderBy === 'asc' ? a.getValue() - b.getValue() : b.getValue() - a.getValue();\n return diff === 0 ? orderBy === 'asc' ? a.dataIndex - b.dataIndex : b.dataIndex - a.dataIndex : diff;\n });\n }\n return viewChildren;\n}\n/**\n * Statistic\n */\nfunction statistic(nodeModel, children, orderBy) {\n // Calculate sum.\n var sum = 0;\n for (var i = 0, len = children.length; i < len; i++) {\n sum += children[i].getValue();\n }\n // Statistic data extent for latter visual coding.\n // Notice: data extent should be calculate based on raw children\n // but not filtered view children, otherwise visual mapping will not\n // be stable when zoom (where children is filtered by visibleMin).\n var dimension = nodeModel.get('visualDimension');\n var dataExtent;\n // The same as area dimension.\n if (!children || !children.length) {\n dataExtent = [NaN, NaN];\n } else if (dimension === 'value' && orderBy) {\n dataExtent = [children[children.length - 1].getValue(), children[0].getValue()];\n orderBy === 'asc' && dataExtent.reverse();\n }\n // Other dimension.\n else {\n dataExtent = [Infinity, -Infinity];\n each(children, function (child) {\n var value = child.getValue(dimension);\n value < dataExtent[0] && (dataExtent[0] = value);\n value > dataExtent[1] && (dataExtent[1] = value);\n });\n }\n return {\n sum: sum,\n dataExtent: dataExtent\n };\n}\n/**\n * Computes the score for the specified row,\n * as the worst aspect ratio.\n */\nfunction worst(row, rowFixedLength, ratio) {\n var areaMax = 0;\n var areaMin = Infinity;\n for (var i = 0, area = void 0, len = row.length; i < len; i++) {\n area = row[i].getLayout().area;\n if (area) {\n area < areaMin && (areaMin = area);\n area > areaMax && (areaMax = area);\n }\n }\n var squareArea = row.area * row.area;\n var f = rowFixedLength * rowFixedLength * ratio;\n return squareArea ? mathMax(f * areaMax / squareArea, squareArea / (f * areaMin)) : Infinity;\n}\n/**\n * Positions the specified row of nodes. Modifies `rect`.\n */\nfunction position(row, rowFixedLength, rect, halfGapWidth, flush) {\n // When rowFixedLength === rect.width,\n // it is horizontal subdivision,\n // rowFixedLength is the width of the subdivision,\n // rowOtherLength is the height of the subdivision,\n // and nodes will be positioned from left to right.\n // wh[idx0WhenH] means: when horizontal,\n // wh[idx0WhenH] => wh[0] => 'width'.\n // xy[idx1WhenH] => xy[1] => 'y'.\n var idx0WhenH = rowFixedLength === rect.width ? 0 : 1;\n var idx1WhenH = 1 - idx0WhenH;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var last = rect[xy[idx0WhenH]];\n var rowOtherLength = rowFixedLength ? row.area / rowFixedLength : 0;\n if (flush || rowOtherLength > rect[wh[idx1WhenH]]) {\n rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow\n }\n\n for (var i = 0, rowLen = row.length; i < rowLen; i++) {\n var node = row[i];\n var nodeLayout = {};\n var step = rowOtherLength ? node.getLayout().area / rowOtherLength : 0;\n var wh1 = nodeLayout[wh[idx1WhenH]] = mathMax(rowOtherLength - 2 * halfGapWidth, 0);\n // We use Math.max/min to avoid negative width/height when considering gap width.\n var remain = rect[xy[idx0WhenH]] + rect[wh[idx0WhenH]] - last;\n var modWH = i === rowLen - 1 || remain < step ? remain : step;\n var wh0 = nodeLayout[wh[idx0WhenH]] = mathMax(modWH - 2 * halfGapWidth, 0);\n nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + mathMin(halfGapWidth, wh1 / 2);\n nodeLayout[xy[idx0WhenH]] = last + mathMin(halfGapWidth, wh0 / 2);\n last += modWH;\n node.setLayout(nodeLayout, true);\n }\n rect[xy[idx1WhenH]] += rowOtherLength;\n rect[wh[idx1WhenH]] -= rowOtherLength;\n}\n// Return [containerWidth, containerHeight] as default.\nfunction estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) {\n // If targetInfo.node exists, we zoom to the node,\n // so estimate whole width and height by target node.\n var currNode = (targetInfo || {}).node;\n var defaultSize = [containerWidth, containerHeight];\n if (!currNode || currNode === viewRoot) {\n return defaultSize;\n }\n var parent;\n var viewArea = containerWidth * containerHeight;\n var area = viewArea * seriesModel.option.zoomToNodeRatio;\n while (parent = currNode.parentNode) {\n // jshint ignore:line\n var sum = 0;\n var siblings = parent.children;\n for (var i = 0, len = siblings.length; i < len; i++) {\n sum += siblings[i].getValue();\n }\n var currNodeValue = currNode.getValue();\n if (currNodeValue === 0) {\n return defaultSize;\n }\n area *= sum / currNodeValue;\n // Considering border, suppose aspect ratio is 1.\n var parentModel = parent.getModel();\n var borderWidth = parentModel.get(PATH_BORDER_WIDTH);\n var upperHeight = Math.max(borderWidth, getUpperLabelHeight(parentModel));\n area += 4 * borderWidth * borderWidth + (3 * borderWidth + upperHeight) * Math.pow(area, 0.5);\n area > MAX_SAFE_INTEGER && (area = MAX_SAFE_INTEGER);\n currNode = parent;\n }\n area < viewArea && (area = viewArea);\n var scale = Math.pow(area / viewArea, 0.5);\n return [containerWidth * scale, containerHeight * scale];\n}\n// Root position based on coord of containerGroup\nfunction calculateRootPosition(layoutInfo, rootRect, targetInfo) {\n if (rootRect) {\n return {\n x: rootRect.x,\n y: rootRect.y\n };\n }\n var defaultPosition = {\n x: 0,\n y: 0\n };\n if (!targetInfo) {\n return defaultPosition;\n }\n // If targetInfo is fetched by 'retrieveTargetInfo',\n // old tree and new tree are the same tree,\n // so the node still exists and we can visit it.\n var targetNode = targetInfo.node;\n var layout = targetNode.getLayout();\n if (!layout) {\n return defaultPosition;\n }\n // Transform coord from local to container.\n var targetCenter = [layout.width / 2, layout.height / 2];\n var node = targetNode;\n while (node) {\n var nodeLayout = node.getLayout();\n targetCenter[0] += nodeLayout.x;\n targetCenter[1] += nodeLayout.y;\n node = node.parentNode;\n }\n return {\n x: layoutInfo.width / 2 - targetCenter[0],\n y: layoutInfo.height / 2 - targetCenter[1]\n };\n}\n// Mark nodes visible for prunning when visual coding and rendering.\n// Prunning depends on layout and root position, so we have to do it after layout.\nfunction prunning(node, clipRect, viewAbovePath, viewRoot, depth) {\n var nodeLayout = node.getLayout();\n var nodeInViewAbovePath = viewAbovePath[depth];\n var isAboveViewRoot = nodeInViewAbovePath && nodeInViewAbovePath === node;\n if (nodeInViewAbovePath && !isAboveViewRoot || depth === viewAbovePath.length && node !== viewRoot) {\n return;\n }\n node.setLayout({\n // isInView means: viewRoot sub tree + viewAbovePath\n isInView: true,\n // invisible only means: outside view clip so that the node can not\n // see but still layout for animation preparation but not render.\n invisible: !isAboveViewRoot && !clipRect.intersect(nodeLayout),\n isAboveViewRoot: isAboveViewRoot\n }, true);\n // Transform to child coordinate.\n var childClipRect = new BoundingRect(clipRect.x - nodeLayout.x, clipRect.y - nodeLayout.y, clipRect.width, clipRect.height);\n each(node.viewChildren || [], function (child) {\n prunning(child, childClipRect, viewAbovePath, viewRoot, depth + 1);\n });\n}\nfunction getUpperLabelHeight(model) {\n return model.get(PATH_UPPER_LABEL_SHOW) ? model.get(PATH_UPPER_LABEL_HEIGHT) : 0;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { installTreemapAction } from './treemapAction.js';\nimport TreemapSeriesModel from './TreemapSeries.js';\nimport TreemapView from './TreemapView.js';\nimport treemapVisual from './treemapVisual.js';\nimport treemapLayout from './treemapLayout.js';\nexport function install(registers) {\n registers.registerSeriesModel(TreemapSeriesModel);\n registers.registerChartView(TreemapView);\n registers.registerVisual(treemapVisual);\n registers.registerLayout(treemapLayout);\n installTreemapAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isNumber } from 'zrender/lib/core/util.js';\nexport default function categoryFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (!legendModels || !legendModels.length) {\n return;\n }\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var categoriesData = graphSeries.getCategoriesData();\n var graph = graphSeries.getGraph();\n var data = graph.data;\n var categoryNames = categoriesData.mapArray(categoriesData.getName);\n data.filterSelf(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n if (category != null) {\n if (isNumber(category)) {\n category = categoryNames[category];\n }\n // If in any legend component the status is not selected.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(category)) {\n return false;\n }\n }\n }\n return true;\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend, isString } from 'zrender/lib/core/util.js';\nexport default function categoryVisual(ecModel) {\n var paletteScope = {};\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var categoriesData = seriesModel.getCategoriesData();\n var data = seriesModel.getData();\n var categoryNameIdxMap = {};\n categoriesData.each(function (idx) {\n var name = categoriesData.getName(idx);\n // Add prefix to avoid conflict with Object.prototype.\n categoryNameIdxMap['ec-' + name] = idx;\n var itemModel = categoriesData.getItemModel(idx);\n var style = itemModel.getModel('itemStyle').getItemStyle();\n if (!style.fill) {\n // Get color from palette.\n style.fill = seriesModel.getColorFromPalette(name, paletteScope);\n }\n categoriesData.setItemVisual(idx, 'style', style);\n var symbolVisualList = ['symbol', 'symbolSize', 'symbolKeepAspect'];\n for (var i = 0; i < symbolVisualList.length; i++) {\n var symbolVisual = itemModel.getShallow(symbolVisualList[i], true);\n if (symbolVisual != null) {\n categoriesData.setItemVisual(idx, symbolVisualList[i], symbolVisual);\n }\n }\n });\n // Assign category color to visual\n if (categoriesData.count()) {\n data.each(function (idx) {\n var model = data.getItemModel(idx);\n var categoryIdx = model.getShallow('category');\n if (categoryIdx != null) {\n if (isString(categoryIdx)) {\n categoryIdx = categoryNameIdxMap['ec-' + categoryIdx];\n }\n var categoryStyle = categoriesData.getItemVisual(categoryIdx, 'style');\n var style = data.ensureUniqueItemVisual(idx, 'style');\n extend(style, categoryStyle);\n var visualList = ['symbol', 'symbolSize', 'symbolKeepAspect'];\n for (var i = 0; i < visualList.length; i++) {\n data.setItemVisual(idx, visualList[i], categoriesData.getItemVisual(categoryIdx, visualList[i]));\n }\n }\n });\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend } from 'zrender/lib/core/util.js';\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n return a;\n}\nexport default function graphEdgeVisual(ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var edgeData = seriesModel.getEdgeData();\n var symbolType = normalize(seriesModel.get('edgeSymbol'));\n var symbolSize = normalize(seriesModel.get('edgeSymbolSize'));\n // const colorQuery = ['lineStyle', 'color'] as const;\n // const opacityQuery = ['lineStyle', 'opacity'] as const;\n edgeData.setVisual('fromSymbol', symbolType && symbolType[0]);\n edgeData.setVisual('toSymbol', symbolType && symbolType[1]);\n edgeData.setVisual('fromSymbolSize', symbolSize && symbolSize[0]);\n edgeData.setVisual('toSymbolSize', symbolSize && symbolSize[1]);\n edgeData.setVisual('style', seriesModel.getModel('lineStyle').getLineStyle());\n edgeData.each(function (idx) {\n var itemModel = edgeData.getItemModel(idx);\n var edge = graph.getEdgeByIndex(idx);\n var symbolType = normalize(itemModel.getShallow('symbol', true));\n var symbolSize = normalize(itemModel.getShallow('symbolSize', true));\n // Edge visual must after node visual\n var style = itemModel.getModel('lineStyle').getLineStyle();\n var existsStyle = edgeData.ensureUniqueItemVisual(idx, 'style');\n extend(existsStyle, style);\n switch (existsStyle.stroke) {\n case 'source':\n {\n var nodeStyle = edge.node1.getVisual('style');\n existsStyle.stroke = nodeStyle && nodeStyle.fill;\n break;\n }\n case 'target':\n {\n var nodeStyle = edge.node2.getVisual('style');\n existsStyle.stroke = nodeStyle && nodeStyle.fill;\n break;\n }\n }\n symbolType[0] && edge.setVisual('fromSymbol', symbolType[0]);\n symbolType[1] && edge.setVisual('toSymbol', symbolType[1]);\n symbolSize[0] && edge.setVisual('fromSymbolSize', symbolSize[0]);\n symbolSize[1] && edge.setVisual('toSymbolSize', symbolSize[1]);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar KEY_DELIMITER = '-->';\n/**\n * params handler\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @returns {*}\n */\nvar getAutoCurvenessParams = function (seriesModel) {\n return seriesModel.get('autoCurveness') || null;\n};\n/**\n * Generate a list of edge curvatures, 20 is the default\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param {number} appendLength\n * @return 20 => [0, -0.2, 0.2, -0.4, 0.4, -0.6, 0.6, -0.8, 0.8, -1, 1, -1.2, 1.2, -1.4, 1.4, -1.6, 1.6, -1.8, 1.8, -2]\n */\nvar createCurveness = function (seriesModel, appendLength) {\n var autoCurvenessParmas = getAutoCurvenessParams(seriesModel);\n var length = 20;\n var curvenessList = [];\n // handler the function set\n if (zrUtil.isNumber(autoCurvenessParmas)) {\n length = autoCurvenessParmas;\n } else if (zrUtil.isArray(autoCurvenessParmas)) {\n seriesModel.__curvenessList = autoCurvenessParmas;\n return;\n }\n // append length\n if (appendLength > length) {\n length = appendLength;\n }\n // make sure the length is even\n var len = length % 2 ? length + 2 : length + 3;\n curvenessList = [];\n for (var i = 0; i < len; i++) {\n curvenessList.push((i % 2 ? i + 1 : i) / 10 * (i % 2 ? -1 : 1));\n }\n seriesModel.__curvenessList = curvenessList;\n};\n/**\n * Create different cache key data in the positive and negative directions, in order to set the curvature later\n * @param {number|string|module:echarts/data/Graph.Node} n1\n * @param {number|string|module:echarts/data/Graph.Node} n2\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @returns {string} key\n */\nvar getKeyOfEdges = function (n1, n2, seriesModel) {\n var source = [n1.id, n1.dataIndex].join('.');\n var target = [n2.id, n2.dataIndex].join('.');\n return [seriesModel.uid, source, target].join(KEY_DELIMITER);\n};\n/**\n * get opposite key\n * @param {string} key\n * @returns {string}\n */\nvar getOppositeKey = function (key) {\n var keys = key.split(KEY_DELIMITER);\n return [keys[0], keys[2], keys[1]].join(KEY_DELIMITER);\n};\n/**\n * get edgeMap with key\n * @param edge\n * @param {module:echarts/model/SeriesModel} seriesModel\n */\nvar getEdgeFromMap = function (edge, seriesModel) {\n var key = getKeyOfEdges(edge.node1, edge.node2, seriesModel);\n return seriesModel.__edgeMap[key];\n};\n/**\n * calculate all cases total length\n * @param edge\n * @param seriesModel\n * @returns {number}\n */\nvar getTotalLengthBetweenNodes = function (edge, seriesModel) {\n var len = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node1, edge.node2, seriesModel), seriesModel);\n var lenV = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node2, edge.node1, seriesModel), seriesModel);\n return len + lenV;\n};\n/**\n *\n * @param key\n */\nvar getEdgeMapLengthWithKey = function (key, seriesModel) {\n var edgeMap = seriesModel.__edgeMap;\n return edgeMap[key] ? edgeMap[key].length : 0;\n};\n/**\n * Count the number of edges between the same two points, used to obtain the curvature table and the parity of the edge\n * @see /graph/GraphSeries.js@getInitialData\n * @param {module:echarts/model/SeriesModel} seriesModel\n */\nexport function initCurvenessList(seriesModel) {\n if (!getAutoCurvenessParams(seriesModel)) {\n return;\n }\n seriesModel.__curvenessList = [];\n seriesModel.__edgeMap = {};\n // calc the array of curveness List\n createCurveness(seriesModel);\n}\n/**\n * set edgeMap with key\n * @param {number|string|module:echarts/data/Graph.Node} n1\n * @param {number|string|module:echarts/data/Graph.Node} n2\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param {number} index\n */\nexport function createEdgeMapForCurveness(n1, n2, seriesModel, index) {\n if (!getAutoCurvenessParams(seriesModel)) {\n return;\n }\n var key = getKeyOfEdges(n1, n2, seriesModel);\n var edgeMap = seriesModel.__edgeMap;\n var oppositeEdges = edgeMap[getOppositeKey(key)];\n // set direction\n if (edgeMap[key] && !oppositeEdges) {\n edgeMap[key].isForward = true;\n } else if (oppositeEdges && edgeMap[key]) {\n oppositeEdges.isForward = true;\n edgeMap[key].isForward = false;\n }\n edgeMap[key] = edgeMap[key] || [];\n edgeMap[key].push(index);\n}\n/**\n * get curvature for edge\n * @param edge\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param index\n */\nexport function getCurvenessForEdge(edge, seriesModel, index, needReverse) {\n var autoCurvenessParams = getAutoCurvenessParams(seriesModel);\n var isArrayParam = zrUtil.isArray(autoCurvenessParams);\n if (!autoCurvenessParams) {\n return null;\n }\n var edgeArray = getEdgeFromMap(edge, seriesModel);\n if (!edgeArray) {\n return null;\n }\n var edgeIndex = -1;\n for (var i = 0; i < edgeArray.length; i++) {\n if (edgeArray[i] === index) {\n edgeIndex = i;\n break;\n }\n }\n // if totalLen is Longer createCurveness\n var totalLen = getTotalLengthBetweenNodes(edge, seriesModel);\n createCurveness(seriesModel, totalLen);\n edge.lineStyle = edge.lineStyle || {};\n // if is opposite edge, must set curvenss to opposite number\n var curKey = getKeyOfEdges(edge.node1, edge.node2, seriesModel);\n var curvenessList = seriesModel.__curvenessList;\n // if pass array no need parity\n var parityCorrection = isArrayParam ? 0 : totalLen % 2 ? 0 : 1;\n if (!edgeArray.isForward) {\n // the opposite edge show outside\n var oppositeKey = getOppositeKey(curKey);\n var len = getEdgeMapLengthWithKey(oppositeKey, seriesModel);\n var resValue = curvenessList[edgeIndex + len + parityCorrection];\n // isNeedReverse, simple, force type need reverse the curveness in the junction of the forword and the opposite\n if (needReverse) {\n // set as array may make the parity handle with the len of opposite\n if (isArrayParam) {\n if (autoCurvenessParams && autoCurvenessParams[0] === 0) {\n return (len + parityCorrection) % 2 ? resValue : -resValue;\n } else {\n return ((len % 2 ? 0 : 1) + parityCorrection) % 2 ? resValue : -resValue;\n }\n } else {\n return (len + parityCorrection) % 2 ? resValue : -resValue;\n }\n } else {\n return curvenessList[edgeIndex + len + parityCorrection];\n }\n } else {\n return curvenessList[parityCorrection + edgeIndex];\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper.js';\nexport function simpleLayout(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n var graph = seriesModel.getGraph();\n graph.eachNode(function (node) {\n var model = node.getModel();\n node.setLayout([+model.get('x'), +model.get('y')]);\n });\n simpleLayoutEdge(graph, seriesModel);\n}\nexport function simpleLayoutEdge(graph, seriesModel) {\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, seriesModel, index, true), 0);\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var points = [p1, p2];\n if (+curveness) {\n points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]);\n }\n edge.setLayout(points);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each } from 'zrender/lib/core/util.js';\nimport { simpleLayout, simpleLayoutEdge } from './simpleLayoutHelper.js';\nexport default function graphSimpleLayout(ecModel, api) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var layout = seriesModel.get('layout');\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n var data_1 = seriesModel.getData();\n var dimensions_1 = [];\n each(coordSys.dimensions, function (coordDim) {\n dimensions_1 = dimensions_1.concat(data_1.mapDimensionsAll(coordDim));\n });\n for (var dataIndex = 0; dataIndex < data_1.count(); dataIndex++) {\n var value = [];\n var hasValue = false;\n for (var i = 0; i < dimensions_1.length; i++) {\n var val = data_1.get(dimensions_1[i], dataIndex);\n if (!isNaN(val)) {\n hasValue = true;\n }\n value.push(val);\n }\n if (hasValue) {\n data_1.setItemLayout(dataIndex, coordSys.dataToPoint(value));\n } else {\n // Also {Array.}, not undefined to avoid if...else... statement\n data_1.setItemLayout(dataIndex, [NaN, NaN]);\n }\n }\n simpleLayoutEdge(data_1.graph, seriesModel);\n } else if (!layout || layout === 'none') {\n simpleLayout(seriesModel);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function getNodeGlobalScale(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type !== 'view') {\n return 1;\n }\n var nodeScaleRatio = seriesModel.option.nodeScaleRatio;\n var groupZoom = coordSys.scaleX;\n // Scale node when zoom changes\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n return nodeScale / groupZoom;\n}\nexport function getSymbolSize(node) {\n var symbolSize = node.getVisual('symbolSize');\n if (symbolSize instanceof Array) {\n symbolSize = (symbolSize[0] + symbolSize[1]) / 2;\n }\n return +symbolSize;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport { getSymbolSize, getNodeGlobalScale } from './graphHelper.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper.js';\nvar PI = Math.PI;\nvar _symbolRadiansHalf = [];\n/**\n * `basedOn` can be:\n * 'value':\n * This layout is not accurate and have same bad case. For example,\n * if the min value is very smaller than the max value, the nodes\n * with the min value probably overlap even though there is enough\n * space to layout them. So we only use this approach in the as the\n * init layout of the force layout.\n * FIXME\n * Probably we do not need this method any more but use\n * `basedOn: 'symbolSize'` in force layout if\n * delay its init operations to GraphView.\n * 'symbolSize':\n * This approach work only if all of the symbol size calculated.\n * That is, the progressive rendering is not applied to graph.\n * FIXME\n * If progressive rendering is applied to graph some day,\n * probably we have to use `basedOn: 'value'`.\n */\nexport function circularLayout(seriesModel, basedOn, draggingNode, pointer) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n var rect = coordSys.getBoundingRect();\n var nodeData = seriesModel.getData();\n var graph = nodeData.graph;\n var cx = rect.width / 2 + rect.x;\n var cy = rect.height / 2 + rect.y;\n var r = Math.min(rect.width, rect.height) / 2;\n var count = nodeData.count();\n nodeData.setLayout({\n cx: cx,\n cy: cy\n });\n if (!count) {\n return;\n }\n if (draggingNode) {\n var _a = coordSys.pointToData(pointer),\n tempX = _a[0],\n tempY = _a[1];\n var v = [tempX - cx, tempY - cy];\n vec2.normalize(v, v);\n vec2.scale(v, v, r);\n draggingNode.setLayout([cx + v[0], cy + v[1]], true);\n var circularRotateLabel = seriesModel.get(['circular', 'rotateLabel']);\n rotateNodeLabel(draggingNode, circularRotateLabel, cx, cy);\n }\n _layoutNodesBasedOn[basedOn](seriesModel, graph, nodeData, r, cx, cy, count);\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), getCurvenessForEdge(edge, seriesModel, index), 0);\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var cp1;\n var x12 = (p1[0] + p2[0]) / 2;\n var y12 = (p1[1] + p2[1]) / 2;\n if (+curveness) {\n curveness *= 3;\n cp1 = [cx * curveness + x12 * (1 - curveness), cy * curveness + y12 * (1 - curveness)];\n }\n edge.setLayout([p1, p2, cp1]);\n });\n}\nvar _layoutNodesBasedOn = {\n value: function (seriesModel, graph, nodeData, r, cx, cy, count) {\n var angle = 0;\n var sum = nodeData.getSum('value');\n var unitAngle = Math.PI * 2 / (sum || count);\n graph.eachNode(function (node) {\n var value = node.getValue('value');\n var radianHalf = unitAngle * (sum ? value : 1) / 2;\n angle += radianHalf;\n node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += radianHalf;\n });\n },\n symbolSize: function (seriesModel, graph, nodeData, r, cx, cy, count) {\n var sumRadian = 0;\n _symbolRadiansHalf.length = count;\n var nodeScale = getNodeGlobalScale(seriesModel);\n graph.eachNode(function (node) {\n var symbolSize = getSymbolSize(node);\n // Normally this case will not happen, but we still add\n // some the defensive code (2px is an arbitrary value).\n isNaN(symbolSize) && (symbolSize = 2);\n symbolSize < 0 && (symbolSize = 0);\n symbolSize *= nodeScale;\n var symbolRadianHalf = Math.asin(symbolSize / 2 / r);\n // when `symbolSize / 2` is bigger than `r`.\n isNaN(symbolRadianHalf) && (symbolRadianHalf = PI / 2);\n _symbolRadiansHalf[node.dataIndex] = symbolRadianHalf;\n sumRadian += symbolRadianHalf * 2;\n });\n var halfRemainRadian = (2 * PI - sumRadian) / count / 2;\n var angle = 0;\n graph.eachNode(function (node) {\n var radianHalf = halfRemainRadian + _symbolRadiansHalf[node.dataIndex];\n angle += radianHalf;\n // init circular layout for\n // 1. layout undefined node\n // 2. not fixed node\n (!node.getLayout() || !node.getLayout().fixed) && node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += radianHalf;\n });\n }\n};\nexport function rotateNodeLabel(node, circularRotateLabel, cx, cy) {\n var el = node.getGraphicEl();\n // need to check if el exists. '-' value may not create node element.\n if (!el) {\n return;\n }\n var nodeModel = node.getModel();\n var labelRotate = nodeModel.get(['label', 'rotate']) || 0;\n var symbolPath = el.getSymbolPath();\n if (circularRotateLabel) {\n var pos = node.getLayout();\n var rad = Math.atan2(pos[1] - cy, pos[0] - cx);\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n var isLeft = pos[0] < cx;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n var textPosition = isLeft ? 'left' : 'right';\n symbolPath.setTextConfig({\n rotation: -rad,\n position: textPosition,\n origin: 'center'\n });\n var emphasisState = symbolPath.ensureState('emphasis');\n zrUtil.extend(emphasisState.textConfig || (emphasisState.textConfig = {}), {\n position: textPosition\n });\n } else {\n symbolPath.setTextConfig({\n rotation: labelRotate *= Math.PI / 180\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { circularLayout } from './circularLayoutHelper.js';\nexport default function graphCircularLayout(ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n if (seriesModel.get('layout') === 'circular') {\n circularLayout(seriesModel, 'symbolSize');\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/*\n* A third-party license is embedded for some of the code in this file:\n* Some formulas were originally copied from \"d3.js\" with some\n* modifications made for this project.\n* (See more details in the comment of the method \"step\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\nimport * as vec2 from 'zrender/lib/core/vector.js';\nvar scaleAndAdd = vec2.scaleAndAdd;\n// function adjacentNode(n, e) {\n// return e.n1 === n ? e.n2 : e.n1;\n// }\nexport function forceLayout(inNodes, inEdges, opts) {\n var nodes = inNodes;\n var edges = inEdges;\n var rect = opts.rect;\n var width = rect.width;\n var height = rect.height;\n var center = [rect.x + width / 2, rect.y + height / 2];\n // let scale = opts.scale || 1;\n var gravity = opts.gravity == null ? 0.1 : opts.gravity;\n // for (let i = 0; i < edges.length; i++) {\n // let e = edges[i];\n // let n1 = e.n1;\n // let n2 = e.n2;\n // n1.edges = n1.edges || [];\n // n2.edges = n2.edges || [];\n // n1.edges.push(e);\n // n2.edges.push(e);\n // }\n // Init position\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n if (!n.p) {\n n.p = vec2.create(width * (Math.random() - 0.5) + center[0], height * (Math.random() - 0.5) + center[1]);\n }\n n.pp = vec2.clone(n.p);\n n.edges = null;\n }\n // Formula in 'Graph Drawing by Force-directed Placement'\n // let k = scale * Math.sqrt(width * height / nodes.length);\n // let k2 = k * k;\n var initialFriction = opts.friction == null ? 0.6 : opts.friction;\n var friction = initialFriction;\n var beforeStepCallback;\n var afterStepCallback;\n return {\n warmUp: function () {\n friction = initialFriction * 0.8;\n },\n setFixed: function (idx) {\n nodes[idx].fixed = true;\n },\n setUnfixed: function (idx) {\n nodes[idx].fixed = false;\n },\n /**\n * Before step hook\n */\n beforeStep: function (cb) {\n beforeStepCallback = cb;\n },\n /**\n * After step hook\n */\n afterStep: function (cb) {\n afterStepCallback = cb;\n },\n /**\n * Some formulas were originally copied from \"d3.js\"\n * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js\n * with some modifications made for this project.\n * See the license statement at the head of this file.\n */\n step: function (cb) {\n beforeStepCallback && beforeStepCallback(nodes, edges);\n var v12 = [];\n var nLen = nodes.length;\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n if (e.ignoreForceLayout) {\n continue;\n }\n var n1 = e.n1;\n var n2 = e.n2;\n vec2.sub(v12, n2.p, n1.p);\n var d = vec2.len(v12) - e.d;\n var w = n2.w / (n1.w + n2.w);\n if (isNaN(w)) {\n w = 0;\n }\n vec2.normalize(v12, v12);\n !n1.fixed && scaleAndAdd(n1.p, n1.p, v12, w * d * friction);\n !n2.fixed && scaleAndAdd(n2.p, n2.p, v12, -(1 - w) * d * friction);\n }\n // Gravity\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n if (!n.fixed) {\n vec2.sub(v12, center, n.p);\n // let d = vec2.len(v12);\n // vec2.scale(v12, v12, 1 / d);\n // let gravityFactor = gravity;\n scaleAndAdd(n.p, n.p, v12, gravity * friction);\n }\n }\n // Repulsive\n // PENDING\n for (var i = 0; i < nLen; i++) {\n var n1 = nodes[i];\n for (var j = i + 1; j < nLen; j++) {\n var n2 = nodes[j];\n vec2.sub(v12, n2.p, n1.p);\n var d = vec2.len(v12);\n if (d === 0) {\n // Random repulse\n vec2.set(v12, Math.random() - 0.5, Math.random() - 0.5);\n d = 1;\n }\n var repFact = (n1.rep + n2.rep) / d / d;\n !n1.fixed && scaleAndAdd(n1.pp, n1.pp, v12, repFact);\n !n2.fixed && scaleAndAdd(n2.pp, n2.pp, v12, -repFact);\n }\n }\n var v = [];\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n if (!n.fixed) {\n vec2.sub(v, n.p, n.pp);\n scaleAndAdd(n.p, n.p, v, friction);\n vec2.copy(n.pp, n.p);\n }\n }\n friction = friction * 0.992;\n var finished = friction < 0.01;\n afterStepCallback && afterStepCallback(nodes, edges, finished);\n cb && cb(finished);\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { forceLayout } from './forceHelper.js';\nimport { simpleLayout } from './simpleLayoutHelper.js';\nimport { circularLayout } from './circularLayoutHelper.js';\nimport { linearMap } from '../../util/number.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper.js';\nexport default function graphForceLayout(ecModel) {\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var coordSys = graphSeries.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n if (graphSeries.get('layout') === 'force') {\n var preservedPoints_1 = graphSeries.preservedPoints || {};\n var graph_1 = graphSeries.getGraph();\n var nodeData_1 = graph_1.data;\n var edgeData = graph_1.edgeData;\n var forceModel = graphSeries.getModel('force');\n var initLayout = forceModel.get('initLayout');\n if (graphSeries.preservedPoints) {\n nodeData_1.each(function (idx) {\n var id = nodeData_1.getId(idx);\n nodeData_1.setItemLayout(idx, preservedPoints_1[id] || [NaN, NaN]);\n });\n } else if (!initLayout || initLayout === 'none') {\n simpleLayout(graphSeries);\n } else if (initLayout === 'circular') {\n circularLayout(graphSeries, 'value');\n }\n var nodeDataExtent_1 = nodeData_1.getDataExtent('value');\n var edgeDataExtent_1 = edgeData.getDataExtent('value');\n // let edgeDataExtent = edgeData.getDataExtent('value');\n var repulsion = forceModel.get('repulsion');\n var edgeLength = forceModel.get('edgeLength');\n var repulsionArr_1 = zrUtil.isArray(repulsion) ? repulsion : [repulsion, repulsion];\n var edgeLengthArr_1 = zrUtil.isArray(edgeLength) ? edgeLength : [edgeLength, edgeLength];\n // Larger value has smaller length\n edgeLengthArr_1 = [edgeLengthArr_1[1], edgeLengthArr_1[0]];\n var nodes_1 = nodeData_1.mapArray('value', function (value, idx) {\n var point = nodeData_1.getItemLayout(idx);\n var rep = linearMap(value, nodeDataExtent_1, repulsionArr_1);\n if (isNaN(rep)) {\n rep = (repulsionArr_1[0] + repulsionArr_1[1]) / 2;\n }\n return {\n w: rep,\n rep: rep,\n fixed: nodeData_1.getItemModel(idx).get('fixed'),\n p: !point || isNaN(point[0]) || isNaN(point[1]) ? null : point\n };\n });\n var edges = edgeData.mapArray('value', function (value, idx) {\n var edge = graph_1.getEdgeByIndex(idx);\n var d = linearMap(value, edgeDataExtent_1, edgeLengthArr_1);\n if (isNaN(d)) {\n d = (edgeLengthArr_1[0] + edgeLengthArr_1[1]) / 2;\n }\n var edgeModel = edge.getModel();\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, graphSeries, idx, true), 0);\n return {\n n1: nodes_1[edge.node1.dataIndex],\n n2: nodes_1[edge.node2.dataIndex],\n d: d,\n curveness: curveness,\n ignoreForceLayout: edgeModel.get('ignoreForceLayout')\n };\n });\n // let coordSys = graphSeries.coordinateSystem;\n var rect = coordSys.getBoundingRect();\n var forceInstance = forceLayout(nodes_1, edges, {\n rect: rect,\n gravity: forceModel.get('gravity'),\n friction: forceModel.get('friction')\n });\n forceInstance.beforeStep(function (nodes, edges) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n if (nodes[i].fixed) {\n // Write back to layout instance\n vec2.copy(nodes[i].p, graph_1.getNodeByIndex(i).getLayout());\n }\n }\n });\n forceInstance.afterStep(function (nodes, edges, stopped) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n if (!nodes[i].fixed) {\n graph_1.getNodeByIndex(i).setLayout(nodes[i].p);\n }\n preservedPoints_1[nodeData_1.getId(i)] = nodes[i].p;\n }\n for (var i = 0, l = edges.length; i < l; i++) {\n var e = edges[i];\n var edge = graph_1.getEdgeByIndex(i);\n var p1 = e.n1.p;\n var p2 = e.n2.p;\n var points = edge.getLayout();\n points = points ? points.slice() : [];\n points[0] = points[0] || [];\n points[1] = points[1] || [];\n vec2.copy(points[0], p1);\n vec2.copy(points[1], p2);\n if (+e.curveness) {\n points[2] = [(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * e.curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * e.curveness];\n }\n edge.setLayout(points);\n }\n });\n graphSeries.forceLayout = forceInstance;\n graphSeries.preservedPoints = preservedPoints_1;\n // Step to get the layout\n forceInstance.step();\n } else {\n // Remove prev injected forceLayout instance\n graphSeries.forceLayout = null;\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME Where to create the simple view coordinate system\nimport View from '../../coord/View.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport * as bbox from 'zrender/lib/core/bbox.js';\nimport { extend } from 'zrender/lib/core/util.js';\nfunction getViewRect(seriesModel, api, aspect) {\n var option = extend(seriesModel.getBoxLayoutParams(), {\n aspect: aspect\n });\n return getLayoutRect(option, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\nexport default function createViewCoordSys(ecModel, api) {\n var viewList = [];\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var coordSysType = seriesModel.get('coordinateSystem');\n if (!coordSysType || coordSysType === 'view') {\n var data_1 = seriesModel.getData();\n var positions = data_1.mapArray(function (idx) {\n var itemModel = data_1.getItemModel(idx);\n return [+itemModel.get('x'), +itemModel.get('y')];\n });\n var min = [];\n var max = [];\n bbox.fromPoints(positions, min, max);\n // If width or height is 0\n if (max[0] - min[0] === 0) {\n max[0] += 1;\n min[0] -= 1;\n }\n if (max[1] - min[1] === 0) {\n max[1] += 1;\n min[1] -= 1;\n }\n var aspect = (max[0] - min[0]) / (max[1] - min[1]);\n // FIXME If get view rect after data processed?\n var viewRect = getViewRect(seriesModel, api, aspect);\n // Position may be NaN, use view rect instead\n if (isNaN(aspect)) {\n min = [viewRect.x, viewRect.y];\n max = [viewRect.x + viewRect.width, viewRect.y + viewRect.height];\n }\n var bbWidth = max[0] - min[0];\n var bbHeight = max[1] - min[1];\n var viewWidth = viewRect.width;\n var viewHeight = viewRect.height;\n var viewCoordSys = seriesModel.coordinateSystem = new View();\n viewCoordSys.zoomLimit = seriesModel.get('scaleLimit');\n viewCoordSys.setBoundingRect(min[0], min[1], bbWidth, bbHeight);\n viewCoordSys.setViewRect(viewRect.x, viewRect.y, viewWidth, viewHeight);\n // Update roam info\n viewCoordSys.setCenter(seriesModel.get('center'), api);\n viewCoordSys.setZoom(seriesModel.get('zoom'));\n viewList.push(viewCoordSys);\n }\n });\n return viewList;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Line path for bezier and straight line draw\n */\nimport * as graphic from '../../util/graphic.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nvar straightLineProto = graphic.Line.prototype;\nvar bezierCurveProto = graphic.BezierCurve.prototype;\nvar StraightLineShape = /** @class */function () {\n function StraightLineShape() {\n // Start point\n this.x1 = 0;\n this.y1 = 0;\n // End point\n this.x2 = 0;\n this.y2 = 0;\n this.percent = 1;\n }\n return StraightLineShape;\n}();\nvar CurveShape = /** @class */function (_super) {\n __extends(CurveShape, _super);\n function CurveShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return CurveShape;\n}(StraightLineShape);\nfunction isStraightLine(shape) {\n return isNaN(+shape.cpx1) || isNaN(+shape.cpy1);\n}\nvar ECLinePath = /** @class */function (_super) {\n __extends(ECLinePath, _super);\n function ECLinePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-line';\n return _this;\n }\n ECLinePath.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n ECLinePath.prototype.getDefaultShape = function () {\n return new StraightLineShape();\n };\n ECLinePath.prototype.buildPath = function (ctx, shape) {\n if (isStraightLine(shape)) {\n straightLineProto.buildPath.call(this, ctx, shape);\n } else {\n bezierCurveProto.buildPath.call(this, ctx, shape);\n }\n };\n ECLinePath.prototype.pointAt = function (t) {\n if (isStraightLine(this.shape)) {\n return straightLineProto.pointAt.call(this, t);\n } else {\n return bezierCurveProto.pointAt.call(this, t);\n }\n };\n ECLinePath.prototype.tangentAt = function (t) {\n var shape = this.shape;\n var p = isStraightLine(shape) ? [shape.x2 - shape.x1, shape.y2 - shape.y1] : bezierCurveProto.tangentAt.call(this, t);\n return vec2.normalize(p, p);\n };\n return ECLinePath;\n}(graphic.Path);\nexport default ECLinePath;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { isArray, each } from 'zrender/lib/core/util.js';\nimport * as vector from 'zrender/lib/core/vector.js';\nimport * as symbolUtil from '../../util/symbol.js';\nimport ECLinePath from './LinePath.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, enterEmphasis, leaveEmphasis, SPECIAL_STATES } from '../../util/states.js';\nimport { getLabelStatesModels, setLabelStyle } from '../../label/labelStyle.js';\nimport { round } from '../../util/number.js';\nvar SYMBOL_CATEGORIES = ['fromSymbol', 'toSymbol'];\nfunction makeSymbolTypeKey(symbolCategory) {\n return '_' + symbolCategory + 'Type';\n}\nfunction makeSymbolTypeValue(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n if (!symbolType || symbolType === 'none') {\n return symbolType;\n }\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n var symbolOffset = lineData.getItemVisual(idx, name + 'Offset');\n var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect');\n var symbolSizeArr = symbolUtil.normalizeSymbolSize(symbolSize);\n var symbolOffsetArr = symbolUtil.normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);\n return symbolType + symbolSizeArr + symbolOffsetArr + (symbolRotate || '') + (symbolKeepAspect || '');\n}\n/**\n * @inner\n */\nfunction createSymbol(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n if (!symbolType || symbolType === 'none') {\n return;\n }\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n var symbolOffset = lineData.getItemVisual(idx, name + 'Offset');\n var symbolKeepAspect = lineData.getItemVisual(idx, name + 'KeepAspect');\n var symbolSizeArr = symbolUtil.normalizeSymbolSize(symbolSize);\n var symbolOffsetArr = symbolUtil.normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr);\n var symbolPath = symbolUtil.createSymbol(symbolType, -symbolSizeArr[0] / 2 + symbolOffsetArr[0], -symbolSizeArr[1] / 2 + symbolOffsetArr[1], symbolSizeArr[0], symbolSizeArr[1], null, symbolKeepAspect);\n symbolPath.__specifiedRotation = symbolRotate == null || isNaN(symbolRotate) ? void 0 : +symbolRotate * Math.PI / 180 || 0;\n symbolPath.name = name;\n return symbolPath;\n}\nfunction createLine(points) {\n var line = new ECLinePath({\n name: 'line',\n subPixelOptimize: true\n });\n setLinePoints(line.shape, points);\n return line;\n}\nfunction setLinePoints(targetShape, points) {\n targetShape.x1 = points[0][0];\n targetShape.y1 = points[0][1];\n targetShape.x2 = points[1][0];\n targetShape.y2 = points[1][1];\n targetShape.percent = 1;\n var cp1 = points[2];\n if (cp1) {\n targetShape.cpx1 = cp1[0];\n targetShape.cpy1 = cp1[1];\n } else {\n targetShape.cpx1 = NaN;\n targetShape.cpy1 = NaN;\n }\n}\nvar Line = /** @class */function (_super) {\n __extends(Line, _super);\n function Line(lineData, idx, seriesScope) {\n var _this = _super.call(this) || this;\n _this._createLine(lineData, idx, seriesScope);\n return _this;\n }\n Line.prototype._createLine = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var linePoints = lineData.getItemLayout(idx);\n var line = createLine(linePoints);\n line.shape.percent = 0;\n graphic.initProps(line, {\n shape: {\n percent: 1\n }\n }, seriesModel, idx);\n this.add(line);\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = createSymbol(symbolCategory, lineData, idx);\n // symbols must added after line to make sure\n // it will be updated after line#update.\n // Or symbol position and rotation update in line#beforeUpdate will be one frame slow\n this.add(symbol);\n this[makeSymbolTypeKey(symbolCategory)] = makeSymbolTypeValue(symbolCategory, lineData, idx);\n }, this);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n // TODO More strict on the List type in parameters?\n Line.prototype.updateData = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var linePoints = lineData.getItemLayout(idx);\n var target = {\n shape: {}\n };\n setLinePoints(target.shape, linePoints);\n graphic.updateProps(line, target, seriesModel, idx);\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbolType = makeSymbolTypeValue(symbolCategory, lineData, idx);\n var key = makeSymbolTypeKey(symbolCategory);\n // Symbol changed\n if (this[key] !== symbolType) {\n this.remove(this.childOfName(symbolCategory));\n var symbol = createSymbol(symbolCategory, lineData, idx);\n this.add(symbol);\n }\n this[key] = symbolType;\n }, this);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n ;\n Line.prototype.getLinePath = function () {\n return this.childAt(0);\n };\n Line.prototype._updateCommonStl = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle;\n var blurLineStyle = seriesScope && seriesScope.blurLineStyle;\n var selectLineStyle = seriesScope && seriesScope.selectLineStyle;\n var labelStatesModels = seriesScope && seriesScope.labelStatesModels;\n var emphasisDisabled = seriesScope && seriesScope.emphasisDisabled;\n var focus = seriesScope && seriesScope.focus;\n var blurScope = seriesScope && seriesScope.blurScope;\n // Optimization for large dataset\n if (!seriesScope || lineData.hasItemOption) {\n var itemModel = lineData.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle();\n blurLineStyle = itemModel.getModel(['blur', 'lineStyle']).getLineStyle();\n selectLineStyle = itemModel.getModel(['select', 'lineStyle']).getLineStyle();\n emphasisDisabled = emphasisModel.get('disabled');\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n labelStatesModels = getLabelStatesModels(itemModel);\n }\n var lineStyle = lineData.getItemVisual(idx, 'style');\n var visualColor = lineStyle.stroke;\n line.useStyle(lineStyle);\n line.style.fill = null;\n line.style.strokeNoScale = true;\n line.ensureState('emphasis').style = emphasisLineStyle;\n line.ensureState('blur').style = blurLineStyle;\n line.ensureState('select').style = selectLineStyle;\n // Update symbol\n each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = this.childOfName(symbolCategory);\n if (symbol) {\n // Share opacity and color with line.\n symbol.setColor(visualColor);\n symbol.style.opacity = lineStyle.opacity;\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n var stateName = SPECIAL_STATES[i];\n var lineState = line.getState(stateName);\n if (lineState) {\n var lineStateStyle = lineState.style || {};\n var state = symbol.ensureState(stateName);\n var stateStyle = state.style || (state.style = {});\n if (lineStateStyle.stroke != null) {\n stateStyle[symbol.__isEmptyBrush ? 'stroke' : 'fill'] = lineStateStyle.stroke;\n }\n if (lineStateStyle.opacity != null) {\n stateStyle.opacity = lineStateStyle.opacity;\n }\n }\n }\n symbol.markRedraw();\n }\n }, this);\n var rawVal = seriesModel.getRawValue(idx);\n setLabelStyle(this, labelStatesModels, {\n labelDataIndex: idx,\n labelFetcher: {\n getFormattedLabel: function (dataIndex, stateName) {\n return seriesModel.getFormattedLabel(dataIndex, stateName, lineData.dataType);\n }\n },\n inheritColor: visualColor || '#000',\n defaultOpacity: lineStyle.opacity,\n defaultText: (rawVal == null ? lineData.getName(idx) : isFinite(rawVal) ? round(rawVal) : rawVal) + ''\n });\n var label = this.getTextContent();\n // Always set `textStyle` even if `normalStyle.text` is null, because default\n // values have to be set on `normalStyle`.\n if (label) {\n var labelNormalModel = labelStatesModels.normal;\n label.__align = label.style.align;\n label.__verticalAlign = label.style.verticalAlign;\n // 'start', 'middle', 'end'\n label.__position = labelNormalModel.get('position') || 'middle';\n var distance = labelNormalModel.get('distance');\n if (!isArray(distance)) {\n distance = [distance, distance];\n }\n label.__labelDistance = distance;\n }\n this.setTextConfig({\n position: null,\n local: true,\n inside: false // Can't be inside for stroke element.\n });\n\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Line.prototype.highlight = function () {\n enterEmphasis(this);\n };\n Line.prototype.downplay = function () {\n leaveEmphasis(this);\n };\n Line.prototype.updateLayout = function (lineData, idx) {\n this.setLinePoints(lineData.getItemLayout(idx));\n };\n Line.prototype.setLinePoints = function (points) {\n var linePath = this.childOfName('line');\n setLinePoints(linePath.shape, points);\n linePath.dirty();\n };\n Line.prototype.beforeUpdate = function () {\n var lineGroup = this;\n var symbolFrom = lineGroup.childOfName('fromSymbol');\n var symbolTo = lineGroup.childOfName('toSymbol');\n var label = lineGroup.getTextContent();\n // Quick reject\n if (!symbolFrom && !symbolTo && (!label || label.ignore)) {\n return;\n }\n var invScale = 1;\n var parentNode = this.parent;\n while (parentNode) {\n if (parentNode.scaleX) {\n invScale /= parentNode.scaleX;\n }\n parentNode = parentNode.parent;\n }\n var line = lineGroup.childOfName('line');\n // If line not changed\n // FIXME Parent scale changed\n if (!this.__dirty && !line.__dirty) {\n return;\n }\n var percent = line.shape.percent;\n var fromPos = line.pointAt(0);\n var toPos = line.pointAt(percent);\n var d = vector.sub([], toPos, fromPos);\n vector.normalize(d, d);\n function setSymbolRotation(symbol, percent) {\n // Fix #12388\n // when symbol is set to be 'arrow' in markLine,\n // symbolRotate value will be ignored, and compulsively use tangent angle.\n // rotate by default if symbol rotation is not specified\n var specifiedRotation = symbol.__specifiedRotation;\n if (specifiedRotation == null) {\n var tangent = line.tangentAt(percent);\n symbol.attr('rotation', (percent === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(tangent[1], tangent[0]));\n } else {\n symbol.attr('rotation', specifiedRotation);\n }\n }\n if (symbolFrom) {\n symbolFrom.setPosition(fromPos);\n setSymbolRotation(symbolFrom, 0);\n symbolFrom.scaleX = symbolFrom.scaleY = invScale * percent;\n symbolFrom.markRedraw();\n }\n if (symbolTo) {\n symbolTo.setPosition(toPos);\n setSymbolRotation(symbolTo, 1);\n symbolTo.scaleX = symbolTo.scaleY = invScale * percent;\n symbolTo.markRedraw();\n }\n if (label && !label.ignore) {\n label.x = label.y = 0;\n label.originX = label.originY = 0;\n var textAlign = void 0;\n var textVerticalAlign = void 0;\n var distance = label.__labelDistance;\n var distanceX = distance[0] * invScale;\n var distanceY = distance[1] * invScale;\n var halfPercent = percent / 2;\n var tangent = line.tangentAt(halfPercent);\n var n = [tangent[1], -tangent[0]];\n var cp = line.pointAt(halfPercent);\n if (n[1] > 0) {\n n[0] = -n[0];\n n[1] = -n[1];\n }\n var dir = tangent[0] < 0 ? -1 : 1;\n if (label.__position !== 'start' && label.__position !== 'end') {\n var rotation = -Math.atan2(tangent[1], tangent[0]);\n if (toPos[0] < fromPos[0]) {\n rotation = Math.PI + rotation;\n }\n label.rotation = rotation;\n }\n var dy = void 0;\n switch (label.__position) {\n case 'insideStartTop':\n case 'insideMiddleTop':\n case 'insideEndTop':\n case 'middle':\n dy = -distanceY;\n textVerticalAlign = 'bottom';\n break;\n case 'insideStartBottom':\n case 'insideMiddleBottom':\n case 'insideEndBottom':\n dy = distanceY;\n textVerticalAlign = 'top';\n break;\n default:\n dy = 0;\n textVerticalAlign = 'middle';\n }\n switch (label.__position) {\n case 'end':\n label.x = d[0] * distanceX + toPos[0];\n label.y = d[1] * distanceY + toPos[1];\n textAlign = d[0] > 0.8 ? 'left' : d[0] < -0.8 ? 'right' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'top' : d[1] < -0.8 ? 'bottom' : 'middle';\n break;\n case 'start':\n label.x = -d[0] * distanceX + fromPos[0];\n label.y = -d[1] * distanceY + fromPos[1];\n textAlign = d[0] > 0.8 ? 'right' : d[0] < -0.8 ? 'left' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'bottom' : d[1] < -0.8 ? 'top' : 'middle';\n break;\n case 'insideStartTop':\n case 'insideStart':\n case 'insideStartBottom':\n label.x = distanceX * dir + fromPos[0];\n label.y = fromPos[1] + dy;\n textAlign = tangent[0] < 0 ? 'right' : 'left';\n label.originX = -distanceX * dir;\n label.originY = -dy;\n break;\n case 'insideMiddleTop':\n case 'insideMiddle':\n case 'insideMiddleBottom':\n case 'middle':\n label.x = cp[0];\n label.y = cp[1] + dy;\n textAlign = 'center';\n label.originY = -dy;\n break;\n case 'insideEndTop':\n case 'insideEnd':\n case 'insideEndBottom':\n label.x = -distanceX * dir + toPos[0];\n label.y = toPos[1] + dy;\n textAlign = tangent[0] >= 0 ? 'right' : 'left';\n label.originX = distanceX * dir;\n label.originY = -dy;\n break;\n }\n label.scaleX = label.scaleY = invScale;\n label.setStyle({\n // Use the user specified text align and baseline first\n verticalAlign: label.__verticalAlign || textVerticalAlign,\n align: label.__align || textAlign\n });\n }\n };\n return Line;\n}(graphic.Group);\nexport default Line;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as graphic from '../../util/graphic.js';\nimport LineGroup from './Line.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nvar LineDraw = /** @class */function () {\n function LineDraw(LineCtor) {\n this.group = new graphic.Group();\n this._LineCtor = LineCtor || LineGroup;\n }\n LineDraw.prototype.updateData = function (lineData) {\n var _this = this;\n // Remove progressive els.\n this._progressiveEls = null;\n var lineDraw = this;\n var group = lineDraw.group;\n var oldLineData = lineDraw._lineData;\n lineDraw._lineData = lineData;\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldLineData) {\n group.removeAll();\n }\n var seriesScope = makeSeriesScope(lineData);\n lineData.diff(oldLineData).add(function (idx) {\n _this._doAdd(lineData, idx, seriesScope);\n }).update(function (newIdx, oldIdx) {\n _this._doUpdate(oldLineData, lineData, oldIdx, newIdx, seriesScope);\n }).remove(function (idx) {\n group.remove(oldLineData.getItemGraphicEl(idx));\n }).execute();\n };\n ;\n LineDraw.prototype.updateLayout = function () {\n var lineData = this._lineData;\n // Do not support update layout in incremental mode.\n if (!lineData) {\n return;\n }\n lineData.eachItemGraphicEl(function (el, idx) {\n el.updateLayout(lineData, idx);\n }, this);\n };\n ;\n LineDraw.prototype.incrementalPrepareUpdate = function (lineData) {\n this._seriesScope = makeSeriesScope(lineData);\n this._lineData = null;\n this.group.removeAll();\n };\n ;\n LineDraw.prototype.incrementalUpdate = function (taskParams, lineData) {\n this._progressiveEls = [];\n function updateIncrementalAndHover(el) {\n if (!el.isGroup && !isEffectObject(el)) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var itemLayout = lineData.getItemLayout(idx);\n if (lineNeedsDraw(itemLayout)) {\n var el = new this._LineCtor(lineData, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n this.group.add(el);\n lineData.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n LineDraw.prototype.remove = function () {\n this.group.removeAll();\n };\n ;\n LineDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n LineDraw.prototype._doAdd = function (lineData, idx, seriesScope) {\n var itemLayout = lineData.getItemLayout(idx);\n if (!lineNeedsDraw(itemLayout)) {\n return;\n }\n var el = new this._LineCtor(lineData, idx, seriesScope);\n lineData.setItemGraphicEl(idx, el);\n this.group.add(el);\n };\n LineDraw.prototype._doUpdate = function (oldLineData, newLineData, oldIdx, newIdx, seriesScope) {\n var itemEl = oldLineData.getItemGraphicEl(oldIdx);\n if (!lineNeedsDraw(newLineData.getItemLayout(newIdx))) {\n this.group.remove(itemEl);\n return;\n }\n if (!itemEl) {\n itemEl = new this._LineCtor(newLineData, newIdx, seriesScope);\n } else {\n itemEl.updateData(newLineData, newIdx, seriesScope);\n }\n newLineData.setItemGraphicEl(newIdx, itemEl);\n this.group.add(itemEl);\n };\n return LineDraw;\n}();\nfunction isEffectObject(el) {\n return el.animators && el.animators.length > 0;\n}\nfunction makeSeriesScope(lineData) {\n var hostModel = lineData.hostModel;\n var emphasisModel = hostModel.getModel('emphasis');\n return {\n lineStyle: hostModel.getModel('lineStyle').getLineStyle(),\n emphasisLineStyle: emphasisModel.getModel(['lineStyle']).getLineStyle(),\n blurLineStyle: hostModel.getModel(['blur', 'lineStyle']).getLineStyle(),\n selectLineStyle: hostModel.getModel(['select', 'lineStyle']).getLineStyle(),\n emphasisDisabled: emphasisModel.get('disabled'),\n blurScope: emphasisModel.get('blurScope'),\n focus: emphasisModel.get('focus'),\n labelStatesModels: getLabelStatesModels(hostModel)\n };\n}\nfunction isPointNaN(pt) {\n return isNaN(pt[0]) || isNaN(pt[1]);\n}\nfunction lineNeedsDraw(pts) {\n return pts && !isPointNaN(pts[0]) && !isPointNaN(pts[1]);\n}\nexport default LineDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as curveTool from 'zrender/lib/core/curve.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport { getSymbolSize } from './graphHelper.js';\nvar v1 = [];\nvar v2 = [];\nvar v3 = [];\nvar quadraticAt = curveTool.quadraticAt;\nvar v2DistSquare = vec2.distSquare;\nvar mathAbs = Math.abs;\nfunction intersectCurveCircle(curvePoints, center, radius) {\n var p0 = curvePoints[0];\n var p1 = curvePoints[1];\n var p2 = curvePoints[2];\n var d = Infinity;\n var t;\n var radiusSquare = radius * radius;\n var interval = 0.1;\n for (var _t = 0.1; _t <= 0.9; _t += 0.1) {\n v1[0] = quadraticAt(p0[0], p1[0], p2[0], _t);\n v1[1] = quadraticAt(p0[1], p1[1], p2[1], _t);\n var diff = mathAbs(v2DistSquare(v1, center) - radiusSquare);\n if (diff < d) {\n d = diff;\n t = _t;\n }\n }\n // Assume the segment is monotone,Find root through Bisection method\n // At most 32 iteration\n for (var i = 0; i < 32; i++) {\n // let prev = t - interval;\n var next = t + interval;\n // v1[0] = quadraticAt(p0[0], p1[0], p2[0], prev);\n // v1[1] = quadraticAt(p0[1], p1[1], p2[1], prev);\n v2[0] = quadraticAt(p0[0], p1[0], p2[0], t);\n v2[1] = quadraticAt(p0[1], p1[1], p2[1], t);\n v3[0] = quadraticAt(p0[0], p1[0], p2[0], next);\n v3[1] = quadraticAt(p0[1], p1[1], p2[1], next);\n var diff = v2DistSquare(v2, center) - radiusSquare;\n if (mathAbs(diff) < 1e-2) {\n break;\n }\n // let prevDiff = v2DistSquare(v1, center) - radiusSquare;\n var nextDiff = v2DistSquare(v3, center) - radiusSquare;\n interval /= 2;\n if (diff < 0) {\n if (nextDiff >= 0) {\n t = t + interval;\n } else {\n t = t - interval;\n }\n } else {\n if (nextDiff >= 0) {\n t = t - interval;\n } else {\n t = t + interval;\n }\n }\n }\n return t;\n}\n// Adjust edge to avoid\nexport default function adjustEdge(graph, scale) {\n var tmp0 = [];\n var quadraticSubdivide = curveTool.quadraticSubdivide;\n var pts = [[], [], []];\n var pts2 = [[], []];\n var v = [];\n scale /= 2;\n graph.eachEdge(function (edge, idx) {\n var linePoints = edge.getLayout();\n var fromSymbol = edge.getVisual('fromSymbol');\n var toSymbol = edge.getVisual('toSymbol');\n if (!linePoints.__original) {\n linePoints.__original = [vec2.clone(linePoints[0]), vec2.clone(linePoints[1])];\n if (linePoints[2]) {\n linePoints.__original.push(vec2.clone(linePoints[2]));\n }\n }\n var originalPoints = linePoints.__original;\n // Quadratic curve\n if (linePoints[2] != null) {\n vec2.copy(pts[0], originalPoints[0]);\n vec2.copy(pts[1], originalPoints[2]);\n vec2.copy(pts[2], originalPoints[1]);\n if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n var t = intersectCurveCircle(pts, originalPoints[0], symbolSize * scale);\n // Subdivide and get the second\n quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0);\n pts[0][0] = tmp0[3];\n pts[1][0] = tmp0[4];\n quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0);\n pts[0][1] = tmp0[3];\n pts[1][1] = tmp0[4];\n }\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n var t = intersectCurveCircle(pts, originalPoints[1], symbolSize * scale);\n // Subdivide and get the first\n quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0);\n pts[1][0] = tmp0[1];\n pts[2][0] = tmp0[2];\n quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0);\n pts[1][1] = tmp0[1];\n pts[2][1] = tmp0[2];\n }\n // Copy back to layout\n vec2.copy(linePoints[0], pts[0]);\n vec2.copy(linePoints[1], pts[2]);\n vec2.copy(linePoints[2], pts[1]);\n }\n // Line\n else {\n vec2.copy(pts2[0], originalPoints[0]);\n vec2.copy(pts2[1], originalPoints[1]);\n vec2.sub(v, pts2[1], pts2[0]);\n vec2.normalize(v, v);\n if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n vec2.scaleAndAdd(pts2[0], pts2[0], v, symbolSize * scale);\n }\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n vec2.scaleAndAdd(pts2[1], pts2[1], v, -symbolSize * scale);\n }\n vec2.copy(linePoints[0], pts2[0]);\n vec2.copy(linePoints[1], pts2[1]);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport LineDraw from '../helper/LineDraw.js';\nimport RoamController from '../../component/helper/RoamController.js';\nimport * as roamHelper from '../../component/helper/roamHelper.js';\nimport { onIrrelevantElement } from '../../component/helper/cursorHelper.js';\nimport * as graphic from '../../util/graphic.js';\nimport adjustEdge from './adjustEdge.js';\nimport { getNodeGlobalScale } from './graphHelper.js';\nimport ChartView from '../../view/Chart.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { simpleLayoutEdge } from './simpleLayoutHelper.js';\nimport { circularLayout, rotateNodeLabel } from './circularLayoutHelper.js';\nfunction isViewCoordSys(coordSys) {\n return coordSys.type === 'view';\n}\nvar GraphView = /** @class */function (_super) {\n __extends(GraphView, _super);\n function GraphView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphView.type;\n return _this;\n }\n GraphView.prototype.init = function (ecModel, api) {\n var symbolDraw = new SymbolDraw();\n var lineDraw = new LineDraw();\n var group = this.group;\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: group\n };\n group.add(symbolDraw.group);\n group.add(lineDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineDraw = lineDraw;\n this._firstRender = true;\n };\n GraphView.prototype.render = function (seriesModel, ecModel, api) {\n var _this = this;\n var coordSys = seriesModel.coordinateSystem;\n this._model = seriesModel;\n var symbolDraw = this._symbolDraw;\n var lineDraw = this._lineDraw;\n var group = this.group;\n if (isViewCoordSys(coordSys)) {\n var groupNewProp = {\n x: coordSys.x,\n y: coordSys.y,\n scaleX: coordSys.scaleX,\n scaleY: coordSys.scaleY\n };\n if (this._firstRender) {\n group.attr(groupNewProp);\n } else {\n graphic.updateProps(group, groupNewProp, seriesModel);\n }\n }\n // Fix edge contact point with node\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n var data = seriesModel.getData();\n symbolDraw.updateData(data);\n var edgeData = seriesModel.getEdgeData();\n // TODO: TYPE\n lineDraw.updateData(edgeData);\n this._updateNodeAndLinkScale();\n this._updateController(seriesModel, ecModel, api);\n clearTimeout(this._layoutTimeout);\n var forceLayout = seriesModel.forceLayout;\n var layoutAnimation = seriesModel.get(['force', 'layoutAnimation']);\n if (forceLayout) {\n this._startForceLayoutIteration(forceLayout, layoutAnimation);\n }\n var layout = seriesModel.get('layout');\n data.graph.eachNode(function (node) {\n var idx = node.dataIndex;\n var el = node.getGraphicEl();\n var itemModel = node.getModel();\n if (!el) {\n return;\n }\n // Update draggable\n el.off('drag').off('dragend');\n var draggable = itemModel.get('draggable');\n if (draggable) {\n el.on('drag', function (e) {\n switch (layout) {\n case 'force':\n forceLayout.warmUp();\n !_this._layouting && _this._startForceLayoutIteration(forceLayout, layoutAnimation);\n forceLayout.setFixed(idx);\n // Write position back to layout\n data.setItemLayout(idx, [el.x, el.y]);\n break;\n case 'circular':\n data.setItemLayout(idx, [el.x, el.y]);\n // mark node fixed\n node.setLayout({\n fixed: true\n }, true);\n // recalculate circular layout\n circularLayout(seriesModel, 'symbolSize', node, [e.offsetX, e.offsetY]);\n _this.updateLayout(seriesModel);\n break;\n case 'none':\n default:\n data.setItemLayout(idx, [el.x, el.y]);\n // update edge\n simpleLayoutEdge(seriesModel.getGraph(), seriesModel);\n _this.updateLayout(seriesModel);\n break;\n }\n }).on('dragend', function () {\n if (forceLayout) {\n forceLayout.setUnfixed(idx);\n }\n });\n }\n el.setDraggable(draggable, !!itemModel.get('cursor'));\n var focus = itemModel.get(['emphasis', 'focus']);\n if (focus === 'adjacency') {\n getECData(el).focus = node.getAdjacentDataIndices();\n }\n });\n data.graph.eachEdge(function (edge) {\n var el = edge.getGraphicEl();\n var focus = edge.getModel().get(['emphasis', 'focus']);\n if (!el) {\n return;\n }\n if (focus === 'adjacency') {\n getECData(el).focus = {\n edge: [edge.dataIndex],\n node: [edge.node1.dataIndex, edge.node2.dataIndex]\n };\n }\n });\n var circularRotateLabel = seriesModel.get('layout') === 'circular' && seriesModel.get(['circular', 'rotateLabel']);\n var cx = data.getLayout('cx');\n var cy = data.getLayout('cy');\n data.graph.eachNode(function (node) {\n rotateNodeLabel(node, circularRotateLabel, cx, cy);\n });\n this._firstRender = false;\n };\n GraphView.prototype.dispose = function () {\n this.remove();\n this._controller && this._controller.dispose();\n this._controllerHost = null;\n };\n GraphView.prototype._startForceLayoutIteration = function (forceLayout, layoutAnimation) {\n var self = this;\n (function step() {\n forceLayout.step(function (stopped) {\n self.updateLayout(self._model);\n (self._layouting = !stopped) && (layoutAnimation ? self._layoutTimeout = setTimeout(step, 16) : step());\n });\n })();\n };\n GraphView.prototype._updateController = function (seriesModel, ecModel, api) {\n var _this = this;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n var group = this.group;\n controller.setPointerChecker(function (e, x, y) {\n var rect = group.getBoundingRect();\n rect.applyTransform(group.transform);\n return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel);\n });\n if (!isViewCoordSys(seriesModel.coordinateSystem)) {\n controller.disable();\n return;\n }\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n controller.off('pan').off('zoom').on('pan', function (e) {\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'graphRoam',\n dx: e.dx,\n dy: e.dy\n });\n }).on('zoom', function (e) {\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'graphRoam',\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n });\n _this._updateNodeAndLinkScale();\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n _this._lineDraw.updateLayout();\n // Only update label layout on zoom\n api.updateLabelLayout();\n });\n };\n GraphView.prototype._updateNodeAndLinkScale = function () {\n var seriesModel = this._model;\n var data = seriesModel.getData();\n var nodeScale = getNodeGlobalScale(seriesModel);\n data.eachItemGraphicEl(function (el, idx) {\n el && el.setSymbolScale(nodeScale);\n });\n };\n GraphView.prototype.updateLayout = function (seriesModel) {\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n this._symbolDraw.updateLayout();\n this._lineDraw.updateLayout();\n };\n GraphView.prototype.remove = function () {\n clearTimeout(this._layoutTimeout);\n this._layouting = false;\n this._layoutTimeout = null;\n this._symbolDraw && this._symbolDraw.remove();\n this._lineDraw && this._lineDraw.remove();\n };\n GraphView.type = 'graph';\n return GraphView;\n}(ChartView);\nexport default GraphView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\n// id may be function name of Object, add a prefix to avoid this problem.\nfunction generateNodeKey(id) {\n return '_EC_' + id;\n}\nvar Graph = /** @class */function () {\n function Graph(directed) {\n this.type = 'graph';\n this.nodes = [];\n this.edges = [];\n this._nodesMap = {};\n /**\n * @type {Object.}\n * @private\n */\n this._edgesMap = {};\n this._directed = directed || false;\n }\n /**\n * If is directed graph\n */\n Graph.prototype.isDirected = function () {\n return this._directed;\n };\n ;\n /**\n * Add a new node\n */\n Graph.prototype.addNode = function (id, dataIndex) {\n id = id == null ? '' + dataIndex : '' + id;\n var nodesMap = this._nodesMap;\n if (nodesMap[generateNodeKey(id)]) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Graph nodes have duplicate name or id');\n }\n return;\n }\n var node = new GraphNode(id, dataIndex);\n node.hostGraph = this;\n this.nodes.push(node);\n nodesMap[generateNodeKey(id)] = node;\n return node;\n };\n ;\n /**\n * Get node by data index\n */\n Graph.prototype.getNodeByIndex = function (dataIndex) {\n var rawIdx = this.data.getRawIndex(dataIndex);\n return this.nodes[rawIdx];\n };\n ;\n /**\n * Get node by id\n */\n Graph.prototype.getNodeById = function (id) {\n return this._nodesMap[generateNodeKey(id)];\n };\n ;\n /**\n * Add a new edge\n */\n Graph.prototype.addEdge = function (n1, n2, dataIndex) {\n var nodesMap = this._nodesMap;\n var edgesMap = this._edgesMap;\n // PENDING\n if (zrUtil.isNumber(n1)) {\n n1 = this.nodes[n1];\n }\n if (zrUtil.isNumber(n2)) {\n n2 = this.nodes[n2];\n }\n if (!(n1 instanceof GraphNode)) {\n n1 = nodesMap[generateNodeKey(n1)];\n }\n if (!(n2 instanceof GraphNode)) {\n n2 = nodesMap[generateNodeKey(n2)];\n }\n if (!n1 || !n2) {\n return;\n }\n var key = n1.id + '-' + n2.id;\n var edge = new GraphEdge(n1, n2, dataIndex);\n edge.hostGraph = this;\n if (this._directed) {\n n1.outEdges.push(edge);\n n2.inEdges.push(edge);\n }\n n1.edges.push(edge);\n if (n1 !== n2) {\n n2.edges.push(edge);\n }\n this.edges.push(edge);\n edgesMap[key] = edge;\n return edge;\n };\n ;\n /**\n * Get edge by data index\n */\n Graph.prototype.getEdgeByIndex = function (dataIndex) {\n var rawIdx = this.edgeData.getRawIndex(dataIndex);\n return this.edges[rawIdx];\n };\n ;\n /**\n * Get edge by two linked nodes\n */\n Graph.prototype.getEdge = function (n1, n2) {\n if (n1 instanceof GraphNode) {\n n1 = n1.id;\n }\n if (n2 instanceof GraphNode) {\n n2 = n2.id;\n }\n var edgesMap = this._edgesMap;\n if (this._directed) {\n return edgesMap[n1 + '-' + n2];\n } else {\n return edgesMap[n1 + '-' + n2] || edgesMap[n2 + '-' + n1];\n }\n };\n ;\n /**\n * Iterate all nodes\n */\n Graph.prototype.eachNode = function (cb, context) {\n var nodes = this.nodes;\n var len = nodes.length;\n for (var i = 0; i < len; i++) {\n if (nodes[i].dataIndex >= 0) {\n cb.call(context, nodes[i], i);\n }\n }\n };\n ;\n /**\n * Iterate all edges\n */\n Graph.prototype.eachEdge = function (cb, context) {\n var edges = this.edges;\n var len = edges.length;\n for (var i = 0; i < len; i++) {\n if (edges[i].dataIndex >= 0 && edges[i].node1.dataIndex >= 0 && edges[i].node2.dataIndex >= 0) {\n cb.call(context, edges[i], i);\n }\n }\n };\n ;\n /**\n * Breadth first traverse\n * Return true to stop traversing\n */\n Graph.prototype.breadthFirstTraverse = function (cb, startNode, direction, context) {\n if (!(startNode instanceof GraphNode)) {\n startNode = this._nodesMap[generateNodeKey(startNode)];\n }\n if (!startNode) {\n return;\n }\n var edgeType = direction === 'out' ? 'outEdges' : direction === 'in' ? 'inEdges' : 'edges';\n for (var i = 0; i < this.nodes.length; i++) {\n this.nodes[i].__visited = false;\n }\n if (cb.call(context, startNode, null)) {\n return;\n }\n var queue = [startNode];\n while (queue.length) {\n var currentNode = queue.shift();\n var edges = currentNode[edgeType];\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n var otherNode = e.node1 === currentNode ? e.node2 : e.node1;\n if (!otherNode.__visited) {\n if (cb.call(context, otherNode, currentNode)) {\n // Stop traversing\n return;\n }\n queue.push(otherNode);\n otherNode.__visited = true;\n }\n }\n }\n };\n ;\n // TODO\n // depthFirstTraverse(\n // cb, startNode, direction, context\n // ) {\n // };\n // Filter update\n Graph.prototype.update = function () {\n var data = this.data;\n var edgeData = this.edgeData;\n var nodes = this.nodes;\n var edges = this.edges;\n for (var i = 0, len = nodes.length; i < len; i++) {\n nodes[i].dataIndex = -1;\n }\n for (var i = 0, len = data.count(); i < len; i++) {\n nodes[data.getRawIndex(i)].dataIndex = i;\n }\n edgeData.filterSelf(function (idx) {\n var edge = edges[edgeData.getRawIndex(idx)];\n return edge.node1.dataIndex >= 0 && edge.node2.dataIndex >= 0;\n });\n // Update edge\n for (var i = 0, len = edges.length; i < len; i++) {\n edges[i].dataIndex = -1;\n }\n for (var i = 0, len = edgeData.count(); i < len; i++) {\n edges[edgeData.getRawIndex(i)].dataIndex = i;\n }\n };\n ;\n /**\n * @return {module:echarts/data/Graph}\n */\n Graph.prototype.clone = function () {\n var graph = new Graph(this._directed);\n var nodes = this.nodes;\n var edges = this.edges;\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(nodes[i].id, nodes[i].dataIndex);\n }\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n graph.addEdge(e.node1.id, e.node2.id, e.dataIndex);\n }\n return graph;\n };\n ;\n return Graph;\n}();\nvar GraphNode = /** @class */function () {\n function GraphNode(id, dataIndex) {\n this.inEdges = [];\n this.outEdges = [];\n this.edges = [];\n this.dataIndex = -1;\n this.id = id == null ? '' : id;\n this.dataIndex = dataIndex == null ? -1 : dataIndex;\n }\n /**\n * @return {number}\n */\n GraphNode.prototype.degree = function () {\n return this.edges.length;\n };\n /**\n * @return {number}\n */\n GraphNode.prototype.inDegree = function () {\n return this.inEdges.length;\n };\n /**\n * @return {number}\n */\n GraphNode.prototype.outDegree = function () {\n return this.outEdges.length;\n };\n GraphNode.prototype.getModel = function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n var graph = this.hostGraph;\n var itemModel = graph.data.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n };\n GraphNode.prototype.getAdjacentDataIndices = function () {\n var dataIndices = {\n edge: [],\n node: []\n };\n for (var i = 0; i < this.edges.length; i++) {\n var adjacentEdge = this.edges[i];\n if (adjacentEdge.dataIndex < 0) {\n continue;\n }\n dataIndices.edge.push(adjacentEdge.dataIndex);\n dataIndices.node.push(adjacentEdge.node1.dataIndex, adjacentEdge.node2.dataIndex);\n }\n return dataIndices;\n };\n GraphNode.prototype.getTrajectoryDataIndices = function () {\n var connectedEdgesMap = zrUtil.createHashMap();\n var connectedNodesMap = zrUtil.createHashMap();\n for (var i = 0; i < this.edges.length; i++) {\n var adjacentEdge = this.edges[i];\n if (adjacentEdge.dataIndex < 0) {\n continue;\n }\n connectedEdgesMap.set(adjacentEdge.dataIndex, true);\n var sourceNodesQueue = [adjacentEdge.node1];\n var targetNodesQueue = [adjacentEdge.node2];\n var nodeIteratorIndex = 0;\n while (nodeIteratorIndex < sourceNodesQueue.length) {\n var sourceNode = sourceNodesQueue[nodeIteratorIndex];\n nodeIteratorIndex++;\n connectedNodesMap.set(sourceNode.dataIndex, true);\n for (var j = 0; j < sourceNode.inEdges.length; j++) {\n connectedEdgesMap.set(sourceNode.inEdges[j].dataIndex, true);\n sourceNodesQueue.push(sourceNode.inEdges[j].node1);\n }\n }\n nodeIteratorIndex = 0;\n while (nodeIteratorIndex < targetNodesQueue.length) {\n var targetNode = targetNodesQueue[nodeIteratorIndex];\n nodeIteratorIndex++;\n connectedNodesMap.set(targetNode.dataIndex, true);\n for (var j = 0; j < targetNode.outEdges.length; j++) {\n connectedEdgesMap.set(targetNode.outEdges[j].dataIndex, true);\n targetNodesQueue.push(targetNode.outEdges[j].node2);\n }\n }\n }\n return {\n edge: connectedEdgesMap.keys(),\n node: connectedNodesMap.keys()\n };\n };\n return GraphNode;\n}();\nvar GraphEdge = /** @class */function () {\n function GraphEdge(n1, n2, dataIndex) {\n this.dataIndex = -1;\n this.node1 = n1;\n this.node2 = n2;\n this.dataIndex = dataIndex == null ? -1 : dataIndex;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n GraphEdge.prototype.getModel = function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n var graph = this.hostGraph;\n var itemModel = graph.edgeData.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n };\n GraphEdge.prototype.getAdjacentDataIndices = function () {\n return {\n edge: [this.dataIndex],\n node: [this.node1.dataIndex, this.node2.dataIndex]\n };\n };\n GraphEdge.prototype.getTrajectoryDataIndices = function () {\n var connectedEdgesMap = zrUtil.createHashMap();\n var connectedNodesMap = zrUtil.createHashMap();\n connectedEdgesMap.set(this.dataIndex, true);\n var sourceNodes = [this.node1];\n var targetNodes = [this.node2];\n var nodeIteratorIndex = 0;\n while (nodeIteratorIndex < sourceNodes.length) {\n var sourceNode = sourceNodes[nodeIteratorIndex];\n nodeIteratorIndex++;\n connectedNodesMap.set(sourceNode.dataIndex, true);\n for (var j = 0; j < sourceNode.inEdges.length; j++) {\n connectedEdgesMap.set(sourceNode.inEdges[j].dataIndex, true);\n sourceNodes.push(sourceNode.inEdges[j].node1);\n }\n }\n nodeIteratorIndex = 0;\n while (nodeIteratorIndex < targetNodes.length) {\n var targetNode = targetNodes[nodeIteratorIndex];\n nodeIteratorIndex++;\n connectedNodesMap.set(targetNode.dataIndex, true);\n for (var j = 0; j < targetNode.outEdges.length; j++) {\n connectedEdgesMap.set(targetNode.outEdges[j].dataIndex, true);\n targetNodes.push(targetNode.outEdges[j].node2);\n }\n }\n return {\n edge: connectedEdgesMap.keys(),\n node: connectedNodesMap.keys()\n };\n };\n return GraphEdge;\n}();\nfunction createGraphDataProxyMixin(hostName, dataName) {\n return {\n /**\n * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.\n */\n getValue: function (dimension) {\n var data = this[hostName][dataName];\n return data.getStore().get(data.getDimensionIndex(dimension || 'value'), this.dataIndex);\n },\n // TODO: TYPE stricter type.\n setVisual: function (key, value) {\n this.dataIndex >= 0 && this[hostName][dataName].setItemVisual(this.dataIndex, key, value);\n },\n getVisual: function (key) {\n return this[hostName][dataName].getItemVisual(this.dataIndex, key);\n },\n setLayout: function (layout, merge) {\n this.dataIndex >= 0 && this[hostName][dataName].setItemLayout(this.dataIndex, layout, merge);\n },\n getLayout: function () {\n return this[hostName][dataName].getItemLayout(this.dataIndex);\n },\n getGraphicEl: function () {\n return this[hostName][dataName].getItemGraphicEl(this.dataIndex);\n },\n getRawIndex: function () {\n return this[hostName][dataName].getRawIndex(this.dataIndex);\n }\n };\n}\n;\n;\n;\nzrUtil.mixin(GraphNode, createGraphDataProxyMixin('hostGraph', 'data'));\nzrUtil.mixin(GraphEdge, createGraphDataProxyMixin('hostGraph', 'edgeData'));\nexport default Graph;\nexport { GraphNode, GraphEdge };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport Graph from '../../data/Graph.js';\nimport linkSeriesData from '../../data/helper/linkSeriesData.js';\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport CoordinateSystem from '../../core/CoordinateSystem.js';\nimport createSeriesData from './createSeriesData.js';\nimport { convertOptionIdName } from '../../util/model.js';\nexport default function createGraphFromNodeEdge(nodes, edges, seriesModel, directed, beforeLink) {\n // ??? TODO\n // support dataset?\n var graph = new Graph(directed);\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(zrUtil.retrieve(\n // Id, name, dataIndex\n nodes[i].id, nodes[i].name, i), i);\n }\n var linkNameList = [];\n var validEdges = [];\n var linkCount = 0;\n for (var i = 0; i < edges.length; i++) {\n var link = edges[i];\n var source = link.source;\n var target = link.target;\n // addEdge may fail when source or target not exists\n if (graph.addEdge(source, target, linkCount)) {\n validEdges.push(link);\n linkNameList.push(zrUtil.retrieve(convertOptionIdName(link.id, null), source + ' > ' + target));\n linkCount++;\n }\n }\n var coordSys = seriesModel.get('coordinateSystem');\n var nodeData;\n if (coordSys === 'cartesian2d' || coordSys === 'polar') {\n nodeData = createSeriesData(nodes, seriesModel);\n } else {\n var coordSysCtor = CoordinateSystem.get(coordSys);\n var coordDimensions = coordSysCtor ? coordSysCtor.dimensions || [] : [];\n // FIXME: Some geo do not need `value` dimenson, whereas `calendar` needs\n // `value` dimension, but graph need `value` dimension. It's better to\n // uniform this behavior.\n if (zrUtil.indexOf(coordDimensions, 'value') < 0) {\n coordDimensions.concat(['value']);\n }\n var dimensions = prepareSeriesDataSchema(nodes, {\n coordDimensions: coordDimensions,\n encodeDefine: seriesModel.getEncode()\n }).dimensions;\n nodeData = new SeriesData(dimensions, seriesModel);\n nodeData.initData(nodes);\n }\n var edgeData = new SeriesData(['value'], seriesModel);\n edgeData.initData(validEdges, linkNameList);\n beforeLink && beforeLink(nodeData, edgeData);\n linkSeriesData({\n mainData: nodeData,\n struct: graph,\n structAttr: 'graph',\n datas: {\n node: nodeData,\n edge: edgeData\n },\n datasAttr: {\n node: 'data',\n edge: 'edgeData'\n }\n });\n // Update dataIndex of nodes and edges because invalid edge may be removed\n graph.update();\n return graph;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesData from '../../data/SeriesData.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { defaultEmphasis } from '../../util/model.js';\nimport Model from '../../model/Model.js';\nimport createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport SeriesModel from '../../model/Series.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nimport { defaultSeriesFormatTooltip } from '../../component/tooltip/seriesFormatTooltip.js';\nimport { initCurvenessList, createEdgeMapForCurveness } from '../helper/multipleGraphEdgeHelper.js';\nvar GraphSeriesModel = /** @class */function (_super) {\n __extends(GraphSeriesModel, _super);\n function GraphSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n GraphSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n var self = this;\n function getCategoriesData() {\n return self._categoriesData;\n }\n // Provide data for legend select\n this.legendVisualProvider = new LegendVisualProvider(getCategoriesData, getCategoriesData);\n this.fillDataTextStyle(option.edges || option.links);\n this._updateCategoriesData();\n };\n GraphSeriesModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n this.fillDataTextStyle(option.edges || option.links);\n this._updateCategoriesData();\n };\n GraphSeriesModel.prototype.mergeDefaultAndTheme = function (option) {\n _super.prototype.mergeDefaultAndTheme.apply(this, arguments);\n defaultEmphasis(option, 'edgeLabel', ['show']);\n };\n GraphSeriesModel.prototype.getInitialData = function (option, ecModel) {\n var edges = option.edges || option.links || [];\n var nodes = option.data || option.nodes || [];\n var self = this;\n if (nodes && edges) {\n // auto curveness\n initCurvenessList(this);\n var graph = createGraphFromNodeEdge(nodes, edges, this, true, beforeLink);\n zrUtil.each(graph.edges, function (edge) {\n createEdgeMapForCurveness(edge.node1, edge.node2, this, edge.dataIndex);\n }, this);\n return graph.data;\n }\n function beforeLink(nodeData, edgeData) {\n // Overwrite nodeData.getItemModel to\n nodeData.wrapMethod('getItemModel', function (model) {\n var categoriesModels = self._categoriesModels;\n var categoryIdx = model.getShallow('category');\n var categoryModel = categoriesModels[categoryIdx];\n if (categoryModel) {\n categoryModel.parentModel = model.parentModel;\n model.parentModel = categoryModel;\n }\n return model;\n });\n // TODO Inherit resolveParentPath by default in Model#getModel?\n var oldGetModel = Model.prototype.getModel;\n function newGetModel(path, parentModel) {\n var model = oldGetModel.call(this, path, parentModel);\n model.resolveParentPath = resolveParentPath;\n return model;\n }\n edgeData.wrapMethod('getItemModel', function (model) {\n model.resolveParentPath = resolveParentPath;\n model.getModel = newGetModel;\n return model;\n });\n function resolveParentPath(pathArr) {\n if (pathArr && (pathArr[0] === 'label' || pathArr[1] === 'label')) {\n var newPathArr = pathArr.slice();\n if (pathArr[0] === 'label') {\n newPathArr[0] = 'edgeLabel';\n } else if (pathArr[1] === 'label') {\n newPathArr[1] = 'edgeLabel';\n }\n return newPathArr;\n }\n return pathArr;\n }\n }\n };\n GraphSeriesModel.prototype.getGraph = function () {\n return this.getData().graph;\n };\n GraphSeriesModel.prototype.getEdgeData = function () {\n return this.getGraph().edgeData;\n };\n GraphSeriesModel.prototype.getCategoriesData = function () {\n return this._categoriesData;\n };\n GraphSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n if (dataType === 'edge') {\n var nodeData = this.getData();\n var params = this.getDataParams(dataIndex, dataType);\n var edge = nodeData.graph.getEdgeByIndex(dataIndex);\n var sourceName = nodeData.getName(edge.node1.dataIndex);\n var targetName = nodeData.getName(edge.node2.dataIndex);\n var nameArr = [];\n sourceName != null && nameArr.push(sourceName);\n targetName != null && nameArr.push(targetName);\n return createTooltipMarkup('nameValue', {\n name: nameArr.join(' > '),\n value: params.value,\n noValue: params.value == null\n });\n }\n // dataType === 'node' or empty\n var nodeMarkup = defaultSeriesFormatTooltip({\n series: this,\n dataIndex: dataIndex,\n multipleSeries: multipleSeries\n });\n return nodeMarkup;\n };\n GraphSeriesModel.prototype._updateCategoriesData = function () {\n var categories = zrUtil.map(this.option.categories || [], function (category) {\n // Data must has value\n return category.value != null ? category : zrUtil.extend({\n value: 0\n }, category);\n });\n var categoriesData = new SeriesData(['value'], this);\n categoriesData.initData(categories);\n this._categoriesData = categoriesData;\n this._categoriesModels = categoriesData.mapArray(function (idx) {\n return categoriesData.getItemModel(idx);\n });\n };\n GraphSeriesModel.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n GraphSeriesModel.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n GraphSeriesModel.prototype.isAnimationEnabled = function () {\n return _super.prototype.isAnimationEnabled.call(this)\n // Not enable animation when do force layout\n && !(this.get('layout') === 'force' && this.get(['force', 'layoutAnimation']));\n };\n GraphSeriesModel.type = 'series.graph';\n GraphSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar'];\n GraphSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n // Default option for all coordinate systems\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // polarIndex: 0,\n // geoIndex: 0,\n legendHoverLink: true,\n layout: null,\n // Configuration of circular layout\n circular: {\n rotateLabel: false\n },\n // Configuration of force directed layout\n force: {\n initLayout: null,\n // Node repulsion. Can be an array to represent range.\n repulsion: [0, 50],\n gravity: 0.1,\n // Initial friction\n friction: 0.6,\n // Edge length. Can be an array to represent range.\n edgeLength: 30,\n layoutAnimation: true\n },\n left: 'center',\n top: 'center',\n // right: null,\n // bottom: null,\n // width: '80%',\n // height: '80%',\n symbol: 'circle',\n symbolSize: 10,\n edgeSymbol: ['none', 'none'],\n edgeSymbolSize: 10,\n edgeLabel: {\n position: 'middle',\n distance: 5\n },\n draggable: false,\n roam: false,\n // Default on center of graph\n center: null,\n zoom: 1,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.6,\n // cursor: null,\n // categories: [],\n // data: []\n // Or\n // nodes: []\n //\n // links: []\n // Or\n // edges: []\n label: {\n show: false,\n formatter: '{b}'\n },\n itemStyle: {},\n lineStyle: {\n color: '#aaa',\n width: 1,\n opacity: 0.5\n },\n emphasis: {\n scale: true,\n label: {\n show: true\n }\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n };\n return GraphSeriesModel;\n}(SeriesModel);\nexport default GraphSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport categoryFilter from './categoryFilter.js';\nimport categoryVisual from './categoryVisual.js';\nimport edgeVisual from './edgeVisual.js';\nimport simpleLayout from './simpleLayout.js';\nimport circularLayout from './circularLayout.js';\nimport forceLayout from './forceLayout.js';\nimport createView from './createView.js';\nimport View from '../../coord/View.js';\nimport GraphView from './GraphView.js';\nimport GraphSeriesModel from './GraphSeries.js';\nimport { updateCenterAndZoom } from '../../action/roamHelper.js';\nimport { noop } from 'zrender/lib/core/util.js';\nvar actionInfo = {\n type: 'graphRoam',\n event: 'graphRoam',\n update: 'none'\n};\nexport function install(registers) {\n registers.registerChartView(GraphView);\n registers.registerSeriesModel(GraphSeriesModel);\n registers.registerProcessor(categoryFilter);\n registers.registerVisual(categoryVisual);\n registers.registerVisual(edgeVisual);\n registers.registerLayout(simpleLayout);\n registers.registerLayout(registers.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout);\n registers.registerLayout(forceLayout);\n registers.registerCoordinateSystem('graphView', {\n dimensions: View.dimensions,\n create: createView\n });\n // Register legacy focus actions\n registers.registerAction({\n type: 'focusNodeAdjacency',\n event: 'focusNodeAdjacency',\n update: 'series:focusNodeAdjacency'\n }, noop);\n registers.registerAction({\n type: 'unfocusNodeAdjacency',\n event: 'unfocusNodeAdjacency',\n update: 'series:unfocusNodeAdjacency'\n }, noop);\n // Register roam action.\n registers.registerAction(actionInfo, function (payload, ecModel, api) {\n ecModel.eachComponent({\n mainType: 'series',\n query: payload\n }, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var res = updateCenterAndZoom(coordSys, payload, undefined, api);\n seriesModel.setCenter && seriesModel.setCenter(res.center);\n seriesModel.setZoom && seriesModel.setZoom(res.zoom);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Path from 'zrender/lib/graphic/Path.js';\nvar PointerShape = /** @class */function () {\n function PointerShape() {\n this.angle = 0;\n this.width = 10;\n this.r = 10;\n this.x = 0;\n this.y = 0;\n }\n return PointerShape;\n}();\nvar PointerPath = /** @class */function (_super) {\n __extends(PointerPath, _super);\n function PointerPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'pointer';\n return _this;\n }\n PointerPath.prototype.getDefaultShape = function () {\n return new PointerShape();\n };\n PointerPath.prototype.buildPath = function (ctx, shape) {\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n var r = shape.r;\n var width = shape.width;\n var angle = shape.angle;\n var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2);\n var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2);\n angle = shape.angle - Math.PI / 2;\n ctx.moveTo(x, y);\n ctx.lineTo(shape.x + mathCos(angle) * width, shape.y + mathSin(angle) * width);\n ctx.lineTo(shape.x + mathCos(shape.angle) * r, shape.y + mathSin(shape.angle) * r);\n ctx.lineTo(shape.x - mathCos(angle) * width, shape.y - mathSin(angle) * width);\n ctx.lineTo(x, y);\n };\n return PointerPath;\n}(Path);\nexport default PointerPath;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport PointerPath from './PointerPath.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { createTextStyle, setLabelValueAnimation, animateLabelValue } from '../../label/labelStyle.js';\nimport ChartView from '../../view/Chart.js';\nimport { parsePercent, round, linearMap } from '../../util/number.js';\nimport Sausage from '../../util/shape/sausage.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { extend, isFunction, isString, isNumber, each } from 'zrender/lib/core/util.js';\nimport { setCommonECData } from '../../util/innerStore.js';\nimport { normalizeArcAngles } from 'zrender/lib/core/PathProxy.js';\nfunction parsePosition(seriesModel, api) {\n var center = seriesModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], api.getWidth());\n var cy = parsePercent(center[1], api.getHeight());\n var r = parsePercent(seriesModel.get('radius'), size / 2);\n return {\n cx: cx,\n cy: cy,\n r: r\n };\n}\nfunction formatLabel(value, labelFormatter) {\n var label = value == null ? '' : value + '';\n if (labelFormatter) {\n if (isString(labelFormatter)) {\n label = labelFormatter.replace('{value}', label);\n } else if (isFunction(labelFormatter)) {\n label = labelFormatter(value);\n }\n }\n return label;\n}\nvar GaugeView = /** @class */function (_super) {\n __extends(GaugeView, _super);\n function GaugeView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GaugeView.type;\n return _this;\n }\n GaugeView.prototype.render = function (seriesModel, ecModel, api) {\n this.group.removeAll();\n var colorList = seriesModel.get(['axisLine', 'lineStyle', 'color']);\n var posInfo = parsePosition(seriesModel, api);\n this._renderMain(seriesModel, ecModel, api, colorList, posInfo);\n this._data = seriesModel.getData();\n };\n GaugeView.prototype.dispose = function () {};\n GaugeView.prototype._renderMain = function (seriesModel, ecModel, api, colorList, posInfo) {\n var group = this.group;\n var clockwise = seriesModel.get('clockwise');\n var startAngle = -seriesModel.get('startAngle') / 180 * Math.PI;\n var endAngle = -seriesModel.get('endAngle') / 180 * Math.PI;\n var axisLineModel = seriesModel.getModel('axisLine');\n var roundCap = axisLineModel.get('roundCap');\n var MainPath = roundCap ? Sausage : graphic.Sector;\n var showAxis = axisLineModel.get('show');\n var lineStyleModel = axisLineModel.getModel('lineStyle');\n var axisLineWidth = lineStyleModel.get('width');\n var angles = [startAngle, endAngle];\n normalizeArcAngles(angles, !clockwise);\n startAngle = angles[0];\n endAngle = angles[1];\n var angleRangeSpan = endAngle - startAngle;\n var prevEndAngle = startAngle;\n var sectors = [];\n for (var i = 0; showAxis && i < colorList.length; i++) {\n // Clamp\n var percent = Math.min(Math.max(colorList[i][0], 0), 1);\n endAngle = startAngle + angleRangeSpan * percent;\n var sector = new MainPath({\n shape: {\n startAngle: prevEndAngle,\n endAngle: endAngle,\n cx: posInfo.cx,\n cy: posInfo.cy,\n clockwise: clockwise,\n r0: posInfo.r - axisLineWidth,\n r: posInfo.r\n },\n silent: true\n });\n sector.setStyle({\n fill: colorList[i][1]\n });\n sector.setStyle(lineStyleModel.getLineStyle(\n // Because we use sector to simulate arc\n // so the properties for stroking are useless\n ['color', 'width']));\n sectors.push(sector);\n prevEndAngle = endAngle;\n }\n sectors.reverse();\n each(sectors, function (sector) {\n return group.add(sector);\n });\n var getColor = function (percent) {\n // Less than 0\n if (percent <= 0) {\n return colorList[0][1];\n }\n var i;\n for (i = 0; i < colorList.length; i++) {\n if (colorList[i][0] >= percent && (i === 0 ? 0 : colorList[i - 1][0]) < percent) {\n return colorList[i][1];\n }\n }\n // More than 1\n return colorList[i - 1][1];\n };\n this._renderTicks(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth);\n this._renderTitleAndDetail(seriesModel, ecModel, api, getColor, posInfo);\n this._renderAnchor(seriesModel, posInfo);\n this._renderPointer(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth);\n };\n GaugeView.prototype._renderTicks = function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth) {\n var group = this.group;\n var cx = posInfo.cx;\n var cy = posInfo.cy;\n var r = posInfo.r;\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var splitLineModel = seriesModel.getModel('splitLine');\n var tickModel = seriesModel.getModel('axisTick');\n var labelModel = seriesModel.getModel('axisLabel');\n var splitNumber = seriesModel.get('splitNumber');\n var subSplitNumber = tickModel.get('splitNumber');\n var splitLineLen = parsePercent(splitLineModel.get('length'), r);\n var tickLen = parsePercent(tickModel.get('length'), r);\n var angle = startAngle;\n var step = (endAngle - startAngle) / splitNumber;\n var subStep = step / subSplitNumber;\n var splitLineStyle = splitLineModel.getModel('lineStyle').getLineStyle();\n var tickLineStyle = tickModel.getModel('lineStyle').getLineStyle();\n var splitLineDistance = splitLineModel.get('distance');\n var unitX;\n var unitY;\n for (var i = 0; i <= splitNumber; i++) {\n unitX = Math.cos(angle);\n unitY = Math.sin(angle);\n // Split line\n if (splitLineModel.get('show')) {\n var distance = splitLineDistance ? splitLineDistance + axisLineWidth : axisLineWidth;\n var splitLine = new graphic.Line({\n shape: {\n x1: unitX * (r - distance) + cx,\n y1: unitY * (r - distance) + cy,\n x2: unitX * (r - splitLineLen - distance) + cx,\n y2: unitY * (r - splitLineLen - distance) + cy\n },\n style: splitLineStyle,\n silent: true\n });\n if (splitLineStyle.stroke === 'auto') {\n splitLine.setStyle({\n stroke: getColor(i / splitNumber)\n });\n }\n group.add(splitLine);\n }\n // Label\n if (labelModel.get('show')) {\n var distance = labelModel.get('distance') + splitLineDistance;\n var label = formatLabel(round(i / splitNumber * (maxVal - minVal) + minVal), labelModel.get('formatter'));\n var autoColor = getColor(i / splitNumber);\n var textStyleX = unitX * (r - splitLineLen - distance) + cx;\n var textStyleY = unitY * (r - splitLineLen - distance) + cy;\n var rotateType = labelModel.get('rotate');\n var rotate = 0;\n if (rotateType === 'radial') {\n rotate = -angle + 2 * Math.PI;\n if (rotate > Math.PI / 2) {\n rotate += Math.PI;\n }\n } else if (rotateType === 'tangential') {\n rotate = -angle - Math.PI / 2;\n } else if (isNumber(rotateType)) {\n rotate = rotateType * Math.PI / 180;\n }\n if (rotate === 0) {\n group.add(new graphic.Text({\n style: createTextStyle(labelModel, {\n text: label,\n x: textStyleX,\n y: textStyleY,\n verticalAlign: unitY < -0.8 ? 'top' : unitY > 0.8 ? 'bottom' : 'middle',\n align: unitX < -0.4 ? 'left' : unitX > 0.4 ? 'right' : 'center'\n }, {\n inheritColor: autoColor\n }),\n silent: true\n }));\n } else {\n group.add(new graphic.Text({\n style: createTextStyle(labelModel, {\n text: label,\n x: textStyleX,\n y: textStyleY,\n verticalAlign: 'middle',\n align: 'center'\n }, {\n inheritColor: autoColor\n }),\n silent: true,\n originX: textStyleX,\n originY: textStyleY,\n rotation: rotate\n }));\n }\n }\n // Axis tick\n if (tickModel.get('show') && i !== splitNumber) {\n var distance = tickModel.get('distance');\n distance = distance ? distance + axisLineWidth : axisLineWidth;\n for (var j = 0; j <= subSplitNumber; j++) {\n unitX = Math.cos(angle);\n unitY = Math.sin(angle);\n var tickLine = new graphic.Line({\n shape: {\n x1: unitX * (r - distance) + cx,\n y1: unitY * (r - distance) + cy,\n x2: unitX * (r - tickLen - distance) + cx,\n y2: unitY * (r - tickLen - distance) + cy\n },\n silent: true,\n style: tickLineStyle\n });\n if (tickLineStyle.stroke === 'auto') {\n tickLine.setStyle({\n stroke: getColor((i + j / subSplitNumber) / splitNumber)\n });\n }\n group.add(tickLine);\n angle += subStep;\n }\n angle -= subStep;\n } else {\n angle += step;\n }\n }\n };\n GaugeView.prototype._renderPointer = function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise, axisLineWidth) {\n var group = this.group;\n var oldData = this._data;\n var oldProgressData = this._progressEls;\n var progressList = [];\n var showPointer = seriesModel.get(['pointer', 'show']);\n var progressModel = seriesModel.getModel('progress');\n var showProgress = progressModel.get('show');\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var valueExtent = [minVal, maxVal];\n var angleExtent = [startAngle, endAngle];\n function createPointer(idx, angle) {\n var itemModel = data.getItemModel(idx);\n var pointerModel = itemModel.getModel('pointer');\n var pointerWidth = parsePercent(pointerModel.get('width'), posInfo.r);\n var pointerLength = parsePercent(pointerModel.get('length'), posInfo.r);\n var pointerStr = seriesModel.get(['pointer', 'icon']);\n var pointerOffset = pointerModel.get('offsetCenter');\n var pointerOffsetX = parsePercent(pointerOffset[0], posInfo.r);\n var pointerOffsetY = parsePercent(pointerOffset[1], posInfo.r);\n var pointerKeepAspect = pointerModel.get('keepAspect');\n var pointer;\n // not exist icon type will be set 'rect'\n if (pointerStr) {\n pointer = createSymbol(pointerStr, pointerOffsetX - pointerWidth / 2, pointerOffsetY - pointerLength, pointerWidth, pointerLength, null, pointerKeepAspect);\n } else {\n pointer = new PointerPath({\n shape: {\n angle: -Math.PI / 2,\n width: pointerWidth,\n r: pointerLength,\n x: pointerOffsetX,\n y: pointerOffsetY\n }\n });\n }\n pointer.rotation = -(angle + Math.PI / 2);\n pointer.x = posInfo.cx;\n pointer.y = posInfo.cy;\n return pointer;\n }\n function createProgress(idx, endAngle) {\n var roundCap = progressModel.get('roundCap');\n var ProgressPath = roundCap ? Sausage : graphic.Sector;\n var isOverlap = progressModel.get('overlap');\n var progressWidth = isOverlap ? progressModel.get('width') : axisLineWidth / data.count();\n var r0 = isOverlap ? posInfo.r - progressWidth : posInfo.r - (idx + 1) * progressWidth;\n var r = isOverlap ? posInfo.r : posInfo.r - idx * progressWidth;\n var progress = new ProgressPath({\n shape: {\n startAngle: startAngle,\n endAngle: endAngle,\n cx: posInfo.cx,\n cy: posInfo.cy,\n clockwise: clockwise,\n r0: r0,\n r: r\n }\n });\n isOverlap && (progress.z2 = maxVal - data.get(valueDim, idx) % maxVal);\n return progress;\n }\n if (showProgress || showPointer) {\n data.diff(oldData).add(function (idx) {\n var val = data.get(valueDim, idx);\n if (showPointer) {\n var pointer = createPointer(idx, startAngle);\n // TODO hide pointer on NaN value?\n graphic.initProps(pointer, {\n rotation: -((isNaN(+val) ? angleExtent[0] : linearMap(val, valueExtent, angleExtent, true)) + Math.PI / 2)\n }, seriesModel);\n group.add(pointer);\n data.setItemGraphicEl(idx, pointer);\n }\n if (showProgress) {\n var progress = createProgress(idx, startAngle);\n var isClip = progressModel.get('clip');\n graphic.initProps(progress, {\n shape: {\n endAngle: linearMap(val, valueExtent, angleExtent, isClip)\n }\n }, seriesModel);\n group.add(progress);\n // Add data index and series index for indexing the data by element\n // Useful in tooltip\n setCommonECData(seriesModel.seriesIndex, data.dataType, idx, progress);\n progressList[idx] = progress;\n }\n }).update(function (newIdx, oldIdx) {\n var val = data.get(valueDim, newIdx);\n if (showPointer) {\n var previousPointer = oldData.getItemGraphicEl(oldIdx);\n var previousRotate = previousPointer ? previousPointer.rotation : startAngle;\n var pointer = createPointer(newIdx, previousRotate);\n pointer.rotation = previousRotate;\n graphic.updateProps(pointer, {\n rotation: -((isNaN(+val) ? angleExtent[0] : linearMap(val, valueExtent, angleExtent, true)) + Math.PI / 2)\n }, seriesModel);\n group.add(pointer);\n data.setItemGraphicEl(newIdx, pointer);\n }\n if (showProgress) {\n var previousProgress = oldProgressData[oldIdx];\n var previousEndAngle = previousProgress ? previousProgress.shape.endAngle : startAngle;\n var progress = createProgress(newIdx, previousEndAngle);\n var isClip = progressModel.get('clip');\n graphic.updateProps(progress, {\n shape: {\n endAngle: linearMap(val, valueExtent, angleExtent, isClip)\n }\n }, seriesModel);\n group.add(progress);\n // Add data index and series index for indexing the data by element\n // Useful in tooltip\n setCommonECData(seriesModel.seriesIndex, data.dataType, newIdx, progress);\n progressList[newIdx] = progress;\n }\n }).execute();\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var emphasisDisabled = emphasisModel.get('disabled');\n if (showPointer) {\n var pointer = data.getItemGraphicEl(idx);\n var symbolStyle = data.getItemVisual(idx, 'style');\n var visualColor = symbolStyle.fill;\n if (pointer instanceof ZRImage) {\n var pathStyle = pointer.style;\n pointer.useStyle(extend({\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolStyle));\n } else {\n pointer.useStyle(symbolStyle);\n pointer.type !== 'pointer' && pointer.setColor(visualColor);\n }\n pointer.setStyle(itemModel.getModel(['pointer', 'itemStyle']).getItemStyle());\n if (pointer.style.fill === 'auto') {\n pointer.setStyle('fill', getColor(linearMap(data.get(valueDim, idx), valueExtent, [0, 1], true)));\n }\n pointer.z2EmphasisLift = 0;\n setStatesStylesFromModel(pointer, itemModel);\n toggleHoverEmphasis(pointer, focus, blurScope, emphasisDisabled);\n }\n if (showProgress) {\n var progress = progressList[idx];\n progress.useStyle(data.getItemVisual(idx, 'style'));\n progress.setStyle(itemModel.getModel(['progress', 'itemStyle']).getItemStyle());\n progress.z2EmphasisLift = 0;\n setStatesStylesFromModel(progress, itemModel);\n toggleHoverEmphasis(progress, focus, blurScope, emphasisDisabled);\n }\n });\n this._progressEls = progressList;\n }\n };\n GaugeView.prototype._renderAnchor = function (seriesModel, posInfo) {\n var anchorModel = seriesModel.getModel('anchor');\n var showAnchor = anchorModel.get('show');\n if (showAnchor) {\n var anchorSize = anchorModel.get('size');\n var anchorType = anchorModel.get('icon');\n var offsetCenter = anchorModel.get('offsetCenter');\n var anchorKeepAspect = anchorModel.get('keepAspect');\n var anchor = createSymbol(anchorType, posInfo.cx - anchorSize / 2 + parsePercent(offsetCenter[0], posInfo.r), posInfo.cy - anchorSize / 2 + parsePercent(offsetCenter[1], posInfo.r), anchorSize, anchorSize, null, anchorKeepAspect);\n anchor.z2 = anchorModel.get('showAbove') ? 1 : 0;\n anchor.setStyle(anchorModel.getModel('itemStyle').getItemStyle());\n this.group.add(anchor);\n }\n };\n GaugeView.prototype._renderTitleAndDetail = function (seriesModel, ecModel, api, getColor, posInfo) {\n var _this = this;\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var contentGroup = new graphic.Group();\n var newTitleEls = [];\n var newDetailEls = [];\n var hasAnimation = seriesModel.isAnimationEnabled();\n var showPointerAbove = seriesModel.get(['pointer', 'showAbove']);\n data.diff(this._data).add(function (idx) {\n newTitleEls[idx] = new graphic.Text({\n silent: true\n });\n newDetailEls[idx] = new graphic.Text({\n silent: true\n });\n }).update(function (idx, oldIdx) {\n newTitleEls[idx] = _this._titleEls[oldIdx];\n newDetailEls[idx] = _this._detailEls[oldIdx];\n }).execute();\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n var value = data.get(valueDim, idx);\n var itemGroup = new graphic.Group();\n var autoColor = getColor(linearMap(value, [minVal, maxVal], [0, 1], true));\n var itemTitleModel = itemModel.getModel('title');\n if (itemTitleModel.get('show')) {\n var titleOffsetCenter = itemTitleModel.get('offsetCenter');\n var titleX = posInfo.cx + parsePercent(titleOffsetCenter[0], posInfo.r);\n var titleY = posInfo.cy + parsePercent(titleOffsetCenter[1], posInfo.r);\n var labelEl = newTitleEls[idx];\n labelEl.attr({\n z2: showPointerAbove ? 0 : 2,\n style: createTextStyle(itemTitleModel, {\n x: titleX,\n y: titleY,\n text: data.getName(idx),\n align: 'center',\n verticalAlign: 'middle'\n }, {\n inheritColor: autoColor\n })\n });\n itemGroup.add(labelEl);\n }\n var itemDetailModel = itemModel.getModel('detail');\n if (itemDetailModel.get('show')) {\n var detailOffsetCenter = itemDetailModel.get('offsetCenter');\n var detailX = posInfo.cx + parsePercent(detailOffsetCenter[0], posInfo.r);\n var detailY = posInfo.cy + parsePercent(detailOffsetCenter[1], posInfo.r);\n var width = parsePercent(itemDetailModel.get('width'), posInfo.r);\n var height = parsePercent(itemDetailModel.get('height'), posInfo.r);\n var detailColor = seriesModel.get(['progress', 'show']) ? data.getItemVisual(idx, 'style').fill : autoColor;\n var labelEl = newDetailEls[idx];\n var formatter_1 = itemDetailModel.get('formatter');\n labelEl.attr({\n z2: showPointerAbove ? 0 : 2,\n style: createTextStyle(itemDetailModel, {\n x: detailX,\n y: detailY,\n text: formatLabel(value, formatter_1),\n width: isNaN(width) ? null : width,\n height: isNaN(height) ? null : height,\n align: 'center',\n verticalAlign: 'middle'\n }, {\n inheritColor: detailColor\n })\n });\n setLabelValueAnimation(labelEl, {\n normal: itemDetailModel\n }, value, function (value) {\n return formatLabel(value, formatter_1);\n });\n hasAnimation && animateLabelValue(labelEl, idx, data, seriesModel, {\n getFormattedLabel: function (labelDataIndex, status, dataType, labelDimIndex, fmt, extendParams) {\n return formatLabel(extendParams ? extendParams.interpolatedValue : value, formatter_1);\n }\n });\n itemGroup.add(labelEl);\n }\n contentGroup.add(itemGroup);\n });\n this.group.add(contentGroup);\n this._titleEls = newTitleEls;\n this._detailEls = newDetailEls;\n };\n GaugeView.type = 'gauge';\n return GaugeView;\n}(ChartView);\nexport default GaugeView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport SeriesModel from '../../model/Series.js';\nvar GaugeSeriesModel = /** @class */function (_super) {\n __extends(GaugeSeriesModel, _super);\n function GaugeSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GaugeSeriesModel.type;\n _this.visualStyleAccessPath = 'itemStyle';\n return _this;\n }\n GaugeSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesDataSimply(this, ['value']);\n };\n GaugeSeriesModel.type = 'series.gauge';\n GaugeSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n colorBy: 'data',\n // 默认全局居中\n center: ['50%', '50%'],\n legendHoverLink: true,\n radius: '75%',\n startAngle: 225,\n endAngle: -45,\n clockwise: true,\n // 最小值\n min: 0,\n // 最大值\n max: 100,\n // 分割段数,默认为10\n splitNumber: 10,\n // 坐标轴线\n axisLine: {\n // 默认显示,属性show控制显示与否\n show: true,\n roundCap: false,\n lineStyle: {\n color: [[1, '#E6EBF8']],\n width: 10\n }\n },\n // 坐标轴线\n progress: {\n // 默认显示,属性show控制显示与否\n show: false,\n overlap: true,\n width: 10,\n roundCap: false,\n clip: true\n },\n // 分隔线\n splitLine: {\n // 默认显示,属性show控制显示与否\n show: true,\n // 属性length控制线长\n length: 10,\n distance: 10,\n // 属性lineStyle(详见lineStyle)控制线条样式\n lineStyle: {\n color: '#63677A',\n width: 3,\n type: 'solid'\n }\n },\n // 坐标轴小标记\n axisTick: {\n // 属性show控制显示与否,默认不显示\n show: true,\n // 每份split细分多少段\n splitNumber: 5,\n // 属性length控制线长\n length: 6,\n distance: 10,\n // 属性lineStyle控制线条样式\n lineStyle: {\n color: '#63677A',\n width: 1,\n type: 'solid'\n }\n },\n axisLabel: {\n show: true,\n distance: 15,\n // formatter: null,\n color: '#464646',\n fontSize: 12,\n rotate: 0\n },\n pointer: {\n icon: null,\n offsetCenter: [0, 0],\n show: true,\n showAbove: true,\n length: '60%',\n width: 6,\n keepAspect: false\n },\n anchor: {\n show: false,\n showAbove: false,\n size: 6,\n icon: 'circle',\n offsetCenter: [0, 0],\n keepAspect: false,\n itemStyle: {\n color: '#fff',\n borderWidth: 0,\n borderColor: '#5470c6'\n }\n },\n title: {\n show: true,\n // x, y,单位px\n offsetCenter: [0, '20%'],\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#464646',\n fontSize: 16,\n valueAnimation: false\n },\n detail: {\n show: true,\n backgroundColor: 'rgba(0,0,0,0)',\n borderWidth: 0,\n borderColor: '#ccc',\n width: 100,\n height: null,\n padding: [5, 10],\n // x, y,单位px\n offsetCenter: [0, '40%'],\n // formatter: null,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#464646',\n fontSize: 30,\n fontWeight: 'bold',\n lineHeight: 30,\n valueAnimation: false\n }\n };\n return GaugeSeriesModel;\n}(SeriesModel);\nexport default GaugeSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport GaugeView from './GaugeView.js';\nimport GaugeSeriesModel from './GaugeSeries.js';\nexport function install(registers) {\n registers.registerChartView(GaugeView);\n registers.registerSeriesModel(GaugeSeriesModel);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport ChartView from '../../view/Chart.js';\nimport { setLabelLineStyle, getLabelLineStatesModels } from '../../label/labelGuideHelper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar opacityAccessPath = ['itemStyle', 'opacity'];\n/**\n * Piece of pie including Sector, Label, LabelLine\n */\nvar FunnelPiece = /** @class */function (_super) {\n __extends(FunnelPiece, _super);\n function FunnelPiece(data, idx) {\n var _this = _super.call(this) || this;\n var polygon = _this;\n var labelLine = new graphic.Polyline();\n var text = new graphic.Text();\n polygon.setTextContent(text);\n _this.setTextGuideLine(labelLine);\n _this.updateData(data, idx, true);\n return _this;\n }\n FunnelPiece.prototype.updateData = function (data, idx, firstCreate) {\n var polygon = this;\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n var opacity = itemModel.get(opacityAccessPath);\n opacity = opacity == null ? 1 : opacity;\n if (!firstCreate) {\n saveOldStyle(polygon);\n }\n // Update common style\n polygon.useStyle(data.getItemVisual(idx, 'style'));\n polygon.style.lineJoin = 'round';\n if (firstCreate) {\n polygon.setShape({\n points: layout.points\n });\n polygon.style.opacity = 0;\n graphic.initProps(polygon, {\n style: {\n opacity: opacity\n }\n }, seriesModel, idx);\n } else {\n graphic.updateProps(polygon, {\n style: {\n opacity: opacity\n },\n shape: {\n points: layout.points\n }\n }, seriesModel, idx);\n }\n setStatesStylesFromModel(polygon, itemModel);\n this._updateLabel(data, idx);\n toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n };\n FunnelPiece.prototype._updateLabel = function (data, idx) {\n var polygon = this;\n var labelLine = this.getTextGuideLine();\n var labelText = polygon.getTextContent();\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var labelLayout = layout.label;\n var style = data.getItemVisual(idx, 'style');\n var visualColor = style.fill;\n setLabelStyle(\n // position will not be used in setLabelStyle\n labelText, getLabelStatesModels(itemModel), {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n defaultOpacity: style.opacity,\n defaultText: data.getName(idx)\n }, {\n normal: {\n align: labelLayout.textAlign,\n verticalAlign: labelLayout.verticalAlign\n }\n });\n polygon.setTextConfig({\n local: true,\n inside: !!labelLayout.inside,\n insideStroke: visualColor,\n // insideFill: 'auto',\n outsideFill: visualColor\n });\n var linePoints = labelLayout.linePoints;\n labelLine.setShape({\n points: linePoints\n });\n polygon.textGuideLineConfig = {\n anchor: linePoints ? new graphic.Point(linePoints[0][0], linePoints[0][1]) : null\n };\n // Make sure update style on labelText after setLabelStyle.\n // Because setLabelStyle will replace a new style on it.\n graphic.updateProps(labelText, {\n style: {\n x: labelLayout.x,\n y: labelLayout.y\n }\n }, seriesModel, idx);\n labelText.attr({\n rotation: labelLayout.rotation,\n originX: labelLayout.x,\n originY: labelLayout.y,\n z2: 10\n });\n setLabelLineStyle(polygon, getLabelLineStatesModels(itemModel), {\n // Default use item visual color\n stroke: visualColor\n });\n };\n return FunnelPiece;\n}(graphic.Polygon);\nvar FunnelView = /** @class */function (_super) {\n __extends(FunnelView, _super);\n function FunnelView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = FunnelView.type;\n _this.ignoreLabelLineUpdate = true;\n return _this;\n }\n FunnelView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n data.diff(oldData).add(function (idx) {\n var funnelPiece = new FunnelPiece(data, idx);\n data.setItemGraphicEl(idx, funnelPiece);\n group.add(funnelPiece);\n }).update(function (newIdx, oldIdx) {\n var piece = oldData.getItemGraphicEl(oldIdx);\n piece.updateData(data, newIdx);\n group.add(piece);\n data.setItemGraphicEl(newIdx, piece);\n }).remove(function (idx) {\n var piece = oldData.getItemGraphicEl(idx);\n graphic.removeElementWithFadeOut(piece, seriesModel, idx);\n }).execute();\n this._data = data;\n };\n FunnelView.prototype.remove = function () {\n this.group.removeAll();\n this._data = null;\n };\n FunnelView.prototype.dispose = function () {};\n FunnelView.type = 'funnel';\n return FunnelView;\n}(ChartView);\nexport default FunnelView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport { defaultEmphasis } from '../../util/model.js';\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport SeriesModel from '../../model/Series.js';\nvar FunnelSeriesModel = /** @class */function (_super) {\n __extends(FunnelSeriesModel, _super);\n function FunnelSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = FunnelSeriesModel.type;\n return _this;\n }\n FunnelSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n // Extend labelLine emphasis\n this._defaultLabelLine(option);\n };\n FunnelSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesDataSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n };\n FunnelSeriesModel.prototype._defaultLabelLine = function (option) {\n // Extend labelLine emphasis\n defaultEmphasis(option, 'labelLine', ['show']);\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine;\n // Not show label line if `label.normal.show = false`\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\n };\n // Overwrite\n FunnelSeriesModel.prototype.getDataParams = function (dataIndex) {\n var data = this.getData();\n var params = _super.prototype.getDataParams.call(this, dataIndex);\n var valueDim = data.mapDimension('value');\n var sum = data.getSum(valueDim);\n // Percent is 0 if sum is 0\n params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2);\n params.$vars.push('percent');\n return params;\n };\n FunnelSeriesModel.type = 'series.funnel';\n FunnelSeriesModel.defaultOption = {\n // zlevel: 0, // 一级层叠\n z: 2,\n legendHoverLink: true,\n colorBy: 'data',\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n // 默认取数据最小最大值\n // min: 0,\n // max: 100,\n minSize: '0%',\n maxSize: '100%',\n sort: 'descending',\n orient: 'vertical',\n gap: 0,\n funnelAlign: 'center',\n label: {\n show: true,\n position: 'outer'\n // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n },\n\n labelLine: {\n show: true,\n length: 20,\n lineStyle: {\n // color: 各异,\n width: 1\n }\n },\n itemStyle: {\n // color: 各异,\n borderColor: '#fff',\n borderWidth: 1\n },\n emphasis: {\n label: {\n show: true\n }\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n };\n return FunnelSeriesModel;\n}(SeriesModel);\nexport default FunnelSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as layout from '../../util/layout.js';\nimport { parsePercent, linearMap } from '../../util/number.js';\nimport { isFunction } from 'zrender/lib/core/util.js';\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\nfunction getSortedIndices(data, sort) {\n var valueDim = data.mapDimension('value');\n var valueArr = data.mapArray(valueDim, function (val) {\n return val;\n });\n var indices = [];\n var isAscending = sort === 'ascending';\n for (var i = 0, len = data.count(); i < len; i++) {\n indices[i] = i;\n }\n // Add custom sortable function & none sortable opetion by \"options.sort\"\n if (isFunction(sort)) {\n indices.sort(sort);\n } else if (sort !== 'none') {\n indices.sort(function (a, b) {\n return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a];\n });\n }\n return indices;\n}\nfunction labelLayout(data) {\n var seriesModel = data.hostModel;\n var orient = seriesModel.get('orient');\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label');\n var labelPosition = labelModel.get('position');\n var labelLineModel = itemModel.getModel('labelLine');\n var layout = data.getItemLayout(idx);\n var points = layout.points;\n var isLabelInside = labelPosition === 'inner' || labelPosition === 'inside' || labelPosition === 'center' || labelPosition === 'insideLeft' || labelPosition === 'insideRight';\n var textAlign;\n var textX;\n var textY;\n var linePoints;\n if (isLabelInside) {\n if (labelPosition === 'insideLeft') {\n textX = (points[0][0] + points[3][0]) / 2 + 5;\n textY = (points[0][1] + points[3][1]) / 2;\n textAlign = 'left';\n } else if (labelPosition === 'insideRight') {\n textX = (points[1][0] + points[2][0]) / 2 - 5;\n textY = (points[1][1] + points[2][1]) / 2;\n textAlign = 'right';\n } else {\n textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4;\n textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4;\n textAlign = 'center';\n }\n linePoints = [[textX, textY], [textX, textY]];\n } else {\n var x1 = void 0;\n var y1 = void 0;\n var x2 = void 0;\n var y2 = void 0;\n var labelLineLen = labelLineModel.get('length');\n if (process.env.NODE_ENV !== 'production') {\n if (orient === 'vertical' && ['top', 'bottom'].indexOf(labelPosition) > -1) {\n labelPosition = 'left';\n console.warn('Position error: Funnel chart on vertical orient dose not support top and bottom.');\n }\n if (orient === 'horizontal' && ['left', 'right'].indexOf(labelPosition) > -1) {\n labelPosition = 'bottom';\n console.warn('Position error: Funnel chart on horizontal orient dose not support left and right.');\n }\n }\n if (labelPosition === 'left') {\n // Left side\n x1 = (points[3][0] + points[0][0]) / 2;\n y1 = (points[3][1] + points[0][1]) / 2;\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n } else if (labelPosition === 'right') {\n // Right side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n } else if (labelPosition === 'top') {\n // Top side\n x1 = (points[3][0] + points[0][0]) / 2;\n y1 = (points[3][1] + points[0][1]) / 2;\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else if (labelPosition === 'bottom') {\n // Bottom side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else if (labelPosition === 'rightTop') {\n // RightTop side\n x1 = orient === 'horizontal' ? points[3][0] : points[1][0];\n y1 = orient === 'horizontal' ? points[3][1] : points[1][1];\n if (orient === 'horizontal') {\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'top';\n }\n } else if (labelPosition === 'rightBottom') {\n // RightBottom side\n x1 = points[2][0];\n y1 = points[2][1];\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'bottom';\n }\n } else if (labelPosition === 'leftTop') {\n // LeftTop side\n x1 = points[0][0];\n y1 = orient === 'horizontal' ? points[0][1] : points[1][1];\n if (orient === 'horizontal') {\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else {\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n }\n } else if (labelPosition === 'leftBottom') {\n // LeftBottom side\n x1 = orient === 'horizontal' ? points[1][0] : points[3][0];\n y1 = orient === 'horizontal' ? points[1][1] : points[2][1];\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n }\n } else {\n // Right side or Bottom side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n }\n }\n if (orient === 'horizontal') {\n x2 = x1;\n textX = x2;\n } else {\n y2 = y1;\n textY = y2;\n }\n linePoints = [[x1, y1], [x2, y2]];\n }\n layout.label = {\n linePoints: linePoints,\n x: textX,\n y: textY,\n verticalAlign: 'middle',\n textAlign: textAlign,\n inside: isLabelInside\n };\n });\n}\nexport default function funnelLayout(ecModel, api) {\n ecModel.eachSeriesByType('funnel', function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var sort = seriesModel.get('sort');\n var viewRect = getViewRect(seriesModel, api);\n var orient = seriesModel.get('orient');\n var viewWidth = viewRect.width;\n var viewHeight = viewRect.height;\n var indices = getSortedIndices(data, sort);\n var x = viewRect.x;\n var y = viewRect.y;\n var sizeExtent = orient === 'horizontal' ? [parsePercent(seriesModel.get('minSize'), viewHeight), parsePercent(seriesModel.get('maxSize'), viewHeight)] : [parsePercent(seriesModel.get('minSize'), viewWidth), parsePercent(seriesModel.get('maxSize'), viewWidth)];\n var dataExtent = data.getDataExtent(valueDim);\n var min = seriesModel.get('min');\n var max = seriesModel.get('max');\n if (min == null) {\n min = Math.min(dataExtent[0], 0);\n }\n if (max == null) {\n max = dataExtent[1];\n }\n var funnelAlign = seriesModel.get('funnelAlign');\n var gap = seriesModel.get('gap');\n var viewSize = orient === 'horizontal' ? viewWidth : viewHeight;\n var itemSize = (viewSize - gap * (data.count() - 1)) / data.count();\n var getLinePoints = function (idx, offset) {\n // End point index is data.count() and we assign it 0\n if (orient === 'horizontal') {\n var val_1 = data.get(valueDim, idx) || 0;\n var itemHeight = linearMap(val_1, [min, max], sizeExtent, true);\n var y0 = void 0;\n switch (funnelAlign) {\n case 'top':\n y0 = y;\n break;\n case 'center':\n y0 = y + (viewHeight - itemHeight) / 2;\n break;\n case 'bottom':\n y0 = y + (viewHeight - itemHeight);\n break;\n }\n return [[offset, y0], [offset, y0 + itemHeight]];\n }\n var val = data.get(valueDim, idx) || 0;\n var itemWidth = linearMap(val, [min, max], sizeExtent, true);\n var x0;\n switch (funnelAlign) {\n case 'left':\n x0 = x;\n break;\n case 'center':\n x0 = x + (viewWidth - itemWidth) / 2;\n break;\n case 'right':\n x0 = x + viewWidth - itemWidth;\n break;\n }\n return [[x0, offset], [x0 + itemWidth, offset]];\n };\n if (sort === 'ascending') {\n // From bottom to top\n itemSize = -itemSize;\n gap = -gap;\n if (orient === 'horizontal') {\n x += viewWidth;\n } else {\n y += viewHeight;\n }\n indices = indices.reverse();\n }\n for (var i = 0; i < indices.length; i++) {\n var idx = indices[i];\n var nextIdx = indices[i + 1];\n var itemModel = data.getItemModel(idx);\n if (orient === 'horizontal') {\n var width = itemModel.get(['itemStyle', 'width']);\n if (width == null) {\n width = itemSize;\n } else {\n width = parsePercent(width, viewWidth);\n if (sort === 'ascending') {\n width = -width;\n }\n }\n var start = getLinePoints(idx, x);\n var end = getLinePoints(nextIdx, x + width);\n x += width + gap;\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n } else {\n var height = itemModel.get(['itemStyle', 'height']);\n if (height == null) {\n height = itemSize;\n } else {\n height = parsePercent(height, viewHeight);\n if (sort === 'ascending') {\n height = -height;\n }\n }\n var start = getLinePoints(idx, y);\n var end = getLinePoints(nextIdx, y + height);\n y += height + gap;\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n }\n }\n labelLayout(data);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport FunnelView from './FunnelView.js';\nimport FunnelSeriesModel from './FunnelSeries.js';\nimport funnelLayout from './funnelLayout.js';\nimport dataFilter from '../../processor/dataFilter.js';\nexport function install(registers) {\n registers.registerChartView(FunnelView);\n registers.registerSeriesModel(FunnelSeriesModel);\n registers.registerLayout(funnelLayout);\n registers.registerProcessor(dataFilter('funnel'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport ChartView from '../../view/Chart.js';\nimport { numericToNumber } from '../../util/number.js';\nimport { eqNaN } from 'zrender/lib/core/util.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar DEFAULT_SMOOTH = 0.3;\nvar ParallelView = /** @class */function (_super) {\n __extends(ParallelView, _super);\n function ParallelView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelView.type;\n _this._dataGroup = new graphic.Group();\n _this._initialized = false;\n return _this;\n }\n ParallelView.prototype.init = function () {\n this.group.add(this._dataGroup);\n };\n /**\n * @override\n */\n ParallelView.prototype.render = function (seriesModel, ecModel, api, payload) {\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n var dataGroup = this._dataGroup;\n var data = seriesModel.getData();\n var oldData = this._data;\n var coordSys = seriesModel.coordinateSystem;\n var dimensions = coordSys.dimensions;\n var seriesScope = makeSeriesScope(seriesModel);\n data.diff(oldData).add(add).update(update).remove(remove).execute();\n function add(newDataIndex) {\n var line = addEl(data, dataGroup, newDataIndex, dimensions, coordSys);\n updateElCommon(line, data, newDataIndex, seriesScope);\n }\n function update(newDataIndex, oldDataIndex) {\n var line = oldData.getItemGraphicEl(oldDataIndex);\n var points = createLinePoints(data, newDataIndex, dimensions, coordSys);\n data.setItemGraphicEl(newDataIndex, line);\n graphic.updateProps(line, {\n shape: {\n points: points\n }\n }, seriesModel, newDataIndex);\n saveOldStyle(line);\n updateElCommon(line, data, newDataIndex, seriesScope);\n }\n function remove(oldDataIndex) {\n var line = oldData.getItemGraphicEl(oldDataIndex);\n dataGroup.remove(line);\n }\n // First create\n if (!this._initialized) {\n this._initialized = true;\n var clipPath = createGridClipShape(coordSys, seriesModel, function () {\n // Callback will be invoked immediately if there is no animation\n setTimeout(function () {\n dataGroup.removeClipPath();\n });\n });\n dataGroup.setClipPath(clipPath);\n }\n this._data = data;\n };\n ParallelView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n this._initialized = true;\n this._data = null;\n this._dataGroup.removeAll();\n };\n ParallelView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var dimensions = coordSys.dimensions;\n var seriesScope = makeSeriesScope(seriesModel);\n var progressiveEls = this._progressiveEls = [];\n for (var dataIndex = taskParams.start; dataIndex < taskParams.end; dataIndex++) {\n var line = addEl(data, this._dataGroup, dataIndex, dimensions, coordSys);\n line.incremental = true;\n updateElCommon(line, data, dataIndex, seriesScope);\n progressiveEls.push(line);\n }\n };\n ParallelView.prototype.remove = function () {\n this._dataGroup && this._dataGroup.removeAll();\n this._data = null;\n };\n ParallelView.type = 'parallel';\n return ParallelView;\n}(ChartView);\nfunction createGridClipShape(coordSys, seriesModel, cb) {\n var parallelModel = coordSys.model;\n var rect = coordSys.getRect();\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n var dim = parallelModel.get('layout') === 'horizontal' ? 'width' : 'height';\n rectEl.setShape(dim, 0);\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width,\n height: rect.height\n }\n }, seriesModel, cb);\n return rectEl;\n}\nfunction createLinePoints(data, dataIndex, dimensions, coordSys) {\n var points = [];\n for (var i = 0; i < dimensions.length; i++) {\n var dimName = dimensions[i];\n var value = data.get(data.mapDimension(dimName), dataIndex);\n if (!isEmptyValue(value, coordSys.getAxis(dimName).type)) {\n points.push(coordSys.dataToPoint(value, dimName));\n }\n }\n return points;\n}\nfunction addEl(data, dataGroup, dataIndex, dimensions, coordSys) {\n var points = createLinePoints(data, dataIndex, dimensions, coordSys);\n var line = new graphic.Polyline({\n shape: {\n points: points\n },\n // silent: true,\n z2: 10\n });\n dataGroup.add(line);\n data.setItemGraphicEl(dataIndex, line);\n return line;\n}\nfunction makeSeriesScope(seriesModel) {\n var smooth = seriesModel.get('smooth', true);\n smooth === true && (smooth = DEFAULT_SMOOTH);\n smooth = numericToNumber(smooth);\n eqNaN(smooth) && (smooth = 0);\n return {\n smooth: smooth\n };\n}\nfunction updateElCommon(el, data, dataIndex, seriesScope) {\n el.useStyle(data.getItemVisual(dataIndex, 'style'));\n el.style.fill = null;\n el.setShape('smooth', seriesScope.smooth);\n var itemModel = data.getItemModel(dataIndex);\n var emphasisModel = itemModel.getModel('emphasis');\n setStatesStylesFromModel(el, itemModel, 'lineStyle');\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n}\n// function simpleDiff(oldData, newData, dimensions) {\n// let oldLen;\n// if (!oldData\n// || !oldData.__plProgressive\n// || (oldLen = oldData.count()) !== newData.count()\n// ) {\n// return true;\n// }\n// let dimLen = dimensions.length;\n// for (let i = 0; i < oldLen; i++) {\n// for (let j = 0; j < dimLen; j++) {\n// if (oldData.get(dimensions[j], i) !== newData.get(dimensions[j], i)) {\n// return true;\n// }\n// }\n// }\n// return false;\n// }\n// FIXME put in common util?\nfunction isEmptyValue(val, axisType) {\n return axisType === 'category' ? val == null : val == null || isNaN(val); // axisType === 'value'\n}\n\nexport default ParallelView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { each, bind } from 'zrender/lib/core/util.js';\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nvar ParallelSeriesModel = /** @class */function (_super) {\n __extends(ParallelSeriesModel, _super);\n function ParallelSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelSeriesModel.type;\n _this.visualStyleAccessPath = 'lineStyle';\n _this.visualDrawType = 'stroke';\n return _this;\n }\n ParallelSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: bind(makeDefaultEncode, null, this)\n });\n };\n /**\n * User can get data raw indices on 'axisAreaSelected' event received.\n *\n * @return Raw indices\n */\n ParallelSeriesModel.prototype.getRawIndicesByActiveState = function (activeState) {\n var coordSys = this.coordinateSystem;\n var data = this.getData();\n var indices = [];\n coordSys.eachActiveState(data, function (theActiveState, dataIndex) {\n if (activeState === theActiveState) {\n indices.push(data.getRawIndex(dataIndex));\n }\n });\n return indices;\n };\n ParallelSeriesModel.type = 'series.parallel';\n ParallelSeriesModel.dependencies = ['parallel'];\n ParallelSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'parallel',\n parallelIndex: 0,\n label: {\n show: false\n },\n inactiveOpacity: 0.05,\n activeOpacity: 1,\n lineStyle: {\n width: 1,\n opacity: 0.45,\n type: 'solid'\n },\n emphasis: {\n label: {\n show: false\n }\n },\n progressive: 500,\n smooth: false,\n animationEasing: 'linear'\n };\n return ParallelSeriesModel;\n}(SeriesModel);\nfunction makeDefaultEncode(seriesModel) {\n // The mapping of parallelAxis dimension to data dimension can\n // be specified in parallelAxis.option.dim. For example, if\n // parallelAxis.option.dim is 'dim3', it mapping to the third\n // dimension of data. But `data.encode` has higher priority.\n // Moreover, parallelModel.dimension should not be regarded as data\n // dimensions. Consider dimensions = ['dim4', 'dim2', 'dim6'];\n var parallelModel = seriesModel.ecModel.getComponent('parallel', seriesModel.get('parallelIndex'));\n if (!parallelModel) {\n return;\n }\n var encodeDefine = {};\n each(parallelModel.dimensions, function (axisDim) {\n var dataDimIndex = convertDimNameToNumber(axisDim);\n encodeDefine[axisDim] = dataDimIndex;\n });\n return encodeDefine;\n}\nfunction convertDimNameToNumber(dimName) {\n return +dimName.replace('dim', '');\n}\nexport default ParallelSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar opacityAccessPath = ['lineStyle', 'opacity'];\nvar parallelVisual = {\n seriesType: 'parallel',\n reset: function (seriesModel, ecModel) {\n var coordSys = seriesModel.coordinateSystem;\n var opacityMap = {\n normal: seriesModel.get(['lineStyle', 'opacity']),\n active: seriesModel.get('activeOpacity'),\n inactive: seriesModel.get('inactiveOpacity')\n };\n return {\n progress: function (params, data) {\n coordSys.eachActiveState(data, function (activeState, dataIndex) {\n var opacity = opacityMap[activeState];\n if (activeState === 'normal' && data.hasItemOption) {\n var itemOpacity = data.getItemModel(dataIndex).get(opacityAccessPath, true);\n itemOpacity != null && (opacity = itemOpacity);\n }\n var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style');\n existsStyle.opacity = opacity;\n }, params.start, params.end);\n }\n };\n }\n};\nexport default parallelVisual;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nexport default function parallelPreprocessor(option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}\n/**\n * Create a parallel coordinate if not exists.\n * @inner\n */\nfunction createParallelIfNeeded(option) {\n if (option.parallel) {\n return;\n }\n var hasParallelSeries = false;\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'parallel') {\n hasParallelSeries = true;\n }\n });\n if (hasParallelSeries) {\n option.parallel = [{}];\n }\n}\n/**\n * Merge aixs definition from parallel option (if exists) to axis option.\n * @inner\n */\nfunction mergeAxisOptionFromParallel(option) {\n var axes = modelUtil.normalizeToArray(option.parallelAxis);\n zrUtil.each(axes, function (axisOption) {\n if (!zrUtil.isObject(axisOption)) {\n return;\n }\n var parallelIndex = axisOption.parallelIndex || 0;\n var parallelOption = modelUtil.normalizeToArray(option.parallel)[parallelIndex];\n if (parallelOption && parallelOption.parallelAxisDefault) {\n zrUtil.merge(axisOption, parallelOption.parallelAxisDefault, false);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport { each, bind, extend } from 'zrender/lib/core/util.js';\nimport { createOrUpdate, clear } from '../../util/throttle.js';\nvar CLICK_THRESHOLD = 5; // > 4\nvar ParallelView = /** @class */function (_super) {\n __extends(ParallelView, _super);\n function ParallelView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelView.type;\n return _this;\n }\n ParallelView.prototype.render = function (parallelModel, ecModel, api) {\n this._model = parallelModel;\n this._api = api;\n if (!this._handlers) {\n this._handlers = {};\n each(handlers, function (handler, eventName) {\n api.getZr().on(eventName, this._handlers[eventName] = bind(handler, this));\n }, this);\n }\n createOrUpdate(this, '_throttledDispatchExpand', parallelModel.get('axisExpandRate'), 'fixRate');\n };\n ParallelView.prototype.dispose = function (ecModel, api) {\n clear(this, '_throttledDispatchExpand');\n each(this._handlers, function (handler, eventName) {\n api.getZr().off(eventName, handler);\n });\n this._handlers = null;\n };\n /**\n * @internal\n * @param {Object} [opt] If null, cancel the last action triggering for debounce.\n */\n ParallelView.prototype._throttledDispatchExpand = function (opt) {\n this._dispatchExpand(opt);\n };\n /**\n * @internal\n */\n ParallelView.prototype._dispatchExpand = function (opt) {\n opt && this._api.dispatchAction(extend({\n type: 'parallelAxisExpand'\n }, opt));\n };\n ParallelView.type = 'parallel';\n return ParallelView;\n}(ComponentView);\nvar handlers = {\n mousedown: function (e) {\n if (checkTrigger(this, 'click')) {\n this._mouseDownPoint = [e.offsetX, e.offsetY];\n }\n },\n mouseup: function (e) {\n var mouseDownPoint = this._mouseDownPoint;\n if (checkTrigger(this, 'click') && mouseDownPoint) {\n var point = [e.offsetX, e.offsetY];\n var dist = Math.pow(mouseDownPoint[0] - point[0], 2) + Math.pow(mouseDownPoint[1] - point[1], 2);\n if (dist > CLICK_THRESHOLD) {\n return;\n }\n var result = this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);\n result.behavior !== 'none' && this._dispatchExpand({\n axisExpandWindow: result.axisExpandWindow\n });\n }\n this._mouseDownPoint = null;\n },\n mousemove: function (e) {\n // Should do nothing when brushing.\n if (this._mouseDownPoint || !checkTrigger(this, 'mousemove')) {\n return;\n }\n var model = this._model;\n var result = model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);\n var behavior = result.behavior;\n behavior === 'jump' && this._throttledDispatchExpand.debounceNextCall(model.get('axisExpandDebounce'));\n this._throttledDispatchExpand(behavior === 'none' ? null // Cancel the last trigger, in case that mouse slide out of the area quickly.\n : {\n axisExpandWindow: result.axisExpandWindow,\n // Jumping uses animation, and sliding suppresses animation.\n animation: behavior === 'jump' ? null : {\n duration: 0 // Disable animation.\n }\n });\n }\n};\n\nfunction checkTrigger(view, triggerOn) {\n var model = view._model;\n return model.get('axisExpandable') && model.get('axisExpandTriggerOn') === triggerOn;\n}\nexport default ParallelView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nvar ParallelModel = /** @class */function (_super) {\n __extends(ParallelModel, _super);\n function ParallelModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelModel.type;\n return _this;\n }\n ParallelModel.prototype.init = function () {\n _super.prototype.init.apply(this, arguments);\n this.mergeOption({});\n };\n ParallelModel.prototype.mergeOption = function (newOption) {\n var thisOption = this.option;\n newOption && zrUtil.merge(thisOption, newOption, true);\n this._initDimensions();\n };\n /**\n * Whether series or axis is in this coordinate system.\n */\n ParallelModel.prototype.contains = function (model, ecModel) {\n var parallelIndex = model.get('parallelIndex');\n return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this;\n };\n ParallelModel.prototype.setAxisExpand = function (opt) {\n zrUtil.each(['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) {\n if (opt.hasOwnProperty(name)) {\n // @ts-ignore FIXME: why \"never\" inferred in this.option[name]?\n this.option[name] = opt[name];\n }\n }, this);\n };\n ParallelModel.prototype._initDimensions = function () {\n var dimensions = this.dimensions = [];\n var parallelAxisIndex = this.parallelAxisIndex = [];\n var axisModels = zrUtil.filter(this.ecModel.queryComponents({\n mainType: 'parallelAxis'\n }), function (axisModel) {\n // Can not use this.contains here, because\n // initialization has not been completed yet.\n return (axisModel.get('parallelIndex') || 0) === this.componentIndex;\n }, this);\n zrUtil.each(axisModels, function (axisModel) {\n dimensions.push('dim' + axisModel.get('dim'));\n parallelAxisIndex.push(axisModel.componentIndex);\n });\n };\n ParallelModel.type = 'parallel';\n ParallelModel.dependencies = ['parallelAxis'];\n ParallelModel.layoutMode = 'box';\n ParallelModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n layout: 'horizontal',\n // FIXME\n // naming?\n axisExpandable: false,\n axisExpandCenter: null,\n axisExpandCount: 0,\n axisExpandWidth: 50,\n axisExpandRate: 17,\n axisExpandDebounce: 50,\n // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.\n // Do not doc to user until necessary.\n axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],\n axisExpandTriggerOn: 'click',\n parallelAxisDefault: null\n };\n return ParallelModel;\n}(ComponentModel);\nexport default ParallelModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar ParallelAxis = /** @class */function (_super) {\n __extends(ParallelAxis, _super);\n function ParallelAxis(dim, scale, coordExtent, axisType, axisIndex) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n _this.axisIndex = axisIndex;\n return _this;\n }\n ParallelAxis.prototype.isHorizontal = function () {\n return this.coordinateSystem.getModel().get('layout') !== 'horizontal';\n };\n return ParallelAxis;\n}(Axis);\nexport default ParallelAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Calculate slider move result.\n * Usage:\n * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as\n * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.\n * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.\n *\n * @param delta Move length.\n * @param handleEnds handleEnds[0] can be bigger then handleEnds[1].\n * handleEnds will be modified in this method.\n * @param extent handleEnds is restricted by extent.\n * extent[0] should less or equals than extent[1].\n * @param handleIndex Can be 'all', means that both move the two handleEnds.\n * @param minSpan The range of dataZoom can not be smaller than that.\n * If not set, handle0 and cross handle1. If set as a non-negative\n * number (including `0`), handles will push each other when reaching\n * the minSpan.\n * @param maxSpan The range of dataZoom can not be larger than that.\n * @return The input handleEnds.\n */\nexport default function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {\n delta = delta || 0;\n var extentSpan = extent[1] - extent[0];\n // Notice maxSpan and minSpan can be null/undefined.\n if (minSpan != null) {\n minSpan = restrict(minSpan, [0, extentSpan]);\n }\n if (maxSpan != null) {\n maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0);\n }\n if (handleIndex === 'all') {\n var handleSpan = Math.abs(handleEnds[1] - handleEnds[0]);\n handleSpan = restrict(handleSpan, [0, extentSpan]);\n minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]);\n handleIndex = 0;\n }\n handleEnds[0] = restrict(handleEnds[0], extent);\n handleEnds[1] = restrict(handleEnds[1], extent);\n var originalDistSign = getSpanSign(handleEnds, handleIndex);\n handleEnds[handleIndex] += delta;\n // Restrict in extent.\n var extentMinSpan = minSpan || 0;\n var realExtent = extent.slice();\n originalDistSign.sign < 0 ? realExtent[0] += extentMinSpan : realExtent[1] -= extentMinSpan;\n handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent);\n // Expand span.\n var currDistSign;\n currDistSign = getSpanSign(handleEnds, handleIndex);\n if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) {\n // If minSpan exists, 'cross' is forbidden.\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan;\n }\n // Shrink span.\n currDistSign = getSpanSign(handleEnds, handleIndex);\n if (maxSpan != null && currDistSign.span > maxSpan) {\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + currDistSign.sign * maxSpan;\n }\n return handleEnds;\n}\nfunction getSpanSign(handleEnds, handleIndex) {\n var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex];\n // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0]\n // is at left of handleEnds[1] for non-cross case.\n return {\n span: Math.abs(dist),\n sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1\n };\n}\nfunction restrict(value, extend) {\n return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Parallel Coordinates\n * \n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport ParallelAxis from './ParallelAxis.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../../component/helper/sliderMove.js';\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathFloor = Math.floor;\nvar mathCeil = Math.ceil;\nvar round = numberUtil.round;\nvar PI = Math.PI;\nvar Parallel = /** @class */function () {\n function Parallel(parallelModel, ecModel, api) {\n this.type = 'parallel';\n /**\n * key: dimension\n */\n this._axesMap = zrUtil.createHashMap();\n /**\n * key: dimension\n * value: {position: [], rotation, }\n */\n this._axesLayout = {};\n this.dimensions = parallelModel.dimensions;\n this._model = parallelModel;\n this._init(parallelModel, ecModel, api);\n }\n Parallel.prototype._init = function (parallelModel, ecModel, api) {\n var dimensions = parallelModel.dimensions;\n var parallelAxisIndex = parallelModel.parallelAxisIndex;\n each(dimensions, function (dim, idx) {\n var axisIndex = parallelAxisIndex[idx];\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n var axis = this._axesMap.set(dim, new ParallelAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisIndex));\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n // Injection\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = axisModel.coordinateSystem = this;\n }, this);\n };\n /**\n * Update axis scale after data processed\n */\n Parallel.prototype.update = function (ecModel, api) {\n this._updateAxesFromSeries(this._model, ecModel);\n };\n Parallel.prototype.containPoint = function (point) {\n var layoutInfo = this._makeLayoutInfo();\n var axisBase = layoutInfo.axisBase;\n var layoutBase = layoutInfo.layoutBase;\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var pAxis = point[1 - pixelDimIndex];\n var pLayout = point[pixelDimIndex];\n return pAxis >= axisBase && pAxis <= axisBase + layoutInfo.axisLength && pLayout >= layoutBase && pLayout <= layoutBase + layoutInfo.layoutLength;\n };\n Parallel.prototype.getModel = function () {\n return this._model;\n };\n /**\n * Update properties from series\n */\n Parallel.prototype._updateAxesFromSeries = function (parallelModel, ecModel) {\n ecModel.eachSeries(function (seriesModel) {\n if (!parallelModel.contains(seriesModel, ecModel)) {\n return;\n }\n var data = seriesModel.getData();\n each(this.dimensions, function (dim) {\n var axis = this._axesMap.get(dim);\n axis.scale.unionExtentFromData(data, data.mapDimension(dim));\n axisHelper.niceScaleExtent(axis.scale, axis.model);\n }, this);\n }, this);\n };\n /**\n * Resize the parallel coordinate system.\n */\n Parallel.prototype.resize = function (parallelModel, api) {\n this._rect = layoutUtil.getLayoutRect(parallelModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._layoutAxes();\n };\n Parallel.prototype.getRect = function () {\n return this._rect;\n };\n Parallel.prototype._makeLayoutInfo = function () {\n var parallelModel = this._model;\n var rect = this._rect;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var layout = parallelModel.get('layout');\n var pixelDimIndex = layout === 'horizontal' ? 0 : 1;\n var layoutLength = rect[wh[pixelDimIndex]];\n var layoutExtent = [0, layoutLength];\n var axisCount = this.dimensions.length;\n var axisExpandWidth = restrict(parallelModel.get('axisExpandWidth'), layoutExtent);\n var axisExpandCount = restrict(parallelModel.get('axisExpandCount') || 0, [0, axisCount]);\n var axisExpandable = parallelModel.get('axisExpandable') && axisCount > 3 && axisCount > axisExpandCount && axisExpandCount > 1 && axisExpandWidth > 0 && layoutLength > 0;\n // `axisExpandWindow` is According to the coordinates of [0, axisExpandLength],\n // for sake of consider the case that axisCollapseWidth is 0 (when screen is narrow),\n // where collapsed axes should be overlapped.\n var axisExpandWindow = parallelModel.get('axisExpandWindow');\n var winSize;\n if (!axisExpandWindow) {\n winSize = restrict(axisExpandWidth * (axisExpandCount - 1), layoutExtent);\n var axisExpandCenter = parallelModel.get('axisExpandCenter') || mathFloor(axisCount / 2);\n axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2];\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n } else {\n winSize = restrict(axisExpandWindow[1] - axisExpandWindow[0], layoutExtent);\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n }\n var axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount);\n // Avoid axisCollapseWidth is too small.\n axisCollapseWidth < 3 && (axisCollapseWidth = 0);\n // Find the first and last indices > ewin[0] and < ewin[1].\n var winInnerIndices = [mathFloor(round(axisExpandWindow[0] / axisExpandWidth, 1)) + 1, mathCeil(round(axisExpandWindow[1] / axisExpandWidth, 1)) - 1];\n // Pos in ec coordinates.\n var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0];\n return {\n layout: layout,\n pixelDimIndex: pixelDimIndex,\n layoutBase: rect[xy[pixelDimIndex]],\n layoutLength: layoutLength,\n axisBase: rect[xy[1 - pixelDimIndex]],\n axisLength: rect[wh[1 - pixelDimIndex]],\n axisExpandable: axisExpandable,\n axisExpandWidth: axisExpandWidth,\n axisCollapseWidth: axisCollapseWidth,\n axisExpandWindow: axisExpandWindow,\n axisCount: axisCount,\n winInnerIndices: winInnerIndices,\n axisExpandWindow0Pos: axisExpandWindow0Pos\n };\n };\n Parallel.prototype._layoutAxes = function () {\n var rect = this._rect;\n var axes = this._axesMap;\n var dimensions = this.dimensions;\n var layoutInfo = this._makeLayoutInfo();\n var layout = layoutInfo.layout;\n axes.each(function (axis) {\n var axisExtent = [0, layoutInfo.axisLength];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(axisExtent[idx], axisExtent[1 - idx]);\n });\n each(dimensions, function (dim, idx) {\n var posInfo = (layoutInfo.axisExpandable ? layoutAxisWithExpand : layoutAxisWithoutExpand)(idx, layoutInfo);\n var positionTable = {\n horizontal: {\n x: posInfo.position,\n y: layoutInfo.axisLength\n },\n vertical: {\n x: 0,\n y: posInfo.position\n }\n };\n var rotationTable = {\n horizontal: PI / 2,\n vertical: 0\n };\n var position = [positionTable[layout].x + rect.x, positionTable[layout].y + rect.y];\n var rotation = rotationTable[layout];\n var transform = matrix.create();\n matrix.rotate(transform, transform, rotation);\n matrix.translate(transform, transform, position);\n // TODO\n // tick layout info\n // TODO\n // update dimensions info based on axis order.\n this._axesLayout[dim] = {\n position: position,\n rotation: rotation,\n transform: transform,\n axisNameAvailableWidth: posInfo.axisNameAvailableWidth,\n axisLabelShow: posInfo.axisLabelShow,\n nameTruncateMaxWidth: posInfo.nameTruncateMaxWidth,\n tickDirection: 1,\n labelDirection: 1\n };\n }, this);\n };\n /**\n * Get axis by dim.\n */\n Parallel.prototype.getAxis = function (dim) {\n return this._axesMap.get(dim);\n };\n /**\n * Convert a dim value of a single item of series data to Point.\n */\n Parallel.prototype.dataToPoint = function (value, dim) {\n return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim);\n };\n /**\n * Travel data for one time, get activeState of each data item.\n * @param start the start dataIndex that travel from.\n * @param end the next dataIndex of the last dataIndex will be travel.\n */\n Parallel.prototype.eachActiveState = function (data, callback, start, end) {\n start == null && (start = 0);\n end == null && (end = data.count());\n var axesMap = this._axesMap;\n var dimensions = this.dimensions;\n var dataDimensions = [];\n var axisModels = [];\n zrUtil.each(dimensions, function (axisDim) {\n dataDimensions.push(data.mapDimension(axisDim));\n axisModels.push(axesMap.get(axisDim).model);\n });\n var hasActiveSet = this.hasAxisBrushed();\n for (var dataIndex = start; dataIndex < end; dataIndex++) {\n var activeState = void 0;\n if (!hasActiveSet) {\n activeState = 'normal';\n } else {\n activeState = 'active';\n var values = data.getValues(dataDimensions, dataIndex);\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n var state = axisModels[j].getActiveState(values[j]);\n if (state === 'inactive') {\n activeState = 'inactive';\n break;\n }\n }\n }\n callback(activeState, dataIndex);\n }\n };\n /**\n * Whether has any activeSet.\n */\n Parallel.prototype.hasAxisBrushed = function () {\n var dimensions = this.dimensions;\n var axesMap = this._axesMap;\n var hasActiveSet = false;\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n if (axesMap.get(dimensions[j]).model.getActiveState() !== 'normal') {\n hasActiveSet = true;\n }\n }\n return hasActiveSet;\n };\n /**\n * Convert coords of each axis to Point.\n * Return point. For example: [10, 20]\n */\n Parallel.prototype.axisCoordToPoint = function (coord, dim) {\n var axisLayout = this._axesLayout[dim];\n return graphic.applyTransform([coord, 0], axisLayout.transform);\n };\n /**\n * Get axis layout.\n */\n Parallel.prototype.getAxisLayout = function (dim) {\n return zrUtil.clone(this._axesLayout[dim]);\n };\n /**\n * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.\n */\n Parallel.prototype.getSlidedAxisExpandWindow = function (point) {\n var layoutInfo = this._makeLayoutInfo();\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var axisExpandWindow = layoutInfo.axisExpandWindow.slice();\n var winSize = axisExpandWindow[1] - axisExpandWindow[0];\n var extent = [0, layoutInfo.axisExpandWidth * (layoutInfo.axisCount - 1)];\n // Out of the area of coordinate system.\n if (!this.containPoint(point)) {\n return {\n behavior: 'none',\n axisExpandWindow: axisExpandWindow\n };\n }\n // Convert the point from global to expand coordinates.\n var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos;\n // For dragging operation convenience, the window should not be\n // slided when mouse is the center area of the window.\n var delta;\n var behavior = 'slide';\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var triggerArea = this._model.get('axisExpandSlideTriggerArea');\n // But consider touch device, jump is necessary.\n var useJump = triggerArea[0] != null;\n if (axisCollapseWidth) {\n if (useJump && axisCollapseWidth && pointCoord < winSize * triggerArea[0]) {\n behavior = 'jump';\n delta = pointCoord - winSize * triggerArea[2];\n } else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) {\n behavior = 'jump';\n delta = pointCoord - winSize * (1 - triggerArea[2]);\n } else {\n (delta = pointCoord - winSize * triggerArea[1]) >= 0 && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0 && (delta = 0);\n }\n delta *= layoutInfo.axisExpandWidth / axisCollapseWidth;\n delta ? sliderMove(delta, axisExpandWindow, extent, 'all')\n // Avoid nonsense triger on mousemove.\n : behavior = 'none';\n }\n // When screen is too narrow, make it visible and slidable, although it is hard to interact.\n else {\n var winSize2 = axisExpandWindow[1] - axisExpandWindow[0];\n var pos = extent[1] * pointCoord / winSize2;\n axisExpandWindow = [mathMax(0, pos - winSize2 / 2)];\n axisExpandWindow[1] = mathMin(extent[1], axisExpandWindow[0] + winSize2);\n axisExpandWindow[0] = axisExpandWindow[1] - winSize2;\n }\n return {\n axisExpandWindow: axisExpandWindow,\n behavior: behavior\n };\n };\n return Parallel;\n}();\nfunction restrict(len, extent) {\n return mathMin(mathMax(len, extent[0]), extent[1]);\n}\nfunction layoutAxisWithoutExpand(axisIndex, layoutInfo) {\n var step = layoutInfo.layoutLength / (layoutInfo.axisCount - 1);\n return {\n position: step * axisIndex,\n axisNameAvailableWidth: step,\n axisLabelShow: true\n };\n}\nfunction layoutAxisWithExpand(axisIndex, layoutInfo) {\n var layoutLength = layoutInfo.layoutLength;\n var axisExpandWidth = layoutInfo.axisExpandWidth;\n var axisCount = layoutInfo.axisCount;\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var winInnerIndices = layoutInfo.winInnerIndices;\n var position;\n var axisNameAvailableWidth = axisCollapseWidth;\n var axisLabelShow = false;\n var nameTruncateMaxWidth;\n if (axisIndex < winInnerIndices[0]) {\n position = axisIndex * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n } else if (axisIndex <= winInnerIndices[1]) {\n position = layoutInfo.axisExpandWindow0Pos + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0];\n axisNameAvailableWidth = axisExpandWidth;\n axisLabelShow = true;\n } else {\n position = layoutLength - (axisCount - 1 - axisIndex) * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n }\n return {\n position: position,\n axisNameAvailableWidth: axisNameAvailableWidth,\n axisLabelShow: axisLabelShow,\n nameTruncateMaxWidth: nameTruncateMaxWidth\n };\n}\nexport default Parallel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Parallel coordinate system creater.\n */\nimport Parallel from './Parallel.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nfunction createParallelCoordSys(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n });\n // Inject the coordinateSystems into seriesModel\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = seriesModel.getReferringComponents('parallel', SINGLE_REFERRING).models[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}\nvar parallelCoordSysCreator = {\n create: createParallelCoordSys\n};\nexport default parallelCoordSysCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper.js';\nimport * as numberUtil from '../../util/number.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nvar ParallelAxisModel = /** @class */function (_super) {\n __extends(ParallelAxisModel, _super);\n function ParallelAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelAxisModel.type;\n /**\n * @readOnly\n */\n _this.activeIntervals = [];\n return _this;\n }\n ParallelAxisModel.prototype.getAreaSelectStyle = function () {\n return makeStyleMapper([['fill', 'color'], ['lineWidth', 'borderWidth'], ['stroke', 'borderColor'], ['width', 'width'], ['opacity', 'opacity']\n // Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n // So do not transfer decal directly.\n ])(this.getModel('areaSelectStyle'));\n };\n /**\n * The code of this feature is put on AxisModel but not ParallelAxis,\n * because axisModel can be alive after echarts updating but instance of\n * ParallelAxis having been disposed. this._activeInterval should be kept\n * when action dispatched (i.e. legend click).\n *\n * @param intervals `interval.length === 0` means set all active.\n */\n ParallelAxisModel.prototype.setActiveIntervals = function (intervals) {\n var activeIntervals = this.activeIntervals = zrUtil.clone(intervals);\n // Normalize\n if (activeIntervals) {\n for (var i = activeIntervals.length - 1; i >= 0; i--) {\n numberUtil.asc(activeIntervals[i]);\n }\n }\n };\n /**\n * @param value When only attempting detect whether 'no activeIntervals set',\n * `value` is not needed to be input.\n */\n ParallelAxisModel.prototype.getActiveState = function (value) {\n var activeIntervals = this.activeIntervals;\n if (!activeIntervals.length) {\n return 'normal';\n }\n if (value == null || isNaN(+value)) {\n return 'inactive';\n }\n // Simple optimization\n if (activeIntervals.length === 1) {\n var interval = activeIntervals[0];\n if (interval[0] <= value && value <= interval[1]) {\n return 'active';\n }\n } else {\n for (var i = 0, len = activeIntervals.length; i < len; i++) {\n if (activeIntervals[i][0] <= value && value <= activeIntervals[i][1]) {\n return 'active';\n }\n }\n }\n return 'inactive';\n };\n return ParallelAxisModel;\n}(ComponentModel);\nzrUtil.mixin(ParallelAxisModel, AxisModelCommonMixin);\nexport default ParallelAxisModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { curry, each, map, bind, merge, clone, defaults, assert } from 'zrender/lib/core/util.js';\nimport Eventful from 'zrender/lib/core/Eventful.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as interactionMutex from './interactionMutex.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nvar BRUSH_PANEL_GLOBAL = true;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathPow = Math.pow;\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\nvar DIRECTION_MAP = {\n w: [0, 0],\n e: [0, 1],\n n: [1, 0],\n s: [1, 1]\n};\nvar CURSOR_MAP = {\n w: 'ew',\n e: 'ew',\n n: 'ns',\n s: 'ns',\n ne: 'nesw',\n sw: 'nesw',\n nw: 'nwse',\n se: 'nwse'\n};\nvar DEFAULT_BRUSH_OPT = {\n brushStyle: {\n lineWidth: 2,\n stroke: 'rgba(210,219,238,0.3)',\n fill: '#D2DBEE'\n },\n transformable: true,\n brushMode: 'single',\n removeOnClick: false\n};\nvar baseUID = 0;\n/**\n * params:\n * areas: Array., coord relates to container group,\n * If no container specified, to global.\n * opt {\n * isEnd: boolean,\n * removeOnClick: boolean\n * }\n */\nvar BrushController = /** @class */function (_super) {\n __extends(BrushController, _super);\n function BrushController(zr) {\n var _this = _super.call(this) || this;\n /**\n * @internal\n */\n _this._track = [];\n /**\n * @internal\n */\n _this._covers = [];\n _this._handlers = {};\n if (process.env.NODE_ENV !== 'production') {\n assert(zr);\n }\n _this._zr = zr;\n _this.group = new graphic.Group();\n _this._uid = 'brushController_' + baseUID++;\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = bind(handler, this);\n }, _this);\n return _this;\n }\n /**\n * If set to `false`, select disabled.\n */\n BrushController.prototype.enableBrush = function (brushOption) {\n if (process.env.NODE_ENV !== 'production') {\n assert(this._mounted);\n }\n this._brushType && this._doDisableBrush();\n brushOption.brushType && this._doEnableBrush(brushOption);\n return this;\n };\n BrushController.prototype._doEnableBrush = function (brushOption) {\n var zr = this._zr;\n // Consider roam, which takes globalPan too.\n if (!this._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, this._uid);\n }\n each(this._handlers, function (handler, eventName) {\n zr.on(eventName, handler);\n });\n this._brushType = brushOption.brushType;\n this._brushOption = merge(clone(DEFAULT_BRUSH_OPT), brushOption, true);\n };\n BrushController.prototype._doDisableBrush = function () {\n var zr = this._zr;\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, this._uid);\n each(this._handlers, function (handler, eventName) {\n zr.off(eventName, handler);\n });\n this._brushType = this._brushOption = null;\n };\n /**\n * @param panelOpts If not pass, it is global brush.\n */\n BrushController.prototype.setPanels = function (panelOpts) {\n if (panelOpts && panelOpts.length) {\n var panels_1 = this._panels = {};\n each(panelOpts, function (panelOpts) {\n panels_1[panelOpts.panelId] = clone(panelOpts);\n });\n } else {\n this._panels = null;\n }\n return this;\n };\n BrushController.prototype.mount = function (opt) {\n opt = opt || {};\n if (process.env.NODE_ENV !== 'production') {\n this._mounted = true; // should be at first.\n }\n\n this._enableGlobalPan = opt.enableGlobalPan;\n var thisGroup = this.group;\n this._zr.add(thisGroup);\n thisGroup.attr({\n x: opt.x || 0,\n y: opt.y || 0,\n rotation: opt.rotation || 0,\n scaleX: opt.scaleX || 1,\n scaleY: opt.scaleY || 1\n });\n this._transform = thisGroup.getLocalTransform();\n return this;\n };\n // eachCover(cb, context): void {\n // each(this._covers, cb, context);\n // }\n /**\n * Update covers.\n * @param coverConfigList\n * If coverConfigList is null/undefined, all covers removed.\n */\n BrushController.prototype.updateCovers = function (coverConfigList) {\n if (process.env.NODE_ENV !== 'production') {\n assert(this._mounted);\n }\n coverConfigList = map(coverConfigList, function (coverConfig) {\n return merge(clone(DEFAULT_BRUSH_OPT), coverConfig, true);\n });\n var tmpIdPrefix = '\\0-brush-index-';\n var oldCovers = this._covers;\n var newCovers = this._covers = [];\n var controller = this;\n var creatingCover = this._creatingCover;\n new DataDiffer(oldCovers, coverConfigList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute();\n return this;\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType;\n }\n function oldGetKey(cover, index) {\n return getKey(cover.__brushOption, index);\n }\n function addOrUpdate(newIndex, oldIndex) {\n var newBrushInternal = coverConfigList[newIndex];\n // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbidden.\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n } else {\n var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushInternal, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushInternal));\n updateCoverAfterCreation(controller, cover);\n }\n }\n function remove(oldIndex) {\n if (oldCovers[oldIndex] !== creatingCover) {\n controller.group.remove(oldCovers[oldIndex]);\n }\n }\n };\n BrushController.prototype.unmount = function () {\n if (process.env.NODE_ENV !== 'production') {\n if (!this._mounted) {\n return;\n }\n }\n this.enableBrush(false);\n // container may 'removeAll' outside.\n clearCovers(this);\n this._zr.remove(this.group);\n if (process.env.NODE_ENV !== 'production') {\n this._mounted = false; // should be at last.\n }\n\n return this;\n };\n BrushController.prototype.dispose = function () {\n this.unmount();\n this.off();\n };\n return BrushController;\n}(Eventful);\nfunction createCover(controller, brushOption) {\n var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption);\n cover.__brushOption = brushOption;\n updateZ(cover, brushOption);\n controller.group.add(cover);\n return cover;\n}\nfunction endCreating(controller, creatingCover) {\n var coverRenderer = getCoverRenderer(creatingCover);\n if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n return creatingCover;\n}\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption);\n}\nfunction updateZ(cover, brushOption) {\n var z = brushOption.z;\n z == null && (z = COVER_Z);\n cover.traverse(function (el) {\n el.z = z;\n el.z2 = z; // Consider in given container.\n });\n}\n\nfunction updateCoverAfterCreation(controller, cover) {\n getCoverRenderer(cover).updateCommon(controller, cover);\n updateCoverShape(controller, cover);\n}\nfunction getCoverRenderer(cover) {\n return coverRenderers[cover.__brushOption.brushType];\n}\n// return target panel or `true` (means global panel)\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n if (!panels) {\n return BRUSH_PANEL_GLOBAL; // Global panel\n }\n\n var panel;\n var transform = controller._transform;\n each(panels, function (pn) {\n pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn);\n });\n return panel;\n}\n// Return a panel or true\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n if (!panels) {\n return BRUSH_PANEL_GLOBAL; // Global panel\n }\n\n var panelId = cover.__brushOption.panelId;\n // User may give cover without coord sys info,\n // which is then treated as global panel.\n return panelId != null ? panels[panelId] : BRUSH_PANEL_GLOBAL;\n}\nfunction clearCovers(controller) {\n var covers = controller._covers;\n var originalLength = covers.length;\n each(covers, function (cover) {\n controller.group.remove(cover);\n }, controller);\n covers.length = 0;\n return !!originalLength;\n}\nfunction trigger(controller, opt) {\n var areas = map(controller._covers, function (cover) {\n var brushOption = cover.__brushOption;\n var range = clone(brushOption.range);\n return {\n brushType: brushOption.brushType,\n panelId: brushOption.panelId,\n range: range\n };\n });\n controller.trigger('brush', {\n areas: areas,\n isEnd: !!opt.isEnd,\n removeOnClick: !!opt.removeOnClick\n });\n}\nfunction shouldShowCover(controller) {\n var track = controller._track;\n if (!track.length) {\n return false;\n }\n var p2 = track[track.length - 1];\n var p1 = track[0];\n var dx = p2[0] - p1[0];\n var dy = p2[1] - p1[1];\n var dist = mathPow(dx * dx + dy * dy, 0.5);\n return dist > UNSELECT_THRESHOLD;\n}\nfunction getTrackEnds(track) {\n var tail = track.length - 1;\n tail < 0 && (tail = 0);\n return [track[0], track[tail]];\n}\n;\nfunction createBaseRectCover(rectRangeConverter, controller, brushOption, edgeNameSequences) {\n var cover = new graphic.Group();\n cover.add(new graphic.Rect({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true,\n draggable: true,\n cursor: 'move',\n drift: curry(driftRect, rectRangeConverter, controller, cover, ['n', 's', 'w', 'e']),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n each(edgeNameSequences, function (nameSequence) {\n cover.add(new graphic.Rect({\n name: nameSequence.join(''),\n style: {\n opacity: 0\n },\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(driftRect, rectRangeConverter, controller, cover, nameSequence),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n });\n return cover;\n}\nfunction updateBaseRect(controller, cover, localRange, brushOption) {\n var lineWidth = brushOption.brushStyle.lineWidth || 0;\n var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH);\n var x = localRange[0][0];\n var y = localRange[1][0];\n var xa = x - lineWidth / 2;\n var ya = y - lineWidth / 2;\n var x2 = localRange[0][1];\n var y2 = localRange[1][1];\n var x2a = x2 - handleSize + lineWidth / 2;\n var y2a = y2 - handleSize + lineWidth / 2;\n var width = x2 - x;\n var height = y2 - y;\n var widtha = width + lineWidth;\n var heighta = height + lineWidth;\n updateRectShape(controller, cover, 'main', x, y, width, height);\n if (brushOption.transformable) {\n updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize);\n updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize);\n updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize);\n updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize);\n }\n}\nfunction updateCommon(controller, cover) {\n var brushOption = cover.__brushOption;\n var transformable = brushOption.transformable;\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n each([['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']], function (nameSequence) {\n var el = cover.childOfName(nameSequence.join(''));\n var globalDir = nameSequence.length === 1 ? getGlobalDirection1(controller, nameSequence[0]) : getGlobalDirection2(controller, nameSequence);\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n });\n}\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]])));\n}\nfunction makeStyle(brushOption) {\n return defaults({\n strokeNoScale: true\n }, brushOption.brushStyle);\n}\nfunction formatRectRange(x, y, x2, y2) {\n var min = [mathMin(x, x2), mathMin(y, y2)];\n var max = [mathMax(x, x2), mathMax(y, y2)];\n return [[min[0], max[0]], [min[1], max[1]] // y range\n ];\n}\n\nfunction getTransform(controller) {\n return graphic.getTransform(controller.group);\n}\nfunction getGlobalDirection1(controller, localDirName) {\n var map = {\n w: 'left',\n e: 'right',\n n: 'top',\n s: 'bottom'\n };\n var inverseMap = {\n left: 'w',\n right: 'e',\n top: 'n',\n bottom: 's'\n };\n var dir = graphic.transformDirection(map[localDirName], getTransform(controller));\n return inverseMap[dir];\n}\nfunction getGlobalDirection2(controller, localDirNameSeq) {\n var globalDir = [getGlobalDirection1(controller, localDirNameSeq[0]), getGlobalDirection1(controller, localDirNameSeq[1])];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n}\nfunction driftRect(rectRangeConverter, controller, cover, dirNameSequence, dx, dy) {\n var brushOption = cover.__brushOption;\n var rectRange = rectRangeConverter.toRectRange(brushOption.range);\n var localDelta = toLocalDelta(controller, dx, dy);\n each(dirNameSequence, function (dirName) {\n var ind = DIRECTION_MAP[dirName];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n brushOption.range = rectRangeConverter.fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]));\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\nfunction driftPolygon(controller, cover, dx, dy) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\nfunction toLocalDelta(controller, dx, dy) {\n var thisGroup = controller.group;\n var localD = thisGroup.transformCoordToLocal(dx, dy);\n var localZero = thisGroup.transformCoordToLocal(0, 0);\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n return panel && panel !== BRUSH_PANEL_GLOBAL ? panel.clipPath(data, controller._transform) : clone(data);\n}\nfunction pointsToRect(points) {\n var xmin = mathMin(points[0][0], points[1][0]);\n var ymin = mathMin(points[0][1], points[1][1]);\n var xmax = mathMax(points[0][0], points[1][0]);\n var ymax = mathMax(points[0][1], points[1][1]);\n return {\n x: xmin,\n y: ymin,\n width: xmax - xmin,\n height: ymax - ymin\n };\n}\nfunction resetCursor(controller, e, localCursorPoint) {\n if (\n // Check active\n !controller._brushType\n // resetCursor should be always called when mouse is in zr area,\n // but not called when mouse is out of zr area to avoid bad influence\n // if `mousemove`, `mouseup` are triggered from `document` event.\n || isOutsideZrArea(controller, e.offsetX, e.offsetY)) {\n return;\n }\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint);\n // Check whether in covers.\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n if (currPanel && (currPanel === BRUSH_PANEL_GLOBAL || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) {\n // Use cursor style set on cover.\n return;\n }\n }\n }\n currPanel && zr.setCursorStyle('crosshair');\n}\nfunction preventDefault(e) {\n var rawE = e.event;\n rawE.preventDefault && rawE.preventDefault();\n}\nfunction mainShapeContain(cover, x, y) {\n return cover.childOfName('main').contain(x, y);\n}\nfunction updateCoverByMouse(controller, e, localCursorPoint, isEnd) {\n var creatingCover = controller._creatingCover;\n var panel = controller._creatingPanel;\n var thisBrushOption = controller._brushOption;\n var eventParams;\n controller._track.push(localCursorPoint.slice());\n if (shouldShowCover(controller) || creatingCover) {\n if (panel && !creatingCover) {\n thisBrushOption.brushMode === 'single' && clearCovers(controller);\n var brushOption = clone(thisBrushOption);\n brushOption.brushType = determineBrushType(brushOption.brushType, panel);\n brushOption.panelId = panel === BRUSH_PANEL_GLOBAL ? null : panel.panelId;\n creatingCover = controller._creatingCover = createCover(controller, brushOption);\n controller._covers.push(creatingCover);\n }\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track));\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n updateCoverShape(controller, creatingCover);\n eventParams = {\n isEnd: isEnd\n };\n }\n } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) {\n // Help user to remove covers easily, only by a tiny drag, in 'single' mode.\n // But a single click do not clear covers, because user may have casual\n // clicks (for example, click on other component and do not expect covers\n // disappear).\n // Only some cover removed, trigger action, but not every click trigger action.\n if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) {\n eventParams = {\n isEnd: isEnd,\n removeOnClick: true\n };\n }\n }\n return eventParams;\n}\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n if (process.env.NODE_ENV !== 'production') {\n assert(panel && panel.defaultBrushType, 'MUST have defaultBrushType when brushType is \"atuo\"');\n }\n return panel.defaultBrushType;\n }\n return brushType;\n}\nvar pointerHandlers = {\n mousedown: function (e) {\n if (this._dragging) {\n // In case some browser do not support globalOut,\n // and release mouse out side the browser.\n handleDragEnd(this, e);\n } else if (!e.target || !e.target.draggable) {\n preventDefault(e);\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n this._creatingCover = null;\n var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint);\n if (panel) {\n this._dragging = true;\n this._track = [localCursorPoint.slice()];\n }\n }\n },\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n resetCursor(this, e, localCursorPoint);\n if (this._dragging) {\n preventDefault(e);\n var eventParams = updateCoverByMouse(this, e, localCursorPoint, false);\n eventParams && trigger(this, eventParams);\n }\n },\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null;\n // trigger event should be at final, after procedure will be nested.\n eventParams && trigger(controller, eventParams);\n }\n}\nfunction isOutsideZrArea(controller, x, y) {\n var zr = controller._zr;\n return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();\n}\n/**\n * key: brushType\n */\nvar coverRenderers = {\n lineX: getLineRenderer(0),\n lineY: getLineRenderer(1),\n rect: {\n createCover: function (controller, brushOption) {\n function returnInput(range) {\n return range;\n }\n return createBaseRectCover({\n toRectRange: returnInput,\n fromRectRange: returnInput\n }, controller, brushOption, [['w'], ['e'], ['n'], ['s'], ['s', 'e'], ['s', 'w'], ['n', 'e'], ['n', 'w']]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]);\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n updateBaseRect(controller, cover, localRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n },\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group();\n // Do not use graphic.Polygon because graphic.Polyline do not close the\n // border of the shape when drawing, which is a better experience for user.\n cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0));\n // Use graphic.Polygon close the shape.\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n cover.childAt(0).setShape({\n points: clipByPanel(controller, cover, localRange)\n });\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n }\n};\nfunction getLineRenderer(xyIndex) {\n return {\n createCover: function (controller, brushOption) {\n return createBaseRectCover({\n toRectRange: function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n },\n fromRectRange: function (rectRange) {\n return rectRange[xyIndex];\n }\n }, controller, brushOption, [[['w'], ['e']], [['n'], ['s']]][xyIndex]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]);\n var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]);\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent;\n // If brushWidth not specified, fit the panel.\n var panel = getPanelByCover(controller, cover);\n if (panel !== BRUSH_PANEL_GLOBAL && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(xyIndex);\n } else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\nexport default BrushController;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { onIrrelevantElement } from './cursorHelper.js';\nimport * as graphicUtil from '../../util/graphic.js';\nexport function makeRectPanelClipPath(rect) {\n rect = normalizeRect(rect);\n return function (localPoints) {\n return graphicUtil.clipPointsByRect(localPoints, rect);\n };\n}\nexport function makeLinearBrushOtherExtent(rect, specifiedXYIndex) {\n rect = normalizeRect(rect);\n return function (xyIndex) {\n var idx = specifiedXYIndex != null ? specifiedXYIndex : xyIndex;\n var brushWidth = idx ? rect.width : rect.height;\n var base = idx ? rect.x : rect.y;\n return [base, base + (brushWidth || 0)];\n };\n}\nexport function makeRectIsTargetByCursor(rect, api, targetModel) {\n var boundingRect = normalizeRect(rect);\n return function (e, localCursorPoint) {\n return boundingRect.contain(localCursorPoint[0], localCursorPoint[1]) && !onIrrelevantElement(e, api, targetModel);\n };\n}\n// Consider width/height is negative.\nfunction normalizeRect(rect) {\n return BoundingRect.create(rect);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport BrushController from '../helper/BrushController.js';\nimport * as brushHelper from '../helper/brushHelper.js';\nimport * as graphic from '../../util/graphic.js';\nimport ComponentView from '../../view/Component.js';\nvar elementList = ['axisLine', 'axisTickLabel', 'axisName'];\nvar ParallelAxisView = /** @class */function (_super) {\n __extends(ParallelAxisView, _super);\n function ParallelAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ParallelAxisView.type;\n return _this;\n }\n ParallelAxisView.prototype.init = function (ecModel, api) {\n _super.prototype.init.apply(this, arguments);\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this));\n };\n ParallelAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n if (fromAxisAreaSelect(axisModel, ecModel, payload)) {\n return;\n }\n this.axisModel = axisModel;\n this.api = api;\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n if (!axisModel.get('show')) {\n return;\n }\n var coordSysModel = getCoordSysModel(axisModel, ecModel);\n var coordSys = coordSysModel.coordinateSystem;\n var areaSelectStyle = axisModel.getAreaSelectStyle();\n var areaWidth = areaSelectStyle.width;\n var dim = axisModel.axis.dim;\n var axisLayout = coordSys.getAxisLayout(dim);\n var builderOpt = zrUtil.extend({\n strokeContainThreshold: areaWidth\n }, axisLayout);\n var axisBuilder = new AxisBuilder(axisModel, builderOpt);\n zrUtil.each(elementList, axisBuilder.add, axisBuilder);\n this._axisGroup.add(axisBuilder.getGroup());\n this._refreshBrushController(builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n };\n // /**\n // * @override\n // */\n // updateVisual(axisModel, ecModel, api, payload) {\n // this._brushController && this._brushController\n // .updateCovers(getCoverInfoList(axisModel));\n // }\n ParallelAxisView.prototype._refreshBrushController = function (builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api) {\n // After filtering, axis may change, select area needs to be update.\n var extent = axisModel.axis.getExtent();\n var extentLen = extent[1] - extent[0];\n var extra = Math.min(30, Math.abs(extentLen) * 0.1); // Arbitrary value.\n // width/height might be negative, which will be\n // normalized in BoundingRect.\n var rect = graphic.BoundingRect.create({\n x: extent[0],\n y: -areaWidth / 2,\n width: extentLen,\n height: areaWidth\n });\n rect.x -= extra;\n rect.width += 2 * extra;\n this._brushController.mount({\n enableGlobalPan: true,\n rotation: builderOpt.rotation,\n x: builderOpt.position[0],\n y: builderOpt.position[1]\n }).setPanels([{\n panelId: 'pl',\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect, 0)\n }]).enableBrush({\n brushType: 'lineX',\n brushStyle: areaSelectStyle,\n removeOnClick: true\n }).updateCovers(getCoverInfoList(axisModel));\n };\n ParallelAxisView.prototype._onBrush = function (eventParam) {\n var coverInfoList = eventParam.areas;\n // Do not cache these object, because the mey be changed.\n var axisModel = this.axisModel;\n var axis = axisModel.axis;\n var intervals = zrUtil.map(coverInfoList, function (coverInfo) {\n return [axis.coordToData(coverInfo.range[0], true), axis.coordToData(coverInfo.range[1], true)];\n });\n // If realtime is true, action is not dispatched on drag end, because\n // the drag end emits the same params with the last drag move event,\n // and may have some delay when using touch pad.\n if (!axisModel.option.realtime === eventParam.isEnd || eventParam.removeOnClick) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'axisAreaSelect',\n parallelAxisId: axisModel.id,\n intervals: intervals\n });\n }\n };\n ParallelAxisView.prototype.dispose = function () {\n this._brushController.dispose();\n };\n ParallelAxisView.type = 'parallelAxis';\n return ParallelAxisView;\n}(ComponentView);\nfunction fromAxisAreaSelect(axisModel, ecModel, payload) {\n return payload && payload.type === 'axisAreaSelect' && ecModel.findComponents({\n mainType: 'parallelAxis',\n query: payload\n })[0] === axisModel;\n}\nfunction getCoverInfoList(axisModel) {\n var axis = axisModel.axis;\n return zrUtil.map(axisModel.activeIntervals, function (interval) {\n return {\n brushType: 'lineX',\n panelId: 'pl',\n range: [axis.dataToCoord(interval[0], true), axis.dataToCoord(interval[1], true)]\n };\n });\n}\nfunction getCoordSysModel(axisModel, ecModel) {\n return ecModel.getComponent('parallel', axisModel.get('parallelIndex'));\n}\nexport default ParallelAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar actionInfo = {\n type: 'axisAreaSelect',\n event: 'axisAreaSelected'\n // update: 'updateVisual'\n};\n\nexport function installParallelActions(registers) {\n registers.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'parallelAxis',\n query: payload\n }, function (parallelAxisModel) {\n parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);\n });\n });\n /**\n * @payload\n */\n registers.registerAction('parallelAxisExpand', function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'parallel',\n query: payload\n }, function (parallelModel) {\n parallelModel.setAxisExpand(payload);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport parallelPreprocessor from '../../coord/parallel/parallelPreprocessor.js';\nimport ParallelView from './ParallelView.js';\nimport ParallelModel from '../../coord/parallel/ParallelModel.js';\nimport parallelCoordSysCreator from '../../coord/parallel/parallelCreator.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport ParallelAxisModel from '../../coord/parallel/AxisModel.js';\nimport ParallelAxisView from '../axis/ParallelAxisView.js';\nimport { installParallelActions } from '../axis/parallelAxisAction.js';\nvar defaultAxisOption = {\n type: 'value',\n areaSelectStyle: {\n width: 20,\n borderWidth: 1,\n borderColor: 'rgba(160,197,232)',\n color: 'rgba(160,197,232)',\n opacity: 0.3\n },\n realtime: true,\n z: 10\n};\nexport function install(registers) {\n registers.registerComponentView(ParallelView);\n registers.registerComponentModel(ParallelModel);\n registers.registerCoordinateSystem('parallel', parallelCoordSysCreator);\n registers.registerPreprocessor(parallelPreprocessor);\n registers.registerComponentModel(ParallelAxisModel);\n registers.registerComponentView(ParallelAxisView);\n axisModelCreator(registers, 'parallel', ParallelAxisModel, defaultAxisOption);\n installParallelActions(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport ParallelView from './ParallelView.js';\nimport ParallelSeriesModel from './ParallelSeries.js';\nimport parallelVisual from './parallelVisual.js';\nimport { install as installParallelComponent } from '../../component/parallel/install.js';\nexport function install(registers) {\n use(installParallelComponent);\n registers.registerChartView(ParallelView);\n registers.registerSeriesModel(ParallelSeriesModel);\n registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, parallelVisual);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis, setStatesStylesFromModel } from '../../util/states.js';\nimport ChartView from '../../view/Chart.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isString, retrieve3 } from 'zrender/lib/core/util.js';\nvar SankeyPathShape = /** @class */function () {\n function SankeyPathShape() {\n this.x1 = 0;\n this.y1 = 0;\n this.x2 = 0;\n this.y2 = 0;\n this.cpx1 = 0;\n this.cpy1 = 0;\n this.cpx2 = 0;\n this.cpy2 = 0;\n this.extent = 0;\n }\n return SankeyPathShape;\n}();\nvar SankeyPath = /** @class */function (_super) {\n __extends(SankeyPath, _super);\n function SankeyPath(opts) {\n return _super.call(this, opts) || this;\n }\n SankeyPath.prototype.getDefaultShape = function () {\n return new SankeyPathShape();\n };\n SankeyPath.prototype.buildPath = function (ctx, shape) {\n var extent = shape.extent;\n ctx.moveTo(shape.x1, shape.y1);\n ctx.bezierCurveTo(shape.cpx1, shape.cpy1, shape.cpx2, shape.cpy2, shape.x2, shape.y2);\n if (shape.orient === 'vertical') {\n ctx.lineTo(shape.x2 + extent, shape.y2);\n ctx.bezierCurveTo(shape.cpx2 + extent, shape.cpy2, shape.cpx1 + extent, shape.cpy1, shape.x1 + extent, shape.y1);\n } else {\n ctx.lineTo(shape.x2, shape.y2 + extent);\n ctx.bezierCurveTo(shape.cpx2, shape.cpy2 + extent, shape.cpx1, shape.cpy1 + extent, shape.x1, shape.y1 + extent);\n }\n ctx.closePath();\n };\n SankeyPath.prototype.highlight = function () {\n enterEmphasis(this);\n };\n SankeyPath.prototype.downplay = function () {\n leaveEmphasis(this);\n };\n return SankeyPath;\n}(graphic.Path);\nvar SankeyView = /** @class */function (_super) {\n __extends(SankeyView, _super);\n function SankeyView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SankeyView.type;\n _this._focusAdjacencyDisabled = false;\n return _this;\n }\n SankeyView.prototype.render = function (seriesModel, ecModel, api) {\n var sankeyView = this;\n var graph = seriesModel.getGraph();\n var group = this.group;\n var layoutInfo = seriesModel.layoutInfo;\n // view width\n var width = layoutInfo.width;\n // view height\n var height = layoutInfo.height;\n var nodeData = seriesModel.getData();\n var edgeData = seriesModel.getData('edge');\n var orient = seriesModel.get('orient');\n this._model = seriesModel;\n group.removeAll();\n group.x = layoutInfo.x;\n group.y = layoutInfo.y;\n // generate a bezire Curve for each edge\n graph.eachEdge(function (edge) {\n var curve = new SankeyPath();\n var ecData = getECData(curve);\n ecData.dataIndex = edge.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataType = 'edge';\n var edgeModel = edge.getModel();\n var lineStyleModel = edgeModel.getModel('lineStyle');\n var curvature = lineStyleModel.get('curveness');\n var n1Layout = edge.node1.getLayout();\n var node1Model = edge.node1.getModel();\n var dragX1 = node1Model.get('localX');\n var dragY1 = node1Model.get('localY');\n var n2Layout = edge.node2.getLayout();\n var node2Model = edge.node2.getModel();\n var dragX2 = node2Model.get('localX');\n var dragY2 = node2Model.get('localY');\n var edgeLayout = edge.getLayout();\n var x1;\n var y1;\n var x2;\n var y2;\n var cpx1;\n var cpy1;\n var cpx2;\n var cpy2;\n curve.shape.extent = Math.max(1, edgeLayout.dy);\n curve.shape.orient = orient;\n if (orient === 'vertical') {\n x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + edgeLayout.sy;\n y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + n1Layout.dy;\n x2 = (dragX2 != null ? dragX2 * width : n2Layout.x) + edgeLayout.ty;\n y2 = dragY2 != null ? dragY2 * height : n2Layout.y;\n cpx1 = x1;\n cpy1 = y1 * (1 - curvature) + y2 * curvature;\n cpx2 = x2;\n cpy2 = y1 * curvature + y2 * (1 - curvature);\n } else {\n x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + n1Layout.dx;\n y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + edgeLayout.sy;\n x2 = dragX2 != null ? dragX2 * width : n2Layout.x;\n y2 = (dragY2 != null ? dragY2 * height : n2Layout.y) + edgeLayout.ty;\n cpx1 = x1 * (1 - curvature) + x2 * curvature;\n cpy1 = y1;\n cpx2 = x1 * curvature + x2 * (1 - curvature);\n cpy2 = y2;\n }\n curve.setShape({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n cpx1: cpx1,\n cpy1: cpy1,\n cpx2: cpx2,\n cpy2: cpy2\n });\n curve.useStyle(lineStyleModel.getItemStyle());\n // Special color, use source node color or target node color\n applyCurveStyle(curve.style, orient, edge);\n var defaultEdgeLabelText = \"\" + edgeModel.get('value');\n var edgeLabelStateModels = getLabelStatesModels(edgeModel, 'edgeLabel');\n setLabelStyle(curve, edgeLabelStateModels, {\n labelFetcher: {\n getFormattedLabel: function (dataIndex, stateName, dataType, labelDimIndex, formatter, extendParams) {\n return seriesModel.getFormattedLabel(dataIndex, stateName, 'edge', labelDimIndex,\n // ensure edgeLabel formatter is provided\n // to prevent the inheritance from `label.formatter` of the series\n retrieve3(formatter, edgeLabelStateModels.normal && edgeLabelStateModels.normal.get('formatter'), defaultEdgeLabelText), extendParams);\n }\n },\n labelDataIndex: edge.dataIndex,\n defaultText: defaultEdgeLabelText\n });\n curve.setTextConfig({\n position: 'inside'\n });\n var emphasisModel = edgeModel.getModel('emphasis');\n setStatesStylesFromModel(curve, edgeModel, 'lineStyle', function (model) {\n var style = model.getItemStyle();\n applyCurveStyle(style, orient, edge);\n return style;\n });\n group.add(curve);\n edgeData.setItemGraphicEl(edge.dataIndex, curve);\n var focus = emphasisModel.get('focus');\n toggleHoverEmphasis(curve, focus === 'adjacency' ? edge.getAdjacentDataIndices() : focus === 'trajectory' ? edge.getTrajectoryDataIndices() : focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n });\n // Generate a rect for each node\n graph.eachNode(function (node) {\n var layout = node.getLayout();\n var itemModel = node.getModel();\n var dragX = itemModel.get('localX');\n var dragY = itemModel.get('localY');\n var emphasisModel = itemModel.getModel('emphasis');\n var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0;\n var rect = new graphic.Rect({\n shape: {\n x: dragX != null ? dragX * width : layout.x,\n y: dragY != null ? dragY * height : layout.y,\n width: layout.dx,\n height: layout.dy,\n r: borderRadius\n },\n style: itemModel.getModel('itemStyle').getItemStyle(),\n z2: 10\n });\n setLabelStyle(rect, getLabelStatesModels(itemModel), {\n labelFetcher: {\n getFormattedLabel: function (dataIndex, stateName) {\n return seriesModel.getFormattedLabel(dataIndex, stateName, 'node');\n }\n },\n labelDataIndex: node.dataIndex,\n defaultText: node.id\n });\n rect.disableLabelAnimation = true;\n rect.setStyle('fill', node.getVisual('color'));\n rect.setStyle('decal', node.getVisual('style').decal);\n setStatesStylesFromModel(rect, itemModel);\n group.add(rect);\n nodeData.setItemGraphicEl(node.dataIndex, rect);\n getECData(rect).dataType = 'node';\n var focus = emphasisModel.get('focus');\n toggleHoverEmphasis(rect, focus === 'adjacency' ? node.getAdjacentDataIndices() : focus === 'trajectory' ? node.getTrajectoryDataIndices() : focus, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n });\n nodeData.eachItemGraphicEl(function (el, dataIndex) {\n var itemModel = nodeData.getItemModel(dataIndex);\n if (itemModel.get('draggable')) {\n el.drift = function (dx, dy) {\n sankeyView._focusAdjacencyDisabled = true;\n this.shape.x += dx;\n this.shape.y += dy;\n this.dirty();\n api.dispatchAction({\n type: 'dragNode',\n seriesId: seriesModel.id,\n dataIndex: nodeData.getRawIndex(dataIndex),\n localX: this.shape.x / width,\n localY: this.shape.y / height\n });\n };\n el.ondragend = function () {\n sankeyView._focusAdjacencyDisabled = false;\n };\n el.draggable = true;\n el.cursor = 'move';\n }\n });\n if (!this._data && seriesModel.isAnimationEnabled()) {\n group.setClipPath(createGridClipShape(group.getBoundingRect(), seriesModel, function () {\n group.removeClipPath();\n }));\n }\n this._data = seriesModel.getData();\n };\n SankeyView.prototype.dispose = function () {};\n SankeyView.type = 'sankey';\n return SankeyView;\n}(ChartView);\n/**\n * Special color, use source node color or target node color\n * @param curveProps curve's style to parse\n * @param orient direction\n * @param edge current curve data\n */\nfunction applyCurveStyle(curveProps, orient, edge) {\n switch (curveProps.fill) {\n case 'source':\n curveProps.fill = edge.node1.getVisual('color');\n curveProps.decal = edge.node1.getVisual('style').decal;\n break;\n case 'target':\n curveProps.fill = edge.node2.getVisual('color');\n curveProps.decal = edge.node2.getVisual('style').decal;\n break;\n case 'gradient':\n var sourceColor = edge.node1.getVisual('color');\n var targetColor = edge.node2.getVisual('color');\n if (isString(sourceColor) && isString(targetColor)) {\n curveProps.fill = new graphic.LinearGradient(0, 0, +(orient === 'horizontal'), +(orient === 'vertical'), [{\n color: sourceColor,\n offset: 0\n }, {\n color: targetColor,\n offset: 1\n }]);\n }\n }\n}\n// Add animation to the view\nfunction createGridClipShape(rect, seriesModel, cb) {\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x - 10,\n y: rect.y - 10,\n width: 0,\n height: rect.height + 20\n }\n });\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width + 20\n }\n }, seriesModel, cb);\n return rectEl;\n}\nexport default SankeyView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge.js';\nimport Model from '../../model/Model.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nvar SankeySeriesModel = /** @class */function (_super) {\n __extends(SankeySeriesModel, _super);\n function SankeySeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SankeySeriesModel.type;\n return _this;\n }\n /**\n * Init a graph data structure from data in option series\n */\n SankeySeriesModel.prototype.getInitialData = function (option, ecModel) {\n var links = option.edges || option.links;\n var nodes = option.data || option.nodes;\n var levels = option.levels;\n this.levelModels = [];\n var levelModels = this.levelModels;\n for (var i = 0; i < levels.length; i++) {\n if (levels[i].depth != null && levels[i].depth >= 0) {\n levelModels[levels[i].depth] = new Model(levels[i], this, ecModel);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('levels[i].depth is mandatory and should be natural number');\n }\n }\n }\n if (nodes && links) {\n var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink);\n return graph.data;\n }\n function beforeLink(nodeData, edgeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var seriesModel = model.parentModel;\n var layout = seriesModel.getData().getItemLayout(idx);\n if (layout) {\n var nodeDepth = layout.depth;\n var levelModel = seriesModel.levelModels[nodeDepth];\n if (levelModel) {\n model.parentModel = levelModel;\n }\n }\n return model;\n });\n edgeData.wrapMethod('getItemModel', function (model, idx) {\n var seriesModel = model.parentModel;\n var edge = seriesModel.getGraph().getEdgeByIndex(idx);\n var layout = edge.node1.getLayout();\n if (layout) {\n var depth = layout.depth;\n var levelModel = seriesModel.levelModels[depth];\n if (levelModel) {\n model.parentModel = levelModel;\n }\n }\n return model;\n });\n }\n };\n SankeySeriesModel.prototype.setNodePosition = function (dataIndex, localPosition) {\n var nodes = this.option.data || this.option.nodes;\n var dataItem = nodes[dataIndex];\n dataItem.localX = localPosition[0];\n dataItem.localY = localPosition[1];\n };\n /**\n * Return the graphic data structure\n *\n * @return graphic data structure\n */\n SankeySeriesModel.prototype.getGraph = function () {\n return this.getData().graph;\n };\n /**\n * Get edge data of graphic data structure\n *\n * @return data structure of list\n */\n SankeySeriesModel.prototype.getEdgeData = function () {\n return this.getGraph().edgeData;\n };\n SankeySeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n function noValue(val) {\n return isNaN(val) || val == null;\n }\n // dataType === 'node' or empty do not show tooltip by default\n if (dataType === 'edge') {\n var params = this.getDataParams(dataIndex, dataType);\n var rawDataOpt = params.data;\n var edgeValue = params.value;\n var edgeName = rawDataOpt.source + ' -- ' + rawDataOpt.target;\n return createTooltipMarkup('nameValue', {\n name: edgeName,\n value: edgeValue,\n noValue: noValue(edgeValue)\n });\n }\n // dataType === 'node'\n else {\n var node = this.getGraph().getNodeByIndex(dataIndex);\n var value = node.getLayout().value;\n var name_1 = this.getDataParams(dataIndex, dataType).data.name;\n return createTooltipMarkup('nameValue', {\n name: name_1 != null ? name_1 + '' : null,\n value: value,\n noValue: noValue(value)\n });\n }\n };\n SankeySeriesModel.prototype.optionUpdated = function () {};\n // Override Series.getDataParams()\n SankeySeriesModel.prototype.getDataParams = function (dataIndex, dataType) {\n var params = _super.prototype.getDataParams.call(this, dataIndex, dataType);\n if (params.value == null && dataType === 'node') {\n var node = this.getGraph().getNodeByIndex(dataIndex);\n var nodeValue = node.getLayout().value;\n params.value = nodeValue;\n }\n return params;\n };\n SankeySeriesModel.type = 'series.sankey';\n SankeySeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n left: '5%',\n top: '5%',\n right: '20%',\n bottom: '5%',\n orient: 'horizontal',\n nodeWidth: 20,\n nodeGap: 8,\n draggable: true,\n layoutIterations: 32,\n label: {\n show: true,\n position: 'right',\n fontSize: 12\n },\n edgeLabel: {\n show: false,\n fontSize: 12\n },\n levels: [],\n nodeAlign: 'justify',\n lineStyle: {\n color: '#314656',\n opacity: 0.2,\n curveness: 0.5\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n opacity: 0.5\n }\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n animationEasing: 'linear',\n animationDuration: 1000\n };\n return SankeySeriesModel;\n}(SeriesModel);\nexport default SankeySeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as layout from '../../util/layout.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { groupData } from '../../util/model.js';\nexport default function sankeyLayout(ecModel, api) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var nodeWidth = seriesModel.get('nodeWidth');\n var nodeGap = seriesModel.get('nodeGap');\n var layoutInfo = getViewRect(seriesModel, api);\n seriesModel.layoutInfo = layoutInfo;\n var width = layoutInfo.width;\n var height = layoutInfo.height;\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n var edges = graph.edges;\n computeNodeValues(nodes);\n var filteredNodes = zrUtil.filter(nodes, function (node) {\n return node.getLayout().value === 0;\n });\n var iterations = filteredNodes.length !== 0 ? 0 : seriesModel.get('layoutIterations');\n var orient = seriesModel.get('orient');\n var nodeAlign = seriesModel.get('nodeAlign');\n layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign);\n });\n}\n/**\n * Get the layout position of the whole view\n */\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\nfunction layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign) {\n computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign);\n computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient);\n computeEdgeDepths(nodes, orient);\n}\n/**\n * Compute the value of each node by summing the associated edge's value\n */\nfunction computeNodeValues(nodes) {\n zrUtil.each(nodes, function (node) {\n var value1 = sum(node.outEdges, getEdgeValue);\n var value2 = sum(node.inEdges, getEdgeValue);\n var nodeRawValue = node.getValue() || 0;\n var value = Math.max(value1, value2, nodeRawValue);\n node.setLayout({\n value: value\n }, true);\n });\n}\n/**\n * Compute the x-position for each node.\n *\n * Here we use Kahn algorithm to detect cycle when we traverse\n * the node to computer the initial x position.\n */\nfunction computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) {\n // Used to mark whether the edge is deleted. if it is deleted,\n // the value is 0, otherwise it is 1.\n var remainEdges = [];\n // Storage each node's indegree.\n var indegreeArr = [];\n // Used to storage the node with indegree is equal to 0.\n var zeroIndegrees = [];\n var nextTargetNode = [];\n var x = 0;\n // let kx = 0;\n for (var i = 0; i < edges.length; i++) {\n remainEdges[i] = 1;\n }\n for (var i = 0; i < nodes.length; i++) {\n indegreeArr[i] = nodes[i].inEdges.length;\n if (indegreeArr[i] === 0) {\n zeroIndegrees.push(nodes[i]);\n }\n }\n var maxNodeDepth = -1;\n // Traversing nodes using topological sorting to calculate the\n // horizontal(if orient === 'horizontal') or vertical(if orient === 'vertical')\n // position of the nodes.\n while (zeroIndegrees.length) {\n for (var idx = 0; idx < zeroIndegrees.length; idx++) {\n var node = zeroIndegrees[idx];\n var item = node.hostGraph.data.getRawDataItem(node.dataIndex);\n var isItemDepth = item.depth != null && item.depth >= 0;\n if (isItemDepth && item.depth > maxNodeDepth) {\n maxNodeDepth = item.depth;\n }\n node.setLayout({\n depth: isItemDepth ? item.depth : x\n }, true);\n orient === 'vertical' ? node.setLayout({\n dy: nodeWidth\n }, true) : node.setLayout({\n dx: nodeWidth\n }, true);\n for (var edgeIdx = 0; edgeIdx < node.outEdges.length; edgeIdx++) {\n var edge = node.outEdges[edgeIdx];\n var indexEdge = edges.indexOf(edge);\n remainEdges[indexEdge] = 0;\n var targetNode = edge.node2;\n var nodeIndex = nodes.indexOf(targetNode);\n if (--indegreeArr[nodeIndex] === 0 && nextTargetNode.indexOf(targetNode) < 0) {\n nextTargetNode.push(targetNode);\n }\n }\n }\n ++x;\n zeroIndegrees = nextTargetNode;\n nextTargetNode = [];\n }\n for (var i = 0; i < remainEdges.length; i++) {\n if (remainEdges[i] === 1) {\n throw new Error('Sankey is a DAG, the original data has cycle!');\n }\n }\n var maxDepth = maxNodeDepth > x - 1 ? maxNodeDepth : x - 1;\n if (nodeAlign && nodeAlign !== 'left') {\n adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth);\n }\n var kx = orient === 'vertical' ? (height - nodeWidth) / maxDepth : (width - nodeWidth) / maxDepth;\n scaleNodeBreadths(nodes, kx, orient);\n}\nfunction isNodeDepth(node) {\n var item = node.hostGraph.data.getRawDataItem(node.dataIndex);\n return item.depth != null && item.depth >= 0;\n}\nfunction adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth) {\n if (nodeAlign === 'right') {\n var nextSourceNode = [];\n var remainNodes = nodes;\n var nodeHeight = 0;\n while (remainNodes.length) {\n for (var i = 0; i < remainNodes.length; i++) {\n var node = remainNodes[i];\n node.setLayout({\n skNodeHeight: nodeHeight\n }, true);\n for (var j = 0; j < node.inEdges.length; j++) {\n var edge = node.inEdges[j];\n if (nextSourceNode.indexOf(edge.node1) < 0) {\n nextSourceNode.push(edge.node1);\n }\n }\n }\n remainNodes = nextSourceNode;\n nextSourceNode = [];\n ++nodeHeight;\n }\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node)) {\n node.setLayout({\n depth: Math.max(0, maxDepth - node.getLayout().skNodeHeight)\n }, true);\n }\n });\n } else if (nodeAlign === 'justify') {\n moveSinksRight(nodes, maxDepth);\n }\n}\n/**\n * All the node without outEgdes are assigned maximum x-position and\n * be aligned in the last column.\n *\n * @param nodes. node of sankey view.\n * @param maxDepth. use to assign to node without outEdges as x-position.\n */\nfunction moveSinksRight(nodes, maxDepth) {\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node) && !node.outEdges.length) {\n node.setLayout({\n depth: maxDepth\n }, true);\n }\n });\n}\n/**\n * Scale node x-position to the width\n *\n * @param nodes node of sankey view\n * @param kx multiple used to scale nodes\n */\nfunction scaleNodeBreadths(nodes, kx, orient) {\n zrUtil.each(nodes, function (node) {\n var nodeDepth = node.getLayout().depth * kx;\n orient === 'vertical' ? node.setLayout({\n y: nodeDepth\n }, true) : node.setLayout({\n x: nodeDepth\n }, true);\n });\n}\n/**\n * Using Gauss-Seidel iterations method to compute the node depth(y-position)\n *\n * @param nodes node of sankey view\n * @param edges edge of sankey view\n * @param height the whole height of the area to draw the view\n * @param nodeGap the vertical distance between two nodes\n * in the same column.\n * @param iterations the number of iterations for the algorithm\n */\nfunction computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient) {\n var nodesByBreadth = prepareNodesByBreadth(nodes, orient);\n initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n for (var alpha = 1; iterations > 0; iterations--) {\n // 0.99 is a experience parameter, ensure that each iterations of\n // changes as small as possible.\n alpha *= 0.99;\n relaxRightToLeft(nodesByBreadth, alpha, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n relaxLeftToRight(nodesByBreadth, alpha, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n }\n}\nfunction prepareNodesByBreadth(nodes, orient) {\n var nodesByBreadth = [];\n var keyAttr = orient === 'vertical' ? 'y' : 'x';\n var groupResult = groupData(nodes, function (node) {\n return node.getLayout()[keyAttr];\n });\n groupResult.keys.sort(function (a, b) {\n return a - b;\n });\n zrUtil.each(groupResult.keys, function (key) {\n nodesByBreadth.push(groupResult.buckets.get(key));\n });\n return nodesByBreadth;\n}\n/**\n * Compute the original y-position for each node\n */\nfunction initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient) {\n var minKy = Infinity;\n zrUtil.each(nodesByBreadth, function (nodes) {\n var n = nodes.length;\n var sum = 0;\n zrUtil.each(nodes, function (node) {\n sum += node.getLayout().value;\n });\n var ky = orient === 'vertical' ? (width - (n - 1) * nodeGap) / sum : (height - (n - 1) * nodeGap) / sum;\n if (ky < minKy) {\n minKy = ky;\n }\n });\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node, i) {\n var nodeDy = node.getLayout().value * minKy;\n if (orient === 'vertical') {\n node.setLayout({\n x: i\n }, true);\n node.setLayout({\n dx: nodeDy\n }, true);\n } else {\n node.setLayout({\n y: i\n }, true);\n node.setLayout({\n dy: nodeDy\n }, true);\n }\n });\n });\n zrUtil.each(edges, function (edge) {\n var edgeDy = +edge.getValue() * minKy;\n edge.setLayout({\n dy: edgeDy\n }, true);\n });\n}\n/**\n * Resolve the collision of initialized depth (y-position)\n */\nfunction resolveCollisions(nodesByBreadth, nodeGap, height, width, orient) {\n var keyAttr = orient === 'vertical' ? 'x' : 'y';\n zrUtil.each(nodesByBreadth, function (nodes) {\n nodes.sort(function (a, b) {\n return a.getLayout()[keyAttr] - b.getLayout()[keyAttr];\n });\n var nodeX;\n var node;\n var dy;\n var y0 = 0;\n var n = nodes.length;\n var nodeDyAttr = orient === 'vertical' ? 'dx' : 'dy';\n for (var i = 0; i < n; i++) {\n node = nodes[i];\n dy = y0 - node.getLayout()[keyAttr];\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] + dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n }\n y0 = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap;\n }\n var viewWidth = orient === 'vertical' ? width : height;\n // If the bottommost node goes outside the bounds, push it back up\n dy = y0 - nodeGap - viewWidth;\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n y0 = nodeX;\n for (var i = n - 2; i >= 0; --i) {\n node = nodes[i];\n dy = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap - y0;\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n }\n y0 = node.getLayout()[keyAttr];\n }\n }\n });\n}\n/**\n * Change the y-position of the nodes, except most the right side nodes\n * @param nodesByBreadth\n * @param alpha parameter used to adjust the nodes y-position\n */\nfunction relaxRightToLeft(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth.slice().reverse(), function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.outEdges.length) {\n var y = sum(node.outEdges, weightedTarget, orient) / sum(node.outEdges, getEdgeValue);\n if (isNaN(y)) {\n var len = node.outEdges.length;\n y = len ? sum(node.outEdges, centerTarget, orient) / len : 0;\n }\n if (orient === 'vertical') {\n var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;\n node.setLayout({\n x: nodeX\n }, true);\n } else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({\n y: nodeY\n }, true);\n }\n }\n });\n });\n}\nfunction weightedTarget(edge, orient) {\n return center(edge.node2, orient) * edge.getValue();\n}\nfunction centerTarget(edge, orient) {\n return center(edge.node2, orient);\n}\nfunction weightedSource(edge, orient) {\n return center(edge.node1, orient) * edge.getValue();\n}\nfunction centerSource(edge, orient) {\n return center(edge.node1, orient);\n}\nfunction center(node, orient) {\n return orient === 'vertical' ? node.getLayout().x + node.getLayout().dx / 2 : node.getLayout().y + node.getLayout().dy / 2;\n}\nfunction getEdgeValue(edge) {\n return edge.getValue();\n}\nfunction sum(array, cb, orient) {\n var sum = 0;\n var len = array.length;\n var i = -1;\n while (++i < len) {\n var value = +cb(array[i], orient);\n if (!isNaN(value)) {\n sum += value;\n }\n }\n return sum;\n}\n/**\n * Change the y-position of the nodes, except most the left side nodes\n */\nfunction relaxLeftToRight(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.inEdges.length) {\n var y = sum(node.inEdges, weightedSource, orient) / sum(node.inEdges, getEdgeValue);\n if (isNaN(y)) {\n var len = node.inEdges.length;\n y = len ? sum(node.inEdges, centerSource, orient) / len : 0;\n }\n if (orient === 'vertical') {\n var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;\n node.setLayout({\n x: nodeX\n }, true);\n } else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({\n y: nodeY\n }, true);\n }\n }\n });\n });\n}\n/**\n * Compute the depth(y-position) of each edge\n */\nfunction computeEdgeDepths(nodes, orient) {\n var keyAttr = orient === 'vertical' ? 'x' : 'y';\n zrUtil.each(nodes, function (node) {\n node.outEdges.sort(function (a, b) {\n return a.node2.getLayout()[keyAttr] - b.node2.getLayout()[keyAttr];\n });\n node.inEdges.sort(function (a, b) {\n return a.node1.getLayout()[keyAttr] - b.node1.getLayout()[keyAttr];\n });\n });\n zrUtil.each(nodes, function (node) {\n var sy = 0;\n var ty = 0;\n zrUtil.each(node.outEdges, function (edge) {\n edge.setLayout({\n sy: sy\n }, true);\n sy += edge.getLayout().dy;\n });\n zrUtil.each(node.inEdges, function (edge) {\n edge.setLayout({\n ty: ty\n }, true);\n ty += edge.getLayout().dy;\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nexport default function sankeyVisual(ecModel) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n var edges = graph.edges;\n if (nodes.length) {\n var minValue_1 = Infinity;\n var maxValue_1 = -Infinity;\n zrUtil.each(nodes, function (node) {\n var nodeValue = node.getLayout().value;\n if (nodeValue < minValue_1) {\n minValue_1 = nodeValue;\n }\n if (nodeValue > maxValue_1) {\n maxValue_1 = nodeValue;\n }\n });\n zrUtil.each(nodes, function (node) {\n var mapping = new VisualMapping({\n type: 'color',\n mappingMethod: 'linear',\n dataExtent: [minValue_1, maxValue_1],\n visual: seriesModel.get('color')\n });\n var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value);\n var customColor = node.getModel().get(['itemStyle', 'color']);\n if (customColor != null) {\n node.setVisual('color', customColor);\n node.setVisual('style', {\n fill: customColor\n });\n } else {\n node.setVisual('color', mapValueToColor);\n node.setVisual('style', {\n fill: mapValueToColor\n });\n }\n });\n }\n if (edges.length) {\n zrUtil.each(edges, function (edge) {\n var edgeStyle = edge.getModel().get('lineStyle');\n edge.setVisual('style', edgeStyle);\n });\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SankeyView from './SankeyView.js';\nimport SankeySeriesModel from './SankeySeries.js';\nimport sankeyLayout from './sankeyLayout.js';\nimport sankeyVisual from './sankeyVisual.js';\nexport function install(registers) {\n registers.registerChartView(SankeyView);\n registers.registerSeriesModel(SankeySeriesModel);\n registers.registerLayout(sankeyLayout);\n registers.registerVisual(sankeyVisual);\n registers.registerAction({\n type: 'dragNode',\n event: 'dragnode',\n // here can only use 'update' now, other value is not support in echarts.\n update: 'update'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sankey',\n query: payload\n }, function (seriesModel) {\n seriesModel.setNodePosition(payload.dataIndex, [payload.localX, payload.localY]);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport createSeriesDataSimply from './createSeriesDataSimply.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getDimensionTypeByAxis } from '../../data/helper/dimensionHelper.js';\nimport { makeSeriesEncodeForAxisCoordSys } from '../../data/helper/sourceHelper.js';\nvar WhiskerBoxCommonMixin = /** @class */function () {\n function WhiskerBoxCommonMixin() {}\n /**\n * @override\n */\n WhiskerBoxCommonMixin.prototype.getInitialData = function (option, ecModel) {\n // When both types of xAxis and yAxis are 'value', layout is\n // needed to be specified by user. Otherwise, layout can be\n // judged by which axis is category.\n var ordinalMeta;\n var xAxisModel = ecModel.getComponent('xAxis', this.get('xAxisIndex'));\n var yAxisModel = ecModel.getComponent('yAxis', this.get('yAxisIndex'));\n var xAxisType = xAxisModel.get('type');\n var yAxisType = yAxisModel.get('type');\n var addOrdinal;\n // FIXME\n // Consider time axis.\n if (xAxisType === 'category') {\n option.layout = 'horizontal';\n ordinalMeta = xAxisModel.getOrdinalMeta();\n addOrdinal = true;\n } else if (yAxisType === 'category') {\n option.layout = 'vertical';\n ordinalMeta = yAxisModel.getOrdinalMeta();\n addOrdinal = true;\n } else {\n option.layout = option.layout || 'horizontal';\n }\n var coordDims = ['x', 'y'];\n var baseAxisDimIndex = option.layout === 'horizontal' ? 0 : 1;\n var baseAxisDim = this._baseAxisDim = coordDims[baseAxisDimIndex];\n var otherAxisDim = coordDims[1 - baseAxisDimIndex];\n var axisModels = [xAxisModel, yAxisModel];\n var baseAxisType = axisModels[baseAxisDimIndex].get('type');\n var otherAxisType = axisModels[1 - baseAxisDimIndex].get('type');\n var data = option.data;\n // Clone a new data for next setOption({}) usage.\n // Avoid modifying current data will affect further update.\n if (data && addOrdinal) {\n var newOptionData_1 = [];\n zrUtil.each(data, function (item, index) {\n var newItem;\n if (zrUtil.isArray(item)) {\n newItem = item.slice();\n // Modify current using data.\n item.unshift(index);\n } else if (zrUtil.isArray(item.value)) {\n newItem = zrUtil.extend({}, item);\n newItem.value = newItem.value.slice();\n // Modify current using data.\n item.value.unshift(index);\n } else {\n newItem = item;\n }\n newOptionData_1.push(newItem);\n });\n option.data = newOptionData_1;\n }\n var defaultValueDimensions = this.defaultValueDimensions;\n var coordDimensions = [{\n name: baseAxisDim,\n type: getDimensionTypeByAxis(baseAxisType),\n ordinalMeta: ordinalMeta,\n otherDims: {\n tooltip: false,\n itemName: 0\n },\n dimsDef: ['base']\n }, {\n name: otherAxisDim,\n type: getDimensionTypeByAxis(otherAxisType),\n dimsDef: defaultValueDimensions.slice()\n }];\n return createSeriesDataSimply(this, {\n coordDimensions: coordDimensions,\n dimensionsCount: defaultValueDimensions.length + 1,\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForAxisCoordSys, coordDimensions, this)\n });\n };\n /**\n * If horizontal, base axis is x, otherwise y.\n * @override\n */\n WhiskerBoxCommonMixin.prototype.getBaseAxis = function () {\n var dim = this._baseAxisDim;\n return this.ecModel.getComponent(dim + 'Axis', this.get(dim + 'AxisIndex')).axis;\n };\n return WhiskerBoxCommonMixin;\n}();\n;\nexport { WhiskerBoxCommonMixin };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport { WhiskerBoxCommonMixin } from '../helper/whiskerBoxCommon.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nvar BoxplotSeriesModel = /** @class */function (_super) {\n __extends(BoxplotSeriesModel, _super);\n function BoxplotSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BoxplotSeriesModel.type;\n // TODO\n // box width represents group size, so dimension should have 'size'.\n /**\n * @see \n * The meanings of 'min' and 'max' depend on user,\n * and echarts do not need to know it.\n * @readOnly\n */\n _this.defaultValueDimensions = [{\n name: 'min',\n defaultTooltip: true\n }, {\n name: 'Q1',\n defaultTooltip: true\n }, {\n name: 'median',\n defaultTooltip: true\n }, {\n name: 'Q3',\n defaultTooltip: true\n }, {\n name: 'max',\n defaultTooltip: true\n }];\n _this.visualDrawType = 'stroke';\n return _this;\n }\n BoxplotSeriesModel.type = 'series.boxplot';\n BoxplotSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid'];\n BoxplotSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n layout: null,\n boxWidth: [7, 50],\n itemStyle: {\n color: '#fff',\n borderWidth: 1\n },\n emphasis: {\n scale: true,\n itemStyle: {\n borderWidth: 2,\n shadowBlur: 5,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.2)'\n }\n },\n animationDuration: 800\n };\n return BoxplotSeriesModel;\n}(SeriesModel);\nmixin(BoxplotSeriesModel, WhiskerBoxCommonMixin, true);\nexport default BoxplotSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ChartView from '../../view/Chart.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar BoxplotView = /** @class */function (_super) {\n __extends(BoxplotView, _super);\n function BoxplotView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BoxplotView.type;\n return _this;\n }\n BoxplotView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var group = this.group;\n var oldData = this._data;\n // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!this._data) {\n group.removeAll();\n }\n var constDim = seriesModel.get('layout') === 'horizontal' ? 1 : 0;\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var itemLayout = data.getItemLayout(newIdx);\n var symbolEl = createNormalBox(itemLayout, data, newIdx, constDim, true);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n // Empty data\n if (!data.hasValue(newIdx)) {\n group.remove(symbolEl);\n return;\n }\n var itemLayout = data.getItemLayout(newIdx);\n if (!symbolEl) {\n symbolEl = createNormalBox(itemLayout, data, newIdx, constDim);\n } else {\n saveOldStyle(symbolEl);\n updateNormalBoxData(itemLayout, symbolEl, data, newIdx);\n }\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n };\n BoxplotView.prototype.remove = function (ecModel) {\n var group = this.group;\n var data = this._data;\n this._data = null;\n data && data.eachItemGraphicEl(function (el) {\n el && group.remove(el);\n });\n };\n BoxplotView.type = 'boxplot';\n return BoxplotView;\n}(ChartView);\nvar BoxPathShape = /** @class */function () {\n function BoxPathShape() {}\n return BoxPathShape;\n}();\nvar BoxPath = /** @class */function (_super) {\n __extends(BoxPath, _super);\n function BoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'boxplotBoxPath';\n return _this;\n }\n BoxPath.prototype.getDefaultShape = function () {\n return new BoxPathShape();\n };\n BoxPath.prototype.buildPath = function (ctx, shape) {\n var ends = shape.points;\n var i = 0;\n ctx.moveTo(ends[i][0], ends[i][1]);\n i++;\n for (; i < 4; i++) {\n ctx.lineTo(ends[i][0], ends[i][1]);\n }\n ctx.closePath();\n for (; i < ends.length; i++) {\n ctx.moveTo(ends[i][0], ends[i][1]);\n i++;\n ctx.lineTo(ends[i][0], ends[i][1]);\n }\n };\n return BoxPath;\n}(Path);\nfunction createNormalBox(itemLayout, data, dataIndex, constDim, isInit) {\n var ends = itemLayout.ends;\n var el = new BoxPath({\n shape: {\n points: isInit ? transInit(ends, constDim, itemLayout) : ends\n }\n });\n updateNormalBoxData(itemLayout, el, data, dataIndex, isInit);\n return el;\n}\nfunction updateNormalBoxData(itemLayout, el, data, dataIndex, isInit) {\n var seriesModel = data.hostModel;\n var updateMethod = graphic[isInit ? 'initProps' : 'updateProps'];\n updateMethod(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, dataIndex);\n el.useStyle(data.getItemVisual(dataIndex, 'style'));\n el.style.strokeNoScale = true;\n el.z2 = 100;\n var itemModel = data.getItemModel(dataIndex);\n var emphasisModel = itemModel.getModel('emphasis');\n setStatesStylesFromModel(el, itemModel);\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n}\nfunction transInit(points, dim, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[dim] = itemLayout.initBaseline;\n return point;\n });\n}\nexport default BoxplotView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parsePercent } from '../../util/number.js';\nvar each = zrUtil.each;\nexport default function boxplotLayout(ecModel) {\n var groupResult = groupSeriesByAxis(ecModel);\n each(groupResult, function (groupItem) {\n var seriesModels = groupItem.seriesModels;\n if (!seriesModels.length) {\n return;\n }\n calculateBase(groupItem);\n each(seriesModels, function (seriesModel, idx) {\n layoutSingleSeries(seriesModel, groupItem.boxOffsetList[idx], groupItem.boxWidthList[idx]);\n });\n });\n}\n/**\n * Group series by axis.\n */\nfunction groupSeriesByAxis(ecModel) {\n var result = [];\n var axisList = [];\n ecModel.eachSeriesByType('boxplot', function (seriesModel) {\n var baseAxis = seriesModel.getBaseAxis();\n var idx = zrUtil.indexOf(axisList, baseAxis);\n if (idx < 0) {\n idx = axisList.length;\n axisList[idx] = baseAxis;\n result[idx] = {\n axis: baseAxis,\n seriesModels: []\n };\n }\n result[idx].seriesModels.push(seriesModel);\n });\n return result;\n}\n/**\n * Calculate offset and box width for each series.\n */\nfunction calculateBase(groupItem) {\n var baseAxis = groupItem.axis;\n var seriesModels = groupItem.seriesModels;\n var seriesCount = seriesModels.length;\n var boxWidthList = groupItem.boxWidthList = [];\n var boxOffsetList = groupItem.boxOffsetList = [];\n var boundList = [];\n var bandWidth;\n if (baseAxis.type === 'category') {\n bandWidth = baseAxis.getBandWidth();\n } else {\n var maxDataCount_1 = 0;\n each(seriesModels, function (seriesModel) {\n maxDataCount_1 = Math.max(maxDataCount_1, seriesModel.getData().count());\n });\n var extent = baseAxis.getExtent();\n bandWidth = Math.abs(extent[1] - extent[0]) / maxDataCount_1;\n }\n each(seriesModels, function (seriesModel) {\n var boxWidthBound = seriesModel.get('boxWidth');\n if (!zrUtil.isArray(boxWidthBound)) {\n boxWidthBound = [boxWidthBound, boxWidthBound];\n }\n boundList.push([parsePercent(boxWidthBound[0], bandWidth) || 0, parsePercent(boxWidthBound[1], bandWidth) || 0]);\n });\n var availableWidth = bandWidth * 0.8 - 2;\n var boxGap = availableWidth / seriesCount * 0.3;\n var boxWidth = (availableWidth - boxGap * (seriesCount - 1)) / seriesCount;\n var base = boxWidth / 2 - availableWidth / 2;\n each(seriesModels, function (seriesModel, idx) {\n boxOffsetList.push(base);\n base += boxGap + boxWidth;\n boxWidthList.push(Math.min(Math.max(boxWidth, boundList[idx][0]), boundList[idx][1]));\n });\n}\n/**\n * Calculate points location for each series.\n */\nfunction layoutSingleSeries(seriesModel, offset, boxWidth) {\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n var halfWidth = boxWidth / 2;\n var cDimIdx = seriesModel.get('layout') === 'horizontal' ? 0 : 1;\n var vDimIdx = 1 - cDimIdx;\n var coordDims = ['x', 'y'];\n var cDim = data.mapDimension(coordDims[cDimIdx]);\n var vDims = data.mapDimensionsAll(coordDims[vDimIdx]);\n if (cDim == null || vDims.length < 5) {\n return;\n }\n for (var dataIndex = 0; dataIndex < data.count(); dataIndex++) {\n var axisDimVal = data.get(cDim, dataIndex);\n var median = getPoint(axisDimVal, vDims[2], dataIndex);\n var end1 = getPoint(axisDimVal, vDims[0], dataIndex);\n var end2 = getPoint(axisDimVal, vDims[1], dataIndex);\n var end4 = getPoint(axisDimVal, vDims[3], dataIndex);\n var end5 = getPoint(axisDimVal, vDims[4], dataIndex);\n var ends = [];\n addBodyEnd(ends, end2, false);\n addBodyEnd(ends, end4, true);\n ends.push(end1, end2, end5, end4);\n layEndLine(ends, end1);\n layEndLine(ends, end5);\n layEndLine(ends, median);\n data.setItemLayout(dataIndex, {\n initBaseline: median[vDimIdx],\n ends: ends\n });\n }\n function getPoint(axisDimVal, dim, dataIndex) {\n var val = data.get(dim, dataIndex);\n var p = [];\n p[cDimIdx] = axisDimVal;\n p[vDimIdx] = val;\n var point;\n if (isNaN(axisDimVal) || isNaN(val)) {\n point = [NaN, NaN];\n } else {\n point = coordSys.dataToPoint(p);\n point[cDimIdx] += offset;\n }\n return point;\n }\n function addBodyEnd(ends, point, start) {\n var point1 = point.slice();\n var point2 = point.slice();\n point1[cDimIdx] += halfWidth;\n point2[cDimIdx] -= halfWidth;\n start ? ends.push(point1, point2) : ends.push(point2, point1);\n }\n function layEndLine(ends, endCenter) {\n var from = endCenter.slice();\n var to = endCenter.slice();\n from[cDimIdx] -= halfWidth;\n to[cDimIdx] += halfWidth;\n ends.push(from, to);\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { quantile, asc } from '../../util/number.js';\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\n/**\n * See:\n * \n * \n *\n * Helper method for preparing data.\n *\n * @param rawData like\n * [\n * [12,232,443], (raw data set for the first box)\n * [3843,5545,1232], (raw data set for the second box)\n * ...\n * ]\n * @param opt.boundIQR=1.5 Data less than min bound is outlier.\n * default 1.5, means Q1 - 1.5 * (Q3 - Q1).\n * If 'none'/0 passed, min bound will not be used.\n */\nexport default function prepareBoxplotData(rawData, opt) {\n opt = opt || {};\n var boxData = [];\n var outliers = [];\n var boundIQR = opt.boundIQR;\n var useExtreme = boundIQR === 'none' || boundIQR === 0;\n for (var i = 0; i < rawData.length; i++) {\n var ascList = asc(rawData[i].slice());\n var Q1 = quantile(ascList, 0.25);\n var Q2 = quantile(ascList, 0.5);\n var Q3 = quantile(ascList, 0.75);\n var min = ascList[0];\n var max = ascList[ascList.length - 1];\n var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);\n var low = useExtreme ? min : Math.max(min, Q1 - bound);\n var high = useExtreme ? max : Math.min(max, Q3 + bound);\n var itemNameFormatter = opt.itemNameFormatter;\n var itemName = isFunction(itemNameFormatter) ? itemNameFormatter({\n value: i\n }) : isString(itemNameFormatter) ? itemNameFormatter.replace('{value}', i + '') : i + '';\n boxData.push([itemName, low, Q1, Q2, Q3, high]);\n for (var j = 0; j < ascList.length; j++) {\n var dataItem = ascList[j];\n if (dataItem < low || dataItem > high) {\n var outlier = [itemName, dataItem];\n outliers.push(outlier);\n }\n }\n }\n return {\n boxData: boxData,\n outliers: outliers\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport prepareBoxplotData from './prepareBoxplotData.js';\nimport { throwError, makePrintable } from '../../util/log.js';\nimport { SOURCE_FORMAT_ARRAY_ROWS } from '../../util/types.js';\nexport var boxplotTransform = {\n type: 'echarts:boxplot',\n transform: function transform(params) {\n var upstream = params.upstream;\n if (upstream.sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('source data is not applicable for this boxplot transform. Expect number[][].');\n }\n throwError(errMsg);\n }\n var result = prepareBoxplotData(upstream.getRawData(), params.config);\n return [{\n dimensions: ['ItemName', 'Low', 'Q1', 'Q2', 'Q3', 'High'],\n data: result.boxData\n }, {\n data: result.outliers\n }];\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport BoxplotSeriesModel from './BoxplotSeries.js';\nimport BoxplotView from './BoxplotView.js';\nimport boxplotLayout from './boxplotLayout.js';\nimport { boxplotTransform } from './boxplotTransform.js';\nexport function install(registers) {\n registers.registerSeriesModel(BoxplotSeriesModel);\n registers.registerChartView(BoxplotView);\n registers.registerLayout(boxplotLayout);\n registers.registerTransform(boxplotTransform);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ChartView from '../../view/Chart.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel } from '../../util/states.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar SKIP_PROPS = ['color', 'borderColor'];\nvar CandlestickView = /** @class */function (_super) {\n __extends(CandlestickView, _super);\n function CandlestickView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CandlestickView.type;\n return _this;\n }\n CandlestickView.prototype.render = function (seriesModel, ecModel, api) {\n // If there is clipPath created in large mode. Remove it.\n this.group.removeClipPath();\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n this._updateDrawMode(seriesModel);\n this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel);\n };\n CandlestickView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n this._clear();\n this._updateDrawMode(seriesModel);\n };\n CandlestickView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) {\n this._progressiveEls = [];\n this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel);\n };\n CandlestickView.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n CandlestickView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n this._clear();\n }\n };\n CandlestickView.prototype._renderNormal = function (seriesModel) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var isSimpleBox = data.getLayout('isSimpleBox');\n var needsClip = seriesModel.get('clip', true);\n var coord = seriesModel.coordinateSystem;\n var clipArea = coord.getArea && coord.getArea();\n // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!this._data) {\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var itemLayout = data.getItemLayout(newIdx);\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n return;\n }\n var el = createNormalBox(itemLayout, newIdx, true);\n graphic.initProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }\n }).update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n // Empty data\n if (!data.hasValue(newIdx)) {\n group.remove(el);\n return;\n }\n var itemLayout = data.getItemLayout(newIdx);\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n group.remove(el);\n return;\n }\n if (!el) {\n el = createNormalBox(itemLayout, newIdx);\n } else {\n graphic.updateProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n saveOldStyle(el);\n }\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n };\n CandlestickView.prototype._renderLarge = function (seriesModel) {\n this._clear();\n createLarge(seriesModel, this.group);\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n };\n CandlestickView.prototype._incrementalRenderNormal = function (params, seriesModel) {\n var data = seriesModel.getData();\n var isSimpleBox = data.getLayout('isSimpleBox');\n var dataIndex;\n while ((dataIndex = params.next()) != null) {\n var itemLayout = data.getItemLayout(dataIndex);\n var el = createNormalBox(itemLayout, dataIndex);\n setBoxCommon(el, data, dataIndex, isSimpleBox);\n el.incremental = true;\n this.group.add(el);\n this._progressiveEls.push(el);\n }\n };\n CandlestickView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n createLarge(seriesModel, this.group, this._progressiveEls, true);\n };\n CandlestickView.prototype.remove = function (ecModel) {\n this._clear();\n };\n CandlestickView.prototype._clear = function () {\n this.group.removeAll();\n this._data = null;\n };\n CandlestickView.type = 'candlestick';\n return CandlestickView;\n}(ChartView);\nvar NormalBoxPathShape = /** @class */function () {\n function NormalBoxPathShape() {}\n return NormalBoxPathShape;\n}();\nvar NormalBoxPath = /** @class */function (_super) {\n __extends(NormalBoxPath, _super);\n function NormalBoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'normalCandlestickBox';\n return _this;\n }\n NormalBoxPath.prototype.getDefaultShape = function () {\n return new NormalBoxPathShape();\n };\n NormalBoxPath.prototype.buildPath = function (ctx, shape) {\n var ends = shape.points;\n if (this.__simpleBox) {\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[6][0], ends[6][1]);\n } else {\n ctx.moveTo(ends[0][0], ends[0][1]);\n ctx.lineTo(ends[1][0], ends[1][1]);\n ctx.lineTo(ends[2][0], ends[2][1]);\n ctx.lineTo(ends[3][0], ends[3][1]);\n ctx.closePath();\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[5][0], ends[5][1]);\n ctx.moveTo(ends[6][0], ends[6][1]);\n ctx.lineTo(ends[7][0], ends[7][1]);\n }\n };\n return NormalBoxPath;\n}(Path);\nfunction createNormalBox(itemLayout, dataIndex, isInit) {\n var ends = itemLayout.ends;\n return new NormalBoxPath({\n shape: {\n points: isInit ? transInit(ends, itemLayout) : ends\n },\n z2: 100\n });\n}\nfunction isNormalBoxClipped(clipArea, itemLayout) {\n var clipped = true;\n for (var i = 0; i < itemLayout.ends.length; i++) {\n // If any point are in the region.\n if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) {\n clipped = false;\n break;\n }\n }\n return clipped;\n}\nfunction setBoxCommon(el, data, dataIndex, isSimpleBox) {\n var itemModel = data.getItemModel(dataIndex);\n el.useStyle(data.getItemVisual(dataIndex, 'style'));\n el.style.strokeNoScale = true;\n el.__simpleBox = isSimpleBox;\n setStatesStylesFromModel(el, itemModel);\n}\nfunction transInit(points, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[1] = itemLayout.initBaseline;\n return point;\n });\n}\nvar LargeBoxPathShape = /** @class */function () {\n function LargeBoxPathShape() {}\n return LargeBoxPathShape;\n}();\nvar LargeBoxPath = /** @class */function (_super) {\n __extends(LargeBoxPath, _super);\n function LargeBoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'largeCandlestickBox';\n return _this;\n }\n LargeBoxPath.prototype.getDefaultShape = function () {\n return new LargeBoxPathShape();\n };\n LargeBoxPath.prototype.buildPath = function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n for (var i = 0; i < points.length;) {\n if (this.__sign === points[i++]) {\n var x = points[i++];\n ctx.moveTo(x, points[i++]);\n ctx.lineTo(x, points[i++]);\n } else {\n i += 3;\n }\n }\n };\n return LargeBoxPath;\n}(Path);\nfunction createLarge(seriesModel, group, progressiveEls, incremental) {\n var data = seriesModel.getData();\n var largePoints = data.getLayout('largePoints');\n var elP = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 1,\n ignoreCoarsePointer: true\n });\n group.add(elP);\n var elN = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: -1,\n ignoreCoarsePointer: true\n });\n group.add(elN);\n var elDoji = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 0,\n ignoreCoarsePointer: true\n });\n group.add(elDoji);\n setLargeStyle(1, elP, seriesModel, data);\n setLargeStyle(-1, elN, seriesModel, data);\n setLargeStyle(0, elDoji, seriesModel, data);\n if (incremental) {\n elP.incremental = true;\n elN.incremental = true;\n }\n if (progressiveEls) {\n progressiveEls.push(elP, elN);\n }\n}\nfunction setLargeStyle(sign, el, seriesModel, data) {\n // TODO put in visual?\n var borderColor = seriesModel.get(['itemStyle', sign > 0 ? 'borderColor' : 'borderColor0'])\n // Use color for border color by default.\n || seriesModel.get(['itemStyle', sign > 0 ? 'color' : 'color0']);\n if (sign === 0) {\n borderColor = seriesModel.get(['itemStyle', 'borderColorDoji']);\n }\n // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(SKIP_PROPS);\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor;\n}\nexport default CandlestickView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport { WhiskerBoxCommonMixin } from '../helper/whiskerBoxCommon.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nvar CandlestickSeriesModel = /** @class */function (_super) {\n __extends(CandlestickSeriesModel, _super);\n function CandlestickSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CandlestickSeriesModel.type;\n _this.defaultValueDimensions = [{\n name: 'open',\n defaultTooltip: true\n }, {\n name: 'close',\n defaultTooltip: true\n }, {\n name: 'lowest',\n defaultTooltip: true\n }, {\n name: 'highest',\n defaultTooltip: true\n }];\n return _this;\n }\n /**\n * Get dimension for shadow in dataZoom\n * @return dimension name\n */\n CandlestickSeriesModel.prototype.getShadowDim = function () {\n return 'open';\n };\n CandlestickSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n var itemLayout = data.getItemLayout(dataIndex);\n return itemLayout && selectors.rect(itemLayout.brushRect);\n };\n CandlestickSeriesModel.type = 'series.candlestick';\n CandlestickSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid'];\n CandlestickSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n layout: null,\n clip: true,\n itemStyle: {\n color: '#eb5454',\n color0: '#47b262',\n borderColor: '#eb5454',\n borderColor0: '#47b262',\n borderColorDoji: null,\n // borderColor: '#d24040',\n // borderColor0: '#398f4f',\n borderWidth: 1\n },\n emphasis: {\n scale: true,\n itemStyle: {\n borderWidth: 2\n }\n },\n barMaxWidth: null,\n barMinWidth: null,\n barWidth: null,\n large: true,\n largeThreshold: 600,\n progressive: 3e3,\n progressiveThreshold: 1e4,\n progressiveChunkMode: 'mod',\n animationEasing: 'linear',\n animationDuration: 300\n };\n return CandlestickSeriesModel;\n}(SeriesModel);\nmixin(CandlestickSeriesModel, WhiskerBoxCommonMixin, true);\nexport default CandlestickSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function candlestickPreprocessor(option) {\n if (!option || !zrUtil.isArray(option.series)) {\n return;\n }\n // Translate 'k' to 'candlestick'.\n zrUtil.each(option.series, function (seriesItem) {\n if (zrUtil.isObject(seriesItem) && seriesItem.type === 'k') {\n seriesItem.type = 'candlestick';\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport createRenderPlanner from '../helper/createRenderPlanner.js';\nimport { extend } from 'zrender/lib/core/util.js';\nvar positiveBorderColorQuery = ['itemStyle', 'borderColor'];\nvar negativeBorderColorQuery = ['itemStyle', 'borderColor0'];\nvar dojiBorderColorQuery = ['itemStyle', 'borderColorDoji'];\nvar positiveColorQuery = ['itemStyle', 'color'];\nvar negativeColorQuery = ['itemStyle', 'color0'];\nvar candlestickVisual = {\n seriesType: 'candlestick',\n plan: createRenderPlanner(),\n // For legend.\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n function getColor(sign, model) {\n return model.get(sign > 0 ? positiveColorQuery : negativeColorQuery);\n }\n function getBorderColor(sign, model) {\n return model.get(sign === 0 ? dojiBorderColorQuery : sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery);\n }\n // Only visible series has each data be visual encoded\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n var isLargeRender = seriesModel.pipelineContext.large;\n return !isLargeRender && {\n progress: function (params, data) {\n var dataIndex;\n while ((dataIndex = params.next()) != null) {\n var itemModel = data.getItemModel(dataIndex);\n var sign = data.getItemLayout(dataIndex).sign;\n var style = itemModel.getItemStyle();\n style.fill = getColor(sign, itemModel);\n style.stroke = getBorderColor(sign, itemModel) || style.fill;\n var existsStyle = data.ensureUniqueItemVisual(dataIndex, 'style');\n extend(existsStyle, style);\n }\n }\n };\n }\n};\nexport default candlestickVisual;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { subPixelOptimize } from '../../util/graphic.js';\nimport createRenderPlanner from '../helper/createRenderPlanner.js';\nimport { parsePercent } from '../../util/number.js';\nimport { map, retrieve2 } from 'zrender/lib/core/util.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nvar candlestickLayout = {\n seriesType: 'candlestick',\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n var candleWidth = calculateCandleWidth(seriesModel, data);\n var cDimIdx = 0;\n var vDimIdx = 1;\n var coordDims = ['x', 'y'];\n var cDimI = data.getDimensionIndex(data.mapDimension(coordDims[cDimIdx]));\n var vDimsI = map(data.mapDimensionsAll(coordDims[vDimIdx]), data.getDimensionIndex, data);\n var openDimI = vDimsI[0];\n var closeDimI = vDimsI[1];\n var lowestDimI = vDimsI[2];\n var highestDimI = vDimsI[3];\n data.setLayout({\n candleWidth: candleWidth,\n // The value is experimented visually.\n isSimpleBox: candleWidth <= 1.3\n });\n if (cDimI < 0 || vDimsI.length < 4) {\n return;\n }\n return {\n progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress\n };\n function normalProgress(params, data) {\n var dataIndex;\n var store = data.getStore();\n while ((dataIndex = params.next()) != null) {\n var axisDimVal = store.get(cDimI, dataIndex);\n var openVal = store.get(openDimI, dataIndex);\n var closeVal = store.get(closeDimI, dataIndex);\n var lowestVal = store.get(lowestDimI, dataIndex);\n var highestVal = store.get(highestDimI, dataIndex);\n var ocLow = Math.min(openVal, closeVal);\n var ocHigh = Math.max(openVal, closeVal);\n var ocLowPoint = getPoint(ocLow, axisDimVal);\n var ocHighPoint = getPoint(ocHigh, axisDimVal);\n var lowestPoint = getPoint(lowestVal, axisDimVal);\n var highestPoint = getPoint(highestVal, axisDimVal);\n var ends = [];\n addBodyEnd(ends, ocHighPoint, 0);\n addBodyEnd(ends, ocLowPoint, 1);\n ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint));\n var itemModel = data.getItemModel(dataIndex);\n var hasDojiColor = !!itemModel.get(['itemStyle', 'borderColorDoji']);\n data.setItemLayout(dataIndex, {\n sign: getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor),\n initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx],\n ends: ends,\n brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal)\n });\n }\n function getPoint(val, axisDimVal) {\n var p = [];\n p[cDimIdx] = axisDimVal;\n p[vDimIdx] = val;\n return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p);\n }\n function addBodyEnd(ends, point, start) {\n var point1 = point.slice();\n var point2 = point.slice();\n point1[cDimIdx] = subPixelOptimize(point1[cDimIdx] + candleWidth / 2, 1, false);\n point2[cDimIdx] = subPixelOptimize(point2[cDimIdx] - candleWidth / 2, 1, true);\n start ? ends.push(point1, point2) : ends.push(point2, point1);\n }\n function makeBrushRect(lowestVal, highestVal, axisDimVal) {\n var pmin = getPoint(lowestVal, axisDimVal);\n var pmax = getPoint(highestVal, axisDimVal);\n pmin[cDimIdx] -= candleWidth / 2;\n pmax[cDimIdx] -= candleWidth / 2;\n return {\n x: pmin[0],\n y: pmin[1],\n width: vDimIdx ? candleWidth : pmax[0] - pmin[0],\n height: vDimIdx ? pmax[1] - pmin[1] : candleWidth\n };\n }\n function subPixelOptimizePoint(point) {\n point[cDimIdx] = subPixelOptimize(point[cDimIdx], 1);\n return point;\n }\n }\n function largeProgress(params, data) {\n // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...]\n var points = createFloat32Array(params.count * 4);\n var offset = 0;\n var point;\n var tmpIn = [];\n var tmpOut = [];\n var dataIndex;\n var store = data.getStore();\n var hasDojiColor = !!seriesModel.get(['itemStyle', 'borderColorDoji']);\n while ((dataIndex = params.next()) != null) {\n var axisDimVal = store.get(cDimI, dataIndex);\n var openVal = store.get(openDimI, dataIndex);\n var closeVal = store.get(closeDimI, dataIndex);\n var lowestVal = store.get(lowestDimI, dataIndex);\n var highestVal = store.get(highestDimI, dataIndex);\n if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) {\n points[offset++] = NaN;\n offset += 3;\n continue;\n }\n points[offset++] = getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor);\n tmpIn[cDimIdx] = axisDimVal;\n tmpIn[vDimIdx] = lowestVal;\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n tmpIn[vDimIdx] = highestVal;\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n points[offset++] = point ? point[1] : NaN;\n }\n data.setLayout('largePoints', points);\n }\n }\n};\n/**\n * Get the sign of a single data.\n *\n * @returns 0 for doji with hasDojiColor: true,\n * 1 for positive,\n * -1 for negative.\n */\nfunction getSign(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor) {\n var sign;\n if (openVal > closeVal) {\n sign = -1;\n } else if (openVal < closeVal) {\n sign = 1;\n } else {\n sign = hasDojiColor\n // When doji color is set, use it instead of color/color0.\n ? 0 : dataIndex > 0\n // If close === open, compare with close of last record\n ? store.get(closeDimI, dataIndex - 1) <= closeVal ? 1 : -1\n // No record of previous, set to be positive\n : 1;\n }\n return sign;\n}\nfunction calculateCandleWidth(seriesModel, data) {\n var baseAxis = seriesModel.getBaseAxis();\n var extent;\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : (extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / data.count());\n var barMaxWidth = parsePercent(retrieve2(seriesModel.get('barMaxWidth'), bandWidth), bandWidth);\n var barMinWidth = parsePercent(retrieve2(seriesModel.get('barMinWidth'), 1), bandWidth);\n var barWidth = seriesModel.get('barWidth');\n return barWidth != null ? parsePercent(barWidth, bandWidth)\n // Put max outer to ensure bar visible in spite of overlap.\n : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth);\n}\nexport default candlestickLayout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CandlestickView from './CandlestickView.js';\nimport CandlestickSeriesModel from './CandlestickSeries.js';\nimport preprocessor from './preprocessor.js';\nimport candlestickVisual from './candlestickVisual.js';\nimport candlestickLayout from './candlestickLayout.js';\nexport function install(registers) {\n registers.registerChartView(CandlestickView);\n registers.registerSeriesModel(CandlestickSeriesModel);\n registers.registerPreprocessor(preprocessor);\n registers.registerVisual(candlestickVisual);\n registers.registerLayout(candlestickLayout);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport { Group } from '../../util/graphic.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis } from '../../util/states.js';\nimport SymbolClz from './Symbol.js';\nfunction updateRipplePath(rippleGroup, effectCfg) {\n var color = effectCfg.rippleEffectColor || effectCfg.color;\n rippleGroup.eachChild(function (ripplePath) {\n ripplePath.attr({\n z: effectCfg.z,\n zlevel: effectCfg.zlevel,\n style: {\n stroke: effectCfg.brushType === 'stroke' ? color : null,\n fill: effectCfg.brushType === 'fill' ? color : null\n }\n });\n });\n}\nvar EffectSymbol = /** @class */function (_super) {\n __extends(EffectSymbol, _super);\n function EffectSymbol(data, idx) {\n var _this = _super.call(this) || this;\n var symbol = new SymbolClz(data, idx);\n var rippleGroup = new Group();\n _this.add(symbol);\n _this.add(rippleGroup);\n _this.updateData(data, idx);\n return _this;\n }\n EffectSymbol.prototype.stopEffectAnimation = function () {\n this.childAt(1).removeAll();\n };\n EffectSymbol.prototype.startEffectAnimation = function (effectCfg) {\n var symbolType = effectCfg.symbolType;\n var color = effectCfg.color;\n var rippleNumber = effectCfg.rippleNumber;\n var rippleGroup = this.childAt(1);\n for (var i = 0; i < rippleNumber; i++) {\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4136.\n var ripplePath = createSymbol(symbolType, -1, -1, 2, 2, color);\n ripplePath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 99,\n silent: true,\n scaleX: 0.5,\n scaleY: 0.5\n });\n var delay = -i / rippleNumber * effectCfg.period + effectCfg.effectOffset;\n ripplePath.animate('', true).when(effectCfg.period, {\n scaleX: effectCfg.rippleScale / 2,\n scaleY: effectCfg.rippleScale / 2\n }).delay(delay).start();\n ripplePath.animateStyle(true).when(effectCfg.period, {\n opacity: 0\n }).delay(delay).start();\n rippleGroup.add(ripplePath);\n }\n updateRipplePath(rippleGroup, effectCfg);\n };\n /**\n * Update effect symbol\n */\n EffectSymbol.prototype.updateEffectAnimation = function (effectCfg) {\n var oldEffectCfg = this._effectCfg;\n var rippleGroup = this.childAt(1);\n // Must reinitialize effect if following configuration changed\n var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale', 'rippleNumber'];\n for (var i = 0; i < DIFFICULT_PROPS.length; i++) {\n var propName = DIFFICULT_PROPS[i];\n if (oldEffectCfg[propName] !== effectCfg[propName]) {\n this.stopEffectAnimation();\n this.startEffectAnimation(effectCfg);\n return;\n }\n }\n updateRipplePath(rippleGroup, effectCfg);\n };\n /**\n * Highlight symbol\n */\n EffectSymbol.prototype.highlight = function () {\n enterEmphasis(this);\n };\n /**\n * Downplay symbol\n */\n EffectSymbol.prototype.downplay = function () {\n leaveEmphasis(this);\n };\n EffectSymbol.prototype.getSymbolType = function () {\n var symbol = this.childAt(0);\n return symbol && symbol.getSymbolType();\n };\n /**\n * Update symbol properties\n */\n EffectSymbol.prototype.updateData = function (data, idx) {\n var _this = this;\n var seriesModel = data.hostModel;\n this.childAt(0).updateData(data, idx);\n var rippleGroup = this.childAt(1);\n var itemModel = data.getItemModel(idx);\n var symbolType = data.getItemVisual(idx, 'symbol');\n var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var symbolStyle = data.getItemVisual(idx, 'style');\n var color = symbolStyle && symbolStyle.fill;\n var emphasisModel = itemModel.getModel('emphasis');\n rippleGroup.setScale(symbolSize);\n rippleGroup.traverse(function (ripplePath) {\n ripplePath.setStyle('fill', color);\n });\n var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize);\n if (symbolOffset) {\n rippleGroup.x = symbolOffset[0];\n rippleGroup.y = symbolOffset[1];\n }\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n var effectCfg = {};\n effectCfg.showEffectOn = seriesModel.get('showEffectOn');\n effectCfg.rippleScale = itemModel.get(['rippleEffect', 'scale']);\n effectCfg.brushType = itemModel.get(['rippleEffect', 'brushType']);\n effectCfg.period = itemModel.get(['rippleEffect', 'period']) * 1000;\n effectCfg.effectOffset = idx / data.count();\n effectCfg.z = seriesModel.getShallow('z') || 0;\n effectCfg.zlevel = seriesModel.getShallow('zlevel') || 0;\n effectCfg.symbolType = symbolType;\n effectCfg.color = color;\n effectCfg.rippleEffectColor = itemModel.get(['rippleEffect', 'color']);\n effectCfg.rippleNumber = itemModel.get(['rippleEffect', 'number']);\n if (effectCfg.showEffectOn === 'render') {\n this._effectCfg ? this.updateEffectAnimation(effectCfg) : this.startEffectAnimation(effectCfg);\n this._effectCfg = effectCfg;\n } else {\n // Not keep old effect config\n this._effectCfg = null;\n this.stopEffectAnimation();\n this.onHoverStateChange = function (toState) {\n if (toState === 'emphasis') {\n if (effectCfg.showEffectOn !== 'render') {\n _this.startEffectAnimation(effectCfg);\n }\n } else if (toState === 'normal') {\n if (effectCfg.showEffectOn !== 'render') {\n _this.stopEffectAnimation();\n }\n }\n };\n }\n this._effectCfg = effectCfg;\n toggleHoverEmphasis(this, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n };\n ;\n EffectSymbol.prototype.fadeOut = function (cb) {\n cb && cb();\n };\n ;\n return EffectSymbol;\n}(Group);\nexport default EffectSymbol;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport EffectSymbol from '../helper/EffectSymbol.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport pointsLayout from '../../layout/points.js';\nimport ChartView from '../../view/Chart.js';\nvar EffectScatterView = /** @class */function (_super) {\n __extends(EffectScatterView, _super);\n function EffectScatterView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = EffectScatterView.type;\n return _this;\n }\n EffectScatterView.prototype.init = function () {\n this._symbolDraw = new SymbolDraw(EffectSymbol);\n };\n EffectScatterView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var effectSymbolDraw = this._symbolDraw;\n effectSymbolDraw.updateData(data, {\n clipShape: this._getClipShape(seriesModel)\n });\n this.group.add(effectSymbolDraw.group);\n };\n EffectScatterView.prototype._getClipShape = function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var clipArea = coordSys && coordSys.getArea && coordSys.getArea();\n return seriesModel.get('clip', true) ? clipArea : null;\n };\n EffectScatterView.prototype.updateTransform = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n this.group.dirty();\n var res = pointsLayout('').reset(seriesModel, ecModel, api);\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count(),\n count: data.count()\n }, data);\n }\n this._symbolDraw.updateLayout();\n };\n EffectScatterView.prototype._updateGroupTransform = function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.getRoamTransform) {\n this.group.transform = matrix.clone(coordSys.getRoamTransform());\n this.group.decomposeTransform();\n }\n };\n EffectScatterView.prototype.remove = function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(true);\n };\n EffectScatterView.type = 'effectScatter';\n return EffectScatterView;\n}(ChartView);\nexport default EffectScatterView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nvar EffectScatterSeriesModel = /** @class */function (_super) {\n __extends(EffectScatterSeriesModel, _super);\n function EffectScatterSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = EffectScatterSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n EffectScatterSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n EffectScatterSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.point(data.getItemLayout(dataIndex));\n };\n EffectScatterSeriesModel.type = 'series.effectScatter';\n EffectScatterSeriesModel.dependencies = ['grid', 'polar'];\n EffectScatterSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n effectType: 'ripple',\n progressive: 0,\n // When to show the effect, option: 'render'|'emphasis'\n showEffectOn: 'render',\n clip: true,\n // Ripple effect config\n rippleEffect: {\n period: 4,\n // Scale of ripple\n scale: 2.5,\n // Brush type can be fill or stroke\n brushType: 'fill',\n // Ripple number\n number: 3\n },\n universalTransition: {\n divideShape: 'clone'\n },\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Polar coordinate system\n // polarIndex: 0,\n // Geo coordinate system\n // geoIndex: 0,\n // symbol: null, // 图形类型\n symbolSize: 10 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2\n // symbolRotate: null, // 图形旋转控制\n // itemStyle: {\n // opacity: 1\n // }\n };\n\n return EffectScatterSeriesModel;\n}(SeriesModel);\nexport default EffectScatterSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport EffectScatterView from './EffectScatterView.js';\nimport EffectScatterSeriesModel from './EffectScatterSeries.js';\nimport layoutPoints from '../../layout/points.js';\nexport function install(registers) {\n registers.registerChartView(EffectScatterView);\n registers.registerSeriesModel(EffectScatterSeriesModel);\n registers.registerLayout(layoutPoints('effectScatter'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Provide effect for line\n */\nimport * as graphic from '../../util/graphic.js';\nimport Line from './Line.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nimport * as curveUtil from 'zrender/lib/core/curve.js';\nvar EffectLine = /** @class */function (_super) {\n __extends(EffectLine, _super);\n function EffectLine(lineData, idx, seriesScope) {\n var _this = _super.call(this) || this;\n _this.add(_this.createLine(lineData, idx, seriesScope));\n _this._updateEffectSymbol(lineData, idx);\n return _this;\n }\n EffectLine.prototype.createLine = function (lineData, idx, seriesScope) {\n return new Line(lineData, idx, seriesScope);\n };\n EffectLine.prototype._updateEffectSymbol = function (lineData, idx) {\n var itemModel = lineData.getItemModel(idx);\n var effectModel = itemModel.getModel('effect');\n var size = effectModel.get('symbolSize');\n var symbolType = effectModel.get('symbol');\n if (!zrUtil.isArray(size)) {\n size = [size, size];\n }\n var lineStyle = lineData.getItemVisual(idx, 'style');\n var color = effectModel.get('color') || lineStyle && lineStyle.stroke;\n var symbol = this.childAt(1);\n if (this._symbolType !== symbolType) {\n // Remove previous\n this.remove(symbol);\n symbol = createSymbol(symbolType, -0.5, -0.5, 1, 1, color);\n symbol.z2 = 100;\n symbol.culling = true;\n this.add(symbol);\n }\n // Symbol may be removed if loop is false\n if (!symbol) {\n return;\n }\n // Shadow color is same with color in default\n symbol.setStyle('shadowColor', color);\n symbol.setStyle(effectModel.getItemStyle(['color']));\n symbol.scaleX = size[0];\n symbol.scaleY = size[1];\n symbol.setColor(color);\n this._symbolType = symbolType;\n this._symbolScale = size;\n this._updateEffectAnimation(lineData, effectModel, idx);\n };\n EffectLine.prototype._updateEffectAnimation = function (lineData, effectModel, idx) {\n var symbol = this.childAt(1);\n if (!symbol) {\n return;\n }\n var points = lineData.getItemLayout(idx);\n var period = effectModel.get('period') * 1000;\n var loop = effectModel.get('loop');\n var roundTrip = effectModel.get('roundTrip');\n var constantSpeed = effectModel.get('constantSpeed');\n var delayExpr = zrUtil.retrieve(effectModel.get('delay'), function (idx) {\n return idx / lineData.count() * period / 3;\n });\n // Ignore when updating\n symbol.ignore = true;\n this._updateAnimationPoints(symbol, points);\n if (constantSpeed > 0) {\n period = this._getLineLength(symbol) / constantSpeed * 1000;\n }\n if (period !== this._period || loop !== this._loop || roundTrip !== this._roundTrip) {\n symbol.stopAnimation();\n var delayNum = void 0;\n if (zrUtil.isFunction(delayExpr)) {\n delayNum = delayExpr(idx);\n } else {\n delayNum = delayExpr;\n }\n if (symbol.__t > 0) {\n delayNum = -period * symbol.__t;\n }\n this._animateSymbol(symbol, period, delayNum, loop, roundTrip);\n }\n this._period = period;\n this._loop = loop;\n this._roundTrip = roundTrip;\n };\n EffectLine.prototype._animateSymbol = function (symbol, period, delayNum, loop, roundTrip) {\n if (period > 0) {\n symbol.__t = 0;\n var self_1 = this;\n var animator = symbol.animate('', loop).when(roundTrip ? period * 2 : period, {\n __t: roundTrip ? 2 : 1\n }).delay(delayNum).during(function () {\n self_1._updateSymbolPosition(symbol);\n });\n if (!loop) {\n animator.done(function () {\n self_1.remove(symbol);\n });\n }\n animator.start();\n }\n };\n EffectLine.prototype._getLineLength = function (symbol) {\n // Not so accurate\n return vec2.dist(symbol.__p1, symbol.__cp1) + vec2.dist(symbol.__cp1, symbol.__p2);\n };\n EffectLine.prototype._updateAnimationPoints = function (symbol, points) {\n symbol.__p1 = points[0];\n symbol.__p2 = points[1];\n symbol.__cp1 = points[2] || [(points[0][0] + points[1][0]) / 2, (points[0][1] + points[1][1]) / 2];\n };\n EffectLine.prototype.updateData = function (lineData, idx, seriesScope) {\n this.childAt(0).updateData(lineData, idx, seriesScope);\n this._updateEffectSymbol(lineData, idx);\n };\n EffectLine.prototype._updateSymbolPosition = function (symbol) {\n var p1 = symbol.__p1;\n var p2 = symbol.__p2;\n var cp1 = symbol.__cp1;\n var t = symbol.__t < 1 ? symbol.__t : 2 - symbol.__t;\n var pos = [symbol.x, symbol.y];\n var lastPos = pos.slice();\n var quadraticAt = curveUtil.quadraticAt;\n var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt;\n pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t);\n pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t);\n // Tangent\n var tx = symbol.__t < 1 ? quadraticDerivativeAt(p1[0], cp1[0], p2[0], t) : quadraticDerivativeAt(p2[0], cp1[0], p1[0], 1 - t);\n var ty = symbol.__t < 1 ? quadraticDerivativeAt(p1[1], cp1[1], p2[1], t) : quadraticDerivativeAt(p2[1], cp1[1], p1[1], 1 - t);\n symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2;\n // enable continuity trail for 'line', 'rect', 'roundRect' symbolType\n if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') {\n if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) {\n symbol.scaleY = vec2.dist(lastPos, pos) * 1.05;\n // make sure the last segment render within endPoint\n if (t === 1) {\n pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2;\n pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2;\n }\n } else if (symbol.__lastT === 1) {\n // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly.\n symbol.scaleY = 2 * vec2.dist(p1, pos);\n } else {\n symbol.scaleY = this._symbolScale[1];\n }\n }\n symbol.__lastT = symbol.__t;\n symbol.ignore = false;\n symbol.x = pos[0];\n symbol.y = pos[1];\n };\n EffectLine.prototype.updateLayout = function (lineData, idx) {\n this.childAt(0).updateLayout(lineData, idx);\n var effectModel = lineData.getItemModel(idx).getModel('effect');\n this._updateEffectAnimation(lineData, effectModel, idx);\n };\n return EffectLine;\n}(graphic.Group);\nexport default EffectLine;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis } from '../../util/states.js';\nvar Polyline = /** @class */function (_super) {\n __extends(Polyline, _super);\n function Polyline(lineData, idx, seriesScope) {\n var _this = _super.call(this) || this;\n _this._createPolyline(lineData, idx, seriesScope);\n return _this;\n }\n Polyline.prototype._createPolyline = function (lineData, idx, seriesScope) {\n // let seriesModel = lineData.hostModel;\n var points = lineData.getItemLayout(idx);\n var line = new graphic.Polyline({\n shape: {\n points: points\n }\n });\n this.add(line);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n ;\n Polyline.prototype.updateData = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childAt(0);\n var target = {\n shape: {\n points: lineData.getItemLayout(idx)\n }\n };\n graphic.updateProps(line, target, seriesModel, idx);\n this._updateCommonStl(lineData, idx, seriesScope);\n };\n ;\n Polyline.prototype._updateCommonStl = function (lineData, idx, seriesScope) {\n var line = this.childAt(0);\n var itemModel = lineData.getItemModel(idx);\n var emphasisLineStyle = seriesScope && seriesScope.emphasisLineStyle;\n var focus = seriesScope && seriesScope.focus;\n var blurScope = seriesScope && seriesScope.blurScope;\n var emphasisDisabled = seriesScope && seriesScope.emphasisDisabled;\n if (!seriesScope || lineData.hasItemOption) {\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisLineStyle = emphasisModel.getModel('lineStyle').getLineStyle();\n emphasisDisabled = emphasisModel.get('disabled');\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n }\n line.useStyle(lineData.getItemVisual(idx, 'style'));\n line.style.fill = null;\n line.style.strokeNoScale = true;\n var lineEmphasisState = line.ensureState('emphasis');\n lineEmphasisState.style = emphasisLineStyle;\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n ;\n Polyline.prototype.updateLayout = function (lineData, idx) {\n var polyline = this.childAt(0);\n polyline.setShape('points', lineData.getItemLayout(idx));\n };\n ;\n return Polyline;\n}(graphic.Group);\nexport default Polyline;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Polyline from './Polyline.js';\nimport EffectLine from './EffectLine.js';\nimport * as vec2 from 'zrender/lib/core/vector.js';\nvar EffectPolyline = /** @class */function (_super) {\n __extends(EffectPolyline, _super);\n function EffectPolyline() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._lastFrame = 0;\n _this._lastFramePercent = 0;\n return _this;\n }\n // Override\n EffectPolyline.prototype.createLine = function (lineData, idx, seriesScope) {\n return new Polyline(lineData, idx, seriesScope);\n };\n ;\n // Override\n EffectPolyline.prototype._updateAnimationPoints = function (symbol, points) {\n this._points = points;\n var accLenArr = [0];\n var len = 0;\n for (var i = 1; i < points.length; i++) {\n var p1 = points[i - 1];\n var p2 = points[i];\n len += vec2.dist(p1, p2);\n accLenArr.push(len);\n }\n if (len === 0) {\n this._length = 0;\n return;\n }\n for (var i = 0; i < accLenArr.length; i++) {\n accLenArr[i] /= len;\n }\n this._offsets = accLenArr;\n this._length = len;\n };\n ;\n // Override\n EffectPolyline.prototype._getLineLength = function () {\n return this._length;\n };\n ;\n // Override\n EffectPolyline.prototype._updateSymbolPosition = function (symbol) {\n var t = symbol.__t < 1 ? symbol.__t : 2 - symbol.__t;\n var points = this._points;\n var offsets = this._offsets;\n var len = points.length;\n if (!offsets) {\n // Has length 0\n return;\n }\n var lastFrame = this._lastFrame;\n var frame;\n if (t < this._lastFramePercent) {\n // Start from the next frame\n // PENDING start from lastFrame ?\n var start = Math.min(lastFrame + 1, len - 1);\n for (frame = start; frame >= 0; frame--) {\n if (offsets[frame] <= t) {\n break;\n }\n }\n // PENDING really need to do this ?\n frame = Math.min(frame, len - 2);\n } else {\n for (frame = lastFrame; frame < len; frame++) {\n if (offsets[frame] > t) {\n break;\n }\n }\n frame = Math.min(frame - 1, len - 2);\n }\n var p = (t - offsets[frame]) / (offsets[frame + 1] - offsets[frame]);\n var p0 = points[frame];\n var p1 = points[frame + 1];\n symbol.x = p0[0] * (1 - p) + p * p1[0];\n symbol.y = p0[1] * (1 - p) + p * p1[1];\n var tx = symbol.__t < 1 ? p1[0] - p0[0] : p0[0] - p1[0];\n var ty = symbol.__t < 1 ? p1[1] - p0[1] : p0[1] - p1[1];\n symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2;\n this._lastFrame = frame;\n this._lastFramePercent = t;\n symbol.ignore = false;\n };\n ;\n return EffectPolyline;\n}(EffectLine);\nexport default EffectPolyline;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// TODO Batch by color\nimport * as graphic from '../../util/graphic.js';\nimport * as lineContain from 'zrender/lib/contain/line.js';\nimport * as quadraticContain from 'zrender/lib/contain/quadratic.js';\nimport { getECData } from '../../util/innerStore.js';\nvar LargeLinesPathShape = /** @class */function () {\n function LargeLinesPathShape() {\n this.polyline = false;\n this.curveness = 0;\n this.segs = [];\n }\n return LargeLinesPathShape;\n}();\nvar LargeLinesPath = /** @class */function (_super) {\n __extends(LargeLinesPath, _super);\n function LargeLinesPath(opts) {\n var _this = _super.call(this, opts) || this;\n _this._off = 0;\n _this.hoverDataIdx = -1;\n return _this;\n }\n LargeLinesPath.prototype.reset = function () {\n this.notClear = false;\n this._off = 0;\n };\n LargeLinesPath.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n LargeLinesPath.prototype.getDefaultShape = function () {\n return new LargeLinesPathShape();\n };\n LargeLinesPath.prototype.buildPath = function (ctx, shape) {\n var segs = shape.segs;\n var curveness = shape.curveness;\n var i;\n if (shape.polyline) {\n for (i = this._off; i < segs.length;) {\n var count = segs[i++];\n if (count > 0) {\n ctx.moveTo(segs[i++], segs[i++]);\n for (var k = 1; k < count; k++) {\n ctx.lineTo(segs[i++], segs[i++]);\n }\n }\n }\n } else {\n for (i = this._off; i < segs.length;) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n var x1 = segs[i++];\n var y1 = segs[i++];\n ctx.moveTo(x0, y0);\n if (curveness > 0) {\n var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness;\n var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness;\n ctx.quadraticCurveTo(x2, y2, x1, y1);\n } else {\n ctx.lineTo(x1, y1);\n }\n }\n }\n if (this.incremental) {\n this._off = i;\n this.notClear = true;\n }\n };\n LargeLinesPath.prototype.findDataIndex = function (x, y) {\n var shape = this.shape;\n var segs = shape.segs;\n var curveness = shape.curveness;\n var lineWidth = this.style.lineWidth;\n if (shape.polyline) {\n var dataIndex = 0;\n for (var i = 0; i < segs.length;) {\n var count = segs[i++];\n if (count > 0) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n for (var k = 1; k < count; k++) {\n var x1 = segs[i++];\n var y1 = segs[i++];\n if (lineContain.containStroke(x0, y0, x1, y1, lineWidth, x, y)) {\n return dataIndex;\n }\n }\n }\n dataIndex++;\n }\n } else {\n var dataIndex = 0;\n for (var i = 0; i < segs.length;) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n var x1 = segs[i++];\n var y1 = segs[i++];\n if (curveness > 0) {\n var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness;\n var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness;\n if (quadraticContain.containStroke(x0, y0, x2, y2, x1, y1, lineWidth, x, y)) {\n return dataIndex;\n }\n } else {\n if (lineContain.containStroke(x0, y0, x1, y1, lineWidth, x, y)) {\n return dataIndex;\n }\n }\n dataIndex++;\n }\n }\n return -1;\n };\n LargeLinesPath.prototype.contain = function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n x = localPos[0];\n y = localPos[1];\n if (rect.contain(x, y)) {\n // Cache found data index.\n var dataIdx = this.hoverDataIdx = this.findDataIndex(x, y);\n return dataIdx >= 0;\n }\n this.hoverDataIdx = -1;\n return false;\n };\n LargeLinesPath.prototype.getBoundingRect = function () {\n // Ignore stroke for large symbol draw.\n var rect = this._rect;\n if (!rect) {\n var shape = this.shape;\n var points = shape.segs;\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n rect = this._rect = new graphic.BoundingRect(minX, minY, maxX, maxY);\n }\n return rect;\n };\n return LargeLinesPath;\n}(graphic.Path);\nvar LargeLineDraw = /** @class */function () {\n function LargeLineDraw() {\n this.group = new graphic.Group();\n }\n /**\n * Update symbols draw by new data\n */\n LargeLineDraw.prototype.updateData = function (data) {\n this._clear();\n var lineEl = this._create();\n lineEl.setShape({\n segs: data.getLayout('linesPoints')\n });\n this._setCommon(lineEl, data);\n };\n ;\n /**\n * @override\n */\n LargeLineDraw.prototype.incrementalPrepareUpdate = function (data) {\n this.group.removeAll();\n this._clear();\n };\n ;\n /**\n * @override\n */\n LargeLineDraw.prototype.incrementalUpdate = function (taskParams, data) {\n var lastAdded = this._newAdded[0];\n var linePoints = data.getLayout('linesPoints');\n var oldSegs = lastAdded && lastAdded.shape.segs;\n // Merging the exists. Each element has 1e4 points.\n // Consider the performance balance between too much elements and too much points in one shape(may affect hover optimization)\n if (oldSegs && oldSegs.length < 2e4) {\n var oldLen = oldSegs.length;\n var newSegs = new Float32Array(oldLen + linePoints.length);\n // Concat two array\n newSegs.set(oldSegs);\n newSegs.set(linePoints, oldLen);\n lastAdded.setShape({\n segs: newSegs\n });\n } else {\n // Clear\n this._newAdded = [];\n var lineEl = this._create();\n lineEl.incremental = true;\n lineEl.setShape({\n segs: linePoints\n });\n this._setCommon(lineEl, data);\n lineEl.__startIndex = taskParams.start;\n }\n };\n /**\n * @override\n */\n LargeLineDraw.prototype.remove = function () {\n this._clear();\n };\n LargeLineDraw.prototype.eachRendered = function (cb) {\n this._newAdded[0] && cb(this._newAdded[0]);\n };\n LargeLineDraw.prototype._create = function () {\n var lineEl = new LargeLinesPath({\n cursor: 'default',\n ignoreCoarsePointer: true\n });\n this._newAdded.push(lineEl);\n this.group.add(lineEl);\n return lineEl;\n };\n LargeLineDraw.prototype._setCommon = function (lineEl, data, isIncremental) {\n var hostModel = data.hostModel;\n lineEl.setShape({\n polyline: hostModel.get('polyline'),\n curveness: hostModel.get(['lineStyle', 'curveness'])\n });\n lineEl.useStyle(hostModel.getModel('lineStyle').getLineStyle());\n lineEl.style.strokeNoScale = true;\n var style = data.getVisual('style');\n if (style && style.stroke) {\n lineEl.setStyle('stroke', style.stroke);\n }\n lineEl.setStyle('fill', null);\n var ecData = getECData(lineEl);\n // Enable tooltip\n // PENDING May have performance issue when path is extremely large\n ecData.seriesIndex = hostModel.seriesIndex;\n lineEl.on('mousemove', function (e) {\n ecData.dataIndex = null;\n var dataIndex = lineEl.hoverDataIdx;\n if (dataIndex > 0) {\n // Provide dataIndex for tooltip\n ecData.dataIndex = dataIndex + lineEl.__startIndex;\n }\n });\n };\n ;\n LargeLineDraw.prototype._clear = function () {\n this._newAdded = [];\n this.group.removeAll();\n };\n ;\n return LargeLineDraw;\n}();\nexport default LargeLineDraw;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/* global Float32Array */\nimport createRenderPlanner from '../helper/createRenderPlanner.js';\nimport { error } from '../../util/log.js';\nvar linesLayout = {\n seriesType: 'lines',\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (!coordSys) {\n if (process.env.NODE_ENV !== 'production') {\n error('The lines series must have a coordinate system.');\n }\n return;\n }\n var isPolyline = seriesModel.get('polyline');\n var isLarge = seriesModel.pipelineContext.large;\n return {\n progress: function (params, lineData) {\n var lineCoords = [];\n if (isLarge) {\n var points = void 0;\n var segCount = params.end - params.start;\n if (isPolyline) {\n var totalCoordsCount = 0;\n for (var i = params.start; i < params.end; i++) {\n totalCoordsCount += seriesModel.getLineCoordsCount(i);\n }\n points = new Float32Array(segCount + totalCoordsCount * 2);\n } else {\n points = new Float32Array(segCount * 4);\n }\n var offset = 0;\n var pt = [];\n for (var i = params.start; i < params.end; i++) {\n var len = seriesModel.getLineCoords(i, lineCoords);\n if (isPolyline) {\n points[offset++] = len;\n }\n for (var k = 0; k < len; k++) {\n pt = coordSys.dataToPoint(lineCoords[k], false, pt);\n points[offset++] = pt[0];\n points[offset++] = pt[1];\n }\n }\n lineData.setLayout('linesPoints', points);\n } else {\n for (var i = params.start; i < params.end; i++) {\n var itemModel = lineData.getItemModel(i);\n var len = seriesModel.getLineCoords(i, lineCoords);\n var pts = [];\n if (isPolyline) {\n for (var j = 0; j < len; j++) {\n pts.push(coordSys.dataToPoint(lineCoords[j]));\n }\n } else {\n pts[0] = coordSys.dataToPoint(lineCoords[0]);\n pts[1] = coordSys.dataToPoint(lineCoords[1]);\n var curveness = itemModel.get(['lineStyle', 'curveness']);\n if (+curveness) {\n pts[2] = [(pts[0][0] + pts[1][0]) / 2 - (pts[0][1] - pts[1][1]) * curveness, (pts[0][1] + pts[1][1]) / 2 - (pts[1][0] - pts[0][0]) * curveness];\n }\n }\n lineData.setItemLayout(i, pts);\n }\n }\n }\n };\n }\n};\nexport default linesLayout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport LineDraw from '../helper/LineDraw.js';\nimport EffectLine from '../helper/EffectLine.js';\nimport Line from '../helper/Line.js';\nimport Polyline from '../helper/Polyline.js';\nimport EffectPolyline from '../helper/EffectPolyline.js';\nimport LargeLineDraw from '../helper/LargeLineDraw.js';\nimport linesLayout from './linesLayout.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport ChartView from '../../view/Chart.js';\nvar LinesView = /** @class */function (_super) {\n __extends(LinesView, _super);\n function LinesView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LinesView.type;\n return _this;\n }\n LinesView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var lineDraw = this._updateLineDraw(data, seriesModel);\n var zlevel = seriesModel.get('zlevel');\n var trailLength = seriesModel.get(['effect', 'trailLength']);\n var zr = api.getZr();\n // Avoid the drag cause ghost shadow\n // FIXME Better way ?\n // SVG doesn't support\n var isSvg = zr.painter.getType() === 'svg';\n if (!isSvg) {\n zr.painter.getLayer(zlevel).clear(true);\n }\n // Config layer with motion blur\n if (this._lastZlevel != null && !isSvg) {\n zr.configLayer(this._lastZlevel, {\n motionBlur: false\n });\n }\n if (this._showEffect(seriesModel) && trailLength > 0) {\n if (!isSvg) {\n zr.configLayer(zlevel, {\n motionBlur: true,\n lastFrameAlpha: Math.max(Math.min(trailLength / 10 + 0.9, 1), 0)\n });\n } else if (process.env.NODE_ENV !== 'production') {\n console.warn('SVG render mode doesn\\'t support lines with trail effect');\n }\n }\n lineDraw.updateData(data);\n var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n this._lastZlevel = zlevel;\n this._finished = true;\n };\n LinesView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var lineDraw = this._updateLineDraw(data, seriesModel);\n lineDraw.incrementalPrepareUpdate(data);\n this._clearLayer(api);\n this._finished = false;\n };\n LinesView.prototype.incrementalRender = function (taskParams, seriesModel, ecModel) {\n this._lineDraw.incrementalUpdate(taskParams, seriesModel.getData());\n this._finished = taskParams.end === seriesModel.getData().count();\n };\n LinesView.prototype.eachRendered = function (cb) {\n this._lineDraw && this._lineDraw.eachRendered(cb);\n };\n LinesView.prototype.updateTransform = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var pipelineContext = seriesModel.pipelineContext;\n if (!this._finished || pipelineContext.large || pipelineContext.progressiveRender) {\n // TODO Don't have to do update in large mode. Only do it when there are millions of data.\n return {\n update: true\n };\n } else {\n // TODO Use same logic with ScatterView.\n // Manually update layout\n var res = linesLayout.reset(seriesModel, ecModel, api);\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count(),\n count: data.count()\n }, data);\n }\n // Not in large mode\n this._lineDraw.updateLayout();\n this._clearLayer(api);\n }\n };\n LinesView.prototype._updateLineDraw = function (data, seriesModel) {\n var lineDraw = this._lineDraw;\n var hasEffect = this._showEffect(seriesModel);\n var isPolyline = !!seriesModel.get('polyline');\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n if (process.env.NODE_ENV !== 'production') {\n if (hasEffect && isLargeDraw) {\n console.warn('Large lines not support effect');\n }\n }\n if (!lineDraw || hasEffect !== this._hasEffet || isPolyline !== this._isPolyline || isLargeDraw !== this._isLargeDraw) {\n if (lineDraw) {\n lineDraw.remove();\n }\n lineDraw = this._lineDraw = isLargeDraw ? new LargeLineDraw() : new LineDraw(isPolyline ? hasEffect ? EffectPolyline : Polyline : hasEffect ? EffectLine : Line);\n this._hasEffet = hasEffect;\n this._isPolyline = isPolyline;\n this._isLargeDraw = isLargeDraw;\n }\n this.group.add(lineDraw.group);\n return lineDraw;\n };\n LinesView.prototype._showEffect = function (seriesModel) {\n return !!seriesModel.get(['effect', 'show']);\n };\n LinesView.prototype._clearLayer = function (api) {\n // Not use motion when dragging or zooming\n var zr = api.getZr();\n var isSvg = zr.painter.getType() === 'svg';\n if (!isSvg && this._lastZlevel != null) {\n zr.painter.getLayer(this._lastZlevel).clear(true);\n }\n };\n LinesView.prototype.remove = function (ecModel, api) {\n this._lineDraw && this._lineDraw.remove();\n this._lineDraw = null;\n // Clear motion when lineDraw is removed\n this._clearLayer(api);\n };\n LinesView.prototype.dispose = function (ecModel, api) {\n this.remove(ecModel, api);\n };\n LinesView.type = 'lines';\n return LinesView;\n}(ChartView);\nexport default LinesView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global Uint32Array, Float64Array, Float32Array */\nimport SeriesModel from '../../model/Series.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport { concatArray, mergeAll, map, isNumber } from 'zrender/lib/core/util.js';\nimport CoordinateSystem from '../../core/CoordinateSystem.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nvar Uint32Arr = typeof Uint32Array === 'undefined' ? Array : Uint32Array;\nvar Float64Arr = typeof Float64Array === 'undefined' ? Array : Float64Array;\nfunction compatEc2(seriesOpt) {\n var data = seriesOpt.data;\n if (data && data[0] && data[0][0] && data[0][0].coord) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Lines data configuration has been changed to' + ' { coords:[[1,2],[2,3]] }');\n }\n seriesOpt.data = map(data, function (itemOpt) {\n var coords = [itemOpt[0].coord, itemOpt[1].coord];\n var target = {\n coords: coords\n };\n if (itemOpt[0].name) {\n target.fromName = itemOpt[0].name;\n }\n if (itemOpt[1].name) {\n target.toName = itemOpt[1].name;\n }\n return mergeAll([target, itemOpt[0], itemOpt[1]]);\n });\n }\n}\nvar LinesSeriesModel = /** @class */function (_super) {\n __extends(LinesSeriesModel, _super);\n function LinesSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LinesSeriesModel.type;\n _this.visualStyleAccessPath = 'lineStyle';\n _this.visualDrawType = 'stroke';\n return _this;\n }\n LinesSeriesModel.prototype.init = function (option) {\n // The input data may be null/undefined.\n option.data = option.data || [];\n // Not using preprocessor because mergeOption may not have series.type\n compatEc2(option);\n var result = this._processFlatCoordsArray(option.data);\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n if (result.flatCoords) {\n option.data = new Float32Array(result.count);\n }\n _super.prototype.init.apply(this, arguments);\n };\n LinesSeriesModel.prototype.mergeOption = function (option) {\n compatEc2(option);\n if (option.data) {\n // Only update when have option data to merge.\n var result = this._processFlatCoordsArray(option.data);\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n if (result.flatCoords) {\n option.data = new Float32Array(result.count);\n }\n }\n _super.prototype.mergeOption.apply(this, arguments);\n };\n LinesSeriesModel.prototype.appendData = function (params) {\n var result = this._processFlatCoordsArray(params.data);\n if (result.flatCoords) {\n if (!this._flatCoords) {\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n } else {\n this._flatCoords = concatArray(this._flatCoords, result.flatCoords);\n this._flatCoordsOffset = concatArray(this._flatCoordsOffset, result.flatCoordsOffset);\n }\n params.data = new Float32Array(result.count);\n }\n this.getRawData().appendData(params.data);\n };\n LinesSeriesModel.prototype._getCoordsFromItemModel = function (idx) {\n var itemModel = this.getData().getItemModel(idx);\n var coords = itemModel.option instanceof Array ? itemModel.option : itemModel.getShallow('coords');\n if (process.env.NODE_ENV !== 'production') {\n if (!(coords instanceof Array && coords.length > 0 && coords[0] instanceof Array)) {\n throw new Error('Invalid coords ' + JSON.stringify(coords) + '. Lines must have 2d coords array in data item.');\n }\n }\n return coords;\n };\n LinesSeriesModel.prototype.getLineCoordsCount = function (idx) {\n if (this._flatCoordsOffset) {\n return this._flatCoordsOffset[idx * 2 + 1];\n } else {\n return this._getCoordsFromItemModel(idx).length;\n }\n };\n LinesSeriesModel.prototype.getLineCoords = function (idx, out) {\n if (this._flatCoordsOffset) {\n var offset = this._flatCoordsOffset[idx * 2];\n var len = this._flatCoordsOffset[idx * 2 + 1];\n for (var i = 0; i < len; i++) {\n out[i] = out[i] || [];\n out[i][0] = this._flatCoords[offset + i * 2];\n out[i][1] = this._flatCoords[offset + i * 2 + 1];\n }\n return len;\n } else {\n var coords = this._getCoordsFromItemModel(idx);\n for (var i = 0; i < coords.length; i++) {\n out[i] = out[i] || [];\n out[i][0] = coords[i][0];\n out[i][1] = coords[i][1];\n }\n return coords.length;\n }\n };\n LinesSeriesModel.prototype._processFlatCoordsArray = function (data) {\n var startOffset = 0;\n if (this._flatCoords) {\n startOffset = this._flatCoords.length;\n }\n // Stored as a typed array. In format\n // Points Count(2) | x | y | x | y | Points Count(3) | x | y | x | y | x | y |\n if (isNumber(data[0])) {\n var len = data.length;\n // Store offset and len of each segment\n var coordsOffsetAndLenStorage = new Uint32Arr(len);\n var coordsStorage = new Float64Arr(len);\n var coordsCursor = 0;\n var offsetCursor = 0;\n var dataCount = 0;\n for (var i = 0; i < len;) {\n dataCount++;\n var count = data[i++];\n // Offset\n coordsOffsetAndLenStorage[offsetCursor++] = coordsCursor + startOffset;\n // Len\n coordsOffsetAndLenStorage[offsetCursor++] = count;\n for (var k = 0; k < count; k++) {\n var x = data[i++];\n var y = data[i++];\n coordsStorage[coordsCursor++] = x;\n coordsStorage[coordsCursor++] = y;\n if (i > len) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('Invalid data format.');\n }\n }\n }\n }\n return {\n flatCoordsOffset: new Uint32Array(coordsOffsetAndLenStorage.buffer, 0, offsetCursor),\n flatCoords: coordsStorage,\n count: dataCount\n };\n }\n return {\n flatCoordsOffset: null,\n flatCoords: null,\n count: data.length\n };\n };\n LinesSeriesModel.prototype.getInitialData = function (option, ecModel) {\n if (process.env.NODE_ENV !== 'production') {\n var CoordSys = CoordinateSystem.get(option.coordinateSystem);\n if (!CoordSys) {\n throw new Error('Unknown coordinate system ' + option.coordinateSystem);\n }\n }\n var lineData = new SeriesData(['value'], this);\n lineData.hasItemOption = false;\n lineData.initData(option.data, [], function (dataItem, dimName, dataIndex, dimIndex) {\n // dataItem is simply coords\n if (dataItem instanceof Array) {\n return NaN;\n } else {\n lineData.hasItemOption = true;\n var value = dataItem.value;\n if (value != null) {\n return value instanceof Array ? value[dimIndex] : value;\n }\n }\n });\n return lineData;\n };\n LinesSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var itemModel = data.getItemModel(dataIndex);\n var name = itemModel.get('name');\n if (name) {\n return name;\n }\n var fromName = itemModel.get('fromName');\n var toName = itemModel.get('toName');\n var nameArr = [];\n fromName != null && nameArr.push(fromName);\n toName != null && nameArr.push(toName);\n return createTooltipMarkup('nameValue', {\n name: nameArr.join(' > ')\n });\n };\n LinesSeriesModel.prototype.preventIncremental = function () {\n return !!this.get(['effect', 'show']);\n };\n LinesSeriesModel.prototype.getProgressive = function () {\n var progressive = this.option.progressive;\n if (progressive == null) {\n return this.option.large ? 1e4 : this.get('progressive');\n }\n return progressive;\n };\n LinesSeriesModel.prototype.getProgressiveThreshold = function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n if (progressiveThreshold == null) {\n return this.option.large ? 2e4 : this.get('progressiveThreshold');\n }\n return progressiveThreshold;\n };\n LinesSeriesModel.prototype.getZLevelKey = function () {\n var effectModel = this.getModel('effect');\n var trailLength = effectModel.get('trailLength');\n return this.getData().count() > this.getProgressiveThreshold()\n // Each progressive series has individual key.\n ? this.id : effectModel.get('show') && trailLength > 0 ? trailLength + '' : '';\n };\n LinesSeriesModel.type = 'series.lines';\n LinesSeriesModel.dependencies = ['grid', 'polar', 'geo', 'calendar'];\n LinesSeriesModel.defaultOption = {\n coordinateSystem: 'geo',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n // Cartesian coordinate system\n xAxisIndex: 0,\n yAxisIndex: 0,\n symbol: ['none', 'none'],\n symbolSize: [10, 10],\n // Geo coordinate system\n geoIndex: 0,\n effect: {\n show: false,\n period: 4,\n constantSpeed: 0,\n symbol: 'circle',\n symbolSize: 3,\n loop: true,\n trailLength: 0.2\n },\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n polyline: false,\n clip: true,\n label: {\n show: false,\n position: 'end'\n // distance: 5,\n // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n },\n\n lineStyle: {\n opacity: 0.5\n }\n };\n return LinesSeriesModel;\n}(SeriesModel);\nexport default LinesSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n return a;\n}\nvar linesVisual = {\n seriesType: 'lines',\n reset: function (seriesModel) {\n var symbolType = normalize(seriesModel.get('symbol'));\n var symbolSize = normalize(seriesModel.get('symbolSize'));\n var data = seriesModel.getData();\n data.setVisual('fromSymbol', symbolType && symbolType[0]);\n data.setVisual('toSymbol', symbolType && symbolType[1]);\n data.setVisual('fromSymbolSize', symbolSize && symbolSize[0]);\n data.setVisual('toSymbolSize', symbolSize && symbolSize[1]);\n function dataEach(data, idx) {\n var itemModel = data.getItemModel(idx);\n var symbolType = normalize(itemModel.getShallow('symbol', true));\n var symbolSize = normalize(itemModel.getShallow('symbolSize', true));\n symbolType[0] && data.setItemVisual(idx, 'fromSymbol', symbolType[0]);\n symbolType[1] && data.setItemVisual(idx, 'toSymbol', symbolType[1]);\n symbolSize[0] && data.setItemVisual(idx, 'fromSymbolSize', symbolSize[0]);\n symbolSize[1] && data.setItemVisual(idx, 'toSymbolSize', symbolSize[1]);\n }\n return {\n dataEach: data.hasItemOption ? dataEach : null\n };\n }\n};\nexport default linesVisual;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LinesView from './LinesView.js';\nimport LinesSeriesModel from './LinesSeries.js';\nimport linesLayout from './linesLayout.js';\nimport linesVisual from './linesVisual.js';\nexport function install(registers) {\n registers.registerChartView(LinesView);\n registers.registerSeriesModel(LinesSeriesModel);\n registers.registerLayout(linesLayout);\n registers.registerVisual(linesVisual);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/* global Uint8ClampedArray */\nimport { platformApi } from 'zrender/lib/core/platform.js';\nvar GRADIENT_LEVELS = 256;\nvar HeatmapLayer = /** @class */function () {\n function HeatmapLayer() {\n this.blurSize = 30;\n this.pointSize = 20;\n this.maxOpacity = 1;\n this.minOpacity = 0;\n this._gradientPixels = {\n inRange: null,\n outOfRange: null\n };\n var canvas = platformApi.createCanvas();\n this.canvas = canvas;\n }\n /**\n * Renders Heatmap and returns the rendered canvas\n * @param data array of data, each has x, y, value\n * @param width canvas width\n * @param height canvas height\n */\n HeatmapLayer.prototype.update = function (data, width, height, normalize, colorFunc, isInRange) {\n var brush = this._getBrush();\n var gradientInRange = this._getGradient(colorFunc, 'inRange');\n var gradientOutOfRange = this._getGradient(colorFunc, 'outOfRange');\n var r = this.pointSize + this.blurSize;\n var canvas = this.canvas;\n var ctx = canvas.getContext('2d');\n var len = data.length;\n canvas.width = width;\n canvas.height = height;\n for (var i = 0; i < len; ++i) {\n var p = data[i];\n var x = p[0];\n var y = p[1];\n var value = p[2];\n // calculate alpha using value\n var alpha = normalize(value);\n // draw with the circle brush with alpha\n ctx.globalAlpha = alpha;\n ctx.drawImage(brush, x - r, y - r);\n }\n if (!canvas.width || !canvas.height) {\n // Avoid \"Uncaught DOMException: Failed to execute 'getImageData' on\n // 'CanvasRenderingContext2D': The source height is 0.\"\n return canvas;\n }\n // colorize the canvas using alpha value and set with gradient\n var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n var pixels = imageData.data;\n var offset = 0;\n var pixelLen = pixels.length;\n var minOpacity = this.minOpacity;\n var maxOpacity = this.maxOpacity;\n var diffOpacity = maxOpacity - minOpacity;\n while (offset < pixelLen) {\n var alpha = pixels[offset + 3] / 256;\n var gradientOffset = Math.floor(alpha * (GRADIENT_LEVELS - 1)) * 4;\n // Simple optimize to ignore the empty data\n if (alpha > 0) {\n var gradient = isInRange(alpha) ? gradientInRange : gradientOutOfRange;\n // Any alpha > 0 will be mapped to [minOpacity, maxOpacity]\n alpha > 0 && (alpha = alpha * diffOpacity + minOpacity);\n pixels[offset++] = gradient[gradientOffset];\n pixels[offset++] = gradient[gradientOffset + 1];\n pixels[offset++] = gradient[gradientOffset + 2];\n pixels[offset++] = gradient[gradientOffset + 3] * alpha * 256;\n } else {\n offset += 4;\n }\n }\n ctx.putImageData(imageData, 0, 0);\n return canvas;\n };\n /**\n * get canvas of a black circle brush used for canvas to draw later\n */\n HeatmapLayer.prototype._getBrush = function () {\n var brushCanvas = this._brushCanvas || (this._brushCanvas = platformApi.createCanvas());\n // set brush size\n var r = this.pointSize + this.blurSize;\n var d = r * 2;\n brushCanvas.width = d;\n brushCanvas.height = d;\n var ctx = brushCanvas.getContext('2d');\n ctx.clearRect(0, 0, d, d);\n // in order to render shadow without the distinct circle,\n // draw the distinct circle in an invisible place,\n // and use shadowOffset to draw shadow in the center of the canvas\n ctx.shadowOffsetX = d;\n ctx.shadowBlur = this.blurSize;\n // draw the shadow in black, and use alpha and shadow blur to generate\n // color in color map\n ctx.shadowColor = '#000';\n // draw circle in the left to the canvas\n ctx.beginPath();\n ctx.arc(-r, r, this.pointSize, 0, Math.PI * 2, true);\n ctx.closePath();\n ctx.fill();\n return brushCanvas;\n };\n /**\n * get gradient color map\n * @private\n */\n HeatmapLayer.prototype._getGradient = function (colorFunc, state) {\n var gradientPixels = this._gradientPixels;\n var pixelsSingleState = gradientPixels[state] || (gradientPixels[state] = new Uint8ClampedArray(256 * 4));\n var color = [0, 0, 0, 0];\n var off = 0;\n for (var i = 0; i < 256; i++) {\n colorFunc[state](i / 255, true, color);\n pixelsSingleState[off++] = color[0];\n pixelsSingleState[off++] = color[1];\n pixelsSingleState[off++] = color[2];\n pixelsSingleState[off++] = color[3];\n }\n return pixelsSingleState;\n };\n return HeatmapLayer;\n}();\nexport default HeatmapLayer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis } from '../../util/states.js';\nimport HeatmapLayer from './HeatmapLayer.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ChartView from '../../view/Chart.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nfunction getIsInPiecewiseRange(dataExtent, pieceList, selected) {\n var dataSpan = dataExtent[1] - dataExtent[0];\n pieceList = zrUtil.map(pieceList, function (piece) {\n return {\n interval: [(piece.interval[0] - dataExtent[0]) / dataSpan, (piece.interval[1] - dataExtent[0]) / dataSpan]\n };\n });\n var len = pieceList.length;\n var lastIndex = 0;\n return function (val) {\n var i;\n // Try to find in the location of the last found\n for (i = lastIndex; i < len; i++) {\n var interval = pieceList[i].interval;\n if (interval[0] <= val && val <= interval[1]) {\n lastIndex = i;\n break;\n }\n }\n if (i === len) {\n // Not found, back interation\n for (i = lastIndex - 1; i >= 0; i--) {\n var interval = pieceList[i].interval;\n if (interval[0] <= val && val <= interval[1]) {\n lastIndex = i;\n break;\n }\n }\n }\n return i >= 0 && i < len && selected[i];\n };\n}\nfunction getIsInContinuousRange(dataExtent, range) {\n var dataSpan = dataExtent[1] - dataExtent[0];\n range = [(range[0] - dataExtent[0]) / dataSpan, (range[1] - dataExtent[0]) / dataSpan];\n return function (val) {\n return val >= range[0] && val <= range[1];\n };\n}\nfunction isGeoCoordSys(coordSys) {\n var dimensions = coordSys.dimensions;\n // Not use coordSys.type === 'geo' because coordSys maybe extended\n return dimensions[0] === 'lng' && dimensions[1] === 'lat';\n}\nvar HeatmapView = /** @class */function (_super) {\n __extends(HeatmapView, _super);\n function HeatmapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = HeatmapView.type;\n return _this;\n }\n HeatmapView.prototype.render = function (seriesModel, ecModel, api) {\n var visualMapOfThisSeries;\n ecModel.eachComponent('visualMap', function (visualMap) {\n visualMap.eachTargetSeries(function (targetSeries) {\n if (targetSeries === seriesModel) {\n visualMapOfThisSeries = visualMap;\n }\n });\n });\n if (process.env.NODE_ENV !== 'production') {\n if (!visualMapOfThisSeries) {\n throw new Error('Heatmap must use with visualMap');\n }\n }\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n this.group.removeAll();\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type === 'cartesian2d' || coordSys.type === 'calendar') {\n this._renderOnCartesianAndCalendar(seriesModel, api, 0, seriesModel.getData().count());\n } else if (isGeoCoordSys(coordSys)) {\n this._renderOnGeo(coordSys, seriesModel, visualMapOfThisSeries, api);\n }\n };\n HeatmapView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n this.group.removeAll();\n };\n HeatmapView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys) {\n // geo does not support incremental rendering?\n if (isGeoCoordSys(coordSys)) {\n this.render(seriesModel, ecModel, api);\n } else {\n this._progressiveEls = [];\n this._renderOnCartesianAndCalendar(seriesModel, api, params.start, params.end, true);\n }\n }\n };\n HeatmapView.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n HeatmapView.prototype._renderOnCartesianAndCalendar = function (seriesModel, api, start, end, incremental) {\n var coordSys = seriesModel.coordinateSystem;\n var isCartesian2d = isCoordinateSystemType(coordSys, 'cartesian2d');\n var width;\n var height;\n var xAxisExtent;\n var yAxisExtent;\n if (isCartesian2d) {\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n if (process.env.NODE_ENV !== 'production') {\n if (!(xAxis.type === 'category' && yAxis.type === 'category')) {\n throw new Error('Heatmap on cartesian must have two category axes');\n }\n if (!(xAxis.onBand && yAxis.onBand)) {\n throw new Error('Heatmap on cartesian must have two axes with boundaryGap true');\n }\n }\n // add 0.5px to avoid the gaps\n width = xAxis.getBandWidth() + .5;\n height = yAxis.getBandWidth() + .5;\n xAxisExtent = xAxis.scale.getExtent();\n yAxisExtent = yAxis.scale.getExtent();\n }\n var group = this.group;\n var data = seriesModel.getData();\n var emphasisStyle = seriesModel.getModel(['emphasis', 'itemStyle']).getItemStyle();\n var blurStyle = seriesModel.getModel(['blur', 'itemStyle']).getItemStyle();\n var selectStyle = seriesModel.getModel(['select', 'itemStyle']).getItemStyle();\n var borderRadius = seriesModel.get(['itemStyle', 'borderRadius']);\n var labelStatesModels = getLabelStatesModels(seriesModel);\n var emphasisModel = seriesModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var emphasisDisabled = emphasisModel.get('disabled');\n var dataDims = isCartesian2d ? [data.mapDimension('x'), data.mapDimension('y'), data.mapDimension('value')] : [data.mapDimension('time'), data.mapDimension('value')];\n for (var idx = start; idx < end; idx++) {\n var rect = void 0;\n var style = data.getItemVisual(idx, 'style');\n if (isCartesian2d) {\n var dataDimX = data.get(dataDims[0], idx);\n var dataDimY = data.get(dataDims[1], idx);\n // Ignore empty data and out of extent data\n if (isNaN(data.get(dataDims[2], idx)) || isNaN(dataDimX) || isNaN(dataDimY) || dataDimX < xAxisExtent[0] || dataDimX > xAxisExtent[1] || dataDimY < yAxisExtent[0] || dataDimY > yAxisExtent[1]) {\n continue;\n }\n var point = coordSys.dataToPoint([dataDimX, dataDimY]);\n rect = new graphic.Rect({\n shape: {\n x: point[0] - width / 2,\n y: point[1] - height / 2,\n width: width,\n height: height\n },\n style: style\n });\n } else {\n // Ignore empty data\n if (isNaN(data.get(dataDims[1], idx))) {\n continue;\n }\n rect = new graphic.Rect({\n z2: 1,\n shape: coordSys.dataToRect([data.get(dataDims[0], idx)]).contentShape,\n style: style\n });\n }\n // Optimization for large dataset\n if (data.hasItemOption) {\n var itemModel = data.getItemModel(idx);\n var emphasisModel_1 = itemModel.getModel('emphasis');\n emphasisStyle = emphasisModel_1.getModel('itemStyle').getItemStyle();\n blurStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n selectStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n // Each item value struct in the data would be firstly\n // {\n // itemStyle: { borderRadius: [30, 30] },\n // value: [2022, 02, 22]\n // }\n borderRadius = itemModel.get(['itemStyle', 'borderRadius']);\n focus = emphasisModel_1.get('focus');\n blurScope = emphasisModel_1.get('blurScope');\n emphasisDisabled = emphasisModel_1.get('disabled');\n labelStatesModels = getLabelStatesModels(itemModel);\n }\n rect.shape.r = borderRadius;\n var rawValue = seriesModel.getRawValue(idx);\n var defaultText = '-';\n if (rawValue && rawValue[2] != null) {\n defaultText = rawValue[2] + '';\n }\n setLabelStyle(rect, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultOpacity: style.opacity,\n defaultText: defaultText\n });\n rect.ensureState('emphasis').style = emphasisStyle;\n rect.ensureState('blur').style = blurStyle;\n rect.ensureState('select').style = selectStyle;\n toggleHoverEmphasis(rect, focus, blurScope, emphasisDisabled);\n rect.incremental = incremental;\n // PENDING\n if (incremental) {\n // Rect must use hover layer if it's incremental.\n rect.states.emphasis.hoverLayer = true;\n }\n group.add(rect);\n data.setItemGraphicEl(idx, rect);\n if (this._progressiveEls) {\n this._progressiveEls.push(rect);\n }\n }\n };\n HeatmapView.prototype._renderOnGeo = function (geo, seriesModel, visualMapModel, api) {\n var inRangeVisuals = visualMapModel.targetVisuals.inRange;\n var outOfRangeVisuals = visualMapModel.targetVisuals.outOfRange;\n // if (!visualMapping) {\n // throw new Error('Data range must have color visuals');\n // }\n var data = seriesModel.getData();\n var hmLayer = this._hmLayer || this._hmLayer || new HeatmapLayer();\n hmLayer.blurSize = seriesModel.get('blurSize');\n hmLayer.pointSize = seriesModel.get('pointSize');\n hmLayer.minOpacity = seriesModel.get('minOpacity');\n hmLayer.maxOpacity = seriesModel.get('maxOpacity');\n var rect = geo.getViewRect().clone();\n var roamTransform = geo.getRoamTransform();\n rect.applyTransform(roamTransform);\n // Clamp on viewport\n var x = Math.max(rect.x, 0);\n var y = Math.max(rect.y, 0);\n var x2 = Math.min(rect.width + rect.x, api.getWidth());\n var y2 = Math.min(rect.height + rect.y, api.getHeight());\n var width = x2 - x;\n var height = y2 - y;\n var dims = [data.mapDimension('lng'), data.mapDimension('lat'), data.mapDimension('value')];\n var points = data.mapArray(dims, function (lng, lat, value) {\n var pt = geo.dataToPoint([lng, lat]);\n pt[0] -= x;\n pt[1] -= y;\n pt.push(value);\n return pt;\n });\n var dataExtent = visualMapModel.getExtent();\n var isInRange = visualMapModel.type === 'visualMap.continuous' ? getIsInContinuousRange(dataExtent, visualMapModel.option.range) : getIsInPiecewiseRange(dataExtent, visualMapModel.getPieceList(), visualMapModel.option.selected);\n hmLayer.update(points, width, height, inRangeVisuals.color.getNormalizer(), {\n inRange: inRangeVisuals.color.getColorMapper(),\n outOfRange: outOfRangeVisuals.color.getColorMapper()\n }, isInRange);\n var img = new graphic.Image({\n style: {\n width: width,\n height: height,\n x: x,\n y: y,\n image: hmLayer.canvas\n },\n silent: true\n });\n this.group.add(img);\n };\n HeatmapView.type = 'heatmap';\n return HeatmapView;\n}(ChartView);\nexport default HeatmapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport CoordinateSystem from '../../core/CoordinateSystem.js';\nvar HeatmapSeriesModel = /** @class */function (_super) {\n __extends(HeatmapSeriesModel, _super);\n function HeatmapSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = HeatmapSeriesModel.type;\n return _this;\n }\n HeatmapSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n generateCoord: 'value'\n });\n };\n HeatmapSeriesModel.prototype.preventIncremental = function () {\n var coordSysCreator = CoordinateSystem.get(this.get('coordinateSystem'));\n if (coordSysCreator && coordSysCreator.dimensions) {\n return coordSysCreator.dimensions[0] === 'lng' && coordSysCreator.dimensions[1] === 'lat';\n }\n };\n HeatmapSeriesModel.type = 'series.heatmap';\n HeatmapSeriesModel.dependencies = ['grid', 'geo', 'calendar'];\n HeatmapSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Geo coordinate system\n geoIndex: 0,\n blurSize: 30,\n pointSize: 20,\n maxOpacity: 1,\n minOpacity: 0,\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n };\n return HeatmapSeriesModel;\n}(SeriesModel);\nexport default HeatmapSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport HeatmapView from './HeatmapView.js';\nimport HeatmapSeriesModel from './HeatmapSeries.js';\nexport function install(registers) {\n registers.registerChartView(HeatmapView);\n registers.registerSeriesModel(HeatmapSeriesModel);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis } from '../../util/states.js';\nimport { createSymbol, normalizeSymbolOffset } from '../../util/symbol.js';\nimport { parsePercent, isNumeric } from '../../util/number.js';\nimport ChartView from '../../view/Chart.js';\nimport { getDefaultLabel } from '../helper/labelHelper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nvar BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'borderWidth'];\n// index: +isHorizontal\nvar LAYOUT_ATTRS = [{\n xy: 'x',\n wh: 'width',\n index: 0,\n posDesc: ['left', 'right']\n}, {\n xy: 'y',\n wh: 'height',\n index: 1,\n posDesc: ['top', 'bottom']\n}];\nvar pathForLineWidth = new graphic.Circle();\nvar PictorialBarView = /** @class */function (_super) {\n __extends(PictorialBarView, _super);\n function PictorialBarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PictorialBarView.type;\n return _this;\n }\n PictorialBarView.prototype.render = function (seriesModel, ecModel, api) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var coordSysRect = cartesian.master.getRect();\n var opt = {\n ecSize: {\n width: api.getWidth(),\n height: api.getHeight()\n },\n seriesModel: seriesModel,\n coordSys: cartesian,\n coordSysExtent: [[coordSysRect.x, coordSysRect.x + coordSysRect.width], [coordSysRect.y, coordSysRect.y + coordSysRect.height]],\n isHorizontal: isHorizontal,\n valueDim: LAYOUT_ATTRS[+isHorizontal],\n categoryDim: LAYOUT_ATTRS[1 - +isHorizontal]\n };\n data.diff(oldData).add(function (dataIndex) {\n if (!data.hasValue(dataIndex)) {\n return;\n }\n var itemModel = getItemModel(data, dataIndex);\n var symbolMeta = getSymbolMeta(data, dataIndex, itemModel, opt);\n var bar = createBar(data, opt, symbolMeta);\n data.setItemGraphicEl(dataIndex, bar);\n group.add(bar);\n updateCommon(bar, opt, symbolMeta);\n }).update(function (newIndex, oldIndex) {\n var bar = oldData.getItemGraphicEl(oldIndex);\n if (!data.hasValue(newIndex)) {\n group.remove(bar);\n return;\n }\n var itemModel = getItemModel(data, newIndex);\n var symbolMeta = getSymbolMeta(data, newIndex, itemModel, opt);\n var pictorialShapeStr = getShapeStr(data, symbolMeta);\n if (bar && pictorialShapeStr !== bar.__pictorialShapeStr) {\n group.remove(bar);\n data.setItemGraphicEl(newIndex, null);\n bar = null;\n }\n if (bar) {\n updateBar(bar, opt, symbolMeta);\n } else {\n bar = createBar(data, opt, symbolMeta, true);\n }\n data.setItemGraphicEl(newIndex, bar);\n bar.__pictorialSymbolMeta = symbolMeta;\n // Add back\n group.add(bar);\n updateCommon(bar, opt, symbolMeta);\n }).remove(function (dataIndex) {\n var bar = oldData.getItemGraphicEl(dataIndex);\n bar && removeBar(oldData, dataIndex, bar.__pictorialSymbolMeta.animationModel, bar);\n }).execute();\n // Do clipping\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n this._data = data;\n return this.group;\n };\n PictorialBarView.prototype.remove = function (ecModel, api) {\n var group = this.group;\n var data = this._data;\n if (ecModel.get('animation')) {\n if (data) {\n data.eachItemGraphicEl(function (bar) {\n removeBar(data, getECData(bar).dataIndex, ecModel, bar);\n });\n }\n } else {\n group.removeAll();\n }\n };\n PictorialBarView.type = 'pictorialBar';\n return PictorialBarView;\n}(ChartView);\n// Set or calculate default value about symbol, and calculate layout info.\nfunction getSymbolMeta(data, dataIndex, itemModel, opt) {\n var layout = data.getItemLayout(dataIndex);\n var symbolRepeat = itemModel.get('symbolRepeat');\n var symbolClip = itemModel.get('symbolClip');\n var symbolPosition = itemModel.get('symbolPosition') || 'start';\n var symbolRotate = itemModel.get('symbolRotate');\n var rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n var symbolPatternSize = itemModel.get('symbolPatternSize') || 2;\n var isAnimationEnabled = itemModel.isAnimationEnabled();\n var symbolMeta = {\n dataIndex: dataIndex,\n layout: layout,\n itemModel: itemModel,\n symbolType: data.getItemVisual(dataIndex, 'symbol') || 'circle',\n style: data.getItemVisual(dataIndex, 'style'),\n symbolClip: symbolClip,\n symbolRepeat: symbolRepeat,\n symbolRepeatDirection: itemModel.get('symbolRepeatDirection'),\n symbolPatternSize: symbolPatternSize,\n rotation: rotation,\n animationModel: isAnimationEnabled ? itemModel : null,\n hoverScale: isAnimationEnabled && itemModel.get(['emphasis', 'scale']),\n z2: itemModel.getShallow('z', true) || 0\n };\n prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta);\n prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, symbolMeta.boundingLength, symbolMeta.pxSign, symbolPatternSize, opt, symbolMeta);\n prepareLineWidth(itemModel, symbolMeta.symbolScale, rotation, opt, symbolMeta);\n var symbolSize = symbolMeta.symbolSize;\n var symbolOffset = normalizeSymbolOffset(itemModel.get('symbolOffset'), symbolSize);\n prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, symbolMeta.valueLineWidth, symbolMeta.boundingLength, symbolMeta.repeatCutLength, opt, symbolMeta);\n return symbolMeta;\n}\n// bar length can be negative.\nfunction prepareBarLength(itemModel, symbolRepeat, layout, opt, outputSymbolMeta) {\n var valueDim = opt.valueDim;\n var symbolBoundingData = itemModel.get('symbolBoundingData');\n var valueAxis = opt.coordSys.getOtherAxis(opt.coordSys.getBaseAxis());\n var zeroPx = valueAxis.toGlobalCoord(valueAxis.dataToCoord(0));\n var pxSignIdx = 1 - +(layout[valueDim.wh] <= 0);\n var boundingLength;\n if (zrUtil.isArray(symbolBoundingData)) {\n var symbolBoundingExtent = [convertToCoordOnAxis(valueAxis, symbolBoundingData[0]) - zeroPx, convertToCoordOnAxis(valueAxis, symbolBoundingData[1]) - zeroPx];\n symbolBoundingExtent[1] < symbolBoundingExtent[0] && symbolBoundingExtent.reverse();\n boundingLength = symbolBoundingExtent[pxSignIdx];\n } else if (symbolBoundingData != null) {\n boundingLength = convertToCoordOnAxis(valueAxis, symbolBoundingData) - zeroPx;\n } else if (symbolRepeat) {\n boundingLength = opt.coordSysExtent[valueDim.index][pxSignIdx] - zeroPx;\n } else {\n boundingLength = layout[valueDim.wh];\n }\n outputSymbolMeta.boundingLength = boundingLength;\n if (symbolRepeat) {\n outputSymbolMeta.repeatCutLength = layout[valueDim.wh];\n }\n // if 'pxSign' means sign of pixel, it can't be zero, or symbolScale will be zero\n // and when borderWidth be settled, the actual linewidth will be NaN\n outputSymbolMeta.pxSign = boundingLength > 0 ? 1 : -1;\n}\nfunction convertToCoordOnAxis(axis, value) {\n return axis.toGlobalCoord(axis.dataToCoord(axis.scale.parse(value)));\n}\n// Support ['100%', '100%']\nfunction prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, boundingLength, pxSign, symbolPatternSize, opt, outputSymbolMeta) {\n var valueDim = opt.valueDim;\n var categoryDim = opt.categoryDim;\n var categorySize = Math.abs(layout[categoryDim.wh]);\n var symbolSize = data.getItemVisual(dataIndex, 'symbolSize');\n var parsedSymbolSize;\n if (zrUtil.isArray(symbolSize)) {\n parsedSymbolSize = symbolSize.slice();\n } else {\n if (symbolSize == null) {\n // will parse to number below\n parsedSymbolSize = ['100%', '100%'];\n } else {\n parsedSymbolSize = [symbolSize, symbolSize];\n }\n }\n // Note: percentage symbolSize (like '100%') do not consider lineWidth, because it is\n // to complicated to calculate real percent value if considering scaled lineWidth.\n // So the actual size will bigger than layout size if lineWidth is bigger than zero,\n // which can be tolerated in pictorial chart.\n parsedSymbolSize[categoryDim.index] = parsePercent(parsedSymbolSize[categoryDim.index], categorySize);\n parsedSymbolSize[valueDim.index] = parsePercent(parsedSymbolSize[valueDim.index], symbolRepeat ? categorySize : Math.abs(boundingLength));\n outputSymbolMeta.symbolSize = parsedSymbolSize;\n // If x or y is less than zero, show reversed shape.\n var symbolScale = outputSymbolMeta.symbolScale = [parsedSymbolSize[0] / symbolPatternSize, parsedSymbolSize[1] / symbolPatternSize];\n // Follow convention, 'right' and 'top' is the normal scale.\n symbolScale[valueDim.index] *= (opt.isHorizontal ? -1 : 1) * pxSign;\n}\nfunction prepareLineWidth(itemModel, symbolScale, rotation, opt, outputSymbolMeta) {\n // In symbols are drawn with scale, so do not need to care about the case that width\n // or height are too small. But symbol use strokeNoScale, where acture lineWidth should\n // be calculated.\n var valueLineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0;\n if (valueLineWidth) {\n pathForLineWidth.attr({\n scaleX: symbolScale[0],\n scaleY: symbolScale[1],\n rotation: rotation\n });\n pathForLineWidth.updateTransform();\n valueLineWidth /= pathForLineWidth.getLineScale();\n valueLineWidth *= symbolScale[opt.valueDim.index];\n }\n outputSymbolMeta.valueLineWidth = valueLineWidth || 0;\n}\nfunction prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, valueLineWidth, boundingLength, repeatCutLength, opt, outputSymbolMeta) {\n var categoryDim = opt.categoryDim;\n var valueDim = opt.valueDim;\n var pxSign = outputSymbolMeta.pxSign;\n var unitLength = Math.max(symbolSize[valueDim.index] + valueLineWidth, 0);\n var pathLen = unitLength;\n // Note: rotation will not effect the layout of symbols, because user may\n // want symbols to rotate on its center, which should not be translated\n // when rotating.\n if (symbolRepeat) {\n var absBoundingLength = Math.abs(boundingLength);\n var symbolMargin = zrUtil.retrieve(itemModel.get('symbolMargin'), '15%') + '';\n var hasEndGap = false;\n if (symbolMargin.lastIndexOf('!') === symbolMargin.length - 1) {\n hasEndGap = true;\n symbolMargin = symbolMargin.slice(0, symbolMargin.length - 1);\n }\n var symbolMarginNumeric = parsePercent(symbolMargin, symbolSize[valueDim.index]);\n var uLenWithMargin = Math.max(unitLength + symbolMarginNumeric * 2, 0);\n // When symbol margin is less than 0, margin at both ends will be subtracted\n // to ensure that all of the symbols will not be overflow the given area.\n var endFix = hasEndGap ? 0 : symbolMarginNumeric * 2;\n // Both final repeatTimes and final symbolMarginNumeric area calculated based on\n // boundingLength.\n var repeatSpecified = isNumeric(symbolRepeat);\n var repeatTimes = repeatSpecified ? symbolRepeat : toIntTimes((absBoundingLength + endFix) / uLenWithMargin);\n // Adjust calculate margin, to ensure each symbol is displayed\n // entirely in the given layout area.\n var mDiff = absBoundingLength - repeatTimes * unitLength;\n symbolMarginNumeric = mDiff / 2 / (hasEndGap ? repeatTimes : Math.max(repeatTimes - 1, 1));\n uLenWithMargin = unitLength + symbolMarginNumeric * 2;\n endFix = hasEndGap ? 0 : symbolMarginNumeric * 2;\n // Update repeatTimes when not all symbol will be shown.\n if (!repeatSpecified && symbolRepeat !== 'fixed') {\n repeatTimes = repeatCutLength ? toIntTimes((Math.abs(repeatCutLength) + endFix) / uLenWithMargin) : 0;\n }\n pathLen = repeatTimes * uLenWithMargin - endFix;\n outputSymbolMeta.repeatTimes = repeatTimes;\n outputSymbolMeta.symbolMargin = symbolMarginNumeric;\n }\n var sizeFix = pxSign * (pathLen / 2);\n var pathPosition = outputSymbolMeta.pathPosition = [];\n pathPosition[categoryDim.index] = layout[categoryDim.wh] / 2;\n pathPosition[valueDim.index] = symbolPosition === 'start' ? sizeFix : symbolPosition === 'end' ? boundingLength - sizeFix : boundingLength / 2; // 'center'\n if (symbolOffset) {\n pathPosition[0] += symbolOffset[0];\n pathPosition[1] += symbolOffset[1];\n }\n var bundlePosition = outputSymbolMeta.bundlePosition = [];\n bundlePosition[categoryDim.index] = layout[categoryDim.xy];\n bundlePosition[valueDim.index] = layout[valueDim.xy];\n var barRectShape = outputSymbolMeta.barRectShape = zrUtil.extend({}, layout);\n barRectShape[valueDim.wh] = pxSign * Math.max(Math.abs(layout[valueDim.wh]), Math.abs(pathPosition[valueDim.index] + sizeFix));\n barRectShape[categoryDim.wh] = layout[categoryDim.wh];\n var clipShape = outputSymbolMeta.clipShape = {};\n // Consider that symbol may be overflow layout rect.\n clipShape[categoryDim.xy] = -layout[categoryDim.xy];\n clipShape[categoryDim.wh] = opt.ecSize[categoryDim.wh];\n clipShape[valueDim.xy] = 0;\n clipShape[valueDim.wh] = layout[valueDim.wh];\n}\nfunction createPath(symbolMeta) {\n var symbolPatternSize = symbolMeta.symbolPatternSize;\n var path = createSymbol(\n // Consider texture img, make a big size.\n symbolMeta.symbolType, -symbolPatternSize / 2, -symbolPatternSize / 2, symbolPatternSize, symbolPatternSize);\n path.attr({\n culling: true\n });\n path.type !== 'image' && path.setStyle({\n strokeNoScale: true\n });\n return path;\n}\nfunction createOrUpdateRepeatSymbols(bar, opt, symbolMeta, isUpdate) {\n var bundle = bar.__pictorialBundle;\n var symbolSize = symbolMeta.symbolSize;\n var valueLineWidth = symbolMeta.valueLineWidth;\n var pathPosition = symbolMeta.pathPosition;\n var valueDim = opt.valueDim;\n var repeatTimes = symbolMeta.repeatTimes || 0;\n var index = 0;\n var unit = symbolSize[opt.valueDim.index] + valueLineWidth + symbolMeta.symbolMargin * 2;\n eachPath(bar, function (path) {\n path.__pictorialAnimationIndex = index;\n path.__pictorialRepeatTimes = repeatTimes;\n if (index < repeatTimes) {\n updateAttr(path, null, makeTarget(index), symbolMeta, isUpdate);\n } else {\n updateAttr(path, null, {\n scaleX: 0,\n scaleY: 0\n }, symbolMeta, isUpdate, function () {\n bundle.remove(path);\n });\n }\n // updateHoverAnimation(path, symbolMeta);\n index++;\n });\n for (; index < repeatTimes; index++) {\n var path = createPath(symbolMeta);\n path.__pictorialAnimationIndex = index;\n path.__pictorialRepeatTimes = repeatTimes;\n bundle.add(path);\n var target = makeTarget(index);\n updateAttr(path, {\n x: target.x,\n y: target.y,\n scaleX: 0,\n scaleY: 0\n }, {\n scaleX: target.scaleX,\n scaleY: target.scaleY,\n rotation: target.rotation\n }, symbolMeta, isUpdate);\n }\n function makeTarget(index) {\n var position = pathPosition.slice();\n // (start && pxSign > 0) || (end && pxSign < 0): i = repeatTimes - index\n // Otherwise: i = index;\n var pxSign = symbolMeta.pxSign;\n var i = index;\n if (symbolMeta.symbolRepeatDirection === 'start' ? pxSign > 0 : pxSign < 0) {\n i = repeatTimes - 1 - index;\n }\n position[valueDim.index] = unit * (i - repeatTimes / 2 + 0.5) + pathPosition[valueDim.index];\n return {\n x: position[0],\n y: position[1],\n scaleX: symbolMeta.symbolScale[0],\n scaleY: symbolMeta.symbolScale[1],\n rotation: symbolMeta.rotation\n };\n }\n}\nfunction createOrUpdateSingleSymbol(bar, opt, symbolMeta, isUpdate) {\n var bundle = bar.__pictorialBundle;\n var mainPath = bar.__pictorialMainPath;\n if (!mainPath) {\n mainPath = bar.__pictorialMainPath = createPath(symbolMeta);\n bundle.add(mainPath);\n updateAttr(mainPath, {\n x: symbolMeta.pathPosition[0],\n y: symbolMeta.pathPosition[1],\n scaleX: 0,\n scaleY: 0,\n rotation: symbolMeta.rotation\n }, {\n scaleX: symbolMeta.symbolScale[0],\n scaleY: symbolMeta.symbolScale[1]\n }, symbolMeta, isUpdate);\n } else {\n updateAttr(mainPath, null, {\n x: symbolMeta.pathPosition[0],\n y: symbolMeta.pathPosition[1],\n scaleX: symbolMeta.symbolScale[0],\n scaleY: symbolMeta.symbolScale[1],\n rotation: symbolMeta.rotation\n }, symbolMeta, isUpdate);\n }\n}\n// bar rect is used for label.\nfunction createOrUpdateBarRect(bar, symbolMeta, isUpdate) {\n var rectShape = zrUtil.extend({}, symbolMeta.barRectShape);\n var barRect = bar.__pictorialBarRect;\n if (!barRect) {\n barRect = bar.__pictorialBarRect = new graphic.Rect({\n z2: 2,\n shape: rectShape,\n silent: true,\n style: {\n stroke: 'transparent',\n fill: 'transparent',\n lineWidth: 0\n }\n });\n barRect.disableMorphing = true;\n bar.add(barRect);\n } else {\n updateAttr(barRect, null, {\n shape: rectShape\n }, symbolMeta, isUpdate);\n }\n}\nfunction createOrUpdateClip(bar, opt, symbolMeta, isUpdate) {\n // If not clip, symbol will be remove and rebuilt.\n if (symbolMeta.symbolClip) {\n var clipPath = bar.__pictorialClipPath;\n var clipShape = zrUtil.extend({}, symbolMeta.clipShape);\n var valueDim = opt.valueDim;\n var animationModel = symbolMeta.animationModel;\n var dataIndex = symbolMeta.dataIndex;\n if (clipPath) {\n graphic.updateProps(clipPath, {\n shape: clipShape\n }, animationModel, dataIndex);\n } else {\n clipShape[valueDim.wh] = 0;\n clipPath = new graphic.Rect({\n shape: clipShape\n });\n bar.__pictorialBundle.setClipPath(clipPath);\n bar.__pictorialClipPath = clipPath;\n var target = {};\n target[valueDim.wh] = symbolMeta.clipShape[valueDim.wh];\n graphic[isUpdate ? 'updateProps' : 'initProps'](clipPath, {\n shape: target\n }, animationModel, dataIndex);\n }\n }\n}\nfunction getItemModel(data, dataIndex) {\n var itemModel = data.getItemModel(dataIndex);\n itemModel.getAnimationDelayParams = getAnimationDelayParams;\n itemModel.isAnimationEnabled = isAnimationEnabled;\n return itemModel;\n}\nfunction getAnimationDelayParams(path) {\n // The order is the same as the z-order, see `symbolRepeatDiretion`.\n return {\n index: path.__pictorialAnimationIndex,\n count: path.__pictorialRepeatTimes\n };\n}\nfunction isAnimationEnabled() {\n // `animation` prop can be set on itemModel in pictorial bar chart.\n return this.parentModel.isAnimationEnabled() && !!this.getShallow('animation');\n}\nfunction createBar(data, opt, symbolMeta, isUpdate) {\n // bar is the main element for each data.\n var bar = new graphic.Group();\n // bundle is used for location and clip.\n var bundle = new graphic.Group();\n bar.add(bundle);\n bar.__pictorialBundle = bundle;\n bundle.x = symbolMeta.bundlePosition[0];\n bundle.y = symbolMeta.bundlePosition[1];\n if (symbolMeta.symbolRepeat) {\n createOrUpdateRepeatSymbols(bar, opt, symbolMeta);\n } else {\n createOrUpdateSingleSymbol(bar, opt, symbolMeta);\n }\n createOrUpdateBarRect(bar, symbolMeta, isUpdate);\n createOrUpdateClip(bar, opt, symbolMeta, isUpdate);\n bar.__pictorialShapeStr = getShapeStr(data, symbolMeta);\n bar.__pictorialSymbolMeta = symbolMeta;\n return bar;\n}\nfunction updateBar(bar, opt, symbolMeta) {\n var animationModel = symbolMeta.animationModel;\n var dataIndex = symbolMeta.dataIndex;\n var bundle = bar.__pictorialBundle;\n graphic.updateProps(bundle, {\n x: symbolMeta.bundlePosition[0],\n y: symbolMeta.bundlePosition[1]\n }, animationModel, dataIndex);\n if (symbolMeta.symbolRepeat) {\n createOrUpdateRepeatSymbols(bar, opt, symbolMeta, true);\n } else {\n createOrUpdateSingleSymbol(bar, opt, symbolMeta, true);\n }\n createOrUpdateBarRect(bar, symbolMeta, true);\n createOrUpdateClip(bar, opt, symbolMeta, true);\n}\nfunction removeBar(data, dataIndex, animationModel, bar) {\n // Not show text when animating\n var labelRect = bar.__pictorialBarRect;\n labelRect && labelRect.removeTextContent();\n var paths = [];\n eachPath(bar, function (path) {\n paths.push(path);\n });\n bar.__pictorialMainPath && paths.push(bar.__pictorialMainPath);\n // I do not find proper remove animation for clip yet.\n bar.__pictorialClipPath && (animationModel = null);\n zrUtil.each(paths, function (path) {\n graphic.removeElement(path, {\n scaleX: 0,\n scaleY: 0\n }, animationModel, dataIndex, function () {\n bar.parent && bar.parent.remove(bar);\n });\n });\n data.setItemGraphicEl(dataIndex, null);\n}\nfunction getShapeStr(data, symbolMeta) {\n return [data.getItemVisual(symbolMeta.dataIndex, 'symbol') || 'none', !!symbolMeta.symbolRepeat, !!symbolMeta.symbolClip].join(':');\n}\nfunction eachPath(bar, cb, context) {\n // Do not use Group#eachChild, because it do not support remove.\n zrUtil.each(bar.__pictorialBundle.children(), function (el) {\n el !== bar.__pictorialBarRect && cb.call(context, el);\n });\n}\nfunction updateAttr(el, immediateAttrs, animationAttrs, symbolMeta, isUpdate, cb) {\n immediateAttrs && el.attr(immediateAttrs);\n // when symbolCip used, only clip path has init animation, otherwise it would be weird effect.\n if (symbolMeta.symbolClip && !isUpdate) {\n animationAttrs && el.attr(animationAttrs);\n } else {\n animationAttrs && graphic[isUpdate ? 'updateProps' : 'initProps'](el, animationAttrs, symbolMeta.animationModel, symbolMeta.dataIndex, cb);\n }\n}\nfunction updateCommon(bar, opt, symbolMeta) {\n var dataIndex = symbolMeta.dataIndex;\n var itemModel = symbolMeta.itemModel;\n // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n var emphasisModel = itemModel.getModel('emphasis');\n var emphasisStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n var blurStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n var selectStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n var cursorStyle = itemModel.getShallow('cursor');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var hoverScale = emphasisModel.get('scale');\n eachPath(bar, function (path) {\n if (path instanceof ZRImage) {\n var pathStyle = path.style;\n path.useStyle(zrUtil.extend({\n // TODO other properties like dx, dy ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolMeta.style));\n } else {\n path.useStyle(symbolMeta.style);\n }\n var emphasisState = path.ensureState('emphasis');\n emphasisState.style = emphasisStyle;\n if (hoverScale) {\n // NOTE: Must after scale is set after updateAttr\n emphasisState.scaleX = path.scaleX * 1.1;\n emphasisState.scaleY = path.scaleY * 1.1;\n }\n path.ensureState('blur').style = blurStyle;\n path.ensureState('select').style = selectStyle;\n cursorStyle && (path.cursor = cursorStyle);\n path.z2 = symbolMeta.z2;\n });\n var barPositionOutside = opt.valueDim.posDesc[+(symbolMeta.boundingLength > 0)];\n var barRect = bar.__pictorialBarRect;\n barRect.ignoreClip = true;\n setLabelStyle(barRect, getLabelStatesModels(itemModel), {\n labelFetcher: opt.seriesModel,\n labelDataIndex: dataIndex,\n defaultText: getDefaultLabel(opt.seriesModel.getData(), dataIndex),\n inheritColor: symbolMeta.style.fill,\n defaultOpacity: symbolMeta.style.opacity,\n defaultOutsidePosition: barPositionOutside\n });\n toggleHoverEmphasis(bar, focus, blurScope, emphasisModel.get('disabled'));\n}\nfunction toIntTimes(times) {\n var roundedTimes = Math.round(times);\n // Escapse accurate error\n return Math.abs(times - roundedTimes) < 1e-4 ? roundedTimes : Math.ceil(times);\n}\nexport default PictorialBarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseBarSeriesModel from './BaseBarSeries.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar PictorialBarSeriesModel = /** @class */function (_super) {\n __extends(PictorialBarSeriesModel, _super);\n function PictorialBarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PictorialBarSeriesModel.type;\n _this.hasSymbolVisual = true;\n _this.defaultSymbol = 'roundRect';\n return _this;\n }\n PictorialBarSeriesModel.prototype.getInitialData = function (option) {\n // Disable stack.\n option.stack = null;\n return _super.prototype.getInitialData.apply(this, arguments);\n };\n PictorialBarSeriesModel.type = 'series.pictorialBar';\n PictorialBarSeriesModel.dependencies = ['grid'];\n PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeriesModel.defaultOption, {\n symbol: 'circle',\n symbolSize: null,\n symbolRotate: null,\n symbolPosition: null,\n symbolOffset: null,\n symbolMargin: null,\n symbolRepeat: false,\n symbolRepeatDirection: 'end',\n symbolClip: false,\n symbolBoundingData: null,\n symbolPatternSize: 400,\n barGap: '-100%',\n // Pictorial bar do not clip by default because in many cases\n // xAxis and yAxis are not displayed and it's expected not to clip\n clip: false,\n // z can be set in data item, which is z2 actually.\n // Disable progressive\n progressive: 0,\n emphasis: {\n // By default pictorialBar do not hover scale. Hover scale is not suitable\n // for the case that both has foreground and background.\n scale: false\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n });\n return PictorialBarSeriesModel;\n}(BaseBarSeriesModel);\nexport default PictorialBarSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport PictorialBarView from './PictorialBarView.js';\nimport PictorialBarSeriesModel from './PictorialBarSeries.js';\nimport { createProgressiveLayout, layout } from '../../layout/barGrid.js';\nimport { curry } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n registers.registerChartView(PictorialBarView);\n registers.registerSeriesModel(PictorialBarSeriesModel);\n registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout, 'pictorialBar'));\n // Do layout after other overall layout, which can prepare some information.\n registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('pictorialBar'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { ECPolygon } from '../line/poly.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { bind } from 'zrender/lib/core/util.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport ChartView from '../../view/Chart.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar ThemeRiverView = /** @class */function (_super) {\n __extends(ThemeRiverView, _super);\n function ThemeRiverView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ThemeRiverView.type;\n _this._layers = [];\n return _this;\n }\n ThemeRiverView.prototype.render = function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var self = this;\n var group = this.group;\n var layersSeries = seriesModel.getLayerSeries();\n var layoutInfo = data.getLayout('layoutInfo');\n var rect = layoutInfo.rect;\n var boundaryGap = layoutInfo.boundaryGap;\n group.x = 0;\n group.y = rect.y + boundaryGap[0];\n function keyGetter(item) {\n return item.name;\n }\n var dataDiffer = new DataDiffer(this._layersSeries || [], layersSeries, keyGetter, keyGetter);\n var newLayersGroups = [];\n dataDiffer.add(bind(process, this, 'add')).update(bind(process, this, 'update')).remove(bind(process, this, 'remove')).execute();\n function process(status, idx, oldIdx) {\n var oldLayersGroups = self._layers;\n if (status === 'remove') {\n group.remove(oldLayersGroups[idx]);\n return;\n }\n var points0 = [];\n var points1 = [];\n var style;\n var indices = layersSeries[idx].indices;\n var j = 0;\n for (; j < indices.length; j++) {\n var layout = data.getItemLayout(indices[j]);\n var x = layout.x;\n var y0 = layout.y0;\n var y = layout.y;\n points0.push(x, y0);\n points1.push(x, y0 + y);\n style = data.getItemVisual(indices[j], 'style');\n }\n var polygon;\n var textLayout = data.getItemLayout(indices[0]);\n var labelModel = seriesModel.getModel('label');\n var margin = labelModel.get('margin');\n var emphasisModel = seriesModel.getModel('emphasis');\n if (status === 'add') {\n var layerGroup = newLayersGroups[idx] = new graphic.Group();\n polygon = new ECPolygon({\n shape: {\n points: points0,\n stackedOnPoints: points1,\n smooth: 0.4,\n stackedOnSmooth: 0.4,\n smoothConstraint: false\n },\n z2: 0\n });\n layerGroup.add(polygon);\n group.add(layerGroup);\n if (seriesModel.isAnimationEnabled()) {\n polygon.setClipPath(createGridClipShape(polygon.getBoundingRect(), seriesModel, function () {\n polygon.removeClipPath();\n }));\n }\n } else {\n var layerGroup = oldLayersGroups[oldIdx];\n polygon = layerGroup.childAt(0);\n group.add(layerGroup);\n newLayersGroups[idx] = layerGroup;\n graphic.updateProps(polygon, {\n shape: {\n points: points0,\n stackedOnPoints: points1\n }\n }, seriesModel);\n saveOldStyle(polygon);\n }\n setLabelStyle(polygon, getLabelStatesModels(seriesModel), {\n labelDataIndex: indices[j - 1],\n defaultText: data.getName(indices[j - 1]),\n inheritColor: style.fill\n }, {\n normal: {\n verticalAlign: 'middle'\n // align: 'right'\n }\n });\n\n polygon.setTextConfig({\n position: null,\n local: true\n });\n var labelEl = polygon.getTextContent();\n // TODO More label position options.\n if (labelEl) {\n labelEl.x = textLayout.x - margin;\n labelEl.y = textLayout.y0 + textLayout.y / 2;\n }\n polygon.useStyle(style);\n data.setItemGraphicEl(idx, polygon);\n setStatesStylesFromModel(polygon, seriesModel);\n toggleHoverEmphasis(polygon, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n }\n this._layersSeries = layersSeries;\n this._layers = newLayersGroups;\n };\n ThemeRiverView.type = 'themeRiver';\n return ThemeRiverView;\n}(ChartView);\n;\n// add animation to the view\nfunction createGridClipShape(rect, seriesModel, cb) {\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x - 10,\n y: rect.y - 10,\n width: 0,\n height: rect.height + 20\n }\n });\n graphic.initProps(rectEl, {\n shape: {\n x: rect.x - 50,\n width: rect.width + 100,\n height: rect.height + 20\n }\n }, seriesModel, cb);\n return rectEl;\n}\nexport default ThemeRiverView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series.js';\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport { getDimensionTypeByAxis } from '../../data/helper/dimensionHelper.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { groupData, SINGLE_REFERRING } from '../../util/model.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup.js';\nvar DATA_NAME_INDEX = 2;\nvar ThemeRiverSeriesModel = /** @class */function (_super) {\n __extends(ThemeRiverSeriesModel, _super);\n function ThemeRiverSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ThemeRiverSeriesModel.type;\n return _this;\n }\n /**\n * @override\n */\n ThemeRiverSeriesModel.prototype.init = function (option) {\n // eslint-disable-next-line\n _super.prototype.init.apply(this, arguments);\n // Put this function here is for the sake of consistency of code style.\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n };\n /**\n * If there is no value of a certain point in the time for some event,set it value to 0.\n *\n * @param {Array} data initial data in the option\n * @return {Array}\n */\n ThemeRiverSeriesModel.prototype.fixData = function (data) {\n var rawDataLength = data.length;\n /**\n * Make sure every layer data get the same keys.\n * The value index tells which layer has visited.\n * {\n * 2014/01/01: -1\n * }\n */\n var timeValueKeys = {};\n // grouped data by name\n var groupResult = groupData(data, function (item) {\n if (!timeValueKeys.hasOwnProperty(item[0] + '')) {\n timeValueKeys[item[0] + ''] = -1;\n }\n return item[2];\n });\n var layerData = [];\n groupResult.buckets.each(function (items, key) {\n layerData.push({\n name: key,\n dataList: items\n });\n });\n var layerNum = layerData.length;\n for (var k = 0; k < layerNum; ++k) {\n var name_1 = layerData[k].name;\n for (var j = 0; j < layerData[k].dataList.length; ++j) {\n var timeValue = layerData[k].dataList[j][0] + '';\n timeValueKeys[timeValue] = k;\n }\n for (var timeValue in timeValueKeys) {\n if (timeValueKeys.hasOwnProperty(timeValue) && timeValueKeys[timeValue] !== k) {\n timeValueKeys[timeValue] = k;\n data[rawDataLength] = [timeValue, 0, name_1];\n rawDataLength++;\n }\n }\n }\n return data;\n };\n /**\n * @override\n * @param option the initial option that user gave\n * @param ecModel the model object for themeRiver option\n */\n ThemeRiverSeriesModel.prototype.getInitialData = function (option, ecModel) {\n var singleAxisModel = this.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0];\n var axisType = singleAxisModel.get('type');\n // filter the data item with the value of label is undefined\n var filterData = zrUtil.filter(option.data, function (dataItem) {\n return dataItem[2] !== undefined;\n });\n // ??? TODO design a stage to transfer data for themeRiver and lines?\n var data = this.fixData(filterData || []);\n var nameList = [];\n var nameMap = this.nameMap = zrUtil.createHashMap();\n var count = 0;\n for (var i = 0; i < data.length; ++i) {\n nameList.push(data[i][DATA_NAME_INDEX]);\n if (!nameMap.get(data[i][DATA_NAME_INDEX])) {\n nameMap.set(data[i][DATA_NAME_INDEX], count);\n count++;\n }\n }\n var dimensions = prepareSeriesDataSchema(data, {\n coordDimensions: ['single'],\n dimensionsDefine: [{\n name: 'time',\n type: getDimensionTypeByAxis(axisType)\n }, {\n name: 'value',\n type: 'float'\n }, {\n name: 'name',\n type: 'ordinal'\n }],\n encodeDefine: {\n single: 0,\n value: 1,\n itemName: 2\n }\n }).dimensions;\n var list = new SeriesData(dimensions, this);\n list.initData(data);\n return list;\n };\n /**\n * The raw data is divided into multiple layers and each layer\n * has same name.\n */\n ThemeRiverSeriesModel.prototype.getLayerSeries = function () {\n var data = this.getData();\n var lenCount = data.count();\n var indexArr = [];\n for (var i = 0; i < lenCount; ++i) {\n indexArr[i] = i;\n }\n var timeDim = data.mapDimension('single');\n // data group by name\n var groupResult = groupData(indexArr, function (index) {\n return data.get('name', index);\n });\n var layerSeries = [];\n groupResult.buckets.each(function (items, key) {\n items.sort(function (index1, index2) {\n return data.get(timeDim, index1) - data.get(timeDim, index2);\n });\n layerSeries.push({\n name: key,\n indices: items\n });\n });\n return layerSeries;\n };\n /**\n * Get data indices for show tooltip content\n */\n ThemeRiverSeriesModel.prototype.getAxisTooltipData = function (dim, value, baseAxis) {\n if (!zrUtil.isArray(dim)) {\n dim = dim ? [dim] : [];\n }\n var data = this.getData();\n var layerSeries = this.getLayerSeries();\n var indices = [];\n var layerNum = layerSeries.length;\n var nestestValue;\n for (var i = 0; i < layerNum; ++i) {\n var minDist = Number.MAX_VALUE;\n var nearestIdx = -1;\n var pointNum = layerSeries[i].indices.length;\n for (var j = 0; j < pointNum; ++j) {\n var theValue = data.get(dim[0], layerSeries[i].indices[j]);\n var dist = Math.abs(theValue - value);\n if (dist <= minDist) {\n nestestValue = theValue;\n minDist = dist;\n nearestIdx = layerSeries[i].indices[j];\n }\n }\n indices.push(nearestIdx);\n }\n return {\n dataIndices: indices,\n nestestValue: nestestValue\n };\n };\n ThemeRiverSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var name = data.getName(dataIndex);\n var value = data.get(data.mapDimension('value'), dataIndex);\n return createTooltipMarkup('nameValue', {\n name: name,\n value: value\n });\n };\n ThemeRiverSeriesModel.type = 'series.themeRiver';\n ThemeRiverSeriesModel.dependencies = ['singleAxis'];\n ThemeRiverSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n colorBy: 'data',\n coordinateSystem: 'singleAxis',\n // gap in axis's orthogonal orientation\n boundaryGap: ['10%', '10%'],\n // legendHoverLink: true,\n singleAxisIndex: 0,\n animationEasing: 'linear',\n label: {\n margin: 4,\n show: true,\n position: 'left',\n fontSize: 11\n },\n emphasis: {\n label: {\n show: true\n }\n }\n };\n return ThemeRiverSeriesModel;\n}(SeriesModel);\nexport default ThemeRiverSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as numberUtil from '../../util/number.js';\nexport default function themeRiverLayout(ecModel, api) {\n ecModel.eachSeriesByType('themeRiver', function (seriesModel) {\n var data = seriesModel.getData();\n var single = seriesModel.coordinateSystem;\n var layoutInfo = {};\n // use the axis boundingRect for view\n var rect = single.getRect();\n layoutInfo.rect = rect;\n var boundaryGap = seriesModel.get('boundaryGap');\n var axis = single.getAxis();\n layoutInfo.boundaryGap = boundaryGap;\n if (axis.orient === 'horizontal') {\n boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], rect.height);\n boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], rect.height);\n var height = rect.height - boundaryGap[0] - boundaryGap[1];\n doThemeRiverLayout(data, seriesModel, height);\n } else {\n boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], rect.width);\n boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], rect.width);\n var width = rect.width - boundaryGap[0] - boundaryGap[1];\n doThemeRiverLayout(data, seriesModel, width);\n }\n data.setLayout('layoutInfo', layoutInfo);\n });\n}\n/**\n * The layout information about themeriver\n *\n * @param data data in the series\n * @param seriesModel the model object of themeRiver series\n * @param height value used to compute every series height\n */\nfunction doThemeRiverLayout(data, seriesModel, height) {\n if (!data.count()) {\n return;\n }\n var coordSys = seriesModel.coordinateSystem;\n // the data in each layer are organized into a series.\n var layerSeries = seriesModel.getLayerSeries();\n // the points in each layer.\n var timeDim = data.mapDimension('single');\n var valueDim = data.mapDimension('value');\n var layerPoints = zrUtil.map(layerSeries, function (singleLayer) {\n return zrUtil.map(singleLayer.indices, function (idx) {\n var pt = coordSys.dataToPoint(data.get(timeDim, idx));\n pt[1] = data.get(valueDim, idx);\n return pt;\n });\n });\n var base = computeBaseline(layerPoints);\n var baseLine = base.y0;\n var ky = height / base.max;\n // set layout information for each item.\n var n = layerSeries.length;\n var m = layerSeries[0].indices.length;\n var baseY0;\n for (var j = 0; j < m; ++j) {\n baseY0 = baseLine[j] * ky;\n data.setItemLayout(layerSeries[0].indices[j], {\n layerIndex: 0,\n x: layerPoints[0][j][0],\n y0: baseY0,\n y: layerPoints[0][j][1] * ky\n });\n for (var i = 1; i < n; ++i) {\n baseY0 += layerPoints[i - 1][j][1] * ky;\n data.setItemLayout(layerSeries[i].indices[j], {\n layerIndex: i,\n x: layerPoints[i][j][0],\n y0: baseY0,\n y: layerPoints[i][j][1] * ky\n });\n }\n }\n}\n/**\n * Compute the baseLine of the rawdata\n * Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics\n *\n * @param data the points in each layer\n */\nfunction computeBaseline(data) {\n var layerNum = data.length;\n var pointNum = data[0].length;\n var sums = [];\n var y0 = [];\n var max = 0;\n for (var i = 0; i < pointNum; ++i) {\n var temp = 0;\n for (var j = 0; j < layerNum; ++j) {\n temp += data[j][i][1];\n }\n if (temp > max) {\n max = temp;\n }\n sums.push(temp);\n }\n for (var k = 0; k < pointNum; ++k) {\n y0[k] = (max - sums[k]) / 2;\n }\n max = 0;\n for (var l = 0; l < pointNum; ++l) {\n var sum = sums[l] + y0[l];\n if (sum > max) {\n max = sum;\n }\n }\n return {\n y0: y0,\n max: max\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport ThemeRiverView from './ThemeRiverView.js';\nimport ThemeRiverSeriesModel from './ThemeRiverSeries.js';\nimport themeRiverLayout from './themeRiverLayout.js';\nimport dataFilter from '../../processor/dataFilter.js';\nexport function install(registers) {\n registers.registerChartView(ThemeRiverView);\n registers.registerSeriesModel(ThemeRiverSeriesModel);\n registers.registerLayout(themeRiverLayout);\n registers.registerProcessor(dataFilter('themeRiver'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, SPECIAL_STATES, DISPLAY_STATES } from '../../util/states.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { normalizeRadian } from 'zrender/lib/contain/util.js';\nimport { isRadianAroundZero } from '../../util/number.js';\nvar DEFAULT_SECTOR_Z = 2;\nvar DEFAULT_TEXT_Z = 4;\n/**\n * Sunburstce of Sunburst including Sector, Label, LabelLine\n */\nvar SunburstPiece = /** @class */function (_super) {\n __extends(SunburstPiece, _super);\n function SunburstPiece(node, seriesModel, ecModel, api) {\n var _this = _super.call(this) || this;\n _this.z2 = DEFAULT_SECTOR_Z;\n _this.textConfig = {\n inside: true\n };\n getECData(_this).seriesIndex = seriesModel.seriesIndex;\n var text = new graphic.Text({\n z2: DEFAULT_TEXT_Z,\n silent: node.getModel().get(['label', 'silent'])\n });\n _this.setTextContent(text);\n _this.updateData(true, node, seriesModel, ecModel, api);\n return _this;\n }\n SunburstPiece.prototype.updateData = function (firstCreate, node,\n // state: 'emphasis' | 'normal' | 'highlight' | 'downplay',\n seriesModel, ecModel, api) {\n this.node = node;\n node.piece = this;\n seriesModel = seriesModel || this._seriesModel;\n ecModel = ecModel || this._ecModel;\n var sector = this;\n getECData(sector).dataIndex = node.dataIndex;\n var itemModel = node.getModel();\n var emphasisModel = itemModel.getModel('emphasis');\n var layout = node.getLayout();\n var sectorShape = zrUtil.extend({}, layout);\n sectorShape.label = null;\n var normalStyle = node.getVisual('style');\n normalStyle.lineJoin = 'bevel';\n var decal = node.getVisual('decal');\n if (decal) {\n normalStyle.decal = createOrUpdatePatternFromDecal(decal, api);\n }\n var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true);\n zrUtil.extend(sectorShape, cornerRadius);\n zrUtil.each(SPECIAL_STATES, function (stateName) {\n var state = sector.ensureState(stateName);\n var itemStyleModel = itemModel.getModel([stateName, 'itemStyle']);\n state.style = itemStyleModel.getItemStyle();\n // border radius\n var cornerRadius = getSectorCornerRadius(itemStyleModel, sectorShape);\n if (cornerRadius) {\n state.shape = cornerRadius;\n }\n });\n if (firstCreate) {\n sector.setShape(sectorShape);\n sector.shape.r = layout.r0;\n graphic.initProps(sector, {\n shape: {\n r: layout.r\n }\n }, seriesModel, node.dataIndex);\n } else {\n // Disable animation for gradient since no interpolation method\n // is supported for gradient\n graphic.updateProps(sector, {\n shape: sectorShape\n }, seriesModel);\n saveOldStyle(sector);\n }\n sector.useStyle(normalStyle);\n this._updateLabel(seriesModel);\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && sector.attr('cursor', cursorStyle);\n this._seriesModel = seriesModel || this._seriesModel;\n this._ecModel = ecModel || this._ecModel;\n var focus = emphasisModel.get('focus');\n var focusOrIndices = focus === 'ancestor' ? node.getAncestorsIndices() : focus === 'descendant' ? node.getDescendantIndices() : focus;\n toggleHoverEmphasis(this, focusOrIndices, emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n };\n SunburstPiece.prototype._updateLabel = function (seriesModel) {\n var _this = this;\n var itemModel = this.node.getModel();\n var normalLabelModel = itemModel.getModel('label');\n var layout = this.node.getLayout();\n var angle = layout.endAngle - layout.startAngle;\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n var sector = this;\n var label = sector.getTextContent();\n var dataIndex = this.node.dataIndex;\n var labelMinAngle = normalLabelModel.get('minAngle') / 180 * Math.PI;\n var isNormalShown = normalLabelModel.get('show') && !(labelMinAngle != null && Math.abs(angle) < labelMinAngle);\n label.ignore = !isNormalShown;\n // TODO use setLabelStyle\n zrUtil.each(DISPLAY_STATES, function (stateName) {\n var labelStateModel = stateName === 'normal' ? itemModel.getModel('label') : itemModel.getModel([stateName, 'label']);\n var isNormal = stateName === 'normal';\n var state = isNormal ? label : label.ensureState(stateName);\n var text = seriesModel.getFormattedLabel(dataIndex, stateName);\n if (isNormal) {\n text = text || _this.node.name;\n }\n state.style = createTextStyle(labelStateModel, {}, null, stateName !== 'normal', true);\n if (text) {\n state.style.text = text;\n }\n // Not displaying text when angle is too small\n var isShown = labelStateModel.get('show');\n if (isShown != null && !isNormal) {\n state.ignore = !isShown;\n }\n var labelPosition = getLabelAttr(labelStateModel, 'position');\n var sectorState = isNormal ? sector : sector.states[stateName];\n var labelColor = sectorState.style.fill;\n sectorState.textConfig = {\n outsideFill: labelStateModel.get('color') === 'inherit' ? labelColor : null,\n inside: labelPosition !== 'outside'\n };\n var r;\n var labelPadding = getLabelAttr(labelStateModel, 'distance') || 0;\n var textAlign = getLabelAttr(labelStateModel, 'align');\n var rotateType = getLabelAttr(labelStateModel, 'rotate');\n var flipStartAngle = Math.PI * 0.5;\n var flipEndAngle = Math.PI * 1.5;\n var midAngleNormal = normalizeRadian(rotateType === 'tangential' ? Math.PI / 2 - midAngle : midAngle);\n // For text that is up-side down, rotate 180 degrees to make sure\n // it's readable\n var needsFlip = midAngleNormal > flipStartAngle && !isRadianAroundZero(midAngleNormal - flipStartAngle) && midAngleNormal < flipEndAngle;\n if (labelPosition === 'outside') {\n r = layout.r + labelPadding;\n textAlign = needsFlip ? 'right' : 'left';\n } else {\n if (!textAlign || textAlign === 'center') {\n // Put label in the center if it's a circle\n if (angle === 2 * Math.PI && layout.r0 === 0) {\n r = 0;\n } else {\n r = (layout.r + layout.r0) / 2;\n }\n textAlign = 'center';\n } else if (textAlign === 'left') {\n r = layout.r0 + labelPadding;\n textAlign = needsFlip ? 'right' : 'left';\n } else if (textAlign === 'right') {\n r = layout.r - labelPadding;\n textAlign = needsFlip ? 'left' : 'right';\n }\n }\n state.style.align = textAlign;\n state.style.verticalAlign = getLabelAttr(labelStateModel, 'verticalAlign') || 'middle';\n state.x = r * dx + layout.cx;\n state.y = r * dy + layout.cy;\n var rotate = 0;\n if (rotateType === 'radial') {\n rotate = normalizeRadian(-midAngle) + (needsFlip ? Math.PI : 0);\n } else if (rotateType === 'tangential') {\n rotate = normalizeRadian(Math.PI / 2 - midAngle) + (needsFlip ? Math.PI : 0);\n } else if (zrUtil.isNumber(rotateType)) {\n rotate = rotateType * Math.PI / 180;\n }\n state.rotation = normalizeRadian(rotate);\n });\n function getLabelAttr(model, name) {\n var stateAttr = model.get(name);\n if (stateAttr == null) {\n return normalLabelModel.get(name);\n }\n return stateAttr;\n }\n label.dirtyStyle();\n };\n return SunburstPiece;\n}(graphic.Sector);\nexport default SunburstPiece;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { extend } from 'zrender/lib/core/util.js';\nimport { deprecateReplaceLog } from '../../util/log.js';\nimport { retrieveTargetInfo, aboveViewRoot } from '../helper/treeHelper.js';\nexport var ROOT_TO_NODE_ACTION = 'sunburstRootToNode';\nvar HIGHLIGHT_ACTION = 'sunburstHighlight';\nvar UNHIGHLIGHT_ACTION = 'sunburstUnhighlight';\nexport function installSunburstAction(registers) {\n registers.registerAction({\n type: ROOT_TO_NODE_ACTION,\n update: 'updateView'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sunburst',\n query: payload\n }, handleRootToNode);\n function handleRootToNode(model, index) {\n var targetInfo = retrieveTargetInfo(payload, [ROOT_TO_NODE_ACTION], model);\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n if (originViewRoot) {\n payload.direction = aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown';\n }\n model.resetViewRoot(targetInfo.node);\n }\n }\n });\n registers.registerAction({\n type: HIGHLIGHT_ACTION,\n update: 'none'\n }, function (payload, ecModel, api) {\n // Clone\n payload = extend({}, payload);\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sunburst',\n query: payload\n }, handleHighlight);\n function handleHighlight(model) {\n var targetInfo = retrieveTargetInfo(payload, [HIGHLIGHT_ACTION], model);\n if (targetInfo) {\n payload.dataIndex = targetInfo.node.dataIndex;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('sunburstHighlight', 'highlight');\n }\n // Fast forward action\n api.dispatchAction(extend(payload, {\n type: 'highlight'\n }));\n });\n registers.registerAction({\n type: UNHIGHLIGHT_ACTION,\n update: 'updateView'\n }, function (payload, ecModel, api) {\n payload = extend({}, payload);\n if (process.env.NODE_ENV !== 'production') {\n deprecateReplaceLog('sunburstUnhighlight', 'downplay');\n }\n api.dispatchAction(extend(payload, {\n type: 'downplay'\n }));\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ChartView from '../../view/Chart.js';\nimport SunburstPiece from './SunburstPiece.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport { ROOT_TO_NODE_ACTION } from './sunburstAction.js';\nimport { windowOpen } from '../../util/format.js';\nvar SunburstView = /** @class */function (_super) {\n __extends(SunburstView, _super);\n function SunburstView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SunburstView.type;\n return _this;\n }\n SunburstView.prototype.render = function (seriesModel, ecModel, api,\n // @ts-ignore\n payload) {\n var self = this;\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var data = seriesModel.getData();\n var virtualRoot = data.tree.root;\n var newRoot = seriesModel.getViewRoot();\n var group = this.group;\n var renderLabelForZeroData = seriesModel.get('renderLabelForZeroData');\n var newChildren = [];\n newRoot.eachNode(function (node) {\n newChildren.push(node);\n });\n var oldChildren = this._oldChildren || [];\n dualTravel(newChildren, oldChildren);\n renderRollUp(virtualRoot, newRoot);\n this._initEvents();\n this._oldChildren = newChildren;\n function dualTravel(newChildren, oldChildren) {\n if (newChildren.length === 0 && oldChildren.length === 0) {\n return;\n }\n new DataDiffer(oldChildren, newChildren, getKey, getKey).add(processNode).update(processNode).remove(zrUtil.curry(processNode, null)).execute();\n function getKey(node) {\n return node.getId();\n }\n function processNode(newIdx, oldIdx) {\n var newNode = newIdx == null ? null : newChildren[newIdx];\n var oldNode = oldIdx == null ? null : oldChildren[oldIdx];\n doRenderNode(newNode, oldNode);\n }\n }\n function doRenderNode(newNode, oldNode) {\n if (!renderLabelForZeroData && newNode && !newNode.getValue()) {\n // Not render data with value 0\n newNode = null;\n }\n if (newNode !== virtualRoot && oldNode !== virtualRoot) {\n if (oldNode && oldNode.piece) {\n if (newNode) {\n // Update\n oldNode.piece.updateData(false, newNode, seriesModel, ecModel, api);\n // For tooltip\n data.setItemGraphicEl(newNode.dataIndex, oldNode.piece);\n } else {\n // Remove\n removeNode(oldNode);\n }\n } else if (newNode) {\n // Add\n var piece = new SunburstPiece(newNode, seriesModel, ecModel, api);\n group.add(piece);\n // For tooltip\n data.setItemGraphicEl(newNode.dataIndex, piece);\n }\n }\n }\n function removeNode(node) {\n if (!node) {\n return;\n }\n if (node.piece) {\n group.remove(node.piece);\n node.piece = null;\n }\n }\n function renderRollUp(virtualRoot, viewRoot) {\n if (viewRoot.depth > 0) {\n // Render\n if (self.virtualPiece) {\n // Update\n self.virtualPiece.updateData(false, virtualRoot, seriesModel, ecModel, api);\n } else {\n // Add\n self.virtualPiece = new SunburstPiece(virtualRoot, seriesModel, ecModel, api);\n group.add(self.virtualPiece);\n }\n // TODO event scope\n viewRoot.piece.off('click');\n self.virtualPiece.on('click', function (e) {\n self._rootToNode(viewRoot.parentNode);\n });\n } else if (self.virtualPiece) {\n // Remove\n group.remove(self.virtualPiece);\n self.virtualPiece = null;\n }\n }\n };\n /**\n * @private\n */\n SunburstView.prototype._initEvents = function () {\n var _this = this;\n this.group.off('click');\n this.group.on('click', function (e) {\n var targetFound = false;\n var viewRoot = _this.seriesModel.getViewRoot();\n viewRoot.eachNode(function (node) {\n if (!targetFound && node.piece && node.piece === e.target) {\n var nodeClick = node.getModel().get('nodeClick');\n if (nodeClick === 'rootToNode') {\n _this._rootToNode(node);\n } else if (nodeClick === 'link') {\n var itemModel = node.getModel();\n var link = itemModel.get('link');\n if (link) {\n var linkTarget = itemModel.get('target', true) || '_blank';\n windowOpen(link, linkTarget);\n }\n }\n targetFound = true;\n }\n });\n });\n };\n /**\n * @private\n */\n SunburstView.prototype._rootToNode = function (node) {\n if (node !== this.seriesModel.getViewRoot()) {\n this.api.dispatchAction({\n type: ROOT_TO_NODE_ACTION,\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: node\n });\n }\n };\n /**\n * @implement\n */\n SunburstView.prototype.containPoint = function (point, seriesModel) {\n var treeRoot = seriesModel.getData();\n var itemLayout = treeRoot.getItemLayout(0);\n if (itemLayout) {\n var dx = point[0] - itemLayout.cx;\n var dy = point[1] - itemLayout.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n return radius <= itemLayout.r && radius >= itemLayout.r0;\n }\n };\n SunburstView.type = 'sunburst';\n return SunburstView;\n}(ChartView);\nexport default SunburstView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SeriesModel from '../../model/Series.js';\nimport Tree from '../../data/Tree.js';\nimport { wrapTreePathInfo } from '../helper/treeHelper.js';\nimport Model from '../../model/Model.js';\nimport enableAriaDecalForTree from '../helper/enableAriaDecalForTree.js';\nvar SunburstSeriesModel = /** @class */function (_super) {\n __extends(SunburstSeriesModel, _super);\n function SunburstSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SunburstSeriesModel.type;\n _this.ignoreStyleOnData = true;\n return _this;\n }\n SunburstSeriesModel.prototype.getInitialData = function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levelModels = this._levelModels = zrUtil.map(option.levels || [], function (levelDefine) {\n return new Model(levelDefine, this, ecModel);\n }, this);\n // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n var tree = Tree.createTree(root, this, beforeLink);\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = levelModels[node.depth];\n levelModel && (model.parentModel = levelModel);\n return model;\n });\n }\n return tree.data;\n };\n SunburstSeriesModel.prototype.optionUpdated = function () {\n this.resetViewRoot();\n };\n /*\n * @override\n */\n SunburstSeriesModel.prototype.getDataParams = function (dataIndex) {\n var params = _super.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n return params;\n };\n SunburstSeriesModel.prototype.getLevelModel = function (node) {\n return this._levelModels && this._levelModels[node.depth];\n };\n SunburstSeriesModel.prototype.getViewRoot = function () {\n return this._viewRoot;\n };\n SunburstSeriesModel.prototype.resetViewRoot = function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n };\n SunburstSeriesModel.prototype.enableAriaDecal = function () {\n enableAriaDecalForTree(this);\n };\n SunburstSeriesModel.type = 'series.sunburst';\n SunburstSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n // 最小角度改为0\n minAngle: 0,\n // If still show when all data zero.\n stillShowZeroSum: true,\n // 'rootToNode', 'link', or false\n nodeClick: 'rootToNode',\n renderLabelForZeroData: false,\n label: {\n // could be: 'radial', 'tangential', or 'none'\n rotate: 'radial',\n show: true,\n opacity: 1,\n // 'left' is for inner side of inside, and 'right' is for outer\n // side for inside\n align: 'center',\n position: 'inside',\n distance: 5,\n silent: true\n },\n itemStyle: {\n borderWidth: 1,\n borderColor: 'white',\n borderType: 'solid',\n shadowBlur: 0,\n shadowColor: 'rgba(0, 0, 0, 0.2)',\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n emphasis: {\n focus: 'descendant'\n },\n blur: {\n itemStyle: {\n opacity: 0.2\n },\n label: {\n opacity: 0.1\n }\n },\n // Animation type can be expansion, scale.\n animationType: 'expansion',\n animationDuration: 1000,\n animationDurationUpdate: 500,\n data: [],\n /**\n * Sort order.\n *\n * Valid values: 'desc', 'asc', null, or callback function.\n * 'desc' and 'asc' for descend and ascendant order;\n * null for not sorting;\n * example of callback function:\n * function(nodeA, nodeB) {\n * return nodeA.getValue() - nodeB.getValue();\n * }\n */\n sort: 'desc'\n };\n return SunburstSeriesModel;\n}(SeriesModel);\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value;\n // TODO First value of array must be a number\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n }\n // Value should not less than 0.\n if (thisValue < 0) {\n thisValue = 0;\n }\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\nexport default SunburstSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parsePercent } from '../../util/number.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\n// let PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\nexport default function sunburstLayout(seriesType, ecModel, api) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n var width = api.getWidth();\n var height = api.getHeight();\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], width);\n var cy = parsePercent(center[1], height);\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var virtualRoot = seriesModel.getData().tree.root;\n var treeRoot = seriesModel.getViewRoot();\n var rootDepth = treeRoot.depth;\n var sort = seriesModel.get('sort');\n if (sort != null) {\n initChildren(treeRoot, sort);\n }\n var validDataCount = 0;\n zrUtil.each(treeRoot.children, function (child) {\n !isNaN(child.getValue()) && validDataCount++;\n });\n var sum = treeRoot.getValue();\n // Sum may be 0\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var renderRollupNode = treeRoot.depth > 0;\n var levels = treeRoot.height - (renderRollupNode ? -1 : 1);\n var rPerLevel = (r - r0) / (levels || 1);\n var clockwise = seriesModel.get('clockwise');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum');\n // In the case some sector angle is smaller than minAngle\n // let restAngle = PI2;\n // let valueSumLargerThanMinAngle = 0;\n var dir = clockwise ? 1 : -1;\n /**\n * Render a tree\n * @return increased angle\n */\n var renderNode = function (node, startAngle) {\n if (!node) {\n return;\n }\n var endAngle = startAngle;\n // Render self\n if (node !== virtualRoot) {\n // Tree node is virtual, so it doesn't need to be drawn\n var value = node.getValue();\n var angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n if (angle < minAngle) {\n angle = minAngle;\n // restAngle -= minAngle;\n }\n // else {\n // valueSumLargerThanMinAngle += value;\n // }\n endAngle = startAngle + dir * angle;\n var depth = node.depth - rootDepth - (renderRollupNode ? -1 : 1);\n var rStart = r0 + rPerLevel * depth;\n var rEnd = r0 + rPerLevel * (depth + 1);\n var levelModel = seriesModel.getLevelModel(node);\n if (levelModel) {\n var r0_1 = levelModel.get('r0', true);\n var r_1 = levelModel.get('r', true);\n var radius_1 = levelModel.get('radius', true);\n if (radius_1 != null) {\n r0_1 = radius_1[0];\n r_1 = radius_1[1];\n }\n r0_1 != null && (rStart = parsePercent(r0_1, size / 2));\n r_1 != null && (rEnd = parsePercent(r_1, size / 2));\n }\n node.setLayout({\n angle: angle,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: rStart,\n r: rEnd\n });\n }\n // Render children\n if (node.children && node.children.length) {\n // currentAngle = startAngle;\n var siblingAngle_1 = 0;\n zrUtil.each(node.children, function (node) {\n siblingAngle_1 += renderNode(node, startAngle + siblingAngle_1);\n });\n }\n return endAngle - startAngle;\n };\n // Virtual root node for roll up\n if (renderRollupNode) {\n var rStart = r0;\n var rEnd = r0 + rPerLevel;\n var angle = Math.PI * 2;\n virtualRoot.setLayout({\n angle: angle,\n startAngle: startAngle,\n endAngle: startAngle + angle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: rStart,\n r: rEnd\n });\n }\n renderNode(treeRoot, startAngle);\n });\n}\n/**\n * Init node children by order and update visual\n */\nfunction initChildren(node, sortOrder) {\n var children = node.children || [];\n node.children = sort(children, sortOrder);\n // Init children recursively\n if (children.length) {\n zrUtil.each(node.children, function (child) {\n initChildren(child, sortOrder);\n });\n }\n}\n/**\n * Sort children nodes\n *\n * @param {TreeNode[]} children children of node to be sorted\n * @param {string | function | null} sort sort method\n * See SunburstSeries.js for details.\n */\nfunction sort(children, sortOrder) {\n if (zrUtil.isFunction(sortOrder)) {\n var sortTargets = zrUtil.map(children, function (child, idx) {\n var value = child.getValue();\n return {\n params: {\n depth: child.depth,\n height: child.height,\n dataIndex: child.dataIndex,\n getValue: function () {\n return value;\n }\n },\n index: idx\n };\n });\n sortTargets.sort(function (a, b) {\n return sortOrder(a.params, b.params);\n });\n return zrUtil.map(sortTargets, function (target) {\n return children[target.index];\n });\n } else {\n var isAsc_1 = sortOrder === 'asc';\n return children.sort(function (a, b) {\n var diff = (a.getValue() - b.getValue()) * (isAsc_1 ? 1 : -1);\n return diff === 0 ? (a.dataIndex - b.dataIndex) * (isAsc_1 ? -1 : 1) : diff;\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { lift } from 'zrender/lib/tool/color.js';\nimport { extend, isString } from 'zrender/lib/core/util.js';\nexport default function sunburstVisual(ecModel) {\n var paletteScope = {};\n // Default color strategy\n function pickColor(node, seriesModel, treeHeight) {\n // Choose color from palette based on the first level.\n var current = node;\n while (current && current.depth > 1) {\n current = current.parentNode;\n }\n var color = seriesModel.getColorFromPalette(current.name || current.dataIndex + '', paletteScope);\n if (node.depth > 1 && isString(color)) {\n // Lighter on the deeper level.\n color = lift(color, (node.depth - 1) / (treeHeight - 1) * 0.5);\n }\n return color;\n }\n ecModel.eachSeriesByType('sunburst', function (seriesModel) {\n var data = seriesModel.getData();\n var tree = data.tree;\n tree.eachNode(function (node) {\n var model = node.getModel();\n var style = model.getModel('itemStyle').getItemStyle();\n if (!style.fill) {\n style.fill = pickColor(node, seriesModel, tree.root.height);\n }\n var existsStyle = data.ensureUniqueItemVisual(node.dataIndex, 'style');\n extend(existsStyle, style);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SunburstView from './SunburstView.js';\nimport SunburstSeriesModel from './SunburstSeries.js';\nimport sunburstLayout from './sunburstLayout.js';\nimport sunburstVisual from './sunburstVisual.js';\nimport dataFilter from '../../processor/dataFilter.js';\nimport { curry } from 'zrender/lib/core/util.js';\nimport { installSunburstAction } from './sunburstAction.js';\nexport function install(registers) {\n registers.registerChartView(SunburstView);\n registers.registerSeriesModel(SunburstSeriesModel);\n registers.registerLayout(curry(sunburstLayout, 'sunburst'));\n registers.registerProcessor(curry(dataFilter, 'sunburst'));\n registers.registerVisual(sunburstVisual);\n installSunburstAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { makeInner } from '../../util/model.js';\nimport SeriesModel from '../../model/Series.js';\n// Also compat with ec4, where\n// `visual('color') visual('borderColor')` is supported.\nexport var STYLE_VISUAL_TYPE = {\n color: 'fill',\n borderColor: 'stroke'\n};\nexport var NON_STYLE_VISUAL_PROPS = {\n symbol: 1,\n symbolSize: 1,\n symbolKeepAspect: 1,\n legendIcon: 1,\n visualMeta: 1,\n liftZ: 1,\n decal: 1\n};\n;\nexport var customInnerStore = makeInner();\nvar CustomSeriesModel = /** @class */function (_super) {\n __extends(CustomSeriesModel, _super);\n function CustomSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CustomSeriesModel.type;\n return _this;\n }\n CustomSeriesModel.prototype.optionUpdated = function () {\n this.currentZLevel = this.get('zlevel', true);\n this.currentZ = this.get('z', true);\n };\n CustomSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this);\n };\n CustomSeriesModel.prototype.getDataParams = function (dataIndex, dataType, el) {\n var params = _super.prototype.getDataParams.call(this, dataIndex, dataType);\n el && (params.info = customInnerStore(el).info);\n return params;\n };\n CustomSeriesModel.type = 'series.custom';\n CustomSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar'];\n CustomSeriesModel.defaultOption = {\n coordinateSystem: 'cartesian2d',\n // zlevel: 0,\n z: 2,\n legendHoverLink: true,\n // Custom series will not clip by default.\n // Some case will use custom series to draw label\n // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight\n clip: false\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Polar coordinate system\n // polarIndex: 0,\n // Geo coordinate system\n // geoIndex: 0,\n };\n\n return CustomSeriesModel;\n}(SeriesModel);\nexport default CustomSeriesModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n dataItem = dataItem || [0, 0];\n return zrUtil.map(['x', 'y'], function (dim, dimIdx) {\n var axis = this.getAxis(dim);\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n }, this);\n}\nexport default function cartesianPrepareCustom(coordSys) {\n var rect = coordSys.master.getRect();\n return {\n coordSys: {\n // The name exposed to user is always 'cartesian2d' but not 'grid'.\n type: 'cartesian2d',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function (data) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nfunction dataToCoordSize(dataSize, dataItem) {\n dataItem = dataItem || [0, 0];\n return zrUtil.map([0, 1], function (dimIdx) {\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n var p1 = [];\n var p2 = [];\n p1[dimIdx] = val - halfSize;\n p2[dimIdx] = val + halfSize;\n p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];\n return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);\n }, this);\n}\nexport default function geoPrepareCustom(coordSys) {\n var rect = coordSys.getBoundingRect();\n return {\n coordSys: {\n type: 'geo',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n zoom: coordSys.getZoom()\n },\n api: {\n coord: function (data) {\n // do not provide \"out\" and noRoam param,\n // Compatible with this usage:\n // echarts.util.map(item.points, api.coord)\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { bind } from 'zrender/lib/core/util.js';\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n var axis = this.getAxis();\n var val = dataItem instanceof Array ? dataItem[0] : dataItem;\n var halfSize = (dataSize instanceof Array ? dataSize[0] : dataSize) / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n}\nexport default function singlePrepareCustom(coordSys) {\n var rect = coordSys.getRect();\n return {\n coordSys: {\n type: 'singleAxis',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function (val) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(val);\n },\n size: bind(dataToCoordSize, coordSys)\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\n// import AngleAxis from './AngleAxis.js';\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n dataItem = dataItem || [0, 0];\n return zrUtil.map(['Radius', 'Angle'], function (dim, dimIdx) {\n var getterName = 'get' + dim + 'Axis';\n // TODO: TYPE Check Angle Axis\n var axis = this[getterName]();\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n var result = axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n if (dim === 'Angle') {\n result = result * Math.PI / 180;\n }\n return result;\n }, this);\n}\nexport default function polarPrepareCustom(coordSys) {\n var radiusAxis = coordSys.getRadiusAxis();\n var angleAxis = coordSys.getAngleAxis();\n var radius = radiusAxis.getExtent();\n radius[0] > radius[1] && radius.reverse();\n return {\n coordSys: {\n type: 'polar',\n cx: coordSys.cx,\n cy: coordSys.cy,\n r: radius[1],\n r0: radius[0]\n },\n api: {\n coord: function (data) {\n var radius = radiusAxis.dataToRadius(data[0]);\n var angle = angleAxis.dataToAngle(data[1]);\n var coord = coordSys.coordToPoint([radius, angle]);\n coord.push(radius, angle * Math.PI / 180);\n return coord;\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function calendarPrepareCustom(coordSys) {\n var rect = coordSys.getRect();\n var rangeInfo = coordSys.getRangeInfo();\n return {\n coordSys: {\n type: 'calendar',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n cellWidth: coordSys.getCellWidth(),\n cellHeight: coordSys.getCellHeight(),\n rangeInfo: {\n start: rangeInfo.start,\n end: rangeInfo.end,\n weeks: rangeInfo.weeks,\n dayCount: rangeInfo.allDay\n }\n },\n api: {\n coord: function (data, clamp) {\n return coordSys.dataToPoint(data, clamp);\n }\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, hasOwn } from 'zrender/lib/core/util.js';\nvar deprecatedLogs = {};\n/**\n * Whether need to call `convertEC4CompatibleStyle`.\n */\nexport function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) {\n // Since echarts5, `RectText` is separated from its host element and style.text\n // does not exist any more. The compat work brings some extra burden on performance.\n // So we provide:\n // `legacy: true` force make compat.\n // `legacy: false`, force do not compat.\n // `legacy` not set: auto detect whether legacy.\n // But in this case we do not compat (difficult to detect and rare case):\n // Becuse custom series and graphic component support \"merge\", users may firstly\n // only set `textStrokeWidth` style or secondly only set `text`.\n return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan'\n // Difficult to detect whether legacy for a \"text\" el.\n && (elType === 'text' || hasOwn(style, 'text')));\n}\n/**\n * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.\n * @param hostStyle The properties might be modified.\n * @return If be text el, `textContentStyle` and `textConfig` will not be returned.\n * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area\n * retried from the `hostStyle`.\n */\nexport function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) {\n var srcStyle = hostStyle;\n var textConfig;\n var textContent;\n var textContentStyle;\n if (elType === 'text') {\n textContentStyle = srcStyle;\n } else {\n textContentStyle = {};\n hasOwn(srcStyle, 'text') && (textContentStyle.text = srcStyle.text);\n hasOwn(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich);\n hasOwn(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill);\n hasOwn(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke);\n hasOwn(srcStyle, 'fontFamily') && (textContentStyle.fontFamily = srcStyle.fontFamily);\n hasOwn(srcStyle, 'fontSize') && (textContentStyle.fontSize = srcStyle.fontSize);\n hasOwn(srcStyle, 'fontStyle') && (textContentStyle.fontStyle = srcStyle.fontStyle);\n hasOwn(srcStyle, 'fontWeight') && (textContentStyle.fontWeight = srcStyle.fontWeight);\n textContent = {\n type: 'text',\n style: textContentStyle,\n // ec4 does not support rectText trigger.\n // And when text position is different in normal and emphasis\n // => hover text trigger emphasis;\n // => text position changed, leave mouse pointer immediately;\n // That might cause incorrect state.\n silent: true\n };\n textConfig = {};\n var hasOwnPos = hasOwn(srcStyle, 'textPosition');\n if (isNormal) {\n textConfig.position = hasOwnPos ? srcStyle.textPosition : 'inside';\n } else {\n hasOwnPos && (textConfig.position = srcStyle.textPosition);\n }\n hasOwn(srcStyle, 'textPosition') && (textConfig.position = srcStyle.textPosition);\n hasOwn(srcStyle, 'textOffset') && (textConfig.offset = srcStyle.textOffset);\n hasOwn(srcStyle, 'textRotation') && (textConfig.rotation = srcStyle.textRotation);\n hasOwn(srcStyle, 'textDistance') && (textConfig.distance = srcStyle.textDistance);\n }\n convertEC4CompatibleRichItem(textContentStyle, hostStyle);\n each(textContentStyle.rich, function (richItem) {\n convertEC4CompatibleRichItem(richItem, richItem);\n });\n return {\n textConfig: textConfig,\n textContent: textContent\n };\n}\n/**\n * The result will be set to `out`.\n */\nfunction convertEC4CompatibleRichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n // (1) For simplicity, make textXXX properties (deprecated since ec5) has\n // higher priority. For example, consider in ec4 `borderColor: 5, textBorderColor: 10`\n // on a rect means `borderColor: 4` on the rect and `borderColor: 10` on an attached\n // richText in ec5.\n // (2) `out === richItem` if and only if `out` is text el or rich item.\n // So we can overwrite existing props in `out` since textXXX has higher priority.\n richItem.font = richItem.textFont || richItem.font;\n hasOwn(richItem, 'textStrokeWidth') && (out.lineWidth = richItem.textStrokeWidth);\n hasOwn(richItem, 'textAlign') && (out.align = richItem.textAlign);\n hasOwn(richItem, 'textVerticalAlign') && (out.verticalAlign = richItem.textVerticalAlign);\n hasOwn(richItem, 'textLineHeight') && (out.lineHeight = richItem.textLineHeight);\n hasOwn(richItem, 'textWidth') && (out.width = richItem.textWidth);\n hasOwn(richItem, 'textHeight') && (out.height = richItem.textHeight);\n hasOwn(richItem, 'textBackgroundColor') && (out.backgroundColor = richItem.textBackgroundColor);\n hasOwn(richItem, 'textPadding') && (out.padding = richItem.textPadding);\n hasOwn(richItem, 'textBorderColor') && (out.borderColor = richItem.textBorderColor);\n hasOwn(richItem, 'textBorderWidth') && (out.borderWidth = richItem.textBorderWidth);\n hasOwn(richItem, 'textBorderRadius') && (out.borderRadius = richItem.textBorderRadius);\n hasOwn(richItem, 'textBoxShadowColor') && (out.shadowColor = richItem.textBoxShadowColor);\n hasOwn(richItem, 'textBoxShadowBlur') && (out.shadowBlur = richItem.textBoxShadowBlur);\n hasOwn(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX);\n hasOwn(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY);\n}\n/**\n * Convert to pure echarts4 format style.\n * `itemStyle` will be modified, added with ec4 style properties from\n * `textStyle` and `textConfig`.\n *\n * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where\n * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.\n */\nexport function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) {\n var out = itemStl;\n // See `custom.ts`, a trick to set extra `textPosition` firstly.\n out.textPosition = out.textPosition || txCfg.position || 'inside';\n txCfg.offset != null && (out.textOffset = txCfg.offset);\n txCfg.rotation != null && (out.textRotation = txCfg.rotation);\n txCfg.distance != null && (out.textDistance = txCfg.distance);\n var isInside = out.textPosition.indexOf('inside') >= 0;\n var hostFill = itemStl.fill || '#000';\n convertToEC4RichItem(out, txStl);\n var textFillNotSet = out.textFill == null;\n if (isInside) {\n if (textFillNotSet) {\n out.textFill = txCfg.insideFill || '#fff';\n !out.textStroke && txCfg.insideStroke && (out.textStroke = txCfg.insideStroke);\n !out.textStroke && (out.textStroke = hostFill);\n out.textStrokeWidth == null && (out.textStrokeWidth = 2);\n }\n } else {\n if (textFillNotSet) {\n out.textFill = itemStl.fill || txCfg.outsideFill || '#000';\n }\n !out.textStroke && txCfg.outsideStroke && (out.textStroke = txCfg.outsideStroke);\n }\n out.text = txStl.text;\n out.rich = txStl.rich;\n each(txStl.rich, function (richItem) {\n convertToEC4RichItem(richItem, richItem);\n });\n return out;\n}\nfunction convertToEC4RichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n hasOwn(richItem, 'fill') && (out.textFill = richItem.fill);\n hasOwn(richItem, 'stroke') && (out.textStroke = richItem.fill);\n hasOwn(richItem, 'lineWidth') && (out.textStrokeWidth = richItem.lineWidth);\n hasOwn(richItem, 'font') && (out.font = richItem.font);\n hasOwn(richItem, 'fontStyle') && (out.fontStyle = richItem.fontStyle);\n hasOwn(richItem, 'fontWeight') && (out.fontWeight = richItem.fontWeight);\n hasOwn(richItem, 'fontSize') && (out.fontSize = richItem.fontSize);\n hasOwn(richItem, 'fontFamily') && (out.fontFamily = richItem.fontFamily);\n hasOwn(richItem, 'align') && (out.textAlign = richItem.align);\n hasOwn(richItem, 'verticalAlign') && (out.textVerticalAlign = richItem.verticalAlign);\n hasOwn(richItem, 'lineHeight') && (out.textLineHeight = richItem.lineHeight);\n hasOwn(richItem, 'width') && (out.textWidth = richItem.width);\n hasOwn(richItem, 'height') && (out.textHeight = richItem.height);\n hasOwn(richItem, 'backgroundColor') && (out.textBackgroundColor = richItem.backgroundColor);\n hasOwn(richItem, 'padding') && (out.textPadding = richItem.padding);\n hasOwn(richItem, 'borderColor') && (out.textBorderColor = richItem.borderColor);\n hasOwn(richItem, 'borderWidth') && (out.textBorderWidth = richItem.borderWidth);\n hasOwn(richItem, 'borderRadius') && (out.textBorderRadius = richItem.borderRadius);\n hasOwn(richItem, 'shadowColor') && (out.textBoxShadowColor = richItem.shadowColor);\n hasOwn(richItem, 'shadowBlur') && (out.textBoxShadowBlur = richItem.shadowBlur);\n hasOwn(richItem, 'shadowOffsetX') && (out.textBoxShadowOffsetX = richItem.shadowOffsetX);\n hasOwn(richItem, 'shadowOffsetY') && (out.textBoxShadowOffsetY = richItem.shadowOffsetY);\n hasOwn(richItem, 'textShadowColor') && (out.textShadowColor = richItem.textShadowColor);\n hasOwn(richItem, 'textShadowBlur') && (out.textShadowBlur = richItem.textShadowBlur);\n hasOwn(richItem, 'textShadowOffsetX') && (out.textShadowOffsetX = richItem.textShadowOffsetX);\n hasOwn(richItem, 'textShadowOffsetY') && (out.textShadowOffsetY = richItem.textShadowOffsetY);\n}\nexport function warnDeprecated(deprecated, insteadApproach) {\n if (process.env.NODE_ENV !== 'production') {\n var key = deprecated + '^_^' + insteadApproach;\n if (!deprecatedLogs[key]) {\n console.warn(\"[ECharts] DEPRECATED: \\\"\" + deprecated + \"\\\" has been deprecated. \" + insteadApproach);\n deprecatedLogs[key] = true;\n }\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner, normalizeToArray } from '../util/model.js';\nimport { assert, bind, each, eqNaN, extend, hasOwn, indexOf, isArrayLike, keys, reduce } from 'zrender/lib/core/util.js';\nimport { cloneValue } from 'zrender/lib/animation/Animator.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { Path } from '../util/graphic.js';\nimport { warn } from '../util/log.js';\nimport { TRANSFORMABLE_PROPS } from 'zrender/lib/core/Transformable.js';\nvar LEGACY_TRANSFORM_PROPS_MAP = {\n position: ['x', 'y'],\n scale: ['scaleX', 'scaleY'],\n origin: ['originX', 'originY']\n};\nvar LEGACY_TRANSFORM_PROPS = keys(LEGACY_TRANSFORM_PROPS_MAP);\nvar TRANSFORM_PROPS_MAP = reduce(TRANSFORMABLE_PROPS, function (obj, key) {\n obj[key] = 1;\n return obj;\n}, {});\nvar transformPropNamesStr = TRANSFORMABLE_PROPS.join(', ');\n// '' means root\nexport var ELEMENT_ANIMATABLE_PROPS = ['', 'style', 'shape', 'extra'];\n;\nvar transitionInnerStore = makeInner();\n;\nfunction getElementAnimationConfig(animationType, el, elOption, parentModel, dataIndex) {\n var animationProp = animationType + \"Animation\";\n var config = getAnimationConfig(animationType, parentModel, dataIndex) || {};\n var userDuring = transitionInnerStore(el).userDuring;\n // Only set when duration is > 0 and it's need to be animated.\n if (config.duration > 0) {\n // For simplicity, if during not specified, the previous during will not work any more.\n config.during = userDuring ? bind(duringCall, {\n el: el,\n userDuring: userDuring\n }) : null;\n config.setToFinal = true;\n config.scope = animationType;\n }\n extend(config, elOption[animationProp]);\n return config;\n}\nexport function applyUpdateTransition(el, elOption, animatableModel, opts) {\n opts = opts || {};\n var dataIndex = opts.dataIndex,\n isInit = opts.isInit,\n clearStyle = opts.clearStyle;\n var hasAnimation = animatableModel.isAnimationEnabled();\n // Save the meta info for further morphing. Like apply on the sub morphing elements.\n var store = transitionInnerStore(el);\n var styleOpt = elOption.style;\n store.userDuring = elOption.during;\n var transFromProps = {};\n var propsToSet = {};\n prepareTransformAllPropsFinal(el, elOption, propsToSet);\n prepareShapeOrExtraAllPropsFinal('shape', elOption, propsToSet);\n prepareShapeOrExtraAllPropsFinal('extra', elOption, propsToSet);\n if (!isInit && hasAnimation) {\n prepareTransformTransitionFrom(el, elOption, transFromProps);\n prepareShapeOrExtraTransitionFrom('shape', el, elOption, transFromProps);\n prepareShapeOrExtraTransitionFrom('extra', el, elOption, transFromProps);\n prepareStyleTransitionFrom(el, elOption, styleOpt, transFromProps);\n }\n propsToSet.style = styleOpt;\n applyPropsDirectly(el, propsToSet, clearStyle);\n applyMiscProps(el, elOption);\n if (hasAnimation) {\n if (isInit) {\n var enterFromProps_1 = {};\n each(ELEMENT_ANIMATABLE_PROPS, function (propName) {\n var prop = propName ? elOption[propName] : elOption;\n if (prop && prop.enterFrom) {\n if (propName) {\n enterFromProps_1[propName] = enterFromProps_1[propName] || {};\n }\n extend(propName ? enterFromProps_1[propName] : enterFromProps_1, prop.enterFrom);\n }\n });\n var config = getElementAnimationConfig('enter', el, elOption, animatableModel, dataIndex);\n if (config.duration > 0) {\n el.animateFrom(enterFromProps_1, config);\n }\n } else {\n applyPropsTransition(el, elOption, dataIndex || 0, animatableModel, transFromProps);\n }\n }\n // Store leave to be used in leave transition.\n updateLeaveTo(el, elOption);\n styleOpt ? el.dirty() : el.markRedraw();\n}\nexport function updateLeaveTo(el, elOption) {\n // Try merge to previous set leaveTo\n var leaveToProps = transitionInnerStore(el).leaveToProps;\n for (var i = 0; i < ELEMENT_ANIMATABLE_PROPS.length; i++) {\n var propName = ELEMENT_ANIMATABLE_PROPS[i];\n var prop = propName ? elOption[propName] : elOption;\n if (prop && prop.leaveTo) {\n if (!leaveToProps) {\n leaveToProps = transitionInnerStore(el).leaveToProps = {};\n }\n if (propName) {\n leaveToProps[propName] = leaveToProps[propName] || {};\n }\n extend(propName ? leaveToProps[propName] : leaveToProps, prop.leaveTo);\n }\n }\n}\nexport function applyLeaveTransition(el, elOption, animatableModel, onRemove) {\n if (el) {\n var parent_1 = el.parent;\n var leaveToProps = transitionInnerStore(el).leaveToProps;\n if (leaveToProps) {\n // TODO TODO use leave after leaveAnimation in series is introduced\n // TODO Data index?\n var config = getElementAnimationConfig('update', el, elOption, animatableModel, 0);\n config.done = function () {\n parent_1.remove(el);\n onRemove && onRemove();\n };\n el.animateTo(leaveToProps, config);\n } else {\n parent_1.remove(el);\n onRemove && onRemove();\n }\n }\n}\nexport function isTransitionAll(transition) {\n return transition === 'all';\n}\nfunction applyPropsDirectly(el,\n// Can be null/undefined\nallPropsFinal, clearStyle) {\n var styleOpt = allPropsFinal.style;\n if (!el.isGroup && styleOpt) {\n if (clearStyle) {\n el.useStyle({});\n // When style object changed, how to trade the existing animation?\n // It is probably complicated and not needed to cover all the cases.\n // But still need consider the case:\n // (1) When using init animation on `style.opacity`, and before the animation\n // ended users triggers an update by mousewhel. At that time the init\n // animation should better be continued rather than terminated.\n // So after `useStyle` called, we should change the animation target manually\n // to continue the effect of the init animation.\n // (2) PENDING: If the previous animation targeted at a `val1`, and currently we need\n // to update the value to `val2` and no animation declared, should be terminate\n // the previous animation or just modify the target of the animation?\n // Therotically That will happen not only on `style` but also on `shape` and\n // `transfrom` props. But we haven't handle this case at present yet.\n // (3) PENDING: Is it proper to visit `animators` and `targetName`?\n var animators = el.animators;\n for (var i = 0; i < animators.length; i++) {\n var animator = animators[i];\n // targetName is the \"topKey\".\n if (animator.targetName === 'style') {\n animator.changeTarget(el.style);\n }\n }\n }\n el.setStyle(styleOpt);\n }\n if (allPropsFinal) {\n // Not set style here.\n allPropsFinal.style = null;\n // Set el to the final state firstly.\n allPropsFinal && el.attr(allPropsFinal);\n allPropsFinal.style = styleOpt;\n }\n}\nfunction applyPropsTransition(el, elOption, dataIndex, model,\n// Can be null/undefined\ntransFromProps) {\n if (transFromProps) {\n var config = getElementAnimationConfig('update', el, elOption, model, dataIndex);\n if (config.duration > 0) {\n el.animateFrom(transFromProps, config);\n }\n }\n}\nfunction applyMiscProps(el, elOption) {\n // Merge by default.\n hasOwn(elOption, 'silent') && (el.silent = elOption.silent);\n hasOwn(elOption, 'ignore') && (el.ignore = elOption.ignore);\n if (el instanceof Displayable) {\n hasOwn(elOption, 'invisible') && (el.invisible = elOption.invisible);\n }\n if (el instanceof Path) {\n hasOwn(elOption, 'autoBatch') && (el.autoBatch = elOption.autoBatch);\n }\n}\n// Use it to avoid it be exposed to user.\nvar tmpDuringScope = {};\nvar transitionDuringAPI = {\n // Usually other props do not need to be changed in animation during.\n setTransform: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `setTransform`.');\n }\n tmpDuringScope.el[key] = val;\n return this;\n },\n getTransform: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assert(hasOwn(TRANSFORM_PROPS_MAP, key), 'Only ' + transformPropNamesStr + ' available in `getTransform`.');\n }\n return tmpDuringScope.el[key];\n },\n setShape: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var el = tmpDuringScope.el;\n var shape = el.shape || (el.shape = {});\n shape[key] = val;\n el.dirtyShape && el.dirtyShape();\n return this;\n },\n getShape: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var shape = tmpDuringScope.el.shape;\n if (shape) {\n return shape[key];\n }\n },\n setStyle: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var el = tmpDuringScope.el;\n var style = el.style;\n if (style) {\n if (process.env.NODE_ENV !== 'production') {\n if (eqNaN(val)) {\n warn('style.' + key + ' must not be assigned with NaN.');\n }\n }\n style[key] = val;\n el.dirtyStyle && el.dirtyStyle();\n }\n return this;\n },\n getStyle: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var style = tmpDuringScope.el.style;\n if (style) {\n return style[key];\n }\n },\n setExtra: function (key, val) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var extra = tmpDuringScope.el.extra || (tmpDuringScope.el.extra = {});\n extra[key] = val;\n return this;\n },\n getExtra: function (key) {\n if (process.env.NODE_ENV !== 'production') {\n assertNotReserved(key);\n }\n var extra = tmpDuringScope.el.extra;\n if (extra) {\n return extra[key];\n }\n }\n};\nfunction assertNotReserved(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (key === 'transition' || key === 'enterFrom' || key === 'leaveTo') {\n throw new Error('key must not be \"' + key + '\"');\n }\n }\n}\nfunction duringCall() {\n // Do not provide \"percent\" until some requirements come.\n // Because consider thies case:\n // enterFrom: {x: 100, y: 30}, transition: 'x'.\n // And enter duration is different from update duration.\n // Thus it might be confused about the meaning of \"percent\" in during callback.\n var scope = this;\n var el = scope.el;\n if (!el) {\n return;\n }\n // If el is remove from zr by reason like legend, during still need to called,\n // because el will be added back to zr and the prop value should not be incorrect.\n var latestUserDuring = transitionInnerStore(el).userDuring;\n var scopeUserDuring = scope.userDuring;\n // Ensured a during is only called once in each animation frame.\n // If a during is called multiple times in one frame, maybe some users' calculation logic\n // might be wrong (not sure whether this usage exists).\n // The case of a during might be called twice can be: by default there is a animator for\n // 'x', 'y' when init. Before the init animation finished, call `setOption` to start\n // another animators for 'style'/'shape'/'extra'.\n if (latestUserDuring !== scopeUserDuring) {\n // release\n scope.el = scope.userDuring = null;\n return;\n }\n tmpDuringScope.el = el;\n // Give no `this` to user in \"during\" calling.\n scopeUserDuring(transitionDuringAPI);\n // FIXME: if in future meet the case that some prop will be both modified in `during` and `state`,\n // consider the issue that the prop might be incorrect when return to \"normal\" state.\n}\n\nfunction prepareShapeOrExtraTransitionFrom(mainAttr, fromEl, elOption, transFromProps) {\n var attrOpt = elOption[mainAttr];\n if (!attrOpt) {\n return;\n }\n var elPropsInAttr = fromEl[mainAttr];\n var transFromPropsInAttr;\n if (elPropsInAttr) {\n var transition = elOption.transition;\n var attrTransition = attrOpt.transition;\n if (attrTransition) {\n !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {});\n if (isTransitionAll(attrTransition)) {\n extend(transFromPropsInAttr, elPropsInAttr);\n } else {\n var transitionKeys = normalizeToArray(attrTransition);\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n var elVal = elPropsInAttr[key];\n transFromPropsInAttr[key] = elVal;\n }\n }\n } else if (isTransitionAll(transition) || indexOf(transition, mainAttr) >= 0) {\n !transFromPropsInAttr && (transFromPropsInAttr = transFromProps[mainAttr] = {});\n var elPropsInAttrKeys = keys(elPropsInAttr);\n for (var i = 0; i < elPropsInAttrKeys.length; i++) {\n var key = elPropsInAttrKeys[i];\n var elVal = elPropsInAttr[key];\n if (isNonStyleTransitionEnabled(attrOpt[key], elVal)) {\n transFromPropsInAttr[key] = elVal;\n }\n }\n }\n }\n}\nfunction prepareShapeOrExtraAllPropsFinal(mainAttr, elOption, allProps) {\n var attrOpt = elOption[mainAttr];\n if (!attrOpt) {\n return;\n }\n var allPropsInAttr = allProps[mainAttr] = {};\n var keysInAttr = keys(attrOpt);\n for (var i = 0; i < keysInAttr.length; i++) {\n var key = keysInAttr[i];\n // To avoid share one object with different element, and\n // to avoid user modify the object inexpectedly, have to clone.\n allPropsInAttr[key] = cloneValue(attrOpt[key]);\n }\n}\nfunction prepareTransformTransitionFrom(el, elOption, transFromProps) {\n var transition = elOption.transition;\n var transitionKeys = isTransitionAll(transition) ? TRANSFORMABLE_PROPS : normalizeToArray(transition || []);\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n if (key === 'style' || key === 'shape' || key === 'extra') {\n continue;\n }\n var elVal = el[key];\n if (process.env.NODE_ENV !== 'production') {\n checkTransformPropRefer(key, 'el.transition');\n }\n // Do not clone, animator will perform that clone.\n transFromProps[key] = elVal;\n }\n}\nfunction prepareTransformAllPropsFinal(el, elOption, allProps) {\n for (var i = 0; i < LEGACY_TRANSFORM_PROPS.length; i++) {\n var legacyName = LEGACY_TRANSFORM_PROPS[i];\n var xyName = LEGACY_TRANSFORM_PROPS_MAP[legacyName];\n var legacyArr = elOption[legacyName];\n if (legacyArr) {\n allProps[xyName[0]] = legacyArr[0];\n allProps[xyName[1]] = legacyArr[1];\n }\n }\n for (var i = 0; i < TRANSFORMABLE_PROPS.length; i++) {\n var key = TRANSFORMABLE_PROPS[i];\n if (elOption[key] != null) {\n allProps[key] = elOption[key];\n }\n }\n}\nfunction prepareStyleTransitionFrom(fromEl, elOption, styleOpt, transFromProps) {\n if (!styleOpt) {\n return;\n }\n var fromElStyle = fromEl.style;\n var transFromStyleProps;\n if (fromElStyle) {\n var styleTransition = styleOpt.transition;\n var elTransition = elOption.transition;\n if (styleTransition && !isTransitionAll(styleTransition)) {\n var transitionKeys = normalizeToArray(styleTransition);\n !transFromStyleProps && (transFromStyleProps = transFromProps.style = {});\n for (var i = 0; i < transitionKeys.length; i++) {\n var key = transitionKeys[i];\n var elVal = fromElStyle[key];\n // Do not clone, see `checkNonStyleTansitionRefer`.\n transFromStyleProps[key] = elVal;\n }\n } else if (fromEl.getAnimationStyleProps && (isTransitionAll(elTransition) || isTransitionAll(styleTransition) || indexOf(elTransition, 'style') >= 0)) {\n var animationProps = fromEl.getAnimationStyleProps();\n var animationStyleProps = animationProps ? animationProps.style : null;\n if (animationStyleProps) {\n !transFromStyleProps && (transFromStyleProps = transFromProps.style = {});\n var styleKeys = keys(styleOpt);\n for (var i = 0; i < styleKeys.length; i++) {\n var key = styleKeys[i];\n if (animationStyleProps[key]) {\n var elVal = fromElStyle[key];\n transFromStyleProps[key] = elVal;\n }\n }\n }\n }\n }\n}\nfunction isNonStyleTransitionEnabled(optVal, elVal) {\n // The same as `checkNonStyleTansitionRefer`.\n return !isArrayLike(optVal) ? optVal != null && isFinite(optVal) : optVal !== elVal;\n}\nvar checkTransformPropRefer;\nif (process.env.NODE_ENV !== 'production') {\n checkTransformPropRefer = function (key, usedIn) {\n if (!hasOwn(TRANSFORM_PROPS_MAP, key)) {\n warn('Prop `' + key + '` is not a permitted in `' + usedIn + '`. ' + 'Only `' + keys(TRANSFORM_PROPS_MAP).join('`, `') + '` are permitted.');\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { keys, filter, each, isArray, indexOf } from 'zrender/lib/core/util.js';\nimport { ELEMENT_ANIMATABLE_PROPS } from './customGraphicTransition.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { warn } from '../util/log.js';\nimport { makeInner } from '../util/model.js';\nvar getStateToRestore = makeInner();\nvar KEYFRAME_EXCLUDE_KEYS = ['percent', 'easing', 'shape', 'style', 'extra'];\n/**\n * Stop previous keyframe animation and restore the attributes.\n * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set.\n */\nexport function stopPreviousKeyframeAnimationAndRestore(el) {\n // Stop previous keyframe animation.\n el.stopAnimation('keyframe');\n // Restore\n el.attr(getStateToRestore(el));\n}\nexport function applyKeyframeAnimation(el, animationOpts, animatableModel) {\n if (!animatableModel.isAnimationEnabled() || !animationOpts) {\n return;\n }\n if (isArray(animationOpts)) {\n each(animationOpts, function (singleAnimationOpts) {\n applyKeyframeAnimation(el, singleAnimationOpts, animatableModel);\n });\n return;\n }\n var keyframes = animationOpts.keyframes;\n var duration = animationOpts.duration;\n if (animatableModel && duration == null) {\n // Default to use duration of config.\n // NOTE: animation config from payload will be ignored because they are mainly for transitions.\n var config = getAnimationConfig('enter', animatableModel, 0);\n duration = config && config.duration;\n }\n if (!keyframes || !duration) {\n return;\n }\n var stateToRestore = getStateToRestore(el);\n each(ELEMENT_ANIMATABLE_PROPS, function (targetPropName) {\n if (targetPropName && !el[targetPropName]) {\n return;\n }\n var animator;\n var endFrameIsSet = false;\n // Sort keyframes by percent.\n keyframes.sort(function (a, b) {\n return a.percent - b.percent;\n });\n each(keyframes, function (kf) {\n // Stop current animation.\n var animators = el.animators;\n var kfValues = targetPropName ? kf[targetPropName] : kf;\n if (process.env.NODE_ENV !== 'production') {\n if (kf.percent >= 1) {\n endFrameIsSet = true;\n }\n }\n if (!kfValues) {\n return;\n }\n var propKeys = keys(kfValues);\n if (!targetPropName) {\n // PENDING performance?\n propKeys = filter(propKeys, function (key) {\n return indexOf(KEYFRAME_EXCLUDE_KEYS, key) < 0;\n });\n }\n if (!propKeys.length) {\n return;\n }\n if (!animator) {\n animator = el.animate(targetPropName, animationOpts.loop, true);\n animator.scope = 'keyframe';\n }\n for (var i = 0; i < animators.length; i++) {\n // Stop all other animation that is not keyframe.\n if (animators[i] !== animator && animators[i].targetName === animator.targetName) {\n animators[i].stopTracks(propKeys);\n }\n }\n targetPropName && (stateToRestore[targetPropName] = stateToRestore[targetPropName] || {});\n var savedTarget = targetPropName ? stateToRestore[targetPropName] : stateToRestore;\n each(propKeys, function (key) {\n // Save original value.\n savedTarget[key] = ((targetPropName ? el[targetPropName] : el) || {})[key];\n });\n animator.whenWithKeys(duration * kf.percent, kfValues, propKeys, kf.easing);\n });\n if (!animator) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!endFrameIsSet) {\n warn('End frame with percent: 1 is missing in the keyframeAnimation.', true);\n }\n }\n animator.delay(animationOpts.delay || 0).duration(duration).start(animationOpts.easing);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { hasOwn, assert, isString, retrieve2, retrieve3, defaults, each, indexOf } from 'zrender/lib/core/util.js';\nimport * as graphicUtil from '../../util/graphic.js';\nimport { setDefaultStateProxy, toggleHoverEmphasis } from '../../util/states.js';\nimport * as labelStyleHelper from '../../label/labelStyle.js';\nimport { getDefaultLabel } from '../helper/labelHelper.js';\nimport { getLayoutOnAxis } from '../../layout/barGrid.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport ChartView from '../../view/Chart.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport prepareCartesian2d from '../../coord/cartesian/prepareCustom.js';\nimport prepareGeo from '../../coord/geo/prepareCustom.js';\nimport prepareSingleAxis from '../../coord/single/prepareCustom.js';\nimport preparePolar from '../../coord/polar/prepareCustom.js';\nimport prepareCalendar from '../../coord/calendar/prepareCustom.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { convertToEC4StyleForCustomSerise, isEC4CompatibleStyle, convertFromEC4CompatibleStyle, warnDeprecated } from '../../util/styleCompat.js';\nimport { throwError } from '../../util/log.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { STYLE_VISUAL_TYPE, NON_STYLE_VISUAL_PROPS, customInnerStore } from './CustomSeries.js';\nimport { applyLeaveTransition, applyUpdateTransition } from '../../animation/customGraphicTransition.js';\nimport { applyKeyframeAnimation, stopPreviousKeyframeAnimationAndRestore } from '../../animation/customGraphicKeyframeAnimation.js';\nvar EMPHASIS = 'emphasis';\nvar NORMAL = 'normal';\nvar BLUR = 'blur';\nvar SELECT = 'select';\nvar STATES = [NORMAL, EMPHASIS, BLUR, SELECT];\nvar PATH_ITEM_STYLE = {\n normal: ['itemStyle'],\n emphasis: [EMPHASIS, 'itemStyle'],\n blur: [BLUR, 'itemStyle'],\n select: [SELECT, 'itemStyle']\n};\nvar PATH_LABEL = {\n normal: ['label'],\n emphasis: [EMPHASIS, 'label'],\n blur: [BLUR, 'label'],\n select: [SELECT, 'label']\n};\nvar DEFAULT_TRANSITION = ['x', 'y'];\n// Use prefix to avoid index to be the same as el.name,\n// which will cause weird update animation.\nvar GROUP_DIFF_PREFIX = 'e\\0\\0';\nvar attachedTxInfoTmp = {\n normal: {},\n emphasis: {},\n blur: {},\n select: {}\n};\n/**\n * To reduce total package size of each coordinate systems, the modules `prepareCustom`\n * of each coordinate systems are not required by each coordinate systems directly, but\n * required by the module `custom`.\n *\n * prepareInfoForCustomSeries {Function}: optional\n * @return {Object} {coordSys: {...}, api: {\n * coord: function (data, clamp) {}, // return point in global.\n * size: function (dataSize, dataItem) {} // return size of each axis in coordSys.\n * }}\n */\nvar prepareCustoms = {\n cartesian2d: prepareCartesian2d,\n geo: prepareGeo,\n single: prepareSingleAxis,\n polar: preparePolar,\n calendar: prepareCalendar\n};\nfunction isPath(el) {\n return el instanceof graphicUtil.Path;\n}\nfunction isDisplayable(el) {\n return el instanceof Displayable;\n}\nfunction copyElement(sourceEl, targetEl) {\n targetEl.copyTransform(sourceEl);\n if (isDisplayable(targetEl) && isDisplayable(sourceEl)) {\n targetEl.setStyle(sourceEl.style);\n targetEl.z = sourceEl.z;\n targetEl.z2 = sourceEl.z2;\n targetEl.zlevel = sourceEl.zlevel;\n targetEl.invisible = sourceEl.invisible;\n targetEl.ignore = sourceEl.ignore;\n if (isPath(targetEl) && isPath(sourceEl)) {\n targetEl.setShape(sourceEl.shape);\n }\n }\n}\nvar CustomChartView = /** @class */function (_super) {\n __extends(CustomChartView, _super);\n function CustomChartView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CustomChartView.type;\n return _this;\n }\n CustomChartView.prototype.render = function (customSeries, ecModel, api, payload) {\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\n var oldData = this._data;\n var data = customSeries.getData();\n var group = this.group;\n var renderItem = makeRenderItem(customSeries, data, ecModel, api);\n if (!oldData) {\n // Previous render is incremental render or first render.\n // Needs remove the incremental rendered elements.\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n createOrUpdateItem(api, null, newIdx, renderItem(newIdx, payload), customSeries, group, data);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && applyLeaveTransition(el, customInnerStore(el).option, customSeries);\n }).update(function (newIdx, oldIdx) {\n var oldEl = oldData.getItemGraphicEl(oldIdx);\n createOrUpdateItem(api, oldEl, newIdx, renderItem(newIdx, payload), customSeries, group, data);\n }).execute();\n // Do clipping\n var clipPath = customSeries.get('clip', true) ? createClipPath(customSeries.coordinateSystem, false, customSeries) : null;\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n this._data = data;\n };\n CustomChartView.prototype.incrementalPrepareRender = function (customSeries, ecModel, api) {\n this.group.removeAll();\n this._data = null;\n };\n CustomChartView.prototype.incrementalRender = function (params, customSeries, ecModel, api, payload) {\n var data = customSeries.getData();\n var renderItem = makeRenderItem(customSeries, data, ecModel, api);\n var progressiveEls = this._progressiveEls = [];\n function setIncrementalAndHoverLayer(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = params.start; idx < params.end; idx++) {\n var el = createOrUpdateItem(null, null, idx, renderItem(idx, payload), customSeries, this.group, data);\n if (el) {\n el.traverse(setIncrementalAndHoverLayer);\n progressiveEls.push(el);\n }\n }\n };\n CustomChartView.prototype.eachRendered = function (cb) {\n graphicUtil.traverseElements(this._progressiveEls || this.group, cb);\n };\n CustomChartView.prototype.filterForExposedEvent = function (eventType, query, targetEl, packedEvent) {\n var elementName = query.element;\n if (elementName == null || targetEl.name === elementName) {\n return true;\n }\n // Enable to give a name on a group made by `renderItem`, and listen\n // events that are triggered by its descendents.\n while ((targetEl = targetEl.__hostTarget || targetEl.parent) && targetEl !== this.group) {\n if (targetEl.name === elementName) {\n return true;\n }\n }\n return false;\n };\n CustomChartView.type = 'custom';\n return CustomChartView;\n}(ChartView);\nexport default CustomChartView;\nfunction createEl(elOption) {\n var graphicType = elOption.type;\n var el;\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n if (graphicType === 'path') {\n var shape = elOption.shape;\n // Using pathRect brings convenience to users sacle svg path.\n var pathRect = shape.width != null && shape.height != null ? {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width,\n height: shape.height\n } : null;\n var pathData = getPathData(shape);\n // Path is also used for icon, so layout 'center' by default.\n el = graphicUtil.makePath(pathData, null, pathRect, shape.layout || 'center');\n customInnerStore(el).customPathData = pathData;\n } else if (graphicType === 'image') {\n el = new graphicUtil.Image({});\n customInnerStore(el).customImagePath = elOption.style.image;\n } else if (graphicType === 'text') {\n el = new graphicUtil.Text({});\n // customInnerStore(el).customText = (elOption.style as TextStyleProps).text;\n } else if (graphicType === 'group') {\n el = new graphicUtil.Group();\n } else if (graphicType === 'compoundPath') {\n throw new Error('\"compoundPath\" is not supported yet.');\n } else {\n var Clz = graphicUtil.getShapeClass(graphicType);\n if (!Clz) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'graphic type \"' + graphicType + '\" can not be found.';\n }\n throwError(errMsg);\n }\n el = new Clz();\n }\n customInnerStore(el).customGraphicType = graphicType;\n el.name = elOption.name;\n // Compat ec4: the default z2 lift is 1. If changing the number,\n // some cases probably be broken: hierarchy layout along z, like circle packing,\n // where emphasis only intending to modify color/border rather than lift z2.\n el.z2EmphasisLift = 1;\n el.z2SelectLift = 1;\n return el;\n}\nfunction updateElNormal(\n// Can be null/undefined\napi, el, dataIndex, elOption, attachedTxInfo, seriesModel, isInit) {\n // Stop and restore before update any other attributes.\n stopPreviousKeyframeAnimationAndRestore(el);\n var txCfgOpt = attachedTxInfo && attachedTxInfo.normal.cfg;\n if (txCfgOpt) {\n // PENDING: whether use user object directly rather than clone?\n // TODO:5.0 textConfig transition animation?\n el.setTextConfig(txCfgOpt);\n }\n // Default transition ['x', 'y']\n if (elOption && elOption.transition == null) {\n elOption.transition = DEFAULT_TRANSITION;\n }\n // Do some normalization on style.\n var styleOpt = elOption && elOption.style;\n if (styleOpt) {\n if (el.type === 'text') {\n var textOptionStyle = styleOpt;\n // Compatible with ec4: if `textFill` or `textStroke` exists use them.\n hasOwn(textOptionStyle, 'textFill') && (textOptionStyle.fill = textOptionStyle.textFill);\n hasOwn(textOptionStyle, 'textStroke') && (textOptionStyle.stroke = textOptionStyle.textStroke);\n }\n var decalPattern = void 0;\n var decalObj = isPath(el) ? styleOpt.decal : null;\n if (api && decalObj) {\n decalObj.dirty = true;\n decalPattern = createOrUpdatePatternFromDecal(decalObj, api);\n }\n // Always overwrite in case user specify this prop.\n styleOpt.__decalPattern = decalPattern;\n }\n if (isDisplayable(el)) {\n if (styleOpt) {\n var decalPattern = styleOpt.__decalPattern;\n if (decalPattern) {\n styleOpt.decal = decalPattern;\n }\n }\n }\n applyUpdateTransition(el, elOption, seriesModel, {\n dataIndex: dataIndex,\n isInit: isInit,\n clearStyle: true\n });\n applyKeyframeAnimation(el, elOption.keyframeAnimation, seriesModel);\n}\nfunction updateElOnState(state, el, elStateOpt, styleOpt, attachedTxInfo) {\n var elDisplayable = el.isGroup ? null : el;\n var txCfgOpt = attachedTxInfo && attachedTxInfo[state].cfg;\n // PENDING:5.0 support customize scale change and transition animation?\n if (elDisplayable) {\n // By default support auto lift color when hover whether `emphasis` specified.\n var stateObj = elDisplayable.ensureState(state);\n if (styleOpt === false) {\n var existingEmphasisState = elDisplayable.getState(state);\n if (existingEmphasisState) {\n existingEmphasisState.style = null;\n }\n } else {\n // style is needed to enable default emphasis.\n stateObj.style = styleOpt || null;\n }\n // If `elOption.styleEmphasis` or `elOption.emphasis.style` is `false`,\n // remove hover style.\n // If `elOption.textConfig` or `elOption.emphasis.textConfig` is null/undefined, it does not\n // make sense. So for simplicity, we do not ditinguish `hasOwnProperty` and null/undefined.\n if (txCfgOpt) {\n stateObj.textConfig = txCfgOpt;\n }\n setDefaultStateProxy(elDisplayable);\n }\n}\nfunction updateZ(el, elOption, seriesModel) {\n // Group not support textContent and not support z yet.\n if (el.isGroup) {\n return;\n }\n var elDisplayable = el;\n var currentZ = seriesModel.currentZ;\n var currentZLevel = seriesModel.currentZLevel;\n // Always erase.\n elDisplayable.z = currentZ;\n elDisplayable.zlevel = currentZLevel;\n // z2 must not be null/undefined, otherwise sort error may occur.\n var optZ2 = elOption.z2;\n optZ2 != null && (elDisplayable.z2 = optZ2 || 0);\n for (var i = 0; i < STATES.length; i++) {\n updateZForEachState(elDisplayable, elOption, STATES[i]);\n }\n}\nfunction updateZForEachState(elDisplayable, elOption, state) {\n var isNormal = state === NORMAL;\n var elStateOpt = isNormal ? elOption : retrieveStateOption(elOption, state);\n var optZ2 = elStateOpt ? elStateOpt.z2 : null;\n var stateObj;\n if (optZ2 != null) {\n // Do not `ensureState` until required.\n stateObj = isNormal ? elDisplayable : elDisplayable.ensureState(state);\n stateObj.z2 = optZ2 || 0;\n }\n}\nfunction makeRenderItem(customSeries, data, ecModel, api) {\n var renderItem = customSeries.get('renderItem');\n var coordSys = customSeries.coordinateSystem;\n var prepareResult = {};\n if (coordSys) {\n if (process.env.NODE_ENV !== 'production') {\n assert(renderItem, 'series.render is required.');\n assert(coordSys.prepareCustoms || prepareCustoms[coordSys.type], 'This coordSys does not support custom series.');\n }\n // `coordSys.prepareCustoms` is used for external coord sys like bmap.\n prepareResult = coordSys.prepareCustoms ? coordSys.prepareCustoms(coordSys) : prepareCustoms[coordSys.type](coordSys);\n }\n var userAPI = defaults({\n getWidth: api.getWidth,\n getHeight: api.getHeight,\n getZr: api.getZr,\n getDevicePixelRatio: api.getDevicePixelRatio,\n value: value,\n style: style,\n ordinalRawValue: ordinalRawValue,\n styleEmphasis: styleEmphasis,\n visual: visual,\n barLayout: barLayout,\n currentSeriesIndices: currentSeriesIndices,\n font: font\n }, prepareResult.api || {});\n var userParams = {\n // The life cycle of context: current round of rendering.\n // The global life cycle is probably not necessary, because\n // user can store global status by themselves.\n context: {},\n seriesId: customSeries.id,\n seriesName: customSeries.name,\n seriesIndex: customSeries.seriesIndex,\n coordSys: prepareResult.coordSys,\n dataInsideLength: data.count(),\n encode: wrapEncodeDef(customSeries.getData())\n };\n // If someday intending to refactor them to a class, should consider do not\n // break change: currently these attribute member are encapsulated in a closure\n // so that do not need to force user to call these method with a scope.\n // Do not support call `api` asynchronously without dataIndexInside input.\n var currDataIndexInside;\n var currItemModel;\n var currItemStyleModels = {};\n var currLabelModels = {};\n var seriesItemStyleModels = {};\n var seriesLabelModels = {};\n for (var i = 0; i < STATES.length; i++) {\n var stateName = STATES[i];\n seriesItemStyleModels[stateName] = customSeries.getModel(PATH_ITEM_STYLE[stateName]);\n seriesLabelModels[stateName] = customSeries.getModel(PATH_LABEL[stateName]);\n }\n function getItemModel(dataIndexInside) {\n return dataIndexInside === currDataIndexInside ? currItemModel || (currItemModel = data.getItemModel(dataIndexInside)) : data.getItemModel(dataIndexInside);\n }\n function getItemStyleModel(dataIndexInside, state) {\n return !data.hasItemOption ? seriesItemStyleModels[state] : dataIndexInside === currDataIndexInside ? currItemStyleModels[state] || (currItemStyleModels[state] = getItemModel(dataIndexInside).getModel(PATH_ITEM_STYLE[state])) : getItemModel(dataIndexInside).getModel(PATH_ITEM_STYLE[state]);\n }\n function getLabelModel(dataIndexInside, state) {\n return !data.hasItemOption ? seriesLabelModels[state] : dataIndexInside === currDataIndexInside ? currLabelModels[state] || (currLabelModels[state] = getItemModel(dataIndexInside).getModel(PATH_LABEL[state])) : getItemModel(dataIndexInside).getModel(PATH_LABEL[state]);\n }\n return function (dataIndexInside, payload) {\n currDataIndexInside = dataIndexInside;\n currItemModel = null;\n currItemStyleModels = {};\n currLabelModels = {};\n return renderItem && renderItem(defaults({\n dataIndexInside: dataIndexInside,\n dataIndex: data.getRawIndex(dataIndexInside),\n // Can be used for optimization when zoom or roam.\n actionType: payload ? payload.type : null\n }, userParams), userAPI);\n };\n /**\n * @public\n * @param dim by default 0.\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function value(dim, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n return data.getStore().get(data.getDimensionIndex(dim || 0), dataIndexInside);\n }\n /**\n * @public\n * @param dim by default 0.\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function ordinalRawValue(dim, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n dim = dim || 0;\n var dimInfo = data.getDimensionInfo(dim);\n if (!dimInfo) {\n var dimIndex = data.getDimensionIndex(dim);\n return dimIndex >= 0 ? data.getStore().get(dimIndex, dataIndexInside) : undefined;\n }\n var val = data.get(dimInfo.name, dataIndexInside);\n var ordinalMeta = dimInfo && dimInfo.ordinalMeta;\n return ordinalMeta ? ordinalMeta.categories[val] : val;\n }\n /**\n * @deprecated The original intention of `api.style` is enable to set itemStyle\n * like other series. But it is not necessary and not easy to give a strict definition\n * of what it returns. And since echarts5 it needs to be make compat work. So\n * deprecates it since echarts5.\n *\n * By default, `visual` is applied to style (to support visualMap).\n * `visual.color` is applied at `fill`. If user want apply visual.color on `stroke`,\n * it can be implemented as:\n * `api.style({stroke: api.visual('color'), fill: null})`;\n *\n * [Compat]: since ec5, RectText has been separated from its hosts el.\n * so `api.style()` will only return the style from `itemStyle` but not handle `label`\n * any more. But `series.label` config is never published in doc.\n * We still compat it in `api.style()`. But not encourage to use it and will still not\n * to pulish it to doc.\n * @public\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function style(userProps, dataIndexInside) {\n if (process.env.NODE_ENV !== 'production') {\n warnDeprecated('api.style', 'Please write literal style directly instead.');\n }\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n var style = data.getItemVisual(dataIndexInside, 'style');\n var visualColor = style && style.fill;\n var opacity = style && style.opacity;\n var itemStyle = getItemStyleModel(dataIndexInside, NORMAL).getItemStyle();\n visualColor != null && (itemStyle.fill = visualColor);\n opacity != null && (itemStyle.opacity = opacity);\n var opt = {\n inheritColor: isString(visualColor) ? visualColor : '#000'\n };\n var labelModel = getLabelModel(dataIndexInside, NORMAL);\n // Now that the feature of \"auto adjust text fill/stroke\" has been migrated to zrender\n // since ec5, we should set `isAttached` as `false` here and make compat in\n // `convertToEC4StyleForCustomSerise`.\n var textStyle = labelStyleHelper.createTextStyle(labelModel, null, opt, false, true);\n textStyle.text = labelModel.getShallow('show') ? retrieve2(customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null;\n var textConfig = labelStyleHelper.createTextConfig(labelModel, opt, false);\n preFetchFromExtra(userProps, itemStyle);\n itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig);\n userProps && applyUserPropsAfter(itemStyle, userProps);\n itemStyle.legacy = true;\n return itemStyle;\n }\n /**\n * @deprecated The reason see `api.style()`\n * @public\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function styleEmphasis(userProps, dataIndexInside) {\n if (process.env.NODE_ENV !== 'production') {\n warnDeprecated('api.styleEmphasis', 'Please write literal style directly instead.');\n }\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n var itemStyle = getItemStyleModel(dataIndexInside, EMPHASIS).getItemStyle();\n var labelModel = getLabelModel(dataIndexInside, EMPHASIS);\n var textStyle = labelStyleHelper.createTextStyle(labelModel, null, null, true, true);\n textStyle.text = labelModel.getShallow('show') ? retrieve3(customSeries.getFormattedLabel(dataIndexInside, EMPHASIS), customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null;\n var textConfig = labelStyleHelper.createTextConfig(labelModel, null, true);\n preFetchFromExtra(userProps, itemStyle);\n itemStyle = convertToEC4StyleForCustomSerise(itemStyle, textStyle, textConfig);\n userProps && applyUserPropsAfter(itemStyle, userProps);\n itemStyle.legacy = true;\n return itemStyle;\n }\n function applyUserPropsAfter(itemStyle, extra) {\n for (var key in extra) {\n if (hasOwn(extra, key)) {\n itemStyle[key] = extra[key];\n }\n }\n }\n function preFetchFromExtra(extra, itemStyle) {\n // A trick to retrieve those props firstly, which are used to\n // apply auto inside fill/stroke in `convertToEC4StyleForCustomSerise`.\n // (It's not reasonable but only for a degree of compat)\n if (extra) {\n extra.textFill && (itemStyle.textFill = extra.textFill);\n extra.textPosition && (itemStyle.textPosition = extra.textPosition);\n }\n }\n /**\n * @public\n * @param dataIndexInside by default `currDataIndexInside`.\n */\n function visual(visualType, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n if (hasOwn(STYLE_VISUAL_TYPE, visualType)) {\n var style_1 = data.getItemVisual(dataIndexInside, 'style');\n return style_1 ? style_1[STYLE_VISUAL_TYPE[visualType]] : null;\n }\n // Only support these visuals. Other visual might be inner tricky\n // for performance (like `style`), do not expose to users.\n if (hasOwn(NON_STYLE_VISUAL_PROPS, visualType)) {\n return data.getItemVisual(dataIndexInside, visualType);\n }\n }\n /**\n * @public\n * @return If not support, return undefined.\n */\n function barLayout(opt) {\n if (coordSys.type === 'cartesian2d') {\n var baseAxis = coordSys.getBaseAxis();\n return getLayoutOnAxis(defaults({\n axis: baseAxis\n }, opt));\n }\n }\n /**\n * @public\n */\n function currentSeriesIndices() {\n return ecModel.getCurrentSeriesIndices();\n }\n /**\n * @public\n * @return font string\n */\n function font(opt) {\n return labelStyleHelper.getFont(opt, ecModel);\n }\n}\nfunction wrapEncodeDef(data) {\n var encodeDef = {};\n each(data.dimensions, function (dimName) {\n var dimInfo = data.getDimensionInfo(dimName);\n if (!dimInfo.isExtraCoord) {\n var coordDim = dimInfo.coordDim;\n var dataDims = encodeDef[coordDim] = encodeDef[coordDim] || [];\n dataDims[dimInfo.coordDimIndex] = data.getDimensionIndex(dimName);\n }\n });\n return encodeDef;\n}\nfunction createOrUpdateItem(api, existsEl, dataIndex, elOption, seriesModel, group, data) {\n // [Rule]\n // If `renderItem` returns `null`/`undefined`/`false`, remove the previous el if existing.\n // (It seems that violate the \"merge\" principle, but most of users probably intuitively\n // regard \"return;\" as \"show nothing element whatever\", so make a exception to meet the\n // most cases.)\n // The rule or \"merge\" see [STRATEGY_MERGE].\n // If `elOption` is `null`/`undefined`/`false` (when `renderItem` returns nothing).\n if (!elOption) {\n group.remove(existsEl);\n return;\n }\n var el = doCreateOrUpdateEl(api, existsEl, dataIndex, elOption, seriesModel, group);\n el && data.setItemGraphicEl(dataIndex, el);\n el && toggleHoverEmphasis(el, elOption.focus, elOption.blurScope, elOption.emphasisDisabled);\n return el;\n}\nfunction doCreateOrUpdateEl(api, existsEl, dataIndex, elOption, seriesModel, group) {\n if (process.env.NODE_ENV !== 'production') {\n assert(elOption, 'should not have an null/undefined element setting');\n }\n var toBeReplacedIdx = -1;\n var oldEl = existsEl;\n if (existsEl && doesElNeedRecreate(existsEl, elOption, seriesModel)\n // || (\n // // PENDING: even in one-to-one mapping case, if el is marked as morph,\n // // do not sure whether the el will be mapped to another el with different\n // // hierarchy in Group tree. So always recreate el rather than reuse the el.\n // morphHelper && morphHelper.isOneToOneFrom(el)\n // )\n ) {\n // Should keep at the original index, otherwise \"merge by index\" will be incorrect.\n toBeReplacedIdx = indexOf(group.childrenRef(), existsEl);\n existsEl = null;\n }\n var isInit = !existsEl;\n var el = existsEl;\n if (!el) {\n el = createEl(elOption);\n if (oldEl) {\n copyElement(oldEl, el);\n }\n } else {\n // FIMXE:NEXT unified clearState?\n // If in some case the performance issue arised, consider\n // do not clearState but update cached normal state directly.\n el.clearStates();\n }\n // Need to set morph: false explictly to disable automatically morphing.\n if (elOption.morph === false) {\n el.disableMorphing = true;\n } else if (el.disableMorphing) {\n el.disableMorphing = false;\n }\n attachedTxInfoTmp.normal.cfg = attachedTxInfoTmp.normal.conOpt = attachedTxInfoTmp.emphasis.cfg = attachedTxInfoTmp.emphasis.conOpt = attachedTxInfoTmp.blur.cfg = attachedTxInfoTmp.blur.conOpt = attachedTxInfoTmp.select.cfg = attachedTxInfoTmp.select.conOpt = null;\n attachedTxInfoTmp.isLegacy = false;\n doCreateOrUpdateAttachedTx(el, dataIndex, elOption, seriesModel, isInit, attachedTxInfoTmp);\n doCreateOrUpdateClipPath(el, dataIndex, elOption, seriesModel, isInit);\n updateElNormal(api, el, dataIndex, elOption, attachedTxInfoTmp, seriesModel, isInit);\n // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n // Update them only when user specified, otherwise, remain.\n hasOwn(elOption, 'info') && (customInnerStore(el).info = elOption.info);\n for (var i = 0; i < STATES.length; i++) {\n var stateName = STATES[i];\n if (stateName !== NORMAL) {\n var otherStateOpt = retrieveStateOption(elOption, stateName);\n var otherStyleOpt = retrieveStyleOptionOnState(elOption, otherStateOpt, stateName);\n updateElOnState(stateName, el, otherStateOpt, otherStyleOpt, attachedTxInfoTmp);\n }\n }\n updateZ(el, elOption, seriesModel);\n if (elOption.type === 'group') {\n mergeChildren(api, el, dataIndex, elOption, seriesModel);\n }\n if (toBeReplacedIdx >= 0) {\n group.replaceAt(el, toBeReplacedIdx);\n } else {\n group.add(el);\n }\n return el;\n}\n// `el` must not be null/undefined.\nfunction doesElNeedRecreate(el, elOption, seriesModel) {\n var elInner = customInnerStore(el);\n var elOptionType = elOption.type;\n var elOptionShape = elOption.shape;\n var elOptionStyle = elOption.style;\n return (\n // Always create new if universal transition is enabled.\n // Because we do transition after render. It needs to know what old element is. Replacement will loose it.\n seriesModel.isUniversalTransitionEnabled()\n // If `elOptionType` is `null`, follow the merge principle.\n || elOptionType != null && elOptionType !== elInner.customGraphicType || elOptionType === 'path' && hasOwnPathData(elOptionShape) && getPathData(elOptionShape) !== elInner.customPathData || elOptionType === 'image' && hasOwn(elOptionStyle, 'image') && elOptionStyle.image !== elInner.customImagePath\n // // FIXME test and remove this restriction?\n // || (elOptionType === 'text'\n // && hasOwn(elOptionStyle, 'text')\n // && (elOptionStyle as TextStyleProps).text !== elInner.customText\n // )\n );\n}\n\nfunction doCreateOrUpdateClipPath(el, dataIndex, elOption, seriesModel, isInit) {\n // Based on the \"merge\" principle, if no clipPath provided,\n // do nothing. The exists clip will be totally removed only if\n // `el.clipPath` is `false`. Otherwise it will be merged/replaced.\n var clipPathOpt = elOption.clipPath;\n if (clipPathOpt === false) {\n if (el && el.getClipPath()) {\n el.removeClipPath();\n }\n } else if (clipPathOpt) {\n var clipPath = el.getClipPath();\n if (clipPath && doesElNeedRecreate(clipPath, clipPathOpt, seriesModel)) {\n clipPath = null;\n }\n if (!clipPath) {\n clipPath = createEl(clipPathOpt);\n if (process.env.NODE_ENV !== 'production') {\n assert(isPath(clipPath), 'Only any type of `path` can be used in `clipPath`, rather than ' + clipPath.type + '.');\n }\n el.setClipPath(clipPath);\n }\n updateElNormal(null, clipPath, dataIndex, clipPathOpt, null, seriesModel, isInit);\n }\n // If not define `clipPath` in option, do nothing unnecessary.\n}\n\nfunction doCreateOrUpdateAttachedTx(el, dataIndex, elOption, seriesModel, isInit, attachedTxInfo) {\n // Group does not support textContent temporarily until necessary.\n if (el.isGroup) {\n return;\n }\n // Normal must be called before emphasis, for `isLegacy` detection.\n processTxInfo(elOption, null, attachedTxInfo);\n processTxInfo(elOption, EMPHASIS, attachedTxInfo);\n // If `elOption.textConfig` or `elOption.textContent` is null/undefined, it does not make sense.\n // So for simplicity, if \"elOption hasOwnProperty of them but be null/undefined\", we do not\n // trade them as set to null to el.\n // Especially:\n // `elOption.textContent: false` means remove textContent.\n // `elOption.textContent.emphasis.style: false` means remove the style from emphasis state.\n var txConOptNormal = attachedTxInfo.normal.conOpt;\n var txConOptEmphasis = attachedTxInfo.emphasis.conOpt;\n var txConOptBlur = attachedTxInfo.blur.conOpt;\n var txConOptSelect = attachedTxInfo.select.conOpt;\n if (txConOptNormal != null || txConOptEmphasis != null || txConOptSelect != null || txConOptBlur != null) {\n var textContent = el.getTextContent();\n if (txConOptNormal === false) {\n textContent && el.removeTextContent();\n } else {\n txConOptNormal = attachedTxInfo.normal.conOpt = txConOptNormal || {\n type: 'text'\n };\n if (!textContent) {\n textContent = createEl(txConOptNormal);\n el.setTextContent(textContent);\n } else {\n // If in some case the performance issue arised, consider\n // do not clearState but update cached normal state directly.\n textContent.clearStates();\n }\n updateElNormal(null, textContent, dataIndex, txConOptNormal, null, seriesModel, isInit);\n var txConStlOptNormal = txConOptNormal && txConOptNormal.style;\n for (var i = 0; i < STATES.length; i++) {\n var stateName = STATES[i];\n if (stateName !== NORMAL) {\n var txConOptOtherState = attachedTxInfo[stateName].conOpt;\n updateElOnState(stateName, textContent, txConOptOtherState, retrieveStyleOptionOnState(txConOptNormal, txConOptOtherState, stateName), null);\n }\n }\n txConStlOptNormal ? textContent.dirty() : textContent.markRedraw();\n }\n }\n}\nfunction processTxInfo(elOption, state, attachedTxInfo) {\n var stateOpt = !state ? elOption : retrieveStateOption(elOption, state);\n var styleOpt = !state ? elOption.style : retrieveStyleOptionOnState(elOption, stateOpt, EMPHASIS);\n var elType = elOption.type;\n var txCfg = stateOpt ? stateOpt.textConfig : null;\n var txConOptNormal = elOption.textContent;\n var txConOpt = !txConOptNormal ? null : !state ? txConOptNormal : retrieveStateOption(txConOptNormal, state);\n if (styleOpt && (\n // Because emphasis style has little info to detect legacy,\n // if normal is legacy, emphasis is trade as legacy.\n attachedTxInfo.isLegacy || isEC4CompatibleStyle(styleOpt, elType, !!txCfg, !!txConOpt))) {\n attachedTxInfo.isLegacy = true;\n var convertResult = convertFromEC4CompatibleStyle(styleOpt, elType, !state);\n // Explicitly specified `textConfig` and `textContent` has higher priority than\n // the ones generated by legacy style. Otherwise if users use them and `api.style`\n // at the same time, they not both work and hardly to known why.\n if (!txCfg && convertResult.textConfig) {\n txCfg = convertResult.textConfig;\n }\n if (!txConOpt && convertResult.textContent) {\n txConOpt = convertResult.textContent;\n }\n }\n if (!state && txConOpt) {\n var txConOptNormal_1 = txConOpt;\n // `textContent: {type: 'text'}`, the \"type\" is easy to be missing. So we tolerate it.\n !txConOptNormal_1.type && (txConOptNormal_1.type = 'text');\n if (process.env.NODE_ENV !== 'production') {\n // Do not tolerate incorrcet type for forward compat.\n assert(txConOptNormal_1.type === 'text', 'textContent.type must be \"text\"');\n }\n }\n var info = !state ? attachedTxInfo.normal : attachedTxInfo[state];\n info.cfg = txCfg;\n info.conOpt = txConOpt;\n}\nfunction retrieveStateOption(elOption, state) {\n return !state ? elOption : elOption ? elOption[state] : null;\n}\nfunction retrieveStyleOptionOnState(stateOptionNormal, stateOption, state) {\n var style = stateOption && stateOption.style;\n if (style == null && state === EMPHASIS && stateOptionNormal) {\n style = stateOptionNormal.styleEmphasis;\n }\n return style;\n}\n// Usage:\n// (1) By default, `elOption.$mergeChildren` is `'byIndex'`, which indicates\n// that the existing children will not be removed, and enables the feature\n// that update some of the props of some of the children simply by construct\n// the returned children of `renderItem` like:\n// `var children = group.children = []; children[3] = {opacity: 0.5};`\n// (2) If `elOption.$mergeChildren` is `'byName'`, add/update/remove children\n// by child.name. But that might be lower performance.\n// (3) If `elOption.$mergeChildren` is `false`, the existing children will be\n// replaced totally.\n// (4) If `!elOption.children`, following the \"merge\" principle, nothing will\n// happen.\n// (5) If `elOption.$mergeChildren` is not `false` neither `'byName'` and the\n// `el` is a group, and if any of the new child is null, it means to remove\n// the element at the same index, if exists. On the other hand, if the new\n// child is and empty object `{}`, it means to keep the element not changed.\n//\n// For implementation simpleness, do not provide a direct way to remove single\n// child (otherwise the total indices of the children array have to be modified).\n// User can remove a single child by setting its `ignore` to `true`.\nfunction mergeChildren(api, el, dataIndex, elOption, seriesModel) {\n var newChildren = elOption.children;\n var newLen = newChildren ? newChildren.length : 0;\n var mergeChildren = elOption.$mergeChildren;\n // `diffChildrenByName` has been deprecated.\n var byName = mergeChildren === 'byName' || elOption.diffChildrenByName;\n var notMerge = mergeChildren === false;\n // For better performance on roam update, only enter if necessary.\n if (!newLen && !byName && !notMerge) {\n return;\n }\n if (byName) {\n diffGroupChildren({\n api: api,\n oldChildren: el.children() || [],\n newChildren: newChildren || [],\n dataIndex: dataIndex,\n seriesModel: seriesModel,\n group: el\n });\n return;\n }\n notMerge && el.removeAll();\n // Mapping children of a group simply by index, which\n // might be better performance.\n var index = 0;\n for (; index < newLen; index++) {\n var newChild = newChildren[index];\n var oldChild = el.childAt(index);\n if (newChild) {\n if (newChild.ignore == null) {\n // The old child is set to be ignored if null (see comments\n // below). So we need to set ignore to be false back.\n newChild.ignore = false;\n }\n doCreateOrUpdateEl(api, oldChild, dataIndex, newChild, seriesModel, el);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n assert(oldChild, 'renderItem should not return a group containing elements' + ' as null/undefined/{} if they do not exist before.');\n }\n // If the new element option is null, it means to remove the old\n // element. But we cannot really remove the element from the group\n // directly, because the element order may not be stable when this\n // element is added back. So we set the element to be ignored.\n oldChild.ignore = true;\n }\n }\n for (var i = el.childCount() - 1; i >= index; i--) {\n var child = el.childAt(i);\n removeChildFromGroup(el, child, seriesModel);\n }\n}\nfunction removeChildFromGroup(group, child, seriesModel) {\n // Do not support leave elements that are not mentioned in the latest\n // `renderItem` return. Otherwise users may not have a clear and simple\n // concept that how to control all of the elements.\n child && applyLeaveTransition(child, customInnerStore(group).option, seriesModel);\n}\nfunction diffGroupChildren(context) {\n new DataDiffer(context.oldChildren, context.newChildren, getKey, getKey, context).add(processAddUpdate).update(processAddUpdate).remove(processRemove).execute();\n}\nfunction getKey(item, idx) {\n var name = item && item.name;\n return name != null ? name : GROUP_DIFF_PREFIX + idx;\n}\nfunction processAddUpdate(newIndex, oldIndex) {\n var context = this.context;\n var childOption = newIndex != null ? context.newChildren[newIndex] : null;\n var child = oldIndex != null ? context.oldChildren[oldIndex] : null;\n doCreateOrUpdateEl(context.api, child, context.dataIndex, childOption, context.seriesModel, context.group);\n}\nfunction processRemove(oldIndex) {\n var context = this.context;\n var child = context.oldChildren[oldIndex];\n child && applyLeaveTransition(child, customInnerStore(child).option, context.seriesModel);\n}\n/**\n * @return SVG Path data.\n */\nfunction getPathData(shape) {\n // \"d\" follows the SVG convention.\n return shape && (shape.pathData || shape.d);\n}\nfunction hasOwnPathData(shape) {\n return shape && (hasOwn(shape, 'pathData') || hasOwn(shape, 'd'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CustomSeriesModel from './CustomSeries.js';\nimport CustomChartView from './CustomView.js';\nexport function install(registers) {\n registers.registerChartView(CustomChartView);\n registers.registerSeriesModel(CustomSeriesModel);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as axisPointerModelHelper from './modelHelper.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar clone = zrUtil.clone;\nvar bind = zrUtil.bind;\n/**\n * Base axis pointer class in 2D.\n */\nvar BaseAxisPointer = /** @class */function () {\n function BaseAxisPointer() {\n this._dragging = false;\n /**\n * In px, arbitrary value. Do not set too small,\n * no animation is ok for most cases.\n */\n this.animationThreshold = 15;\n }\n /**\n * @implement\n */\n BaseAxisPointer.prototype.render = function (axisModel, axisPointerModel, api, forceRender) {\n var value = axisPointerModel.get('value');\n var status = axisPointerModel.get('status');\n // Bind them to `this`, not in closure, otherwise they will not\n // be replaced when user calling setOption in not merge mode.\n this._axisModel = axisModel;\n this._axisPointerModel = axisPointerModel;\n this._api = api;\n // Optimize: `render` will be called repeatedly during mouse move.\n // So it is power consuming if performing `render` each time,\n // especially on mobile device.\n if (!forceRender && this._lastValue === value && this._lastStatus === status) {\n return;\n }\n this._lastValue = value;\n this._lastStatus = status;\n var group = this._group;\n var handle = this._handle;\n if (!status || status === 'hide') {\n // Do not clear here, for animation better.\n group && group.hide();\n handle && handle.hide();\n return;\n }\n group && group.show();\n handle && handle.show();\n // Otherwise status is 'show'\n var elOption = {};\n this.makeElOption(elOption, value, axisModel, axisPointerModel, api);\n // Enable change axis pointer type.\n var graphicKey = elOption.graphicKey;\n if (graphicKey !== this._lastGraphicKey) {\n this.clear(api);\n }\n this._lastGraphicKey = graphicKey;\n var moveAnimation = this._moveAnimation = this.determineAnimation(axisModel, axisPointerModel);\n if (!group) {\n group = this._group = new graphic.Group();\n this.createPointerEl(group, elOption, axisModel, axisPointerModel);\n this.createLabelEl(group, elOption, axisModel, axisPointerModel);\n api.getZr().add(group);\n } else {\n var doUpdateProps = zrUtil.curry(updateProps, axisPointerModel, moveAnimation);\n this.updatePointerEl(group, elOption, doUpdateProps);\n this.updateLabelEl(group, elOption, doUpdateProps, axisPointerModel);\n }\n updateMandatoryProps(group, axisPointerModel, true);\n this._renderHandle(value);\n };\n /**\n * @implement\n */\n BaseAxisPointer.prototype.remove = function (api) {\n this.clear(api);\n };\n /**\n * @implement\n */\n BaseAxisPointer.prototype.dispose = function (api) {\n this.clear(api);\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.determineAnimation = function (axisModel, axisPointerModel) {\n var animation = axisPointerModel.get('animation');\n var axis = axisModel.axis;\n var isCategoryAxis = axis.type === 'category';\n var useSnap = axisPointerModel.get('snap');\n // Value axis without snap always do not snap.\n if (!useSnap && !isCategoryAxis) {\n return false;\n }\n if (animation === 'auto' || animation == null) {\n var animationThreshold = this.animationThreshold;\n if (isCategoryAxis && axis.getBandWidth() > animationThreshold) {\n return true;\n }\n // It is important to auto animation when snap used. Consider if there is\n // a dataZoom, animation will be disabled when too many points exist, while\n // it will be enabled for better visual effect when little points exist.\n if (useSnap) {\n var seriesDataCount = axisPointerModelHelper.getAxisInfo(axisModel).seriesDataCount;\n var axisExtent = axis.getExtent();\n // Approximate band width\n return Math.abs(axisExtent[0] - axisExtent[1]) / seriesDataCount > animationThreshold;\n }\n return false;\n }\n return animation === true;\n };\n /**\n * add {pointer, label, graphicKey} to elOption\n * @protected\n */\n BaseAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n // Should be implemenented by sub-class.\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.createPointerEl = function (group, elOption, axisModel, axisPointerModel) {\n var pointerOption = elOption.pointer;\n if (pointerOption) {\n var pointerEl = inner(group).pointerEl = new graphic[pointerOption.type](clone(elOption.pointer));\n group.add(pointerEl);\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.createLabelEl = function (group, elOption, axisModel, axisPointerModel) {\n if (elOption.label) {\n var labelEl = inner(group).labelEl = new graphic.Text(clone(elOption.label));\n group.add(labelEl);\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.updatePointerEl = function (group, elOption, updateProps) {\n var pointerEl = inner(group).pointerEl;\n if (pointerEl && elOption.pointer) {\n pointerEl.setStyle(elOption.pointer.style);\n updateProps(pointerEl, {\n shape: elOption.pointer.shape\n });\n }\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.updateLabelEl = function (group, elOption, updateProps, axisPointerModel) {\n var labelEl = inner(group).labelEl;\n if (labelEl) {\n labelEl.setStyle(elOption.label.style);\n updateProps(labelEl, {\n // Consider text length change in vertical axis, animation should\n // be used on shape, otherwise the effect will be weird.\n // TODOTODO\n // shape: elOption.label.shape,\n x: elOption.label.x,\n y: elOption.label.y\n });\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n };\n /**\n * @private\n */\n BaseAxisPointer.prototype._renderHandle = function (value) {\n if (this._dragging || !this.updateHandleTransform) {\n return;\n }\n var axisPointerModel = this._axisPointerModel;\n var zr = this._api.getZr();\n var handle = this._handle;\n var handleModel = axisPointerModel.getModel('handle');\n var status = axisPointerModel.get('status');\n if (!handleModel.get('show') || !status || status === 'hide') {\n handle && zr.remove(handle);\n this._handle = null;\n return;\n }\n var isInit;\n if (!this._handle) {\n isInit = true;\n handle = this._handle = graphic.createIcon(handleModel.get('icon'), {\n cursor: 'move',\n draggable: true,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n onmousedown: bind(this._onHandleDragMove, this, 0, 0),\n drift: bind(this._onHandleDragMove, this),\n ondragend: bind(this._onHandleDragEnd, this)\n });\n zr.add(handle);\n }\n updateMandatoryProps(handle, axisPointerModel, false);\n // update style\n handle.setStyle(handleModel.getItemStyle(null, ['color', 'borderColor', 'borderWidth', 'opacity', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY']));\n // update position\n var handleSize = handleModel.get('size');\n if (!zrUtil.isArray(handleSize)) {\n handleSize = [handleSize, handleSize];\n }\n handle.scaleX = handleSize[0] / 2;\n handle.scaleY = handleSize[1] / 2;\n throttleUtil.createOrUpdate(this, '_doDispatchAxisPointer', handleModel.get('throttle') || 0, 'fixRate');\n this._moveHandleToValue(value, isInit);\n };\n BaseAxisPointer.prototype._moveHandleToValue = function (value, isInit) {\n updateProps(this._axisPointerModel, !isInit && this._moveAnimation, this._handle, getHandleTransProps(this.getHandleTransform(value, this._axisModel, this._axisPointerModel)));\n };\n BaseAxisPointer.prototype._onHandleDragMove = function (dx, dy) {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n this._dragging = true;\n // Persistent for throttle.\n var trans = this.updateHandleTransform(getHandleTransProps(handle), [dx, dy], this._axisModel, this._axisPointerModel);\n this._payloadInfo = trans;\n handle.stopAnimation();\n handle.attr(getHandleTransProps(trans));\n inner(handle).lastProp = null;\n this._doDispatchAxisPointer();\n };\n /**\n * Throttled method.\n */\n BaseAxisPointer.prototype._doDispatchAxisPointer = function () {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n var payloadInfo = this._payloadInfo;\n var axisModel = this._axisModel;\n this._api.dispatchAction({\n type: 'updateAxisPointer',\n x: payloadInfo.cursorPoint[0],\n y: payloadInfo.cursorPoint[1],\n tooltipOption: payloadInfo.tooltipOption,\n axesInfo: [{\n axisDim: axisModel.axis.dim,\n axisIndex: axisModel.componentIndex\n }]\n });\n };\n BaseAxisPointer.prototype._onHandleDragEnd = function () {\n this._dragging = false;\n var handle = this._handle;\n if (!handle) {\n return;\n }\n var value = this._axisPointerModel.get('value');\n // Consider snap or categroy axis, handle may be not consistent with\n // axisPointer. So move handle to align the exact value position when\n // drag ended.\n this._moveHandleToValue(value);\n // For the effect: tooltip will be shown when finger holding on handle\n // button, and will be hidden after finger left handle button.\n this._api.dispatchAction({\n type: 'hideTip'\n });\n };\n /**\n * @private\n */\n BaseAxisPointer.prototype.clear = function (api) {\n this._lastValue = null;\n this._lastStatus = null;\n var zr = api.getZr();\n var group = this._group;\n var handle = this._handle;\n if (zr && group) {\n this._lastGraphicKey = null;\n group && zr.remove(group);\n handle && zr.remove(handle);\n this._group = null;\n this._handle = null;\n this._payloadInfo = null;\n }\n throttleUtil.clear(this, '_doDispatchAxisPointer');\n };\n /**\n * @protected\n */\n BaseAxisPointer.prototype.doClear = function () {\n // Implemented by sub-class if necessary.\n };\n BaseAxisPointer.prototype.buildLabel = function (xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n };\n return BaseAxisPointer;\n}();\nfunction updateProps(animationModel, moveAnimation, el, props) {\n // Animation optimize.\n if (!propsEqual(inner(el).lastProp, props)) {\n inner(el).lastProp = props;\n moveAnimation ? graphic.updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props));\n }\n}\nfunction propsEqual(lastProps, newProps) {\n if (zrUtil.isObject(lastProps) && zrUtil.isObject(newProps)) {\n var equals_1 = true;\n zrUtil.each(newProps, function (item, key) {\n equals_1 = equals_1 && propsEqual(lastProps[key], item);\n });\n return !!equals_1;\n } else {\n return lastProps === newProps;\n }\n}\nfunction updateLabelShowHide(labelEl, axisPointerModel) {\n labelEl[axisPointerModel.get(['label', 'show']) ? 'show' : 'hide']();\n}\nfunction getHandleTransProps(trans) {\n return {\n x: trans.x || 0,\n y: trans.y || 0,\n rotation: trans.rotation || 0\n };\n}\nfunction updateMandatoryProps(group, axisPointerModel, silent) {\n var z = axisPointerModel.get('z');\n var zlevel = axisPointerModel.get('zlevel');\n group && group.traverse(function (el) {\n if (el.type !== 'group') {\n z != null && (el.z = z);\n zlevel != null && (el.zlevel = zlevel);\n el.silent = silent;\n }\n });\n}\nexport default BaseAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nexport function buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n } else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n return style;\n}\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\nexport function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n });\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2];\n // Adjust by align.\n var align = labelPos.align;\n align === 'right' && (position[0] -= width);\n align === 'center' && (position[0] -= width / 2);\n var verticalAlign = labelPos.verticalAlign;\n verticalAlign === 'bottom' && (position[1] -= height);\n verticalAlign === 'middle' && (position[1] -= height / 2);\n // Not overflow ec container\n confineInContainer(position, width, height, api);\n var bgColor = labelModel.get('backgroundColor');\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get(['axisLine', 'lineStyle', 'color']);\n }\n elOption.label = {\n // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},\n x: position[0],\n y: position[1],\n style: createTextStyle(labelModel, {\n text: text,\n font: font,\n fill: labelModel.getTextColor(),\n padding: paddings,\n backgroundColor: bgColor\n }),\n // Label should be over axisPointer.\n z2: 10\n };\n}\n// Do not overflow ec container\nfunction confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}\nexport function getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel({\n value: value\n }, {\n // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n precision: opt.precision\n });\n var formatter = opt.formatter;\n if (formatter) {\n var params_1 = {\n value: axisHelper.getAxisRawValue(axis, {\n value: value\n }),\n axisDimension: axis.dim,\n axisIndex: axis.index,\n seriesData: []\n };\n zrUtil.each(seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams && params_1.seriesData.push(dataParams);\n });\n if (zrUtil.isString(formatter)) {\n text = formatter.replace('{value}', text);\n } else if (zrUtil.isFunction(formatter)) {\n text = formatter(params_1);\n }\n }\n return text;\n}\nexport function getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n return graphic.applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform);\n}\nexport function buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) {\n // @ts-ignore\n var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection);\n layoutInfo.labelMargin = axisPointerModel.get(['label', 'margin']);\n buildLabelElOption(elOption, axisModel, axisPointerModel, api, {\n position: getTransformedPosition(axisModel.axis, value, layoutInfo),\n align: textLayout.textAlign,\n verticalAlign: textLayout.textVerticalAlign\n });\n}\nexport function makeLineShape(p1, p2, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x1: p1[xDimIndex],\n y1: p1[1 - xDimIndex],\n x2: p2[xDimIndex],\n y2: p2[1 - xDimIndex]\n };\n}\nexport function makeRectShape(xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n}\nexport function makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper.js';\nvar CartesianAxisPointer = /** @class */function (_super) {\n __extends(CartesianAxisPointer, _super);\n function CartesianAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n CartesianAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisPointerType = axisPointerModel.get('type');\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var pixelValue = axis.toGlobalCoord(axis.dataToCoord(value, true));\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var layoutInfo = cartesianAxisHelper.layout(grid.model, axisModel);\n viewHelper.buildCartesianSingleLabelElOption(\n // @ts-ignore\n value, elOption, layoutInfo, axisModel, axisPointerModel, api);\n };\n /**\n * @override\n */\n CartesianAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {\n var layoutInfo = cartesianAxisHelper.layout(axisModel.axis.grid.model, axisModel, {\n labelInside: false\n });\n // @ts-ignore\n layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']);\n var pos = viewHelper.getTransformedPosition(axisModel.axis, value, layoutInfo);\n return {\n x: pos[0],\n y: pos[1],\n rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)\n };\n };\n /**\n * @override\n */\n CartesianAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisExtent = axis.getGlobalExtent(true);\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var dimIndex = axis.dim === 'x' ? 0 : 1;\n var currPosition = [transform.x, transform.y];\n currPosition[dimIndex] += delta[dimIndex];\n currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]);\n currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]);\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n // Make tooltip do not overlap axisPointer and in the middle of the grid.\n var tooltipOptions = [{\n verticalAlign: 'middle'\n }, {\n align: 'center'\n }];\n return {\n x: currPosition[0],\n y: currPosition[1],\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: tooltipOptions[dimIndex]\n };\n };\n return CartesianAxisPointer;\n}(BaseAxisPointer);\nfunction getCartesian(grid, axis) {\n var opt = {};\n opt[axis.dim + 'AxisIndex'] = axis.index;\n return grid.getCartesian(opt);\n}\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getAxisDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var span = otherExtent[1] - otherExtent[0];\n return {\n type: 'Rect',\n shape: viewHelper.makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getAxisDimIndex(axis))\n };\n }\n};\nfunction getAxisDimIndex(axis) {\n return axis.dim === 'x' ? 0 : 1;\n}\nexport default CartesianAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar AxisPointerModel = /** @class */function (_super) {\n __extends(AxisPointerModel, _super);\n function AxisPointerModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisPointerModel.type;\n return _this;\n }\n AxisPointerModel.type = 'axisPointer';\n AxisPointerModel.defaultOption = {\n // 'auto' means that show when triggered by tooltip or handle.\n show: 'auto',\n // zlevel: 0,\n z: 50,\n type: 'line',\n // axispointer triggered by tootip determine snap automatically,\n // see `modelHelper`.\n snap: false,\n triggerTooltip: true,\n triggerEmphasis: true,\n value: null,\n status: null,\n link: [],\n // Do not set 'auto' here, otherwise global animation: false\n // will not effect at this axispointer.\n animation: null,\n animationDurationUpdate: 200,\n lineStyle: {\n color: '#B9BEC9',\n width: 1,\n type: 'dashed'\n },\n shadowStyle: {\n color: 'rgba(210,219,238,0.2)'\n },\n label: {\n show: true,\n formatter: null,\n precision: 'auto',\n margin: 3,\n color: '#fff',\n padding: [5, 7, 5, 7],\n backgroundColor: 'auto',\n borderColor: null,\n borderWidth: 0,\n borderRadius: 3\n },\n handle: {\n show: false,\n // eslint-disable-next-line\n icon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z',\n size: 45,\n // handle margin is from symbol center to axis, which is stable when circular move.\n margin: 50,\n // color: '#1b8bbd'\n // color: '#2f4554'\n color: '#333',\n shadowBlur: 3,\n shadowColor: '#aaa',\n shadowOffsetX: 0,\n shadowOffsetY: 2,\n // For mobile performance\n throttle: 40\n }\n };\n return AxisPointerModel;\n}(ComponentModel);\nexport default AxisPointerModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar each = zrUtil.each;\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n * @param {Function} handler\n * param: {string} currTrigger\n * param: {Array.} point\n */\nexport function register(key, api, handler) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n inner(zr).records || (inner(zr).records = {});\n initGlobalListeners(zr, api);\n var record = inner(zr).records[key] || (inner(zr).records[key] = {});\n record.handler = handler;\n}\nfunction initGlobalListeners(zr, api) {\n if (inner(zr).initialized) {\n return;\n }\n inner(zr).initialized = true;\n useHandler('click', zrUtil.curry(doEnter, 'click'));\n useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove'));\n // useHandler('mouseout', onLeave);\n useHandler('globalout', onLeave);\n function useHandler(eventType, cb) {\n zr.on(eventType, function (e) {\n var dis = makeDispatchAction(api);\n each(inner(zr).records, function (record) {\n record && cb(record, e, dis.dispatchAction);\n });\n dispatchTooltipFinally(dis.pendings, api);\n });\n }\n}\nfunction dispatchTooltipFinally(pendings, api) {\n var showLen = pendings.showTip.length;\n var hideLen = pendings.hideTip.length;\n var actuallyPayload;\n if (showLen) {\n actuallyPayload = pendings.showTip[showLen - 1];\n } else if (hideLen) {\n actuallyPayload = pendings.hideTip[hideLen - 1];\n }\n if (actuallyPayload) {\n actuallyPayload.dispatchAction = null;\n api.dispatchAction(actuallyPayload);\n }\n}\nfunction onLeave(record, e, dispatchAction) {\n record.handler('leave', null, dispatchAction);\n}\nfunction doEnter(currTrigger, record, e, dispatchAction) {\n record.handler(currTrigger, e, dispatchAction);\n}\nfunction makeDispatchAction(api) {\n var pendings = {\n showTip: [],\n hideTip: []\n };\n // FIXME\n // better approach?\n // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip,\n // which may be conflict, (axisPointer call showTip but tooltip call hideTip);\n // So we have to add \"final stage\" to merge those dispatched actions.\n var dispatchAction = function (payload) {\n var pendingList = pendings[payload.type];\n if (pendingList) {\n pendingList.push(payload);\n } else {\n payload.dispatchAction = dispatchAction;\n api.dispatchAction(payload);\n }\n };\n return {\n dispatchAction: dispatchAction,\n pendings: pendings\n };\n}\nexport function unregister(key, api) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n var record = (inner(zr).records || {})[key];\n if (record) {\n inner(zr).records[key] = null;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as globalListener from './globalListener.js';\nimport ComponentView from '../../view/Component.js';\nvar AxisPointerView = /** @class */function (_super) {\n __extends(AxisPointerView, _super);\n function AxisPointerView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AxisPointerView.type;\n return _this;\n }\n AxisPointerView.prototype.render = function (globalAxisPointerModel, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var triggerOn = globalAxisPointerModel.get('triggerOn') || globalTooltipModel && globalTooltipModel.get('triggerOn') || 'mousemove|click';\n // Register global listener in AxisPointerView to enable\n // AxisPointerView to be independent to Tooltip.\n globalListener.register('axisPointer', api, function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none' && (currTrigger === 'leave' || triggerOn.indexOf(currTrigger) >= 0)) {\n dispatchAction({\n type: 'updateAxisPointer',\n currTrigger: currTrigger,\n x: e && e.offsetX,\n y: e && e.offsetY\n });\n }\n });\n };\n AxisPointerView.prototype.remove = function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n };\n AxisPointerView.prototype.dispose = function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n };\n AxisPointerView.type = 'axisPointer';\n return AxisPointerView;\n}(ComponentView);\nexport default AxisPointerView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\n/**\n * @param finder contains {seriesIndex, dataIndex, dataIndexInside}\n * @param ecModel\n * @return {point: [x, y], el: ...} point Will not be null.\n */\nexport default function findPointFromSeries(finder, ecModel) {\n var point = [];\n var seriesIndex = finder.seriesIndex;\n var seriesModel;\n if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) {\n return {\n point: []\n };\n }\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, finder);\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\n return {\n point: []\n };\n }\n var el = data.getItemGraphicEl(dataIndex);\n var coordSys = seriesModel.coordinateSystem;\n if (seriesModel.getTooltipPosition) {\n point = seriesModel.getTooltipPosition(dataIndex) || [];\n } else if (coordSys && coordSys.dataToPoint) {\n if (finder.isStacked) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueAxisDim = valueAxis.dim;\n var baseAxisDim = baseAxis.dim;\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var baseDim = data.mapDimension(baseAxisDim);\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(baseDim, dataIndex);\n stackedData[1 - baseDataOffset] = data.get(data.getCalculationInfo('stackResultDimension'), dataIndex);\n point = coordSys.dataToPoint(stackedData) || [];\n } else {\n point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex)) || [];\n }\n } else if (el) {\n // Use graphic bounding rect\n var rect = el.getBoundingRect().clone();\n rect.applyTransform(el.transform);\n point = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n }\n return {\n point: point,\n el: el\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { makeInner } from '../../util/model.js';\nimport * as modelHelper from './modelHelper.js';\nimport findPointFromSeries from './findPointFromSeries.js';\nimport { each, curry, bind, extend } from 'zrender/lib/core/util.js';\nvar inner = makeInner();\n/**\n * Basic logic: check all axis, if they do not demand show/highlight,\n * then hide/downplay them.\n *\n * @return content of event obj for echarts.connect.\n */\nexport default function axisTrigger(payload, ecModel, api) {\n var currTrigger = payload.currTrigger;\n var point = [payload.x, payload.y];\n var finder = payload;\n var dispatchAction = payload.dispatchAction || bind(api.dispatchAction, api);\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n // Pending\n // See #6121. But we are not able to reproduce it yet.\n if (!coordSysAxesInfo) {\n return;\n }\n if (illegalPoint(point)) {\n // Used in the default behavior of `connection`: use the sample seriesIndex\n // and dataIndex. And also used in the tooltipView trigger.\n point = findPointFromSeries({\n seriesIndex: finder.seriesIndex,\n // Do not use dataIndexInside from other ec instance.\n // FIXME: auto detect it?\n dataIndex: finder.dataIndex\n }, ecModel).point;\n }\n var isIllegalPoint = illegalPoint(point);\n // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}).\n // Notice: In this case, it is difficult to get the `point` (which is necessary to show\n // tooltip, so if point is not given, we just use the point found by sample seriesIndex\n // and dataIndex.\n var inputAxesInfo = finder.axesInfo;\n var axesInfo = coordSysAxesInfo.axesInfo;\n var shouldHide = currTrigger === 'leave' || illegalPoint(point);\n var outputPayload = {};\n var showValueMap = {};\n var dataByCoordSys = {\n list: [],\n map: {}\n };\n var updaters = {\n showPointer: curry(showPointer, showValueMap),\n showTooltip: curry(showTooltip, dataByCoordSys)\n };\n // Process for triggered axes.\n each(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) {\n // If a point given, it must be contained by the coordinate system.\n var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point);\n each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {\n var axis = axisInfo.axis;\n var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo);\n // If no inputAxesInfo, no axis is restricted.\n if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {\n var val = inputAxisInfo && inputAxisInfo.value;\n if (val == null && !isIllegalPoint) {\n val = axis.pointToData(point);\n }\n val != null && processOnAxis(axisInfo, val, updaters, false, outputPayload);\n }\n });\n });\n // Process for linked axes.\n var linkTriggers = {};\n each(axesInfo, function (tarAxisInfo, tarKey) {\n var linkGroup = tarAxisInfo.linkGroup;\n // If axis has been triggered in the previous stage, it should not be triggered by link.\n if (linkGroup && !showValueMap[tarKey]) {\n each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) {\n var srcValItem = showValueMap[srcKey];\n // If srcValItem exist, source axis is triggered, so link to target axis.\n if (srcAxisInfo !== tarAxisInfo && srcValItem) {\n var val = srcValItem.value;\n linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo))));\n linkTriggers[tarAxisInfo.key] = val;\n }\n });\n }\n });\n each(linkTriggers, function (val, tarKey) {\n processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload);\n });\n updateModelActually(showValueMap, axesInfo, outputPayload);\n dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction);\n dispatchHighDownActually(axesInfo, dispatchAction, api);\n return outputPayload;\n}\nfunction processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) {\n var axis = axisInfo.axis;\n if (axis.scale.isBlank() || !axis.containData(newValue)) {\n return;\n }\n if (!axisInfo.involveSeries) {\n updaters.showPointer(axisInfo, newValue);\n return;\n }\n // Heavy calculation. So put it after axis.containData checking.\n var payloadInfo = buildPayloadsBySeries(newValue, axisInfo);\n var payloadBatch = payloadInfo.payloadBatch;\n var snapToValue = payloadInfo.snapToValue;\n // Fill content of event obj for echarts.connect.\n // By default use the first involved series data as a sample to connect.\n if (payloadBatch[0] && outputFinder.seriesIndex == null) {\n extend(outputFinder, payloadBatch[0]);\n }\n // If no linkSource input, this process is for collecting link\n // target, where snap should not be accepted.\n if (!noSnap && axisInfo.snap) {\n if (axis.containData(snapToValue) && snapToValue != null) {\n newValue = snapToValue;\n }\n }\n updaters.showPointer(axisInfo, newValue, payloadBatch);\n // Tooltip should always be snapToValue, otherwise there will be\n // incorrect \"axis value ~ series value\" mapping displayed in tooltip.\n updaters.showTooltip(axisInfo, payloadInfo, snapToValue);\n}\nfunction buildPayloadsBySeries(value, axisInfo) {\n var axis = axisInfo.axis;\n var dim = axis.dim;\n var snapToValue = value;\n var payloadBatch = [];\n var minDist = Number.MAX_VALUE;\n var minDiff = -1;\n each(axisInfo.seriesModels, function (series, idx) {\n var dataDim = series.getData().mapDimensionsAll(dim);\n var seriesNestestValue;\n var dataIndices;\n if (series.getAxisTooltipData) {\n var result = series.getAxisTooltipData(dataDim, value, axis);\n dataIndices = result.dataIndices;\n seriesNestestValue = result.nestestValue;\n } else {\n dataIndices = series.getData().indicesOfNearest(dataDim[0], value,\n // Add a threshold to avoid find the wrong dataIndex\n // when data length is not same.\n // false,\n axis.type === 'category' ? 0.5 : null);\n if (!dataIndices.length) {\n return;\n }\n seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]);\n }\n if (seriesNestestValue == null || !isFinite(seriesNestestValue)) {\n return;\n }\n var diff = value - seriesNestestValue;\n var dist = Math.abs(diff);\n // Consider category case\n if (dist <= minDist) {\n if (dist < minDist || diff >= 0 && minDiff < 0) {\n minDist = dist;\n minDiff = diff;\n snapToValue = seriesNestestValue;\n payloadBatch.length = 0;\n }\n each(dataIndices, function (dataIndex) {\n payloadBatch.push({\n seriesIndex: series.seriesIndex,\n dataIndexInside: dataIndex,\n dataIndex: series.getData().getRawIndex(dataIndex)\n });\n });\n }\n });\n return {\n payloadBatch: payloadBatch,\n snapToValue: snapToValue\n };\n}\nfunction showPointer(showValueMap, axisInfo, value, payloadBatch) {\n showValueMap[axisInfo.key] = {\n value: value,\n payloadBatch: payloadBatch\n };\n}\nfunction showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) {\n var payloadBatch = payloadInfo.payloadBatch;\n var axis = axisInfo.axis;\n var axisModel = axis.model;\n var axisPointerModel = axisInfo.axisPointerModel;\n // If no data, do not create anything in dataByCoordSys,\n // whose length will be used to judge whether dispatch action.\n if (!axisInfo.triggerTooltip || !payloadBatch.length) {\n return;\n }\n var coordSysModel = axisInfo.coordSys.model;\n var coordSysKey = modelHelper.makeKey(coordSysModel);\n var coordSysItem = dataByCoordSys.map[coordSysKey];\n if (!coordSysItem) {\n coordSysItem = dataByCoordSys.map[coordSysKey] = {\n coordSysId: coordSysModel.id,\n coordSysIndex: coordSysModel.componentIndex,\n coordSysType: coordSysModel.type,\n coordSysMainType: coordSysModel.mainType,\n dataByAxis: []\n };\n dataByCoordSys.list.push(coordSysItem);\n }\n coordSysItem.dataByAxis.push({\n axisDim: axis.dim,\n axisIndex: axisModel.componentIndex,\n axisType: axisModel.type,\n axisId: axisModel.id,\n value: value,\n // Caustion: viewHelper.getValueLabel is actually on \"view stage\", which\n // depends that all models have been updated. So it should not be performed\n // here. Considering axisPointerModel used here is volatile, which is hard\n // to be retrieve in TooltipView, we prepare parameters here.\n valueLabelOpt: {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n },\n seriesDataIndices: payloadBatch.slice()\n });\n}\nfunction updateModelActually(showValueMap, axesInfo, outputPayload) {\n var outputAxesInfo = outputPayload.axesInfo = [];\n // Basic logic: If no 'show' required, 'hide' this axisPointer.\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n var valItem = showValueMap[key];\n if (valItem) {\n !axisInfo.useHandle && (option.status = 'show');\n option.value = valItem.value;\n // For label formatter param and highlight.\n option.seriesDataIndices = (valItem.payloadBatch || []).slice();\n }\n // When always show (e.g., handle used), remain\n // original value and status.\n else {\n // If hide, value still need to be set, consider\n // click legend to toggle axis blank.\n !axisInfo.useHandle && (option.status = 'hide');\n }\n // If status is 'hide', should be no info in payload.\n option.status === 'show' && outputAxesInfo.push({\n axisDim: axisInfo.axis.dim,\n axisIndex: axisInfo.axis.model.componentIndex,\n value: option.value\n });\n });\n}\nfunction dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) {\n // Basic logic: If no showTip required, hideTip will be dispatched.\n if (illegalPoint(point) || !dataByCoordSys.list.length) {\n dispatchAction({\n type: 'hideTip'\n });\n return;\n }\n // In most case only one axis (or event one series is used). It is\n // convenient to fetch payload.seriesIndex and payload.dataIndex\n // directly. So put the first seriesIndex and dataIndex of the first\n // axis on the payload.\n var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};\n dispatchAction({\n type: 'showTip',\n escapeConnect: true,\n x: point[0],\n y: point[1],\n tooltipOption: payload.tooltipOption,\n position: payload.position,\n dataIndexInside: sampleItem.dataIndexInside,\n dataIndex: sampleItem.dataIndex,\n seriesIndex: sampleItem.seriesIndex,\n dataByCoordSys: dataByCoordSys.list\n });\n}\nfunction dispatchHighDownActually(axesInfo, dispatchAction, api) {\n // FIXME\n // highlight status modification should be a stage of main process?\n // (Consider confilct (e.g., legend and axisPointer) and setOption)\n var zr = api.getZr();\n var highDownKey = 'axisPointerLastHighlights';\n var lastHighlights = inner(zr)[highDownKey] || {};\n var newHighlights = inner(zr)[highDownKey] = {};\n // Update highlight/downplay status according to axisPointer model.\n // Build hash map and remove duplicate incidentally.\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n option.status === 'show' && axisInfo.triggerEmphasis && each(option.seriesDataIndices, function (batchItem) {\n var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex;\n newHighlights[key] = batchItem;\n });\n });\n // Diff.\n var toHighlight = [];\n var toDownplay = [];\n each(lastHighlights, function (batchItem, key) {\n !newHighlights[key] && toDownplay.push(batchItem);\n });\n each(newHighlights, function (batchItem, key) {\n !lastHighlights[key] && toHighlight.push(batchItem);\n });\n toDownplay.length && api.dispatchAction({\n type: 'downplay',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toDownplay\n });\n toHighlight.length && api.dispatchAction({\n type: 'highlight',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toHighlight\n });\n}\nfunction findInputAxisInfo(inputAxesInfo, axisInfo) {\n for (var i = 0; i < (inputAxesInfo || []).length; i++) {\n var inputAxisInfo = inputAxesInfo[i];\n if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) {\n return inputAxisInfo;\n }\n }\n}\nfunction makeMapperParam(axisInfo) {\n var axisModel = axisInfo.axis.model;\n var item = {};\n var dim = item.axisDim = axisInfo.axis.dim;\n item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex;\n item.axisName = item[dim + 'AxisName'] = axisModel.name;\n item.axisId = item[dim + 'AxisId'] = axisModel.id;\n return item;\n}\nfunction illegalPoint(point) {\n return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport AxisView from '../axis/AxisView.js';\nimport CartesianAxisPointer from './CartesianAxisPointer.js';\nimport AxisPointerModel from './AxisPointerModel.js';\nimport AxisPointerView from './AxisPointerView.js';\nimport { isArray } from 'zrender/lib/core/util.js';\nimport { collect } from './modelHelper.js';\nimport axisTrigger from './axisTrigger.js';\nexport function install(registers) {\n // CartesianAxisPointer is not supposed to be required here. But consider\n // echarts.simple.js and online build tooltip, which only require gridSimple,\n // CartesianAxisPointer should be able to required somewhere.\n AxisView.registerAxisPointerClass('CartesianAxisPointer', CartesianAxisPointer);\n registers.registerComponentModel(AxisPointerModel);\n registers.registerComponentView(AxisPointerView);\n registers.registerPreprocessor(function (option) {\n // Always has a global axisPointerModel for default setting.\n if (option) {\n (!option.axisPointer || option.axisPointer.length === 0) && (option.axisPointer = {});\n var link = option.axisPointer.link;\n // Normalize to array to avoid object mergin. But if link\n // is not set, remain null/undefined, otherwise it will\n // override existent link setting.\n if (link && !isArray(link)) {\n option.axisPointer.link = [link];\n }\n }\n });\n // This process should proformed after coordinate systems created\n // and series data processed. So put it on statistic processing stage.\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, function (ecModel, api) {\n // Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n // allAxesInfo should be updated when setOption performed.\n ecModel.getComponent('axisPointer').coordSysAxesInfo = collect(ecModel, api);\n });\n // Broadcast to all views.\n registers.registerAction({\n type: 'updateAxisPointer',\n event: 'updateAxisPointer',\n update: ':updateAxisPointer'\n }, axisTrigger);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { install as installSimple } from './installSimple.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport { use } from '../../extension.js';\nexport function install(registers) {\n use(installSimple);\n use(installAxisPointer);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\nvar PolarAxisPointer = /** @class */function (_super) {\n __extends(PolarAxisPointer, _super);\n function PolarAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n if (axis.dim === 'angle') {\n this.animationThreshold = Math.PI / 18;\n }\n var polar = axis.polar;\n var otherAxis = polar.getOtherAxis(axis);\n var otherExtent = otherAxis.getExtent();\n var coordValue = axis.dataToCoord(value);\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, polar, coordValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var labelMargin = axisPointerModel.get(['label', 'margin']);\n var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin);\n viewHelper.buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos);\n };\n return PolarAxisPointer;\n}(BaseAxisPointer);\n;\nfunction getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) {\n var axis = axisModel.axis;\n var coord = axis.dataToCoord(value);\n var axisAngle = polar.getAngleAxis().getExtent()[0];\n axisAngle = axisAngle / 180 * Math.PI;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var position;\n var align;\n var verticalAlign;\n if (axis.dim === 'radius') {\n var transform = matrix.create();\n matrix.rotate(transform, transform, axisAngle);\n matrix.translate(transform, transform, [polar.cx, polar.cy]);\n position = graphic.applyTransform([coord, -labelMargin], transform);\n var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0;\n // @ts-ignore\n var labelLayout = AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1);\n align = labelLayout.textAlign;\n verticalAlign = labelLayout.textVerticalAlign;\n } else {\n // angle axis\n var r = radiusExtent[1];\n position = polar.coordToPoint([r + labelMargin, coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right';\n verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom';\n }\n return {\n position: position,\n align: align,\n verticalAlign: verticalAlign\n };\n}\nvar pointerShapeBuilder = {\n line: function (axis, polar, coordValue, otherExtent) {\n return axis.dim === 'angle' ? {\n type: 'Line',\n shape: viewHelper.makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue]))\n } : {\n type: 'Circle',\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: coordValue\n }\n };\n },\n shadow: function (axis, polar, coordValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var radian = Math.PI / 180;\n return axis.dim === 'angle' ? {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1],\n // In ECharts y is negative if angle is positive\n (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian)\n } : {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2)\n };\n }\n};\nexport default PolarAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar PolarModel = /** @class */function (_super) {\n __extends(PolarModel, _super);\n function PolarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PolarModel.type;\n return _this;\n }\n PolarModel.prototype.findAxisModel = function (axisType) {\n var foundAxisModel;\n var ecModel = this.ecModel;\n ecModel.eachComponent(axisType, function (axisModel) {\n if (axisModel.getCoordSysModel() === this) {\n foundAxisModel = axisModel;\n }\n }, this);\n return foundAxisModel;\n };\n PolarModel.type = 'polar';\n PolarModel.dependencies = ['radiusAxis', 'angleAxis'];\n PolarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '80%'\n };\n return PolarModel;\n}(ComponentModel);\nexport default PolarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar PolarAxisModel = /** @class */function (_super) {\n __extends(PolarAxisModel, _super);\n function PolarAxisModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PolarAxisModel.prototype.getCoordSysModel = function () {\n return this.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n };\n PolarAxisModel.type = 'polarAxis';\n return PolarAxisModel;\n}(ComponentModel);\nzrUtil.mixin(PolarAxisModel, AxisModelCommonMixin);\nexport { PolarAxisModel };\nvar AngleAxisModel = /** @class */function (_super) {\n __extends(AngleAxisModel, _super);\n function AngleAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AngleAxisModel.type;\n return _this;\n }\n AngleAxisModel.type = 'angleAxis';\n return AngleAxisModel;\n}(PolarAxisModel);\nexport { AngleAxisModel };\nvar RadiusAxisModel = /** @class */function (_super) {\n __extends(RadiusAxisModel, _super);\n function RadiusAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadiusAxisModel.type;\n return _this;\n }\n RadiusAxisModel.type = 'radiusAxis';\n return RadiusAxisModel;\n}(PolarAxisModel);\nexport { RadiusAxisModel };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar RadiusAxis = /** @class */function (_super) {\n __extends(RadiusAxis, _super);\n function RadiusAxis(scale, radiusExtent) {\n return _super.call(this, 'radius', scale, radiusExtent) || this;\n }\n RadiusAxis.prototype.pointToData = function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n };\n return RadiusAxis;\n}(Axis);\nRadiusAxis.prototype.dataToRadius = Axis.prototype.dataToCoord;\nRadiusAxis.prototype.radiusToData = Axis.prototype.coordToData;\nexport default RadiusAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport Axis from '../Axis.js';\nimport { makeInner } from '../../util/model.js';\nvar inner = makeInner();\nvar AngleAxis = /** @class */function (_super) {\n __extends(AngleAxis, _super);\n function AngleAxis(scale, angleExtent) {\n return _super.call(this, 'angle', scale, angleExtent || [0, 360]) || this;\n }\n AngleAxis.prototype.pointToData = function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n };\n /**\n * Only be called in category axis.\n * Angle axis uses text height to decide interval\n *\n * @override\n * @return {number} Auto interval for cateogry axis tick and label\n */\n AngleAxis.prototype.calculateCategoryInterval = function () {\n var axis = this;\n var labelModel = axis.getLabelModel();\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\n var tickCount = ordinalScale.count();\n if (ordinalExtent[1] - ordinalExtent[0] < 1) {\n return 0;\n }\n var tickValue = ordinalExtent[0];\n var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue);\n var unitH = Math.abs(unitSpan);\n // Not precise, just use height as text width\n // and each distance from axis line yet.\n var rect = textContain.getBoundingRect(tickValue == null ? '' : tickValue + '', labelModel.getFont(), 'center', 'top');\n var maxH = Math.max(rect.height, 7);\n var dh = maxH / unitH;\n // 0/0 is NaN, 1/0 is Infinity.\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(dh));\n var cache = inner(axis.model);\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount;\n // Use cache to keep interval stable while moving zoom window,\n // otherwise the calculated interval might jitter when the zoom\n // window size is close to the interval-changing size.\n if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1\n // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval) {\n interval = lastAutoInterval;\n }\n // Only update cache if cache not used, otherwise the\n // changing of interval is too insensitive.\n else {\n cache.lastTickCount = tickCount;\n cache.lastAutoInterval = interval;\n }\n return interval;\n };\n return AngleAxis;\n}(Axis);\nAngleAxis.prototype.dataToAngle = Axis.prototype.dataToCoord;\nAngleAxis.prototype.angleToData = Axis.prototype.coordToData;\nexport default AngleAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport RadiusAxis from './RadiusAxis.js';\nimport AngleAxis from './AngleAxis.js';\nexport var polarDimensions = ['radius', 'angle'];\nvar Polar = /** @class */function () {\n function Polar(name) {\n this.dimensions = polarDimensions;\n this.type = 'polar';\n /**\n * x of polar center\n */\n this.cx = 0;\n /**\n * y of polar center\n */\n this.cy = 0;\n this._radiusAxis = new RadiusAxis();\n this._angleAxis = new AngleAxis();\n this.axisPointerEnabled = true;\n this.name = name || '';\n this._radiusAxis.polar = this._angleAxis.polar = this;\n }\n /**\n * If contain coord\n */\n Polar.prototype.containPoint = function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n };\n /**\n * If contain data\n */\n Polar.prototype.containData = function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n };\n Polar.prototype.getAxis = function (dim) {\n var key = '_' + dim + 'Axis';\n return this[key];\n };\n Polar.prototype.getAxes = function () {\n return [this._radiusAxis, this._angleAxis];\n };\n /**\n * Get axes by type of scale\n */\n Polar.prototype.getAxesByScale = function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n };\n Polar.prototype.getAngleAxis = function () {\n return this._angleAxis;\n };\n Polar.prototype.getRadiusAxis = function () {\n return this._radiusAxis;\n };\n Polar.prototype.getOtherAxis = function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n };\n /**\n * Base axis will be used on stacking.\n *\n */\n Polar.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n };\n Polar.prototype.getTooltipAxes = function (dim) {\n var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis();\n return {\n baseAxes: [baseAxis],\n otherAxes: [this.getOtherAxis(baseAxis)]\n };\n };\n /**\n * Convert a single data item to (x, y) point.\n * Parameter data is an array which the first element is radius and the second is angle\n */\n Polar.prototype.dataToPoint = function (data, clamp) {\n return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]);\n };\n /**\n * Convert a (x, y) point to data\n */\n Polar.prototype.pointToData = function (point, clamp) {\n var coord = this.pointToCoord(point);\n return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)];\n };\n /**\n * Convert a (x, y) point to (radius, angle) coord\n */\n Polar.prototype.pointToCoord = function (point) {\n var dx = point[0] - this.cx;\n var dy = point[1] - this.cy;\n var angleAxis = this.getAngleAxis();\n var extent = angleAxis.getExtent();\n var minAngle = Math.min(extent[0], extent[1]);\n var maxAngle = Math.max(extent[0], extent[1]);\n // Fix fixed extent in polarCreator\n // FIXME\n angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx) / Math.PI * 180;\n // move to angleExtent\n var dir = radian < minAngle ? 1 : -1;\n while (radian < minAngle || radian > maxAngle) {\n radian += dir * 360;\n }\n return [radius, radian];\n };\n /**\n * Convert a (radius, angle) coord to (x, y) point\n */\n Polar.prototype.coordToPoint = function (coord) {\n var radius = coord[0];\n var radian = coord[1] / 180 * Math.PI;\n var x = Math.cos(radian) * radius + this.cx;\n // Inverse the y\n var y = -Math.sin(radian) * radius + this.cy;\n return [x, y];\n };\n /**\n * Get ring area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n */\n Polar.prototype.getArea = function () {\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n var RADIAN = Math.PI / 180;\n return {\n cx: this.cx,\n cy: this.cy,\n r0: radiusExtent[0],\n r: radiusExtent[1],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse,\n contain: function (x, y) {\n // It's a ring shape.\n // Start angle and end angle don't matter\n var dx = x - this.cx;\n var dy = y - this.cy;\n // minus a tiny value 1e-4 to avoid being clipped unexpectedly\n var d2 = dx * dx + dy * dy - 1e-4;\n var r = this.r;\n var r0 = this.r0;\n return d2 <= r * r && d2 >= r0 * r0;\n }\n };\n };\n Polar.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.dataToPoint(value) : null;\n };\n Polar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.pointToData(pixel) : null;\n };\n return Polar;\n}();\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n var polarModel = finder.polarModel;\n return polarModel && polarModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem;\n}\nexport default Polar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO Axis scale\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Polar, { polarDimensions } from './Polar.js';\nimport { parsePercent } from '../../util/number.js';\nimport { createScaleByModel, niceScaleExtent, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Resize method bound to the polar\n */\nfunction resizePolar(polar, polarModel, api) {\n var center = polarModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n polar.cx = parsePercent(center[0], width);\n polar.cy = parsePercent(center[1], height);\n var radiusAxis = polar.getRadiusAxis();\n var size = Math.min(width, height) / 2;\n var radius = polarModel.get('radius');\n if (radius == null) {\n radius = [0, '100%'];\n } else if (!zrUtil.isArray(radius)) {\n // r0 = 0\n radius = [0, radius];\n }\n var parsedRadius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];\n radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]);\n}\n/**\n * Update polar\n */\nfunction updatePolarScale(ecModel, api) {\n var polar = this;\n var angleAxis = polar.getAngleAxis();\n var radiusAxis = polar.getRadiusAxis();\n // Reset scale\n angleAxis.scale.setExtent(Infinity, -Infinity);\n radiusAxis.scale.setExtent(Infinity, -Infinity);\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === polar) {\n var data_1 = seriesModel.getData();\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'radius'), function (dim) {\n radiusAxis.scale.unionExtentFromData(data_1, dim);\n });\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'angle'), function (dim) {\n angleAxis.scale.unionExtentFromData(data_1, dim);\n });\n }\n });\n niceScaleExtent(angleAxis.scale, angleAxis.model);\n niceScaleExtent(radiusAxis.scale, radiusAxis.model);\n // Fix extent of category angle axis\n if (angleAxis.type === 'category' && !angleAxis.onBand) {\n var extent = angleAxis.getExtent();\n var diff = 360 / angleAxis.scale.count();\n angleAxis.inverse ? extent[1] += diff : extent[1] -= diff;\n angleAxis.setExtent(extent[0], extent[1]);\n }\n}\nfunction isAngleAxisModel(axisModel) {\n return axisModel.mainType === 'angleAxis';\n}\n/**\n * Set common axis properties\n */\nfunction setAxis(axis, axisModel) {\n var _a;\n axis.type = axisModel.get('type');\n axis.scale = createScaleByModel(axisModel);\n axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';\n axis.inverse = axisModel.get('inverse');\n if (isAngleAxisModel(axisModel)) {\n axis.inverse = axis.inverse !== axisModel.get('clockwise');\n var startAngle = axisModel.get('startAngle');\n var endAngle = (_a = axisModel.get('endAngle')) !== null && _a !== void 0 ? _a : startAngle + (axis.inverse ? -360 : 360);\n axis.setExtent(startAngle, endAngle);\n }\n // Inject axis instance\n axisModel.axis = axis;\n axis.model = axisModel;\n}\nvar polarCreator = {\n dimensions: polarDimensions,\n create: function (ecModel, api) {\n var polarList = [];\n ecModel.eachComponent('polar', function (polarModel, idx) {\n var polar = new Polar(idx + '');\n // Inject resize and update method\n polar.update = updatePolarScale;\n var radiusAxis = polar.getRadiusAxis();\n var angleAxis = polar.getAngleAxis();\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n setAxis(radiusAxis, radiusAxisModel);\n setAxis(angleAxis, angleAxisModel);\n resizePolar(polar, polarModel, api);\n polarList.push(polar);\n polarModel.coordinateSystem = polar;\n polar.model = polarModel;\n });\n // Inject coordinateSystem to series\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'polar') {\n var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!polarModel) {\n throw new Error('Polar \"' + zrUtil.retrieve(seriesModel.get('polarIndex'), seriesModel.get('polarId'), 0) + '\" not found');\n }\n }\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\n }\n });\n return polarList;\n }\n};\nexport default polarCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport Model from '../../model/Model.js';\nimport AxisView from './AxisView.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport { getECData } from '../../util/innerStore.js';\nvar elementList = ['axisLine', 'axisLabel', 'axisTick', 'minorTick', 'splitLine', 'minorSplitLine', 'splitArea'];\nfunction getAxisLineShape(polar, rExtent, angle) {\n rExtent[1] > rExtent[0] && (rExtent = rExtent.slice().reverse());\n var start = polar.coordToPoint([rExtent[0], angle]);\n var end = polar.coordToPoint([rExtent[1], angle]);\n return {\n x1: start[0],\n y1: start[1],\n x2: end[0],\n y2: end[1]\n };\n}\nfunction getRadiusIdx(polar) {\n var radiusAxis = polar.getRadiusAxis();\n return radiusAxis.inverse ? 0 : 1;\n}\n// Remove the last tick which will overlap the first tick\nfunction fixAngleOverlap(list) {\n var firstItem = list[0];\n var lastItem = list[list.length - 1];\n if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4) {\n list.pop();\n }\n}\nvar AngleAxisView = /** @class */function (_super) {\n __extends(AngleAxisView, _super);\n function AngleAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = AngleAxisView.type;\n _this.axisPointerClass = 'PolarAxisPointer';\n return _this;\n }\n AngleAxisView.prototype.render = function (angleAxisModel, ecModel) {\n this.group.removeAll();\n if (!angleAxisModel.get('show')) {\n return;\n }\n var angleAxis = angleAxisModel.axis;\n var polar = angleAxis.polar;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var ticksAngles = angleAxis.getTicksCoords();\n var minorTickAngles = angleAxis.getMinorTicksCoords();\n var labels = zrUtil.map(angleAxis.getViewLabels(), function (labelItem) {\n labelItem = zrUtil.clone(labelItem);\n var scale = angleAxis.scale;\n var tickValue = scale.type === 'ordinal' ? scale.getRawOrdinalNumber(labelItem.tickValue) : labelItem.tickValue;\n labelItem.coord = angleAxis.dataToCoord(tickValue);\n return labelItem;\n });\n fixAngleOverlap(labels);\n fixAngleOverlap(ticksAngles);\n zrUtil.each(elementList, function (name) {\n if (angleAxisModel.get([name, 'show']) && (!angleAxis.scale.isBlank() || name === 'axisLine')) {\n angelAxisElementsBuilders[name](this.group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels);\n }\n }, this);\n };\n AngleAxisView.type = 'angleAxis';\n return AngleAxisView;\n}(AxisView);\nvar angelAxisElementsBuilders = {\n axisLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var lineStyleModel = angleAxisModel.getModel(['axisLine', 'lineStyle']);\n var angleAxis = polar.getAngleAxis();\n var RADIAN = Math.PI / 180;\n var angleExtent = angleAxis.getExtent();\n // extent id of the axis radius (r0 and r)\n var rId = getRadiusIdx(polar);\n var r0Id = rId ? 0 : 1;\n var shape;\n var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc';\n if (radiusExtent[r0Id] === 0) {\n shape = new graphic[shapeType]({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n } else {\n shape = new graphic.Ring({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n r0: radiusExtent[r0Id]\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n }\n shape.style.fill = null;\n group.add(shape);\n },\n axisTick: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var tickModel = angleAxisModel.getModel('axisTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = zrUtil.map(ticksAngles, function (tickAngleItem) {\n return new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], tickAngleItem.coord)\n });\n });\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(tickModel.getModel('lineStyle').getLineStyle(), {\n stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color'])\n })\n }));\n },\n minorTick: function (group, angleAxisModel, polar, tickAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n var tickModel = angleAxisModel.getModel('axisTick');\n var minorTickModel = angleAxisModel.getModel('minorTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = [];\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], minorTickAngles[i][k].coord)\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(minorTickModel.getModel('lineStyle').getLineStyle(), zrUtil.defaults(tickModel.getLineStyle(), {\n stroke: angleAxisModel.get(['axisLine', 'lineStyle', 'color'])\n }))\n }));\n },\n axisLabel: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) {\n var rawCategoryData = angleAxisModel.getCategories(true);\n var commonLabelModel = angleAxisModel.getModel('axisLabel');\n var labelMargin = commonLabelModel.get('margin');\n var triggerEvent = angleAxisModel.get('triggerEvent');\n // Use length of ticksAngles because it may remove the last tick to avoid overlapping\n zrUtil.each(labels, function (labelItem, idx) {\n var labelModel = commonLabelModel;\n var tickValue = labelItem.tickValue;\n var r = radiusExtent[getRadiusIdx(polar)];\n var p = polar.coordToPoint([r + labelMargin, labelItem.coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3 ? 'center' : p[0] > cx ? 'left' : 'right';\n var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3 ? 'middle' : p[1] > cy ? 'top' : 'bottom';\n if (rawCategoryData && rawCategoryData[tickValue]) {\n var rawCategoryItem = rawCategoryData[tickValue];\n if (zrUtil.isObject(rawCategoryItem) && rawCategoryItem.textStyle) {\n labelModel = new Model(rawCategoryItem.textStyle, commonLabelModel, commonLabelModel.ecModel);\n }\n }\n var textEl = new graphic.Text({\n silent: AxisBuilder.isLabelSilent(angleAxisModel),\n style: createTextStyle(labelModel, {\n x: p[0],\n y: p[1],\n fill: labelModel.getTextColor() || angleAxisModel.get(['axisLine', 'lineStyle', 'color']),\n text: labelItem.formattedLabel,\n align: labelTextAlign,\n verticalAlign: labelTextVerticalAlign\n })\n });\n group.add(textEl);\n // Pack data for mouse event\n if (triggerEvent) {\n var eventData = AxisBuilder.makeAxisEventDataBase(angleAxisModel);\n eventData.targetType = 'axisLabel';\n eventData.value = labelItem.rawLabel;\n getECData(textEl).eventData = eventData;\n }\n }, this);\n },\n splitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var splitLineModel = angleAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n for (var i = 0; i < ticksAngles.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i].coord)\n }));\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitLines.length; i++) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyleModel.getLineStyle()),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n }\n },\n minorSplitLine: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n var minorSplitLineModel = angleAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, minorTickAngles[i][k].coord)\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: lineStyleModel.getLineStyle(),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n },\n splitArea: function (group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!ticksAngles.length) {\n return;\n }\n var splitAreaModel = angleAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var RADIAN = Math.PI / 180;\n var prevAngle = -ticksAngles[0].coord * RADIAN;\n var r0 = Math.min(radiusExtent[0], radiusExtent[1]);\n var r1 = Math.max(radiusExtent[0], radiusExtent[1]);\n var clockwise = angleAxisModel.get('clockwise');\n for (var i = 1, len = ticksAngles.length; i <= len; i++) {\n var coord = i === len ? ticksAngles[0].coord : ticksAngles[i].coord;\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: r0,\n r: r1,\n startAngle: prevAngle,\n endAngle: -coord * RADIAN,\n clockwise: clockwise\n },\n silent: true\n }));\n prevAngle = -coord * RADIAN;\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitAreas.length; i++) {\n group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n};\nexport default AngleAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport AxisView from './AxisView.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine'];\nvar RadiusAxisView = /** @class */function (_super) {\n __extends(RadiusAxisView, _super);\n function RadiusAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadiusAxisView.type;\n _this.axisPointerClass = 'PolarAxisPointer';\n return _this;\n }\n RadiusAxisView.prototype.render = function (radiusAxisModel, ecModel) {\n this.group.removeAll();\n if (!radiusAxisModel.get('show')) {\n return;\n }\n var oldAxisGroup = this._axisGroup;\n var newAxisGroup = this._axisGroup = new graphic.Group();\n this.group.add(newAxisGroup);\n var radiusAxis = radiusAxisModel.axis;\n var polar = radiusAxis.polar;\n var angleAxis = polar.getAngleAxis();\n var ticksCoords = radiusAxis.getTicksCoords();\n var minorTicksCoords = radiusAxis.getMinorTicksCoords();\n var axisAngle = angleAxis.getExtent()[0];\n var radiusExtent = radiusAxis.getExtent();\n var layout = layoutAxis(polar, radiusAxisModel, axisAngle);\n var axisBuilder = new AxisBuilder(radiusAxisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n newAxisGroup.add(axisBuilder.getGroup());\n graphic.groupTransition(oldAxisGroup, newAxisGroup, radiusAxisModel);\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (radiusAxisModel.get([name, 'show']) && !radiusAxis.scale.isBlank()) {\n axisElementBuilders[name](this.group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords);\n }\n }, this);\n };\n RadiusAxisView.type = 'radiusAxis';\n return RadiusAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n var splitLineModel = radiusAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n var angleAxis = polar.getAngleAxis();\n var RADIAN = Math.PI / 180;\n var angleExtent = angleAxis.getExtent();\n var shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc';\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic[shapeType]({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n // ensure circle radius >= 0\n r: Math.max(ticksCoords[i].coord, 0),\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse\n }\n }));\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitLines.length; i++) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length],\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n }\n },\n minorSplitLine: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) {\n if (!minorTicksCoords.length) {\n return;\n }\n var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n lines.push(new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: minorTicksCoords[i][k].coord\n }\n }));\n }\n }\n group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults({\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n },\n splitArea: function (group, radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n if (!ticksCoords.length) {\n return;\n }\n var splitAreaModel = radiusAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var prevRadius = ticksCoords[0].coord;\n for (var i = 1; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: prevRadius,\n r: ticksCoords[i].coord,\n startAngle: 0,\n endAngle: Math.PI * 2\n },\n silent: true\n }));\n prevRadius = ticksCoords[i].coord;\n }\n // Simple optimization\n // Batching the lines if color are the same\n for (var i = 0; i < splitAreas.length; i++) {\n group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n};\n/**\n * @inner\n */\nfunction layoutAxis(polar, radiusAxisModel, axisAngle) {\n return {\n position: [polar.cx, polar.cy],\n rotation: axisAngle / 180 * Math.PI,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1,\n labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'),\n // Over splitLine and splitArea\n z2: 1\n };\n}\nexport default RadiusAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parsePercent } from '../util/number.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex;\n}\nfunction getAxisKey(polar, axis) {\n return axis.dim + polar.model.componentIndex;\n}\nfunction barLayoutPolar(seriesType, ecModel, api) {\n var lastStackCoords = {};\n var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) {\n return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar';\n }));\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n // Check series coordinate, do layout for polar only\n if (seriesModel.coordinateSystem.type !== 'polar') {\n return;\n }\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var stackId = getSeriesStackId(seriesModel);\n var columnLayoutInfo = barWidthAndOffset[axisKey][stackId];\n var columnOffset = columnLayoutInfo.offset;\n var columnWidth = columnLayoutInfo.width;\n var valueAxis = polar.getOtherAxis(baseAxis);\n var cx = seriesModel.coordinateSystem.cx;\n var cy = seriesModel.coordinateSystem.cy;\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n var barMinAngle = seriesModel.get('barMinAngle') || 0;\n lastStackCoords[stackId] = lastStackCoords[stackId] || [];\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim /* , baseDim */);\n var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true);\n var valueAxisModel = valueAxis.model;\n var startValue = valueAxisModel.get('startValue');\n var valueAxisStart = valueAxis.dataToCoord(startValue || 0);\n for (var idx = 0, len = data.count(); idx < len; idx++) {\n var value = data.get(valueDim, idx);\n var baseValue = data.get(baseDim, idx);\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart;\n // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n // Only ordinal axis can be stacked.\n if (stacked) {\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart,\n n: valueAxisStart // Negative stack\n };\n }\n // Should also consider #4243\n baseCoord = lastStackCoords[stackId][baseValue][sign];\n }\n var r0 = void 0;\n var r = void 0;\n var startAngle = void 0;\n var endAngle = void 0;\n // radial sector\n if (valueAxis.dim === 'radius') {\n var radiusSpan = valueAxis.dataToCoord(value) - valueAxisStart;\n var angle = baseAxis.dataToCoord(baseValue);\n if (Math.abs(radiusSpan) < barMinHeight) {\n radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight;\n }\n r0 = baseCoord;\n r = baseCoord + radiusSpan;\n startAngle = angle - columnOffset;\n endAngle = startAngle - columnWidth;\n stacked && (lastStackCoords[stackId][baseValue][sign] = r);\n }\n // tangential sector\n else {\n var angleSpan = valueAxis.dataToCoord(value, clampLayout) - valueAxisStart;\n var radius = baseAxis.dataToCoord(baseValue);\n if (Math.abs(angleSpan) < barMinAngle) {\n angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle;\n }\n r0 = radius + columnOffset;\n r = r0 + columnWidth;\n startAngle = baseCoord;\n endAngle = baseCoord + angleSpan;\n // if the previous stack is at the end of the ring,\n // add a round to differentiate it from origin\n // let extent = angleAxis.getExtent();\n // let stackCoord = angle;\n // if (stackCoord === extent[0] && value > 0) {\n // stackCoord = extent[1];\n // }\n // else if (stackCoord === extent[1] && value < 0) {\n // stackCoord = extent[0];\n // }\n stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle);\n }\n data.setItemLayout(idx, {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n // Consider that positive angle is anti-clockwise,\n // while positive radian of sector is clockwise\n startAngle: -startAngle * Math.PI / 180,\n endAngle: -endAngle * Math.PI / 180,\n /**\n * Keep the same logic with bar in catesion: use end value to\n * control direction. Notice that if clockwise is true (by\n * default), the sector will always draw clockwisely, no matter\n * whether endAngle is greater or less than startAngle.\n */\n clockwise: startAngle >= endAngle\n });\n }\n });\n}\n/**\n * Calculate bar width and offset for radial bar charts\n */\nfunction calRadialBar(barSeries) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n // Find if any auto calculated bar exceeded maxBarWidth\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n });\n // Recalculate width again\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}\nexport default barLayoutPolar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { use } from '../../extension.js';\nimport AxisView from '../axis/AxisView.js';\nimport PolarAxisPointer from '../axisPointer/PolarAxisPointer.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport PolarModel from '../../coord/polar/PolarModel.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport { AngleAxisModel, RadiusAxisModel } from '../../coord/polar/AxisModel.js';\nimport polarCreator from '../../coord/polar/polarCreator.js';\nimport AngleAxisView from '../axis/AngleAxisView.js';\nimport RadiusAxisView from '../axis/RadiusAxisView.js';\nimport ComponentView from '../../view/Component.js';\nimport { curry } from 'zrender/lib/core/util.js';\nimport barLayoutPolar from '../../layout/barPolar.js';\nvar angleAxisExtraOption = {\n startAngle: 90,\n clockwise: true,\n splitNumber: 12,\n axisLabel: {\n rotate: 0\n }\n};\nvar radiusAxisExtraOption = {\n splitNumber: 5\n};\nvar PolarView = /** @class */function (_super) {\n __extends(PolarView, _super);\n function PolarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PolarView.type;\n return _this;\n }\n PolarView.type = 'polar';\n return PolarView;\n}(ComponentView);\nexport function install(registers) {\n use(installAxisPointer);\n AxisView.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer);\n registers.registerCoordinateSystem('polar', polarCreator);\n registers.registerComponentModel(PolarModel);\n registers.registerComponentView(PolarView);\n // Model and view for angleAxis and radiusAxis\n axisModelCreator(registers, 'angle', AngleAxisModel, angleAxisExtraOption);\n axisModelCreator(registers, 'radius', RadiusAxisModel, radiusAxisExtraOption);\n registers.registerComponentView(AngleAxisView);\n registers.registerComponentView(RadiusAxisView);\n registers.registerLayout(curry(barLayoutPolar, 'bar'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport function layout(axisModel, opt) {\n opt = opt || {};\n var single = axisModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var axisPosition = axis.position;\n var orient = axis.orient;\n var rect = single.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var positionMap = {\n horizontal: {\n top: rectBound[2],\n bottom: rectBound[3]\n },\n vertical: {\n left: rectBound[0],\n right: rectBound[1]\n }\n };\n layout.position = [orient === 'vertical' ? positionMap.vertical[axisPosition] : rectBound[0], orient === 'horizontal' ? positionMap.horizontal[axisPosition] : rectBound[3]];\n var r = {\n horizontal: 0,\n vertical: 1\n };\n layout.rotation = Math.PI / 2 * r[orient];\n var directionMap = {\n top: -1,\n bottom: 1,\n right: 1,\n left: -1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = directionMap[axisPosition];\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n if (zrUtil.retrieve(opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n }\n var labelRotation = opt.rotate;\n labelRotation == null && (labelRotation = axisModel.get(['axisLabel', 'rotate']));\n layout.labelRotation = axisPosition === 'top' ? -labelRotation : labelRotation;\n layout.z2 = 1;\n return layout;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper.js';\nimport AxisView from './AxisView.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitArea', 'splitLine'];\nvar SingleAxisView = /** @class */function (_super) {\n __extends(SingleAxisView, _super);\n function SingleAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleAxisView.type;\n _this.axisPointerClass = 'SingleAxisPointer';\n return _this;\n }\n SingleAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n var layout = singleAxisHelper.layout(axisModel);\n var axisBuilder = new AxisBuilder(axisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n group.add(this._axisGroup);\n group.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this.group, this._axisGroup, axisModel);\n }\n }, this);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n SingleAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n SingleAxisView.type = 'singleAxis';\n return SingleAxisView;\n}(AxisView);\nvar axisElementBuilders = {\n splitLine: function (axisView, group, axisGroup, axisModel) {\n var axis = axisModel.axis;\n if (axis.scale.isBlank()) {\n return;\n }\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var lineWidth = lineStyleModel.get('width');\n var gridRect = axisModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var splitLines = [];\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n for (var i = 0; i < ticksCoords.length; ++i) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n var line = new graphic.Line({\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n silent: true\n });\n graphic.subPixelOptimizeLine(line.shape, lineWidth);\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(line);\n }\n var lineStyle = lineStyleModel.getLineStyle(['color']);\n for (var i = 0; i < splitLines.length; ++i) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyle),\n silent: true\n }));\n }\n },\n splitArea: function (axisView, group, axisGroup, axisModel) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, axisModel);\n }\n};\nexport default SingleAxisView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nvar SingleAxisModel = /** @class */function (_super) {\n __extends(SingleAxisModel, _super);\n function SingleAxisModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleAxisModel.type;\n return _this;\n }\n SingleAxisModel.prototype.getCoordSysModel = function () {\n return this;\n };\n SingleAxisModel.type = 'singleAxis';\n SingleAxisModel.layoutMode = 'box';\n SingleAxisModel.defaultOption = {\n left: '5%',\n top: '5%',\n right: '5%',\n bottom: '5%',\n type: 'value',\n position: 'bottom',\n orient: 'horizontal',\n axisLine: {\n show: true,\n lineStyle: {\n width: 1,\n type: 'solid'\n }\n },\n // Single coordinate system and single axis is the,\n // which is used as the parent tooltip model.\n // same model, so we set default tooltip show as true.\n tooltip: {\n show: true\n },\n axisTick: {\n show: true,\n length: 6,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n interval: 'auto'\n },\n splitLine: {\n show: true,\n lineStyle: {\n type: 'dashed',\n opacity: 0.2\n }\n }\n };\n return SingleAxisModel;\n}(ComponentModel);\nmixin(SingleAxisModel, AxisModelCommonMixin.prototype);\nexport default SingleAxisModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../Axis.js';\nvar SingleAxis = /** @class */function (_super) {\n __extends(SingleAxis, _super);\n function SingleAxis(dim, scale, coordExtent, axisType, position) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n _this.position = position || 'bottom';\n return _this;\n }\n /**\n * Judge the orient of the axis.\n */\n SingleAxis.prototype.isHorizontal = function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n };\n SingleAxis.prototype.pointToData = function (point, clamp) {\n return this.coordinateSystem.pointToData(point)[0];\n };\n return SingleAxis;\n}(Axis);\nexport default SingleAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Single coordinates system.\n */\nimport SingleAxis from './SingleAxis.js';\nimport * as axisHelper from '../axisHelper.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport { each } from 'zrender/lib/core/util.js';\nexport var singleDimensions = ['single'];\n/**\n * Create a single coordinates system.\n */\nvar Single = /** @class */function () {\n function Single(axisModel, ecModel, api) {\n this.type = 'single';\n this.dimension = 'single';\n /**\n * Add it just for draw tooltip.\n */\n this.dimensions = singleDimensions;\n this.axisPointerEnabled = true;\n this.model = axisModel;\n this._init(axisModel, ecModel, api);\n }\n /**\n * Initialize single coordinate system.\n */\n Single.prototype._init = function (axisModel, ecModel, api) {\n var dim = this.dimension;\n var axis = new SingleAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisModel.get('position'));\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n axis.orient = axisModel.get('orient');\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = this;\n this._axis = axis;\n };\n /**\n * Update axis scale after data processed\n */\n Single.prototype.update = function (ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === this) {\n var data_1 = seriesModel.getData();\n each(data_1.mapDimensionsAll(this.dimension), function (dim) {\n this._axis.scale.unionExtentFromData(data_1, dim);\n }, this);\n axisHelper.niceScaleExtent(this._axis.scale, this._axis.model);\n }\n }, this);\n };\n /**\n * Resize the single coordinate system.\n */\n Single.prototype.resize = function (axisModel, api) {\n this._rect = getLayoutRect({\n left: axisModel.get('left'),\n top: axisModel.get('top'),\n right: axisModel.get('right'),\n bottom: axisModel.get('bottom'),\n width: axisModel.get('width'),\n height: axisModel.get('height')\n }, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._adjustAxis();\n };\n Single.prototype.getRect = function () {\n return this._rect;\n };\n Single.prototype._adjustAxis = function () {\n var rect = this._rect;\n var axis = this._axis;\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, rect.width] : [0, rect.height];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n this._updateAxisTransform(axis, isHorizontal ? rect.x : rect.y);\n };\n Single.prototype._updateAxisTransform = function (axis, coordBase) {\n var axisExtent = axis.getExtent();\n var extentSum = axisExtent[0] + axisExtent[1];\n var isHorizontal = axis.isHorizontal();\n axis.toGlobalCoord = isHorizontal ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return extentSum - coord + coordBase;\n };\n axis.toLocalCoord = isHorizontal ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return extentSum - coord + coordBase;\n };\n };\n /**\n * Get axis.\n */\n Single.prototype.getAxis = function () {\n return this._axis;\n };\n /**\n * Get axis, add it just for draw tooltip.\n */\n Single.prototype.getBaseAxis = function () {\n return this._axis;\n };\n Single.prototype.getAxes = function () {\n return [this._axis];\n };\n Single.prototype.getTooltipAxes = function () {\n return {\n baseAxes: [this.getAxis()],\n // Empty otherAxes\n otherAxes: []\n };\n };\n /**\n * If contain point.\n */\n Single.prototype.containPoint = function (point) {\n var rect = this.getRect();\n var axis = this.getAxis();\n var orient = axis.orient;\n if (orient === 'horizontal') {\n return axis.contain(axis.toLocalCoord(point[0])) && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n } else {\n return axis.contain(axis.toLocalCoord(point[1])) && point[0] >= rect.y && point[0] <= rect.y + rect.height;\n }\n };\n Single.prototype.pointToData = function (point) {\n var axis = this.getAxis();\n return [axis.coordToData(axis.toLocalCoord(point[axis.orient === 'horizontal' ? 0 : 1]))];\n };\n /**\n * Convert the series data to concrete point.\n * Can be [val] | val\n */\n Single.prototype.dataToPoint = function (val) {\n var axis = this.getAxis();\n var rect = this.getRect();\n var pt = [];\n var idx = axis.orient === 'horizontal' ? 0 : 1;\n if (val instanceof Array) {\n val = val[0];\n }\n pt[idx] = axis.toGlobalCoord(axis.dataToCoord(+val));\n pt[1 - idx] = idx === 0 ? rect.y + rect.height / 2 : rect.x + rect.width / 2;\n return pt;\n };\n Single.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.dataToPoint(value) : null;\n };\n Single.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? this.pointToData(pixel) : null;\n };\n return Single;\n}();\nfunction getCoordSys(finder) {\n var seriesModel = finder.seriesModel;\n var singleModel = finder.singleAxisModel;\n return singleModel && singleModel.coordinateSystem || seriesModel && seriesModel.coordinateSystem;\n}\nexport default Single;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * Single coordinate system creator.\n */\nimport Single, { singleDimensions } from './Single.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\n * Create single coordinate system and inject it into seriesModel.\n */\nfunction create(ecModel, api) {\n var singles = [];\n ecModel.eachComponent('singleAxis', function (axisModel, idx) {\n var single = new Single(axisModel, ecModel, api);\n single.name = 'single_' + idx;\n single.resize(axisModel, api);\n axisModel.coordinateSystem = single;\n singles.push(single);\n });\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'singleAxis') {\n var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0];\n seriesModel.coordinateSystem = singleAxisModel && singleAxisModel.coordinateSystem;\n }\n });\n return singles;\n}\nvar singleCreator = {\n create: create,\n dimensions: singleDimensions\n};\nexport default singleCreator;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper.js';\nvar XY = ['x', 'y'];\nvar WH = ['width', 'height'];\nvar SingleAxisPointer = /** @class */function (_super) {\n __extends(SingleAxisPointer, _super);\n function SingleAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @override\n */\n SingleAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var coordSys = axis.coordinateSystem;\n var otherExtent = getGlobalExtent(coordSys, 1 - getPointDimIndex(axis));\n var pixelValue = coordSys.dataToPoint(value)[0];\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n var layoutInfo = singleAxisHelper.layout(axisModel);\n viewHelper.buildCartesianSingleLabelElOption(\n // @ts-ignore\n value, elOption, layoutInfo, axisModel, axisPointerModel, api);\n };\n /**\n * @override\n */\n SingleAxisPointer.prototype.getHandleTransform = function (value, axisModel, axisPointerModel) {\n var layoutInfo = singleAxisHelper.layout(axisModel, {\n labelInside: false\n });\n // @ts-ignore\n layoutInfo.labelMargin = axisPointerModel.get(['handle', 'margin']);\n var position = viewHelper.getTransformedPosition(axisModel.axis, value, layoutInfo);\n return {\n x: position[0],\n y: position[1],\n rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)\n };\n };\n /**\n * @override\n */\n SingleAxisPointer.prototype.updateHandleTransform = function (transform, delta, axisModel, axisPointerModel) {\n var axis = axisModel.axis;\n var coordSys = axis.coordinateSystem;\n var dimIndex = getPointDimIndex(axis);\n var axisExtent = getGlobalExtent(coordSys, dimIndex);\n var currPosition = [transform.x, transform.y];\n currPosition[dimIndex] += delta[dimIndex];\n currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]);\n currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]);\n var otherExtent = getGlobalExtent(coordSys, 1 - dimIndex);\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n return {\n x: currPosition[0],\n y: currPosition[1],\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: {\n verticalAlign: 'middle'\n }\n };\n };\n return SingleAxisPointer;\n}(BaseAxisPointer);\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getPointDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = axis.getBandWidth();\n var span = otherExtent[1] - otherExtent[0];\n return {\n type: 'Rect',\n shape: viewHelper.makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getPointDimIndex(axis))\n };\n }\n};\nfunction getPointDimIndex(axis) {\n return axis.isHorizontal() ? 0 : 1;\n}\nfunction getGlobalExtent(coordSys, dimIndex) {\n var rect = coordSys.getRect();\n return [rect[XY[dimIndex]], rect[XY[dimIndex]] + rect[WH[dimIndex]]];\n}\nexport default SingleAxisPointer;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { use } from '../../extension.js';\nimport ComponentView from '../../view/Component.js';\nimport SingleAxisView from '../axis/SingleAxisView.js';\nimport axisModelCreator from '../../coord/axisModelCreator.js';\nimport SingleAxisModel from '../../coord/single/AxisModel.js';\nimport singleCreator from '../../coord/single/singleCreator.js';\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport AxisView from '../axis/AxisView.js';\nimport SingleAxisPointer from '../axisPointer/SingleAxisPointer.js';\nvar SingleView = /** @class */function (_super) {\n __extends(SingleView, _super);\n function SingleView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SingleView.type;\n return _this;\n }\n SingleView.type = 'single';\n return SingleView;\n}(ComponentView);\nexport function install(registers) {\n use(installAxisPointer);\n AxisView.registerAxisPointerClass('SingleAxisPointer', SingleAxisPointer);\n registers.registerComponentView(SingleView);\n // Axis\n registers.registerComponentView(SingleAxisView);\n registers.registerComponentModel(SingleAxisModel);\n axisModelCreator(registers, 'single', SingleAxisModel, SingleAxisModel.defaultOption);\n registers.registerCoordinateSystem('single', singleCreator);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { getLayoutParams, sizeCalculable, mergeLayoutParam } from '../../util/layout.js';\nvar CalendarModel = /** @class */function (_super) {\n __extends(CalendarModel, _super);\n function CalendarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CalendarModel.type;\n return _this;\n }\n /**\n * @override\n */\n CalendarModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n _super.prototype.init.apply(this, arguments);\n mergeAndNormalizeLayoutParams(option, inputPositionParams);\n };\n /**\n * @override\n */\n CalendarModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n mergeAndNormalizeLayoutParams(this.option, option);\n };\n CalendarModel.prototype.getCellSize = function () {\n // Has been normalized\n return this.option.cellSize;\n };\n CalendarModel.type = 'calendar';\n CalendarModel.defaultOption = {\n // zlevel: 0,\n z: 2,\n left: 80,\n top: 60,\n cellSize: 20,\n // horizontal vertical\n orient: 'horizontal',\n // month separate line style\n splitLine: {\n show: true,\n lineStyle: {\n color: '#000',\n width: 1,\n type: 'solid'\n }\n },\n // rect style temporarily unused emphasis\n itemStyle: {\n color: '#fff',\n borderWidth: 1,\n borderColor: '#ccc'\n },\n // week text style\n dayLabel: {\n show: true,\n firstDay: 0,\n // start end\n position: 'start',\n margin: '50%',\n color: '#000'\n },\n // month text style\n monthLabel: {\n show: true,\n // start end\n position: 'start',\n margin: 5,\n // center or left\n align: 'center',\n formatter: null,\n color: '#000'\n },\n // year text style\n yearLabel: {\n show: true,\n // top bottom left right\n position: null,\n margin: 30,\n formatter: null,\n color: '#ccc',\n fontFamily: 'sans-serif',\n fontWeight: 'bolder',\n fontSize: 20\n }\n };\n return CalendarModel;\n}(ComponentModel);\nfunction mergeAndNormalizeLayoutParams(target, raw) {\n // Normalize cellSize\n var cellSize = target.cellSize;\n var cellSizeArr;\n if (!zrUtil.isArray(cellSize)) {\n cellSizeArr = target.cellSize = [cellSize, cellSize];\n } else {\n cellSizeArr = cellSize;\n }\n if (cellSizeArr.length === 1) {\n cellSizeArr[1] = cellSizeArr[0];\n }\n var ignoreSize = zrUtil.map([0, 1], function (hvIdx) {\n // If user have set `width` or both `left` and `right`, cellSizeArr\n // will be automatically set to 'auto', otherwise the default\n // setting of cellSizeArr will make `width` setting not work.\n if (sizeCalculable(raw, hvIdx)) {\n cellSizeArr[hvIdx] = 'auto';\n }\n return cellSizeArr[hvIdx] != null && cellSizeArr[hvIdx] !== 'auto';\n });\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: ignoreSize\n });\n}\nexport default CalendarModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { isString, extend, map, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { formatTplSimple } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getLocaleModel } from '../../core/locale.js';\nvar CalendarView = /** @class */function (_super) {\n __extends(CalendarView, _super);\n function CalendarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CalendarView.type;\n return _this;\n }\n CalendarView.prototype.render = function (calendarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n var coordSys = calendarModel.coordinateSystem;\n // range info\n var rangeData = coordSys.getRangeInfo();\n var orient = coordSys.getOrient();\n // locale\n var localeModel = ecModel.getLocaleModel();\n this._renderDayRect(calendarModel, rangeData, group);\n // _renderLines must be called prior to following function\n this._renderLines(calendarModel, rangeData, orient, group);\n this._renderYearText(calendarModel, rangeData, orient, group);\n this._renderMonthText(calendarModel, localeModel, orient, group);\n this._renderWeekText(calendarModel, localeModel, rangeData, orient, group);\n };\n // render day rect\n CalendarView.prototype._renderDayRect = function (calendarModel, rangeData, group) {\n var coordSys = calendarModel.coordinateSystem;\n var itemRectStyleModel = calendarModel.getModel('itemStyle').getItemStyle();\n var sw = coordSys.getCellWidth();\n var sh = coordSys.getCellHeight();\n for (var i = rangeData.start.time; i <= rangeData.end.time; i = coordSys.getNextNDay(i, 1).time) {\n var point = coordSys.dataToRect([i], false).tl;\n // every rect\n var rect = new graphic.Rect({\n shape: {\n x: point[0],\n y: point[1],\n width: sw,\n height: sh\n },\n cursor: 'default',\n style: itemRectStyleModel\n });\n group.add(rect);\n }\n };\n // render separate line\n CalendarView.prototype._renderLines = function (calendarModel, rangeData, orient, group) {\n var self = this;\n var coordSys = calendarModel.coordinateSystem;\n var lineStyleModel = calendarModel.getModel(['splitLine', 'lineStyle']).getLineStyle();\n var show = calendarModel.get(['splitLine', 'show']);\n var lineWidth = lineStyleModel.lineWidth;\n this._tlpoints = [];\n this._blpoints = [];\n this._firstDayOfMonth = [];\n this._firstDayPoints = [];\n var firstDay = rangeData.start;\n for (var i = 0; firstDay.time <= rangeData.end.time; i++) {\n addPoints(firstDay.formatedDate);\n if (i === 0) {\n firstDay = coordSys.getDateInfo(rangeData.start.y + '-' + rangeData.start.m);\n }\n var date = firstDay.date;\n date.setMonth(date.getMonth() + 1);\n firstDay = coordSys.getDateInfo(date);\n }\n addPoints(coordSys.getNextNDay(rangeData.end.time, 1).formatedDate);\n function addPoints(date) {\n self._firstDayOfMonth.push(coordSys.getDateInfo(date));\n self._firstDayPoints.push(coordSys.dataToRect([date], false).tl);\n var points = self._getLinePointsOfOneWeek(calendarModel, date, orient);\n self._tlpoints.push(points[0]);\n self._blpoints.push(points[points.length - 1]);\n show && self._drawSplitline(points, lineStyleModel, group);\n }\n // render top/left line\n show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group);\n // render bottom/right line\n show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group);\n };\n // get points at both ends\n CalendarView.prototype._getEdgesPoints = function (points, lineWidth, orient) {\n var rs = [points[0].slice(), points[points.length - 1].slice()];\n var idx = orient === 'horizontal' ? 0 : 1;\n // both ends of the line are extend half lineWidth\n rs[0][idx] = rs[0][idx] - lineWidth / 2;\n rs[1][idx] = rs[1][idx] + lineWidth / 2;\n return rs;\n };\n // render split line\n CalendarView.prototype._drawSplitline = function (points, lineStyle, group) {\n var poyline = new graphic.Polyline({\n z2: 20,\n shape: {\n points: points\n },\n style: lineStyle\n });\n group.add(poyline);\n };\n // render month line of one week points\n CalendarView.prototype._getLinePointsOfOneWeek = function (calendarModel, date, orient) {\n var coordSys = calendarModel.coordinateSystem;\n var parsedDate = coordSys.getDateInfo(date);\n var points = [];\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(parsedDate.time, i);\n var point = coordSys.dataToRect([tmpD.time], false);\n points[2 * tmpD.day] = point.tl;\n points[2 * tmpD.day + 1] = point[orient === 'horizontal' ? 'bl' : 'tr'];\n }\n return points;\n };\n CalendarView.prototype._formatterLabel = function (formatter, params) {\n if (isString(formatter) && formatter) {\n return formatTplSimple(formatter, params);\n }\n if (isFunction(formatter)) {\n return formatter(params);\n }\n return params.nameMap;\n };\n CalendarView.prototype._yearTextPositionControl = function (textEl, point, orient, position, margin) {\n var x = point[0];\n var y = point[1];\n var aligns = ['center', 'bottom'];\n if (position === 'bottom') {\n y += margin;\n aligns = ['center', 'top'];\n } else if (position === 'left') {\n x -= margin;\n } else if (position === 'right') {\n x += margin;\n aligns = ['center', 'top'];\n } else {\n // top\n y -= margin;\n }\n var rotate = 0;\n if (position === 'left' || position === 'right') {\n rotate = Math.PI / 2;\n }\n return {\n rotation: rotate,\n x: x,\n y: y,\n style: {\n align: aligns[0],\n verticalAlign: aligns[1]\n }\n };\n };\n // render year\n CalendarView.prototype._renderYearText = function (calendarModel, rangeData, orient, group) {\n var yearLabel = calendarModel.getModel('yearLabel');\n if (!yearLabel.get('show')) {\n return;\n }\n var margin = yearLabel.get('margin');\n var pos = yearLabel.get('position');\n if (!pos) {\n pos = orient !== 'horizontal' ? 'top' : 'left';\n }\n var points = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]];\n var xc = (points[0][0] + points[1][0]) / 2;\n var yc = (points[0][1] + points[1][1]) / 2;\n var idx = orient === 'horizontal' ? 0 : 1;\n var posPoints = {\n top: [xc, points[idx][1]],\n bottom: [xc, points[1 - idx][1]],\n left: [points[1 - idx][0], yc],\n right: [points[idx][0], yc]\n };\n var name = rangeData.start.y;\n if (+rangeData.end.y > +rangeData.start.y) {\n name = name + '-' + rangeData.end.y;\n }\n var formatter = yearLabel.get('formatter');\n var params = {\n start: rangeData.start.y,\n end: rangeData.end.y,\n nameMap: name\n };\n var content = this._formatterLabel(formatter, params);\n var yearText = new graphic.Text({\n z2: 30,\n style: createTextStyle(yearLabel, {\n text: content\n })\n });\n yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin));\n group.add(yearText);\n };\n CalendarView.prototype._monthTextPositionControl = function (point, isCenter, orient, position, margin) {\n var align = 'left';\n var vAlign = 'top';\n var x = point[0];\n var y = point[1];\n if (orient === 'horizontal') {\n y = y + margin;\n if (isCenter) {\n align = 'center';\n }\n if (position === 'start') {\n vAlign = 'bottom';\n }\n } else {\n x = x + margin;\n if (isCenter) {\n vAlign = 'middle';\n }\n if (position === 'start') {\n align = 'right';\n }\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render month and year text\n CalendarView.prototype._renderMonthText = function (calendarModel, localeModel, orient, group) {\n var monthLabel = calendarModel.getModel('monthLabel');\n if (!monthLabel.get('show')) {\n return;\n }\n var nameMap = monthLabel.get('nameMap');\n var margin = monthLabel.get('margin');\n var pos = monthLabel.get('position');\n var align = monthLabel.get('align');\n var termPoints = [this._tlpoints, this._blpoints];\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // PENDING\n // for ZH locale, original form is `一月` but current form is `1月`\n nameMap = localeModel.get(['time', 'monthAbbr']) || [];\n }\n var idx = pos === 'start' ? 0 : 1;\n var axis = orient === 'horizontal' ? 0 : 1;\n margin = pos === 'start' ? -margin : margin;\n var isCenter = align === 'center';\n for (var i = 0; i < termPoints[idx].length - 1; i++) {\n var tmp = termPoints[idx][i].slice();\n var firstDay = this._firstDayOfMonth[i];\n if (isCenter) {\n var firstDayPoints = this._firstDayPoints[i];\n tmp[axis] = (firstDayPoints[axis] + termPoints[0][i + 1][axis]) / 2;\n }\n var formatter = monthLabel.get('formatter');\n var name_1 = nameMap[+firstDay.m - 1];\n var params = {\n yyyy: firstDay.y,\n yy: (firstDay.y + '').slice(2),\n MM: firstDay.m,\n M: +firstDay.m,\n nameMap: name_1\n };\n var content = this._formatterLabel(formatter, params);\n var monthText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(monthLabel, {\n text: content\n }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin))\n });\n group.add(monthText);\n }\n };\n CalendarView.prototype._weekTextPositionControl = function (point, orient, position, margin, cellSize) {\n var align = 'center';\n var vAlign = 'middle';\n var x = point[0];\n var y = point[1];\n var isStart = position === 'start';\n if (orient === 'horizontal') {\n x = x + margin + (isStart ? 1 : -1) * cellSize[0] / 2;\n align = isStart ? 'right' : 'left';\n } else {\n y = y + margin + (isStart ? 1 : -1) * cellSize[1] / 2;\n vAlign = isStart ? 'bottom' : 'top';\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render weeks\n CalendarView.prototype._renderWeekText = function (calendarModel, localeModel, rangeData, orient, group) {\n var dayLabel = calendarModel.getModel('dayLabel');\n if (!dayLabel.get('show')) {\n return;\n }\n var coordSys = calendarModel.coordinateSystem;\n var pos = dayLabel.get('position');\n var nameMap = dayLabel.get('nameMap');\n var margin = dayLabel.get('margin');\n var firstDayOfWeek = coordSys.getFirstDayOfWeek();\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // Use the first letter of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file\n var dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);\n nameMap = dayOfWeekShort || map(localeModel.get(['time', 'dayOfWeekAbbr']), function (val) {\n return val[0];\n });\n }\n var start = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time;\n var cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()];\n margin = parsePercent(margin, Math.min(cellSize[1], cellSize[0]));\n if (pos === 'start') {\n start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time;\n margin = -margin;\n }\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(start, i);\n var point = coordSys.dataToRect([tmpD.time], false).center;\n var day = i;\n day = Math.abs((i + firstDayOfWeek) % 7);\n var weekText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(dayLabel, {\n text: nameMap[day]\n }), this._weekTextPositionControl(point, orient, pos, margin, cellSize))\n });\n group.add(weekText);\n }\n };\n CalendarView.type = 'calendar';\n return CalendarView;\n}(ComponentView);\nexport default CalendarView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as layout from '../../util/layout.js';\nimport * as numberUtil from '../../util/number.js';\n// (24*60*60*1000)\nvar PROXIMATE_ONE_DAY = 86400000;\nvar Calendar = /** @class */function () {\n function Calendar(calendarModel, ecModel, api) {\n this.type = 'calendar';\n this.dimensions = Calendar.dimensions;\n // Required in createListFromData\n this.getDimensionsInfo = Calendar.getDimensionsInfo;\n this._model = calendarModel;\n }\n Calendar.getDimensionsInfo = function () {\n return [{\n name: 'time',\n type: 'time'\n }, 'value'];\n };\n Calendar.prototype.getRangeInfo = function () {\n return this._rangeInfo;\n };\n Calendar.prototype.getModel = function () {\n return this._model;\n };\n Calendar.prototype.getRect = function () {\n return this._rect;\n };\n Calendar.prototype.getCellWidth = function () {\n return this._sw;\n };\n Calendar.prototype.getCellHeight = function () {\n return this._sh;\n };\n Calendar.prototype.getOrient = function () {\n return this._orient;\n };\n /**\n * getFirstDayOfWeek\n *\n * @example\n * 0 : start at Sunday\n * 1 : start at Monday\n *\n * @return {number}\n */\n Calendar.prototype.getFirstDayOfWeek = function () {\n return this._firstDayOfWeek;\n };\n /**\n * get date info\n * }\n */\n Calendar.prototype.getDateInfo = function (date) {\n date = numberUtil.parseDate(date);\n var y = date.getFullYear();\n var m = date.getMonth() + 1;\n var mStr = m < 10 ? '0' + m : '' + m;\n var d = date.getDate();\n var dStr = d < 10 ? '0' + d : '' + d;\n var day = date.getDay();\n day = Math.abs((day + 7 - this.getFirstDayOfWeek()) % 7);\n return {\n y: y + '',\n m: mStr,\n d: dStr,\n day: day,\n time: date.getTime(),\n formatedDate: y + '-' + mStr + '-' + dStr,\n date: date\n };\n };\n Calendar.prototype.getNextNDay = function (date, n) {\n n = n || 0;\n if (n === 0) {\n return this.getDateInfo(date);\n }\n date = new Date(this.getDateInfo(date).time);\n date.setDate(date.getDate() + n);\n return this.getDateInfo(date);\n };\n Calendar.prototype.update = function (ecModel, api) {\n this._firstDayOfWeek = +this._model.getModel('dayLabel').get('firstDay');\n this._orient = this._model.get('orient');\n this._lineWidth = this._model.getModel('itemStyle').getItemStyle().lineWidth || 0;\n this._rangeInfo = this._getRangeInfo(this._initRangeOption());\n var weeks = this._rangeInfo.weeks || 1;\n var whNames = ['width', 'height'];\n var cellSize = this._model.getCellSize().slice();\n var layoutParams = this._model.getBoxLayoutParams();\n var cellNumbers = this._orient === 'horizontal' ? [weeks, 7] : [7, weeks];\n zrUtil.each([0, 1], function (idx) {\n if (cellSizeSpecified(cellSize, idx)) {\n layoutParams[whNames[idx]] = cellSize[idx] * cellNumbers[idx];\n }\n });\n var whGlobal = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var calendarRect = this._rect = layout.getLayoutRect(layoutParams, whGlobal);\n zrUtil.each([0, 1], function (idx) {\n if (!cellSizeSpecified(cellSize, idx)) {\n cellSize[idx] = calendarRect[whNames[idx]] / cellNumbers[idx];\n }\n });\n function cellSizeSpecified(cellSize, idx) {\n return cellSize[idx] != null && cellSize[idx] !== 'auto';\n }\n // Has been calculated out number.\n this._sw = cellSize[0];\n this._sh = cellSize[1];\n };\n /**\n * Convert a time data(time, value) item to (x, y) point.\n */\n // TODO Clamp of calendar is not same with cartesian coordinate systems.\n // It will return NaN if data exceeds.\n Calendar.prototype.dataToPoint = function (data, clamp) {\n zrUtil.isArray(data) && (data = data[0]);\n clamp == null && (clamp = true);\n var dayInfo = this.getDateInfo(data);\n var range = this._rangeInfo;\n var date = dayInfo.formatedDate;\n // if not in range return [NaN, NaN]\n if (clamp && !(dayInfo.time >= range.start.time && dayInfo.time < range.end.time + PROXIMATE_ONE_DAY)) {\n return [NaN, NaN];\n }\n var week = dayInfo.day;\n var nthWeek = this._getRangeInfo([range.start.time, date]).nthWeek;\n if (this._orient === 'vertical') {\n return [this._rect.x + week * this._sw + this._sw / 2, this._rect.y + nthWeek * this._sh + this._sh / 2];\n }\n return [this._rect.x + nthWeek * this._sw + this._sw / 2, this._rect.y + week * this._sh + this._sh / 2];\n };\n /**\n * Convert a (x, y) point to time data\n */\n Calendar.prototype.pointToData = function (point) {\n var date = this.pointToDate(point);\n return date && date.time;\n };\n /**\n * Convert a time date item to (x, y) four point.\n */\n Calendar.prototype.dataToRect = function (data, clamp) {\n var point = this.dataToPoint(data, clamp);\n return {\n contentShape: {\n x: point[0] - (this._sw - this._lineWidth) / 2,\n y: point[1] - (this._sh - this._lineWidth) / 2,\n width: this._sw - this._lineWidth,\n height: this._sh - this._lineWidth\n },\n center: point,\n tl: [point[0] - this._sw / 2, point[1] - this._sh / 2],\n tr: [point[0] + this._sw / 2, point[1] - this._sh / 2],\n br: [point[0] + this._sw / 2, point[1] + this._sh / 2],\n bl: [point[0] - this._sw / 2, point[1] + this._sh / 2]\n };\n };\n /**\n * Convert a (x, y) point to time date\n *\n * @param {Array} point point\n * @return {Object} date\n */\n Calendar.prototype.pointToDate = function (point) {\n var nthX = Math.floor((point[0] - this._rect.x) / this._sw) + 1;\n var nthY = Math.floor((point[1] - this._rect.y) / this._sh) + 1;\n var range = this._rangeInfo.range;\n if (this._orient === 'vertical') {\n return this._getDateByWeeksAndDay(nthY, nthX - 1, range);\n }\n return this._getDateByWeeksAndDay(nthX, nthY - 1, range);\n };\n Calendar.prototype.convertToPixel = function (ecModel, finder, value) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.dataToPoint(value) : null;\n };\n Calendar.prototype.convertFromPixel = function (ecModel, finder, pixel) {\n var coordSys = getCoordSys(finder);\n return coordSys === this ? coordSys.pointToData(pixel) : null;\n };\n Calendar.prototype.containPoint = function (point) {\n console.warn('Not implemented.');\n return false;\n };\n /**\n * initRange\n * Normalize to an [start, end] array\n */\n Calendar.prototype._initRangeOption = function () {\n var range = this._model.get('range');\n var normalizedRange;\n // Convert [1990] to 1990\n if (zrUtil.isArray(range) && range.length === 1) {\n range = range[0];\n }\n if (!zrUtil.isArray(range)) {\n var rangeStr = range.toString();\n // One year.\n if (/^\\d{4}$/.test(rangeStr)) {\n normalizedRange = [rangeStr + '-01-01', rangeStr + '-12-31'];\n }\n // One month\n if (/^\\d{4}[\\/|-]\\d{1,2}$/.test(rangeStr)) {\n var start = this.getDateInfo(rangeStr);\n var firstDay = start.date;\n firstDay.setMonth(firstDay.getMonth() + 1);\n var end = this.getNextNDay(firstDay, -1);\n normalizedRange = [start.formatedDate, end.formatedDate];\n }\n // One day\n if (/^\\d{4}[\\/|-]\\d{1,2}[\\/|-]\\d{1,2}$/.test(rangeStr)) {\n normalizedRange = [rangeStr, rangeStr];\n }\n } else {\n normalizedRange = range;\n }\n if (!normalizedRange) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.logError('Invalid date range.');\n }\n // Not handling it.\n return range;\n }\n var tmp = this._getRangeInfo(normalizedRange);\n if (tmp.start.time > tmp.end.time) {\n normalizedRange.reverse();\n }\n return normalizedRange;\n };\n /**\n * range info\n *\n * @private\n * @param {Array} range range ['2017-01-01', '2017-07-08']\n * If range[0] > range[1], they will not be reversed.\n * @return {Object} obj\n */\n Calendar.prototype._getRangeInfo = function (range) {\n var parsedRange = [this.getDateInfo(range[0]), this.getDateInfo(range[1])];\n var reversed;\n if (parsedRange[0].time > parsedRange[1].time) {\n reversed = true;\n parsedRange.reverse();\n }\n var allDay = Math.floor(parsedRange[1].time / PROXIMATE_ONE_DAY) - Math.floor(parsedRange[0].time / PROXIMATE_ONE_DAY) + 1;\n // Consider case1 (#11677 #10430):\n // Set the system timezone as \"UK\", set the range to `['2016-07-01', '2016-12-31']`\n // Consider case2:\n // Firstly set system timezone as \"Time Zone: America/Toronto\",\n // ```\n // let first = new Date(1478412000000 - 3600 * 1000 * 2.5);\n // let second = new Date(1478412000000);\n // let allDays = Math.floor(second / ONE_DAY) - Math.floor(first / ONE_DAY) + 1;\n // ```\n // will get wrong result because of DST. So we should fix it.\n var date = new Date(parsedRange[0].time);\n var startDateNum = date.getDate();\n var endDateNum = parsedRange[1].date.getDate();\n date.setDate(startDateNum + allDay - 1);\n // The bias can not over a month, so just compare date.\n var dateNum = date.getDate();\n if (dateNum !== endDateNum) {\n var sign = date.getTime() - parsedRange[1].time > 0 ? 1 : -1;\n while ((dateNum = date.getDate()) !== endDateNum && (date.getTime() - parsedRange[1].time) * sign > 0) {\n allDay -= sign;\n date.setDate(dateNum - sign);\n }\n }\n var weeks = Math.floor((allDay + parsedRange[0].day + 6) / 7);\n var nthWeek = reversed ? -weeks + 1 : weeks - 1;\n reversed && parsedRange.reverse();\n return {\n range: [parsedRange[0].formatedDate, parsedRange[1].formatedDate],\n start: parsedRange[0],\n end: parsedRange[1],\n allDay: allDay,\n weeks: weeks,\n // From 0.\n nthWeek: nthWeek,\n fweek: parsedRange[0].day,\n lweek: parsedRange[1].day\n };\n };\n /**\n * get date by nthWeeks and week day in range\n *\n * @private\n * @param {number} nthWeek the week\n * @param {number} day the week day\n * @param {Array} range [d1, d2]\n * @return {Object}\n */\n Calendar.prototype._getDateByWeeksAndDay = function (nthWeek, day, range) {\n var rangeInfo = this._getRangeInfo(range);\n if (nthWeek > rangeInfo.weeks || nthWeek === 0 && day < rangeInfo.fweek || nthWeek === rangeInfo.weeks && day > rangeInfo.lweek) {\n return null;\n }\n var nthDay = (nthWeek - 1) * 7 - rangeInfo.fweek + day;\n var date = new Date(rangeInfo.start.time);\n date.setDate(+rangeInfo.start.d + nthDay);\n return this.getDateInfo(date);\n };\n Calendar.create = function (ecModel, api) {\n var calendarList = [];\n ecModel.eachComponent('calendar', function (calendarModel) {\n var calendar = new Calendar(calendarModel, ecModel, api);\n calendarList.push(calendar);\n calendarModel.coordinateSystem = calendar;\n });\n ecModel.eachSeries(function (calendarSeries) {\n if (calendarSeries.get('coordinateSystem') === 'calendar') {\n // Inject coordinate system\n calendarSeries.coordinateSystem = calendarList[calendarSeries.get('calendarIndex') || 0];\n }\n });\n return calendarList;\n };\n Calendar.dimensions = ['time', 'value'];\n return Calendar;\n}();\nfunction getCoordSys(finder) {\n var calendarModel = finder.calendarModel;\n var seriesModel = finder.seriesModel;\n var coordSys = calendarModel ? calendarModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem : null;\n return coordSys;\n}\nexport default Calendar;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport CalendarModel from '../../coord/calendar/CalendarModel.js';\nimport CalendarView from './CalendarView.js';\nimport Calendar from '../../coord/calendar/Calendar.js';\nexport function install(registers) {\n registers.registerComponentModel(CalendarModel);\n registers.registerComponentView(CalendarView);\n registers.registerCoordinateSystem('calendar', Calendar);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nimport { copyLayoutParams, mergeLayoutParam } from '../../util/layout.js';\n;\n;\n;\nexport function setKeyInfoToNewElOption(resultItem, newElOption) {\n var existElOption = resultItem.existing;\n // Set id and type after id assigned.\n newElOption.id = resultItem.keyInfo.id;\n !newElOption.type && existElOption && (newElOption.type = existElOption.type);\n // Set parent id if not specified\n if (newElOption.parentId == null) {\n var newElParentOption = newElOption.parentOption;\n if (newElParentOption) {\n newElOption.parentId = newElParentOption.id;\n } else if (existElOption) {\n newElOption.parentId = existElOption.parentId;\n }\n }\n // Clear\n newElOption.parentOption = null;\n}\nfunction isSetLoc(obj, props) {\n var isSet;\n zrUtil.each(props, function (prop) {\n obj[prop] != null && obj[prop] !== 'auto' && (isSet = true);\n });\n return isSet;\n}\nfunction mergeNewElOptionToExist(existList, index, newElOption) {\n // Update existing options, for `getOption` feature.\n var newElOptCopy = zrUtil.extend({}, newElOption);\n var existElOption = existList[index];\n var $action = newElOption.$action || 'merge';\n if ($action === 'merge') {\n if (existElOption) {\n if (process.env.NODE_ENV !== 'production') {\n var newType = newElOption.type;\n zrUtil.assert(!newType || existElOption.type === newType, 'Please set $action: \"replace\" to change `type`');\n }\n // We can ensure that newElOptCopy and existElOption are not\n // the same object, so `merge` will not change newElOptCopy.\n zrUtil.merge(existElOption, newElOptCopy, true);\n // Rigid body, use ignoreSize.\n mergeLayoutParam(existElOption, newElOptCopy, {\n ignoreSize: true\n });\n // Will be used in render.\n copyLayoutParams(newElOption, existElOption);\n // Copy transition info to new option so it can be used in the transition.\n // DO IT AFTER merge\n copyTransitionInfo(newElOption, existElOption);\n copyTransitionInfo(newElOption, existElOption, 'shape');\n copyTransitionInfo(newElOption, existElOption, 'style');\n copyTransitionInfo(newElOption, existElOption, 'extra');\n // Copy clipPath\n newElOption.clipPath = existElOption.clipPath;\n } else {\n existList[index] = newElOptCopy;\n }\n } else if ($action === 'replace') {\n existList[index] = newElOptCopy;\n } else if ($action === 'remove') {\n // null will be cleaned later.\n existElOption && (existList[index] = null);\n }\n}\nvar TRANSITION_PROPS_TO_COPY = ['transition', 'enterFrom', 'leaveTo'];\nvar ROOT_TRANSITION_PROPS_TO_COPY = TRANSITION_PROPS_TO_COPY.concat(['enterAnimation', 'updateAnimation', 'leaveAnimation']);\nfunction copyTransitionInfo(target, source, targetProp) {\n if (targetProp) {\n if (!target[targetProp] && source[targetProp]) {\n // TODO avoid creating this empty object when there is no transition configuration.\n target[targetProp] = {};\n }\n target = target[targetProp];\n source = source[targetProp];\n }\n if (!target || !source) {\n return;\n }\n var props = targetProp ? TRANSITION_PROPS_TO_COPY : ROOT_TRANSITION_PROPS_TO_COPY;\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n if (target[prop] == null && source[prop] != null) {\n target[prop] = source[prop];\n }\n }\n}\nfunction setLayoutInfoToExist(existItem, newElOption) {\n if (!existItem) {\n return;\n }\n existItem.hv = newElOption.hv = [\n // Rigid body, don't care about `width`.\n isSetLoc(newElOption, ['left', 'right']),\n // Rigid body, don't care about `height`.\n isSetLoc(newElOption, ['top', 'bottom'])];\n // Give default group size. Otherwise layout error may occur.\n if (existItem.type === 'group') {\n var existingGroupOpt = existItem;\n var newGroupOpt = newElOption;\n existingGroupOpt.width == null && (existingGroupOpt.width = newGroupOpt.width = 0);\n existingGroupOpt.height == null && (existingGroupOpt.height = newGroupOpt.height = 0);\n }\n}\nvar GraphicComponentModel = /** @class */function (_super) {\n __extends(GraphicComponentModel, _super);\n function GraphicComponentModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphicComponentModel.type;\n _this.preventAutoZ = true;\n return _this;\n }\n GraphicComponentModel.prototype.mergeOption = function (option, ecModel) {\n // Prevent default merge to elements\n var elements = this.option.elements;\n this.option.elements = null;\n _super.prototype.mergeOption.call(this, option, ecModel);\n this.option.elements = elements;\n };\n GraphicComponentModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n var newList = (isInit ? thisOption : newOption).elements;\n var existList = thisOption.elements = isInit ? [] : thisOption.elements;\n var flattenedList = [];\n this._flatten(newList, flattenedList, null);\n var mappingResult = modelUtil.mappingToExists(existList, flattenedList, 'normalMerge');\n // Clear elOptionsToUpdate\n var elOptionsToUpdate = this._elOptionsToUpdate = [];\n zrUtil.each(mappingResult, function (resultItem, index) {\n var newElOption = resultItem.newOption;\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(zrUtil.isObject(newElOption) || resultItem.existing, 'Empty graphic option definition');\n }\n if (!newElOption) {\n return;\n }\n elOptionsToUpdate.push(newElOption);\n setKeyInfoToNewElOption(resultItem, newElOption);\n mergeNewElOptionToExist(existList, index, newElOption);\n setLayoutInfoToExist(existList[index], newElOption);\n }, this);\n // Clean\n thisOption.elements = zrUtil.filter(existList, function (item) {\n // $action should be volatile, otherwise option gotten from\n // `getOption` will contain unexpected $action.\n item && delete item.$action;\n return item != null;\n });\n };\n /**\n * Convert\n * [{\n * type: 'group',\n * id: 'xx',\n * children: [{type: 'circle'}, {type: 'polygon'}]\n * }]\n * to\n * [\n * {type: 'group', id: 'xx'},\n * {type: 'circle', parentId: 'xx'},\n * {type: 'polygon', parentId: 'xx'}\n * ]\n */\n GraphicComponentModel.prototype._flatten = function (optionList, result, parentOption) {\n zrUtil.each(optionList, function (option) {\n if (!option) {\n return;\n }\n if (parentOption) {\n option.parentOption = parentOption;\n }\n result.push(option);\n var children = option.children;\n // here we don't judge if option.type is `group`\n // when new option doesn't provide `type`, it will cause that the children can't be updated.\n if (children && children.length) {\n this._flatten(children, result, option);\n }\n // Deleting for JSON output, and for not affecting group creation.\n delete option.children;\n }, this);\n };\n // FIXME\n // Pass to view using payload? setOption has a payload?\n GraphicComponentModel.prototype.useElOptionsToUpdate = function () {\n var els = this._elOptionsToUpdate;\n // Clear to avoid render duplicately when zooming.\n this._elOptionsToUpdate = null;\n return els;\n };\n GraphicComponentModel.type = 'graphic';\n GraphicComponentModel.defaultOption = {\n elements: []\n // parentId: null\n };\n\n return GraphicComponentModel;\n}(ComponentModel);\nexport { GraphicComponentModel };","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport * as modelUtil from '../../util/model.js';\nimport * as graphicUtil from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isEC4CompatibleStyle, convertFromEC4CompatibleStyle } from '../../util/styleCompat.js';\nimport { applyLeaveTransition, applyUpdateTransition, isTransitionAll, updateLeaveTo } from '../../animation/customGraphicTransition.js';\nimport { updateProps } from '../../animation/basicTransition.js';\nimport { applyKeyframeAnimation, stopPreviousKeyframeAnimationAndRestore } from '../../animation/customGraphicKeyframeAnimation.js';\nvar nonShapeGraphicElements = {\n // Reserved but not supported in graphic component.\n path: null,\n compoundPath: null,\n // Supported in graphic component.\n group: graphicUtil.Group,\n image: graphicUtil.Image,\n text: graphicUtil.Text\n};\nexport var inner = modelUtil.makeInner();\n// ------------------------\n// View\n// ------------------------\nvar GraphicComponentView = /** @class */function (_super) {\n __extends(GraphicComponentView, _super);\n function GraphicComponentView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphicComponentView.type;\n return _this;\n }\n GraphicComponentView.prototype.init = function () {\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.render = function (graphicModel, ecModel, api) {\n // Having leveraged between use cases and algorithm complexity, a very\n // simple layout mechanism is used:\n // The size(width/height) can be determined by itself or its parent (not\n // implemented yet), but can not by its children. (Top-down travel)\n // The location(x/y) can be determined by the bounding rect of itself\n // (can including its descendants or not) and the size of its parent.\n // (Bottom-up travel)\n // When `chart.clear()` or `chart.setOption({...}, true)` with the same id,\n // view will be reused.\n if (graphicModel !== this._lastGraphicModel) {\n this._clear();\n }\n this._lastGraphicModel = graphicModel;\n this._updateElements(graphicModel);\n this._relocate(graphicModel, api);\n };\n /**\n * Update graphic elements.\n */\n GraphicComponentView.prototype._updateElements = function (graphicModel) {\n var elOptionsToUpdate = graphicModel.useElOptionsToUpdate();\n if (!elOptionsToUpdate) {\n return;\n }\n var elMap = this._elMap;\n var rootGroup = this.group;\n var globalZ = graphicModel.get('z');\n var globalZLevel = graphicModel.get('zlevel');\n // Top-down tranverse to assign graphic settings to each elements.\n zrUtil.each(elOptionsToUpdate, function (elOption) {\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var elExisting = id != null ? elMap.get(id) : null;\n var parentId = modelUtil.convertOptionIdName(elOption.parentId, null);\n var targetElParent = parentId != null ? elMap.get(parentId) : rootGroup;\n var elType = elOption.type;\n var elOptionStyle = elOption.style;\n if (elType === 'text' && elOptionStyle) {\n // In top/bottom mode, textVerticalAlign should not be used, which cause\n // inaccurately locating.\n if (elOption.hv && elOption.hv[1]) {\n elOptionStyle.textVerticalAlign = elOptionStyle.textBaseline = elOptionStyle.verticalAlign = elOptionStyle.align = null;\n }\n }\n var textContentOption = elOption.textContent;\n var textConfig = elOption.textConfig;\n if (elOptionStyle && isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption)) {\n var convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true);\n if (!textConfig && convertResult.textConfig) {\n textConfig = elOption.textConfig = convertResult.textConfig;\n }\n if (!textContentOption && convertResult.textContent) {\n textContentOption = convertResult.textContent;\n }\n }\n // Remove unnecessary props to avoid potential problems.\n var elOptionCleaned = getCleanedElOption(elOption);\n // For simple, do not support parent change, otherwise reorder is needed.\n if (process.env.NODE_ENV !== 'production') {\n elExisting && zrUtil.assert(targetElParent === elExisting.parent, 'Changing parent is not supported.');\n }\n var $action = elOption.$action || 'merge';\n var isMerge = $action === 'merge';\n var isReplace = $action === 'replace';\n if (isMerge) {\n var isInit = !elExisting;\n var el_1 = elExisting;\n if (isInit) {\n el_1 = createEl(id, targetElParent, elOption.type, elMap);\n } else {\n el_1 && (inner(el_1).isNew = false);\n // Stop and restore before update any other attributes.\n stopPreviousKeyframeAnimationAndRestore(el_1);\n }\n if (el_1) {\n applyUpdateTransition(el_1, elOptionCleaned, graphicModel, {\n isInit: isInit\n });\n updateCommonAttrs(el_1, elOption, globalZ, globalZLevel);\n }\n } else if (isReplace) {\n removeEl(elExisting, elOption, elMap, graphicModel);\n var el_2 = createEl(id, targetElParent, elOption.type, elMap);\n if (el_2) {\n applyUpdateTransition(el_2, elOptionCleaned, graphicModel, {\n isInit: true\n });\n updateCommonAttrs(el_2, elOption, globalZ, globalZLevel);\n }\n } else if ($action === 'remove') {\n updateLeaveTo(elExisting, elOption);\n removeEl(elExisting, elOption, elMap, graphicModel);\n }\n var el = elMap.get(id);\n if (el && textContentOption) {\n if (isMerge) {\n var textContentExisting = el.getTextContent();\n textContentExisting ? textContentExisting.attr(textContentOption) : el.setTextContent(new graphicUtil.Text(textContentOption));\n } else if (isReplace) {\n el.setTextContent(new graphicUtil.Text(textContentOption));\n }\n }\n if (el) {\n var clipPathOption = elOption.clipPath;\n if (clipPathOption) {\n var clipPathType = clipPathOption.type;\n var clipPath = void 0;\n var isInit = false;\n if (isMerge) {\n var oldClipPath = el.getClipPath();\n isInit = !oldClipPath || inner(oldClipPath).type !== clipPathType;\n clipPath = isInit ? newEl(clipPathType) : oldClipPath;\n } else if (isReplace) {\n isInit = true;\n clipPath = newEl(clipPathType);\n }\n el.setClipPath(clipPath);\n applyUpdateTransition(clipPath, clipPathOption, graphicModel, {\n isInit: isInit\n });\n applyKeyframeAnimation(clipPath, clipPathOption.keyframeAnimation, graphicModel);\n }\n var elInner = inner(el);\n el.setTextConfig(textConfig);\n elInner.option = elOption;\n setEventData(el, graphicModel, elOption);\n graphicUtil.setTooltipConfig({\n el: el,\n componentModel: graphicModel,\n itemName: el.name,\n itemTooltipOption: elOption.tooltip\n });\n applyKeyframeAnimation(el, elOption.keyframeAnimation, graphicModel);\n }\n });\n };\n /**\n * Locate graphic elements.\n */\n GraphicComponentView.prototype._relocate = function (graphicModel, api) {\n var elOptions = graphicModel.option.elements;\n var rootGroup = this.group;\n var elMap = this._elMap;\n var apiWidth = api.getWidth();\n var apiHeight = api.getHeight();\n var xy = ['x', 'y'];\n // Top-down to calculate percentage width/height of group\n for (var i = 0; i < elOptions.length; i++) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el || !el.isGroup) {\n continue;\n }\n var parentEl = el.parent;\n var isParentRoot = parentEl === rootGroup;\n // Like 'position:absolut' in css, default 0.\n var elInner = inner(el);\n var parentElInner = inner(parentEl);\n elInner.width = parsePercent(elInner.option.width, isParentRoot ? apiWidth : parentElInner.width) || 0;\n elInner.height = parsePercent(elInner.option.height, isParentRoot ? apiHeight : parentElInner.height) || 0;\n }\n // Bottom-up tranvese all elements (consider ec resize) to locate elements.\n for (var i = elOptions.length - 1; i >= 0; i--) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el) {\n continue;\n }\n var parentEl = el.parent;\n var parentElInner = inner(parentEl);\n var containerInfo = parentEl === rootGroup ? {\n width: apiWidth,\n height: apiHeight\n } : {\n width: parentElInner.width,\n height: parentElInner.height\n };\n // PENDING\n // Currently, when `bounding: 'all'`, the union bounding rect of the group\n // does not include the rect of [0, 0, group.width, group.height], which\n // is probably weird for users. Should we make a break change for it?\n var layoutPos = {};\n var layouted = layoutUtil.positionElement(el, elOption, containerInfo, null, {\n hv: elOption.hv,\n boundingMode: elOption.bounding\n }, layoutPos);\n if (!inner(el).isNew && layouted) {\n var transition = elOption.transition;\n var animatePos = {};\n for (var k = 0; k < xy.length; k++) {\n var key = xy[k];\n var val = layoutPos[key];\n if (transition && (isTransitionAll(transition) || zrUtil.indexOf(transition, key) >= 0)) {\n animatePos[key] = val;\n } else {\n el[key] = val;\n }\n }\n updateProps(el, animatePos, graphicModel, 0);\n } else {\n el.attr(layoutPos);\n }\n }\n };\n /**\n * Clear all elements.\n */\n GraphicComponentView.prototype._clear = function () {\n var _this = this;\n var elMap = this._elMap;\n elMap.each(function (el) {\n removeEl(el, inner(el).option, elMap, _this._lastGraphicModel);\n });\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.dispose = function () {\n this._clear();\n };\n GraphicComponentView.type = 'graphic';\n return GraphicComponentView;\n}(ComponentView);\nexport { GraphicComponentView };\nfunction newEl(graphicType) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(graphicType, 'graphic type MUST be set');\n }\n var Clz = zrUtil.hasOwn(nonShapeGraphicElements, graphicType)\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n ? nonShapeGraphicElements[graphicType] : graphicUtil.getShapeClass(graphicType);\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(Clz, \"graphic type \" + graphicType + \" can not be found\");\n }\n var el = new Clz({});\n inner(el).type = graphicType;\n return el;\n}\nfunction createEl(id, targetElParent, graphicType, elMap) {\n var el = newEl(graphicType);\n targetElParent.add(el);\n elMap.set(id, el);\n inner(el).id = id;\n inner(el).isNew = true;\n return el;\n}\nfunction removeEl(elExisting, elOption, elMap, graphicModel) {\n var existElParent = elExisting && elExisting.parent;\n if (existElParent) {\n elExisting.type === 'group' && elExisting.traverse(function (el) {\n removeEl(el, elOption, elMap, graphicModel);\n });\n applyLeaveTransition(elExisting, elOption, graphicModel);\n elMap.removeKey(inner(elExisting).id);\n }\n}\nfunction updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) {\n if (!el.isGroup) {\n zrUtil.each([['cursor', Displayable.prototype.cursor],\n // We should not support configure z and zlevel in the element level.\n // But seems we didn't limit it previously. So here still use it to avoid breaking.\n ['zlevel', defaultZlevel || 0], ['z', defaultZ || 0],\n // z2 must not be null/undefined, otherwise sort error may occur.\n ['z2', 0]], function (item) {\n var prop = item[0];\n if (zrUtil.hasOwn(elOption, prop)) {\n el[prop] = zrUtil.retrieve2(elOption[prop], item[1]);\n } else if (el[prop] == null) {\n el[prop] = item[1];\n }\n });\n }\n zrUtil.each(zrUtil.keys(elOption), function (key) {\n // Assign event handlers.\n // PENDING: should enumerate all event names or use pattern matching?\n if (key.indexOf('on') === 0) {\n var val = elOption[key];\n el[key] = zrUtil.isFunction(val) ? val : null;\n }\n });\n if (zrUtil.hasOwn(elOption, 'draggable')) {\n el.draggable = elOption.draggable;\n }\n // Other attributes\n elOption.name != null && (el.name = elOption.name);\n elOption.id != null && (el.id = elOption.id);\n}\n// Remove unnecessary props to avoid potential problems.\nfunction getCleanedElOption(elOption) {\n elOption = zrUtil.extend({}, elOption);\n zrUtil.each(['id', 'parentId', '$action', 'hv', 'bounding', 'textContent', 'clipPath'].concat(layoutUtil.LOCATION_PARAMS), function (name) {\n delete elOption[name];\n });\n return elOption;\n}\nfunction setEventData(el, graphicModel, elOption) {\n var eventData = getECData(el).eventData;\n // Simple optimize for large amount of elements that no need event.\n if (!el.silent && !el.ignore && !eventData) {\n eventData = getECData(el).eventData = {\n componentType: 'graphic',\n componentIndex: graphicModel.componentIndex,\n name: el.name\n };\n }\n // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n if (eventData) {\n eventData.info = elOption.info;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray } from 'zrender/lib/core/util.js';\nimport { GraphicComponentModel } from './GraphicModel.js';\nimport { GraphicComponentView } from './GraphicView.js';\nexport function install(registers) {\n registers.registerComponentModel(GraphicComponentModel);\n registers.registerComponentView(GraphicComponentView);\n registers.registerPreprocessor(function (option) {\n var graphicOption = option.graphic;\n // Convert\n // {graphic: [{left: 10, type: 'circle'}, ...]}\n // or\n // {graphic: {left: 10, type: 'circle'}}\n // to\n // {graphic: [{elements: [{left: 10, type: 'circle'}, ...]}]}\n if (isArray(graphicOption)) {\n if (!graphicOption[0] || !graphicOption[0].elements) {\n option.graphic = [{\n elements: graphicOption\n }];\n } else {\n // Only one graphic instance can be instantiated. (We don't\n // want that too many views are created in echarts._viewMap.)\n option.graphic = [option.graphic[0]];\n }\n } else if (graphicOption && !graphicOption.elements) {\n option.graphic = [{\n elements: [graphicOption]\n }];\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { indexOf, createHashMap, assert } from 'zrender/lib/core/util.js';\nexport var DATA_ZOOM_AXIS_DIMENSIONS = ['x', 'y', 'radius', 'angle', 'single'];\n// Supported coords.\n// FIXME: polar has been broken (but rarely used).\nvar SERIES_COORDS = ['cartesian2d', 'polar', 'singleAxis'];\nexport function isCoordSupported(seriesModel) {\n var coordType = seriesModel.get('coordinateSystem');\n return indexOf(SERIES_COORDS, coordType) >= 0;\n}\nexport function getAxisMainType(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'Axis';\n}\nexport function getAxisIndexPropName(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'AxisIndex';\n}\nexport function getAxisIdPropName(axisDim) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim);\n }\n return axisDim + 'AxisId';\n}\n/**\n * If two dataZoomModels has the same axis controlled, we say that they are 'linked'.\n * This function finds all linked dataZoomModels start from the given payload.\n */\nexport function findEffectedDataZooms(ecModel, payload) {\n // Key: `DataZoomAxisDimension`\n var axisRecords = createHashMap();\n var effectedModels = [];\n // Key: uid of dataZoomModel\n var effectedModelMap = createHashMap();\n // Find the dataZooms specified by payload.\n ecModel.eachComponent({\n mainType: 'dataZoom',\n query: payload\n }, function (dataZoomModel) {\n if (!effectedModelMap.get(dataZoomModel.uid)) {\n addToEffected(dataZoomModel);\n }\n });\n // Start from the given dataZoomModels, travel the graph to find\n // all of the linked dataZoom models.\n var foundNewLink;\n do {\n foundNewLink = false;\n ecModel.eachComponent('dataZoom', processSingle);\n } while (foundNewLink);\n function processSingle(dataZoomModel) {\n if (!effectedModelMap.get(dataZoomModel.uid) && isLinked(dataZoomModel)) {\n addToEffected(dataZoomModel);\n foundNewLink = true;\n }\n }\n function addToEffected(dataZoom) {\n effectedModelMap.set(dataZoom.uid, true);\n effectedModels.push(dataZoom);\n markAxisControlled(dataZoom);\n }\n function isLinked(dataZoomModel) {\n var isLink = false;\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisIdxArr = axisRecords.get(axisDim);\n if (axisIdxArr && axisIdxArr[axisIndex]) {\n isLink = true;\n }\n });\n return isLink;\n }\n function markAxisControlled(dataZoomModel) {\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n (axisRecords.get(axisDim) || axisRecords.set(axisDim, []))[axisIndex] = true;\n });\n }\n return effectedModels;\n}\n/**\n * Find the first target coordinate system.\n * Available after model built.\n *\n * @return Like {\n * grid: [\n * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1},\n * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0},\n * ...\n * ], // cartesians must not be null/undefined.\n * polar: [\n * {model: coord0, axisModels: [axis4], coordIndex: 0},\n * ...\n * ], // polars must not be null/undefined.\n * singleAxis: [\n * {model: coord0, axisModels: [], coordIndex: 0}\n * ]\n * }\n */\nexport function collectReferCoordSysModelInfo(dataZoomModel) {\n var ecModel = dataZoomModel.ecModel;\n var coordSysInfoWrap = {\n infoList: [],\n infoMap: createHashMap()\n };\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n if (!axisModel) {\n return;\n }\n var coordSysModel = axisModel.getCoordSysModel();\n if (!coordSysModel) {\n return;\n }\n var coordSysUid = coordSysModel.uid;\n var coordSysInfo = coordSysInfoWrap.infoMap.get(coordSysUid);\n if (!coordSysInfo) {\n coordSysInfo = {\n model: coordSysModel,\n axisModels: []\n };\n coordSysInfoWrap.infoList.push(coordSysInfo);\n coordSysInfoWrap.infoMap.set(coordSysUid, coordSysInfo);\n }\n coordSysInfo.axisModels.push(axisModel);\n });\n return coordSysInfoWrap;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { each, createHashMap, merge, assert } from 'zrender/lib/core/util.js';\nimport ComponentModel from '../../model/Component.js';\nimport { getAxisMainType, DATA_ZOOM_AXIS_DIMENSIONS } from './helper.js';\nimport { MULTIPLE_REFERRING, SINGLE_REFERRING } from '../../util/model.js';\nvar DataZoomAxisInfo = /** @class */function () {\n function DataZoomAxisInfo() {\n this.indexList = [];\n this.indexMap = [];\n }\n DataZoomAxisInfo.prototype.add = function (axisCmptIdx) {\n // Remove duplication.\n if (!this.indexMap[axisCmptIdx]) {\n this.indexList.push(axisCmptIdx);\n this.indexMap[axisCmptIdx] = true;\n }\n };\n return DataZoomAxisInfo;\n}();\nvar DataZoomModel = /** @class */function (_super) {\n __extends(DataZoomModel, _super);\n function DataZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = DataZoomModel.type;\n _this._autoThrottle = true;\n _this._noTarget = true;\n /**\n * It is `[rangeModeForMin, rangeModeForMax]`.\n * The optional values for `rangeMode`:\n * + `'value'` mode: the axis extent will always be determined by\n * `dataZoom.startValue` and `dataZoom.endValue`, despite\n * how data like and how `axis.min` and `axis.max` are.\n * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`,\n * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`,\n * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`.\n * Axis extent will be determined by the result of the percent of `[dMin, dMax]`.\n *\n * For example, when users are using dynamic data (update data periodically via `setOption`),\n * if in `'value`' mode, the window will be kept in a fixed value range despite how\n * data are appended, while if in `'percent'` mode, whe window range will be changed alone with\n * the appended data (suppose `axis.min` and `axis.max` are not specified).\n */\n _this._rangePropMode = ['percent', 'percent'];\n return _this;\n }\n DataZoomModel.prototype.init = function (option, parentModel, ecModel) {\n var inputRawOption = retrieveRawOption(option);\n /**\n * Suppose a \"main process\" start at the point that model prepared (that is,\n * model initialized or merged or method called in `action`).\n * We should keep the `main process` idempotent, that is, given a set of values\n * on `option`, we get the same result.\n *\n * But sometimes, values on `option` will be updated for providing users\n * a \"final calculated value\" (`dataZoomProcessor` will do that). Those value\n * should not be the base/input of the `main process`.\n *\n * So in that case we should save and keep the input of the `main process`\n * separately, called `settledOption`.\n *\n * For example, consider the case:\n * (Step_1) brush zoom the grid by `toolbox.dataZoom`,\n * where the original input `option.startValue`, `option.endValue` are earsed by\n * calculated value.\n * (Step)2) click the legend to hide and show a series,\n * where the new range is calculated by the earsed `startValue` and `endValue`,\n * which brings incorrect result.\n */\n this.settledOption = inputRawOption;\n this.mergeDefaultAndTheme(option, ecModel);\n this._doInit(inputRawOption);\n };\n DataZoomModel.prototype.mergeOption = function (newOption) {\n var inputRawOption = retrieveRawOption(newOption);\n // FIX #2591\n merge(this.option, newOption, true);\n merge(this.settledOption, inputRawOption, true);\n this._doInit(inputRawOption);\n };\n DataZoomModel.prototype._doInit = function (inputRawOption) {\n var thisOption = this.option;\n this._setDefaultThrottle(inputRawOption);\n this._updateRangeUse(inputRawOption);\n var settledOption = this.settledOption;\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n // start/end has higher priority over startValue/endValue if they\n // both set, but we should make chart.setOption({endValue: 1000})\n // effective, rather than chart.setOption({endValue: 1000, end: null}).\n if (this._rangePropMode[index] === 'value') {\n thisOption[names[0]] = settledOption[names[0]] = null;\n }\n // Otherwise do nothing and use the merge result.\n }, this);\n this._resetTarget();\n };\n DataZoomModel.prototype._resetTarget = function () {\n var optionOrient = this.get('orient', true);\n var targetAxisIndexMap = this._targetAxisInfoMap = createHashMap();\n var hasAxisSpecified = this._fillSpecifiedTargetAxis(targetAxisIndexMap);\n if (hasAxisSpecified) {\n this._orient = optionOrient || this._makeAutoOrientByTargetAxis();\n } else {\n this._orient = optionOrient || 'horizontal';\n this._fillAutoTargetAxisByOrient(targetAxisIndexMap, this._orient);\n }\n this._noTarget = true;\n targetAxisIndexMap.each(function (axisInfo) {\n if (axisInfo.indexList.length) {\n this._noTarget = false;\n }\n }, this);\n };\n DataZoomModel.prototype._fillSpecifiedTargetAxis = function (targetAxisIndexMap) {\n var hasAxisSpecified = false;\n each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) {\n var refering = this.getReferringComponents(getAxisMainType(axisDim), MULTIPLE_REFERRING);\n // When user set axisIndex as a empty array, we think that user specify axisIndex\n // but do not want use auto mode. Because empty array may be encountered when\n // some error occurred.\n if (!refering.specified) {\n return;\n }\n hasAxisSpecified = true;\n var axisInfo = new DataZoomAxisInfo();\n each(refering.models, function (axisModel) {\n axisInfo.add(axisModel.componentIndex);\n });\n targetAxisIndexMap.set(axisDim, axisInfo);\n }, this);\n return hasAxisSpecified;\n };\n DataZoomModel.prototype._fillAutoTargetAxisByOrient = function (targetAxisIndexMap, orient) {\n var ecModel = this.ecModel;\n var needAuto = true;\n // Find axis that parallel to dataZoom as default.\n if (needAuto) {\n var axisDim = orient === 'vertical' ? 'y' : 'x';\n var axisModels = ecModel.findComponents({\n mainType: axisDim + 'Axis'\n });\n setParallelAxis(axisModels, axisDim);\n }\n // Find axis that parallel to dataZoom as default.\n if (needAuto) {\n var axisModels = ecModel.findComponents({\n mainType: 'singleAxis',\n filter: function (axisModel) {\n return axisModel.get('orient', true) === orient;\n }\n });\n setParallelAxis(axisModels, 'single');\n }\n function setParallelAxis(axisModels, axisDim) {\n // At least use the first parallel axis as the target axis.\n var axisModel = axisModels[0];\n if (!axisModel) {\n return;\n }\n var axisInfo = new DataZoomAxisInfo();\n axisInfo.add(axisModel.componentIndex);\n targetAxisIndexMap.set(axisDim, axisInfo);\n needAuto = false;\n // Find parallel axes in the same grid.\n if (axisDim === 'x' || axisDim === 'y') {\n var gridModel_1 = axisModel.getReferringComponents('grid', SINGLE_REFERRING).models[0];\n gridModel_1 && each(axisModels, function (axModel) {\n if (axisModel.componentIndex !== axModel.componentIndex && gridModel_1 === axModel.getReferringComponents('grid', SINGLE_REFERRING).models[0]) {\n axisInfo.add(axModel.componentIndex);\n }\n });\n }\n }\n if (needAuto) {\n // If no parallel axis, find the first category axis as default. (Also consider polar).\n each(DATA_ZOOM_AXIS_DIMENSIONS, function (axisDim) {\n if (!needAuto) {\n return;\n }\n var axisModels = ecModel.findComponents({\n mainType: getAxisMainType(axisDim),\n filter: function (axisModel) {\n return axisModel.get('type', true) === 'category';\n }\n });\n if (axisModels[0]) {\n var axisInfo = new DataZoomAxisInfo();\n axisInfo.add(axisModels[0].componentIndex);\n targetAxisIndexMap.set(axisDim, axisInfo);\n needAuto = false;\n }\n }, this);\n }\n };\n DataZoomModel.prototype._makeAutoOrientByTargetAxis = function () {\n var dim;\n // Find the first axis\n this.eachTargetAxis(function (axisDim) {\n !dim && (dim = axisDim);\n }, this);\n return dim === 'y' ? 'vertical' : 'horizontal';\n };\n DataZoomModel.prototype._setDefaultThrottle = function (inputRawOption) {\n // When first time user set throttle, auto throttle ends.\n if (inputRawOption.hasOwnProperty('throttle')) {\n this._autoThrottle = false;\n }\n if (this._autoThrottle) {\n var globalOption = this.ecModel.option;\n this.option.throttle = globalOption.animation && globalOption.animationDurationUpdate > 0 ? 100 : 20;\n }\n };\n DataZoomModel.prototype._updateRangeUse = function (inputRawOption) {\n var rangePropMode = this._rangePropMode;\n var rangeModeInOption = this.get('rangeMode');\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n var percentSpecified = inputRawOption[names[0]] != null;\n var valueSpecified = inputRawOption[names[1]] != null;\n if (percentSpecified && !valueSpecified) {\n rangePropMode[index] = 'percent';\n } else if (!percentSpecified && valueSpecified) {\n rangePropMode[index] = 'value';\n } else if (rangeModeInOption) {\n rangePropMode[index] = rangeModeInOption[index];\n } else if (percentSpecified) {\n // percentSpecified && valueSpecified\n rangePropMode[index] = 'percent';\n }\n // else remain its original setting.\n });\n };\n\n DataZoomModel.prototype.noTarget = function () {\n return this._noTarget;\n };\n DataZoomModel.prototype.getFirstTargetAxisModel = function () {\n var firstAxisModel;\n this.eachTargetAxis(function (axisDim, axisIndex) {\n if (firstAxisModel == null) {\n firstAxisModel = this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n }\n }, this);\n return firstAxisModel;\n };\n /**\n * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel\n */\n DataZoomModel.prototype.eachTargetAxis = function (callback, context) {\n this._targetAxisInfoMap.each(function (axisInfo, axisDim) {\n each(axisInfo.indexList, function (axisIndex) {\n callback.call(context, axisDim, axisIndex);\n });\n });\n };\n /**\n * @return If not found, return null/undefined.\n */\n DataZoomModel.prototype.getAxisProxy = function (axisDim, axisIndex) {\n var axisModel = this.getAxisModel(axisDim, axisIndex);\n if (axisModel) {\n return axisModel.__dzAxisProxy;\n }\n };\n /**\n * @return If not found, return null/undefined.\n */\n DataZoomModel.prototype.getAxisModel = function (axisDim, axisIndex) {\n if (process.env.NODE_ENV !== 'production') {\n assert(axisDim && axisIndex != null);\n }\n var axisInfo = this._targetAxisInfoMap.get(axisDim);\n if (axisInfo && axisInfo.indexMap[axisIndex]) {\n return this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n }\n };\n /**\n * If not specified, set to undefined.\n */\n DataZoomModel.prototype.setRawRange = function (opt) {\n var thisOption = this.option;\n var settledOption = this.settledOption;\n each([['start', 'startValue'], ['end', 'endValue']], function (names) {\n // Consider the pair :\n // If one has value and the other one is `null/undefined`, we both set them\n // to `settledOption`. This strategy enables the feature to clear the original\n // value in `settledOption` to `null/undefined`.\n // But if both of them are `null/undefined`, we do not set them to `settledOption`\n // and keep `settledOption` with the original value. This strategy enables users to\n // only set but not set when calling\n // `dispatchAction`.\n // The pair is treated in the same way.\n if (opt[names[0]] != null || opt[names[1]] != null) {\n thisOption[names[0]] = settledOption[names[0]] = opt[names[0]];\n thisOption[names[1]] = settledOption[names[1]] = opt[names[1]];\n }\n }, this);\n this._updateRangeUse(opt);\n };\n DataZoomModel.prototype.setCalculatedRange = function (opt) {\n var option = this.option;\n each(['start', 'startValue', 'end', 'endValue'], function (name) {\n option[name] = opt[name];\n });\n };\n DataZoomModel.prototype.getPercentRange = function () {\n var axisProxy = this.findRepresentativeAxisProxy();\n if (axisProxy) {\n return axisProxy.getDataPercentWindow();\n }\n };\n /**\n * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0);\n *\n * @return [startValue, endValue] value can only be '-' or finite number.\n */\n DataZoomModel.prototype.getValueRange = function (axisDim, axisIndex) {\n if (axisDim == null && axisIndex == null) {\n var axisProxy = this.findRepresentativeAxisProxy();\n if (axisProxy) {\n return axisProxy.getDataValueWindow();\n }\n } else {\n return this.getAxisProxy(axisDim, axisIndex).getDataValueWindow();\n }\n };\n /**\n * @param axisModel If axisModel given, find axisProxy\n * corresponding to the axisModel\n */\n DataZoomModel.prototype.findRepresentativeAxisProxy = function (axisModel) {\n if (axisModel) {\n return axisModel.__dzAxisProxy;\n }\n // Find the first hosted axisProxy\n var firstProxy;\n var axisDimList = this._targetAxisInfoMap.keys();\n for (var i = 0; i < axisDimList.length; i++) {\n var axisDim = axisDimList[i];\n var axisInfo = this._targetAxisInfoMap.get(axisDim);\n for (var j = 0; j < axisInfo.indexList.length; j++) {\n var proxy = this.getAxisProxy(axisDim, axisInfo.indexList[j]);\n if (proxy.hostedBy(this)) {\n return proxy;\n }\n if (!firstProxy) {\n firstProxy = proxy;\n }\n }\n }\n // If no hosted proxy found, still need to return a proxy.\n // This case always happens in toolbox dataZoom, where axes are all hosted by\n // other dataZooms.\n return firstProxy;\n };\n DataZoomModel.prototype.getRangePropMode = function () {\n return this._rangePropMode.slice();\n };\n DataZoomModel.prototype.getOrient = function () {\n if (process.env.NODE_ENV !== 'production') {\n // Should not be called before initialized.\n assert(this._orient);\n }\n return this._orient;\n };\n DataZoomModel.type = 'dataZoom';\n DataZoomModel.dependencies = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'series', 'toolbox'];\n DataZoomModel.defaultOption = {\n // zlevel: 0,\n z: 4,\n filterMode: 'filter',\n start: 0,\n end: 100\n };\n return DataZoomModel;\n}(ComponentModel);\n/**\n * Retrieve those raw params from option, which will be cached separately,\n * because they will be overwritten by normalized/calculated values in the main\n * process.\n */\nfunction retrieveRawOption(option) {\n var ret = {};\n each(['start', 'end', 'startValue', 'endValue', 'throttle'], function (name) {\n option.hasOwnProperty(name) && (ret[name] = option[name]);\n });\n return ret;\n}\nexport default DataZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nvar SelectDataZoomModel = /** @class */function (_super) {\n __extends(SelectDataZoomModel, _super);\n function SelectDataZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SelectDataZoomModel.type;\n return _this;\n }\n SelectDataZoomModel.type = 'dataZoom.select';\n return SelectDataZoomModel;\n}(DataZoomModel);\nexport default SelectDataZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nvar DataZoomView = /** @class */function (_super) {\n __extends(DataZoomView, _super);\n function DataZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = DataZoomView.type;\n return _this;\n }\n DataZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) {\n this.dataZoomModel = dataZoomModel;\n this.ecModel = ecModel;\n this.api = api;\n };\n DataZoomView.type = 'dataZoom';\n return DataZoomView;\n}(ComponentView);\nexport default DataZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomView from './DataZoomView.js';\nvar SelectDataZoomView = /** @class */function (_super) {\n __extends(SelectDataZoomView, _super);\n function SelectDataZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SelectDataZoomView.type;\n return _this;\n }\n SelectDataZoomView.type = 'dataZoom.select';\n return SelectDataZoomView;\n}(DataZoomView);\nexport default SelectDataZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport { unionAxisExtentFromData } from '../../coord/axisHelper.js';\nimport { ensureScaleRawExtentInfo } from '../../coord/scaleRawExtentInfo.js';\nimport { getAxisMainType, isCoordSupported } from './helper.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\n/**\n * Operate single axis.\n * One axis can only operated by one axis operator.\n * Different dataZoomModels may be defined to operate the same axis.\n * (i.e. 'inside' data zoom and 'slider' data zoom components)\n * So dataZoomModels share one axisProxy in that case.\n */\nvar AxisProxy = /** @class */function () {\n function AxisProxy(dimName, axisIndex, dataZoomModel, ecModel) {\n this._dimName = dimName;\n this._axisIndex = axisIndex;\n this.ecModel = ecModel;\n this._dataZoomModel = dataZoomModel;\n // /**\n // * @readOnly\n // * @private\n // */\n // this.hasSeriesStacked;\n }\n /**\n * Whether the axisProxy is hosted by dataZoomModel.\n */\n AxisProxy.prototype.hostedBy = function (dataZoomModel) {\n return this._dataZoomModel === dataZoomModel;\n };\n /**\n * @return Value can only be NaN or finite value.\n */\n AxisProxy.prototype.getDataValueWindow = function () {\n return this._valueWindow.slice();\n };\n /**\n * @return {Array.}\n */\n AxisProxy.prototype.getDataPercentWindow = function () {\n return this._percentWindow.slice();\n };\n AxisProxy.prototype.getTargetSeriesModels = function () {\n var seriesModels = [];\n this.ecModel.eachSeries(function (seriesModel) {\n if (isCoordSupported(seriesModel)) {\n var axisMainType = getAxisMainType(this._dimName);\n var axisModel = seriesModel.getReferringComponents(axisMainType, SINGLE_REFERRING).models[0];\n if (axisModel && this._axisIndex === axisModel.componentIndex) {\n seriesModels.push(seriesModel);\n }\n }\n }, this);\n return seriesModels;\n };\n AxisProxy.prototype.getAxisModel = function () {\n return this.ecModel.getComponent(this._dimName + 'Axis', this._axisIndex);\n };\n AxisProxy.prototype.getMinMaxSpan = function () {\n return zrUtil.clone(this._minMaxSpan);\n };\n /**\n * Only calculate by given range and this._dataExtent, do not change anything.\n */\n AxisProxy.prototype.calculateDataWindow = function (opt) {\n var dataExtent = this._dataExtent;\n var axisModel = this.getAxisModel();\n var scale = axisModel.axis.scale;\n var rangePropMode = this._dataZoomModel.getRangePropMode();\n var percentExtent = [0, 100];\n var percentWindow = [];\n var valueWindow = [];\n var hasPropModeValue;\n each(['start', 'end'], function (prop, idx) {\n var boundPercent = opt[prop];\n var boundValue = opt[prop + 'Value'];\n // Notice: dataZoom is based either on `percentProp` ('start', 'end') or\n // on `valueProp` ('startValue', 'endValue'). (They are based on the data extent\n // but not min/max of axis, which will be calculated by data window then).\n // The former one is suitable for cases that a dataZoom component controls multiple\n // axes with different unit or extent, and the latter one is suitable for accurate\n // zoom by pixel (e.g., in dataZoomSelect).\n // we use `getRangePropMode()` to mark which prop is used. `rangePropMode` is updated\n // only when setOption or dispatchAction, otherwise it remains its original value.\n // (Why not only record `percentProp` and always map to `valueProp`? Because\n // the map `valueProp` -> `percentProp` -> `valueProp` probably not the original\n // `valueProp`. consider two axes constrolled by one dataZoom. They have different\n // data extent. All of values that are overflow the `dataExtent` will be calculated\n // to percent '100%').\n if (rangePropMode[idx] === 'percent') {\n boundPercent == null && (boundPercent = percentExtent[idx]);\n // Use scale.parse to math round for category or time axis.\n boundValue = scale.parse(numberUtil.linearMap(boundPercent, percentExtent, dataExtent));\n } else {\n hasPropModeValue = true;\n boundValue = boundValue == null ? dataExtent[idx] : scale.parse(boundValue);\n // Calculating `percent` from `value` may be not accurate, because\n // This calculation can not be inversed, because all of values that\n // are overflow the `dataExtent` will be calculated to percent '100%'\n boundPercent = numberUtil.linearMap(boundValue, dataExtent, percentExtent);\n }\n // valueWindow[idx] = round(boundValue);\n // percentWindow[idx] = round(boundPercent);\n // fallback to extent start/end when parsed value or percent is invalid\n valueWindow[idx] = boundValue == null || isNaN(boundValue) ? dataExtent[idx] : boundValue;\n percentWindow[idx] = boundPercent == null || isNaN(boundPercent) ? percentExtent[idx] : boundPercent;\n });\n asc(valueWindow);\n asc(percentWindow);\n // The windows from user calling of `dispatchAction` might be out of the extent,\n // or do not obey the `min/maxSpan`, `min/maxValueSpan`. But we don't restrict window\n // by `zoomLock` here, because we see `zoomLock` just as a interaction constraint,\n // where API is able to initialize/modify the window size even though `zoomLock`\n // specified.\n var spans = this._minMaxSpan;\n hasPropModeValue ? restrictSet(valueWindow, percentWindow, dataExtent, percentExtent, false) : restrictSet(percentWindow, valueWindow, percentExtent, dataExtent, true);\n function restrictSet(fromWindow, toWindow, fromExtent, toExtent, toValue) {\n var suffix = toValue ? 'Span' : 'ValueSpan';\n sliderMove(0, fromWindow, fromExtent, 'all', spans['min' + suffix], spans['max' + suffix]);\n for (var i = 0; i < 2; i++) {\n toWindow[i] = numberUtil.linearMap(fromWindow[i], fromExtent, toExtent, true);\n toValue && (toWindow[i] = scale.parse(toWindow[i]));\n }\n }\n return {\n valueWindow: valueWindow,\n percentWindow: percentWindow\n };\n };\n /**\n * Notice: reset should not be called before series.restoreData() is called,\n * so it is recommended to be called in \"process stage\" but not \"model init\n * stage\".\n */\n AxisProxy.prototype.reset = function (dataZoomModel) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n var targetSeries = this.getTargetSeriesModels();\n // Culculate data window and data extent, and record them.\n this._dataExtent = calculateDataExtent(this, this._dimName, targetSeries);\n // `calculateDataWindow` uses min/maxSpan.\n this._updateMinMaxSpan();\n var dataWindow = this.calculateDataWindow(dataZoomModel.settledOption);\n this._valueWindow = dataWindow.valueWindow;\n this._percentWindow = dataWindow.percentWindow;\n // Update axis setting then.\n this._setAxisModel();\n };\n AxisProxy.prototype.filterData = function (dataZoomModel, api) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n var axisDim = this._dimName;\n var seriesModels = this.getTargetSeriesModels();\n var filterMode = dataZoomModel.get('filterMode');\n var valueWindow = this._valueWindow;\n if (filterMode === 'none') {\n return;\n }\n // FIXME\n // Toolbox may has dataZoom injected. And if there are stacked bar chart\n // with NaN data, NaN will be filtered and stack will be wrong.\n // So we need to force the mode to be set empty.\n // In fect, it is not a big deal that do not support filterMode-'filter'\n // when using toolbox#dataZoom, utill tooltip#dataZoom support \"single axis\n // selection\" some day, which might need \"adapt to data extent on the\n // otherAxis\", which is disabled by filterMode-'empty'.\n // But currently, stack has been fixed to based on value but not index,\n // so this is not an issue any more.\n // let otherAxisModel = this.getOtherAxisModel();\n // if (dataZoomModel.get('$fromToolbox')\n // && otherAxisModel\n // && otherAxisModel.hasSeriesStacked\n // ) {\n // filterMode = 'empty';\n // }\n // TODO\n // filterMode 'weakFilter' and 'empty' is not optimized for huge data yet.\n each(seriesModels, function (seriesModel) {\n var seriesData = seriesModel.getData();\n var dataDims = seriesData.mapDimensionsAll(axisDim);\n if (!dataDims.length) {\n return;\n }\n if (filterMode === 'weakFilter') {\n var store_1 = seriesData.getStore();\n var dataDimIndices_1 = zrUtil.map(dataDims, function (dim) {\n return seriesData.getDimensionIndex(dim);\n }, seriesData);\n seriesData.filterSelf(function (dataIndex) {\n var leftOut;\n var rightOut;\n var hasValue;\n for (var i = 0; i < dataDims.length; i++) {\n var value = store_1.get(dataDimIndices_1[i], dataIndex);\n var thisHasValue = !isNaN(value);\n var thisLeftOut = value < valueWindow[0];\n var thisRightOut = value > valueWindow[1];\n if (thisHasValue && !thisLeftOut && !thisRightOut) {\n return true;\n }\n thisHasValue && (hasValue = true);\n thisLeftOut && (leftOut = true);\n thisRightOut && (rightOut = true);\n }\n // If both left out and right out, do not filter.\n return hasValue && leftOut && rightOut;\n });\n } else {\n each(dataDims, function (dim) {\n if (filterMode === 'empty') {\n seriesModel.setData(seriesData = seriesData.map(dim, function (value) {\n return !isInWindow(value) ? NaN : value;\n }));\n } else {\n var range = {};\n range[dim] = valueWindow;\n // console.time('select');\n seriesData.selectRange(range);\n // console.timeEnd('select');\n }\n });\n }\n\n each(dataDims, function (dim) {\n seriesData.setApproximateExtent(valueWindow, dim);\n });\n });\n function isInWindow(value) {\n return value >= valueWindow[0] && value <= valueWindow[1];\n }\n };\n AxisProxy.prototype._updateMinMaxSpan = function () {\n var minMaxSpan = this._minMaxSpan = {};\n var dataZoomModel = this._dataZoomModel;\n var dataExtent = this._dataExtent;\n each(['min', 'max'], function (minMax) {\n var percentSpan = dataZoomModel.get(minMax + 'Span');\n var valueSpan = dataZoomModel.get(minMax + 'ValueSpan');\n valueSpan != null && (valueSpan = this.getAxisModel().axis.scale.parse(valueSpan));\n // minValueSpan and maxValueSpan has higher priority than minSpan and maxSpan\n if (valueSpan != null) {\n percentSpan = numberUtil.linearMap(dataExtent[0] + valueSpan, dataExtent, [0, 100], true);\n } else if (percentSpan != null) {\n valueSpan = numberUtil.linearMap(percentSpan, [0, 100], dataExtent, true) - dataExtent[0];\n }\n minMaxSpan[minMax + 'Span'] = percentSpan;\n minMaxSpan[minMax + 'ValueSpan'] = valueSpan;\n }, this);\n };\n AxisProxy.prototype._setAxisModel = function () {\n var axisModel = this.getAxisModel();\n var percentWindow = this._percentWindow;\n var valueWindow = this._valueWindow;\n if (!percentWindow) {\n return;\n }\n // [0, 500]: arbitrary value, guess axis extent.\n var precision = numberUtil.getPixelPrecision(valueWindow, [0, 500]);\n precision = Math.min(precision, 20);\n // For value axis, if min/max/scale are not set, we just use the extent obtained\n // by series data, which may be a little different from the extent calculated by\n // `axisHelper.getScaleExtent`. But the different just affects the experience a\n // little when zooming. So it will not be fixed until some users require it strongly.\n var rawExtentInfo = axisModel.axis.scale.rawExtentInfo;\n if (percentWindow[0] !== 0) {\n rawExtentInfo.setDeterminedMinMax('min', +valueWindow[0].toFixed(precision));\n }\n if (percentWindow[1] !== 100) {\n rawExtentInfo.setDeterminedMinMax('max', +valueWindow[1].toFixed(precision));\n }\n rawExtentInfo.freeze();\n };\n return AxisProxy;\n}();\nfunction calculateDataExtent(axisProxy, axisDim, seriesModels) {\n var dataExtent = [Infinity, -Infinity];\n each(seriesModels, function (seriesModel) {\n unionAxisExtentFromData(dataExtent, seriesModel.getData(), axisDim);\n });\n // It is important to get \"consistent\" extent when more then one axes is\n // controlled by a `dataZoom`, otherwise those axes will not be synchronized\n // when zooming. But it is difficult to know what is \"consistent\", considering\n // axes have different type or even different meanings (For example, two\n // time axes are used to compare data of the same date in different years).\n // So basically dataZoom just obtains extent by series.data (in category axis\n // extent can be obtained from axis.data).\n // Nevertheless, user can set min/max/scale on axes to make extent of axes\n // consistent.\n var axisModel = axisProxy.getAxisModel();\n var rawExtentResult = ensureScaleRawExtentInfo(axisModel.axis.scale, axisModel, dataExtent).calculate();\n return [rawExtentResult.min, rawExtentResult.max];\n}\nexport default AxisProxy;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { createHashMap, each } from 'zrender/lib/core/util.js';\nimport { getAxisMainType } from './helper.js';\nimport AxisProxy from './AxisProxy.js';\nvar dataZoomProcessor = {\n // `dataZoomProcessor` will only be performed in needed series. Consider if\n // there is a line series and a pie series, it is better not to update the\n // line series if only pie series is needed to be updated.\n getTargetSeries: function (ecModel) {\n function eachAxisModel(cb) {\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex);\n cb(axisDim, axisIndex, axisModel, dataZoomModel);\n });\n });\n }\n // FIXME: it brings side-effect to `getTargetSeries`.\n // Prepare axis proxies.\n eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) {\n // dispose all last axis proxy, in case that some axis are deleted.\n axisModel.__dzAxisProxy = null;\n });\n var proxyList = [];\n eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) {\n // Different dataZooms may constrol the same axis. In that case,\n // an axisProxy serves both of them.\n if (!axisModel.__dzAxisProxy) {\n // Use the first dataZoomModel as the main model of axisProxy.\n axisModel.__dzAxisProxy = new AxisProxy(axisDim, axisIndex, dataZoomModel, ecModel);\n proxyList.push(axisModel.__dzAxisProxy);\n }\n });\n var seriesModelMap = createHashMap();\n each(proxyList, function (axisProxy) {\n each(axisProxy.getTargetSeriesModels(), function (seriesModel) {\n seriesModelMap.set(seriesModel.uid, seriesModel);\n });\n });\n return seriesModelMap;\n },\n // Consider appendData, where filter should be performed. Because data process is\n // in block mode currently, it is not need to worry about that the overallProgress\n // execute every frame.\n overallReset: function (ecModel, api) {\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // We calculate window and reset axis here but not in model\n // init stage and not after action dispatch handler, because\n // reset should be called after seriesData.restoreData.\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n dataZoomModel.getAxisProxy(axisDim, axisIndex).reset(dataZoomModel);\n });\n // Caution: data zoom filtering is order sensitive when using\n // percent range and no min/max/scale set on axis.\n // For example, we have dataZoom definition:\n // [\n // {xAxisIndex: 0, start: 30, end: 70},\n // {yAxisIndex: 0, start: 20, end: 80}\n // ]\n // In this case, [20, 80] of y-dataZoom should be based on data\n // that have filtered by x-dataZoom using range of [30, 70],\n // but should not be based on full raw data. Thus sliding\n // x-dataZoom will change both ranges of xAxis and yAxis,\n // while sliding y-dataZoom will only change the range of yAxis.\n // So we should filter x-axis after reset x-axis immediately,\n // and then reset y-axis and filter y-axis.\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n dataZoomModel.getAxisProxy(axisDim, axisIndex).filterData(dataZoomModel, api);\n });\n });\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // Fullfill all of the range props so that user\n // is able to get them from chart.getOption().\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n if (axisProxy) {\n var percentRange = axisProxy.getDataPercentWindow();\n var valueRange = axisProxy.getDataValueWindow();\n dataZoomModel.setCalculatedRange({\n start: percentRange[0],\n end: percentRange[1],\n startValue: valueRange[0],\n endValue: valueRange[1]\n });\n }\n });\n }\n};\nexport default dataZoomProcessor;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { findEffectedDataZooms } from './helper.js';\nimport { each } from 'zrender/lib/core/util.js';\nexport default function installDataZoomAction(registers) {\n registers.registerAction('dataZoom', function (payload, ecModel) {\n var effectedModels = findEffectedDataZooms(ecModel, payload);\n each(effectedModels, function (dataZoomModel) {\n dataZoomModel.setRawRange({\n start: payload.start,\n end: payload.end,\n startValue: payload.startValue,\n endValue: payload.endValue\n });\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport dataZoomProcessor from './dataZoomProcessor.js';\nimport installDataZoomAction from './dataZoomAction.js';\nvar installed = false;\nexport default function installCommon(registers) {\n if (installed) {\n return;\n }\n installed = true;\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, dataZoomProcessor);\n installDataZoomAction(registers);\n registers.registerSubTypeDefaulter('dataZoom', function () {\n // Default 'slider' when no type specified.\n return 'slider';\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SelectZoomModel from './SelectZoomModel.js';\nimport SelectZoomView from './SelectZoomView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(SelectZoomModel);\n registers.registerComponentView(SelectZoomView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nvar ToolboxFeature = /** @class */function () {\n function ToolboxFeature() {}\n return ToolboxFeature;\n}();\nexport { ToolboxFeature };\nvar features = {};\nexport function registerFeature(name, ctor) {\n features[name] = ctor;\n}\nexport function getFeature(name) {\n return features[name];\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as featureManager from './featureManager.js';\nimport ComponentModel from '../../model/Component.js';\nvar ToolboxModel = /** @class */function (_super) {\n __extends(ToolboxModel, _super);\n function ToolboxModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ToolboxModel.type;\n return _this;\n }\n ToolboxModel.prototype.optionUpdated = function () {\n _super.prototype.optionUpdated.apply(this, arguments);\n var ecModel = this.ecModel;\n zrUtil.each(this.option.feature, function (featureOpt, featureName) {\n var Feature = featureManager.getFeature(featureName);\n if (Feature) {\n if (Feature.getDefaultOption) {\n Feature.defaultOption = Feature.getDefaultOption(ecModel);\n }\n zrUtil.merge(featureOpt, Feature.defaultOption);\n }\n });\n };\n ToolboxModel.type = 'toolbox';\n ToolboxModel.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n ToolboxModel.defaultOption = {\n show: true,\n z: 6,\n // zlevel: 0,\n orient: 'horizontal',\n left: 'right',\n top: 'top',\n // right\n // bottom\n backgroundColor: 'transparent',\n borderColor: '#ccc',\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemSize: 15,\n itemGap: 8,\n showTitle: true,\n iconStyle: {\n borderColor: '#666',\n color: 'none'\n },\n emphasis: {\n iconStyle: {\n borderColor: '#3E98C5'\n }\n },\n // textStyle: {},\n // feature\n tooltip: {\n show: false,\n position: 'bottom'\n }\n };\n return ToolboxModel;\n}(ComponentModel);\nexport default ToolboxModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport { getLayoutRect, box as layoutBox, positionElement } from '../../util/layout.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as graphic from '../../util/graphic.js';\n/**\n * Layout list like component.\n * It will box layout each items in group of component and then position the whole group in the viewport\n * @param {module:zrender/group/Group} group\n * @param {module:echarts/model/Component} componentModel\n * @param {module:echarts/ExtensionAPI}\n */\nexport function layout(group, componentModel, api) {\n var boxLayoutParams = componentModel.getBoxLayoutParams();\n var padding = componentModel.get('padding');\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var rect = getLayoutRect(boxLayoutParams, viewportSize, padding);\n layoutBox(componentModel.get('orient'), group, componentModel.get('itemGap'), rect.width, rect.height);\n positionElement(group, boxLayoutParams, viewportSize, padding);\n}\nexport function makeBackground(rect, componentModel) {\n var padding = formatUtil.normalizeCssArray(componentModel.get('padding'));\n var style = componentModel.getItemStyle(['color', 'opacity']);\n style.fill = componentModel.get('backgroundColor');\n rect = new graphic.Rect({\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[1] + padding[3],\n height: rect.height + padding[0] + padding[2],\n r: componentModel.get('borderRadius')\n },\n style: style,\n silent: true,\n z2: -1\n });\n // FIXME\n // `subPixelOptimizeRect` may bring some gap between edge of viewpart\n // and background rect when setting like `left: 0`, `top: 0`.\n // graphic.subPixelOptimizeRect(rect);\n return rect;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enterEmphasis, leaveEmphasis } from '../../util/states.js';\nimport Model from '../../model/Model.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport * as listComponentHelper from '../helper/listComponent.js';\nimport ComponentView from '../../view/Component.js';\nimport { ToolboxFeature, getFeature } from './featureManager.js';\nimport { getUID } from '../../util/component.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport { getFont } from '../../label/labelStyle.js';\nvar ToolboxView = /** @class */function (_super) {\n __extends(ToolboxView, _super);\n function ToolboxView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n if (!toolboxModel.get('show')) {\n return;\n }\n var itemSize = +toolboxModel.get('itemSize');\n var isVertical = toolboxModel.get('orient') === 'vertical';\n var featureOpts = toolboxModel.get('feature') || {};\n var features = this._features || (this._features = {});\n var featureNames = [];\n zrUtil.each(featureOpts, function (opt, name) {\n featureNames.push(name);\n });\n new DataDiffer(this._featureNames || [], featureNames).add(processFeature).update(processFeature).remove(zrUtil.curry(processFeature, null)).execute();\n // Keep for diff.\n this._featureNames = featureNames;\n function processFeature(newIndex, oldIndex) {\n var featureName = featureNames[newIndex];\n var oldName = featureNames[oldIndex];\n var featureOpt = featureOpts[featureName];\n var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel);\n var feature;\n // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\n featureOpt.title = payload.newTitle;\n }\n if (featureName && !oldName) {\n // Create\n if (isUserFeatureName(featureName)) {\n feature = {\n onclick: featureModel.option.onclick,\n featureName: featureName\n };\n } else {\n var Feature = getFeature(featureName);\n if (!Feature) {\n return;\n }\n feature = new Feature();\n }\n features[featureName] = feature;\n } else {\n feature = features[oldName];\n // If feature does not exist.\n if (!feature) {\n return;\n }\n }\n feature.uid = getUID('toolbox-feature');\n feature.model = featureModel;\n feature.ecModel = ecModel;\n feature.api = api;\n var isToolboxFeature = feature instanceof ToolboxFeature;\n if (!featureName && oldName) {\n isToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n return;\n }\n if (!featureModel.get('show') || isToolboxFeature && feature.unusable) {\n isToolboxFeature && feature.remove && feature.remove(ecModel, api);\n return;\n }\n createIconPaths(featureModel, feature, featureName);\n featureModel.setIconStatus = function (iconName, status) {\n var option = this.option;\n var iconPaths = this.iconPaths;\n option.iconStatus = option.iconStatus || {};\n option.iconStatus[iconName] = status;\n if (iconPaths[iconName]) {\n (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]);\n }\n };\n if (feature instanceof ToolboxFeature) {\n if (feature.render) {\n feature.render(featureModel, ecModel, api, payload);\n }\n }\n }\n function createIconPaths(featureModel, feature, featureName) {\n var iconStyleModel = featureModel.getModel('iconStyle');\n var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']);\n // If one feature has multiple icons, they are organized as\n // {\n // icon: {\n // foo: '',\n // bar: ''\n // },\n // title: {\n // foo: '',\n // bar: ''\n // }\n // }\n var icons = feature instanceof ToolboxFeature && feature.getIcons ? feature.getIcons() : featureModel.get('icon');\n var titles = featureModel.get('title') || {};\n var iconsMap;\n var titlesMap;\n if (zrUtil.isString(icons)) {\n iconsMap = {};\n iconsMap[featureName] = icons;\n } else {\n iconsMap = icons;\n }\n if (zrUtil.isString(titles)) {\n titlesMap = {};\n titlesMap[featureName] = titles;\n } else {\n titlesMap = titles;\n }\n var iconPaths = featureModel.iconPaths = {};\n zrUtil.each(iconsMap, function (iconStr, iconName) {\n var path = graphic.createIcon(iconStr, {}, {\n x: -itemSize / 2,\n y: -itemSize / 2,\n width: itemSize,\n height: itemSize\n }); // TODO handling image\n path.setStyle(iconStyleModel.getItemStyle());\n var pathEmphasisState = path.ensureState('emphasis');\n pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle();\n // Text position calculation\n // TODO: extract `textStyle` from `iconStyle` and use `createTextStyle`\n var textContent = new ZRText({\n style: {\n text: titlesMap[iconName],\n align: iconStyleEmphasisModel.get('textAlign'),\n borderRadius: iconStyleEmphasisModel.get('textBorderRadius'),\n padding: iconStyleEmphasisModel.get('textPadding'),\n fill: null,\n font: getFont({\n fontStyle: iconStyleEmphasisModel.get('textFontStyle'),\n fontFamily: iconStyleEmphasisModel.get('textFontFamily'),\n fontSize: iconStyleEmphasisModel.get('textFontSize'),\n fontWeight: iconStyleEmphasisModel.get('textFontWeight')\n }, ecModel)\n },\n ignore: true\n });\n path.setTextContent(textContent);\n graphic.setTooltipConfig({\n el: path,\n componentModel: toolboxModel,\n itemName: iconName,\n formatterParamsExtra: {\n title: titlesMap[iconName]\n }\n });\n path.__title = titlesMap[iconName];\n path.on('mouseover', function () {\n // Should not reuse above hoverStyle, which might be modified.\n var hoverStyle = iconStyleEmphasisModel.getItemStyle();\n var defaultTextPosition = isVertical ? toolboxModel.get('right') == null && toolboxModel.get('left') !== 'right' ? 'right' : 'left' : toolboxModel.get('bottom') == null && toolboxModel.get('top') !== 'bottom' ? 'bottom' : 'top';\n textContent.setStyle({\n fill: iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || '#000',\n backgroundColor: iconStyleEmphasisModel.get('textBackgroundColor')\n });\n path.setTextConfig({\n position: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition\n });\n textContent.ignore = !toolboxModel.get('showTitle');\n // Use enterEmphasis and leaveEmphasis provide by ec.\n // There are flags managed by the echarts.\n api.enterEmphasis(this);\n }).on('mouseout', function () {\n if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') {\n api.leaveEmphasis(this);\n }\n textContent.hide();\n });\n (featureModel.get(['iconStatus', iconName]) === 'emphasis' ? enterEmphasis : leaveEmphasis)(path);\n group.add(path);\n path.on('click', zrUtil.bind(feature.onclick, feature, ecModel, api, iconName));\n iconPaths[iconName] = path;\n });\n }\n listComponentHelper.layout(group, toolboxModel, api);\n // Render background after group is layout\n // FIXME\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel));\n // Adjust icon title positions to avoid them out of screen\n isVertical || group.eachChild(function (icon) {\n var titleText = icon.__title;\n // const hoverStyle = icon.hoverStyle;\n // TODO simplify code?\n var emphasisState = icon.ensureState('emphasis');\n var emphasisTextConfig = emphasisState.textConfig || (emphasisState.textConfig = {});\n var textContent = icon.getTextContent();\n var emphasisTextState = textContent && textContent.ensureState('emphasis');\n // May be background element\n if (emphasisTextState && !zrUtil.isFunction(emphasisTextState) && titleText) {\n var emphasisTextStyle = emphasisTextState.style || (emphasisTextState.style = {});\n var rect = textContain.getBoundingRect(titleText, ZRText.makeFont(emphasisTextStyle));\n var offsetX = icon.x + group.x;\n var offsetY = icon.y + group.y + itemSize;\n var needPutOnTop = false;\n if (offsetY + rect.height > api.getHeight()) {\n emphasisTextConfig.position = 'top';\n needPutOnTop = true;\n }\n var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 10;\n if (offsetX + rect.width / 2 > api.getWidth()) {\n emphasisTextConfig.position = ['100%', topOffset];\n emphasisTextStyle.align = 'right';\n } else if (offsetX - rect.width / 2 < 0) {\n emphasisTextConfig.position = [0, topOffset];\n emphasisTextStyle.align = 'left';\n }\n }\n });\n };\n ToolboxView.prototype.updateView = function (toolboxModel, ecModel, api, payload) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.updateView && feature.updateView(feature.model, ecModel, api, payload);\n });\n };\n // updateLayout(toolboxModel, ecModel, api, payload) {\n // zrUtil.each(this._features, function (feature) {\n // feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload);\n // });\n // },\n ToolboxView.prototype.remove = function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.remove && feature.remove(ecModel, api);\n });\n this.group.removeAll();\n };\n ToolboxView.prototype.dispose = function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n });\n };\n ToolboxView.type = 'toolbox';\n return ToolboxView;\n}(ComponentView);\nfunction isUserFeatureName(featureName) {\n return featureName.indexOf('my') === 0;\n}\nexport default ToolboxView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global window, Uint8Array, document */\nimport env from 'zrender/lib/core/env.js';\nimport { ToolboxFeature } from '../featureManager.js';\nvar SaveAsImage = /** @class */function (_super) {\n __extends(SaveAsImage, _super);\n function SaveAsImage() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SaveAsImage.prototype.onclick = function (ecModel, api) {\n var model = this.model;\n var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';\n var isSvg = api.getZr().painter.getType() === 'svg';\n var type = isSvg ? 'svg' : model.get('type', true) || 'png';\n var url = api.getConnectedDataURL({\n type: type,\n backgroundColor: model.get('backgroundColor', true) || ecModel.get('backgroundColor') || '#fff',\n connectedBackgroundColor: model.get('connectedBackgroundColor'),\n excludeComponents: model.get('excludeComponents'),\n pixelRatio: model.get('pixelRatio')\n });\n var browser = env.browser;\n // Chrome, Firefox, New Edge\n if (typeof MouseEvent === 'function' && (browser.newEdge || !browser.ie && !browser.edge)) {\n var $a = document.createElement('a');\n $a.download = title + '.' + type;\n $a.target = '_blank';\n $a.href = url;\n var evt = new MouseEvent('click', {\n // some micro front-end framework, window maybe is a Proxy\n view: document.defaultView,\n bubbles: true,\n cancelable: false\n });\n $a.dispatchEvent(evt);\n }\n // IE or old Edge\n else {\n // @ts-ignore\n if (window.navigator.msSaveOrOpenBlob || isSvg) {\n var parts = url.split(',');\n // data:[][;charset=][;base64],\n var base64Encoded = parts[0].indexOf('base64') > -1;\n var bstr = isSvg\n // should decode the svg data uri first\n ? decodeURIComponent(parts[1]) : parts[1];\n // only `atob` when the data uri is encoded with base64\n // otherwise, like `svg` data uri exported by zrender,\n // there will be an error, for it's not encoded with base64.\n // (just a url-encoded string through `encodeURIComponent`)\n base64Encoded && (bstr = window.atob(bstr));\n var filename = title + '.' + type;\n // @ts-ignore\n if (window.navigator.msSaveOrOpenBlob) {\n var n = bstr.length;\n var u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n var blob = new Blob([u8arr]); // @ts-ignore\n window.navigator.msSaveOrOpenBlob(blob, filename);\n } else {\n var frame = document.createElement('iframe');\n document.body.appendChild(frame);\n var cw = frame.contentWindow;\n var doc = cw.document;\n doc.open('image/svg+xml', 'replace');\n doc.write(bstr);\n doc.close();\n cw.focus();\n doc.execCommand('SaveAs', true, filename);\n document.body.removeChild(frame);\n }\n } else {\n var lang = model.get('lang');\n var html = '' + '' + '' + '';\n var tab = window.open();\n tab.document.write(html);\n tab.document.title = title;\n }\n }\n };\n SaveAsImage.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n icon: 'M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0',\n title: ecModel.getLocaleModel().get(['toolbox', 'saveAsImage', 'title']),\n type: 'png',\n // Default use option.backgroundColor\n // backgroundColor: '#fff',\n connectedBackgroundColor: '#fff',\n name: '',\n excludeComponents: ['toolbox'],\n // use current pixel ratio of device by default\n // pixelRatio: 1,\n lang: ecModel.getLocaleModel().get(['toolbox', 'saveAsImage', 'lang'])\n };\n return defaultOption;\n };\n return SaveAsImage;\n}(ToolboxFeature);\nexport default SaveAsImage;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as echarts from '../../../core/echarts.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { SINGLE_REFERRING } from '../../../util/model.js';\nvar INNER_STACK_KEYWORD = '__ec_magicType_stack__';\nvar ICON_TYPES = ['line', 'bar', 'stack'];\n// stack and tiled appears in pair for the title\nvar TITLE_TYPES = ['line', 'bar', 'stack', 'tiled'];\nvar radioTypes = [['line', 'bar'], ['stack']];\nvar MagicType = /** @class */function (_super) {\n __extends(MagicType, _super);\n function MagicType() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MagicType.prototype.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon');\n var icons = {};\n zrUtil.each(model.get('type'), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n };\n MagicType.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n type: [],\n // Icon group\n icon: {\n line: 'M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4',\n bar: 'M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7',\n // eslint-disable-next-line\n stack: 'M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z' // jshint ignore:line\n },\n\n // `line`, `bar`, `stack`, `tiled`\n title: ecModel.getLocaleModel().get(['toolbox', 'magicType', 'title']),\n option: {},\n seriesIndex: {}\n };\n return defaultOption;\n };\n MagicType.prototype.onclick = function (ecModel, api, type) {\n var model = this.model;\n var seriesIndex = model.get(['seriesIndex', type]);\n // Not supported magicType\n if (!seriesOptGenreator[type]) {\n return;\n }\n var newOption = {\n series: []\n };\n var generateNewSeriesTypes = function (seriesModel) {\n var seriesType = seriesModel.subType;\n var seriesId = seriesModel.id;\n var newSeriesOpt = seriesOptGenreator[type](seriesType, seriesId, seriesModel, model);\n if (newSeriesOpt) {\n // PENDING If merge original option?\n zrUtil.defaults(newSeriesOpt, seriesModel.option);\n newOption.series.push(newSeriesOpt);\n }\n // Modify boundaryGap\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type === 'cartesian2d' && (type === 'line' || type === 'bar')) {\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n if (categoryAxis) {\n var axisDim = categoryAxis.dim;\n var axisType = axisDim + 'Axis';\n var axisModel = seriesModel.getReferringComponents(axisType, SINGLE_REFERRING).models[0];\n var axisIndex = axisModel.componentIndex;\n newOption[axisType] = newOption[axisType] || [];\n for (var i = 0; i <= axisIndex; i++) {\n newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {};\n }\n newOption[axisType][axisIndex].boundaryGap = type === 'bar';\n }\n }\n };\n zrUtil.each(radioTypes, function (radio) {\n if (zrUtil.indexOf(radio, type) >= 0) {\n zrUtil.each(radio, function (item) {\n model.setIconStatus(item, 'normal');\n });\n }\n });\n model.setIconStatus(type, 'emphasis');\n ecModel.eachComponent({\n mainType: 'series',\n query: seriesIndex == null ? null : {\n seriesIndex: seriesIndex\n }\n }, generateNewSeriesTypes);\n var newTitle;\n var currentType = type;\n // Change title of stack\n if (type === 'stack') {\n // use titles in model instead of ecModel\n // as stack and tiled appears in pair, just flip them\n // no need of checking stack state\n newTitle = zrUtil.merge({\n stack: model.option.title.tiled,\n tiled: model.option.title.stack\n }, model.option.title);\n if (model.get(['iconStatus', type]) !== 'emphasis') {\n currentType = 'tiled';\n }\n }\n api.dispatchAction({\n type: 'changeMagicType',\n currentType: currentType,\n newOption: newOption,\n newTitle: newTitle,\n featureName: 'magicType'\n });\n };\n return MagicType;\n}(ToolboxFeature);\nvar seriesOptGenreator = {\n 'line': function (seriesType, seriesId, seriesModel, model) {\n if (seriesType === 'bar') {\n return zrUtil.merge({\n id: seriesId,\n type: 'line',\n // Preserve data related option\n data: seriesModel.get('data'),\n stack: seriesModel.get('stack'),\n markPoint: seriesModel.get('markPoint'),\n markLine: seriesModel.get('markLine')\n }, model.get(['option', 'line']) || {}, true);\n }\n },\n 'bar': function (seriesType, seriesId, seriesModel, model) {\n if (seriesType === 'line') {\n return zrUtil.merge({\n id: seriesId,\n type: 'bar',\n // Preserve data related option\n data: seriesModel.get('data'),\n stack: seriesModel.get('stack'),\n markPoint: seriesModel.get('markPoint'),\n markLine: seriesModel.get('markLine')\n }, model.get(['option', 'bar']) || {}, true);\n }\n },\n 'stack': function (seriesType, seriesId, seriesModel, model) {\n var isStack = seriesModel.get('stack') === INNER_STACK_KEYWORD;\n if (seriesType === 'line' || seriesType === 'bar') {\n model.setIconStatus('stack', isStack ? 'normal' : 'emphasis');\n return zrUtil.merge({\n id: seriesId,\n stack: isStack ? '' : INNER_STACK_KEYWORD\n }, model.get(['option', 'stack']) || {}, true);\n }\n }\n};\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'changeMagicType',\n event: 'magicTypeChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n ecModel.mergeOption(payload.newOption);\n});\nexport default MagicType;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/* global document */\nimport * as echarts from '../../../core/echarts.js';\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { addEventListener } from 'zrender/lib/core/event.js';\nimport { warn } from '../../../util/log.js';\n/* global document */\nvar BLOCK_SPLITER = new Array(60).join('-');\nvar ITEM_SPLITER = '\\t';\n/**\n * Group series into two types\n * 1. on category axis, like line, bar\n * 2. others, like scatter, pie\n */\nfunction groupSeries(ecModel) {\n var seriesGroupByCategoryAxis = {};\n var otherSeries = [];\n var meta = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) {\n // TODO: TYPE Consider polar? Include polar may increase unecessary bundle size.\n var baseAxis = coordSys.getBaseAxis();\n if (baseAxis.type === 'category') {\n var key = baseAxis.dim + '_' + baseAxis.index;\n if (!seriesGroupByCategoryAxis[key]) {\n seriesGroupByCategoryAxis[key] = {\n categoryAxis: baseAxis,\n valueAxis: coordSys.getOtherAxis(baseAxis),\n series: []\n };\n meta.push({\n axisDim: baseAxis.dim,\n axisIndex: baseAxis.index\n });\n }\n seriesGroupByCategoryAxis[key].series.push(seriesModel);\n } else {\n otherSeries.push(seriesModel);\n }\n } else {\n otherSeries.push(seriesModel);\n }\n });\n return {\n seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,\n other: otherSeries,\n meta: meta\n };\n}\n/**\n * Assemble content of series on cateogory axis\n * @inner\n */\nfunction assembleSeriesWithCategoryAxis(groups) {\n var tables = [];\n zrUtil.each(groups, function (group, key) {\n var categoryAxis = group.categoryAxis;\n var valueAxis = group.valueAxis;\n var valueAxisDim = valueAxis.dim;\n var headers = [' '].concat(zrUtil.map(group.series, function (series) {\n return series.name;\n }));\n // @ts-ignore TODO Polar\n var columns = [categoryAxis.model.getCategories()];\n zrUtil.each(group.series, function (series) {\n var rawData = series.getRawData();\n columns.push(series.getRawData().mapArray(rawData.mapDimension(valueAxisDim), function (val) {\n return val;\n }));\n });\n // Assemble table content\n var lines = [headers.join(ITEM_SPLITER)];\n for (var i = 0; i < columns[0].length; i++) {\n var items = [];\n for (var j = 0; j < columns.length; j++) {\n items.push(columns[j][i]);\n }\n lines.push(items.join(ITEM_SPLITER));\n }\n tables.push(lines.join('\\n'));\n });\n return tables.join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\n/**\n * Assemble content of other series\n */\nfunction assembleOtherSeries(series) {\n return zrUtil.map(series, function (series) {\n var data = series.getRawData();\n var lines = [series.name];\n var vals = [];\n data.each(data.dimensions, function () {\n var argLen = arguments.length;\n var dataIndex = arguments[argLen - 1];\n var name = data.getName(dataIndex);\n for (var i = 0; i < argLen - 1; i++) {\n vals[i] = arguments[i];\n }\n lines.push((name ? name + ITEM_SPLITER : '') + vals.join(ITEM_SPLITER));\n });\n return lines.join('\\n');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\nfunction getContentFromModel(ecModel) {\n var result = groupSeries(ecModel);\n return {\n value: zrUtil.filter([assembleSeriesWithCategoryAxis(result.seriesGroupByCategoryAxis), assembleOtherSeries(result.other)], function (str) {\n return !!str.replace(/[\\n\\t\\s]/g, '');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n'),\n meta: result.meta\n };\n}\nfunction trim(str) {\n return str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n}\n/**\n * If a block is tsv format\n */\nfunction isTSVFormat(block) {\n // Simple method to find out if a block is tsv format\n var firstLine = block.slice(0, block.indexOf('\\n'));\n if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n return true;\n }\n}\nvar itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');\n/**\n * @param {string} tsv\n * @return {Object}\n */\nfunction parseTSVContents(tsv) {\n var tsvLines = tsv.split(/\\n+/g);\n var headers = trim(tsvLines.shift()).split(itemSplitRegex);\n var categories = [];\n var series = zrUtil.map(headers, function (header) {\n return {\n name: header,\n data: []\n };\n });\n for (var i = 0; i < tsvLines.length; i++) {\n var items = trim(tsvLines[i]).split(itemSplitRegex);\n categories.push(items.shift());\n for (var j = 0; j < items.length; j++) {\n series[j] && (series[j].data[i] = items[j]);\n }\n }\n return {\n series: series,\n categories: categories\n };\n}\nfunction parseListContents(str) {\n var lines = str.split(/\\n+/g);\n var seriesName = trim(lines.shift());\n var data = [];\n for (var i = 0; i < lines.length; i++) {\n // if line is empty, ignore it.\n // there is a case that a user forgot to delete `\\n`.\n var line = trim(lines[i]);\n if (!line) {\n continue;\n }\n var items = line.split(itemSplitRegex);\n var name_1 = '';\n var value = void 0;\n var hasName = false;\n if (isNaN(items[0])) {\n // First item is name\n hasName = true;\n name_1 = items[0];\n items = items.slice(1);\n data[i] = {\n name: name_1,\n value: []\n };\n value = data[i].value;\n } else {\n value = data[i] = [];\n }\n for (var j = 0; j < items.length; j++) {\n value.push(+items[j]);\n }\n if (value.length === 1) {\n hasName ? data[i].value = value[0] : data[i] = value[0];\n }\n }\n return {\n name: seriesName,\n data: data\n };\n}\nfunction parseContents(str, blockMetaList) {\n var blocks = str.split(new RegExp('\\n*' + BLOCK_SPLITER + '\\n*', 'g'));\n var newOption = {\n series: []\n };\n zrUtil.each(blocks, function (block, idx) {\n if (isTSVFormat(block)) {\n var result = parseTSVContents(block);\n var blockMeta = blockMetaList[idx];\n var axisKey = blockMeta.axisDim + 'Axis';\n if (blockMeta) {\n newOption[axisKey] = newOption[axisKey] || [];\n newOption[axisKey][blockMeta.axisIndex] = {\n data: result.categories\n };\n newOption.series = newOption.series.concat(result.series);\n }\n } else {\n var result = parseListContents(block);\n newOption.series.push(result);\n }\n });\n return newOption;\n}\nvar DataView = /** @class */function (_super) {\n __extends(DataView, _super);\n function DataView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DataView.prototype.onclick = function (ecModel, api) {\n // FIXME: better way?\n setTimeout(function () {\n api.dispatchAction({\n type: 'hideTip'\n });\n });\n var container = api.getDom();\n var model = this.model;\n if (this._dom) {\n container.removeChild(this._dom);\n }\n var root = document.createElement('div');\n // use padding to avoid 5px whitespace\n root.style.cssText = 'position:absolute;top:0;bottom:0;left:0;right:0;padding:5px';\n root.style.backgroundColor = model.get('backgroundColor') || '#fff';\n // Create elements\n var header = document.createElement('h4');\n var lang = model.get('lang') || [];\n header.innerHTML = lang[0] || model.get('title');\n header.style.cssText = 'margin:10px 20px';\n header.style.color = model.get('textColor');\n var viewMain = document.createElement('div');\n var textarea = document.createElement('textarea');\n viewMain.style.cssText = 'overflow:auto';\n var optionToContent = model.get('optionToContent');\n var contentToOption = model.get('contentToOption');\n var result = getContentFromModel(ecModel);\n if (zrUtil.isFunction(optionToContent)) {\n var htmlOrDom = optionToContent(api.getOption());\n if (zrUtil.isString(htmlOrDom)) {\n viewMain.innerHTML = htmlOrDom;\n } else if (zrUtil.isDom(htmlOrDom)) {\n viewMain.appendChild(htmlOrDom);\n }\n } else {\n // Use default textarea\n textarea.readOnly = model.get('readOnly');\n var style = textarea.style;\n // eslint-disable-next-line max-len\n style.cssText = 'display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none';\n style.color = model.get('textColor');\n style.borderColor = model.get('textareaBorderColor');\n style.backgroundColor = model.get('textareaColor');\n textarea.value = result.value;\n viewMain.appendChild(textarea);\n }\n var blockMetaList = result.meta;\n var buttonContainer = document.createElement('div');\n buttonContainer.style.cssText = 'position:absolute;bottom:5px;left:0;right:0';\n // eslint-disable-next-line max-len\n var buttonStyle = 'float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';\n var closeButton = document.createElement('div');\n var refreshButton = document.createElement('div');\n buttonStyle += ';background-color:' + model.get('buttonColor');\n buttonStyle += ';color:' + model.get('buttonTextColor');\n var self = this;\n function close() {\n container.removeChild(root);\n self._dom = null;\n }\n addEventListener(closeButton, 'click', close);\n addEventListener(refreshButton, 'click', function () {\n if (contentToOption == null && optionToContent != null || contentToOption != null && optionToContent == null) {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n warn('It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored.');\n }\n close();\n return;\n }\n var newOption;\n try {\n if (zrUtil.isFunction(contentToOption)) {\n newOption = contentToOption(viewMain, api.getOption());\n } else {\n newOption = parseContents(textarea.value, blockMetaList);\n }\n } catch (e) {\n close();\n throw new Error('Data view format error ' + e);\n }\n if (newOption) {\n api.dispatchAction({\n type: 'changeDataView',\n newOption: newOption\n });\n }\n close();\n });\n closeButton.innerHTML = lang[1];\n refreshButton.innerHTML = lang[2];\n refreshButton.style.cssText = closeButton.style.cssText = buttonStyle;\n !model.get('readOnly') && buttonContainer.appendChild(refreshButton);\n buttonContainer.appendChild(closeButton);\n root.appendChild(header);\n root.appendChild(viewMain);\n root.appendChild(buttonContainer);\n viewMain.style.height = container.clientHeight - 80 + 'px';\n container.appendChild(root);\n this._dom = root;\n };\n DataView.prototype.remove = function (ecModel, api) {\n this._dom && api.getDom().removeChild(this._dom);\n };\n DataView.prototype.dispose = function (ecModel, api) {\n this.remove(ecModel, api);\n };\n DataView.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n readOnly: false,\n optionToContent: null,\n contentToOption: null,\n // eslint-disable-next-line\n icon: 'M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28',\n title: ecModel.getLocaleModel().get(['toolbox', 'dataView', 'title']),\n lang: ecModel.getLocaleModel().get(['toolbox', 'dataView', 'lang']),\n backgroundColor: '#fff',\n textColor: '#000',\n textareaColor: '#fff',\n textareaBorderColor: '#333',\n buttonColor: '#c23531',\n buttonTextColor: '#fff'\n };\n return defaultOption;\n };\n return DataView;\n}(ToolboxFeature);\n/**\n * @inner\n */\nfunction tryMergeDataOption(newData, originalData) {\n return zrUtil.map(newData, function (newVal, idx) {\n var original = originalData && originalData[idx];\n if (zrUtil.isObject(original) && !zrUtil.isArray(original)) {\n var newValIsObject = zrUtil.isObject(newVal) && !zrUtil.isArray(newVal);\n if (!newValIsObject) {\n newVal = {\n value: newVal\n };\n }\n // original data has name but new data has no name\n var shouldDeleteName = original.name != null && newVal.name == null;\n // Original data has option\n newVal = zrUtil.defaults(newVal, original);\n shouldDeleteName && delete newVal.name;\n return newVal;\n } else {\n return newVal;\n }\n });\n}\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'changeDataView',\n event: 'dataViewChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n var newSeriesOptList = [];\n zrUtil.each(payload.newOption.series, function (seriesOpt) {\n var seriesModel = ecModel.getSeriesByName(seriesOpt.name)[0];\n if (!seriesModel) {\n // New created series\n // Geuss the series type\n newSeriesOptList.push(zrUtil.extend({\n // Default is scatter\n type: 'scatter'\n }, seriesOpt));\n } else {\n var originalData = seriesModel.get('data');\n newSeriesOptList.push({\n name: seriesOpt.name,\n data: tryMergeDataOption(seriesOpt.data, originalData)\n });\n }\n });\n ecModel.mergeOption(zrUtil.defaults({\n series: newSeriesOptList\n }, payload.newOption));\n});\nexport default DataView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nvar each = zrUtil.each;\nvar inner = makeInner();\n/**\n * @param ecModel\n * @param newSnapshot key is dataZoomId\n */\nexport function push(ecModel, newSnapshot) {\n var storedSnapshots = getStoreSnapshots(ecModel);\n // If previous dataZoom can not be found,\n // complete an range with current range.\n each(newSnapshot, function (batchItem, dataZoomId) {\n var i = storedSnapshots.length - 1;\n for (; i >= 0; i--) {\n var snapshot = storedSnapshots[i];\n if (snapshot[dataZoomId]) {\n break;\n }\n }\n if (i < 0) {\n // No origin range set, create one by current range.\n var dataZoomModel = ecModel.queryComponents({\n mainType: 'dataZoom',\n subType: 'select',\n id: dataZoomId\n })[0];\n if (dataZoomModel) {\n var percentRange = dataZoomModel.getPercentRange();\n storedSnapshots[0][dataZoomId] = {\n dataZoomId: dataZoomId,\n start: percentRange[0],\n end: percentRange[1]\n };\n }\n }\n });\n storedSnapshots.push(newSnapshot);\n}\nexport function pop(ecModel) {\n var storedSnapshots = getStoreSnapshots(ecModel);\n var head = storedSnapshots[storedSnapshots.length - 1];\n storedSnapshots.length > 1 && storedSnapshots.pop();\n // Find top for all dataZoom.\n var snapshot = {};\n each(head, function (batchItem, dataZoomId) {\n for (var i = storedSnapshots.length - 1; i >= 0; i--) {\n batchItem = storedSnapshots[i][dataZoomId];\n if (batchItem) {\n snapshot[dataZoomId] = batchItem;\n break;\n }\n }\n });\n return snapshot;\n}\nexport function clear(ecModel) {\n inner(ecModel).snapshots = null;\n}\nexport function count(ecModel) {\n return getStoreSnapshots(ecModel).length;\n}\n/**\n * History length of each dataZoom may be different.\n * this._history[0] is used to store origin range.\n */\nfunction getStoreSnapshots(ecModel) {\n var store = inner(ecModel);\n if (!store.snapshots) {\n store.snapshots = [{}];\n }\n return store.snapshots;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as echarts from '../../../core/echarts.js';\nimport * as history from '../../dataZoom/history.js';\nimport { ToolboxFeature } from '../featureManager.js';\nvar RestoreOption = /** @class */function (_super) {\n __extends(RestoreOption, _super);\n function RestoreOption() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n RestoreOption.prototype.onclick = function (ecModel, api) {\n history.clear(ecModel);\n api.dispatchAction({\n type: 'restore',\n from: this.uid\n });\n };\n RestoreOption.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n // eslint-disable-next-line\n icon: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5',\n title: ecModel.getLocaleModel().get(['toolbox', 'restore', 'title'])\n };\n return defaultOption;\n };\n return RestoreOption;\n}(ToolboxFeature);\n// TODO: SELF REGISTERED.\necharts.registerAction({\n type: 'restore',\n event: 'restore',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n ecModel.resetOption('recreate');\n});\nexport default RestoreOption;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, indexOf, curry, assert, map, createHashMap } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as brushHelper from './brushHelper.js';\nimport { parseFinder as modelUtilParseFinder } from '../../util/model.js';\n// FIXME\n// how to genarialize to more coordinate systems.\nvar INCLUDE_FINDER_MAIN_TYPES = ['grid', 'xAxis', 'yAxis', 'geo', 'graph', 'polar', 'radiusAxis', 'angleAxis', 'bmap'];\nvar BrushTargetManager = /** @class */function () {\n /**\n * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid\n * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]}\n * @param opt.include include coordinate system types.\n */\n function BrushTargetManager(finder, ecModel, opt) {\n var _this = this;\n this._targetInfoList = [];\n var foundCpts = parseFinder(ecModel, finder);\n each(targetInfoBuilders, function (builder, type) {\n if (!opt || !opt.include || indexOf(opt.include, type) >= 0) {\n builder(foundCpts, _this._targetInfoList);\n }\n });\n }\n BrushTargetManager.prototype.setOutputRanges = function (areas, ecModel) {\n this.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) {\n (area.coordRanges || (area.coordRanges = [])).push(coordRange);\n // area.coordRange is the first of area.coordRanges\n if (!area.coordRange) {\n area.coordRange = coordRange;\n // In 'category' axis, coord to pixel is not reversible, so we can not\n // rebuild range by coordRange accrately, which may bring trouble when\n // brushing only one item. So we use __rangeOffset to rebuilding range\n // by coordRange. And this it only used in brush component so it is no\n // need to be adapted to coordRanges.\n var result = coordConvert[area.brushType](0, coordSys, coordRange);\n area.__rangeOffset = {\n offset: diffProcessor[area.brushType](result.values, area.range, [1, 1]),\n xyMinMax: result.xyMinMax\n };\n }\n });\n return areas;\n };\n BrushTargetManager.prototype.matchOutputRanges = function (areas, ecModel, cb) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n if (targetInfo && targetInfo !== true) {\n each(targetInfo.coordSyses, function (coordSys) {\n var result = coordConvert[area.brushType](1, coordSys, area.range, true);\n cb(area, result.values, coordSys, ecModel);\n });\n }\n }, this);\n };\n /**\n * the `areas` is `BrushModel.areas`.\n * Called in layout stage.\n * convert `area.coordRange` to global range and set panelId to `area.range`.\n */\n BrushTargetManager.prototype.setInputRanges = function (areas, ecModel) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n if (process.env.NODE_ENV !== 'production') {\n assert(!targetInfo || targetInfo === true || area.coordRange, 'coordRange must be specified when coord index specified.');\n assert(!targetInfo || targetInfo !== true || area.range, 'range must be specified in global brush.');\n }\n area.range = area.range || [];\n // convert coordRange to global range and set panelId.\n if (targetInfo && targetInfo !== true) {\n area.panelId = targetInfo.panelId;\n // (1) area.range should always be calculate from coordRange but does\n // not keep its original value, for the sake of the dataZoom scenario,\n // where area.coordRange remains unchanged but area.range may be changed.\n // (2) Only support converting one coordRange to pixel range in brush\n // component. So do not consider `coordRanges`.\n // (3) About __rangeOffset, see comment above.\n var result = coordConvert[area.brushType](0, targetInfo.coordSys, area.coordRange);\n var rangeOffset = area.__rangeOffset;\n area.range = rangeOffset ? diffProcessor[area.brushType](result.values, rangeOffset.offset, getScales(result.xyMinMax, rangeOffset.xyMinMax)) : result.values;\n }\n }, this);\n };\n BrushTargetManager.prototype.makePanelOpts = function (api, getDefaultBrushType) {\n return map(this._targetInfoList, function (targetInfo) {\n var rect = targetInfo.getPanelRect();\n return {\n panelId: targetInfo.panelId,\n defaultBrushType: getDefaultBrushType ? getDefaultBrushType(targetInfo) : null,\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, targetInfo.coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect)\n };\n });\n };\n BrushTargetManager.prototype.controlSeries = function (area, seriesModel, ecModel) {\n // Check whether area is bound in coord, and series do not belong to that coord.\n // If do not do this check, some brush (like lineX) will controll all axes.\n var targetInfo = this.findTargetInfo(area, ecModel);\n return targetInfo === true || targetInfo && indexOf(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0;\n };\n /**\n * If return Object, a coord found.\n * If return true, global found.\n * Otherwise nothing found.\n */\n BrushTargetManager.prototype.findTargetInfo = function (area, ecModel) {\n var targetInfoList = this._targetInfoList;\n var foundCpts = parseFinder(ecModel, area);\n for (var i = 0; i < targetInfoList.length; i++) {\n var targetInfo = targetInfoList[i];\n var areaPanelId = area.panelId;\n if (areaPanelId) {\n if (targetInfo.panelId === areaPanelId) {\n return targetInfo;\n }\n } else {\n for (var j = 0; j < targetInfoMatchers.length; j++) {\n if (targetInfoMatchers[j](foundCpts, targetInfo)) {\n return targetInfo;\n }\n }\n }\n }\n return true;\n };\n return BrushTargetManager;\n}();\nfunction formatMinMax(minMax) {\n minMax[0] > minMax[1] && minMax.reverse();\n return minMax;\n}\nfunction parseFinder(ecModel, finder) {\n return modelUtilParseFinder(ecModel, finder, {\n includeMainTypes: INCLUDE_FINDER_MAIN_TYPES\n });\n}\nvar targetInfoBuilders = {\n grid: function (foundCpts, targetInfoList) {\n var xAxisModels = foundCpts.xAxisModels;\n var yAxisModels = foundCpts.yAxisModels;\n var gridModels = foundCpts.gridModels;\n // Remove duplicated.\n var gridModelMap = createHashMap();\n var xAxesHas = {};\n var yAxesHas = {};\n if (!xAxisModels && !yAxisModels && !gridModels) {\n return;\n }\n each(xAxisModels, function (axisModel) {\n var gridModel = axisModel.axis.grid.model;\n gridModelMap.set(gridModel.id, gridModel);\n xAxesHas[gridModel.id] = true;\n });\n each(yAxisModels, function (axisModel) {\n var gridModel = axisModel.axis.grid.model;\n gridModelMap.set(gridModel.id, gridModel);\n yAxesHas[gridModel.id] = true;\n });\n each(gridModels, function (gridModel) {\n gridModelMap.set(gridModel.id, gridModel);\n xAxesHas[gridModel.id] = true;\n yAxesHas[gridModel.id] = true;\n });\n gridModelMap.each(function (gridModel) {\n var grid = gridModel.coordinateSystem;\n var cartesians = [];\n each(grid.getCartesians(), function (cartesian, index) {\n if (indexOf(xAxisModels, cartesian.getAxis('x').model) >= 0 || indexOf(yAxisModels, cartesian.getAxis('y').model) >= 0) {\n cartesians.push(cartesian);\n }\n });\n targetInfoList.push({\n panelId: 'grid--' + gridModel.id,\n gridModel: gridModel,\n coordSysModel: gridModel,\n // Use the first one as the representitive coordSys.\n coordSys: cartesians[0],\n coordSyses: cartesians,\n getPanelRect: panelRectBuilders.grid,\n xAxisDeclared: xAxesHas[gridModel.id],\n yAxisDeclared: yAxesHas[gridModel.id]\n });\n });\n },\n geo: function (foundCpts, targetInfoList) {\n each(foundCpts.geoModels, function (geoModel) {\n var coordSys = geoModel.coordinateSystem;\n targetInfoList.push({\n panelId: 'geo--' + geoModel.id,\n geoModel: geoModel,\n coordSysModel: geoModel,\n coordSys: coordSys,\n coordSyses: [coordSys],\n getPanelRect: panelRectBuilders.geo\n });\n });\n }\n};\nvar targetInfoMatchers = [\n// grid\nfunction (foundCpts, targetInfo) {\n var xAxisModel = foundCpts.xAxisModel;\n var yAxisModel = foundCpts.yAxisModel;\n var gridModel = foundCpts.gridModel;\n !gridModel && xAxisModel && (gridModel = xAxisModel.axis.grid.model);\n !gridModel && yAxisModel && (gridModel = yAxisModel.axis.grid.model);\n return gridModel && gridModel === targetInfo.gridModel;\n},\n// geo\nfunction (foundCpts, targetInfo) {\n var geoModel = foundCpts.geoModel;\n return geoModel && geoModel === targetInfo.geoModel;\n}];\nvar panelRectBuilders = {\n grid: function () {\n // grid is not Transformable.\n return this.coordSys.master.getRect().clone();\n },\n geo: function () {\n var coordSys = this.coordSys;\n var rect = coordSys.getBoundingRect().clone();\n // geo roam and zoom transform\n rect.applyTransform(graphic.getTransform(coordSys));\n return rect;\n }\n};\nvar coordConvert = {\n lineX: curry(axisConvert, 0),\n lineY: curry(axisConvert, 1),\n rect: function (to, coordSys, rangeOrCoordRange, clamp) {\n var xminymin = to ? coordSys.pointToData([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]], clamp) : coordSys.dataToPoint([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]], clamp);\n var xmaxymax = to ? coordSys.pointToData([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]], clamp) : coordSys.dataToPoint([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]], clamp);\n var values = [formatMinMax([xminymin[0], xmaxymax[0]]), formatMinMax([xminymin[1], xmaxymax[1]])];\n return {\n values: values,\n xyMinMax: values\n };\n },\n polygon: function (to, coordSys, rangeOrCoordRange, clamp) {\n var xyMinMax = [[Infinity, -Infinity], [Infinity, -Infinity]];\n var values = map(rangeOrCoordRange, function (item) {\n var p = to ? coordSys.pointToData(item, clamp) : coordSys.dataToPoint(item, clamp);\n xyMinMax[0][0] = Math.min(xyMinMax[0][0], p[0]);\n xyMinMax[1][0] = Math.min(xyMinMax[1][0], p[1]);\n xyMinMax[0][1] = Math.max(xyMinMax[0][1], p[0]);\n xyMinMax[1][1] = Math.max(xyMinMax[1][1], p[1]);\n return p;\n });\n return {\n values: values,\n xyMinMax: xyMinMax\n };\n }\n};\nfunction axisConvert(axisNameIndex, to, coordSys, rangeOrCoordRange) {\n if (process.env.NODE_ENV !== 'production') {\n assert(coordSys.type === 'cartesian2d', 'lineX/lineY brush is available only in cartesian2d.');\n }\n var axis = coordSys.getAxis(['x', 'y'][axisNameIndex]);\n var values = formatMinMax(map([0, 1], function (i) {\n return to ? axis.coordToData(axis.toLocalCoord(rangeOrCoordRange[i]), true) : axis.toGlobalCoord(axis.dataToCoord(rangeOrCoordRange[i]));\n }));\n var xyMinMax = [];\n xyMinMax[axisNameIndex] = values;\n xyMinMax[1 - axisNameIndex] = [NaN, NaN];\n return {\n values: values,\n xyMinMax: xyMinMax\n };\n}\nvar diffProcessor = {\n lineX: curry(axisDiffProcessor, 0),\n lineY: curry(axisDiffProcessor, 1),\n rect: function (values, refer, scales) {\n return [[values[0][0] - scales[0] * refer[0][0], values[0][1] - scales[0] * refer[0][1]], [values[1][0] - scales[1] * refer[1][0], values[1][1] - scales[1] * refer[1][1]]];\n },\n polygon: function (values, refer, scales) {\n return map(values, function (item, idx) {\n return [item[0] - scales[0] * refer[idx][0], item[1] - scales[1] * refer[idx][1]];\n });\n }\n};\nfunction axisDiffProcessor(axisNameIndex, values, refer, scales) {\n return [values[0] - scales[axisNameIndex] * refer[0], values[1] - scales[axisNameIndex] * refer[1]];\n}\n// We have to process scale caused by dataZoom manually,\n// although it might be not accurate.\n// Return [0~1, 0~1]\nfunction getScales(xyMinMaxCurr, xyMinMaxOrigin) {\n var sizeCurr = getSize(xyMinMaxCurr);\n var sizeOrigin = getSize(xyMinMaxOrigin);\n var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]];\n isNaN(scales[0]) && (scales[0] = 1);\n isNaN(scales[1]) && (scales[1] = 1);\n return scales;\n}\nfunction getSize(xyMinMax) {\n return xyMinMax ? [xyMinMax[0][1] - xyMinMax[0][0], xyMinMax[1][1] - xyMinMax[1][0]] : [NaN, NaN];\n}\nexport default BrushTargetManager;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// TODO depends on DataZoom and Brush\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BrushController from '../../helper/BrushController.js';\nimport BrushTargetManager from '../../helper/BrushTargetManager.js';\nimport * as history from '../../dataZoom/history.js';\nimport sliderMove from '../../helper/sliderMove.js';\nimport { ToolboxFeature } from '../featureManager.js';\nimport { makeInternalComponentId, parseFinder } from '../../../util/model.js';\nimport { registerInternalOptionCreator } from '../../../model/internalComponentCreator.js';\nvar each = zrUtil.each;\nvar DATA_ZOOM_ID_BASE = makeInternalComponentId('toolbox-dataZoom_');\nvar ICON_TYPES = ['zoom', 'back'];\nvar DataZoomFeature = /** @class */function (_super) {\n __extends(DataZoomFeature, _super);\n function DataZoomFeature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DataZoomFeature.prototype.render = function (featureModel, ecModel, api, payload) {\n if (!this._brushController) {\n this._brushController = new BrushController(api.getZr());\n this._brushController.on('brush', zrUtil.bind(this._onBrush, this)).mount();\n }\n updateZoomBtnStatus(featureModel, ecModel, this, payload, api);\n updateBackBtnStatus(featureModel, ecModel);\n };\n DataZoomFeature.prototype.onclick = function (ecModel, api, type) {\n handlers[type].call(this);\n };\n DataZoomFeature.prototype.remove = function (ecModel, api) {\n this._brushController && this._brushController.unmount();\n };\n DataZoomFeature.prototype.dispose = function (ecModel, api) {\n this._brushController && this._brushController.dispose();\n };\n DataZoomFeature.prototype._onBrush = function (eventParam) {\n var areas = eventParam.areas;\n if (!eventParam.isEnd || !areas.length) {\n return;\n }\n var snapshot = {};\n var ecModel = this.ecModel;\n this._brushController.updateCovers([]); // remove cover\n var brushTargetManager = new BrushTargetManager(makeAxisFinder(this.model), ecModel, {\n include: ['grid']\n });\n brushTargetManager.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) {\n if (coordSys.type !== 'cartesian2d') {\n return;\n }\n var brushType = area.brushType;\n if (brushType === 'rect') {\n setBatch('x', coordSys, coordRange[0]);\n setBatch('y', coordSys, coordRange[1]);\n } else {\n setBatch({\n lineX: 'x',\n lineY: 'y'\n }[brushType], coordSys, coordRange);\n }\n });\n history.push(ecModel, snapshot);\n this._dispatchZoomAction(snapshot);\n function setBatch(dimName, coordSys, minMax) {\n var axis = coordSys.getAxis(dimName);\n var axisModel = axis.model;\n var dataZoomModel = findDataZoom(dimName, axisModel, ecModel);\n // Restrict range.\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy(axisModel).getMinMaxSpan();\n if (minMaxSpan.minValueSpan != null || minMaxSpan.maxValueSpan != null) {\n minMax = sliderMove(0, minMax.slice(), axis.scale.getExtent(), 0, minMaxSpan.minValueSpan, minMaxSpan.maxValueSpan);\n }\n dataZoomModel && (snapshot[dataZoomModel.id] = {\n dataZoomId: dataZoomModel.id,\n startValue: minMax[0],\n endValue: minMax[1]\n });\n }\n function findDataZoom(dimName, axisModel, ecModel) {\n var found;\n ecModel.eachComponent({\n mainType: 'dataZoom',\n subType: 'select'\n }, function (dzModel) {\n var has = dzModel.getAxisModel(dimName, axisModel.componentIndex);\n has && (found = dzModel);\n });\n return found;\n }\n };\n ;\n DataZoomFeature.prototype._dispatchZoomAction = function (snapshot) {\n var batch = [];\n // Convert from hash map to array.\n each(snapshot, function (batchItem, dataZoomId) {\n batch.push(zrUtil.clone(batchItem));\n });\n batch.length && this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n batch: batch\n });\n };\n DataZoomFeature.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n filterMode: 'filter',\n // Icon group\n icon: {\n zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1',\n back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26'\n },\n // `zoom`, `back`\n title: ecModel.getLocaleModel().get(['toolbox', 'dataZoom', 'title']),\n brushStyle: {\n borderWidth: 0,\n color: 'rgba(210,219,238,0.2)'\n }\n };\n return defaultOption;\n };\n return DataZoomFeature;\n}(ToolboxFeature);\nvar handlers = {\n zoom: function () {\n var nextActive = !this._isZoomActive;\n this.api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'dataZoomSelect',\n dataZoomSelectActive: nextActive\n });\n },\n back: function () {\n this._dispatchZoomAction(history.pop(this.ecModel));\n }\n};\nfunction makeAxisFinder(dzFeatureModel) {\n var setting = {\n xAxisIndex: dzFeatureModel.get('xAxisIndex', true),\n yAxisIndex: dzFeatureModel.get('yAxisIndex', true),\n xAxisId: dzFeatureModel.get('xAxisId', true),\n yAxisId: dzFeatureModel.get('yAxisId', true)\n };\n // If both `xAxisIndex` `xAxisId` not set, it means 'all'.\n // If both `yAxisIndex` `yAxisId` not set, it means 'all'.\n // Some old cases set like this below to close yAxis control but leave xAxis control:\n // `{ feature: { dataZoom: { yAxisIndex: false } }`.\n if (setting.xAxisIndex == null && setting.xAxisId == null) {\n setting.xAxisIndex = 'all';\n }\n if (setting.yAxisIndex == null && setting.yAxisId == null) {\n setting.yAxisIndex = 'all';\n }\n return setting;\n}\nfunction updateBackBtnStatus(featureModel, ecModel) {\n featureModel.setIconStatus('back', history.count(ecModel) > 1 ? 'emphasis' : 'normal');\n}\nfunction updateZoomBtnStatus(featureModel, ecModel, view, payload, api) {\n var zoomActive = view._isZoomActive;\n if (payload && payload.type === 'takeGlobalCursor') {\n zoomActive = payload.key === 'dataZoomSelect' ? payload.dataZoomSelectActive : false;\n }\n view._isZoomActive = zoomActive;\n featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal');\n var brushTargetManager = new BrushTargetManager(makeAxisFinder(featureModel), ecModel, {\n include: ['grid']\n });\n var panels = brushTargetManager.makePanelOpts(api, function (targetInfo) {\n return targetInfo.xAxisDeclared && !targetInfo.yAxisDeclared ? 'lineX' : !targetInfo.xAxisDeclared && targetInfo.yAxisDeclared ? 'lineY' : 'rect';\n });\n view._brushController.setPanels(panels).enableBrush(zoomActive && panels.length ? {\n brushType: 'auto',\n brushStyle: featureModel.getModel('brushStyle').getItemStyle()\n } : false);\n}\nregisterInternalOptionCreator('dataZoom', function (ecModel) {\n var toolboxModel = ecModel.getComponent('toolbox', 0);\n var featureDataZoomPath = ['feature', 'dataZoom'];\n if (!toolboxModel || toolboxModel.get(featureDataZoomPath) == null) {\n return;\n }\n var dzFeatureModel = toolboxModel.getModel(featureDataZoomPath);\n var dzOptions = [];\n var finder = makeAxisFinder(dzFeatureModel);\n var finderResult = parseFinder(ecModel, finder);\n each(finderResult.xAxisModels, function (axisModel) {\n return buildInternalOptions(axisModel, 'xAxis', 'xAxisIndex');\n });\n each(finderResult.yAxisModels, function (axisModel) {\n return buildInternalOptions(axisModel, 'yAxis', 'yAxisIndex');\n });\n function buildInternalOptions(axisModel, axisMainType, axisIndexPropName) {\n var axisIndex = axisModel.componentIndex;\n var newOpt = {\n type: 'select',\n $fromToolbox: true,\n // Default to be filter\n filterMode: dzFeatureModel.get('filterMode', true) || 'filter',\n // Id for merge mapping.\n id: DATA_ZOOM_ID_BASE + axisMainType + axisIndex\n };\n newOpt[axisIndexPropName] = axisIndex;\n dzOptions.push(newOpt);\n }\n return dzOptions;\n});\nexport default DataZoomFeature;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installDataZoomSelect } from '../../component/dataZoom/installDataZoomSelect.js';\nimport ToolboxModel from './ToolboxModel.js';\nimport ToolboxView from './ToolboxView.js';\n// TODOD: REGISTER IN INSTALL\nimport { registerFeature } from './featureManager.js';\nimport SaveAsImage from './feature/SaveAsImage.js';\nimport MagicType from './feature/MagicType.js';\nimport DataView from './feature/DataView.js';\nimport Restore from './feature/Restore.js';\nimport DataZoom from './feature/DataZoom.js';\nexport function install(registers) {\n registers.registerComponentModel(ToolboxModel);\n registers.registerComponentView(ToolboxView);\n registerFeature('saveAsImage', SaveAsImage);\n registerFeature('magicType', MagicType);\n registerFeature('dataView', DataView);\n registerFeature('dataZoom', DataZoom);\n registerFeature('restore', Restore);\n use(installDataZoomSelect);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nvar TooltipModel = /** @class */function (_super) {\n __extends(TooltipModel, _super);\n function TooltipModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipModel.type;\n return _this;\n }\n TooltipModel.type = 'tooltip';\n TooltipModel.dependencies = ['axisPointer'];\n TooltipModel.defaultOption = {\n // zlevel: 0,\n z: 60,\n show: true,\n // tooltip main content\n showContent: true,\n // 'trigger' only works on coordinate system.\n // 'item' | 'axis' | 'none'\n trigger: 'item',\n // 'click' | 'mousemove' | 'none'\n triggerOn: 'mousemove|click',\n alwaysShowContent: false,\n displayMode: 'single',\n renderMode: 'auto',\n // whether restraint content inside viewRect.\n // If renderMode: 'richText', default true.\n // If renderMode: 'html', defaut false (for backward compat).\n confine: null,\n showDelay: 0,\n hideDelay: 100,\n // Animation transition time, unit is second\n transitionDuration: 0.4,\n enterable: false,\n backgroundColor: '#fff',\n // box shadow\n shadowBlur: 10,\n shadowColor: 'rgba(0, 0, 0, .2)',\n shadowOffsetX: 1,\n shadowOffsetY: 2,\n // tooltip border radius, unit is px, default is 4\n borderRadius: 4,\n // tooltip border width, unit is px, default is 0 (no border)\n borderWidth: 1,\n // Tooltip inside padding, default is 5 for all direction\n // Array is allowed to set up, right, bottom, left, same with css\n // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.\n padding: null,\n // Extra css text\n extraCssText: '',\n // axis indicator, trigger by axis\n axisPointer: {\n // default is line\n // legal values: 'line' | 'shadow' | 'cross'\n type: 'line',\n // Valid when type is line, appoint tooltip line locate on which line. Optional\n // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'\n // default is 'auto', chose the axis which type is category.\n // for multiply y axis, cartesian coord chose x axis, polar chose angle axis\n axis: 'auto',\n animation: 'auto',\n animationDurationUpdate: 200,\n animationEasingUpdate: 'exponentialOut',\n crossStyle: {\n color: '#999',\n width: 1,\n type: 'dashed',\n // TODO formatter\n textStyle: {}\n }\n // lineStyle and shadowStyle should not be specified here,\n // otherwise it will always override those styles on option.axisPointer.\n },\n\n textStyle: {\n color: '#666',\n fontSize: 14\n }\n };\n return TooltipModel;\n}(ComponentModel);\nexport default TooltipModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { toCamelCase } from '../../util/format.js';\nimport env from 'zrender/lib/core/env.js';\n/* global document */\nexport function shouldTooltipConfine(tooltipModel) {\n var confineOption = tooltipModel.get('confine');\n return confineOption != null ? !!confineOption\n // In richText mode, the outside part can not be visible.\n : tooltipModel.get('renderMode') === 'richText';\n}\nfunction testStyle(styleProps) {\n if (!env.domSupported) {\n return;\n }\n var style = document.documentElement.style;\n for (var i = 0, len = styleProps.length; i < len; i++) {\n if (styleProps[i] in style) {\n return styleProps[i];\n }\n }\n}\nexport var TRANSFORM_VENDOR = testStyle(['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\nexport var TRANSITION_VENDOR = testStyle(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\nexport function toCSSVendorPrefix(styleVendor, styleProp) {\n if (!styleVendor) {\n return styleProp;\n }\n styleProp = toCamelCase(styleProp, true);\n var idx = styleVendor.indexOf(styleProp);\n styleVendor = idx === -1 ? styleProp : \"-\" + styleVendor.slice(0, idx) + \"-\" + styleProp;\n return styleVendor.toLowerCase();\n}\nexport function getComputedStyle(el, style) {\n var stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el);\n return stl ? style ? stl[style] : stl : null;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isString, indexOf, each, bind, isFunction, isArray, isDom } from 'zrender/lib/core/util.js';\nimport { normalizeEvent } from 'zrender/lib/core/event.js';\nimport { transformLocalCoord } from 'zrender/lib/core/dom.js';\nimport env from 'zrender/lib/core/env.js';\nimport { convertToColorString, toCamelCase, normalizeCssArray } from '../../util/format.js';\nimport { shouldTooltipConfine, toCSSVendorPrefix, getComputedStyle, TRANSFORM_VENDOR, TRANSITION_VENDOR } from './helper.js';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup.js';\n/* global document, window */\nvar CSS_TRANSITION_VENDOR = toCSSVendorPrefix(TRANSITION_VENDOR, 'transition');\nvar CSS_TRANSFORM_VENDOR = toCSSVendorPrefix(TRANSFORM_VENDOR, 'transform');\n// eslint-disable-next-line\nvar gCssText = \"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;\" + (env.transform3dSupported ? 'will-change:transform;' : '');\nfunction mirrorPos(pos) {\n pos = pos === 'left' ? 'right' : pos === 'right' ? 'left' : pos === 'top' ? 'bottom' : 'top';\n return pos;\n}\nfunction assembleArrow(tooltipModel, borderColor, arrowPosition) {\n if (!isString(arrowPosition) || arrowPosition === 'inside') {\n return '';\n }\n var backgroundColor = tooltipModel.get('backgroundColor');\n var borderWidth = tooltipModel.get('borderWidth');\n borderColor = convertToColorString(borderColor);\n var arrowPos = mirrorPos(arrowPosition);\n var arrowSize = Math.max(Math.round(borderWidth) * 1.5, 6);\n var positionStyle = '';\n var transformStyle = CSS_TRANSFORM_VENDOR + ':';\n var rotateDeg;\n if (indexOf(['left', 'right'], arrowPos) > -1) {\n positionStyle += 'top:50%';\n transformStyle += \"translateY(-50%) rotate(\" + (rotateDeg = arrowPos === 'left' ? -225 : -45) + \"deg)\";\n } else {\n positionStyle += 'left:50%';\n transformStyle += \"translateX(-50%) rotate(\" + (rotateDeg = arrowPos === 'top' ? 225 : 45) + \"deg)\";\n }\n var rotateRadian = rotateDeg * Math.PI / 180;\n var arrowWH = arrowSize + borderWidth;\n var rotatedWH = arrowWH * Math.abs(Math.cos(rotateRadian)) + arrowWH * Math.abs(Math.sin(rotateRadian));\n var arrowOffset = Math.round(((rotatedWH - Math.SQRT2 * borderWidth) / 2 + Math.SQRT2 * borderWidth - (rotatedWH - arrowWH) / 2) * 100) / 100;\n positionStyle += \";\" + arrowPos + \":-\" + arrowOffset + \"px\";\n var borderStyle = borderColor + \" solid \" + borderWidth + \"px;\";\n var styleCss = [\"position:absolute;width:\" + arrowSize + \"px;height:\" + arrowSize + \"px;z-index:-1;\", positionStyle + \";\" + transformStyle + \";\", \"border-bottom:\" + borderStyle, \"border-right:\" + borderStyle, \"background-color:\" + backgroundColor + \";\"];\n return \"
\";\n}\nfunction assembleTransition(duration, onlyFade) {\n var transitionCurve = 'cubic-bezier(0.23,1,0.32,1)';\n var transitionOption = \" \" + duration / 2 + \"s \" + transitionCurve;\n var transitionText = \"opacity\" + transitionOption + \",visibility\" + transitionOption;\n if (!onlyFade) {\n transitionOption = \" \" + duration + \"s \" + transitionCurve;\n transitionText += env.transformSupported ? \",\" + CSS_TRANSFORM_VENDOR + transitionOption : \",left\" + transitionOption + \",top\" + transitionOption;\n }\n return CSS_TRANSITION_VENDOR + ':' + transitionText;\n}\nfunction assembleTransform(x, y, toString) {\n // If using float on style, the final width of the dom might\n // keep changing slightly while mouse move. So `toFixed(0)` them.\n var x0 = x.toFixed(0) + 'px';\n var y0 = y.toFixed(0) + 'px';\n // not support transform, use `left` and `top` instead.\n if (!env.transformSupported) {\n return toString ? \"top:\" + y0 + \";left:\" + x0 + \";\" : [['top', y0], ['left', x0]];\n }\n // support transform\n var is3d = env.transform3dSupported;\n var translate = \"translate\" + (is3d ? '3d' : '') + \"(\" + x0 + \",\" + y0 + (is3d ? ',0' : '') + \")\";\n return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]];\n}\n/**\n * @param {Object} textStyle\n * @return {string}\n * @inner\n */\nfunction assembleFont(textStyleModel) {\n var cssText = [];\n var fontSize = textStyleModel.get('fontSize');\n var color = textStyleModel.getTextColor();\n color && cssText.push('color:' + color);\n cssText.push('font:' + textStyleModel.getFont());\n fontSize\n // @ts-ignore, leave it to the tooltip refactor.\n && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');\n var shadowColor = textStyleModel.get('textShadowColor');\n var shadowBlur = textStyleModel.get('textShadowBlur') || 0;\n var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0;\n var shadowOffsetY = textStyleModel.get('textShadowOffsetY') || 0;\n shadowColor && shadowBlur && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px ' + shadowBlur + 'px ' + shadowColor);\n each(['decoration', 'align'], function (name) {\n var val = textStyleModel.get(name);\n val && cssText.push('text-' + name + ':' + val);\n });\n return cssText.join(';');\n}\nfunction assembleCssText(tooltipModel, enableTransition, onlyFade) {\n var cssText = [];\n var transitionDuration = tooltipModel.get('transitionDuration');\n var backgroundColor = tooltipModel.get('backgroundColor');\n var shadowBlur = tooltipModel.get('shadowBlur');\n var shadowColor = tooltipModel.get('shadowColor');\n var shadowOffsetX = tooltipModel.get('shadowOffsetX');\n var shadowOffsetY = tooltipModel.get('shadowOffsetY');\n var textStyleModel = tooltipModel.getModel('textStyle');\n var padding = getPaddingFromTooltipModel(tooltipModel, 'html');\n var boxShadow = shadowOffsetX + \"px \" + shadowOffsetY + \"px \" + shadowBlur + \"px \" + shadowColor;\n cssText.push('box-shadow:' + boxShadow);\n // Animation transition. Do not animate when transitionDuration is 0.\n enableTransition && transitionDuration && cssText.push(assembleTransition(transitionDuration, onlyFade));\n if (backgroundColor) {\n cssText.push('background-color:' + backgroundColor);\n }\n // Border style\n each(['width', 'color', 'radius'], function (name) {\n var borderName = 'border-' + name;\n var camelCase = toCamelCase(borderName);\n var val = tooltipModel.get(camelCase);\n val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));\n });\n // Text style\n cssText.push(assembleFont(textStyleModel));\n // Padding\n if (padding != null) {\n cssText.push('padding:' + normalizeCssArray(padding).join('px ') + 'px');\n }\n return cssText.join(';') + ';';\n}\n// If not able to make, do not modify the input `out`.\nfunction makeStyleCoord(out, zr, container, zrX, zrY) {\n var zrPainter = zr && zr.painter;\n if (container) {\n var zrViewportRoot = zrPainter && zrPainter.getViewportRoot();\n if (zrViewportRoot) {\n // Some APPs might use scale on body, so we support CSS transform here.\n transformLocalCoord(out, zrViewportRoot, container, zrX, zrY);\n }\n } else {\n out[0] = zrX;\n out[1] = zrY;\n // xy should be based on canvas root. But tooltipContent is\n // the sibling of canvas root. So padding of ec container\n // should be considered here.\n var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();\n if (viewportRootOffset) {\n out[0] += viewportRootOffset.offsetLeft;\n out[1] += viewportRootOffset.offsetTop;\n }\n }\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\nvar TooltipHTMLContent = /** @class */function () {\n function TooltipHTMLContent(api, opt) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._enterable = true;\n this._alwaysShowContent = false;\n this._firstShow = true;\n this._longHide = true;\n if (env.wxa) {\n return null;\n }\n var el = document.createElement('div');\n // TODO: TYPE\n el.domBelongToZr = true;\n this.el = el;\n var zr = this._zr = api.getZr();\n var appendTo = opt.appendTo;\n var container = appendTo && (isString(appendTo) ? document.querySelector(appendTo) : isDom(appendTo) ? appendTo : isFunction(appendTo) && appendTo(api.getDom()));\n makeStyleCoord(this._styleCoord, zr, container, api.getWidth() / 2, api.getHeight() / 2);\n (container || api.getDom()).appendChild(el);\n this._api = api;\n this._container = container;\n // FIXME\n // Is it needed to trigger zr event manually if\n // the browser do not support `pointer-events: none`.\n var self = this;\n el.onmouseenter = function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n self._inContent = true;\n };\n el.onmousemove = function (e) {\n e = e || window.event;\n if (!self._enterable) {\n // `pointer-events: none` is set to tooltip content div\n // if `enterable` is set as `false`, and `el.onmousemove`\n // can not be triggered. But in browser that do not\n // support `pointer-events`, we need to do this:\n // Try trigger zrender event to avoid mouse\n // in and out shape too frequently\n var handler = zr.handler;\n var zrViewportRoot = zr.painter.getViewportRoot();\n normalizeEvent(zrViewportRoot, e, true);\n handler.dispatch('mousemove', e);\n }\n };\n el.onmouseleave = function () {\n // set `_inContent` to `false` before `hideLater`\n self._inContent = false;\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n };\n }\n /**\n * Update when tooltip is rendered\n */\n TooltipHTMLContent.prototype.update = function (tooltipModel) {\n // FIXME\n // Move this logic to ec main?\n if (!this._container) {\n var container = this._api.getDom();\n var position = getComputedStyle(container, 'position');\n var domStyle = container.style;\n if (domStyle.position !== 'absolute' && position !== 'absolute') {\n domStyle.position = 'relative';\n }\n }\n // move tooltip if chart resized\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n // update alwaysShowContent\n this._alwaysShowContent = alwaysShowContent;\n // update className\n this.el.className = tooltipModel.get('className') || '';\n // Hide the tooltip\n // PENDING\n // this.hide();\n };\n\n TooltipHTMLContent.prototype.show = function (tooltipModel, nearPointColor) {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var el = this.el;\n var style = el.style;\n var styleCoord = this._styleCoord;\n if (!el.innerHTML) {\n style.display = 'none';\n } else {\n style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide)\n // initial transform\n + assembleTransform(styleCoord[0], styleCoord[1], true) + (\"border-color:\" + convertToColorString(nearPointColor) + \";\") + (tooltipModel.get('extraCssText') || '')\n // If mouse occasionally move over the tooltip, a mouseout event will be\n // triggered by canvas, and cause some unexpectable result like dragging\n // stop, \"unfocusAdjacency\". Here `pointer-events: none` is used to solve\n // it. Although it is not supported by IE8~IE10, fortunately it is a rare\n // scenario.\n + (\";pointer-events:\" + (this._enterable ? 'auto' : 'none'));\n }\n this._show = true;\n this._firstShow = false;\n this._longHide = false;\n };\n TooltipHTMLContent.prototype.setContent = function (content, markers, tooltipModel, borderColor, arrowPosition) {\n var el = this.el;\n if (content == null) {\n el.innerHTML = '';\n return;\n }\n var arrow = '';\n if (isString(arrowPosition) && tooltipModel.get('trigger') === 'item' && !shouldTooltipConfine(tooltipModel)) {\n arrow = assembleArrow(tooltipModel, borderColor, arrowPosition);\n }\n if (isString(content)) {\n el.innerHTML = content + arrow;\n } else if (content) {\n // Clear previous\n el.innerHTML = '';\n if (!isArray(content)) {\n content = [content];\n }\n for (var i = 0; i < content.length; i++) {\n if (isDom(content[i]) && content[i].parentNode !== el) {\n el.appendChild(content[i]);\n }\n }\n // no arrow if empty\n if (arrow && el.childNodes.length) {\n // no need to create a new parent element, but it's not supported by IE 10 and older.\n // const arrowEl = document.createRange().createContextualFragment(arrow);\n var arrowEl = document.createElement('div');\n arrowEl.innerHTML = arrow;\n el.appendChild(arrowEl);\n }\n }\n };\n TooltipHTMLContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n TooltipHTMLContent.prototype.getSize = function () {\n var el = this.el;\n return [el.offsetWidth, el.offsetHeight];\n };\n TooltipHTMLContent.prototype.moveTo = function (zrX, zrY) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, this._container, zrX, zrY);\n if (styleCoord[0] != null && styleCoord[1] != null) {\n var style_1 = this.el.style;\n var transforms = assembleTransform(styleCoord[0], styleCoord[1]);\n each(transforms, function (transform) {\n style_1[transform[0]] = transform[1];\n });\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n TooltipHTMLContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2];\n // The ratio of top to height\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n TooltipHTMLContent.prototype.hide = function () {\n var _this = this;\n var style = this.el.style;\n style.visibility = 'hidden';\n style.opacity = '0';\n env.transform3dSupported && (style.willChange = '');\n this._show = false;\n this._longHideTimeout = setTimeout(function () {\n return _this._longHide = true;\n }, 500);\n };\n TooltipHTMLContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n TooltipHTMLContent.prototype.isShow = function () {\n return this._show;\n };\n TooltipHTMLContent.prototype.dispose = function () {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var parentNode = this.el.parentNode;\n parentNode && parentNode.removeChild(this.el);\n this.el = this._container = null;\n };\n return TooltipHTMLContent;\n}();\nexport default TooltipHTMLContent;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup.js';\nimport { throwError } from '../../util/log.js';\nvar TooltipRichContent = /** @class */function () {\n function TooltipRichContent(api) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._alwaysShowContent = false;\n this._enterable = true;\n this._zr = api.getZr();\n makeStyleCoord(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2);\n }\n /**\n * Update when tooltip is rendered\n */\n TooltipRichContent.prototype.update = function (tooltipModel) {\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n // update alwaysShowContent\n this._alwaysShowContent = alwaysShowContent;\n };\n TooltipRichContent.prototype.show = function () {\n if (this._hideTimeout) {\n clearTimeout(this._hideTimeout);\n }\n this.el.show();\n this._show = true;\n };\n /**\n * Set tooltip content\n */\n TooltipRichContent.prototype.setContent = function (content, markupStyleCreator, tooltipModel, borderColor, arrowPosition) {\n var _this = this;\n if (zrUtil.isObject(content)) {\n throwError(process.env.NODE_ENV !== 'production' ? 'Passing DOM nodes as content is not supported in richText tooltip!' : '');\n }\n if (this.el) {\n this._zr.remove(this.el);\n }\n var textStyleModel = tooltipModel.getModel('textStyle');\n this.el = new ZRText({\n style: {\n rich: markupStyleCreator.richTextStyles,\n text: content,\n lineHeight: 22,\n borderWidth: 1,\n borderColor: borderColor,\n textShadowColor: textStyleModel.get('textShadowColor'),\n fill: tooltipModel.get(['textStyle', 'color']),\n padding: getPaddingFromTooltipModel(tooltipModel, 'richText'),\n verticalAlign: 'top',\n align: 'left'\n },\n z: tooltipModel.get('z')\n });\n zrUtil.each(['backgroundColor', 'borderRadius', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'], function (propName) {\n _this.el.style[propName] = tooltipModel.get(propName);\n });\n zrUtil.each(['textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY'], function (propName) {\n _this.el.style[propName] = textStyleModel.get(propName) || 0;\n });\n this._zr.add(this.el);\n var self = this;\n this.el.on('mouseover', function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n self._inContent = true;\n });\n this.el.on('mouseout', function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n self._inContent = false;\n });\n };\n TooltipRichContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n TooltipRichContent.prototype.getSize = function () {\n var el = this.el;\n var bounding = this.el.getBoundingRect();\n // bounding rect does not include shadow. For renderMode richText,\n // if overflow, it will be cut. So calculate them accurately.\n var shadowOuterSize = calcShadowOuterSize(el.style);\n return [bounding.width + shadowOuterSize.left + shadowOuterSize.right, bounding.height + shadowOuterSize.top + shadowOuterSize.bottom];\n };\n TooltipRichContent.prototype.moveTo = function (x, y) {\n var el = this.el;\n if (el) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, x, y);\n x = styleCoord[0];\n y = styleCoord[1];\n var style = el.style;\n var borderWidth = mathMaxWith0(style.borderWidth || 0);\n var shadowOuterSize = calcShadowOuterSize(style);\n // rich text x, y do not include border.\n el.x = x + borderWidth + shadowOuterSize.left;\n el.y = y + borderWidth + shadowOuterSize.top;\n el.markRedraw();\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n TooltipRichContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2];\n // The ratio of top to height\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n TooltipRichContent.prototype.hide = function () {\n if (this.el) {\n this.el.hide();\n }\n this._show = false;\n };\n TooltipRichContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n TooltipRichContent.prototype.isShow = function () {\n return this._show;\n };\n TooltipRichContent.prototype.dispose = function () {\n this._zr.remove(this.el);\n };\n return TooltipRichContent;\n}();\nfunction mathMaxWith0(val) {\n return Math.max(0, val);\n}\nfunction calcShadowOuterSize(style) {\n var shadowBlur = mathMaxWith0(style.shadowBlur || 0);\n var shadowOffsetX = mathMaxWith0(style.shadowOffsetX || 0);\n var shadowOffsetY = mathMaxWith0(style.shadowOffsetY || 0);\n return {\n left: mathMaxWith0(shadowBlur - shadowOffsetX),\n right: mathMaxWith0(shadowBlur + shadowOffsetX),\n top: mathMaxWith0(shadowBlur - shadowOffsetY),\n bottom: mathMaxWith0(shadowBlur + shadowOffsetY)\n };\n}\nfunction makeStyleCoord(out, zr, zrX, zrY) {\n out[0] = zrX;\n out[1] = zrY;\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\nexport default TooltipRichContent;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport { __extends } from \"tslib\";\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { bind, each, clone, trim, isString, isFunction, isArray, isObject, extend } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport TooltipHTMLContent from './TooltipHTMLContent.js';\nimport TooltipRichContent from './TooltipRichContent.js';\nimport { convertToColorString, encodeHTML, formatTpl } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport { Rect } from '../../util/graphic.js';\nimport findPointFromSeries from '../axisPointer/findPointFromSeries.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport Model from '../../model/Model.js';\nimport * as globalListener from '../axisPointer/globalListener.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport * as axisPointerViewHelper from '../axisPointer/viewHelper.js';\nimport { getTooltipRenderMode, preParseFinder, queryReferringComponents } from '../../util/model.js';\nimport ComponentView from '../../view/Component.js';\nimport { format as timeFormat } from '../../util/time.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { shouldTooltipConfine } from './helper.js';\nimport { normalizeTooltipFormatResult } from '../../model/mixin/dataFormat.js';\nimport { createTooltipMarkup, buildTooltipMarkup, TooltipMarkupStyleCreator } from './tooltipMarkup.js';\nimport { findEventDispatcher } from '../../util/event.js';\nimport { clear, createOrUpdate } from '../../util/throttle.js';\nvar proxyRect = new Rect({\n shape: {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n }\n});\nvar TooltipView = /** @class */function (_super) {\n __extends(TooltipView, _super);\n function TooltipView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipView.type;\n return _this;\n }\n TooltipView.prototype.init = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n var tooltipModel = ecModel.getComponent('tooltip');\n var renderMode = this._renderMode = getTooltipRenderMode(tooltipModel.get('renderMode'));\n this._tooltipContent = renderMode === 'richText' ? new TooltipRichContent(api) : new TooltipHTMLContent(api, {\n appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true)\n });\n };\n TooltipView.prototype.render = function (tooltipModel, ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n // Reset\n this.group.removeAll();\n this._tooltipModel = tooltipModel;\n this._ecModel = ecModel;\n this._api = api;\n var tooltipContent = this._tooltipContent;\n tooltipContent.update(tooltipModel);\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n this._initGlobalListener();\n this._keepShow();\n // PENDING\n // `mousemove` event will be triggered very frequently when the mouse moves fast,\n // which causes that the `updatePosition` function was also called frequently.\n // In Chrome with devtools open and Firefox, tooltip looks laggy and shakes. See #14695 #16101\n // To avoid frequent triggering,\n // consider throttling it in 50ms when transition is enabled\n if (this._renderMode !== 'richText' && tooltipModel.get('transitionDuration')) {\n createOrUpdate(this, '_updatePosition', 50, 'fixRate');\n } else {\n clear(this, '_updatePosition');\n }\n };\n TooltipView.prototype._initGlobalListener = function () {\n var tooltipModel = this._tooltipModel;\n var triggerOn = tooltipModel.get('triggerOn');\n globalListener.register('itemTooltip', this._api, bind(function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none') {\n if (triggerOn.indexOf(currTrigger) >= 0) {\n this._tryShow(e, dispatchAction);\n } else if (currTrigger === 'leave') {\n this._hide(dispatchAction);\n }\n }\n }, this));\n };\n TooltipView.prototype._keepShow = function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api;\n var triggerOn = tooltipModel.get('triggerOn');\n // Try to keep the tooltip show when refreshing\n if (this._lastX != null && this._lastY != null\n // When user is willing to control tooltip totally using API,\n // self.manuallyShowTip({x, y}) might cause tooltip hide,\n // which is not expected.\n && triggerOn !== 'none' && triggerOn !== 'click') {\n var self_1 = this;\n clearTimeout(this._refreshUpdateTimeout);\n this._refreshUpdateTimeout = setTimeout(function () {\n // Show tip next tick after other charts are rendered\n // In case highlight action has wrong result\n // FIXME\n !api.isDisposed() && self_1.manuallyShowTip(tooltipModel, ecModel, api, {\n x: self_1._lastX,\n y: self_1._lastY,\n dataByCoordSys: self_1._lastDataByCoordSys\n });\n });\n }\n };\n /**\n * Show tip manually by\n * dispatchAction({\n * type: 'showTip',\n * x: 10,\n * y: 10\n * });\n * Or\n * dispatchAction({\n * type: 'showTip',\n * seriesIndex: 0,\n * dataIndex or dataIndexInside or name\n * });\n *\n * TODO Batch\n */\n TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) {\n if (payload.from === this.uid || env.node || !api.getDom()) {\n return;\n }\n var dispatchAction = makeDispatchAction(payload, api);\n // Reset ticket\n this._ticket = '';\n // When triggered from axisPointer.\n var dataByCoordSys = payload.dataByCoordSys;\n var cmptRef = findComponentReference(payload, ecModel, api);\n if (cmptRef) {\n var rect = cmptRef.el.getBoundingRect().clone();\n rect.applyTransform(cmptRef.el.transform);\n this._tryShow({\n offsetX: rect.x + rect.width / 2,\n offsetY: rect.y + rect.height / 2,\n target: cmptRef.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n } else if (payload.tooltip && payload.x != null && payload.y != null) {\n var el = proxyRect;\n el.x = payload.x;\n el.y = payload.y;\n el.update();\n getECData(el).tooltipConfig = {\n name: null,\n option: payload.tooltip\n };\n // Manually show tooltip while view is not using zrender elements.\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n target: el\n }, dispatchAction);\n } else if (dataByCoordSys) {\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n dataByCoordSys: dataByCoordSys,\n tooltipOption: payload.tooltipOption\n }, dispatchAction);\n } else if (payload.seriesIndex != null) {\n if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) {\n return;\n }\n var pointInfo = findPointFromSeries(payload, ecModel);\n var cx = pointInfo.point[0];\n var cy = pointInfo.point[1];\n if (cx != null && cy != null) {\n this._tryShow({\n offsetX: cx,\n offsetY: cy,\n target: pointInfo.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n }\n } else if (payload.x != null && payload.y != null) {\n // FIXME\n // should wrap dispatchAction like `axisPointer/globalListener` ?\n api.dispatchAction({\n type: 'updateAxisPointer',\n x: payload.x,\n y: payload.y\n });\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n target: api.getZr().findHover(payload.x, payload.y).target\n }, dispatchAction);\n }\n };\n TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) {\n var tooltipContent = this._tooltipContent;\n if (this._tooltipModel) {\n tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));\n }\n this._lastX = this._lastY = this._lastDataByCoordSys = null;\n if (payload.from !== this.uid) {\n this._hide(makeDispatchAction(payload, api));\n }\n };\n // Be compatible with previous design, that is, when tooltip.type is 'axis' and\n // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer\n // and tooltip.\n TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) {\n var seriesIndex = payload.seriesIndex;\n var dataIndex = payload.dataIndex;\n // @ts-ignore\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) {\n return;\n }\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n if (!seriesModel) {\n return;\n }\n var data = seriesModel.getData();\n var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel);\n if (tooltipCascadedModel.get('trigger') !== 'axis') {\n return;\n }\n api.dispatchAction({\n type: 'updateAxisPointer',\n seriesIndex: seriesIndex,\n dataIndex: dataIndex,\n position: payload.position\n });\n return true;\n };\n TooltipView.prototype._tryShow = function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n if (!tooltipModel) {\n return;\n }\n // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n var dataByCoordSys = e.dataByCoordSys;\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n } else if (el) {\n var ecData = getECData(el);\n if (ecData.ssrType === 'legend') {\n // Don't trigger tooltip for legend tooltip item\n return;\n }\n this._lastDataByCoordSys = null;\n var seriesDispatcher_1;\n var cmptDispatcher_1;\n findEventDispatcher(el, function (target) {\n // Always show item tooltip if mouse is on the element with dataIndex\n if (getECData(target).dataIndex != null) {\n seriesDispatcher_1 = target;\n return true;\n }\n // Tooltip provided directly. Like legend.\n if (getECData(target).tooltipConfig != null) {\n cmptDispatcher_1 = target;\n return true;\n }\n }, true);\n if (seriesDispatcher_1) {\n this._showSeriesItemTooltip(e, seriesDispatcher_1, dispatchAction);\n } else if (cmptDispatcher_1) {\n this._showComponentItemTooltip(e, cmptDispatcher_1, dispatchAction);\n } else {\n this._hide(dispatchAction);\n }\n } else {\n this._lastDataByCoordSys = null;\n this._hide(dispatchAction);\n }\n };\n TooltipView.prototype._showOrMove = function (tooltipModel, cb) {\n // showDelay is used in this case: tooltip.enterable is set\n // as true. User intent to move mouse into tooltip and click\n // something. `showDelay` makes it easier to enter the content\n // but tooltip do not move immediately.\n var delay = tooltipModel.get('showDelay');\n cb = bind(cb, this);\n clearTimeout(this._showTimout);\n delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb();\n };\n TooltipView.prototype._showAxisTooltip = function (dataByCoordSys, e) {\n var ecModel = this._ecModel;\n var globalTooltipModel = this._tooltipModel;\n var point = [e.offsetX, e.offsetY];\n var singleTooltipModel = buildTooltipModel([e.tooltipOption], globalTooltipModel);\n var renderMode = this._renderMode;\n var cbParamsList = [];\n var articleMarkup = createTooltipMarkup('section', {\n blocks: [],\n noHeader: true\n });\n // Only for legacy: `Serise['formatTooltip']` returns a string.\n var markupTextArrLegacy = [];\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n each(dataByCoordSys, function (itemCoordSys) {\n each(itemCoordSys.dataByAxis, function (axisItem) {\n var axisModel = ecModel.getComponent(axisItem.axisDim + 'Axis', axisItem.axisIndex);\n var axisValue = axisItem.value;\n if (!axisModel || axisValue == null) {\n return;\n }\n var axisValueLabel = axisPointerViewHelper.getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt);\n var axisSectionMarkup = createTooltipMarkup('section', {\n header: axisValueLabel,\n noHeader: !trim(axisValueLabel),\n sortBlocks: true,\n blocks: []\n });\n articleMarkup.blocks.push(axisSectionMarkup);\n each(axisItem.seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var cbParams = series.getDataParams(dataIndex);\n // Can't find data.\n if (cbParams.dataIndex < 0) {\n return;\n }\n cbParams.axisDim = axisItem.axisDim;\n cbParams.axisIndex = axisItem.axisIndex;\n cbParams.axisType = axisItem.axisType;\n cbParams.axisId = axisItem.axisId;\n cbParams.axisValue = axisHelper.getAxisRawValue(axisModel.axis, {\n value: axisValue\n });\n cbParams.axisValueLabel = axisValueLabel;\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n cbParams.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(cbParams.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null));\n var frag = seriesTooltipResult.frag;\n if (frag) {\n var valueFormatter = buildTooltipModel([series], globalTooltipModel).get('valueFormatter');\n axisSectionMarkup.blocks.push(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag);\n }\n if (seriesTooltipResult.text) {\n markupTextArrLegacy.push(seriesTooltipResult.text);\n }\n cbParamsList.push(cbParams);\n });\n });\n });\n // In most cases, the second axis is displays upper on the first one.\n // So we reverse it to look better.\n articleMarkup.blocks.reverse();\n markupTextArrLegacy.reverse();\n var positionExpr = e.position;\n var orderMode = singleTooltipModel.get('order');\n var builtMarkupText = buildTooltipMarkup(articleMarkup, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), singleTooltipModel.get('textStyle'));\n builtMarkupText && markupTextArrLegacy.unshift(builtMarkupText);\n var blockBreak = renderMode === 'richText' ? '\\n\\n' : '
';\n var allMarkupText = markupTextArrLegacy.join(blockBreak);\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys, cbParamsList)) {\n this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, cbParamsList);\n } else {\n this._showTooltipContent(singleTooltipModel, allMarkupText, cbParamsList, Math.random() + '', point[0], point[1], positionExpr, null, markupStyleCreator);\n }\n });\n // Do not trigger events here, because this branch only be entered\n // from dispatchAction.\n };\n\n TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) {\n var ecModel = this._ecModel;\n var ecData = getECData(dispatcher);\n // Use dataModel in element if possible\n // Used when mouseover on a element like markPoint or edge\n // In which case, the data is not main data in series.\n var seriesIndex = ecData.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n // For example, graph link.\n var dataModel = ecData.dataModel || seriesModel;\n var dataIndex = ecData.dataIndex;\n var dataType = ecData.dataType;\n var data = dataModel.getData(dataType);\n var renderMode = this._renderMode;\n var positionDefault = e.positionDefault;\n var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model], this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var tooltipTrigger = tooltipModel.get('trigger');\n if (tooltipTrigger != null && tooltipTrigger !== 'item') {\n return;\n }\n var params = dataModel.getDataParams(dataIndex, dataType);\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n params.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(params.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType));\n var orderMode = tooltipModel.get('order');\n var valueFormatter = tooltipModel.get('valueFormatter');\n var frag = seriesTooltipResult.frag;\n var markupText = frag ? buildTooltipMarkup(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.text;\n var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex;\n this._showOrMove(tooltipModel, function () {\n this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator);\n });\n // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n };\n TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) {\n var isHTMLRenderMode = this._renderMode === 'html';\n var ecData = getECData(el);\n var tooltipConfig = ecData.tooltipConfig;\n var tooltipOpt = tooltipConfig.option || {};\n var encodeHTMLContent = tooltipOpt.encodeHTMLContent;\n if (isString(tooltipOpt)) {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n // when `tooltipConfig.option` is a string rather than an object,\n // we can't know if the content needs to be encoded\n // for the sake of security, encode it by default.\n encodeHTMLContent = true;\n }\n if (encodeHTMLContent && isHTMLRenderMode && tooltipOpt.content) {\n // clone might be unnecessary?\n tooltipOpt = clone(tooltipOpt);\n tooltipOpt.content = encodeHTML(tooltipOpt.content);\n }\n var tooltipModelCascade = [tooltipOpt];\n var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex);\n if (cmpt) {\n tooltipModelCascade.push(cmpt);\n }\n // In most cases, component tooltip formatter has different params with series tooltip formatter,\n // so that they cannot share the same formatter. Since the global tooltip formatter is used for series\n // by convention, we do not use it as the default formatter for component.\n tooltipModelCascade.push({\n formatter: tooltipOpt.content\n });\n var positionDefault = e.positionDefault;\n var subTooltipModel = buildTooltipModel(tooltipModelCascade, this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var defaultHtml = subTooltipModel.get('content');\n var asyncTicket = Math.random() + '';\n // PENDING: this case do not support richText style yet.\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Do not check whether `trigger` is 'none' here, because `trigger`\n // only works on coordinate system. In fact, we have not found case\n // that requires setting `trigger` nothing on component yet.\n this._showOrMove(subTooltipModel, function () {\n // Use formatterParams from element defined in component\n // Avoid users modify it.\n var formatterParams = clone(subTooltipModel.get('formatterParams') || {});\n this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator);\n });\n // If not dispatch showTip, tip may be hide triggered by axis.\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n };\n TooltipView.prototype._showTooltipContent = function (\n // Use Model insteadof TooltipModel because this model may be from series or other options.\n // Instead of top level tooltip.\n tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markupStyleCreator) {\n // Reset ticket\n this._ticket = '';\n if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) {\n return;\n }\n var tooltipContent = this._tooltipContent;\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n var formatter = tooltipModel.get('formatter');\n positionExpr = positionExpr || tooltipModel.get('position');\n var html = defaultHtml;\n var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor'));\n var nearPointColor = nearPoint.color;\n if (formatter) {\n if (isString(formatter)) {\n var useUTC = tooltipModel.ecModel.get('useUTC');\n var params0 = isArray(params) ? params[0] : params;\n var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;\n html = formatter;\n if (isTimeAxis) {\n html = timeFormat(params0.axisValue, html, useUTC);\n }\n html = formatTpl(html, params, true);\n } else if (isFunction(formatter)) {\n var callback = bind(function (cbTicket, html) {\n if (cbTicket === this._ticket) {\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n }\n }, this);\n this._ticket = asyncTicket;\n html = formatter(params, asyncTicket, callback);\n } else {\n html = formatter;\n }\n }\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n tooltipContent.show(tooltipModel, nearPointColor);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n };\n TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor) {\n if (trigger === 'axis' || isArray(tooltipDataParams)) {\n return {\n color: borderColor || (this._renderMode === 'html' ? '#fff' : 'none')\n };\n }\n if (!isArray(tooltipDataParams)) {\n return {\n color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor\n };\n }\n };\n TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x,\n // Mouse x\n y,\n // Mouse y\n content, params, el) {\n var viewWidth = this._api.getWidth();\n var viewHeight = this._api.getHeight();\n positionExpr = positionExpr || tooltipModel.get('position');\n var contentSize = content.getSize();\n var align = tooltipModel.get('align');\n var vAlign = tooltipModel.get('verticalAlign');\n var rect = el && el.getBoundingRect().clone();\n el && rect.applyTransform(el.transform);\n if (isFunction(positionExpr)) {\n // Callback of position can be an array or a string specify the position\n positionExpr = positionExpr([x, y], params, content.el, rect, {\n viewSize: [viewWidth, viewHeight],\n contentSize: contentSize.slice()\n });\n }\n if (isArray(positionExpr)) {\n x = parsePercent(positionExpr[0], viewWidth);\n y = parsePercent(positionExpr[1], viewHeight);\n } else if (isObject(positionExpr)) {\n var boxLayoutPosition = positionExpr;\n boxLayoutPosition.width = contentSize[0];\n boxLayoutPosition.height = contentSize[1];\n var layoutRect = getLayoutRect(boxLayoutPosition, {\n width: viewWidth,\n height: viewHeight\n });\n x = layoutRect.x;\n y = layoutRect.y;\n align = null;\n // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n vAlign = null;\n }\n // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (isString(positionExpr) && el) {\n var pos = calcTooltipPosition(positionExpr, rect, contentSize, tooltipModel.get('borderWidth'));\n x = pos[0];\n y = pos[1];\n } else {\n var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20);\n x = pos[0];\n y = pos[1];\n }\n align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0);\n vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0);\n if (shouldTooltipConfine(tooltipModel)) {\n var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight);\n x = pos[0];\n y = pos[1];\n }\n content.moveTo(x, y);\n };\n // FIXME\n // Should we remove this but leave this to user?\n TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys, cbParamsList) {\n var lastCoordSys = this._lastDataByCoordSys;\n var lastCbParamsList = this._cbParamsList;\n var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length;\n contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {\n var lastDataByAxis = lastItemCoordSys.dataByAxis || [];\n var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};\n var thisDataByAxis = thisItemCoordSys.dataByAxis || [];\n contentNotChanged = contentNotChanged && lastDataByAxis.length === thisDataByAxis.length;\n contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {\n var thisItem = thisDataByAxis[indexAxis] || {};\n var lastIndices = lastItem.seriesDataIndices || [];\n var newIndices = thisItem.seriesDataIndices || [];\n contentNotChanged = contentNotChanged && lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length;\n contentNotChanged && each(lastIndices, function (lastIdxItem, j) {\n var newIdxItem = newIndices[j];\n contentNotChanged = contentNotChanged && lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex;\n });\n // check is cbParams data value changed\n lastCbParamsList && each(lastItem.seriesDataIndices, function (idxItem) {\n var seriesIdx = idxItem.seriesIndex;\n var cbParams = cbParamsList[seriesIdx];\n var lastCbParams = lastCbParamsList[seriesIdx];\n if (cbParams && lastCbParams && lastCbParams.data !== cbParams.data) {\n contentNotChanged = false;\n }\n });\n });\n });\n this._lastDataByCoordSys = dataByCoordSys;\n this._cbParamsList = cbParamsList;\n return !!contentNotChanged;\n };\n TooltipView.prototype._hide = function (dispatchAction) {\n // Do not directly hideLater here, because this behavior may be prevented\n // in dispatchAction when showTip is dispatched.\n // FIXME\n // duplicated hideTip if manuallyHideTip is called from dispatchAction.\n this._lastDataByCoordSys = null;\n dispatchAction({\n type: 'hideTip',\n from: this.uid\n });\n };\n TooltipView.prototype.dispose = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n clear(this, '_updatePosition');\n this._tooltipContent.dispose();\n globalListener.unregister('itemTooltip', api);\n };\n TooltipView.type = 'tooltip';\n return TooltipView;\n}(ComponentView);\n/**\n * From top to bottom. (the last one should be globalTooltipModel);\n */\nfunction buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) {\n // Last is always tooltip model.\n var ecModel = globalTooltipModel.ecModel;\n var resultModel;\n if (defaultTooltipOption) {\n resultModel = new Model(defaultTooltipOption, ecModel, ecModel);\n resultModel = new Model(globalTooltipModel.option, resultModel, ecModel);\n } else {\n resultModel = globalTooltipModel;\n }\n for (var i = modelCascade.length - 1; i >= 0; i--) {\n var tooltipOpt = modelCascade[i];\n if (tooltipOpt) {\n if (tooltipOpt instanceof Model) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n }\n // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n if (isString(tooltipOpt)) {\n tooltipOpt = {\n formatter: tooltipOpt\n };\n }\n if (tooltipOpt) {\n resultModel = new Model(tooltipOpt, resultModel, ecModel);\n }\n }\n }\n return resultModel;\n}\nfunction makeDispatchAction(payload, api) {\n return payload.dispatchAction || bind(api.dispatchAction, api);\n}\nfunction refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n if (gapH != null) {\n // Add extra 2 pixels for this case:\n // At present the \"values\" in default tooltip are using CSS `float: right`.\n // When the right edge of the tooltip box is on the right side of the\n // viewport, the `float` layout might push the \"values\" to the second line.\n if (x + width + gapH + 2 > viewWidth) {\n x -= width + gapH;\n } else {\n x += gapH;\n }\n }\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n } else {\n y += gapV;\n }\n }\n return [x, y];\n}\nfunction confineTooltipPosition(x, y, content, viewWidth, viewHeight) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n x = Math.min(x + width, viewWidth) - width;\n y = Math.min(y + height, viewHeight) - height;\n x = Math.max(x, 0);\n y = Math.max(y, 0);\n return [x, y];\n}\nfunction calcTooltipPosition(position, rect, contentSize, borderWidth) {\n var domWidth = contentSize[0];\n var domHeight = contentSize[1];\n var offset = Math.ceil(Math.SQRT2 * borderWidth) + 8;\n var x = 0;\n var y = 0;\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n switch (position) {\n case 'inside':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - offset;\n break;\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + offset;\n break;\n case 'left':\n x = rect.x - domWidth - offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'right':\n x = rect.x + rectWidth + offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n return [x, y];\n}\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\n}\n/**\n * Find target component by payload like:\n * ```js\n * { legendId: 'some_id', name: 'xxx' }\n * { toolboxIndex: 1, name: 'xxx' }\n * { geoName: 'some_name', name: 'xxx' }\n * ```\n * PENDING: at present only\n *\n * If not found, return null/undefined.\n */\nfunction findComponentReference(payload, ecModel, api) {\n var queryOptionMap = preParseFinder(payload).queryOptionMap;\n var componentMainType = queryOptionMap.keys()[0];\n if (!componentMainType || componentMainType === 'series') {\n return;\n }\n var queryResult = queryReferringComponents(ecModel, componentMainType, queryOptionMap.get(componentMainType), {\n useDefault: false,\n enableAll: false,\n enableNone: false\n });\n var model = queryResult.models[0];\n if (!model) {\n return;\n }\n var view = api.getViewOfComponentModel(model);\n var el;\n view.group.traverse(function (subEl) {\n var tooltipConfig = getECData(subEl).tooltipConfig;\n if (tooltipConfig && tooltipConfig.name === payload.name) {\n el = subEl;\n return true; // stop\n }\n });\n\n if (el) {\n return {\n componentMainType: componentMainType,\n componentIndex: model.componentIndex,\n el: el\n };\n }\n}\nexport default TooltipView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { install as installAxisPointer } from '../axisPointer/install.js';\nimport { use } from '../../extension.js';\nimport TooltipModel from './TooltipModel.js';\nimport TooltipView from './TooltipView.js';\nimport { noop } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n use(installAxisPointer);\n registers.registerComponentModel(TooltipModel);\n registers.registerComponentView(TooltipView);\n /**\n * @action\n * @property {string} type\n * @property {number} seriesIndex\n * @property {number} dataIndex\n * @property {number} [x]\n * @property {number} [y]\n */\n registers.registerAction({\n type: 'showTip',\n event: 'showTip',\n update: 'tooltip:manuallyShowTip'\n }, noop);\n registers.registerAction({\n type: 'hideTip',\n event: 'hideTip',\n update: 'tooltip:manuallyHideTip'\n }, noop);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { normalizeToArray } from '../../util/model.js';\nvar DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear'];\nexport default function brushPreprocessor(option, isNew) {\n var brushComponents = normalizeToArray(option ? option.brush : []);\n if (!brushComponents.length) {\n return;\n }\n var brushComponentSpecifiedBtns = [];\n zrUtil.each(brushComponents, function (brushOpt) {\n var tbs = brushOpt.hasOwnProperty('toolbox') ? brushOpt.toolbox : [];\n if (tbs instanceof Array) {\n brushComponentSpecifiedBtns = brushComponentSpecifiedBtns.concat(tbs);\n }\n });\n var toolbox = option && option.toolbox;\n if (zrUtil.isArray(toolbox)) {\n toolbox = toolbox[0];\n }\n if (!toolbox) {\n toolbox = {\n feature: {}\n };\n option.toolbox = [toolbox];\n }\n var toolboxFeature = toolbox.feature || (toolbox.feature = {});\n var toolboxBrush = toolboxFeature.brush || (toolboxFeature.brush = {});\n var brushTypes = toolboxBrush.type || (toolboxBrush.type = []);\n brushTypes.push.apply(brushTypes, brushComponentSpecifiedBtns);\n removeDuplicate(brushTypes);\n if (isNew && !brushTypes.length) {\n brushTypes.push.apply(brushTypes, DEFAULT_TOOLBOX_BTNS);\n }\n}\nfunction removeDuplicate(arr) {\n var map = {};\n zrUtil.each(arr, function (val) {\n map[val] = 1;\n });\n arr.length = 0;\n zrUtil.each(map, function (flag, val) {\n arr.push(val);\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * @file Visual solution, for consistent option specification.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapping from './VisualMapping.js';\nimport { getItemVisualFromData, setItemVisualFromData } from './helper.js';\nvar each = zrUtil.each;\nfunction hasKeys(obj) {\n if (obj) {\n for (var name_1 in obj) {\n if (obj.hasOwnProperty(name_1)) {\n return true;\n }\n }\n }\n}\nexport function createVisualMappings(option, stateList, supplementVisualOption) {\n var visualMappings = {};\n each(stateList, function (state) {\n var mappings = visualMappings[state] = createMappings();\n each(option[state], function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n var mappingOption = {\n type: visualType,\n visual: visualData\n };\n supplementVisualOption && supplementVisualOption(mappingOption, state);\n mappings[visualType] = new VisualMapping(mappingOption);\n // Prepare a alpha for opacity, for some case that opacity\n // is not supported, such as rendering using gradient color.\n if (visualType === 'opacity') {\n mappingOption = zrUtil.clone(mappingOption);\n mappingOption.type = 'colorAlpha';\n mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption);\n }\n });\n });\n return visualMappings;\n function createMappings() {\n var Creater = function () {};\n // Make sure hidden fields will not be visited by\n // object iteration (with hasOwnProperty checking).\n Creater.prototype.__hidden = Creater.prototype;\n var obj = new Creater();\n return obj;\n }\n}\nexport function replaceVisualOption(thisOption, newOption, keys) {\n // Visual attributes merge is not supported, otherwise it\n // brings overcomplicated merge logic. See #2853. So if\n // newOption has anyone of these keys, all of these keys\n // will be reset. Otherwise, all keys remain.\n var has;\n zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n has = true;\n }\n });\n has && zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n thisOption[key] = zrUtil.clone(newOption[key]);\n } else {\n delete thisOption[key];\n }\n });\n}\n/**\n * @param stateList\n * @param visualMappings\n * @param list\n * @param getValueState param: valueOrIndex, return: state.\n * @param scope Scope for getValueState\n * @param dimension Concrete dimension, if used.\n */\n// ???! handle brush?\nexport function applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n var dataIndex;\n function getVisual(key) {\n return getItemVisualFromData(data, dataIndex, key);\n }\n function setVisual(key, value) {\n setItemVisualFromData(data, dataIndex, key, value);\n }\n if (dimension == null) {\n data.each(eachItem);\n } else {\n data.each([dimension], eachItem);\n }\n function eachItem(valueOrIndex, index) {\n dataIndex = dimension == null ? valueOrIndex // First argument is index\n : index;\n var rawDataItem = data.getRawDataItem(dataIndex);\n // Consider performance\n // @ts-ignore\n if (rawDataItem && rawDataItem.visualMap === false) {\n return;\n }\n var valueState = getValueState.call(scope, valueOrIndex);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual);\n }\n }\n}\n/**\n * @param data\n * @param stateList\n * @param visualMappings >\n * @param getValueState param: valueOrIndex, return: state.\n * @param dim dimension or dimension index.\n */\nexport function incrementalApplyVisual(stateList, visualMappings, getValueState, dim) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n return {\n progress: function progress(params, data) {\n var dimIndex;\n if (dim != null) {\n dimIndex = data.getDimensionIndex(dim);\n }\n function getVisual(key) {\n return getItemVisualFromData(data, dataIndex, key);\n }\n function setVisual(key, value) {\n setItemVisualFromData(data, dataIndex, key, value);\n }\n var dataIndex;\n var store = data.getStore();\n while ((dataIndex = params.next()) != null) {\n var rawDataItem = data.getRawDataItem(dataIndex);\n // Consider performance\n // @ts-ignore\n if (rawDataItem && rawDataItem.visualMap === false) {\n continue;\n }\n var value = dim != null ? store.get(dimIndex, dataIndex) : dataIndex;\n var valueState = getValueState(value);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual);\n }\n }\n }\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as polygonContain from 'zrender/lib/contain/polygon.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport { linePolygonIntersect } from '../../util/graphic.js';\nexport function makeBrushCommonSelectorForSeries(area) {\n var brushType = area.brushType;\n // Do not use function binding or curry for performance.\n var selectors = {\n point: function (itemLayout) {\n return selector[brushType].point(itemLayout, selectors, area);\n },\n rect: function (itemLayout) {\n return selector[brushType].rect(itemLayout, selectors, area);\n }\n };\n return selectors;\n}\nvar selector = {\n lineX: getLineSelectors(0),\n lineY: getLineSelectors(1),\n rect: {\n point: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]);\n },\n rect: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.intersect(itemLayout);\n }\n },\n polygon: {\n point: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]) && polygonContain.contain(area.range, itemLayout[0], itemLayout[1]);\n },\n rect: function (itemLayout, selectors, area) {\n var points = area.range;\n if (!itemLayout || points.length <= 1) {\n return false;\n }\n var x = itemLayout.x;\n var y = itemLayout.y;\n var width = itemLayout.width;\n var height = itemLayout.height;\n var p = points[0];\n if (polygonContain.contain(points, x, y) || polygonContain.contain(points, x + width, y) || polygonContain.contain(points, x, y + height) || polygonContain.contain(points, x + width, y + height) || BoundingRect.create(itemLayout).contain(p[0], p[1]) || linePolygonIntersect(x, y, x + width, y, points) || linePolygonIntersect(x, y, x, y + height, points) || linePolygonIntersect(x + width, y, x + width, y + height, points) || linePolygonIntersect(x, y + height, x + width, y + height, points)) {\n return true;\n }\n }\n }\n};\nfunction getLineSelectors(xyIndex) {\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n return {\n point: function (itemLayout, selectors, area) {\n if (itemLayout) {\n var range = area.range;\n var p = itemLayout[xyIndex];\n return inLineRange(p, range);\n }\n },\n rect: function (itemLayout, selectors, area) {\n if (itemLayout) {\n var range = area.range;\n var layoutRange = [itemLayout[xy[xyIndex]], itemLayout[xy[xyIndex]] + itemLayout[wh[xyIndex]]];\n layoutRange[1] < layoutRange[0] && layoutRange.reverse();\n return inLineRange(layoutRange[0], range) || inLineRange(layoutRange[1], range) || inLineRange(range[0], layoutRange) || inLineRange(range[1], layoutRange);\n }\n }\n };\n}\nfunction inLineRange(p, range) {\n return range[0] <= p && p <= range[1];\n}\nexport default selector;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport { makeBrushCommonSelectorForSeries } from './selector.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport BrushTargetManager from '../helper/BrushTargetManager.js';\nvar STATE_LIST = ['inBrush', 'outOfBrush'];\nvar DISPATCH_METHOD = '__ecBrushSelect';\nvar DISPATCH_FLAG = '__ecInBrushSelectEvent';\n;\nexport function layoutCovers(ecModel) {\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel);\n brushTargetManager.setInputRanges(brushModel.areas, ecModel);\n });\n}\n/**\n * Register the visual encoding if this modules required.\n */\nexport default function brushVisual(ecModel, api, payload) {\n var brushSelected = [];\n var throttleType;\n var throttleDelay;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : {\n brushType: false\n });\n });\n layoutCovers(ecModel);\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel, brushIndex) {\n var thisBrushSelected = {\n brushId: brushModel.id,\n brushIndex: brushIndex,\n brushName: brushModel.name,\n areas: zrUtil.clone(brushModel.areas),\n selected: []\n };\n // Every brush component exists in event params, convenient\n // for user to find by index.\n brushSelected.push(thisBrushSelected);\n var brushOption = brushModel.option;\n var brushLink = brushOption.brushLink;\n var linkedSeriesMap = [];\n var selectedDataIndexForLink = [];\n var rangeInfoBySeries = [];\n var hasBrushExists = false;\n if (!brushIndex) {\n // Only the first throttle setting works.\n throttleType = brushOption.throttleType;\n throttleDelay = brushOption.throttleDelay;\n }\n // Add boundingRect and selectors to range.\n var areas = zrUtil.map(brushModel.areas, function (area) {\n var builder = boundingRectBuilders[area.brushType];\n var selectableArea = zrUtil.defaults({\n boundingRect: builder ? builder(area) : void 0\n }, area);\n selectableArea.selectors = makeBrushCommonSelectorForSeries(selectableArea);\n return selectableArea;\n });\n var visualMappings = visualSolution.createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) {\n mappingOption.mappingMethod = 'fixed';\n });\n zrUtil.isArray(brushLink) && zrUtil.each(brushLink, function (seriesIndex) {\n linkedSeriesMap[seriesIndex] = 1;\n });\n function linkOthers(seriesIndex) {\n return brushLink === 'all' || !!linkedSeriesMap[seriesIndex];\n }\n // If no supported brush or no brush on the series,\n // all visuals should be in original state.\n function brushed(rangeInfoList) {\n return !!rangeInfoList.length;\n }\n /**\n * Logic for each series: (If the logic has to be modified one day, do it carefully!)\n *\n * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord.\n * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck.\n * !brushed┘ └nothing.\n * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing.\n */\n // Step A\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var rangeInfoList = rangeInfoBySeries[seriesIndex] = [];\n seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex) : stepAOthers(seriesModel, seriesIndex, rangeInfoList);\n });\n function stepAParallel(seriesModel, seriesIndex) {\n var coordSys = seriesModel.coordinateSystem;\n hasBrushExists = hasBrushExists || coordSys.hasAxisBrushed();\n linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) {\n activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1);\n });\n }\n function stepAOthers(seriesModel, seriesIndex, rangeInfoList) {\n if (!seriesModel.brushSelector || brushModelNotControll(brushModel, seriesIndex)) {\n return;\n }\n zrUtil.each(areas, function (area) {\n if (brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel)) {\n rangeInfoList.push(area);\n }\n hasBrushExists = hasBrushExists || brushed(rangeInfoList);\n });\n if (linkOthers(seriesIndex) && brushed(rangeInfoList)) {\n var data_1 = seriesModel.getData();\n data_1.each(function (dataIndex) {\n if (checkInRange(seriesModel, rangeInfoList, data_1, dataIndex)) {\n selectedDataIndexForLink[dataIndex] = 1;\n }\n });\n }\n }\n // Step B\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var seriesBrushSelected = {\n seriesId: seriesModel.id,\n seriesIndex: seriesIndex,\n seriesName: seriesModel.name,\n dataIndex: []\n };\n // Every series exists in event params, convenient\n // for user to find series by seriesIndex.\n thisBrushSelected.selected.push(seriesBrushSelected);\n var rangeInfoList = rangeInfoBySeries[seriesIndex];\n var data = seriesModel.getData();\n var getValueState = linkOthers(seriesIndex) ? function (dataIndex) {\n return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n } : function (dataIndex) {\n return checkInRange(seriesModel, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n };\n // If no supported brush or no brush, all visuals are in original state.\n (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && visualSolution.applyVisual(STATE_LIST, visualMappings, data, getValueState);\n });\n });\n dispatchAction(api, throttleType, throttleDelay, brushSelected, payload);\n}\n;\nfunction dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) {\n // This event will not be triggered when `setOpion`, otherwise dead lock may\n // triggered when do `setOption` in event listener, which we do not find\n // satisfactory way to solve yet. Some considered resolutions:\n // (a) Diff with prevoius selected data ant only trigger event when changed.\n // But store previous data and diff precisely (i.e., not only by dataIndex, but\n // also detect value changes in selected data) might bring complexity or fragility.\n // (b) Use spectial param like `silent` to suppress event triggering.\n // But such kind of volatile param may be weird in `setOption`.\n if (!payload) {\n return;\n }\n var zr = api.getZr();\n if (zr[DISPATCH_FLAG]) {\n return;\n }\n if (!zr[DISPATCH_METHOD]) {\n zr[DISPATCH_METHOD] = doDispatch;\n }\n var fn = throttleUtil.createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType);\n fn(api, brushSelected);\n}\nfunction doDispatch(api, brushSelected) {\n if (!api.isDisposed()) {\n var zr = api.getZr();\n zr[DISPATCH_FLAG] = true;\n api.dispatchAction({\n type: 'brushSelect',\n batch: brushSelected\n });\n zr[DISPATCH_FLAG] = false;\n }\n}\nfunction checkInRange(seriesModel, rangeInfoList, data, dataIndex) {\n for (var i = 0, len = rangeInfoList.length; i < len; i++) {\n var area = rangeInfoList[i];\n if (seriesModel.brushSelector(dataIndex, data, area.selectors, area)) {\n return true;\n }\n }\n}\nfunction brushModelNotControll(brushModel, seriesIndex) {\n var seriesIndices = brushModel.option.seriesIndex;\n return seriesIndices != null && seriesIndices !== 'all' && (zrUtil.isArray(seriesIndices) ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices);\n}\nvar boundingRectBuilders = {\n rect: function (area) {\n return getBoundingRectFromMinMax(area.range);\n },\n polygon: function (area) {\n var minMax;\n var range = area.range;\n for (var i = 0, len = range.length; i < len; i++) {\n minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]];\n var rg = range[i];\n rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]);\n rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]);\n rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]);\n rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]);\n }\n return minMax && getBoundingRectFromMinMax(minMax);\n }\n};\nfunction getBoundingRectFromMinMax(minMax) {\n return new BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport BrushController from '../helper/BrushController.js';\nimport { layoutCovers } from './visualEncoding.js';\nimport ComponentView from '../../view/Component.js';\nvar BrushView = /** @class */function (_super) {\n __extends(BrushView, _super);\n function BrushView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BrushView.type;\n return _this;\n }\n BrushView.prototype.init = function (ecModel, api) {\n this.ecModel = ecModel;\n this.api = api;\n this.model;\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this)).mount();\n };\n BrushView.prototype.render = function (brushModel, ecModel, api, payload) {\n this.model = brushModel;\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateTransform = function (brushModel, ecModel, api, payload) {\n // PENDING: `updateTransform` is a little tricky, whose layout need\n // to be calculate mandatorily and other stages will not be performed.\n // Take care the correctness of the logic. See #11754 .\n layoutCovers(ecModel);\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateVisual = function (brushModel, ecModel, api, payload) {\n this.updateTransform(brushModel, ecModel, api, payload);\n };\n BrushView.prototype.updateView = function (brushModel, ecModel, api, payload) {\n this._updateController(brushModel, ecModel, api, payload);\n };\n BrushView.prototype._updateController = function (brushModel, ecModel, api, payload) {\n // Do not update controller when drawing.\n (!payload || payload.$from !== brushModel.id) && this._brushController.setPanels(brushModel.brushTargetManager.makePanelOpts(api)).enableBrush(brushModel.brushOption).updateCovers(brushModel.areas.slice());\n };\n // updateLayout: updateController,\n // updateVisual: updateController,\n BrushView.prototype.dispose = function () {\n this._brushController.dispose();\n };\n BrushView.prototype._onBrush = function (eventParam) {\n var modelId = this.model.id;\n var areas = this.model.brushTargetManager.setOutputRanges(eventParam.areas, this.ecModel);\n // Action is not dispatched on drag end, because the drag end\n // emits the same params with the last drag move event, and\n // may have some delay when using touch pad, which makes\n // animation not smooth (when using debounce).\n (!eventParam.isEnd || eventParam.removeOnClick) && this.api.dispatchAction({\n type: 'brush',\n brushId: modelId,\n areas: zrUtil.clone(areas),\n $from: modelId\n });\n eventParam.isEnd && this.api.dispatchAction({\n type: 'brushEnd',\n brushId: modelId,\n areas: zrUtil.clone(areas),\n $from: modelId\n });\n };\n BrushView.type = 'brush';\n return BrushView;\n}(ComponentView);\nexport default BrushView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport Model from '../../model/Model.js';\nimport ComponentModel from '../../model/Component.js';\nvar DEFAULT_OUT_OF_BRUSH_COLOR = '#ddd';\nvar BrushModel = /** @class */function (_super) {\n __extends(BrushModel, _super);\n function BrushModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BrushModel.type;\n /**\n * @readOnly\n */\n _this.areas = [];\n /**\n * Current brush painting area settings.\n * @readOnly\n */\n _this.brushOption = {};\n return _this;\n }\n BrushModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, ['inBrush', 'outOfBrush']);\n var inBrush = thisOption.inBrush = thisOption.inBrush || {};\n // Always give default visual, consider setOption at the second time.\n thisOption.outOfBrush = thisOption.outOfBrush || {\n color: DEFAULT_OUT_OF_BRUSH_COLOR\n };\n if (!inBrush.hasOwnProperty('liftZ')) {\n // Bigger than the highlight z lift, otherwise it will\n // be effected by the highlight z when brush.\n inBrush.liftZ = 5;\n }\n };\n /**\n * If `areas` is null/undefined, range state remain.\n */\n BrushModel.prototype.setAreas = function (areas) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(zrUtil.isArray(areas));\n zrUtil.each(areas, function (area) {\n zrUtil.assert(area.brushType, 'Illegal areas');\n });\n }\n // If areas is null/undefined, range state remain.\n // This helps user to dispatchAction({type: 'brush'}) with no areas\n // set but just want to get the current brush select info from a `brush` event.\n if (!areas) {\n return;\n }\n this.areas = zrUtil.map(areas, function (area) {\n return generateBrushOption(this.option, area);\n }, this);\n };\n /**\n * Set the current painting brush option.\n */\n BrushModel.prototype.setBrushOption = function (brushOption) {\n this.brushOption = generateBrushOption(this.option, brushOption);\n this.brushType = this.brushOption.brushType;\n };\n BrushModel.type = 'brush';\n BrushModel.dependencies = ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series'];\n BrushModel.defaultOption = {\n seriesIndex: 'all',\n brushType: 'rect',\n brushMode: 'single',\n transformable: true,\n brushStyle: {\n borderWidth: 1,\n color: 'rgba(210,219,238,0.3)',\n borderColor: '#D2DBEE'\n },\n throttleType: 'fixRate',\n throttleDelay: 0,\n removeOnClick: true,\n z: 10000\n };\n return BrushModel;\n}(ComponentModel);\nfunction generateBrushOption(option, brushOption) {\n return zrUtil.merge({\n brushType: option.brushType,\n brushMode: option.brushMode,\n transformable: option.transformable,\n brushStyle: new Model(option.brushStyle).getItemStyle(),\n removeOnClick: option.removeOnClick,\n z: option.z\n }, brushOption, true);\n}\nexport default BrushModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { ToolboxFeature } from '../featureManager.js';\nvar ICON_TYPES = ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear'];\nvar BrushFeature = /** @class */function (_super) {\n __extends(BrushFeature, _super);\n function BrushFeature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BrushFeature.prototype.render = function (featureModel, ecModel, api) {\n var brushType;\n var brushMode;\n var isBrushed;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n brushType = brushModel.brushType;\n brushMode = brushModel.brushOption.brushMode || 'single';\n isBrushed = isBrushed || !!brushModel.areas.length;\n });\n this._brushType = brushType;\n this._brushMode = brushMode;\n zrUtil.each(featureModel.get('type', true), function (type) {\n featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal');\n });\n };\n BrushFeature.prototype.updateView = function (featureModel, ecModel, api) {\n this.render(featureModel, ecModel, api);\n };\n BrushFeature.prototype.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon', true);\n var icons = {};\n zrUtil.each(model.get('type', true), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n };\n ;\n BrushFeature.prototype.onclick = function (ecModel, api, type) {\n var brushType = this._brushType;\n var brushMode = this._brushMode;\n if (type === 'clear') {\n // Trigger parallel action firstly\n api.dispatchAction({\n type: 'axisAreaSelect',\n intervals: []\n });\n api.dispatchAction({\n type: 'brush',\n command: 'clear',\n // Clear all areas of all brush components.\n areas: []\n });\n } else {\n api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: {\n brushType: type === 'keep' ? brushType : brushType === type ? false : type,\n brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode\n }\n });\n }\n };\n ;\n BrushFeature.getDefaultOption = function (ecModel) {\n var defaultOption = {\n show: true,\n type: ICON_TYPES.slice(),\n icon: {\n /* eslint-disable */\n 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',\n 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',\n 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',\n 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',\n 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',\n 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' // jshint ignore:line\n /* eslint-enable */\n },\n\n // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`\n title: ecModel.getLocaleModel().get(['toolbox', 'brush', 'title'])\n };\n return defaultOption;\n };\n return BrushFeature;\n}(ToolboxFeature);\nexport default BrushFeature;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport brushPreprocessor from './preprocessor.js';\nimport BrushView from './BrushView.js';\nimport BrushModel from './BrushModel.js';\nimport brushVisual from './visualEncoding.js';\n// TODO\nimport BrushFeature from '../toolbox/feature/Brush.js';\nimport { registerFeature } from '../toolbox/featureManager.js';\nimport { noop } from 'zrender/lib/core/util.js';\nexport function install(registers) {\n registers.registerComponentView(BrushView);\n registers.registerComponentModel(BrushModel);\n registers.registerPreprocessor(brushPreprocessor);\n registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, brushVisual);\n registers.registerAction({\n type: 'brush',\n event: 'brush',\n update: 'updateVisual'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'brush',\n query: payload\n }, function (brushModel) {\n brushModel.setAreas(payload.areas);\n });\n });\n /**\n * payload: {\n * brushComponents: [\n * {\n * brushId,\n * brushIndex,\n * brushName,\n * series: [\n * {\n * seriesId,\n * seriesIndex,\n * seriesName,\n * rawIndices: [21, 34, ...]\n * },\n * ...\n * ]\n * },\n * ...\n * ]\n * }\n */\n registers.registerAction({\n type: 'brushSelect',\n event: 'brushSelected',\n update: 'none'\n }, noop);\n registers.registerAction({\n type: 'brushEnd',\n event: 'brushEnd',\n update: 'none'\n }, noop);\n registerFeature('brush', BrushFeature);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport ComponentModel from '../../model/Component.js';\nimport ComponentView from '../../view/Component.js';\nimport { windowOpen } from '../../util/format.js';\nvar TitleModel = /** @class */function (_super) {\n __extends(TitleModel, _super);\n function TitleModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TitleModel.type;\n _this.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n return _this;\n }\n TitleModel.type = 'title';\n TitleModel.defaultOption = {\n // zlevel: 0,\n z: 6,\n show: true,\n text: '',\n target: 'blank',\n subtext: '',\n subtarget: 'blank',\n left: 0,\n top: 0,\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n textStyle: {\n fontSize: 18,\n fontWeight: 'bold',\n color: '#464646'\n },\n subtextStyle: {\n fontSize: 12,\n color: '#6E7079'\n }\n };\n return TitleModel;\n}(ComponentModel);\n// View\nvar TitleView = /** @class */function (_super) {\n __extends(TitleView, _super);\n function TitleView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TitleView.type;\n return _this;\n }\n TitleView.prototype.render = function (titleModel, ecModel, api) {\n this.group.removeAll();\n if (!titleModel.get('show')) {\n return;\n }\n var group = this.group;\n var textStyleModel = titleModel.getModel('textStyle');\n var subtextStyleModel = titleModel.getModel('subtextStyle');\n var textAlign = titleModel.get('textAlign');\n var textVerticalAlign = zrUtil.retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));\n var textEl = new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: titleModel.get('text'),\n fill: textStyleModel.getTextColor()\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var textRect = textEl.getBoundingRect();\n var subText = titleModel.get('subtext');\n var subTextEl = new graphic.Text({\n style: createTextStyle(subtextStyleModel, {\n text: subText,\n fill: subtextStyleModel.getTextColor(),\n y: textRect.height + titleModel.get('itemGap'),\n verticalAlign: 'top'\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var link = titleModel.get('link');\n var sublink = titleModel.get('sublink');\n var triggerEvent = titleModel.get('triggerEvent', true);\n textEl.silent = !link && !triggerEvent;\n subTextEl.silent = !sublink && !triggerEvent;\n if (link) {\n textEl.on('click', function () {\n windowOpen(link, '_' + titleModel.get('target'));\n });\n }\n if (sublink) {\n subTextEl.on('click', function () {\n windowOpen(sublink, '_' + titleModel.get('subtarget'));\n });\n }\n getECData(textEl).eventData = getECData(subTextEl).eventData = triggerEvent ? {\n componentType: 'title',\n componentIndex: titleModel.componentIndex\n } : null;\n group.add(textEl);\n subText && group.add(subTextEl);\n // If no subText, but add subTextEl, there will be an empty line.\n var groupRect = group.getBoundingRect();\n var layoutOption = titleModel.getBoxLayoutParams();\n layoutOption.width = groupRect.width;\n layoutOption.height = groupRect.height;\n var layoutRect = getLayoutRect(layoutOption, {\n width: api.getWidth(),\n height: api.getHeight()\n }, titleModel.get('padding'));\n // Adjust text align based on position\n if (!textAlign) {\n // Align left if title is on the left. center and right is same\n textAlign = titleModel.get('left') || titleModel.get('right');\n // @ts-ignore\n if (textAlign === 'middle') {\n textAlign = 'center';\n }\n // Adjust layout by text align\n if (textAlign === 'right') {\n layoutRect.x += layoutRect.width;\n } else if (textAlign === 'center') {\n layoutRect.x += layoutRect.width / 2;\n }\n }\n if (!textVerticalAlign) {\n textVerticalAlign = titleModel.get('top') || titleModel.get('bottom');\n // @ts-ignore\n if (textVerticalAlign === 'center') {\n textVerticalAlign = 'middle';\n }\n if (textVerticalAlign === 'bottom') {\n layoutRect.y += layoutRect.height;\n } else if (textVerticalAlign === 'middle') {\n layoutRect.y += layoutRect.height / 2;\n }\n textVerticalAlign = textVerticalAlign || 'top';\n }\n group.x = layoutRect.x;\n group.y = layoutRect.y;\n group.markRedraw();\n var alignStyle = {\n align: textAlign,\n verticalAlign: textVerticalAlign\n };\n textEl.setStyle(alignStyle);\n subTextEl.setStyle(alignStyle);\n // Render background\n // Get groupRect again because textAlign has been changed\n groupRect = group.getBoundingRect();\n var padding = layoutRect.margin;\n var style = titleModel.getItemStyle(['color', 'opacity']);\n style.fill = titleModel.get('backgroundColor');\n var rect = new graphic.Rect({\n shape: {\n x: groupRect.x - padding[3],\n y: groupRect.y - padding[0],\n width: groupRect.width + padding[1] + padding[3],\n height: groupRect.height + padding[0] + padding[2],\n r: titleModel.get('borderRadius')\n },\n style: style,\n subPixelOptimize: true,\n silent: true\n });\n group.add(rect);\n };\n TitleView.type = 'title';\n return TitleView;\n}(ComponentView);\nexport function install(registers) {\n registers.registerComponentModel(TitleModel);\n registers.registerComponentView(TitleView);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport { each, isObject, clone } from 'zrender/lib/core/util.js';\nimport { convertOptionIdName, getDataItemValue } from '../../util/model.js';\nvar TimelineModel = /** @class */function (_super) {\n __extends(TimelineModel, _super);\n function TimelineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TimelineModel.type;\n _this.layoutMode = 'box';\n return _this;\n }\n /**\n * @override\n */\n TimelineModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n this._initData();\n };\n /**\n * @override\n */\n TimelineModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n this._initData();\n };\n TimelineModel.prototype.setCurrentIndex = function (currentIndex) {\n if (currentIndex == null) {\n currentIndex = this.option.currentIndex;\n }\n var count = this._data.count();\n if (this.option.loop) {\n currentIndex = (currentIndex % count + count) % count;\n } else {\n currentIndex >= count && (currentIndex = count - 1);\n currentIndex < 0 && (currentIndex = 0);\n }\n this.option.currentIndex = currentIndex;\n };\n /**\n * @return {number} currentIndex\n */\n TimelineModel.prototype.getCurrentIndex = function () {\n return this.option.currentIndex;\n };\n /**\n * @return {boolean}\n */\n TimelineModel.prototype.isIndexMax = function () {\n return this.getCurrentIndex() >= this._data.count() - 1;\n };\n /**\n * @param {boolean} state true: play, false: stop\n */\n TimelineModel.prototype.setPlayState = function (state) {\n this.option.autoPlay = !!state;\n };\n /**\n * @return {boolean} true: play, false: stop\n */\n TimelineModel.prototype.getPlayState = function () {\n return !!this.option.autoPlay;\n };\n /**\n * @private\n */\n TimelineModel.prototype._initData = function () {\n var thisOption = this.option;\n var dataArr = thisOption.data || [];\n var axisType = thisOption.axisType;\n var names = this._names = [];\n var processedDataArr;\n if (axisType === 'category') {\n processedDataArr = [];\n each(dataArr, function (item, index) {\n var value = convertOptionIdName(getDataItemValue(item), '');\n var newItem;\n if (isObject(item)) {\n newItem = clone(item);\n newItem.value = index;\n } else {\n newItem = index;\n }\n processedDataArr.push(newItem);\n names.push(value);\n });\n } else {\n processedDataArr = dataArr;\n }\n var dimType = {\n category: 'ordinal',\n time: 'time',\n value: 'number'\n }[axisType] || 'number';\n var data = this._data = new SeriesData([{\n name: 'value',\n type: dimType\n }], this);\n data.initData(processedDataArr, names);\n };\n TimelineModel.prototype.getData = function () {\n return this._data;\n };\n /**\n * @public\n * @return {Array.} categoreis\n */\n TimelineModel.prototype.getCategories = function () {\n if (this.get('axisType') === 'category') {\n return this._names.slice();\n }\n };\n TimelineModel.type = 'timeline';\n /**\n * @protected\n */\n TimelineModel.defaultOption = {\n // zlevel: 0, // 一级层叠\n z: 4,\n show: true,\n axisType: 'time',\n realtime: true,\n left: '20%',\n top: null,\n right: '20%',\n bottom: 0,\n width: null,\n height: 40,\n padding: 5,\n controlPosition: 'left',\n autoPlay: false,\n rewind: false,\n loop: true,\n playInterval: 2000,\n currentIndex: 0,\n itemStyle: {},\n label: {\n color: '#000'\n },\n data: []\n };\n return TimelineModel;\n}(ComponentModel);\nexport default TimelineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport TimelineModel from './TimelineModel.js';\nimport { DataFormatMixin } from '../../model/mixin/dataFormat.js';\nimport { mixin } from 'zrender/lib/core/util.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar SliderTimelineModel = /** @class */function (_super) {\n __extends(SliderTimelineModel, _super);\n function SliderTimelineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderTimelineModel.type;\n return _this;\n }\n SliderTimelineModel.type = 'timeline.slider';\n /**\n * @protected\n */\n SliderTimelineModel.defaultOption = inheritDefaultOption(TimelineModel.defaultOption, {\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderWidth: 0,\n orient: 'horizontal',\n inverse: false,\n tooltip: {\n trigger: 'item' // data item may also have tootip attr.\n },\n\n symbol: 'circle',\n symbolSize: 12,\n lineStyle: {\n show: true,\n width: 2,\n color: '#DAE1F5'\n },\n label: {\n position: 'auto',\n // When using number, label position is not\n // restricted by viewRect.\n // positive: right/bottom, negative: left/top\n show: true,\n interval: 'auto',\n rotate: 0,\n // formatter: null,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#A4B1D7'\n },\n itemStyle: {\n color: '#A4B1D7',\n borderWidth: 1\n },\n checkpointStyle: {\n symbol: 'circle',\n symbolSize: 15,\n color: '#316bf3',\n borderColor: '#fff',\n borderWidth: 2,\n shadowBlur: 2,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0, 0, 0, 0.3)',\n // borderColor: 'rgba(194,53,49, 0.5)',\n animation: true,\n animationDuration: 300,\n animationEasing: 'quinticInOut'\n },\n controlStyle: {\n show: true,\n showPlayBtn: true,\n showPrevBtn: true,\n showNextBtn: true,\n itemSize: 24,\n itemGap: 12,\n position: 'left',\n playIcon: 'path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z',\n stopIcon: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',\n // eslint-disable-next-line max-len\n nextIcon: 'M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z',\n // eslint-disable-next-line max-len\n prevIcon: 'M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z',\n prevBtnSize: 18,\n nextBtnSize: 18,\n color: '#A4B1D7',\n borderColor: '#A4B1D7',\n borderWidth: 1\n },\n emphasis: {\n label: {\n show: true,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#6f778d'\n },\n itemStyle: {\n color: '#316BF3'\n },\n controlStyle: {\n color: '#316BF3',\n borderColor: '#316BF3',\n borderWidth: 2\n }\n },\n progress: {\n lineStyle: {\n color: '#316BF3'\n },\n itemStyle: {\n color: '#316BF3'\n },\n label: {\n color: '#6f778d'\n }\n },\n data: []\n });\n return SliderTimelineModel;\n}(TimelineModel);\nmixin(SliderTimelineModel, DataFormatMixin.prototype);\nexport default SliderTimelineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nvar TimelineView = /** @class */function (_super) {\n __extends(TimelineView, _super);\n function TimelineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TimelineView.type;\n return _this;\n }\n TimelineView.type = 'timeline';\n return TimelineView;\n}(ComponentView);\nexport default TimelineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport Axis from '../../coord/Axis.js';\n/**\n * Extend axis 2d\n */\nvar TimelineAxis = /** @class */function (_super) {\n __extends(TimelineAxis, _super);\n function TimelineAxis(dim, scale, coordExtent, axisType) {\n var _this = _super.call(this, dim, scale, coordExtent) || this;\n _this.type = axisType || 'value';\n return _this;\n }\n /**\n * @override\n */\n TimelineAxis.prototype.getLabelModel = function () {\n // Force override\n return this.model.getModel('label');\n };\n /**\n * @override\n */\n TimelineAxis.prototype.isHorizontal = function () {\n return this.model.get('orient') === 'horizontal';\n };\n return TimelineAxis;\n}(Axis);\nexport default TimelineAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport * as layout from '../../util/layout.js';\nimport TimelineView from './TimelineView.js';\nimport TimelineAxis from './TimelineAxis.js';\nimport { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as numberUtil from '../../util/number.js';\nimport { merge, each, extend, isString, bind, defaults, retrieve2 } from 'zrender/lib/core/util.js';\nimport OrdinalScale from '../../scale/Ordinal.js';\nimport TimeScale from '../../scale/Time.js';\nimport IntervalScale from '../../scale/Interval.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nimport { makeInner } from '../../util/model.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { createTooltipMarkup } from '../tooltip/tooltipMarkup.js';\nvar PI = Math.PI;\nvar labelDataIndexStore = makeInner();\nvar SliderTimelineView = /** @class */function (_super) {\n __extends(SliderTimelineView, _super);\n function SliderTimelineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderTimelineView.type;\n return _this;\n }\n SliderTimelineView.prototype.init = function (ecModel, api) {\n this.api = api;\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.render = function (timelineModel, ecModel, api) {\n this.model = timelineModel;\n this.api = api;\n this.ecModel = ecModel;\n this.group.removeAll();\n if (timelineModel.get('show', true)) {\n var layoutInfo_1 = this._layout(timelineModel, api);\n var mainGroup_1 = this._createGroup('_mainGroup');\n var labelGroup = this._createGroup('_labelGroup');\n var axis_1 = this._axis = this._createAxis(layoutInfo_1, timelineModel);\n timelineModel.formatTooltip = function (dataIndex) {\n var name = axis_1.scale.getLabel({\n value: dataIndex\n });\n return createTooltipMarkup('nameValue', {\n noName: true,\n value: name\n });\n };\n each(['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'], function (name) {\n this['_render' + name](layoutInfo_1, mainGroup_1, axis_1, timelineModel);\n }, this);\n this._renderAxisLabel(layoutInfo_1, labelGroup, axis_1, timelineModel);\n this._position(layoutInfo_1, timelineModel);\n }\n this._doPlayStop();\n this._updateTicksStatus();\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.remove = function () {\n this._clearTimer();\n this.group.removeAll();\n };\n /**\n * @override\n */\n SliderTimelineView.prototype.dispose = function () {\n this._clearTimer();\n };\n SliderTimelineView.prototype._layout = function (timelineModel, api) {\n var labelPosOpt = timelineModel.get(['label', 'position']);\n var orient = timelineModel.get('orient');\n var viewRect = getViewRect(timelineModel, api);\n var parsedLabelPos;\n // Auto label offset.\n if (labelPosOpt == null || labelPosOpt === 'auto') {\n parsedLabelPos = orient === 'horizontal' ? viewRect.y + viewRect.height / 2 < api.getHeight() / 2 ? '-' : '+' : viewRect.x + viewRect.width / 2 < api.getWidth() / 2 ? '+' : '-';\n } else if (isString(labelPosOpt)) {\n parsedLabelPos = {\n horizontal: {\n top: '-',\n bottom: '+'\n },\n vertical: {\n left: '-',\n right: '+'\n }\n }[orient][labelPosOpt];\n } else {\n // is number\n parsedLabelPos = labelPosOpt;\n }\n var labelAlignMap = {\n horizontal: 'center',\n vertical: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'left' : 'right'\n };\n var labelBaselineMap = {\n horizontal: parsedLabelPos >= 0 || parsedLabelPos === '+' ? 'top' : 'bottom',\n vertical: 'middle'\n };\n var rotationMap = {\n horizontal: 0,\n vertical: PI / 2\n };\n // Position\n var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width;\n var controlModel = timelineModel.getModel('controlStyle');\n var showControl = controlModel.get('show', true);\n var controlSize = showControl ? controlModel.get('itemSize') : 0;\n var controlGap = showControl ? controlModel.get('itemGap') : 0;\n var sizePlusGap = controlSize + controlGap;\n // Special label rotate.\n var labelRotation = timelineModel.get(['label', 'rotate']) || 0;\n labelRotation = labelRotation * PI / 180; // To radian.\n var playPosition;\n var prevBtnPosition;\n var nextBtnPosition;\n var controlPosition = controlModel.get('position', true);\n var showPlayBtn = showControl && controlModel.get('showPlayBtn', true);\n var showPrevBtn = showControl && controlModel.get('showPrevBtn', true);\n var showNextBtn = showControl && controlModel.get('showNextBtn', true);\n var xLeft = 0;\n var xRight = mainLength;\n // position[0] means left, position[1] means middle.\n if (controlPosition === 'left' || controlPosition === 'bottom') {\n showPlayBtn && (playPosition = [0, 0], xLeft += sizePlusGap);\n showPrevBtn && (prevBtnPosition = [xLeft, 0], xLeft += sizePlusGap);\n showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n } else {\n // 'top' 'right'\n showPlayBtn && (playPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n showPrevBtn && (prevBtnPosition = [0, 0], xLeft += sizePlusGap);\n showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n }\n var axisExtent = [xLeft, xRight];\n if (timelineModel.get('inverse')) {\n axisExtent.reverse();\n }\n return {\n viewRect: viewRect,\n mainLength: mainLength,\n orient: orient,\n rotation: rotationMap[orient],\n labelRotation: labelRotation,\n labelPosOpt: parsedLabelPos,\n labelAlign: timelineModel.get(['label', 'align']) || labelAlignMap[orient],\n labelBaseline: timelineModel.get(['label', 'verticalAlign']) || timelineModel.get(['label', 'baseline']) || labelBaselineMap[orient],\n // Based on mainGroup.\n playPosition: playPosition,\n prevBtnPosition: prevBtnPosition,\n nextBtnPosition: nextBtnPosition,\n axisExtent: axisExtent,\n controlSize: controlSize,\n controlGap: controlGap\n };\n };\n SliderTimelineView.prototype._position = function (layoutInfo, timelineModel) {\n // Position is be called finally, because bounding rect is needed for\n // adapt content to fill viewRect (auto adapt offset).\n // Timeline may be not all in the viewRect when 'offset' is specified\n // as a number, because it is more appropriate that label aligns at\n // 'offset' but not the other edge defined by viewRect.\n var mainGroup = this._mainGroup;\n var labelGroup = this._labelGroup;\n var viewRect = layoutInfo.viewRect;\n if (layoutInfo.orient === 'vertical') {\n // transform to horizontal, inverse rotate by left-top point.\n var m = matrix.create();\n var rotateOriginX = viewRect.x;\n var rotateOriginY = viewRect.y + viewRect.height;\n matrix.translate(m, m, [-rotateOriginX, -rotateOriginY]);\n matrix.rotate(m, m, -PI / 2);\n matrix.translate(m, m, [rotateOriginX, rotateOriginY]);\n viewRect = viewRect.clone();\n viewRect.applyTransform(m);\n }\n var viewBound = getBound(viewRect);\n var mainBound = getBound(mainGroup.getBoundingRect());\n var labelBound = getBound(labelGroup.getBoundingRect());\n var mainPosition = [mainGroup.x, mainGroup.y];\n var labelsPosition = [labelGroup.x, labelGroup.y];\n labelsPosition[0] = mainPosition[0] = viewBound[0][0];\n var labelPosOpt = layoutInfo.labelPosOpt;\n if (labelPosOpt == null || isString(labelPosOpt)) {\n // '+' or '-'\n var mainBoundIdx = labelPosOpt === '+' ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx);\n } else {\n var mainBoundIdx = labelPosOpt >= 0 ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n labelsPosition[1] = mainPosition[1] + labelPosOpt;\n }\n mainGroup.setPosition(mainPosition);\n labelGroup.setPosition(labelsPosition);\n mainGroup.rotation = labelGroup.rotation = layoutInfo.rotation;\n setOrigin(mainGroup);\n setOrigin(labelGroup);\n function setOrigin(targetGroup) {\n targetGroup.originX = viewBound[0][0] - targetGroup.x;\n targetGroup.originY = viewBound[1][0] - targetGroup.y;\n }\n function getBound(rect) {\n // [[xmin, xmax], [ymin, ymax]]\n return [[rect.x, rect.x + rect.width], [rect.y, rect.y + rect.height]];\n }\n function toBound(fromPos, from, to, dimIdx, boundIdx) {\n fromPos[dimIdx] += to[dimIdx][boundIdx] - from[dimIdx][boundIdx];\n }\n };\n SliderTimelineView.prototype._createAxis = function (layoutInfo, timelineModel) {\n var data = timelineModel.getData();\n var axisType = timelineModel.get('axisType');\n var scale = createScaleByModel(timelineModel, axisType);\n // Customize scale. The `tickValue` is `dataIndex`.\n scale.getTicks = function () {\n return data.mapArray(['value'], function (value) {\n return {\n value: value\n };\n });\n };\n var dataExtent = data.getDataExtent('value');\n scale.setExtent(dataExtent[0], dataExtent[1]);\n scale.calcNiceTicks();\n var axis = new TimelineAxis('value', scale, layoutInfo.axisExtent, axisType);\n axis.model = timelineModel;\n return axis;\n };\n SliderTimelineView.prototype._createGroup = function (key) {\n var newGroup = this[key] = new graphic.Group();\n this.group.add(newGroup);\n return newGroup;\n };\n SliderTimelineView.prototype._renderAxisLine = function (layoutInfo, group, axis, timelineModel) {\n var axisExtent = axis.getExtent();\n if (!timelineModel.get(['lineStyle', 'show'])) {\n return;\n }\n var line = new graphic.Line({\n shape: {\n x1: axisExtent[0],\n y1: 0,\n x2: axisExtent[1],\n y2: 0\n },\n style: extend({\n lineCap: 'round'\n }, timelineModel.getModel('lineStyle').getLineStyle()),\n silent: true,\n z2: 1\n });\n group.add(line);\n var progressLine = this._progressLine = new graphic.Line({\n shape: {\n x1: axisExtent[0],\n x2: this._currentPointer ? this._currentPointer.x : axisExtent[0],\n y1: 0,\n y2: 0\n },\n style: defaults({\n lineCap: 'round',\n lineWidth: line.style.lineWidth\n }, timelineModel.getModel(['progress', 'lineStyle']).getLineStyle()),\n silent: true,\n z2: 1\n });\n group.add(progressLine);\n };\n SliderTimelineView.prototype._renderAxisTick = function (layoutInfo, group, axis, timelineModel) {\n var _this = this;\n var data = timelineModel.getData();\n // Show all ticks, despite ignoring strategy.\n var ticks = axis.scale.getTicks();\n this._tickSymbols = [];\n // The value is dataIndex, see the customized scale.\n each(ticks, function (tick) {\n var tickCoord = axis.dataToCoord(tick.value);\n var itemModel = data.getItemModel(tick.value);\n var itemStyleModel = itemModel.getModel('itemStyle');\n var hoverStyleModel = itemModel.getModel(['emphasis', 'itemStyle']);\n var progressStyleModel = itemModel.getModel(['progress', 'itemStyle']);\n var symbolOpt = {\n x: tickCoord,\n y: 0,\n onclick: bind(_this._changeTimeline, _this, tick.value)\n };\n var el = giveSymbol(itemModel, itemStyleModel, group, symbolOpt);\n el.ensureState('emphasis').style = hoverStyleModel.getItemStyle();\n el.ensureState('progress').style = progressStyleModel.getItemStyle();\n enableHoverEmphasis(el);\n var ecData = getECData(el);\n if (itemModel.get('tooltip')) {\n ecData.dataIndex = tick.value;\n ecData.dataModel = timelineModel;\n } else {\n ecData.dataIndex = ecData.dataModel = null;\n }\n _this._tickSymbols.push(el);\n });\n };\n SliderTimelineView.prototype._renderAxisLabel = function (layoutInfo, group, axis, timelineModel) {\n var _this = this;\n var labelModel = axis.getLabelModel();\n if (!labelModel.get('show')) {\n return;\n }\n var data = timelineModel.getData();\n var labels = axis.getViewLabels();\n this._tickLabels = [];\n each(labels, function (labelItem) {\n // The tickValue is dataIndex, see the customized scale.\n var dataIndex = labelItem.tickValue;\n var itemModel = data.getItemModel(dataIndex);\n var normalLabelModel = itemModel.getModel('label');\n var hoverLabelModel = itemModel.getModel(['emphasis', 'label']);\n var progressLabelModel = itemModel.getModel(['progress', 'label']);\n var tickCoord = axis.dataToCoord(labelItem.tickValue);\n var textEl = new graphic.Text({\n x: tickCoord,\n y: 0,\n rotation: layoutInfo.labelRotation - layoutInfo.rotation,\n onclick: bind(_this._changeTimeline, _this, dataIndex),\n silent: false,\n style: createTextStyle(normalLabelModel, {\n text: labelItem.formattedLabel,\n align: layoutInfo.labelAlign,\n verticalAlign: layoutInfo.labelBaseline\n })\n });\n textEl.ensureState('emphasis').style = createTextStyle(hoverLabelModel);\n textEl.ensureState('progress').style = createTextStyle(progressLabelModel);\n group.add(textEl);\n enableHoverEmphasis(textEl);\n labelDataIndexStore(textEl).dataIndex = dataIndex;\n _this._tickLabels.push(textEl);\n });\n };\n SliderTimelineView.prototype._renderControl = function (layoutInfo, group, axis, timelineModel) {\n var controlSize = layoutInfo.controlSize;\n var rotation = layoutInfo.rotation;\n var itemStyle = timelineModel.getModel('controlStyle').getItemStyle();\n var hoverStyle = timelineModel.getModel(['emphasis', 'controlStyle']).getItemStyle();\n var playState = timelineModel.getPlayState();\n var inverse = timelineModel.get('inverse', true);\n makeBtn(layoutInfo.nextBtnPosition, 'next', bind(this._changeTimeline, this, inverse ? '-' : '+'));\n makeBtn(layoutInfo.prevBtnPosition, 'prev', bind(this._changeTimeline, this, inverse ? '+' : '-'));\n makeBtn(layoutInfo.playPosition, playState ? 'stop' : 'play', bind(this._handlePlayClick, this, !playState), true);\n function makeBtn(position, iconName, onclick, willRotate) {\n if (!position) {\n return;\n }\n var iconSize = parsePercent(retrieve2(timelineModel.get(['controlStyle', iconName + 'BtnSize']), controlSize), controlSize);\n var rect = [0, -iconSize / 2, iconSize, iconSize];\n var btn = makeControlIcon(timelineModel, iconName + 'Icon', rect, {\n x: position[0],\n y: position[1],\n originX: controlSize / 2,\n originY: 0,\n rotation: willRotate ? -rotation : 0,\n rectHover: true,\n style: itemStyle,\n onclick: onclick\n });\n btn.ensureState('emphasis').style = hoverStyle;\n group.add(btn);\n enableHoverEmphasis(btn);\n }\n };\n SliderTimelineView.prototype._renderCurrentPointer = function (layoutInfo, group, axis, timelineModel) {\n var data = timelineModel.getData();\n var currentIndex = timelineModel.getCurrentIndex();\n var pointerModel = data.getItemModel(currentIndex).getModel('checkpointStyle');\n var me = this;\n var callback = {\n onCreate: function (pointer) {\n pointer.draggable = true;\n pointer.drift = bind(me._handlePointerDrag, me);\n pointer.ondragend = bind(me._handlePointerDragend, me);\n pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel, true);\n },\n onUpdate: function (pointer) {\n pointerMoveTo(pointer, me._progressLine, currentIndex, axis, timelineModel);\n }\n };\n // Reuse when exists, for animation and drag.\n this._currentPointer = giveSymbol(pointerModel, pointerModel, this._mainGroup, {}, this._currentPointer, callback);\n };\n SliderTimelineView.prototype._handlePlayClick = function (nextState) {\n this._clearTimer();\n this.api.dispatchAction({\n type: 'timelinePlayChange',\n playState: nextState,\n from: this.uid\n });\n };\n SliderTimelineView.prototype._handlePointerDrag = function (dx, dy, e) {\n this._clearTimer();\n this._pointerChangeTimeline([e.offsetX, e.offsetY]);\n };\n SliderTimelineView.prototype._handlePointerDragend = function (e) {\n this._pointerChangeTimeline([e.offsetX, e.offsetY], true);\n };\n SliderTimelineView.prototype._pointerChangeTimeline = function (mousePos, trigger) {\n var toCoord = this._toAxisCoord(mousePos)[0];\n var axis = this._axis;\n var axisExtent = numberUtil.asc(axis.getExtent().slice());\n toCoord > axisExtent[1] && (toCoord = axisExtent[1]);\n toCoord < axisExtent[0] && (toCoord = axisExtent[0]);\n this._currentPointer.x = toCoord;\n this._currentPointer.markRedraw();\n var progressLine = this._progressLine;\n if (progressLine) {\n progressLine.shape.x2 = toCoord;\n progressLine.dirty();\n }\n var targetDataIndex = this._findNearestTick(toCoord);\n var timelineModel = this.model;\n if (trigger || targetDataIndex !== timelineModel.getCurrentIndex() && timelineModel.get('realtime')) {\n this._changeTimeline(targetDataIndex);\n }\n };\n SliderTimelineView.prototype._doPlayStop = function () {\n var _this = this;\n this._clearTimer();\n if (this.model.getPlayState()) {\n this._timer = setTimeout(function () {\n // Do not cache\n var timelineModel = _this.model;\n _this._changeTimeline(timelineModel.getCurrentIndex() + (timelineModel.get('rewind', true) ? -1 : 1));\n }, this.model.get('playInterval'));\n }\n };\n SliderTimelineView.prototype._toAxisCoord = function (vertex) {\n var trans = this._mainGroup.getLocalTransform();\n return graphic.applyTransform(vertex, trans, true);\n };\n SliderTimelineView.prototype._findNearestTick = function (axisCoord) {\n var data = this.model.getData();\n var dist = Infinity;\n var targetDataIndex;\n var axis = this._axis;\n data.each(['value'], function (value, dataIndex) {\n var coord = axis.dataToCoord(value);\n var d = Math.abs(coord - axisCoord);\n if (d < dist) {\n dist = d;\n targetDataIndex = dataIndex;\n }\n });\n return targetDataIndex;\n };\n SliderTimelineView.prototype._clearTimer = function () {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n };\n SliderTimelineView.prototype._changeTimeline = function (nextIndex) {\n var currentIndex = this.model.getCurrentIndex();\n if (nextIndex === '+') {\n nextIndex = currentIndex + 1;\n } else if (nextIndex === '-') {\n nextIndex = currentIndex - 1;\n }\n this.api.dispatchAction({\n type: 'timelineChange',\n currentIndex: nextIndex,\n from: this.uid\n });\n };\n SliderTimelineView.prototype._updateTicksStatus = function () {\n var currentIndex = this.model.getCurrentIndex();\n var tickSymbols = this._tickSymbols;\n var tickLabels = this._tickLabels;\n if (tickSymbols) {\n for (var i = 0; i < tickSymbols.length; i++) {\n tickSymbols && tickSymbols[i] && tickSymbols[i].toggleState('progress', i < currentIndex);\n }\n }\n if (tickLabels) {\n for (var i = 0; i < tickLabels.length; i++) {\n tickLabels && tickLabels[i] && tickLabels[i].toggleState('progress', labelDataIndexStore(tickLabels[i]).dataIndex <= currentIndex);\n }\n }\n };\n SliderTimelineView.type = 'timeline.slider';\n return SliderTimelineView;\n}(TimelineView);\nfunction createScaleByModel(model, axisType) {\n axisType = axisType || model.get('type');\n if (axisType) {\n switch (axisType) {\n // Buildin scale\n case 'category':\n return new OrdinalScale({\n ordinalMeta: model.getCategories(),\n extent: [Infinity, -Infinity]\n });\n case 'time':\n return new TimeScale({\n locale: model.ecModel.getLocaleModel(),\n useUTC: model.ecModel.get('useUTC')\n });\n default:\n // default to be value\n return new IntervalScale();\n }\n }\n}\nfunction getViewRect(model, api) {\n return layout.getLayoutRect(model.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n }, model.get('padding'));\n}\nfunction makeControlIcon(timelineModel, objPath, rect, opts) {\n var style = opts.style;\n var icon = graphic.createIcon(timelineModel.get(['controlStyle', objPath]), opts || {}, new BoundingRect(rect[0], rect[1], rect[2], rect[3]));\n // TODO createIcon won't use style in opt.\n if (style) {\n icon.setStyle(style);\n }\n return icon;\n}\n/**\n * Create symbol or update symbol\n * opt: basic position and event handlers\n */\nfunction giveSymbol(hostModel, itemStyleModel, group, opt, symbol, callback) {\n var color = itemStyleModel.get('color');\n if (!symbol) {\n var symbolType = hostModel.get('symbol');\n symbol = createSymbol(symbolType, -1, -1, 2, 2, color);\n symbol.setStyle('strokeNoScale', true);\n group.add(symbol);\n callback && callback.onCreate(symbol);\n } else {\n symbol.setColor(color);\n group.add(symbol); // Group may be new, also need to add.\n callback && callback.onUpdate(symbol);\n }\n // Style\n var itemStyle = itemStyleModel.getItemStyle(['color']);\n symbol.setStyle(itemStyle);\n // Transform and events.\n opt = merge({\n rectHover: true,\n z2: 100\n }, opt, true);\n var symbolSize = normalizeSymbolSize(hostModel.get('symbolSize'));\n opt.scaleX = symbolSize[0] / 2;\n opt.scaleY = symbolSize[1] / 2;\n var symbolOffset = normalizeSymbolOffset(hostModel.get('symbolOffset'), symbolSize);\n if (symbolOffset) {\n opt.x = (opt.x || 0) + symbolOffset[0];\n opt.y = (opt.y || 0) + symbolOffset[1];\n }\n var symbolRotate = hostModel.get('symbolRotate');\n opt.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n symbol.attr(opt);\n // FIXME\n // (1) When symbol.style.strokeNoScale is true and updateTransform is not performed,\n // getBoundingRect will return wrong result.\n // (This is supposed to be resolved in zrender, but it is a little difficult to\n // leverage performance and auto updateTransform)\n // (2) All of ancesters of symbol do not scale, so we can just updateTransform symbol.\n symbol.updateTransform();\n return symbol;\n}\nfunction pointerMoveTo(pointer, progressLine, dataIndex, axis, timelineModel, noAnimation) {\n if (pointer.dragging) {\n return;\n }\n var pointerModel = timelineModel.getModel('checkpointStyle');\n var toCoord = axis.dataToCoord(timelineModel.getData().get('value', dataIndex));\n if (noAnimation || !pointerModel.get('animation', true)) {\n pointer.attr({\n x: toCoord,\n y: 0\n });\n progressLine && progressLine.attr({\n shape: {\n x2: toCoord\n }\n });\n } else {\n var animationCfg = {\n duration: pointerModel.get('animationDuration', true),\n easing: pointerModel.get('animationEasing', true)\n };\n pointer.stopAnimation(null, true);\n pointer.animateTo({\n x: toCoord,\n y: 0\n }, animationCfg);\n progressLine && progressLine.animateTo({\n shape: {\n x2: toCoord\n }\n }, animationCfg);\n }\n}\nexport default SliderTimelineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { defaults } from 'zrender/lib/core/util.js';\nexport function installTimelineAction(registers) {\n registers.registerAction({\n type: 'timelineChange',\n event: 'timelineChanged',\n update: 'prepareAndUpdate'\n }, function (payload, ecModel, api) {\n var timelineModel = ecModel.getComponent('timeline');\n if (timelineModel && payload.currentIndex != null) {\n timelineModel.setCurrentIndex(payload.currentIndex);\n if (!timelineModel.get('loop', true) && timelineModel.isIndexMax() && timelineModel.getPlayState()) {\n timelineModel.setPlayState(false);\n // The timeline has played to the end, trigger event\n api.dispatchAction({\n type: 'timelinePlayChange',\n playState: false,\n from: payload.from\n });\n }\n }\n // Set normalized currentIndex to payload.\n ecModel.resetOption('timeline', {\n replaceMerge: timelineModel.get('replaceMerge', true)\n });\n return defaults({\n currentIndex: timelineModel.option.currentIndex\n }, payload);\n });\n registers.registerAction({\n type: 'timelinePlayChange',\n event: 'timelinePlayChanged',\n update: 'update'\n }, function (payload, ecModel) {\n var timelineModel = ecModel.getComponent('timeline');\n if (timelineModel && payload.playState != null) {\n timelineModel.setPlayState(payload.playState);\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function timelinePreprocessor(option) {\n var timelineOpt = option && option.timeline;\n if (!zrUtil.isArray(timelineOpt)) {\n timelineOpt = timelineOpt ? [timelineOpt] : [];\n }\n zrUtil.each(timelineOpt, function (opt) {\n if (!opt) {\n return;\n }\n compatibleEC2(opt);\n });\n}\nfunction compatibleEC2(opt) {\n var type = opt.type;\n var ec2Types = {\n 'number': 'value',\n 'time': 'time'\n };\n // Compatible with ec2\n if (ec2Types[type]) {\n opt.axisType = ec2Types[type];\n delete opt.type;\n }\n transferItem(opt);\n if (has(opt, 'controlPosition')) {\n var controlStyle = opt.controlStyle || (opt.controlStyle = {});\n if (!has(controlStyle, 'position')) {\n controlStyle.position = opt.controlPosition;\n }\n if (controlStyle.position === 'none' && !has(controlStyle, 'show')) {\n controlStyle.show = false;\n delete controlStyle.position;\n }\n delete opt.controlPosition;\n }\n zrUtil.each(opt.data || [], function (dataItem) {\n if (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem)) {\n if (!has(dataItem, 'value') && has(dataItem, 'name')) {\n // In ec2, using name as value.\n dataItem.value = dataItem.name;\n }\n transferItem(dataItem);\n }\n });\n}\nfunction transferItem(opt) {\n var itemStyle = opt.itemStyle || (opt.itemStyle = {});\n var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {});\n // Transfer label out\n var label = opt.label || opt.label || {};\n var labelNormal = label.normal || (label.normal = {});\n var excludeLabelAttr = {\n normal: 1,\n emphasis: 1\n };\n zrUtil.each(label, function (value, name) {\n if (!excludeLabelAttr[name] && !has(labelNormal, name)) {\n labelNormal[name] = value;\n }\n });\n if (itemStyleEmphasis.label && !has(label, 'emphasis')) {\n label.emphasis = itemStyleEmphasis.label;\n delete itemStyleEmphasis.label;\n }\n}\nfunction has(obj, attr) {\n return obj.hasOwnProperty(attr);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport SliderTimelineModel from './SliderTimelineModel.js';\nimport SliderTimelineView from './SliderTimelineView.js';\nimport { installTimelineAction } from './timelineAction.js';\nimport preprocessor from './preprocessor.js';\nexport function install(registers) {\n registers.registerComponentModel(SliderTimelineModel);\n registers.registerComponentView(SliderTimelineView);\n registers.registerSubTypeDefaulter('timeline', function () {\n // Only slider now.\n return 'slider';\n });\n installTimelineAction(registers);\n registers.registerPreprocessor(preprocessor);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { isArray } from 'zrender/lib/core/util.js';\nexport default function checkMarkerInSeries(seriesOpts, markerType) {\n if (!seriesOpts) {\n return false;\n }\n var seriesOptArr = isArray(seriesOpts) ? seriesOpts : [seriesOpts];\n for (var idx = 0; idx < seriesOptArr.length; idx++) {\n if (seriesOptArr[idx] && seriesOptArr[idx][markerType]) {\n return true;\n }\n }\n return false;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { DataFormatMixin } from '../../model/mixin/dataFormat.js';\nimport ComponentModel from '../../model/Component.js';\nimport { makeInner, defaultEmphasis } from '../../util/model.js';\nimport { createTooltipMarkup } from '../tooltip/tooltipMarkup.js';\nfunction fillLabel(opt) {\n defaultEmphasis(opt, 'label', ['show']);\n}\n// { [componentType]: MarkerModel }\nvar inner = makeInner();\nvar MarkerModel = /** @class */function (_super) {\n __extends(MarkerModel, _super);\n function MarkerModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkerModel.type;\n /**\n * If marker model is created by self from series\n */\n _this.createdBySelf = false;\n return _this;\n }\n /**\n * @overrite\n */\n MarkerModel.prototype.init = function (option, parentModel, ecModel) {\n if (process.env.NODE_ENV !== 'production') {\n if (this.type === 'marker') {\n throw new Error('Marker component is abstract component. Use markLine, markPoint, markArea instead.');\n }\n }\n this.mergeDefaultAndTheme(option, ecModel);\n this._mergeOption(option, ecModel, false, true);\n };\n MarkerModel.prototype.isAnimationEnabled = function () {\n if (env.node) {\n return false;\n }\n var hostSeries = this.__hostSeries;\n return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled();\n };\n /**\n * @overrite\n */\n MarkerModel.prototype.mergeOption = function (newOpt, ecModel) {\n this._mergeOption(newOpt, ecModel, false, false);\n };\n MarkerModel.prototype._mergeOption = function (newOpt, ecModel, createdBySelf, isInit) {\n var componentType = this.mainType;\n if (!createdBySelf) {\n ecModel.eachSeries(function (seriesModel) {\n // mainType can be markPoint, markLine, markArea\n var markerOpt = seriesModel.get(this.mainType, true);\n var markerModel = inner(seriesModel)[componentType];\n if (!markerOpt || !markerOpt.data) {\n inner(seriesModel)[componentType] = null;\n return;\n }\n if (!markerModel) {\n if (isInit) {\n // Default label emphasis `position` and `show`\n fillLabel(markerOpt);\n }\n zrUtil.each(markerOpt.data, function (item) {\n // FIXME Overwrite fillLabel method ?\n if (item instanceof Array) {\n fillLabel(item[0]);\n fillLabel(item[1]);\n } else {\n fillLabel(item);\n }\n });\n markerModel = this.createMarkerModelFromSeries(markerOpt, this, ecModel);\n // markerModel = new ImplementedMarkerModel(\n // markerOpt, this, ecModel\n // );\n zrUtil.extend(markerModel, {\n mainType: this.mainType,\n // Use the same series index and name\n seriesIndex: seriesModel.seriesIndex,\n name: seriesModel.name,\n createdBySelf: true\n });\n markerModel.__hostSeries = seriesModel;\n } else {\n markerModel._mergeOption(markerOpt, ecModel, true);\n }\n inner(seriesModel)[componentType] = markerModel;\n }, this);\n }\n };\n MarkerModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var itemName = data.getName(dataIndex);\n return createTooltipMarkup('section', {\n header: this.name,\n blocks: [createTooltipMarkup('nameValue', {\n name: itemName,\n value: value,\n noName: !itemName,\n noValue: value == null\n })]\n });\n };\n MarkerModel.prototype.getData = function () {\n return this._data;\n };\n MarkerModel.prototype.setData = function (data) {\n this._data = data;\n };\n MarkerModel.prototype.getDataParams = function (dataIndex, dataType) {\n var params = DataFormatMixin.prototype.getDataParams.call(this, dataIndex, dataType);\n var hostSeries = this.__hostSeries;\n if (hostSeries) {\n params.seriesId = hostSeries.id;\n params.seriesName = hostSeries.name;\n params.seriesType = hostSeries.subType;\n }\n return params;\n };\n MarkerModel.getMarkerModelFromSeries = function (seriesModel,\n // Support three types of markers. Strict check.\n componentType) {\n return inner(seriesModel)[componentType];\n };\n MarkerModel.type = 'marker';\n MarkerModel.dependencies = ['series', 'grid', 'polar', 'geo'];\n return MarkerModel;\n}(ComponentModel);\nzrUtil.mixin(MarkerModel, DataFormatMixin.prototype);\nexport default MarkerModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkPointModel = /** @class */function (_super) {\n __extends(MarkPointModel, _super);\n function MarkPointModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkPointModel.type;\n return _this;\n }\n MarkPointModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkPointModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkPointModel.type = 'markPoint';\n MarkPointModel.defaultOption = {\n // zlevel: 0,\n z: 5,\n symbol: 'pin',\n symbolSize: 50,\n // symbolRotate: 0,\n // symbolOffset: [0, 0]\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'inside'\n },\n itemStyle: {\n borderWidth: 2\n },\n emphasis: {\n label: {\n show: true\n }\n }\n };\n return MarkPointModel;\n}(MarkerModel);\nexport default MarkPointModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as numberUtil from '../../util/number.js';\nimport { isDimensionStacked } from '../../data/helper/dataStackHelper.js';\nimport { indexOf, curry, clone, isArray } from 'zrender/lib/core/util.js';\nimport { parseDataValue } from '../../data/helper/dataValueHelper.js';\nfunction hasXOrY(item) {\n return !(isNaN(parseFloat(item.x)) && isNaN(parseFloat(item.y)));\n}\nfunction hasXAndY(item) {\n return !isNaN(parseFloat(item.x)) && !isNaN(parseFloat(item.y));\n}\nfunction markerTypeCalculatorWithExtent(markerType, data, otherDataDim, targetDataDim, otherCoordIndex, targetCoordIndex) {\n var coordArr = [];\n var stacked = isDimensionStacked(data, targetDataDim /* , otherDataDim */);\n var calcDataDim = stacked ? data.getCalculationInfo('stackResultDimension') : targetDataDim;\n var value = numCalculate(data, calcDataDim, markerType);\n var dataIndex = data.indicesOfNearest(calcDataDim, value)[0];\n coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex);\n coordArr[targetCoordIndex] = data.get(calcDataDim, dataIndex);\n var coordArrValue = data.get(targetDataDim, dataIndex);\n // Make it simple, do not visit all stacked value to count precision.\n var precision = numberUtil.getPrecision(data.get(targetDataDim, dataIndex));\n precision = Math.min(precision, 20);\n if (precision >= 0) {\n coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision);\n }\n return [coordArr, coordArrValue];\n}\n// TODO Specified percent\nvar markerTypeCalculator = {\n min: curry(markerTypeCalculatorWithExtent, 'min'),\n max: curry(markerTypeCalculatorWithExtent, 'max'),\n average: curry(markerTypeCalculatorWithExtent, 'average'),\n median: curry(markerTypeCalculatorWithExtent, 'median')\n};\n/**\n * Transform markPoint data item to format used in List by do the following\n * 1. Calculate statistic like `max`, `min`, `average`\n * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array\n */\nexport function dataTransform(seriesModel, item) {\n if (!item) {\n return;\n }\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var dims = coordSys && coordSys.dimensions;\n // 1. If not specify the position with pixel directly\n // 2. If `coord` is not a data array. Which uses `xAxis`,\n // `yAxis` to specify the coord on each dimension\n // parseFloat first because item.x and item.y can be percent string like '20%'\n if (!hasXAndY(item) && !isArray(item.coord) && isArray(dims)) {\n var axisInfo = getAxisInfo(item, data, coordSys, seriesModel);\n // Clone the option\n // Transform the properties xAxis, yAxis, radiusAxis, angleAxis, geoCoord to value\n item = clone(item);\n if (item.type && markerTypeCalculator[item.type] && axisInfo.baseAxis && axisInfo.valueAxis) {\n var otherCoordIndex = indexOf(dims, axisInfo.baseAxis.dim);\n var targetCoordIndex = indexOf(dims, axisInfo.valueAxis.dim);\n var coordInfo = markerTypeCalculator[item.type](data, axisInfo.baseDataDim, axisInfo.valueDataDim, otherCoordIndex, targetCoordIndex);\n item.coord = coordInfo[0];\n // Force to use the value of calculated value.\n // let item use the value without stack.\n item.value = coordInfo[1];\n } else {\n // FIXME Only has one of xAxis and yAxis.\n item.coord = [item.xAxis != null ? item.xAxis : item.radiusAxis, item.yAxis != null ? item.yAxis : item.angleAxis];\n }\n }\n // x y is provided\n if (item.coord == null || !isArray(dims)) {\n item.coord = [];\n } else {\n // Each coord support max, min, average\n var coord = item.coord;\n for (var i = 0; i < 2; i++) {\n if (markerTypeCalculator[coord[i]]) {\n coord[i] = numCalculate(data, data.mapDimension(dims[i]), coord[i]);\n }\n }\n }\n return item;\n}\nexport function getAxisInfo(item, data, coordSys, seriesModel) {\n var ret = {};\n if (item.valueIndex != null || item.valueDim != null) {\n ret.valueDataDim = item.valueIndex != null ? data.getDimension(item.valueIndex) : item.valueDim;\n ret.valueAxis = coordSys.getAxis(dataDimToCoordDim(seriesModel, ret.valueDataDim));\n ret.baseAxis = coordSys.getOtherAxis(ret.valueAxis);\n ret.baseDataDim = data.mapDimension(ret.baseAxis.dim);\n } else {\n ret.baseAxis = seriesModel.getBaseAxis();\n ret.valueAxis = coordSys.getOtherAxis(ret.baseAxis);\n ret.baseDataDim = data.mapDimension(ret.baseAxis.dim);\n ret.valueDataDim = data.mapDimension(ret.valueAxis.dim);\n }\n return ret;\n}\nfunction dataDimToCoordDim(seriesModel, dataDim) {\n var dimItem = seriesModel.getData().getDimensionInfo(dataDim);\n return dimItem && dimItem.coordDim;\n}\n/**\n * Filter data which is out of coordinateSystem range\n * [dataFilter description]\n */\nexport function dataFilter(\n// Currently only polar and cartesian has containData.\ncoordSys, item) {\n // Always return true if there is no coordSys\n return coordSys && coordSys.containData && item.coord && !hasXOrY(item) ? coordSys.containData(item.coord) : true;\n}\nexport function zoneFilter(\n// Currently only polar and cartesian has containData.\ncoordSys, item1, item2) {\n // Always return true if there is no coordSys\n return coordSys && coordSys.containZone && item1.coord && item2.coord && !hasXOrY(item1) && !hasXOrY(item2) ? coordSys.containZone(item1.coord, item2.coord) : true;\n}\nexport function createMarkerDimValueGetter(inCoordSys, dims) {\n return inCoordSys ? function (item, dimName, dataIndex, dimIndex) {\n var rawVal = dimIndex < 2\n // x, y, radius, angle\n ? item.coord && item.coord[dimIndex] : item.value;\n return parseDataValue(rawVal, dims[dimIndex]);\n } : function (item, dimName, dataIndex, dimIndex) {\n return parseDataValue(item.value, dims[dimIndex]);\n };\n}\nexport function numCalculate(data, valueDataDim, type) {\n if (type === 'average') {\n var sum_1 = 0;\n var count_1 = 0;\n data.each(valueDataDim, function (val, idx) {\n if (!isNaN(val)) {\n sum_1 += val;\n count_1++;\n }\n });\n return sum_1 / count_1;\n } else if (type === 'median') {\n return data.getMedian(valueDataDim);\n } else {\n // max & min\n return data.getDataExtent(valueDataDim)[type === 'max' ? 1 : 0];\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component.js';\nimport { createHashMap, each } from 'zrender/lib/core/util.js';\nimport MarkerModel from './MarkerModel.js';\nimport { makeInner } from '../../util/model.js';\nimport { enterBlur, leaveBlur } from '../../util/states.js';\nvar inner = makeInner();\nvar MarkerView = /** @class */function (_super) {\n __extends(MarkerView, _super);\n function MarkerView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkerView.type;\n return _this;\n }\n MarkerView.prototype.init = function () {\n this.markerGroupMap = createHashMap();\n };\n MarkerView.prototype.render = function (markerModel, ecModel, api) {\n var _this = this;\n var markerGroupMap = this.markerGroupMap;\n markerGroupMap.each(function (item) {\n inner(item).keep = false;\n });\n ecModel.eachSeries(function (seriesModel) {\n var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type);\n markerModel && _this.renderSeries(seriesModel, markerModel, ecModel, api);\n });\n markerGroupMap.each(function (item) {\n !inner(item).keep && _this.group.remove(item.group);\n });\n };\n MarkerView.prototype.markKeep = function (drawGroup) {\n inner(drawGroup).keep = true;\n };\n MarkerView.prototype.toggleBlurSeries = function (seriesModelList, isBlur) {\n var _this = this;\n each(seriesModelList, function (seriesModel) {\n var markerModel = MarkerModel.getMarkerModelFromSeries(seriesModel, _this.type);\n if (markerModel) {\n var data = markerModel.getData();\n data.eachItemGraphicEl(function (el) {\n if (el) {\n isBlur ? enterBlur(el) : leaveBlur(el);\n }\n });\n }\n });\n };\n MarkerView.type = 'marker';\n return MarkerView;\n}(ComponentView);\nexport default MarkerView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SymbolDraw from '../../chart/helper/SymbolDraw.js';\nimport * as numberUtil from '../../util/number.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport * as markerHelper from './markerHelper.js';\nimport MarkerView from './MarkerView.js';\nimport MarkerModel from './MarkerModel.js';\nimport { isFunction, map, filter, curry, extend } from 'zrender/lib/core/util.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nfunction updateMarkerLayout(mpData, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n mpData.each(function (idx) {\n var itemModel = mpData.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n }\n // Chart like bar may have there own marker positioning logic\n else if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(mpData.getValues(mpData.dimensions, idx));\n } else if (coordSys) {\n var x = mpData.get(coordSys.dimensions[0], idx);\n var y = mpData.get(coordSys.dimensions[1], idx);\n point = coordSys.dataToPoint([x, y]);\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n mpData.setItemLayout(idx, point);\n });\n}\nvar MarkPointView = /** @class */function (_super) {\n __extends(MarkPointView, _super);\n function MarkPointView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkPointView.type;\n return _this;\n }\n MarkPointView.prototype.updateTransform = function (markPointModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var mpModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markPoint');\n if (mpModel) {\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n this.markerGroupMap.get(seriesModel.id).updateLayout();\n }\n }, this);\n };\n MarkPointView.prototype.renderSeries = function (seriesModel, mpModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var symbolDrawMap = this.markerGroupMap;\n var symbolDraw = symbolDrawMap.get(seriesId) || symbolDrawMap.set(seriesId, new SymbolDraw());\n var mpData = createData(coordSys, seriesModel, mpModel);\n // FIXME\n mpModel.setData(mpData);\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n mpData.each(function (idx) {\n var itemModel = mpData.getItemModel(idx);\n var symbol = itemModel.getShallow('symbol');\n var symbolSize = itemModel.getShallow('symbolSize');\n var symbolRotate = itemModel.getShallow('symbolRotate');\n var symbolOffset = itemModel.getShallow('symbolOffset');\n var symbolKeepAspect = itemModel.getShallow('symbolKeepAspect');\n // TODO: refactor needed: single data item should not support callback function\n if (isFunction(symbol) || isFunction(symbolSize) || isFunction(symbolRotate) || isFunction(symbolOffset)) {\n var rawIdx = mpModel.getRawValue(idx);\n var dataParams = mpModel.getDataParams(idx);\n if (isFunction(symbol)) {\n symbol = symbol(rawIdx, dataParams);\n }\n if (isFunction(symbolSize)) {\n // FIXME 这里不兼容 ECharts 2.x,2.x 貌似参数是整个数据?\n symbolSize = symbolSize(rawIdx, dataParams);\n }\n if (isFunction(symbolRotate)) {\n symbolRotate = symbolRotate(rawIdx, dataParams);\n }\n if (isFunction(symbolOffset)) {\n symbolOffset = symbolOffset(rawIdx, dataParams);\n }\n }\n var style = itemModel.getModel('itemStyle').getItemStyle();\n var color = getVisualFromData(seriesData, 'color');\n if (!style.fill) {\n style.fill = color;\n }\n mpData.setItemVisual(idx, {\n symbol: symbol,\n symbolSize: symbolSize,\n symbolRotate: symbolRotate,\n symbolOffset: symbolOffset,\n symbolKeepAspect: symbolKeepAspect,\n style: style\n });\n });\n // TODO Text are wrong\n symbolDraw.updateData(mpData);\n this.group.add(symbolDraw.group);\n // Set host model for tooltip\n // FIXME\n mpData.eachItemGraphicEl(function (el) {\n el.traverse(function (child) {\n getECData(child).dataModel = mpModel;\n });\n });\n this.markKeep(symbolDraw);\n symbolDraw.group.silent = mpModel.get('silent') || seriesModel.get('silent');\n };\n MarkPointView.type = 'markPoint';\n return MarkPointView;\n}(MarkerView);\nfunction createData(coordSys, seriesModel, mpModel) {\n var coordDimsInfos;\n if (coordSys) {\n coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n }\n var mpData = new SeriesData(coordDimsInfos, mpModel);\n var dataOpt = map(mpModel.get('data'), curry(markerHelper.dataTransform, seriesModel));\n if (coordSys) {\n dataOpt = filter(dataOpt, curry(markerHelper.dataFilter, coordSys));\n }\n var dimValueGetter = markerHelper.createMarkerDimValueGetter(!!coordSys, coordDimsInfos);\n mpData.initData(dataOpt, null, dimValueGetter);\n return mpData;\n}\nexport default MarkPointView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkPointModel from './MarkPointModel.js';\nimport MarkPointView from './MarkPointView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkPointModel);\n registers.registerComponentView(MarkPointView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markPoint')) {\n // Make sure markPoint component is enabled\n opt.markPoint = opt.markPoint || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkLineModel = /** @class */function (_super) {\n __extends(MarkLineModel, _super);\n function MarkLineModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkLineModel.type;\n return _this;\n }\n MarkLineModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkLineModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkLineModel.type = 'markLine';\n MarkLineModel.defaultOption = {\n // zlevel: 0,\n z: 5,\n symbol: ['circle', 'arrow'],\n symbolSize: [8, 16],\n // symbolRotate: 0,\n symbolOffset: 0,\n precision: 2,\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'end',\n distance: 5\n },\n lineStyle: {\n type: 'dashed'\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n width: 3\n }\n },\n animationEasing: 'linear'\n };\n return MarkLineModel;\n}(MarkerModel);\nexport default MarkLineModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport SeriesData from '../../data/SeriesData.js';\nimport * as numberUtil from '../../util/number.js';\nimport * as markerHelper from './markerHelper.js';\nimport LineDraw from '../../chart/helper/LineDraw.js';\nimport MarkerView from './MarkerView.js';\nimport { getStackedDimension } from '../../data/helper/dataStackHelper.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { getECData } from '../../util/innerStore.js';\nimport MarkerModel from './MarkerModel.js';\nimport { isArray, retrieve, retrieve2, clone, extend, logError, merge, map, curry, filter, isNumber } from 'zrender/lib/core/util.js';\nimport { makeInner } from '../../util/model.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nvar inner = makeInner();\nvar markLineTransform = function (seriesModel, coordSys, mlModel, item) {\n var data = seriesModel.getData();\n var itemArray;\n if (!isArray(item)) {\n // Special type markLine like 'min', 'max', 'average', 'median'\n var mlType = item.type;\n if (mlType === 'min' || mlType === 'max' || mlType === 'average' || mlType === 'median'\n // In case\n // data: [{\n // yAxis: 10\n // }]\n || item.xAxis != null || item.yAxis != null) {\n var valueAxis = void 0;\n var value = void 0;\n if (item.yAxis != null || item.xAxis != null) {\n valueAxis = coordSys.getAxis(item.yAxis != null ? 'y' : 'x');\n value = retrieve(item.yAxis, item.xAxis);\n } else {\n var axisInfo = markerHelper.getAxisInfo(item, data, coordSys, seriesModel);\n valueAxis = axisInfo.valueAxis;\n var valueDataDim = getStackedDimension(data, axisInfo.valueDataDim);\n value = markerHelper.numCalculate(data, valueDataDim, mlType);\n }\n var valueIndex = valueAxis.dim === 'x' ? 0 : 1;\n var baseIndex = 1 - valueIndex;\n // Normized to 2d data with start and end point\n var mlFrom = clone(item);\n var mlTo = {\n coord: []\n };\n mlFrom.type = null;\n mlFrom.coord = [];\n mlFrom.coord[baseIndex] = -Infinity;\n mlTo.coord[baseIndex] = Infinity;\n var precision = mlModel.get('precision');\n if (precision >= 0 && isNumber(value)) {\n value = +value.toFixed(Math.min(precision, 20));\n }\n mlFrom.coord[valueIndex] = mlTo.coord[valueIndex] = value;\n itemArray = [mlFrom, mlTo, {\n type: mlType,\n valueIndex: item.valueIndex,\n // Force to use the value of calculated value.\n value: value\n }];\n } else {\n // Invalid data\n if (process.env.NODE_ENV !== 'production') {\n logError('Invalid markLine data.');\n }\n itemArray = [];\n }\n } else {\n itemArray = item;\n }\n var normalizedItem = [markerHelper.dataTransform(seriesModel, itemArray[0]), markerHelper.dataTransform(seriesModel, itemArray[1]), extend({}, itemArray[2])];\n // Avoid line data type is extended by from(to) data type\n normalizedItem[2].type = normalizedItem[2].type || null;\n // Merge from option and to option into line option\n merge(normalizedItem[2], normalizedItem[0]);\n merge(normalizedItem[2], normalizedItem[1]);\n return normalizedItem;\n};\nfunction isInfinity(val) {\n return !isNaN(val) && !isFinite(val);\n}\n// If a markLine has one dim\nfunction ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {\n var otherDimIndex = 1 - dimIndex;\n var dimName = coordSys.dimensions[dimIndex];\n return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]) && fromCoord[dimIndex] === toCoord[dimIndex] && coordSys.getAxis(dimName).containData(fromCoord[dimIndex]);\n}\nfunction markLineFilter(coordSys, item) {\n if (coordSys.type === 'cartesian2d') {\n var fromCoord = item[0].coord;\n var toCoord = item[1].coord;\n // In case\n // {\n // markLine: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (fromCoord && toCoord && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))) {\n return true;\n }\n }\n return markerHelper.dataFilter(coordSys, item[0]) && markerHelper.dataFilter(coordSys, item[1]);\n}\nfunction updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } else {\n // Chart like bar may have there own marker positioning logic\n if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(data.getValues(data.dimensions, idx));\n } else {\n var dims = coordSys.dimensions;\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n point = coordSys.dataToPoint([x, y]);\n }\n // Expand line to the edge of grid if value on one axis is Inifnity\n // In case\n // markLine: {\n // data: [{\n // yAxis: 2\n // // or\n // type: 'average'\n // }]\n // }\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var dims = coordSys.dimensions;\n if (isInfinity(data.get(dims[0], idx))) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[isFrom ? 0 : 1]);\n } else if (isInfinity(data.get(dims[1], idx))) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]);\n }\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n data.setItemLayout(idx, point);\n}\nvar MarkLineView = /** @class */function (_super) {\n __extends(MarkLineView, _super);\n function MarkLineView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkLineView.type;\n return _this;\n }\n MarkLineView.prototype.updateTransform = function (markLineModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var mlModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markLine');\n if (mlModel) {\n var mlData_1 = mlModel.getData();\n var fromData_1 = inner(mlModel).from;\n var toData_1 = inner(mlModel).to;\n // Update visual and layout of from symbol and to symbol\n fromData_1.each(function (idx) {\n updateSingleMarkerEndLayout(fromData_1, idx, true, seriesModel, api);\n updateSingleMarkerEndLayout(toData_1, idx, false, seriesModel, api);\n });\n // Update layout of line\n mlData_1.each(function (idx) {\n mlData_1.setItemLayout(idx, [fromData_1.getItemLayout(idx), toData_1.getItemLayout(idx)]);\n });\n this.markerGroupMap.get(seriesModel.id).updateLayout();\n }\n }, this);\n };\n MarkLineView.prototype.renderSeries = function (seriesModel, mlModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var lineDrawMap = this.markerGroupMap;\n var lineDraw = lineDrawMap.get(seriesId) || lineDrawMap.set(seriesId, new LineDraw());\n this.group.add(lineDraw.group);\n var mlData = createList(coordSys, seriesModel, mlModel);\n var fromData = mlData.from;\n var toData = mlData.to;\n var lineData = mlData.line;\n inner(mlModel).from = fromData;\n inner(mlModel).to = toData;\n // Line data for tooltip and formatter\n mlModel.setData(lineData);\n // TODO\n // Functionally, `symbolSize` & `symbolOffset` can also be 2D array now.\n // But the related logic and type definition are not finished yet.\n // Finish it if required\n var symbolType = mlModel.get('symbol');\n var symbolSize = mlModel.get('symbolSize');\n var symbolRotate = mlModel.get('symbolRotate');\n var symbolOffset = mlModel.get('symbolOffset');\n // TODO: support callback function like markPoint\n if (!isArray(symbolType)) {\n symbolType = [symbolType, symbolType];\n }\n if (!isArray(symbolSize)) {\n symbolSize = [symbolSize, symbolSize];\n }\n if (!isArray(symbolRotate)) {\n symbolRotate = [symbolRotate, symbolRotate];\n }\n if (!isArray(symbolOffset)) {\n symbolOffset = [symbolOffset, symbolOffset];\n }\n // Update visual and layout of from symbol and to symbol\n mlData.from.each(function (idx) {\n updateDataVisualAndLayout(fromData, idx, true);\n updateDataVisualAndLayout(toData, idx, false);\n });\n // Update visual and layout of line\n lineData.each(function (idx) {\n var lineStyle = lineData.getItemModel(idx).getModel('lineStyle').getLineStyle();\n // lineData.setItemVisual(idx, {\n // color: lineColor || fromData.getItemVisual(idx, 'color')\n // });\n lineData.setItemLayout(idx, [fromData.getItemLayout(idx), toData.getItemLayout(idx)]);\n if (lineStyle.stroke == null) {\n lineStyle.stroke = fromData.getItemVisual(idx, 'style').fill;\n }\n lineData.setItemVisual(idx, {\n fromSymbolKeepAspect: fromData.getItemVisual(idx, 'symbolKeepAspect'),\n fromSymbolOffset: fromData.getItemVisual(idx, 'symbolOffset'),\n fromSymbolRotate: fromData.getItemVisual(idx, 'symbolRotate'),\n fromSymbolSize: fromData.getItemVisual(idx, 'symbolSize'),\n fromSymbol: fromData.getItemVisual(idx, 'symbol'),\n toSymbolKeepAspect: toData.getItemVisual(idx, 'symbolKeepAspect'),\n toSymbolOffset: toData.getItemVisual(idx, 'symbolOffset'),\n toSymbolRotate: toData.getItemVisual(idx, 'symbolRotate'),\n toSymbolSize: toData.getItemVisual(idx, 'symbolSize'),\n toSymbol: toData.getItemVisual(idx, 'symbol'),\n style: lineStyle\n });\n });\n lineDraw.updateData(lineData);\n // Set host model for tooltip\n // FIXME\n mlData.line.eachItemGraphicEl(function (el) {\n getECData(el).dataModel = mlModel;\n el.traverse(function (child) {\n getECData(child).dataModel = mlModel;\n });\n });\n function updateDataVisualAndLayout(data, idx, isFrom) {\n var itemModel = data.getItemModel(idx);\n updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api);\n var style = itemModel.getModel('itemStyle').getItemStyle();\n if (style.fill == null) {\n style.fill = getVisualFromData(seriesData, 'color');\n }\n data.setItemVisual(idx, {\n symbolKeepAspect: itemModel.get('symbolKeepAspect'),\n // `0` should be considered as a valid value, so use `retrieve2` instead of `||`\n symbolOffset: retrieve2(itemModel.get('symbolOffset', true), symbolOffset[isFrom ? 0 : 1]),\n symbolRotate: retrieve2(itemModel.get('symbolRotate', true), symbolRotate[isFrom ? 0 : 1]),\n // TODO: when 2d array is supported, it should ignore parent\n symbolSize: retrieve2(itemModel.get('symbolSize'), symbolSize[isFrom ? 0 : 1]),\n symbol: retrieve2(itemModel.get('symbol', true), symbolType[isFrom ? 0 : 1]),\n style: style\n });\n }\n this.markKeep(lineDraw);\n lineDraw.group.silent = mlModel.get('silent') || seriesModel.get('silent');\n };\n MarkLineView.type = 'markLine';\n return MarkLineView;\n}(MarkerView);\nfunction createList(coordSys, seriesModel, mlModel) {\n var coordDimsInfos;\n if (coordSys) {\n coordDimsInfos = map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n }\n var fromData = new SeriesData(coordDimsInfos, mlModel);\n var toData = new SeriesData(coordDimsInfos, mlModel);\n // No dimensions\n var lineData = new SeriesData([], mlModel);\n var optData = map(mlModel.get('data'), curry(markLineTransform, seriesModel, coordSys, mlModel));\n if (coordSys) {\n optData = filter(optData, curry(markLineFilter, coordSys));\n }\n var dimValueGetter = markerHelper.createMarkerDimValueGetter(!!coordSys, coordDimsInfos);\n fromData.initData(map(optData, function (item) {\n return item[0];\n }), null, dimValueGetter);\n toData.initData(map(optData, function (item) {\n return item[1];\n }), null, dimValueGetter);\n lineData.initData(map(optData, function (item) {\n return item[2];\n }));\n lineData.hasItemOption = true;\n return {\n from: fromData,\n to: toData,\n line: lineData\n };\n}\nexport default MarkLineView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkLineModel from './MarkLineModel.js';\nimport MarkLineView from './MarkLineView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkLineModel);\n registers.registerComponentView(MarkLineView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markLine')) {\n // Make sure markLine component is enabled\n opt.markLine = opt.markLine || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport MarkerModel from './MarkerModel.js';\nvar MarkAreaModel = /** @class */function (_super) {\n __extends(MarkAreaModel, _super);\n function MarkAreaModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkAreaModel.type;\n return _this;\n }\n MarkAreaModel.prototype.createMarkerModelFromSeries = function (markerOpt, masterMarkerModel, ecModel) {\n return new MarkAreaModel(markerOpt, masterMarkerModel, ecModel);\n };\n MarkAreaModel.type = 'markArea';\n MarkAreaModel.defaultOption = {\n // zlevel: 0,\n // PENDING\n z: 1,\n tooltip: {\n trigger: 'item'\n },\n // markArea should fixed on the coordinate system\n animation: false,\n label: {\n show: true,\n position: 'top'\n },\n itemStyle: {\n // color and borderColor default to use color from series\n // color: 'auto'\n // borderColor: 'auto'\n borderWidth: 0\n },\n emphasis: {\n label: {\n show: true,\n position: 'top'\n }\n }\n };\n return MarkAreaModel;\n}(MarkerModel);\nexport default MarkAreaModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n// TODO Optimize on polar\nimport * as colorUtil from 'zrender/lib/tool/color.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport * as numberUtil from '../../util/number.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, setStatesStylesFromModel } from '../../util/states.js';\nimport * as markerHelper from './markerHelper.js';\nimport MarkerView from './MarkerView.js';\nimport { retrieve, mergeAll, map, curry, filter, extend, isString } from 'zrender/lib/core/util.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport MarkerModel from './MarkerModel.js';\nimport { makeInner } from '../../util/model.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { parseDataValue } from '../../data/helper/dataValueHelper.js';\nvar inner = makeInner();\nvar markAreaTransform = function (seriesModel, coordSys, maModel, item) {\n // item may be null\n var item0 = item[0];\n var item1 = item[1];\n if (!item0 || !item1) {\n return;\n }\n var lt = markerHelper.dataTransform(seriesModel, item0);\n var rb = markerHelper.dataTransform(seriesModel, item1);\n // FIXME make sure lt is less than rb\n var ltCoord = lt.coord;\n var rbCoord = rb.coord;\n ltCoord[0] = retrieve(ltCoord[0], -Infinity);\n ltCoord[1] = retrieve(ltCoord[1], -Infinity);\n rbCoord[0] = retrieve(rbCoord[0], Infinity);\n rbCoord[1] = retrieve(rbCoord[1], Infinity);\n // Merge option into one\n var result = mergeAll([{}, lt, rb]);\n result.coord = [lt.coord, rb.coord];\n result.x0 = lt.x;\n result.y0 = lt.y;\n result.x1 = rb.x;\n result.y1 = rb.y;\n return result;\n};\nfunction isInfinity(val) {\n return !isNaN(val) && !isFinite(val);\n}\n// If a markArea has one dim\nfunction ifMarkAreaHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {\n var otherDimIndex = 1 - dimIndex;\n return isInfinity(fromCoord[otherDimIndex]) && isInfinity(toCoord[otherDimIndex]);\n}\nfunction markAreaFilter(coordSys, item) {\n var fromCoord = item.coord[0];\n var toCoord = item.coord[1];\n var item0 = {\n coord: fromCoord,\n x: item.x0,\n y: item.y0\n };\n var item1 = {\n coord: toCoord,\n x: item.x1,\n y: item.y1\n };\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // In case\n // {\n // markArea: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (fromCoord && toCoord && (ifMarkAreaHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkAreaHasOnlyDim(0, fromCoord, toCoord, coordSys))) {\n return true;\n }\n // Directly returning true may also do the work,\n // because markArea will not be shown automatically\n // when it's not included in coordinate system.\n // But filtering ahead can avoid keeping rendering markArea\n // when there are too many of them.\n return markerHelper.zoneFilter(coordSys, item0, item1);\n }\n return markerHelper.dataFilter(coordSys, item0) || markerHelper.dataFilter(coordSys, item1);\n}\n// dims can be ['x0', 'y0'], ['x1', 'y1'], ['x0', 'y1'], ['x1', 'y0']\nfunction getSingleMarkerEndPoint(data, idx, dims, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get(dims[0]), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get(dims[1]), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } else {\n // Chart like bar may have there own marker positioning logic\n if (seriesModel.getMarkerPosition) {\n // Consider the case that user input the right-bottom point first\n // Pick the larger x and y as 'x1' and 'y1'\n var pointValue0 = data.getValues(['x0', 'y0'], idx);\n var pointValue1 = data.getValues(['x1', 'y1'], idx);\n var clampPointValue0 = coordSys.clampData(pointValue0);\n var clampPointValue1 = coordSys.clampData(pointValue1);\n var pointValue = [];\n if (dims[0] === 'x0') {\n pointValue[0] = clampPointValue0[0] > clampPointValue1[0] ? pointValue1[0] : pointValue0[0];\n } else {\n pointValue[0] = clampPointValue0[0] > clampPointValue1[0] ? pointValue0[0] : pointValue1[0];\n }\n if (dims[1] === 'y0') {\n pointValue[1] = clampPointValue0[1] > clampPointValue1[1] ? pointValue1[1] : pointValue0[1];\n } else {\n pointValue[1] = clampPointValue0[1] > clampPointValue1[1] ? pointValue0[1] : pointValue1[1];\n }\n // Use the getMarkerPosition\n point = seriesModel.getMarkerPosition(pointValue, dims, true);\n } else {\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n var pt = [x, y];\n coordSys.clampData && coordSys.clampData(pt, pt);\n point = coordSys.dataToPoint(pt, true);\n }\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n // TODO: TYPE ts@4.1 may still infer it as Axis instead of Axis2D. Not sure if it's a bug\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n if (isInfinity(x)) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[dims[0] === 'x0' ? 0 : 1]);\n } else if (isInfinity(y)) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]);\n }\n }\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n return point;\n}\nexport var dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']];\nvar MarkAreaView = /** @class */function (_super) {\n __extends(MarkAreaView, _super);\n function MarkAreaView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = MarkAreaView.type;\n return _this;\n }\n MarkAreaView.prototype.updateTransform = function (markAreaModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var maModel = MarkerModel.getMarkerModelFromSeries(seriesModel, 'markArea');\n if (maModel) {\n var areaData_1 = maModel.getData();\n areaData_1.each(function (idx) {\n var points = map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData_1, idx, dim, seriesModel, api);\n });\n // Layout\n areaData_1.setItemLayout(idx, points);\n var el = areaData_1.getItemGraphicEl(idx);\n el.setShape('points', points);\n });\n }\n }, this);\n };\n MarkAreaView.prototype.renderSeries = function (seriesModel, maModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var areaGroupMap = this.markerGroupMap;\n var polygonGroup = areaGroupMap.get(seriesId) || areaGroupMap.set(seriesId, {\n group: new graphic.Group()\n });\n this.group.add(polygonGroup.group);\n this.markKeep(polygonGroup);\n var areaData = createList(coordSys, seriesModel, maModel);\n // Line data for tooltip and formatter\n maModel.setData(areaData);\n // Update visual and layout of line\n areaData.each(function (idx) {\n // Layout\n var points = map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api);\n });\n var xAxisScale = coordSys.getAxis('x').scale;\n var yAxisScale = coordSys.getAxis('y').scale;\n var xAxisExtent = xAxisScale.getExtent();\n var yAxisExtent = yAxisScale.getExtent();\n var xPointExtent = [xAxisScale.parse(areaData.get('x0', idx)), xAxisScale.parse(areaData.get('x1', idx))];\n var yPointExtent = [yAxisScale.parse(areaData.get('y0', idx)), yAxisScale.parse(areaData.get('y1', idx))];\n numberUtil.asc(xPointExtent);\n numberUtil.asc(yPointExtent);\n var overlapped = !(xAxisExtent[0] > xPointExtent[1] || xAxisExtent[1] < xPointExtent[0] || yAxisExtent[0] > yPointExtent[1] || yAxisExtent[1] < yPointExtent[0]);\n // If none of the area is inside coordSys, allClipped is set to be true\n // in layout so that label will not be displayed. See #12591\n var allClipped = !overlapped;\n areaData.setItemLayout(idx, {\n points: points,\n allClipped: allClipped\n });\n var style = areaData.getItemModel(idx).getModel('itemStyle').getItemStyle();\n var color = getVisualFromData(seriesData, 'color');\n if (!style.fill) {\n style.fill = color;\n if (isString(style.fill)) {\n style.fill = colorUtil.modifyAlpha(style.fill, 0.4);\n }\n }\n if (!style.stroke) {\n style.stroke = color;\n }\n // Visual\n areaData.setItemVisual(idx, 'style', style);\n });\n areaData.diff(inner(polygonGroup).data).add(function (idx) {\n var layout = areaData.getItemLayout(idx);\n if (!layout.allClipped) {\n var polygon = new graphic.Polygon({\n shape: {\n points: layout.points\n }\n });\n areaData.setItemGraphicEl(idx, polygon);\n polygonGroup.group.add(polygon);\n }\n }).update(function (newIdx, oldIdx) {\n var polygon = inner(polygonGroup).data.getItemGraphicEl(oldIdx);\n var layout = areaData.getItemLayout(newIdx);\n if (!layout.allClipped) {\n if (polygon) {\n graphic.updateProps(polygon, {\n shape: {\n points: layout.points\n }\n }, maModel, newIdx);\n } else {\n polygon = new graphic.Polygon({\n shape: {\n points: layout.points\n }\n });\n }\n areaData.setItemGraphicEl(newIdx, polygon);\n polygonGroup.group.add(polygon);\n } else if (polygon) {\n polygonGroup.group.remove(polygon);\n }\n }).remove(function (idx) {\n var polygon = inner(polygonGroup).data.getItemGraphicEl(idx);\n polygonGroup.group.remove(polygon);\n }).execute();\n areaData.eachItemGraphicEl(function (polygon, idx) {\n var itemModel = areaData.getItemModel(idx);\n var style = areaData.getItemVisual(idx, 'style');\n polygon.useStyle(areaData.getItemVisual(idx, 'style'));\n setLabelStyle(polygon, getLabelStatesModels(itemModel), {\n labelFetcher: maModel,\n labelDataIndex: idx,\n defaultText: areaData.getName(idx) || '',\n inheritColor: isString(style.fill) ? colorUtil.modifyAlpha(style.fill, 1) : '#000'\n });\n setStatesStylesFromModel(polygon, itemModel);\n toggleHoverEmphasis(polygon, null, null, itemModel.get(['emphasis', 'disabled']));\n getECData(polygon).dataModel = maModel;\n });\n inner(polygonGroup).data = areaData;\n polygonGroup.group.silent = maModel.get('silent') || seriesModel.get('silent');\n };\n MarkAreaView.type = 'markArea';\n return MarkAreaView;\n}(MarkerView);\nfunction createList(coordSys, seriesModel, maModel) {\n var areaData;\n var dataDims;\n var dims = ['x0', 'y0', 'x1', 'y1'];\n if (coordSys) {\n var coordDimsInfos_1 = map(coordSys && coordSys.dimensions, function (coordDim) {\n var data = seriesModel.getData();\n var info = data.getDimensionInfo(data.mapDimension(coordDim)) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return extend(extend({}, info), {\n name: coordDim,\n // DON'T use ordinalMeta to parse and collect ordinal.\n ordinalMeta: null\n });\n });\n dataDims = map(dims, function (dim, idx) {\n return {\n name: dim,\n type: coordDimsInfos_1[idx % 2].type\n };\n });\n areaData = new SeriesData(dataDims, maModel);\n } else {\n dataDims = [{\n name: 'value',\n type: 'float'\n }];\n areaData = new SeriesData(dataDims, maModel);\n }\n var optData = map(maModel.get('data'), curry(markAreaTransform, seriesModel, coordSys, maModel));\n if (coordSys) {\n optData = filter(optData, curry(markAreaFilter, coordSys));\n }\n var dimValueGetter = coordSys ? function (item, dimName, dataIndex, dimIndex) {\n // TODO should convert to ParsedValue?\n var rawVal = item.coord[Math.floor(dimIndex / 2)][dimIndex % 2];\n return parseDataValue(rawVal, dataDims[dimIndex]);\n } : function (item, dimName, dataIndex, dimIndex) {\n return parseDataValue(item.value, dataDims[dimIndex]);\n };\n areaData.initData(optData, null, dimValueGetter);\n areaData.hasItemOption = true;\n return areaData;\n}\nexport default MarkAreaView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport checkMarkerInSeries from './checkMarkerInSeries.js';\nimport MarkAreaModel from './MarkAreaModel.js';\nimport MarkAreaView from './MarkAreaView.js';\nexport function install(registers) {\n registers.registerComponentModel(MarkAreaModel);\n registers.registerComponentView(MarkAreaView);\n registers.registerPreprocessor(function (opt) {\n if (checkMarkerInSeries(opt.series, 'markArea')) {\n // Make sure markArea component is enabled\n opt.markArea = opt.markArea || {};\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from '../../model/Model.js';\nimport { isNameSpecified } from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nvar getDefaultSelectorOptions = function (ecModel, type) {\n if (type === 'all') {\n return {\n type: 'all',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'all'])\n };\n } else if (type === 'inverse') {\n return {\n type: 'inverse',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'inverse'])\n };\n }\n};\nvar LegendModel = /** @class */function (_super) {\n __extends(LegendModel, _super);\n function LegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendModel.type;\n _this.layoutMode = {\n type: 'box',\n // legend.width/height are maxWidth/maxHeight actually,\n // whereas real width/height is calculated by its content.\n // (Setting {left: 10, right: 10} does not make sense).\n // So consider the case:\n // `setOption({legend: {left: 10});`\n // then `setOption({legend: {right: 10});`\n // The previous `left` should be cleared by setting `ignoreSize`.\n ignoreSize: true\n };\n return _this;\n }\n LegendModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n option.selected = option.selected || {};\n this._updateSelector(option);\n };\n LegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n this._updateSelector(option);\n };\n LegendModel.prototype._updateSelector = function (option) {\n var selector = option.selector;\n var ecModel = this.ecModel;\n if (selector === true) {\n selector = option.selector = ['all', 'inverse'];\n }\n if (zrUtil.isArray(selector)) {\n zrUtil.each(selector, function (item, index) {\n zrUtil.isString(item) && (item = {\n type: item\n });\n selector[index] = zrUtil.merge(item, getDefaultSelectorOptions(ecModel, item.type));\n });\n }\n };\n LegendModel.prototype.optionUpdated = function () {\n this._updateData(this.ecModel);\n var legendData = this._data;\n // If selectedMode is single, try to select one\n if (legendData[0] && this.get('selectedMode') === 'single') {\n var hasSelected = false;\n // If has any selected in option.selected\n for (var i = 0; i < legendData.length; i++) {\n var name_1 = legendData[i].get('name');\n if (this.isSelected(name_1)) {\n // Force to unselect others\n this.select(name_1);\n hasSelected = true;\n break;\n }\n }\n // Try select the first if selectedMode is single\n !hasSelected && this.select(legendData[0].get('name'));\n }\n };\n LegendModel.prototype._updateData = function (ecModel) {\n var potentialData = [];\n var availableNames = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var seriesName = seriesModel.name;\n availableNames.push(seriesName);\n var isPotential;\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n var names = provider.getAllNames();\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n availableNames = availableNames.concat(names);\n }\n if (names.length) {\n potentialData = potentialData.concat(names);\n } else {\n isPotential = true;\n }\n } else {\n isPotential = true;\n }\n if (isPotential && isNameSpecified(seriesModel)) {\n potentialData.push(seriesModel.name);\n }\n });\n /**\n * @type {Array.}\n * @private\n */\n this._availableNames = availableNames;\n // If legend.data is not specified in option, use availableNames as data,\n // which is convenient for user preparing option.\n var rawData = this.get('data') || potentialData;\n var legendNameMap = zrUtil.createHashMap();\n var legendData = zrUtil.map(rawData, function (dataItem) {\n // Can be string or number\n if (zrUtil.isString(dataItem) || zrUtil.isNumber(dataItem)) {\n dataItem = {\n name: dataItem\n };\n }\n if (legendNameMap.get(dataItem.name)) {\n // remove legend name duplicate\n return null;\n }\n legendNameMap.set(dataItem.name, true);\n return new Model(dataItem, this, this.ecModel);\n }, this);\n /**\n * @type {Array.}\n * @private\n */\n this._data = zrUtil.filter(legendData, function (item) {\n return !!item;\n });\n };\n LegendModel.prototype.getData = function () {\n return this._data;\n };\n LegendModel.prototype.select = function (name) {\n var selected = this.option.selected;\n var selectedMode = this.get('selectedMode');\n if (selectedMode === 'single') {\n var data = this._data;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name')] = false;\n });\n }\n selected[name] = true;\n };\n LegendModel.prototype.unSelect = function (name) {\n if (this.get('selectedMode') !== 'single') {\n this.option.selected[name] = false;\n }\n };\n LegendModel.prototype.toggleSelected = function (name) {\n var selected = this.option.selected;\n // Default is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n this[selected[name] ? 'unSelect' : 'select'](name);\n };\n LegendModel.prototype.allSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name', true)] = true;\n });\n };\n LegendModel.prototype.inverseSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n var name = dataItem.get('name', true);\n // Initially, default value is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n selected[name] = !selected[name];\n });\n };\n LegendModel.prototype.isSelected = function (name) {\n var selected = this.option.selected;\n return !(selected.hasOwnProperty(name) && !selected[name]) && zrUtil.indexOf(this._availableNames, name) >= 0;\n };\n LegendModel.prototype.getOrient = function () {\n return this.get('orient') === 'vertical' ? {\n index: 1,\n name: 'vertical'\n } : {\n index: 0,\n name: 'horizontal'\n };\n };\n LegendModel.type = 'legend.plain';\n LegendModel.dependencies = ['series'];\n LegendModel.defaultOption = {\n // zlevel: 0,\n z: 4,\n show: true,\n orient: 'horizontal',\n left: 'center',\n // right: 'center',\n top: 0,\n // bottom: null,\n align: 'auto',\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n itemWidth: 25,\n itemHeight: 14,\n symbolRotate: 'inherit',\n symbolKeepAspect: true,\n inactiveColor: '#ccc',\n inactiveBorderColor: '#ccc',\n inactiveBorderWidth: 'auto',\n itemStyle: {\n color: 'inherit',\n opacity: 'inherit',\n borderColor: 'inherit',\n borderWidth: 'auto',\n borderCap: 'inherit',\n borderJoin: 'inherit',\n borderDashOffset: 'inherit',\n borderMiterLimit: 'inherit'\n },\n lineStyle: {\n width: 'auto',\n color: 'inherit',\n inactiveColor: '#ccc',\n inactiveWidth: 2,\n opacity: 'inherit',\n type: 'inherit',\n cap: 'inherit',\n join: 'inherit',\n dashOffset: 'inherit',\n miterLimit: 'inherit'\n },\n textStyle: {\n color: '#333'\n },\n selectedMode: true,\n selector: false,\n selectorLabel: {\n show: true,\n borderRadius: 10,\n padding: [3, 5, 3, 5],\n fontSize: 12,\n fontFamily: 'sans-serif',\n color: '#666',\n borderWidth: 1,\n borderColor: '#666'\n },\n emphasis: {\n selectorLabel: {\n show: true,\n color: '#eee',\n backgroundColor: '#666'\n }\n },\n selectorPosition: 'auto',\n selectorItemGap: 7,\n selectorButtonGap: 10,\n tooltip: {\n show: false\n }\n };\n return LegendModel;\n}(ComponentModel);\nexport default LegendModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parse, stringify } from 'zrender/lib/tool/color.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, createTextStyle } from '../../label/labelStyle.js';\nimport { makeBackground } from '../helper/listComponent.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport ComponentView from '../../view/Component.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { getECData } from '../../util/innerStore.js';\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\nvar LegendView = /** @class */function (_super) {\n __extends(LegendView, _super);\n function LegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendView.type;\n _this.newlineDisabled = false;\n return _this;\n }\n LegendView.prototype.init = function () {\n this.group.add(this._contentGroup = new Group());\n this.group.add(this._selectorGroup = new Group());\n this._isFirstRender = true;\n };\n /**\n * @protected\n */\n LegendView.prototype.getContentGroup = function () {\n return this._contentGroup;\n };\n /**\n * @protected\n */\n LegendView.prototype.getSelectorGroup = function () {\n return this._selectorGroup;\n };\n /**\n * @override\n */\n LegendView.prototype.render = function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n if (!legendModel.get('show', true)) {\n return;\n }\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n }\n // selector has been normalized to an array in model\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n // Perform layout.\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition);\n // Place mainGroup, based on the calculated `mainRect`.\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), viewportSize, padding);\n this.group.x = layoutRect.x - mainRect.x;\n this.group.y = layoutRect.y - mainRect.y;\n this.group.markRedraw();\n // Render background after group is layout.\n this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel));\n };\n LegendView.prototype.resetInner = function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n };\n LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (legendItemModel, dataIndex) {\n var name = legendItemModel.get('name');\n // Use empty string or \\n as a newline string\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n var g = new Group();\n // @ts-ignore\n g.newline = true;\n contentGroup.add(g);\n return;\n }\n // Representitive series.\n var seriesModel = ecModel.getSeriesByName(name)[0];\n if (legendDrawnMap.get(name)) {\n // Have been drawn\n return;\n }\n // Legend to control series.\n if (seriesModel) {\n var data = seriesModel.getData();\n var lineVisualStyle = data.getVisual('legendLineStyle') || {};\n var legendIcon = data.getVisual('legendIcon');\n /**\n * `data.getVisual('style')` may be the color from the register\n * in series. For example, for line series,\n */\n var style = data.getVisual('style');\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api);\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n if (!provider.containName(name)) {\n return;\n }\n var idx = provider.indexOfName(name);\n var style = provider.getItemVisual(idx, 'style');\n var legendIcon = provider.getItemVisual(idx, 'legendIcon');\n var colorArr = parse(style.fill);\n // Color may be set to transparent in visualMap when data is out of range.\n // Do not show nothing.\n if (colorArr && colorArr[3] === 0) {\n colorArr[3] = 0.2;\n // TODO color is set to 0, 0, 0, 0. Should show correct RGBA\n style = zrUtil.extend(zrUtil.extend({}, style), {\n fill: stringify(colorArr, 'rgba')\n });\n }\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, legendIcon, selectMode, api);\n // FIXME: consider different series has items with the same name.\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId))\n // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!legendDrawnMap.get(name)) {\n console.warn(name + ' series not exists. Legend data should be same with series name or data name.');\n }\n }\n }, this);\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n };\n LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect'\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']);\n setLabelStyle(labelText, {\n normal: labelModel,\n emphasis: emphasisLabelModel\n }, {\n defaultText: selectorItem.title\n });\n enableHoverEmphasis(labelText);\n });\n };\n LegendView.prototype._createItem = function (seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, legendIcon, selectMode, api) {\n var drawType = seriesModel.visualDrawType;\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var isSelected = legendModel.isSelected(name);\n var iconRotate = legendItemModel.get('symbolRotate');\n var symbolKeepAspect = legendItemModel.get('symbolKeepAspect');\n var legendIconType = legendItemModel.get('icon');\n legendIcon = legendIconType || legendIcon || 'roundRect';\n var style = getLegendStyle(legendIcon, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api);\n var itemGroup = new Group();\n var textStyleModel = legendItemModel.getModel('textStyle');\n if (zrUtil.isFunction(seriesModel.getLegendIcon) && (!legendIconType || legendIconType === 'inherit')) {\n // Series has specific way to define legend icon\n itemGroup.add(seriesModel.getLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: iconRotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n } else {\n // Use default legend icon policy for most series\n var rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') ? iconRotate === 'inherit' ? seriesModel.getData().getVisual('symbolRotate') : iconRotate : 0; // No rotation for no icon\n itemGroup.add(getDefaultLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: rotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n }\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n if (zrUtil.isString(formatter) && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (zrUtil.isFunction(formatter)) {\n content = formatter(name);\n }\n var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n fill: textColor,\n align: textAlign,\n verticalAlign: 'middle'\n }, {\n inheritColor: textColor\n })\n }));\n // Add a invisible rect to increase the area of mouse hover\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n style: {\n // Cannot use 'invisible' because SVG SSR will miss the node\n fill: 'transparent'\n }\n });\n var tooltipModel = legendItemModel.getModel('tooltip');\n if (tooltipModel.get('show')) {\n graphic.setTooltipConfig({\n el: hitRect,\n componentModel: legendModel,\n itemName: name,\n itemTooltipOption: tooltipModel.option\n });\n }\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n enableHoverEmphasis(itemGroup);\n // @ts-ignore\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n };\n LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup();\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n selectorGroup.markRedraw();\n contentGroup.markRedraw();\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n }\n // Always align selector to content as 'middle'\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n return this.group.getBoundingRect();\n }\n };\n /**\n * @protected\n */\n LegendView.prototype.remove = function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n };\n LegendView.type = 'legend.plain';\n return LegendView;\n}(ComponentView);\nfunction getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) {\n /**\n * Use series style if is inherit;\n * elsewise, use legend style\n */\n function handleCommonProps(style, visualStyle) {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n if (style.lineWidth === 'auto') {\n style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;\n }\n each(style, function (propVal, propName) {\n style[propName] === 'inherit' && (style[propName] = visualStyle[propName]);\n });\n }\n // itemStyle\n var itemStyleModel = legendItemModel.getModel('itemStyle');\n var itemStyle = itemStyleModel.getItemStyle();\n var iconBrushType = iconType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke';\n var decalStyle = itemStyleModel.getShallow('decal');\n itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api);\n if (itemStyle.fill === 'inherit') {\n /**\n * Series with visualDrawType as 'stroke' should have\n * series stroke as legend fill\n */\n itemStyle.fill = itemVisualStyle[drawType];\n }\n if (itemStyle.stroke === 'inherit') {\n /**\n * icon type with \"emptyXXX\" should use fill color\n * in visual style\n */\n itemStyle.stroke = itemVisualStyle[iconBrushType];\n }\n if (itemStyle.opacity === 'inherit') {\n /**\n * Use lineStyle.opacity if drawType is stroke\n */\n itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;\n }\n handleCommonProps(itemStyle, itemVisualStyle);\n // lineStyle\n var legendLineModel = legendItemModel.getModel('lineStyle');\n var lineStyle = legendLineModel.getLineStyle();\n handleCommonProps(lineStyle, lineVisualStyle);\n // Fix auto color to real color\n itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill);\n itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill);\n lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);\n if (!isSelected) {\n var borderWidth = legendItemModel.get('inactiveBorderWidth');\n /**\n * Since stroke is set to be inactiveBorderColor, it may occur that\n * there is no border in series but border in legend, so we need to\n * use border only when series has border if is set to be auto\n */\n var visualHasBorder = itemStyle[iconBrushType];\n itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;\n itemStyle.fill = legendItemModel.get('inactiveColor');\n itemStyle.stroke = legendItemModel.get('inactiveBorderColor');\n lineStyle.stroke = legendLineModel.get('inactiveColor');\n lineStyle.lineWidth = legendLineModel.get('inactiveWidth');\n }\n return {\n itemStyle: itemStyle,\n lineStyle: lineStyle\n };\n}\nfunction getDefaultLegendIcon(opt) {\n var symboType = opt.icon || 'roundRect';\n var icon = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect);\n icon.setStyle(opt.itemStyle);\n icon.rotation = (opt.iconRotate || 0) * Math.PI / 180;\n icon.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symboType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = '#fff';\n icon.style.lineWidth = 2;\n }\n return icon;\n}\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n });\n // highlight after select\n // TODO highlight immediately may cause animation loss.\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\nfunction isUseHoverLayer(api) {\n var list = api.getZr().storage.getDisplayList();\n var emphasisState;\n var i = 0;\n var len = list.length;\n while (i < len && !(emphasisState = list[i].states.emphasis)) {\n i++;\n }\n return emphasisState && emphasisState.hoverLayer;\n}\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nexport default LegendView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function legendFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (legendModels && legendModels.length) {\n ecModel.filterSeries(function (series) {\n // If in any legend component the status is not selected.\n // Because in legend series is assumed selected when it is not in the legend data.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(series.name)) {\n return false;\n }\n }\n return true;\n });\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport { curry, each } from 'zrender/lib/core/util.js';\nfunction legendSelectActionHandler(methodName, payload, ecModel) {\n var selectedMap = {};\n var isToggleSelect = methodName === 'toggleSelected';\n var isSelected;\n // Update all legend components\n ecModel.eachComponent('legend', function (legendModel) {\n if (isToggleSelect && isSelected != null) {\n // Force other legend has same selected status\n // Or the first is toggled to true and other are toggled to false\n // In the case one legend has some item unSelected in option. And if other legend\n // doesn't has the item, they will assume it is selected.\n legendModel[isSelected ? 'select' : 'unSelect'](payload.name);\n } else if (methodName === 'allSelect' || methodName === 'inverseSelect') {\n legendModel[methodName]();\n } else {\n legendModel[methodName](payload.name);\n isSelected = legendModel.isSelected(payload.name);\n }\n var legendData = legendModel.getData();\n each(legendData, function (model) {\n var name = model.get('name');\n // Wrap element\n if (name === '\\n' || name === '') {\n return;\n }\n var isItemSelected = legendModel.isSelected(name);\n if (selectedMap.hasOwnProperty(name)) {\n // Unselected if any legend is unselected\n selectedMap[name] = selectedMap[name] && isItemSelected;\n } else {\n selectedMap[name] = isItemSelected;\n }\n });\n });\n // Return the event explicitly\n return methodName === 'allSelect' || methodName === 'inverseSelect' ? {\n selected: selectedMap\n } : {\n name: payload.name,\n selected: selectedMap\n };\n}\nexport function installLegendAction(registers) {\n /**\n * @event legendToggleSelect\n * @type {Object}\n * @property {string} type 'legendToggleSelect'\n * @property {string} [from]\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendToggleSelect', 'legendselectchanged', curry(legendSelectActionHandler, 'toggleSelected'));\n registers.registerAction('legendAllSelect', 'legendselectall', curry(legendSelectActionHandler, 'allSelect'));\n registers.registerAction('legendInverseSelect', 'legendinverseselect', curry(legendSelectActionHandler, 'inverseSelect'));\n /**\n * @event legendSelect\n * @type {Object}\n * @property {string} type 'legendSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendSelect', 'legendselected', curry(legendSelectActionHandler, 'select'));\n /**\n * @event legendUnSelect\n * @type {Object}\n * @property {string} type 'legendUnSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendUnSelect', 'legendunselected', curry(legendSelectActionHandler, 'unSelect'));\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport LegendModel from './LegendModel.js';\nimport LegendView from './LegendView.js';\nimport legendFilter from './legendFilter.js';\nimport { installLegendAction } from './legendAction.js';\nexport function install(registers) {\n registers.registerComponentModel(LegendModel);\n registers.registerComponentView(LegendView);\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);\n registers.registerSubTypeDefaulter('legend', function () {\n return 'plain';\n });\n installLegendAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport LegendModel from './LegendModel.js';\nimport { mergeLayoutParam, getLayoutParams } from '../../util/layout.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar ScrollableLegendModel = /** @class */function (_super) {\n __extends(ScrollableLegendModel, _super);\n function ScrollableLegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendModel.type;\n return _this;\n }\n /**\n * @param {number} scrollDataIndex\n */\n ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) {\n this.option.scrollDataIndex = scrollDataIndex;\n };\n ScrollableLegendModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n _super.prototype.init.call(this, option, parentModel, ecModel);\n mergeAndNormalizeLayoutParams(this, option, inputPositionParams);\n };\n /**\n * @override\n */\n ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n mergeAndNormalizeLayoutParams(this, this.option, option);\n };\n ScrollableLegendModel.type = 'legend.scroll';\n ScrollableLegendModel.defaultOption = inheritDefaultOption(LegendModel.defaultOption, {\n scrollDataIndex: 0,\n pageButtonItemGap: 5,\n pageButtonGap: null,\n pageButtonPosition: 'end',\n pageFormatter: '{current}/{total}',\n pageIcons: {\n horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'],\n vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z']\n },\n pageIconColor: '#2f4554',\n pageIconInactiveColor: '#aaa',\n pageIconSize: 15,\n pageTextStyle: {\n color: '#333'\n },\n animationDurationUpdate: 800\n });\n return ScrollableLegendModel;\n}(LegendModel);\n;\n// Do not `ignoreSize` to enable setting {left: 10, right: 10}.\nfunction mergeAndNormalizeLayoutParams(legendModel, target, raw) {\n var orient = legendModel.getOrient();\n var ignoreSize = [1, 1];\n ignoreSize[orient.index] = 0;\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: !!ignoreSize\n });\n}\nexport default ScrollableLegendModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Separate legend and scrollable legend to reduce package size.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport LegendView from './LegendView.js';\nvar Group = graphic.Group;\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\nvar ScrollableLegendView = /** @class */function (_super) {\n __extends(ScrollableLegendView, _super);\n function ScrollableLegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendView.type;\n _this.newlineDisabled = true;\n _this._currentIndex = 0;\n return _this;\n }\n ScrollableLegendView.prototype.init = function () {\n _super.prototype.init.call(this);\n this.group.add(this._containerGroup = new Group());\n this._containerGroup.add(this.getContentGroup());\n this.group.add(this._controllerGroup = new Group());\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.resetInner = function () {\n _super.prototype.resetInner.call(this);\n this._controllerGroup.removeAll();\n this._containerGroup.removeClipPath();\n this._containerGroup.__rectSize = null;\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var self = this;\n // Render content items.\n _super.prototype.renderInner.call(this, itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n var controllerGroup = this._controllerGroup;\n // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n var pageIconSize = legendModel.get('pageIconSize', true);\n var pageIconSizeArr = zrUtil.isArray(pageIconSize) ? pageIconSize : [pageIconSize, pageIconSize];\n createPageButton('pagePrev', 0);\n var pageTextStyleModel = legendModel.getModel('pageTextStyle');\n controllerGroup.add(new graphic.Text({\n name: 'pageText',\n style: {\n // Placeholder to calculate a proper layout.\n text: 'xx/xx',\n fill: pageTextStyleModel.getTextColor(),\n font: pageTextStyleModel.getFont(),\n verticalAlign: 'middle',\n align: 'center'\n },\n silent: true\n }));\n createPageButton('pageNext', 1);\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], {\n // Buttons will be created in each render, so we do not need\n // to worry about avoiding using legendModel kept in scope.\n onclick: zrUtil.bind(self._pageGo, self, pageDataIndexName, legendModel, api)\n }, {\n x: -pageIconSizeArr[0] / 2,\n y: -pageIconSizeArr[1] / 2,\n width: pageIconSizeArr[0],\n height: pageIconSizeArr[1]\n });\n icon.name = name;\n controllerGroup.add(icon);\n }\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var hw = WH[1 - orientIdx];\n var yx = XY[1 - orientIdx];\n selector && layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx, xy);\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n } else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2;\n mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]);\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n selectorGroup.markRedraw();\n }\n return mainRect;\n };\n ScrollableLegendView.prototype._layoutContentAndController = function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx, xy) {\n var contentGroup = this.getContentGroup();\n var containerGroup = this._containerGroup;\n var controllerGroup = this._controllerGroup;\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height);\n layoutUtil.box(\n // Buttons in controller are layout always horizontally.\n 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true));\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh];\n // In case that the inner elements of contentGroup layout do not based on [0, 0]\n var contentPos = [-contentRect.x, -contentRect.y];\n // Remain contentPos when scroll animation perfroming.\n // If first rendering, `contentGroup.position` is [0, 0], which\n // does not make sense and may cause unexepcted animation if adopted.\n if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup[xy];\n }\n // Layout container group based on 0.\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true));\n // Place containerGroup and controllerGroup and contentGroup.\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true);\n // controller is on the right / bottom.\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n }\n // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n }\n // Always align controller to content as 'middle'.\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n contentGroup.setPosition(contentPos);\n containerGroup.setPosition(containerPos);\n controllerGroup.setPosition(controllerPos);\n // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n var mainRect = {\n x: 0,\n y: 0\n };\n // Consider content may be overflow (should be clipped).\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]);\n // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n containerGroup.__rectSize = maxSize[wh];\n if (showController) {\n var clipShape = {\n x: 0,\n y: 0\n };\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({\n shape: clipShape\n }));\n // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n containerGroup.__rectSize = clipShape[wh];\n } else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({\n invisible: true,\n silent: true\n });\n });\n }\n // Content translate animation.\n var pageInfo = this._getPageInfo(legendModel);\n pageInfo.pageIndex != null && graphic.updateProps(contentGroup, {\n x: pageInfo.contentPosition[0],\n y: pageInfo.contentPosition[1]\n },\n // When switch from \"show controller\" to \"not show controller\", view should be\n // updated immediately without animation, otherwise causes weird effect.\n showController ? legendModel : null);\n this._updatePageInfoView(legendModel, pageInfo);\n return mainRect;\n };\n ScrollableLegendView.prototype._pageGo = function (to, legendModel, api) {\n var scrollDataIndex = this._getPageInfo(legendModel)[to];\n scrollDataIndex != null && api.dispatchAction({\n type: 'legendScroll',\n scrollDataIndex: scrollDataIndex,\n legendId: legendModel.id\n });\n };\n ScrollableLegendView.prototype._updatePageInfoView = function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var key = name + 'DataIndex';\n var canJump = pageInfo[key] != null;\n var icon = controllerGroup.childOfName(name);\n if (icon) {\n icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true));\n icon.cursor = canJump ? 'pointer' : 'default';\n }\n });\n var pageText = controllerGroup.childOfName('pageText');\n var pageFormatter = legendModel.get('pageFormatter');\n var pageIndex = pageInfo.pageIndex;\n var current = pageIndex != null ? pageIndex + 1 : 0;\n var total = pageInfo.pageCount;\n pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current == null ? '' : current + '').replace('{total}', total == null ? '' : total + '') : pageFormatter({\n current: current,\n total: total\n }));\n };\n /**\n * contentPosition: Array., null when data item not found.\n * pageIndex: number, null when data item not found.\n * pageCount: number, always be a number, can be 0.\n * pagePrevDataIndex: number, null when no previous page.\n * pageNextDataIndex: number, null when no next page.\n * }\n */\n ScrollableLegendView.prototype._getPageInfo = function (legendModel) {\n var scrollDataIndex = legendModel.get('scrollDataIndex', true);\n var contentGroup = this.getContentGroup();\n var containerRectSize = this._containerGroup.__rectSize;\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var targetItemIndex = this._findTargetItemIndex(scrollDataIndex);\n var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n var result = {\n contentPosition: [contentGroup.x, contentGroup.y],\n pageCount: pCount,\n pageIndex: pCount - 1,\n pagePrevDataIndex: null,\n pageNextDataIndex: null\n };\n if (!targetItem) {\n return result;\n }\n var targetItemInfo = getItemInfo(targetItem);\n result.contentPosition[orientIdx] = -targetItemInfo.s;\n // Strategy:\n // (1) Always align based on the left/top most item.\n // (2) It is user-friendly that the last item shown in the\n // current window is shown at the begining of next window.\n // Otherwise if half of the last item is cut by the window,\n // it will have no chance to display entirely.\n // (3) Consider that item size probably be different, we\n // have calculate pageIndex by size rather than item index,\n // and we can not get page index directly by division.\n // (4) The window is to narrow to contain more than\n // one item, we should make sure that the page can be fliped.\n for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // Half of the last item is out of the window.\n !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize\n // If the current item does not intersect with the window, the new page\n // can be started at the current item or the last item.\n || currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n } else {\n // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n }\n }\n winEndItemInfo = currItemInfo;\n }\n for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // If the the end item does not intersect with the window started\n // from the current item, a page can be settled.\n (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)\n // e.g., when page size is smaller than item size.\n ) && winStartItemInfo.i < winEndItemInfo.i) {\n winEndItemInfo = winStartItemInfo;\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n ++result.pageIndex;\n }\n winStartItemInfo = currItemInfo;\n }\n return result;\n function getItemInfo(el) {\n if (el) {\n var itemRect = el.getBoundingRect();\n var start = itemRect[xy] + el[xy];\n return {\n s: start,\n e: start + itemRect[wh],\n i: el.__legendDataIndex\n };\n }\n }\n function intersect(itemInfo, winStart) {\n return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize;\n }\n };\n ScrollableLegendView.prototype._findTargetItemIndex = function (targetDataIndex) {\n if (!this._showController) {\n return 0;\n }\n var index;\n var contentGroup = this.getContentGroup();\n var defaultIndex;\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex;\n // FIXME\n // If the given targetDataIndex (from model) is illegal,\n // we use defaultIndex. But the index on the legend model and\n // action payload is still illegal. That case will not be\n // changed until some scenario requires.\n if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n return index != null ? index : defaultIndex;\n };\n ScrollableLegendView.type = 'legend.scroll';\n return ScrollableLegendView;\n}(LegendView);\nexport default ScrollableLegendView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport default function installScrollableLegendAction(registers) {\n /**\n * @event legendScroll\n * @type {Object}\n * @property {string} type 'legendScroll'\n * @property {string} scrollDataIndex\n */\n registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) {\n var scrollDataIndex = payload.scrollDataIndex;\n scrollDataIndex != null && ecModel.eachComponent({\n mainType: 'legend',\n subType: 'scroll',\n query: payload\n }, function (legendModel) {\n legendModel.setScrollDataIndex(scrollDataIndex);\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport ScrollableLegendModel from './ScrollableLegendModel.js';\nimport ScrollableLegendView from './ScrollableLegendView.js';\nimport installScrollableLegendAction from './scrollableLegendAction.js';\nexport function install(registers) {\n use(installLegendPlain);\n registers.registerComponentModel(ScrollableLegendModel);\n registers.registerComponentView(ScrollableLegendView);\n installScrollableLegendAction(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport { install as installLegendScroll } from './installLegendScroll.js';\nexport function install(registers) {\n use(installLegendPlain);\n use(installLegendScroll);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar InsideZoomModel = /** @class */function (_super) {\n __extends(InsideZoomModel, _super);\n function InsideZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = InsideZoomModel.type;\n return _this;\n }\n InsideZoomModel.type = 'dataZoom.inside';\n InsideZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, {\n disabled: false,\n zoomLock: false,\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true\n });\n return InsideZoomModel;\n}(DataZoomModel);\nexport default InsideZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Only create one roam controller for each coordinate system.\n// one roam controller might be refered by two inside data zoom\n// components (for example, one for x and one for y). When user\n// pan or zoom, only dispatch one action for those data zoom\n// components.\nimport RoamController from '../../component/helper/RoamController.js';\nimport * as throttleUtil from '../../util/throttle.js';\nimport { makeInner } from '../../util/model.js';\nimport { each, curry, createHashMap } from 'zrender/lib/core/util.js';\nimport { collectReferCoordSysModelInfo } from './helper.js';\nvar inner = makeInner();\nexport function setViewInfoToCoordSysRecord(api, dataZoomModel, getRange) {\n inner(api).coordSysRecordMap.each(function (coordSysRecord) {\n var dzInfo = coordSysRecord.dataZoomInfoMap.get(dataZoomModel.uid);\n if (dzInfo) {\n dzInfo.getRange = getRange;\n }\n });\n}\nexport function disposeCoordSysRecordIfNeeded(api, dataZoomModel) {\n var coordSysRecordMap = inner(api).coordSysRecordMap;\n var coordSysKeyArr = coordSysRecordMap.keys();\n for (var i = 0; i < coordSysKeyArr.length; i++) {\n var coordSysKey = coordSysKeyArr[i];\n var coordSysRecord = coordSysRecordMap.get(coordSysKey);\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap;\n if (dataZoomInfoMap) {\n var dzUid = dataZoomModel.uid;\n var dzInfo = dataZoomInfoMap.get(dzUid);\n if (dzInfo) {\n dataZoomInfoMap.removeKey(dzUid);\n if (!dataZoomInfoMap.keys().length) {\n disposeCoordSysRecord(coordSysRecordMap, coordSysRecord);\n }\n }\n }\n }\n}\nfunction disposeCoordSysRecord(coordSysRecordMap, coordSysRecord) {\n if (coordSysRecord) {\n coordSysRecordMap.removeKey(coordSysRecord.model.uid);\n var controller = coordSysRecord.controller;\n controller && controller.dispose();\n }\n}\nfunction createCoordSysRecord(api, coordSysModel) {\n // These init props will never change after record created.\n var coordSysRecord = {\n model: coordSysModel,\n containsPoint: curry(containsPoint, coordSysModel),\n dispatchAction: curry(dispatchAction, api),\n dataZoomInfoMap: null,\n controller: null\n };\n // Must not do anything depends on coordSysRecord outside the event handler here,\n // because coordSysRecord not completed yet.\n var controller = coordSysRecord.controller = new RoamController(api.getZr());\n each(['pan', 'zoom', 'scrollMove'], function (eventName) {\n controller.on(eventName, function (event) {\n var batch = [];\n coordSysRecord.dataZoomInfoMap.each(function (dzInfo) {\n // Check whether the behaviors (zoomOnMouseWheel, moveOnMouseMove,\n // moveOnMouseWheel, ...) enabled.\n if (!event.isAvailableBehavior(dzInfo.model.option)) {\n return;\n }\n var method = (dzInfo.getRange || {})[eventName];\n var range = method && method(dzInfo.dzReferCoordSysInfo, coordSysRecord.model.mainType, coordSysRecord.controller, event);\n !dzInfo.model.get('disabled', true) && range && batch.push({\n dataZoomId: dzInfo.model.id,\n start: range[0],\n end: range[1]\n });\n });\n batch.length && coordSysRecord.dispatchAction(batch);\n });\n });\n return coordSysRecord;\n}\n/**\n * This action will be throttled.\n */\nfunction dispatchAction(api, batch) {\n if (!api.isDisposed()) {\n api.dispatchAction({\n type: 'dataZoom',\n animation: {\n easing: 'cubicOut',\n duration: 100\n },\n batch: batch\n });\n }\n}\nfunction containsPoint(coordSysModel, e, x, y) {\n return coordSysModel.coordinateSystem.containPoint([x, y]);\n}\n/**\n * Merge roamController settings when multiple dataZooms share one roamController.\n */\nfunction mergeControllerParams(dataZoomInfoMap) {\n var controlType;\n // DO NOT use reserved word (true, false, undefined) as key literally. Even if encapsulated\n // as string, it is probably revert to reserved word by compress tool. See #7411.\n var prefix = 'type_';\n var typePriority = {\n 'type_true': 2,\n 'type_move': 1,\n 'type_false': 0,\n 'type_undefined': -1\n };\n var preventDefaultMouseMove = true;\n dataZoomInfoMap.each(function (dataZoomInfo) {\n var dataZoomModel = dataZoomInfo.model;\n var oneType = dataZoomModel.get('disabled', true) ? false : dataZoomModel.get('zoomLock', true) ? 'move' : true;\n if (typePriority[prefix + oneType] > typePriority[prefix + controlType]) {\n controlType = oneType;\n }\n // Prevent default move event by default. If one false, do not prevent. Otherwise\n // users may be confused why it does not work when multiple insideZooms exist.\n preventDefaultMouseMove = preventDefaultMouseMove && dataZoomModel.get('preventDefaultMouseMove', true);\n });\n return {\n controlType: controlType,\n opt: {\n // RoamController will enable all of these functionalities,\n // and the final behavior is determined by its event listener\n // provided by each inside zoom.\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n moveOnMouseWheel: true,\n preventDefaultMouseMove: !!preventDefaultMouseMove\n }\n };\n}\nexport function installDataZoomRoamProcessor(registers) {\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, function (ecModel, api) {\n var apiInner = inner(api);\n var coordSysRecordMap = apiInner.coordSysRecordMap || (apiInner.coordSysRecordMap = createHashMap());\n coordSysRecordMap.each(function (coordSysRecord) {\n // `coordSysRecordMap` always exists (because it holds the `roam controller`, which should\n // better not re-create each time), but clear `dataZoomInfoMap` each round of the workflow.\n coordSysRecord.dataZoomInfoMap = null;\n });\n ecModel.eachComponent({\n mainType: 'dataZoom',\n subType: 'inside'\n }, function (dataZoomModel) {\n var dzReferCoordSysWrap = collectReferCoordSysModelInfo(dataZoomModel);\n each(dzReferCoordSysWrap.infoList, function (dzCoordSysInfo) {\n var coordSysUid = dzCoordSysInfo.model.uid;\n var coordSysRecord = coordSysRecordMap.get(coordSysUid) || coordSysRecordMap.set(coordSysUid, createCoordSysRecord(api, dzCoordSysInfo.model));\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap || (coordSysRecord.dataZoomInfoMap = createHashMap());\n // Notice these props might be changed each time for a single dataZoomModel.\n dataZoomInfoMap.set(dataZoomModel.uid, {\n dzReferCoordSysInfo: dzCoordSysInfo,\n model: dataZoomModel,\n getRange: null\n });\n });\n });\n // (1) Merge dataZoom settings for each coord sys and set to the roam controller.\n // (2) Clear coord sys if not refered by any dataZoom.\n coordSysRecordMap.each(function (coordSysRecord) {\n var controller = coordSysRecord.controller;\n var firstDzInfo;\n var dataZoomInfoMap = coordSysRecord.dataZoomInfoMap;\n if (dataZoomInfoMap) {\n var firstDzKey = dataZoomInfoMap.keys()[0];\n if (firstDzKey != null) {\n firstDzInfo = dataZoomInfoMap.get(firstDzKey);\n }\n }\n if (!firstDzInfo) {\n disposeCoordSysRecord(coordSysRecordMap, coordSysRecord);\n return;\n }\n var controllerParams = mergeControllerParams(dataZoomInfoMap);\n controller.enable(controllerParams.controlType, controllerParams.opt);\n controller.setPointerChecker(coordSysRecord.containsPoint);\n throttleUtil.createOrUpdate(coordSysRecord, 'dispatchAction', firstDzInfo.model.get('throttle', true), 'fixRate');\n });\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomView from './DataZoomView.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport * as roams from './roams.js';\nimport { bind } from 'zrender/lib/core/util.js';\nvar InsideZoomView = /** @class */function (_super) {\n __extends(InsideZoomView, _super);\n function InsideZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataZoom.inside';\n return _this;\n }\n InsideZoomView.prototype.render = function (dataZoomModel, ecModel, api) {\n _super.prototype.render.apply(this, arguments);\n if (dataZoomModel.noTarget()) {\n this._clear();\n return;\n }\n // Hence the `throttle` util ensures to preserve command order,\n // here simply updating range all the time will not cause missing\n // any of the the roam change.\n this.range = dataZoomModel.getPercentRange();\n // Reset controllers.\n roams.setViewInfoToCoordSysRecord(api, dataZoomModel, {\n pan: bind(getRangeHandlers.pan, this),\n zoom: bind(getRangeHandlers.zoom, this),\n scrollMove: bind(getRangeHandlers.scrollMove, this)\n });\n };\n InsideZoomView.prototype.dispose = function () {\n this._clear();\n _super.prototype.dispose.apply(this, arguments);\n };\n InsideZoomView.prototype._clear = function () {\n roams.disposeCoordSysRecordIfNeeded(this.api, this.dataZoomModel);\n this.range = null;\n };\n InsideZoomView.type = 'dataZoom.inside';\n return InsideZoomView;\n}(DataZoomView);\nvar getRangeHandlers = {\n zoom: function (coordSysInfo, coordSysMainType, controller, e) {\n var lastRange = this.range;\n var range = lastRange.slice();\n // Calculate transform by the first axis.\n var axisModel = coordSysInfo.axisModels[0];\n if (!axisModel) {\n return;\n }\n var directionInfo = getDirectionInfo[coordSysMainType](null, [e.originX, e.originY], axisModel, controller, coordSysInfo);\n var percentPoint = (directionInfo.signal > 0 ? directionInfo.pixelStart + directionInfo.pixelLength - directionInfo.pixel : directionInfo.pixel - directionInfo.pixelStart) / directionInfo.pixelLength * (range[1] - range[0]) + range[0];\n var scale = Math.max(1 / e.scale, 0);\n range[0] = (range[0] - percentPoint) * scale + percentPoint;\n range[1] = (range[1] - percentPoint) * scale + percentPoint;\n // Restrict range.\n var minMaxSpan = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n sliderMove(0, range, [0, 100], 0, minMaxSpan.minSpan, minMaxSpan.maxSpan);\n this.range = range;\n if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) {\n return range;\n }\n },\n pan: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) {\n var directionInfo = getDirectionInfo[coordSysMainType]([e.oldX, e.oldY], [e.newX, e.newY], axisModel, controller, coordSysInfo);\n return directionInfo.signal * (range[1] - range[0]) * directionInfo.pixel / directionInfo.pixelLength;\n }),\n scrollMove: makeMover(function (range, axisModel, coordSysInfo, coordSysMainType, controller, e) {\n var directionInfo = getDirectionInfo[coordSysMainType]([0, 0], [e.scrollDelta, e.scrollDelta], axisModel, controller, coordSysInfo);\n return directionInfo.signal * (range[1] - range[0]) * e.scrollDelta;\n })\n};\nfunction makeMover(getPercentDelta) {\n return function (coordSysInfo, coordSysMainType, controller, e) {\n var lastRange = this.range;\n var range = lastRange.slice();\n // Calculate transform by the first axis.\n var axisModel = coordSysInfo.axisModels[0];\n if (!axisModel) {\n return;\n }\n var percentDelta = getPercentDelta(range, axisModel, coordSysInfo, coordSysMainType, controller, e);\n sliderMove(percentDelta, range, [0, 100], 'all');\n this.range = range;\n if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) {\n return range;\n }\n };\n}\nvar getDirectionInfo = {\n grid: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var ret = {};\n var rect = coordSysInfo.model.coordinateSystem.getRect();\n oldPoint = oldPoint || [0, 0];\n if (axis.dim === 'x') {\n ret.pixel = newPoint[0] - oldPoint[0];\n ret.pixelLength = rect.width;\n ret.pixelStart = rect.x;\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // axis.dim === 'y'\n ret.pixel = newPoint[1] - oldPoint[1];\n ret.pixelLength = rect.height;\n ret.pixelStart = rect.y;\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n },\n polar: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var ret = {};\n var polar = coordSysInfo.model.coordinateSystem;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var angleExtent = polar.getAngleAxis().getExtent();\n oldPoint = oldPoint ? polar.pointToCoord(oldPoint) : [0, 0];\n newPoint = polar.pointToCoord(newPoint);\n if (axisModel.mainType === 'radiusAxis') {\n ret.pixel = newPoint[0] - oldPoint[0];\n // ret.pixelLength = Math.abs(radiusExtent[1] - radiusExtent[0]);\n // ret.pixelStart = Math.min(radiusExtent[0], radiusExtent[1]);\n ret.pixelLength = radiusExtent[1] - radiusExtent[0];\n ret.pixelStart = radiusExtent[0];\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // 'angleAxis'\n ret.pixel = newPoint[1] - oldPoint[1];\n // ret.pixelLength = Math.abs(angleExtent[1] - angleExtent[0]);\n // ret.pixelStart = Math.min(angleExtent[0], angleExtent[1]);\n ret.pixelLength = angleExtent[1] - angleExtent[0];\n ret.pixelStart = angleExtent[0];\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n },\n singleAxis: function (oldPoint, newPoint, axisModel, controller, coordSysInfo) {\n var axis = axisModel.axis;\n var rect = coordSysInfo.model.coordinateSystem.getRect();\n var ret = {};\n oldPoint = oldPoint || [0, 0];\n if (axis.orient === 'horizontal') {\n ret.pixel = newPoint[0] - oldPoint[0];\n ret.pixelLength = rect.width;\n ret.pixelStart = rect.x;\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // 'vertical'\n ret.pixel = newPoint[1] - oldPoint[1];\n ret.pixelLength = rect.height;\n ret.pixelStart = rect.y;\n ret.signal = axis.inverse ? -1 : 1;\n }\n return ret;\n }\n};\nexport default InsideZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport InsideZoomModel from './InsideZoomModel.js';\nimport InsideZoomView from './InsideZoomView.js';\nimport { installDataZoomRoamProcessor } from './roams.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n installCommon(registers);\n registers.registerComponentModel(InsideZoomModel);\n registers.registerComponentView(InsideZoomView);\n installDataZoomRoamProcessor(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport DataZoomModel from './DataZoomModel.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar SliderZoomModel = /** @class */function (_super) {\n __extends(SliderZoomModel, _super);\n function SliderZoomModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderZoomModel.type;\n return _this;\n }\n SliderZoomModel.type = 'dataZoom.slider';\n SliderZoomModel.layoutMode = 'box';\n SliderZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, {\n show: true,\n // deault value can only be drived in view stage.\n right: 'ph',\n top: 'ph',\n width: 'ph',\n height: 'ph',\n left: null,\n bottom: null,\n borderColor: '#d2dbee',\n borderRadius: 3,\n backgroundColor: 'rgba(47,69,84,0)',\n // dataBackgroundColor: '#ddd',\n dataBackground: {\n lineStyle: {\n color: '#d2dbee',\n width: 0.5\n },\n areaStyle: {\n color: '#d2dbee',\n opacity: 0.2\n }\n },\n selectedDataBackground: {\n lineStyle: {\n color: '#8fb0f7',\n width: 0.5\n },\n areaStyle: {\n color: '#8fb0f7',\n opacity: 0.2\n }\n },\n // Color of selected window.\n fillerColor: 'rgba(135,175,274,0.2)',\n handleIcon: 'path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z',\n // Percent of the slider height\n handleSize: '100%',\n handleStyle: {\n color: '#fff',\n borderColor: '#ACB8D1'\n },\n moveHandleSize: 7,\n moveHandleIcon: 'path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z',\n moveHandleStyle: {\n color: '#D2DBEE',\n opacity: 0.7\n },\n showDetail: true,\n showDataShadow: 'auto',\n realtime: true,\n zoomLock: false,\n textStyle: {\n color: '#6E7079'\n },\n brushSelect: true,\n brushStyle: {\n color: 'rgba(135,175,274,0.15)'\n },\n emphasis: {\n handleStyle: {\n borderColor: '#8FB0F7'\n },\n moveHandleStyle: {\n color: '#8FB0F7'\n }\n }\n });\n return SliderZoomModel;\n}(DataZoomModel);\nexport default SliderZoomModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport { bind, each, isFunction, isString, indexOf } from 'zrender/lib/core/util.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as throttle from '../../util/throttle.js';\nimport DataZoomView from './DataZoomView.js';\nimport { linearMap, asc, parsePercent } from '../../util/number.js';\nimport * as layout from '../../util/layout.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport { getAxisMainType, collectReferCoordSysModelInfo } from './helper.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { createSymbol, symbolBuildProxies } from '../../util/symbol.js';\nimport { deprecateLog } from '../../util/log.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nvar Rect = graphic.Rect;\n// Constants\nvar DEFAULT_LOCATION_EDGE_GAP = 7;\nvar DEFAULT_FRAME_BORDER_WIDTH = 1;\nvar DEFAULT_FILLER_SIZE = 30;\nvar DEFAULT_MOVE_HANDLE_SIZE = 7;\nvar HORIZONTAL = 'horizontal';\nvar VERTICAL = 'vertical';\nvar LABEL_GAP = 5;\nvar SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter'];\nvar REALTIME_ANIMATION_CONFIG = {\n easing: 'cubicOut',\n duration: 100,\n delay: 0\n};\nvar SliderZoomView = /** @class */function (_super) {\n __extends(SliderZoomView, _super);\n function SliderZoomView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = SliderZoomView.type;\n _this._displayables = {};\n return _this;\n }\n SliderZoomView.prototype.init = function (ecModel, api) {\n this.api = api;\n // A unique handler for each dataZoom component\n this._onBrush = bind(this._onBrush, this);\n this._onBrushEnd = bind(this._onBrushEnd, this);\n };\n SliderZoomView.prototype.render = function (dataZoomModel, ecModel, api, payload) {\n _super.prototype.render.apply(this, arguments);\n throttle.createOrUpdate(this, '_dispatchZoomAction', dataZoomModel.get('throttle'), 'fixRate');\n this._orient = dataZoomModel.getOrient();\n if (dataZoomModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n if (dataZoomModel.noTarget()) {\n this._clear();\n this.group.removeAll();\n return;\n }\n // Notice: this._resetInterval() should not be executed when payload.type\n // is 'dataZoom', origin this._range should be maintained, otherwise 'pan'\n // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction,\n if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) {\n this._buildView();\n }\n this._updateView();\n };\n SliderZoomView.prototype.dispose = function () {\n this._clear();\n _super.prototype.dispose.apply(this, arguments);\n };\n SliderZoomView.prototype._clear = function () {\n throttle.clear(this, '_dispatchZoomAction');\n var zr = this.api.getZr();\n zr.off('mousemove', this._onBrush);\n zr.off('mouseup', this._onBrushEnd);\n };\n SliderZoomView.prototype._buildView = function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n this._brushing = false;\n this._displayables.brushRect = null;\n this._resetLocation();\n this._resetInterval();\n var barGroup = this._displayables.sliderGroup = new graphic.Group();\n this._renderBackground();\n this._renderHandle();\n this._renderDataShadow();\n thisGroup.add(barGroup);\n this._positionGroup();\n };\n SliderZoomView.prototype._resetLocation = function () {\n var dataZoomModel = this.dataZoomModel;\n var api = this.api;\n var showMoveHandle = dataZoomModel.get('brushSelect');\n var moveHandleSize = showMoveHandle ? DEFAULT_MOVE_HANDLE_SIZE : 0;\n // If some of x/y/width/height are not specified,\n // auto-adapt according to target grid.\n var coordRect = this._findCoordRect();\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n // Default align by coordinate system rect.\n var positionInfo = this._orient === HORIZONTAL ? {\n // Why using 'right', because right should be used in vertical,\n // and it is better to be consistent for dealing with position param merge.\n right: ecSize.width - coordRect.x - coordRect.width,\n top: ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP - moveHandleSize,\n width: coordRect.width,\n height: DEFAULT_FILLER_SIZE\n } : {\n right: DEFAULT_LOCATION_EDGE_GAP,\n top: coordRect.y,\n width: DEFAULT_FILLER_SIZE,\n height: coordRect.height\n };\n // Do not write back to option and replace value 'ph', because\n // the 'ph' value should be recalculated when resize.\n var layoutParams = layout.getLayoutParams(dataZoomModel.option);\n // Replace the placeholder value.\n each(['right', 'top', 'width', 'height'], function (name) {\n if (layoutParams[name] === 'ph') {\n layoutParams[name] = positionInfo[name];\n }\n });\n var layoutRect = layout.getLayoutRect(layoutParams, ecSize);\n this._location = {\n x: layoutRect.x,\n y: layoutRect.y\n };\n this._size = [layoutRect.width, layoutRect.height];\n this._orient === VERTICAL && this._size.reverse();\n };\n SliderZoomView.prototype._positionGroup = function () {\n var thisGroup = this.group;\n var location = this._location;\n var orient = this._orient;\n // Just use the first axis to determine mapping.\n var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel();\n var inverse = targetAxisModel && targetAxisModel.get('inverse');\n var sliderGroup = this._displayables.sliderGroup;\n var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse;\n // Transform barGroup.\n sliderGroup.attr(orient === HORIZONTAL && !inverse ? {\n scaleY: otherAxisInverse ? 1 : -1,\n scaleX: 1\n } : orient === HORIZONTAL && inverse ? {\n scaleY: otherAxisInverse ? 1 : -1,\n scaleX: -1\n } : orient === VERTICAL && !inverse ? {\n scaleY: otherAxisInverse ? -1 : 1,\n scaleX: 1,\n rotation: Math.PI / 2\n }\n // Don't use Math.PI, considering shadow direction.\n : {\n scaleY: otherAxisInverse ? -1 : 1,\n scaleX: -1,\n rotation: Math.PI / 2\n });\n // Position barGroup\n var rect = thisGroup.getBoundingRect([sliderGroup]);\n thisGroup.x = location.x - rect.x;\n thisGroup.y = location.y - rect.y;\n thisGroup.markRedraw();\n };\n SliderZoomView.prototype._getViewExtent = function () {\n return [0, this._size[0]];\n };\n SliderZoomView.prototype._renderBackground = function () {\n var dataZoomModel = this.dataZoomModel;\n var size = this._size;\n var barGroup = this._displayables.sliderGroup;\n var brushSelect = dataZoomModel.get('brushSelect');\n barGroup.add(new Rect({\n silent: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: dataZoomModel.get('backgroundColor')\n },\n z2: -40\n }));\n // Click panel, over shadow, below handles.\n var clickPanel = new Rect({\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: 'transparent'\n },\n z2: 0,\n onclick: bind(this._onClickPanel, this)\n });\n var zr = this.api.getZr();\n if (brushSelect) {\n clickPanel.on('mousedown', this._onBrushStart, this);\n clickPanel.cursor = 'crosshair';\n zr.on('mousemove', this._onBrush);\n zr.on('mouseup', this._onBrushEnd);\n } else {\n zr.off('mousemove', this._onBrush);\n zr.off('mouseup', this._onBrushEnd);\n }\n barGroup.add(clickPanel);\n };\n SliderZoomView.prototype._renderDataShadow = function () {\n var info = this._dataShadowInfo = this._prepareDataShadowInfo();\n this._displayables.dataShadowSegs = [];\n if (!info) {\n return;\n }\n var size = this._size;\n var oldSize = this._shadowSize || [];\n var seriesModel = info.series;\n var data = seriesModel.getRawData();\n var candlestickDim = seriesModel.getShadowDim && seriesModel.getShadowDim();\n var otherDim = candlestickDim && data.getDimensionInfo(candlestickDim) ? seriesModel.getShadowDim() // @see candlestick\n : info.otherDim;\n if (otherDim == null) {\n return;\n }\n var polygonPts = this._shadowPolygonPts;\n var polylinePts = this._shadowPolylinePts;\n // Not re-render if data doesn't change.\n if (data !== this._shadowData || otherDim !== this._shadowDim || size[0] !== oldSize[0] || size[1] !== oldSize[1]) {\n var otherDataExtent_1 = data.getDataExtent(otherDim);\n // Nice extent.\n var otherOffset = (otherDataExtent_1[1] - otherDataExtent_1[0]) * 0.3;\n otherDataExtent_1 = [otherDataExtent_1[0] - otherOffset, otherDataExtent_1[1] + otherOffset];\n var otherShadowExtent_1 = [0, size[1]];\n var thisShadowExtent = [0, size[0]];\n var areaPoints_1 = [[size[0], 0], [0, 0]];\n var linePoints_1 = [];\n var step_1 = thisShadowExtent[1] / (data.count() - 1);\n var thisCoord_1 = 0;\n // Optimize for large data shadow\n var stride_1 = Math.round(data.count() / size[0]);\n var lastIsEmpty_1;\n data.each([otherDim], function (value, index) {\n if (stride_1 > 0 && index % stride_1) {\n thisCoord_1 += step_1;\n return;\n }\n // FIXME\n // Should consider axis.min/axis.max when drawing dataShadow.\n // FIXME\n // 应该使用统一的空判断?还是在list里进行空判断?\n var isEmpty = value == null || isNaN(value) || value === '';\n // See #4235.\n var otherCoord = isEmpty ? 0 : linearMap(value, otherDataExtent_1, otherShadowExtent_1, true);\n // Attempt to draw data shadow precisely when there are empty value.\n if (isEmpty && !lastIsEmpty_1 && index) {\n areaPoints_1.push([areaPoints_1[areaPoints_1.length - 1][0], 0]);\n linePoints_1.push([linePoints_1[linePoints_1.length - 1][0], 0]);\n } else if (!isEmpty && lastIsEmpty_1) {\n areaPoints_1.push([thisCoord_1, 0]);\n linePoints_1.push([thisCoord_1, 0]);\n }\n areaPoints_1.push([thisCoord_1, otherCoord]);\n linePoints_1.push([thisCoord_1, otherCoord]);\n thisCoord_1 += step_1;\n lastIsEmpty_1 = isEmpty;\n });\n polygonPts = this._shadowPolygonPts = areaPoints_1;\n polylinePts = this._shadowPolylinePts = linePoints_1;\n }\n this._shadowData = data;\n this._shadowDim = otherDim;\n this._shadowSize = [size[0], size[1]];\n var dataZoomModel = this.dataZoomModel;\n function createDataShadowGroup(isSelectedArea) {\n var model = dataZoomModel.getModel(isSelectedArea ? 'selectedDataBackground' : 'dataBackground');\n var group = new graphic.Group();\n var polygon = new graphic.Polygon({\n shape: {\n points: polygonPts\n },\n segmentIgnoreThreshold: 1,\n style: model.getModel('areaStyle').getAreaStyle(),\n silent: true,\n z2: -20\n });\n var polyline = new graphic.Polyline({\n shape: {\n points: polylinePts\n },\n segmentIgnoreThreshold: 1,\n style: model.getModel('lineStyle').getLineStyle(),\n silent: true,\n z2: -19\n });\n group.add(polygon);\n group.add(polyline);\n return group;\n }\n // let dataBackgroundModel = dataZoomModel.getModel('dataBackground');\n for (var i = 0; i < 3; i++) {\n var group = createDataShadowGroup(i === 1);\n this._displayables.sliderGroup.add(group);\n this._displayables.dataShadowSegs.push(group);\n }\n };\n SliderZoomView.prototype._prepareDataShadowInfo = function () {\n var dataZoomModel = this.dataZoomModel;\n var showDataShadow = dataZoomModel.get('showDataShadow');\n if (showDataShadow === false) {\n return;\n }\n // Find a representative series.\n var result;\n var ecModel = this.ecModel;\n dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {\n var seriesModels = dataZoomModel.getAxisProxy(axisDim, axisIndex).getTargetSeriesModels();\n each(seriesModels, function (seriesModel) {\n if (result) {\n return;\n }\n if (showDataShadow !== true && indexOf(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) {\n return;\n }\n var thisAxis = ecModel.getComponent(getAxisMainType(axisDim), axisIndex).axis;\n var otherDim = getOtherDim(axisDim);\n var otherAxisInverse;\n var coordSys = seriesModel.coordinateSystem;\n if (otherDim != null && coordSys.getOtherAxis) {\n otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse;\n }\n otherDim = seriesModel.getData().mapDimension(otherDim);\n result = {\n thisAxis: thisAxis,\n series: seriesModel,\n thisDim: axisDim,\n otherDim: otherDim,\n otherAxisInverse: otherAxisInverse\n };\n }, this);\n }, this);\n return result;\n };\n SliderZoomView.prototype._renderHandle = function () {\n var thisGroup = this.group;\n var displayables = this._displayables;\n var handles = displayables.handles = [null, null];\n var handleLabels = displayables.handleLabels = [null, null];\n var sliderGroup = this._displayables.sliderGroup;\n var size = this._size;\n var dataZoomModel = this.dataZoomModel;\n var api = this.api;\n var borderRadius = dataZoomModel.get('borderRadius') || 0;\n var brushSelect = dataZoomModel.get('brushSelect');\n var filler = displayables.filler = new Rect({\n silent: brushSelect,\n style: {\n fill: dataZoomModel.get('fillerColor')\n },\n textConfig: {\n position: 'inside'\n }\n });\n sliderGroup.add(filler);\n // Frame border.\n sliderGroup.add(new Rect({\n silent: true,\n subPixelOptimize: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1],\n r: borderRadius\n },\n style: {\n // deprecated option\n stroke: dataZoomModel.get('dataBackgroundColor') || dataZoomModel.get('borderColor'),\n lineWidth: DEFAULT_FRAME_BORDER_WIDTH,\n fill: 'rgba(0,0,0,0)'\n }\n }));\n // Left and right handle to resize\n each([0, 1], function (handleIndex) {\n var iconStr = dataZoomModel.get('handleIcon');\n if (!symbolBuildProxies[iconStr] && iconStr.indexOf('path://') < 0 && iconStr.indexOf('image://') < 0) {\n // Compatitable with the old icon parsers. Which can use a path string without path://\n iconStr = 'path://' + iconStr;\n if (process.env.NODE_ENV !== 'production') {\n deprecateLog('handleIcon now needs \\'path://\\' prefix when using a path string');\n }\n }\n var path = createSymbol(iconStr, -1, 0, 2, 2, null, true);\n path.attr({\n cursor: getCursor(this._orient),\n draggable: true,\n drift: bind(this._onDragMove, this, handleIndex),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false),\n z2: 5\n });\n var bRect = path.getBoundingRect();\n var handleSize = dataZoomModel.get('handleSize');\n this._handleHeight = parsePercent(handleSize, this._size[1]);\n this._handleWidth = bRect.width / bRect.height * this._handleHeight;\n path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle());\n path.style.strokeNoScale = true;\n path.rectHover = true;\n path.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'handleStyle']).getItemStyle();\n enableHoverEmphasis(path);\n var handleColor = dataZoomModel.get('handleColor'); // deprecated option\n // Compatitable with previous version\n if (handleColor != null) {\n path.style.fill = handleColor;\n }\n sliderGroup.add(handles[handleIndex] = path);\n var textStyleModel = dataZoomModel.getModel('textStyle');\n thisGroup.add(handleLabels[handleIndex] = new graphic.Text({\n silent: true,\n invisible: true,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: '',\n verticalAlign: 'middle',\n align: 'center',\n fill: textStyleModel.getTextColor(),\n font: textStyleModel.getFont()\n }),\n z2: 10\n }));\n }, this);\n // Handle to move. Only visible when brushSelect is set true.\n var actualMoveZone = filler;\n if (brushSelect) {\n var moveHandleHeight = parsePercent(dataZoomModel.get('moveHandleSize'), size[1]);\n var moveHandle_1 = displayables.moveHandle = new graphic.Rect({\n style: dataZoomModel.getModel('moveHandleStyle').getItemStyle(),\n silent: true,\n shape: {\n r: [0, 0, 2, 2],\n y: size[1] - 0.5,\n height: moveHandleHeight\n }\n });\n var iconSize = moveHandleHeight * 0.8;\n var moveHandleIcon = displayables.moveHandleIcon = createSymbol(dataZoomModel.get('moveHandleIcon'), -iconSize / 2, -iconSize / 2, iconSize, iconSize, '#fff', true);\n moveHandleIcon.silent = true;\n moveHandleIcon.y = size[1] + moveHandleHeight / 2 - 0.5;\n moveHandle_1.ensureState('emphasis').style = dataZoomModel.getModel(['emphasis', 'moveHandleStyle']).getItemStyle();\n var moveZoneExpandSize = Math.min(size[1] / 2, Math.max(moveHandleHeight, 10));\n actualMoveZone = displayables.moveZone = new graphic.Rect({\n invisible: true,\n shape: {\n y: size[1] - moveZoneExpandSize,\n height: moveHandleHeight + moveZoneExpandSize\n }\n });\n actualMoveZone.on('mouseover', function () {\n api.enterEmphasis(moveHandle_1);\n }).on('mouseout', function () {\n api.leaveEmphasis(moveHandle_1);\n });\n sliderGroup.add(moveHandle_1);\n sliderGroup.add(moveHandleIcon);\n sliderGroup.add(actualMoveZone);\n }\n actualMoveZone.attr({\n draggable: true,\n cursor: getCursor(this._orient),\n drift: bind(this._onDragMove, this, 'all'),\n ondragstart: bind(this._showDataInfo, this, true),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false)\n });\n };\n SliderZoomView.prototype._resetInterval = function () {\n var range = this._range = this.dataZoomModel.getPercentRange();\n var viewExtent = this._getViewExtent();\n this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)];\n };\n SliderZoomView.prototype._updateInterval = function (handleIndex, delta) {\n var dataZoomModel = this.dataZoomModel;\n var handleEnds = this._handleEnds;\n var viewExtend = this._getViewExtent();\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n var percentExtent = [0, 100];\n sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null);\n var lastRange = this._range;\n var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]);\n return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1];\n };\n SliderZoomView.prototype._updateView = function (nonRealtime) {\n var displaybles = this._displayables;\n var handleEnds = this._handleEnds;\n var handleInterval = asc(handleEnds.slice());\n var size = this._size;\n each([0, 1], function (handleIndex) {\n // Handles\n var handle = displaybles.handles[handleIndex];\n var handleHeight = this._handleHeight;\n handle.attr({\n scaleX: handleHeight / 2,\n scaleY: handleHeight / 2,\n // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.\n // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.\n x: handleEnds[handleIndex] + (handleIndex ? -1 : 1),\n y: size[1] / 2 - handleHeight / 2\n });\n }, this);\n // Filler\n displaybles.filler.setShape({\n x: handleInterval[0],\n y: 0,\n width: handleInterval[1] - handleInterval[0],\n height: size[1]\n });\n var viewExtent = {\n x: handleInterval[0],\n width: handleInterval[1] - handleInterval[0]\n };\n // Move handle\n if (displaybles.moveHandle) {\n displaybles.moveHandle.setShape(viewExtent);\n displaybles.moveZone.setShape(viewExtent);\n // Force update path on the invisible object\n displaybles.moveZone.getBoundingRect();\n displaybles.moveHandleIcon && displaybles.moveHandleIcon.attr('x', viewExtent.x + viewExtent.width / 2);\n }\n // update clip path of shadow.\n var dataShadowSegs = displaybles.dataShadowSegs;\n var segIntervals = [0, handleInterval[0], handleInterval[1], size[0]];\n for (var i = 0; i < dataShadowSegs.length; i++) {\n var segGroup = dataShadowSegs[i];\n var clipPath = segGroup.getClipPath();\n if (!clipPath) {\n clipPath = new graphic.Rect();\n segGroup.setClipPath(clipPath);\n }\n clipPath.setShape({\n x: segIntervals[i],\n y: 0,\n width: segIntervals[i + 1] - segIntervals[i],\n height: size[1]\n });\n }\n this._updateDataInfo(nonRealtime);\n };\n SliderZoomView.prototype._updateDataInfo = function (nonRealtime) {\n var dataZoomModel = this.dataZoomModel;\n var displaybles = this._displayables;\n var handleLabels = displaybles.handleLabels;\n var orient = this._orient;\n var labelTexts = ['', ''];\n // FIXME\n // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter)\n if (dataZoomModel.get('showDetail')) {\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n if (axisProxy) {\n var axis = axisProxy.getAxisModel().axis;\n var range = this._range;\n var dataInterval = nonRealtime\n // See #4434, data and axis are not processed and reset yet in non-realtime mode.\n ? axisProxy.calculateDataWindow({\n start: range[0],\n end: range[1]\n }).valueWindow : axisProxy.getDataValueWindow();\n labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)];\n }\n }\n var orderedHandleEnds = asc(this._handleEnds.slice());\n setLabel.call(this, 0);\n setLabel.call(this, 1);\n function setLabel(handleIndex) {\n // Label\n // Text should not transform by barGroup.\n // Ignore handlers transform\n var barTransform = graphic.getTransform(displaybles.handles[handleIndex].parent, this.group);\n var direction = graphic.transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform);\n var offset = this._handleWidth / 2 + LABEL_GAP;\n var textPoint = graphic.applyTransform([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform);\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n verticalAlign: orient === HORIZONTAL ? 'middle' : direction,\n align: orient === HORIZONTAL ? direction : 'center',\n text: labelTexts[handleIndex]\n });\n }\n };\n SliderZoomView.prototype._formatLabel = function (value, axis) {\n var dataZoomModel = this.dataZoomModel;\n var labelFormatter = dataZoomModel.get('labelFormatter');\n var labelPrecision = dataZoomModel.get('labelPrecision');\n if (labelPrecision == null || labelPrecision === 'auto') {\n labelPrecision = axis.getPixelPrecision();\n }\n var valueStr = value == null || isNaN(value) ? ''\n // FIXME Glue code\n : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel({\n value: Math.round(value)\n })\n // param of toFixed should less then 20.\n : value.toFixed(Math.min(labelPrecision, 20));\n return isFunction(labelFormatter) ? labelFormatter(value, valueStr) : isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr;\n };\n /**\n * @param showOrHide true: show, false: hide\n */\n SliderZoomView.prototype._showDataInfo = function (showOrHide) {\n // Always show when drgging.\n showOrHide = this._dragging || showOrHide;\n var displayables = this._displayables;\n var handleLabels = displayables.handleLabels;\n handleLabels[0].attr('invisible', !showOrHide);\n handleLabels[1].attr('invisible', !showOrHide);\n // Highlight move handle\n displayables.moveHandle && this.api[showOrHide ? 'enterEmphasis' : 'leaveEmphasis'](displayables.moveHandle, 1);\n };\n SliderZoomView.prototype._onDragMove = function (handleIndex, dx, dy, event) {\n this._dragging = true;\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(event.event);\n // Transform dx, dy to bar coordination.\n var barTransform = this._displayables.sliderGroup.getLocalTransform();\n var vertex = graphic.applyTransform([dx, dy], barTransform, true);\n var changed = this._updateInterval(handleIndex, vertex[0]);\n var realtime = this.dataZoomModel.get('realtime');\n this._updateView(!realtime);\n // Avoid dispatch dataZoom repeatly but range not changed,\n // which cause bad visual effect when progressive enabled.\n changed && realtime && this._dispatchZoomAction(true);\n };\n SliderZoomView.prototype._onDragEnd = function () {\n this._dragging = false;\n this._showDataInfo(false);\n // While in realtime mode and stream mode, dispatch action when\n // drag end will cause the whole view rerender, which is unnecessary.\n var realtime = this.dataZoomModel.get('realtime');\n !realtime && this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onClickPanel = function (e) {\n var size = this._size;\n var localPoint = this._displayables.sliderGroup.transformCoordToLocal(e.offsetX, e.offsetY);\n if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) {\n return;\n }\n var handleEnds = this._handleEnds;\n var center = (handleEnds[0] + handleEnds[1]) / 2;\n var changed = this._updateInterval('all', localPoint[0] - center);\n this._updateView();\n changed && this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onBrushStart = function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n this._brushStart = new graphic.Point(x, y);\n this._brushing = true;\n this._brushStartTime = +new Date();\n // this._updateBrushRect(x, y);\n };\n\n SliderZoomView.prototype._onBrushEnd = function (e) {\n if (!this._brushing) {\n return;\n }\n var brushRect = this._displayables.brushRect;\n this._brushing = false;\n if (!brushRect) {\n return;\n }\n brushRect.attr('ignore', true);\n var brushShape = brushRect.shape;\n var brushEndTime = +new Date();\n // console.log(brushEndTime - this._brushStartTime);\n if (brushEndTime - this._brushStartTime < 200 && Math.abs(brushShape.width) < 5) {\n // Will treat it as a click\n return;\n }\n var viewExtend = this._getViewExtent();\n var percentExtent = [0, 100];\n this._range = asc([linearMap(brushShape.x, viewExtend, percentExtent, true), linearMap(brushShape.x + brushShape.width, viewExtend, percentExtent, true)]);\n this._handleEnds = [brushShape.x, brushShape.x + brushShape.width];\n this._updateView();\n this._dispatchZoomAction(false);\n };\n SliderZoomView.prototype._onBrush = function (e) {\n if (this._brushing) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n this._updateBrushRect(e.offsetX, e.offsetY);\n }\n };\n SliderZoomView.prototype._updateBrushRect = function (mouseX, mouseY) {\n var displayables = this._displayables;\n var dataZoomModel = this.dataZoomModel;\n var brushRect = displayables.brushRect;\n if (!brushRect) {\n brushRect = displayables.brushRect = new Rect({\n silent: true,\n style: dataZoomModel.getModel('brushStyle').getItemStyle()\n });\n displayables.sliderGroup.add(brushRect);\n }\n brushRect.attr('ignore', false);\n var brushStart = this._brushStart;\n var sliderGroup = this._displayables.sliderGroup;\n var endPoint = sliderGroup.transformCoordToLocal(mouseX, mouseY);\n var startPoint = sliderGroup.transformCoordToLocal(brushStart.x, brushStart.y);\n var size = this._size;\n endPoint[0] = Math.max(Math.min(size[0], endPoint[0]), 0);\n brushRect.setShape({\n x: startPoint[0],\n y: 0,\n width: endPoint[0] - startPoint[0],\n height: size[1]\n });\n };\n /**\n * This action will be throttled.\n */\n SliderZoomView.prototype._dispatchZoomAction = function (realtime) {\n var range = this._range;\n this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n dataZoomId: this.dataZoomModel.id,\n animation: realtime ? REALTIME_ANIMATION_CONFIG : null,\n start: range[0],\n end: range[1]\n });\n };\n SliderZoomView.prototype._findCoordRect = function () {\n // Find the grid corresponding to the first axis referred by dataZoom.\n var rect;\n var coordSysInfoList = collectReferCoordSysModelInfo(this.dataZoomModel).infoList;\n if (!rect && coordSysInfoList.length) {\n var coordSys = coordSysInfoList[0].model.coordinateSystem;\n rect = coordSys.getRect && coordSys.getRect();\n }\n if (!rect) {\n var width = this.api.getWidth();\n var height = this.api.getHeight();\n rect = {\n x: width * 0.2,\n y: height * 0.2,\n width: width * 0.6,\n height: height * 0.6\n };\n }\n return rect;\n };\n SliderZoomView.type = 'dataZoom.slider';\n return SliderZoomView;\n}(DataZoomView);\nfunction getOtherDim(thisDim) {\n // FIXME\n // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好\n var map = {\n x: 'y',\n y: 'x',\n radius: 'angle',\n angle: 'radius'\n };\n return map[thisDim];\n}\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\nexport default SliderZoomView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport SliderZoomModel from './SliderZoomModel.js';\nimport SliderZoomView from './SliderZoomView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(SliderZoomModel);\n registers.registerComponentView(SliderZoomView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installDataZoomInside } from './installDataZoomInside.js';\nimport { install as installDataZoomSlider } from './installDataZoomSlider.js';\nexport function install(registers) {\n use(installDataZoomInside);\n use(installDataZoomSlider);\n // Do not install './dataZoomSelect',\n // since it only work for toolbox dataZoom.\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n/**\n * @file Visual mapping.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar visualDefault = {\n /**\n * @public\n */\n get: function (visualType, key, isCategory) {\n var value = zrUtil.clone((defaultOption[visualType] || {})[key]);\n return isCategory ? zrUtil.isArray(value) ? value[value.length - 1] : value : value;\n }\n};\nvar defaultOption = {\n color: {\n active: ['#006edd', '#e0ffff'],\n inactive: ['rgba(0,0,0,0)']\n },\n colorHue: {\n active: [0, 360],\n inactive: [0, 0]\n },\n colorSaturation: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n colorLightness: {\n active: [0.9, 0.5],\n inactive: [0, 0]\n },\n colorAlpha: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n opacity: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n symbol: {\n active: ['circle', 'roundRect', 'diamond'],\n inactive: ['none']\n },\n symbolSize: {\n active: [10, 50],\n inactive: [0, 0]\n }\n};\nexport default visualDefault;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport visualDefault from '../../visual/visualDefault.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport * as modelUtil from '../../util/model.js';\nimport * as numberUtil from '../../util/number.js';\nimport ComponentModel from '../../model/Component.js';\nvar mapVisual = VisualMapping.mapVisual;\nvar eachVisual = VisualMapping.eachVisual;\nvar isArray = zrUtil.isArray;\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\nvar linearMap = numberUtil.linearMap;\nvar VisualMapModel = /** @class */function (_super) {\n __extends(VisualMapModel, _super);\n function VisualMapModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = VisualMapModel.type;\n _this.stateList = ['inRange', 'outOfRange'];\n _this.replacableOptionKeys = ['inRange', 'outOfRange', 'target', 'controller', 'color'];\n _this.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n /**\n * [lowerBound, upperBound]\n */\n _this.dataBound = [-Infinity, Infinity];\n _this.targetVisuals = {};\n _this.controllerVisuals = {};\n return _this;\n }\n VisualMapModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, this.replacableOptionKeys);\n this.textStyleModel = this.getModel('textStyle');\n this.resetItemSize();\n this.completeVisualOption();\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.resetVisual = function (supplementVisualOption) {\n var stateList = this.stateList;\n supplementVisualOption = zrUtil.bind(supplementVisualOption, this);\n this.controllerVisuals = visualSolution.createVisualMappings(this.option.controller, stateList, supplementVisualOption);\n this.targetVisuals = visualSolution.createVisualMappings(this.option.target, stateList, supplementVisualOption);\n };\n /**\n * @public\n */\n VisualMapModel.prototype.getItemSymbol = function () {\n return null;\n };\n /**\n * @protected\n * @return {Array.} An array of series indices.\n */\n VisualMapModel.prototype.getTargetSeriesIndices = function () {\n var optionSeriesIndex = this.option.seriesIndex;\n var seriesIndices = [];\n if (optionSeriesIndex == null || optionSeriesIndex === 'all') {\n this.ecModel.eachSeries(function (seriesModel, index) {\n seriesIndices.push(index);\n });\n } else {\n seriesIndices = modelUtil.normalizeToArray(optionSeriesIndex);\n }\n return seriesIndices;\n };\n /**\n * @public\n */\n VisualMapModel.prototype.eachTargetSeries = function (callback, context) {\n zrUtil.each(this.getTargetSeriesIndices(), function (seriesIndex) {\n var seriesModel = this.ecModel.getSeriesByIndex(seriesIndex);\n if (seriesModel) {\n callback.call(context, seriesModel);\n }\n }, this);\n };\n /**\n * @pubilc\n */\n VisualMapModel.prototype.isTargetSeries = function (seriesModel) {\n var is = false;\n this.eachTargetSeries(function (model) {\n model === seriesModel && (is = true);\n });\n return is;\n };\n /**\n * @example\n * this.formatValueText(someVal); // format single numeric value to text.\n * this.formatValueText(someVal, true); // format single category value to text.\n * this.formatValueText([min, max]); // format numeric min-max to text.\n * this.formatValueText([this.dataBound[0], max]); // using data lower bound.\n * this.formatValueText([min, this.dataBound[1]]); // using data upper bound.\n *\n * @param value Real value, or this.dataBound[0 or 1].\n * @param isCategory Only available when value is number.\n * @param edgeSymbols Open-close symbol when value is interval.\n * @protected\n */\n VisualMapModel.prototype.formatValueText = function (value, isCategory, edgeSymbols) {\n var option = this.option;\n var precision = option.precision;\n var dataBound = this.dataBound;\n var formatter = option.formatter;\n var isMinMax;\n edgeSymbols = edgeSymbols || ['<', '>'];\n if (zrUtil.isArray(value)) {\n value = value.slice();\n isMinMax = true;\n }\n var textValue = isCategory ? value // Value is string when isCategory\n : isMinMax ? [toFixed(value[0]), toFixed(value[1])] : toFixed(value);\n if (zrUtil.isString(formatter)) {\n return formatter.replace('{value}', isMinMax ? textValue[0] : textValue).replace('{value2}', isMinMax ? textValue[1] : textValue);\n } else if (zrUtil.isFunction(formatter)) {\n return isMinMax ? formatter(value[0], value[1]) : formatter(value);\n }\n if (isMinMax) {\n if (value[0] === dataBound[0]) {\n return edgeSymbols[0] + ' ' + textValue[1];\n } else if (value[1] === dataBound[1]) {\n return edgeSymbols[1] + ' ' + textValue[0];\n } else {\n return textValue[0] + ' - ' + textValue[1];\n }\n } else {\n // Format single value (includes category case).\n return textValue;\n }\n function toFixed(val) {\n return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20));\n }\n };\n /**\n * @protected\n */\n VisualMapModel.prototype.resetExtent = function () {\n var thisOption = this.option;\n // Can not calculate data extent by data here.\n // Because series and data may be modified in processing stage.\n // So we do not support the feature \"auto min/max\".\n var extent = asc([thisOption.min, thisOption.max]);\n this._dataExtent = extent;\n };\n /**\n * PENDING:\n * delete this method if no outer usage.\n *\n * Return Concrete dimension. If null/undefined is returned, no dimension is used.\n */\n // getDataDimension(data: SeriesData) {\n // const optDim = this.option.dimension;\n // if (optDim != null) {\n // return data.getDimension(optDim);\n // }\n // const dimNames = data.dimensions;\n // for (let i = dimNames.length - 1; i >= 0; i--) {\n // const dimName = dimNames[i];\n // const dimInfo = data.getDimensionInfo(dimName);\n // if (!dimInfo.isCalculationCoord) {\n // return dimName;\n // }\n // }\n // }\n VisualMapModel.prototype.getDataDimensionIndex = function (data) {\n var optDim = this.option.dimension;\n if (optDim != null) {\n return data.getDimensionIndex(optDim);\n }\n var dimNames = data.dimensions;\n for (var i = dimNames.length - 1; i >= 0; i--) {\n var dimName = dimNames[i];\n var dimInfo = data.getDimensionInfo(dimName);\n if (!dimInfo.isCalculationCoord) {\n return dimInfo.storeDimIndex;\n }\n }\n };\n VisualMapModel.prototype.getExtent = function () {\n return this._dataExtent.slice();\n };\n VisualMapModel.prototype.completeVisualOption = function () {\n var ecModel = this.ecModel;\n var thisOption = this.option;\n var base = {\n inRange: thisOption.inRange,\n outOfRange: thisOption.outOfRange\n };\n var target = thisOption.target || (thisOption.target = {});\n var controller = thisOption.controller || (thisOption.controller = {});\n zrUtil.merge(target, base); // Do not override\n zrUtil.merge(controller, base); // Do not override\n var isCategory = this.isCategory();\n completeSingle.call(this, target);\n completeSingle.call(this, controller);\n completeInactive.call(this, target, 'inRange', 'outOfRange');\n // completeInactive.call(this, target, 'outOfRange', 'inRange');\n completeController.call(this, controller);\n function completeSingle(base) {\n // Compatible with ec2 dataRange.color.\n // The mapping order of dataRange.color is: [high value, ..., low value]\n // whereas inRange.color and outOfRange.color is [low value, ..., high value]\n // Notice: ec2 has no inverse.\n if (isArray(thisOption.color)\n // If there has been inRange: {symbol: ...}, adding color is a mistake.\n // So adding color only when no inRange defined.\n && !base.inRange) {\n base.inRange = {\n color: thisOption.color.slice().reverse()\n };\n }\n // Compatible with previous logic, always give a default color, otherwise\n // simple config with no inRange and outOfRange will not work.\n // Originally we use visualMap.color as the default color, but setOption at\n // the second time the default color will be erased. So we change to use\n // constant DEFAULT_COLOR.\n // If user do not want the default color, set inRange: {color: null}.\n base.inRange = base.inRange || {\n color: ecModel.get('gradientColor')\n };\n }\n function completeInactive(base, stateExist, stateAbsent) {\n var optExist = base[stateExist];\n var optAbsent = base[stateAbsent];\n if (optExist && !optAbsent) {\n optAbsent = base[stateAbsent] = {};\n each(optExist, function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n var defa = visualDefault.get(visualType, 'inactive', isCategory);\n if (defa != null) {\n optAbsent[visualType] = defa;\n // Compatibable with ec2:\n // Only inactive color to rgba(0,0,0,0) can not\n // make label transparent, so use opacity also.\n if (visualType === 'color' && !optAbsent.hasOwnProperty('opacity') && !optAbsent.hasOwnProperty('colorAlpha')) {\n optAbsent.opacity = [0, 0];\n }\n }\n });\n }\n }\n function completeController(controller) {\n var symbolExists = (controller.inRange || {}).symbol || (controller.outOfRange || {}).symbol;\n var symbolSizeExists = (controller.inRange || {}).symbolSize || (controller.outOfRange || {}).symbolSize;\n var inactiveColor = this.get('inactiveColor');\n var itemSymbol = this.getItemSymbol();\n var defaultSymbol = itemSymbol || 'roundRect';\n each(this.stateList, function (state) {\n var itemSize = this.itemSize;\n var visuals = controller[state];\n // Set inactive color for controller if no other color\n // attr (like colorAlpha) specified.\n if (!visuals) {\n visuals = controller[state] = {\n color: isCategory ? inactiveColor : [inactiveColor]\n };\n }\n // Consistent symbol and symbolSize if not specified.\n if (visuals.symbol == null) {\n visuals.symbol = symbolExists && zrUtil.clone(symbolExists) || (isCategory ? defaultSymbol : [defaultSymbol]);\n }\n if (visuals.symbolSize == null) {\n visuals.symbolSize = symbolSizeExists && zrUtil.clone(symbolSizeExists) || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]);\n }\n // Filter none\n visuals.symbol = mapVisual(visuals.symbol, function (symbol) {\n return symbol === 'none' ? defaultSymbol : symbol;\n });\n // Normalize symbolSize\n var symbolSize = visuals.symbolSize;\n if (symbolSize != null) {\n var max_1 = -Infinity;\n // symbolSize can be object when categories defined.\n eachVisual(symbolSize, function (value) {\n value > max_1 && (max_1 = value);\n });\n visuals.symbolSize = mapVisual(symbolSize, function (value) {\n return linearMap(value, [0, max_1], [0, itemSize[0]], true);\n });\n }\n }, this);\n }\n };\n VisualMapModel.prototype.resetItemSize = function () {\n this.itemSize = [parseFloat(this.get('itemWidth')), parseFloat(this.get('itemHeight'))];\n };\n VisualMapModel.prototype.isCategory = function () {\n return !!this.option.categories;\n };\n /**\n * @public\n * @abstract\n */\n VisualMapModel.prototype.setSelected = function (selected) {};\n VisualMapModel.prototype.getSelected = function () {\n return null;\n };\n /**\n * @public\n * @abstract\n */\n VisualMapModel.prototype.getValueState = function (value) {\n return null;\n };\n /**\n * FIXME\n * Do not publish to thirt-part-dev temporarily\n * util the interface is stable. (Should it return\n * a function but not visual meta?)\n *\n * @pubilc\n * @abstract\n * @param getColorVisual\n * params: value, valueState\n * return: color\n * @return {Object} visualMeta\n * should includes {stops, outerColors}\n * outerColor means [colorBeyondMinValue, colorBeyondMaxValue]\n */\n VisualMapModel.prototype.getVisualMeta = function (getColorVisual) {\n return null;\n };\n VisualMapModel.type = 'visualMap';\n VisualMapModel.dependencies = ['series'];\n VisualMapModel.defaultOption = {\n show: true,\n // zlevel: 0,\n z: 4,\n seriesIndex: 'all',\n min: 0,\n max: 200,\n left: 0,\n right: null,\n top: null,\n bottom: 0,\n itemWidth: null,\n itemHeight: null,\n inverse: false,\n orient: 'vertical',\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n contentColor: '#5793f3',\n inactiveColor: '#aaa',\n borderWidth: 0,\n padding: 5,\n // 接受数组分别设定上右下左边距,同css\n textGap: 10,\n precision: 0,\n textStyle: {\n color: '#333' // 值域文字颜色\n }\n };\n\n return VisualMapModel;\n}(ComponentModel);\nexport default VisualMapModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapModel from './VisualMapModel.js';\nimport * as numberUtil from '../../util/number.js';\nimport { inheritDefaultOption } from '../../util/component.js';\n// Constant\nvar DEFAULT_BAR_BOUND = [20, 140];\nvar ContinuousModel = /** @class */function (_super) {\n __extends(ContinuousModel, _super);\n function ContinuousModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ContinuousModel.type;\n return _this;\n }\n /**\n * @override\n */\n ContinuousModel.prototype.optionUpdated = function (newOption, isInit) {\n _super.prototype.optionUpdated.apply(this, arguments);\n this.resetExtent();\n this.resetVisual(function (mappingOption) {\n mappingOption.mappingMethod = 'linear';\n mappingOption.dataExtent = this.getExtent();\n });\n this._resetRange();\n };\n /**\n * @protected\n * @override\n */\n ContinuousModel.prototype.resetItemSize = function () {\n _super.prototype.resetItemSize.apply(this, arguments);\n var itemSize = this.itemSize;\n (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]);\n (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]);\n };\n /**\n * @private\n */\n ContinuousModel.prototype._resetRange = function () {\n var dataExtent = this.getExtent();\n var range = this.option.range;\n if (!range || range.auto) {\n // `range` should always be array (so we don't use other\n // value like 'auto') for user-friend. (consider getOption).\n dataExtent.auto = 1;\n this.option.range = dataExtent;\n } else if (zrUtil.isArray(range)) {\n if (range[0] > range[1]) {\n range.reverse();\n }\n range[0] = Math.max(range[0], dataExtent[0]);\n range[1] = Math.min(range[1], dataExtent[1]);\n }\n };\n /**\n * @protected\n * @override\n */\n ContinuousModel.prototype.completeVisualOption = function () {\n _super.prototype.completeVisualOption.apply(this, arguments);\n zrUtil.each(this.stateList, function (state) {\n var symbolSize = this.option.controller[state].symbolSize;\n if (symbolSize && symbolSize[0] !== symbolSize[1]) {\n symbolSize[0] = symbolSize[1] / 3; // For good looking.\n }\n }, this);\n };\n /**\n * @override\n */\n ContinuousModel.prototype.setSelected = function (selected) {\n this.option.range = selected.slice();\n this._resetRange();\n };\n /**\n * @public\n */\n ContinuousModel.prototype.getSelected = function () {\n var dataExtent = this.getExtent();\n var dataInterval = numberUtil.asc((this.get('range') || []).slice());\n // Clamp\n dataInterval[0] > dataExtent[1] && (dataInterval[0] = dataExtent[1]);\n dataInterval[1] > dataExtent[1] && (dataInterval[1] = dataExtent[1]);\n dataInterval[0] < dataExtent[0] && (dataInterval[0] = dataExtent[0]);\n dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]);\n return dataInterval;\n };\n /**\n * @override\n */\n ContinuousModel.prototype.getValueState = function (value) {\n var range = this.option.range;\n var dataExtent = this.getExtent();\n // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'.\n // range[1] is processed likewise.\n return (range[0] <= dataExtent[0] || range[0] <= value) && (range[1] >= dataExtent[1] || value <= range[1]) ? 'inRange' : 'outOfRange';\n };\n ContinuousModel.prototype.findTargetDataIndices = function (range) {\n var result = [];\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimensionIndex(data), function (value, dataIndex) {\n range[0] <= value && value <= range[1] && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n };\n /**\n * @implement\n */\n ContinuousModel.prototype.getVisualMeta = function (getColorVisual) {\n var oVals = getColorStopValues(this, 'outOfRange', this.getExtent());\n var iVals = getColorStopValues(this, 'inRange', this.option.range.slice());\n var stops = [];\n function setStop(value, valueState) {\n stops.push({\n value: value,\n color: getColorVisual(value, valueState)\n });\n }\n // Format to: outOfRange -- inRange -- outOfRange.\n var iIdx = 0;\n var oIdx = 0;\n var iLen = iVals.length;\n var oLen = oVals.length;\n for (; oIdx < oLen && (!iVals.length || oVals[oIdx] <= iVals[0]); oIdx++) {\n // If oVal[oIdx] === iVals[iIdx], oVal[oIdx] should be ignored.\n if (oVals[oIdx] < iVals[iIdx]) {\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n for (var first = 1; iIdx < iLen; iIdx++, first = 0) {\n // If range is full, value beyond min, max will be clamped.\n // make a singularity\n first && stops.length && setStop(iVals[iIdx], 'outOfRange');\n setStop(iVals[iIdx], 'inRange');\n }\n for (var first = 1; oIdx < oLen; oIdx++) {\n if (!iVals.length || iVals[iVals.length - 1] < oVals[oIdx]) {\n // make a singularity\n if (first) {\n stops.length && setStop(stops[stops.length - 1].value, 'outOfRange');\n first = 0;\n }\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n var stopsLen = stops.length;\n return {\n stops: stops,\n outerColors: [stopsLen ? stops[0].color : 'transparent', stopsLen ? stops[stopsLen - 1].color : 'transparent']\n };\n };\n ContinuousModel.type = 'visualMap.continuous';\n ContinuousModel.defaultOption = inheritDefaultOption(VisualMapModel.defaultOption, {\n align: 'auto',\n calculable: false,\n hoverLink: true,\n realtime: true,\n handleIcon: 'path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z',\n handleSize: '120%',\n handleStyle: {\n borderColor: '#fff',\n borderWidth: 1\n },\n indicatorIcon: 'circle',\n indicatorSize: '50%',\n indicatorStyle: {\n borderColor: '#fff',\n borderWidth: 2,\n shadowBlur: 2,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.2)'\n }\n // emphasis: {\n // handleStyle: {\n // shadowBlur: 3,\n // shadowOffsetX: 1,\n // shadowOffsetY: 1,\n // shadowColor: 'rgba(0,0,0,0.2)'\n // }\n // }\n });\n\n return ContinuousModel;\n}(VisualMapModel);\nfunction getColorStopValues(visualMapModel, valueState, dataExtent) {\n if (dataExtent[0] === dataExtent[1]) {\n return dataExtent.slice();\n }\n // When using colorHue mapping, it is not linear color any more.\n // Moreover, canvas gradient seems not to be accurate linear.\n // FIXME\n // Should be arbitrary value 100? or based on pixel size?\n var count = 200;\n var step = (dataExtent[1] - dataExtent[0]) / count;\n var value = dataExtent[0];\n var stopValues = [];\n for (var i = 0; i <= count && value < dataExtent[1]; i++) {\n stopValues.push(value);\n value += step;\n }\n stopValues.push(dataExtent[1]);\n return stopValues;\n}\nexport default ContinuousModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { Rect } from '../../util/graphic.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as layout from '../../util/layout.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport ComponentView from '../../view/Component.js';\nvar VisualMapView = /** @class */function (_super) {\n __extends(VisualMapView, _super);\n function VisualMapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = VisualMapView.type;\n _this.autoPositionValues = {\n left: 1,\n right: 1,\n top: 1,\n bottom: 1\n };\n return _this;\n }\n VisualMapView.prototype.init = function (ecModel, api) {\n this.ecModel = ecModel;\n this.api = api;\n };\n /**\n * @protected\n */\n VisualMapView.prototype.render = function (visualMapModel, ecModel, api, payload // TODO: TYPE\n ) {\n this.visualMapModel = visualMapModel;\n if (visualMapModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n this.doRender(visualMapModel, ecModel, api, payload);\n };\n /**\n * @protected\n */\n VisualMapView.prototype.renderBackground = function (group) {\n var visualMapModel = this.visualMapModel;\n var padding = formatUtil.normalizeCssArray(visualMapModel.get('padding') || 0);\n var rect = group.getBoundingRect();\n group.add(new Rect({\n z2: -1,\n silent: true,\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[3] + padding[1],\n height: rect.height + padding[0] + padding[2]\n },\n style: {\n fill: visualMapModel.get('backgroundColor'),\n stroke: visualMapModel.get('borderColor'),\n lineWidth: visualMapModel.get('borderWidth')\n }\n }));\n };\n /**\n * @protected\n * @param targetValue can be Infinity or -Infinity\n * @param visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize'\n * @param opts\n * @param opts.forceState Specify state, instead of using getValueState method.\n * @param opts.convertOpacityToAlpha For color gradient in controller widget.\n * @return {*} Visual value.\n */\n VisualMapView.prototype.getControllerVisual = function (targetValue, visualCluster, opts) {\n opts = opts || {};\n var forceState = opts.forceState;\n var visualMapModel = this.visualMapModel;\n var visualObj = {};\n // Default values.\n if (visualCluster === 'color') {\n var defaultColor = visualMapModel.get('contentColor');\n visualObj.color = defaultColor;\n }\n function getter(key) {\n return visualObj[key];\n }\n function setter(key, value) {\n visualObj[key] = value;\n }\n var mappings = visualMapModel.controllerVisuals[forceState || visualMapModel.getValueState(targetValue)];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n zrUtil.each(visualTypes, function (type) {\n var visualMapping = mappings[type];\n if (opts.convertOpacityToAlpha && type === 'opacity') {\n type = 'colorAlpha';\n visualMapping = mappings.__alphaForOpacity;\n }\n if (VisualMapping.dependsOn(type, visualCluster)) {\n visualMapping && visualMapping.applyVisual(targetValue, getter, setter);\n }\n });\n return visualObj[visualCluster];\n };\n VisualMapView.prototype.positionGroup = function (group) {\n var model = this.visualMapModel;\n var api = this.api;\n layout.positionElement(group, model.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n };\n VisualMapView.prototype.doRender = function (visualMapModel, ecModel, api, payload) {};\n VisualMapView.type = 'visualMap';\n return VisualMapView;\n}(ComponentView);\nexport default VisualMapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { getLayoutRect } from '../../util/layout.js';\nvar paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']];\n/**\n * @param visualMapModel\n * @param api\n * @param itemSize always [short, long]\n * @return {string} 'left' or 'right' or 'top' or 'bottom'\n */\nexport function getItemAlign(visualMapModel, api, itemSize) {\n var modelOption = visualMapModel.option;\n var itemAlign = modelOption.align;\n if (itemAlign != null && itemAlign !== 'auto') {\n return itemAlign;\n }\n // Auto decision align.\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;\n var reals = paramsSet[realIndex];\n var fakeValue = [0, null, 10];\n var layoutInput = {};\n for (var i = 0; i < 3; i++) {\n layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i];\n layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]];\n }\n var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex];\n var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding);\n return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1];\n}\n/**\n * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and\n * dataIndexInside means filtered index.\n */\n// TODO: TYPE more specified payload types.\nexport function makeHighDownBatch(batch, visualMapModel) {\n zrUtil.each(batch || [], function (batchItem) {\n if (batchItem.dataIndex != null) {\n batchItem.dataIndexInside = batchItem.dataIndex;\n batchItem.dataIndex = null;\n }\n batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : '');\n });\n return batch;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport LinearGradient from 'zrender/lib/graphic/LinearGradient.js';\nimport * as eventTool from 'zrender/lib/core/event.js';\nimport VisualMapView from './VisualMapView.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../helper/sliderMove.js';\nimport * as helper from './helper.js';\nimport * as modelUtil from '../../util/model.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nimport { setAsHighDownDispatcher } from '../../util/states.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { findEventDispatcher } from '../../util/event.js';\nvar linearMap = numberUtil.linearMap;\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\n// Arbitrary value\nvar HOVER_LINK_SIZE = 12;\nvar HOVER_LINK_OUT = 6;\n// Notice:\n// Any \"interval\" should be by the order of [low, high].\n// \"handle0\" (handleIndex === 0) maps to\n// low data value: this._dataInterval[0] and has low coord.\n// \"handle1\" (handleIndex === 1) maps to\n// high data value: this._dataInterval[1] and has high coord.\n// The logic of transform is implemented in this._createBarGroup.\nvar ContinuousView = /** @class */function (_super) {\n __extends(ContinuousView, _super);\n function ContinuousView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ContinuousView.type;\n _this._shapes = {};\n _this._dataInterval = [];\n _this._handleEnds = [];\n _this._hoverLinkDataIndices = [];\n return _this;\n }\n ContinuousView.prototype.init = function (ecModel, api) {\n _super.prototype.init.call(this, ecModel, api);\n this._hoverLinkFromSeriesMouseOver = zrUtil.bind(this._hoverLinkFromSeriesMouseOver, this);\n this._hideIndicator = zrUtil.bind(this._hideIndicator, this);\n };\n ContinuousView.prototype.doRender = function (visualMapModel, ecModel, api, payload) {\n if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) {\n this._buildView();\n }\n };\n ContinuousView.prototype._buildView = function () {\n this.group.removeAll();\n var visualMapModel = this.visualMapModel;\n var thisGroup = this.group;\n this._orient = visualMapModel.get('orient');\n this._useHandle = visualMapModel.get('calculable');\n this._resetInterval();\n this._renderBar(thisGroup);\n var dataRangeText = visualMapModel.get('text');\n this._renderEndsText(thisGroup, dataRangeText, 0);\n this._renderEndsText(thisGroup, dataRangeText, 1);\n // Do this for background size calculation.\n this._updateView(true);\n // After updating view, inner shapes is built completely,\n // and then background can be rendered.\n this.renderBackground(thisGroup);\n // Real update view\n this._updateView();\n this._enableHoverLinkToSeries();\n this._enableHoverLinkFromSeries();\n this.positionGroup(thisGroup);\n };\n ContinuousView.prototype._renderEndsText = function (group, dataRangeText, endsIndex) {\n if (!dataRangeText) {\n return;\n }\n // Compatible with ec2, text[0] map to high value, text[1] map low value.\n var text = dataRangeText[1 - endsIndex];\n text = text != null ? text + '' : '';\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var itemSize = visualMapModel.itemSize;\n var barGroup = this._shapes.mainGroup;\n var position = this._applyTransform([itemSize[0] / 2, endsIndex === 0 ? -textGap : itemSize[1] + textGap], barGroup);\n var align = this._applyTransform(endsIndex === 0 ? 'bottom' : 'top', barGroup);\n var orient = this._orient;\n var textStyleModel = this.visualMapModel.textStyleModel;\n this.group.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n x: position[0],\n y: position[1],\n verticalAlign: orient === 'horizontal' ? 'middle' : align,\n align: orient === 'horizontal' ? align : 'center',\n text: text\n })\n }));\n };\n ContinuousView.prototype._renderBar = function (targetGroup) {\n var visualMapModel = this.visualMapModel;\n var shapes = this._shapes;\n var itemSize = visualMapModel.itemSize;\n var orient = this._orient;\n var useHandle = this._useHandle;\n var itemAlign = helper.getItemAlign(visualMapModel, this.api, itemSize);\n var mainGroup = shapes.mainGroup = this._createBarGroup(itemAlign);\n var gradientBarGroup = new graphic.Group();\n mainGroup.add(gradientBarGroup);\n // Bar\n gradientBarGroup.add(shapes.outOfRange = createPolygon());\n gradientBarGroup.add(shapes.inRange = createPolygon(null, useHandle ? getCursor(this._orient) : null, zrUtil.bind(this._dragHandle, this, 'all', false), zrUtil.bind(this._dragHandle, this, 'all', true)));\n // A border radius clip.\n gradientBarGroup.setClipPath(new graphic.Rect({\n shape: {\n x: 0,\n y: 0,\n width: itemSize[0],\n height: itemSize[1],\n r: 3\n }\n }));\n var textRect = visualMapModel.textStyleModel.getTextRect('国');\n var textSize = mathMax(textRect.width, textRect.height);\n // Handle\n if (useHandle) {\n shapes.handleThumbs = [];\n shapes.handleLabels = [];\n shapes.handleLabelPoints = [];\n this._createHandle(visualMapModel, mainGroup, 0, itemSize, textSize, orient);\n this._createHandle(visualMapModel, mainGroup, 1, itemSize, textSize, orient);\n }\n this._createIndicator(visualMapModel, mainGroup, itemSize, textSize, orient);\n targetGroup.add(mainGroup);\n };\n ContinuousView.prototype._createHandle = function (visualMapModel, mainGroup, handleIndex, itemSize, textSize, orient) {\n var onDrift = zrUtil.bind(this._dragHandle, this, handleIndex, false);\n var onDragEnd = zrUtil.bind(this._dragHandle, this, handleIndex, true);\n var handleSize = parsePercent(visualMapModel.get('handleSize'), itemSize[0]);\n var handleThumb = createSymbol(visualMapModel.get('handleIcon'), -handleSize / 2, -handleSize / 2, handleSize, handleSize, null, true);\n var cursor = getCursor(this._orient);\n handleThumb.attr({\n cursor: cursor,\n draggable: true,\n drift: onDrift,\n ondragend: onDragEnd,\n onmousemove: function (e) {\n eventTool.stop(e.event);\n }\n });\n handleThumb.x = itemSize[0] / 2;\n handleThumb.useStyle(visualMapModel.getModel('handleStyle').getItemStyle());\n handleThumb.setStyle({\n strokeNoScale: true,\n strokeFirst: true\n });\n handleThumb.style.lineWidth *= 2;\n handleThumb.ensureState('emphasis').style = visualMapModel.getModel(['emphasis', 'handleStyle']).getItemStyle();\n setAsHighDownDispatcher(handleThumb, true);\n mainGroup.add(handleThumb);\n // Text is always horizontal layout but should not be effected by\n // transform (orient/inverse). So label is built separately but not\n // use zrender/graphic/helper/RectText, and is located based on view\n // group (according to handleLabelPoint) but not barGroup.\n var textStyleModel = this.visualMapModel.textStyleModel;\n var handleLabel = new graphic.Text({\n cursor: cursor,\n draggable: true,\n drift: onDrift,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: ''\n })\n });\n handleLabel.ensureState('blur').style = {\n opacity: 0.1\n };\n handleLabel.stateTransition = {\n duration: 200\n };\n this.group.add(handleLabel);\n var handleLabelPoint = [handleSize, 0];\n var shapes = this._shapes;\n shapes.handleThumbs[handleIndex] = handleThumb;\n shapes.handleLabelPoints[handleIndex] = handleLabelPoint;\n shapes.handleLabels[handleIndex] = handleLabel;\n };\n ContinuousView.prototype._createIndicator = function (visualMapModel, mainGroup, itemSize, textSize, orient) {\n var scale = parsePercent(visualMapModel.get('indicatorSize'), itemSize[0]);\n var indicator = createSymbol(visualMapModel.get('indicatorIcon'), -scale / 2, -scale / 2, scale, scale, null, true);\n indicator.attr({\n cursor: 'move',\n invisible: true,\n silent: true,\n x: itemSize[0] / 2\n });\n var indicatorStyle = visualMapModel.getModel('indicatorStyle').getItemStyle();\n if (indicator instanceof ZRImage) {\n var pathStyle = indicator.style;\n indicator.useStyle(zrUtil.extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, indicatorStyle));\n } else {\n indicator.useStyle(indicatorStyle);\n }\n mainGroup.add(indicator);\n var textStyleModel = this.visualMapModel.textStyleModel;\n var indicatorLabel = new graphic.Text({\n silent: true,\n invisible: true,\n style: createTextStyle(textStyleModel, {\n x: 0,\n y: 0,\n text: ''\n })\n });\n this.group.add(indicatorLabel);\n var indicatorLabelPoint = [(orient === 'horizontal' ? textSize / 2 : HOVER_LINK_OUT) + itemSize[0] / 2, 0];\n var shapes = this._shapes;\n shapes.indicator = indicator;\n shapes.indicatorLabel = indicatorLabel;\n shapes.indicatorLabelPoint = indicatorLabelPoint;\n this._firstShowIndicator = true;\n };\n ContinuousView.prototype._dragHandle = function (handleIndex, isEnd,\n // dx is event from ondragend if isEnd is true. It's not used\n dx, dy) {\n if (!this._useHandle) {\n return;\n }\n this._dragging = !isEnd;\n if (!isEnd) {\n // Transform dx, dy to bar coordination.\n var vertex = this._applyTransform([dx, dy], this._shapes.mainGroup, true);\n this._updateInterval(handleIndex, vertex[1]);\n this._hideIndicator();\n // Considering realtime, update view should be executed\n // before dispatch action.\n this._updateView();\n }\n // dragEnd do not dispatch action when realtime.\n if (isEnd === !this.visualMapModel.get('realtime')) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: this._dataInterval.slice()\n });\n }\n if (isEnd) {\n !this._hovering && this._clearHoverLinkToSeries();\n } else if (useHoverLinkOnHandle(this.visualMapModel)) {\n this._doHoverLinkToSeries(this._handleEnds[handleIndex], false);\n }\n };\n ContinuousView.prototype._resetInterval = function () {\n var visualMapModel = this.visualMapModel;\n var dataInterval = this._dataInterval = visualMapModel.getSelected();\n var dataExtent = visualMapModel.getExtent();\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n this._handleEnds = [linearMap(dataInterval[0], dataExtent, sizeExtent, true), linearMap(dataInterval[1], dataExtent, sizeExtent, true)];\n };\n /**\n * @private\n * @param {(number|string)} handleIndex 0 or 1 or 'all'\n * @param {number} dx\n * @param {number} dy\n */\n ContinuousView.prototype._updateInterval = function (handleIndex, delta) {\n delta = delta || 0;\n var visualMapModel = this.visualMapModel;\n var handleEnds = this._handleEnds;\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n sliderMove(delta, handleEnds, sizeExtent, handleIndex,\n // cross is forbidden\n 0);\n var dataExtent = visualMapModel.getExtent();\n // Update data interval.\n this._dataInterval = [linearMap(handleEnds[0], sizeExtent, dataExtent, true), linearMap(handleEnds[1], sizeExtent, dataExtent, true)];\n };\n ContinuousView.prototype._updateView = function (forSketch) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var shapes = this._shapes;\n var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]];\n var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds;\n var visualInRange = this._createBarVisual(this._dataInterval, dataExtent, inRangeHandleEnds, 'inRange');\n var visualOutOfRange = this._createBarVisual(dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange');\n shapes.inRange.setStyle({\n fill: visualInRange.barColor\n // opacity: visualInRange.opacity\n }).setShape('points', visualInRange.barPoints);\n shapes.outOfRange.setStyle({\n fill: visualOutOfRange.barColor\n // opacity: visualOutOfRange.opacity\n }).setShape('points', visualOutOfRange.barPoints);\n this._updateHandle(inRangeHandleEnds, visualInRange);\n };\n ContinuousView.prototype._createBarVisual = function (dataInterval, dataExtent, handleEnds, forceState) {\n var opts = {\n forceState: forceState,\n convertOpacityToAlpha: true\n };\n var colorStops = this._makeColorGradient(dataInterval, opts);\n var symbolSizes = [this.getControllerVisual(dataInterval[0], 'symbolSize', opts), this.getControllerVisual(dataInterval[1], 'symbolSize', opts)];\n var barPoints = this._createBarPoints(handleEnds, symbolSizes);\n return {\n barColor: new LinearGradient(0, 0, 0, 1, colorStops),\n barPoints: barPoints,\n handlesColor: [colorStops[0].color, colorStops[colorStops.length - 1].color]\n };\n };\n ContinuousView.prototype._makeColorGradient = function (dataInterval, opts) {\n // Considering colorHue, which is not linear, so we have to sample\n // to calculate gradient color stops, but not only calculate head\n // and tail.\n var sampleNumber = 100; // Arbitrary value.\n var colorStops = [];\n var step = (dataInterval[1] - dataInterval[0]) / sampleNumber;\n colorStops.push({\n color: this.getControllerVisual(dataInterval[0], 'color', opts),\n offset: 0\n });\n for (var i = 1; i < sampleNumber; i++) {\n var currValue = dataInterval[0] + step * i;\n if (currValue > dataInterval[1]) {\n break;\n }\n colorStops.push({\n color: this.getControllerVisual(currValue, 'color', opts),\n offset: i / sampleNumber\n });\n }\n colorStops.push({\n color: this.getControllerVisual(dataInterval[1], 'color', opts),\n offset: 1\n });\n return colorStops;\n };\n ContinuousView.prototype._createBarPoints = function (handleEnds, symbolSizes) {\n var itemSize = this.visualMapModel.itemSize;\n return [[itemSize[0] - symbolSizes[0], handleEnds[0]], [itemSize[0], handleEnds[0]], [itemSize[0], handleEnds[1]], [itemSize[0] - symbolSizes[1], handleEnds[1]]];\n };\n ContinuousView.prototype._createBarGroup = function (itemAlign) {\n var orient = this._orient;\n var inverse = this.visualMapModel.get('inverse');\n return new graphic.Group(orient === 'horizontal' && !inverse ? {\n scaleX: itemAlign === 'bottom' ? 1 : -1,\n rotation: Math.PI / 2\n } : orient === 'horizontal' && inverse ? {\n scaleX: itemAlign === 'bottom' ? -1 : 1,\n rotation: -Math.PI / 2\n } : orient === 'vertical' && !inverse ? {\n scaleX: itemAlign === 'left' ? 1 : -1,\n scaleY: -1\n } : {\n scaleX: itemAlign === 'left' ? 1 : -1\n });\n };\n ContinuousView.prototype._updateHandle = function (handleEnds, visualInRange) {\n if (!this._useHandle) {\n return;\n }\n var shapes = this._shapes;\n var visualMapModel = this.visualMapModel;\n var handleThumbs = shapes.handleThumbs;\n var handleLabels = shapes.handleLabels;\n var itemSize = visualMapModel.itemSize;\n var dataExtent = visualMapModel.getExtent();\n each([0, 1], function (handleIndex) {\n var handleThumb = handleThumbs[handleIndex];\n handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]);\n handleThumb.y = handleEnds[handleIndex];\n var val = linearMap(handleEnds[handleIndex], [0, itemSize[1]], dataExtent, true);\n var symbolSize = this.getControllerVisual(val, 'symbolSize');\n handleThumb.scaleX = handleThumb.scaleY = symbolSize / itemSize[0];\n handleThumb.x = itemSize[0] - symbolSize / 2;\n // Update handle label position.\n var textPoint = graphic.applyTransform(shapes.handleLabelPoints[handleIndex], graphic.getTransform(handleThumb, this.group));\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n text: visualMapModel.formatValueText(this._dataInterval[handleIndex]),\n verticalAlign: 'middle',\n align: this._orient === 'vertical' ? this._applyTransform('left', shapes.mainGroup) : 'center'\n });\n }, this);\n };\n ContinuousView.prototype._showIndicator = function (cursorValue, textValue, rangeSymbol, halfHoverLinkSize) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var itemSize = visualMapModel.itemSize;\n var sizeExtent = [0, itemSize[1]];\n var shapes = this._shapes;\n var indicator = shapes.indicator;\n if (!indicator) {\n return;\n }\n indicator.attr('invisible', false);\n var opts = {\n convertOpacityToAlpha: true\n };\n var color = this.getControllerVisual(cursorValue, 'color', opts);\n var symbolSize = this.getControllerVisual(cursorValue, 'symbolSize');\n var y = linearMap(cursorValue, dataExtent, sizeExtent, true);\n var x = itemSize[0] - symbolSize / 2;\n var oldIndicatorPos = {\n x: indicator.x,\n y: indicator.y\n };\n // Update handle label position.\n indicator.y = y;\n indicator.x = x;\n var textPoint = graphic.applyTransform(shapes.indicatorLabelPoint, graphic.getTransform(indicator, this.group));\n var indicatorLabel = shapes.indicatorLabel;\n indicatorLabel.attr('invisible', false);\n var align = this._applyTransform('left', shapes.mainGroup);\n var orient = this._orient;\n var isHorizontal = orient === 'horizontal';\n indicatorLabel.setStyle({\n text: (rangeSymbol ? rangeSymbol : '') + visualMapModel.formatValueText(textValue),\n verticalAlign: isHorizontal ? align : 'middle',\n align: isHorizontal ? 'center' : align\n });\n var indicatorNewProps = {\n x: x,\n y: y,\n style: {\n fill: color\n }\n };\n var labelNewProps = {\n style: {\n x: textPoint[0],\n y: textPoint[1]\n }\n };\n if (visualMapModel.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {\n var animationCfg = {\n duration: 100,\n easing: 'cubicInOut',\n additive: true\n };\n indicator.x = oldIndicatorPos.x;\n indicator.y = oldIndicatorPos.y;\n indicator.animateTo(indicatorNewProps, animationCfg);\n indicatorLabel.animateTo(labelNewProps, animationCfg);\n } else {\n indicator.attr(indicatorNewProps);\n indicatorLabel.attr(labelNewProps);\n }\n this._firstShowIndicator = false;\n var handleLabels = this._shapes.handleLabels;\n if (handleLabels) {\n for (var i = 0; i < handleLabels.length; i++) {\n // Fade out handle labels.\n // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it.\n this.api.enterBlur(handleLabels[i]);\n }\n }\n };\n ContinuousView.prototype._enableHoverLinkToSeries = function () {\n var self = this;\n this._shapes.mainGroup.on('mousemove', function (e) {\n self._hovering = true;\n if (!self._dragging) {\n var itemSize = self.visualMapModel.itemSize;\n var pos = self._applyTransform([e.offsetX, e.offsetY], self._shapes.mainGroup, true, true);\n // For hover link show when hover handle, which might be\n // below or upper than sizeExtent.\n pos[1] = mathMin(mathMax(0, pos[1]), itemSize[1]);\n self._doHoverLinkToSeries(pos[1], 0 <= pos[0] && pos[0] <= itemSize[0]);\n }\n }).on('mouseout', function () {\n // When mouse is out of handle, hoverLink still need\n // to be displayed when realtime is set as false.\n self._hovering = false;\n !self._dragging && self._clearHoverLinkToSeries();\n });\n };\n ContinuousView.prototype._enableHoverLinkFromSeries = function () {\n var zr = this.api.getZr();\n if (this.visualMapModel.option.hoverLink) {\n zr.on('mouseover', this._hoverLinkFromSeriesMouseOver, this);\n zr.on('mouseout', this._hideIndicator, this);\n } else {\n this._clearHoverLinkFromSeries();\n }\n };\n ContinuousView.prototype._doHoverLinkToSeries = function (cursorPos, hoverOnBar) {\n var visualMapModel = this.visualMapModel;\n var itemSize = visualMapModel.itemSize;\n if (!visualMapModel.option.hoverLink) {\n return;\n }\n var sizeExtent = [0, itemSize[1]];\n var dataExtent = visualMapModel.getExtent();\n // For hover link show when hover handle, which might be below or upper than sizeExtent.\n cursorPos = mathMin(mathMax(sizeExtent[0], cursorPos), sizeExtent[1]);\n var halfHoverLinkSize = getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent);\n var hoverRange = [cursorPos - halfHoverLinkSize, cursorPos + halfHoverLinkSize];\n var cursorValue = linearMap(cursorPos, sizeExtent, dataExtent, true);\n var valueRange = [linearMap(hoverRange[0], sizeExtent, dataExtent, true), linearMap(hoverRange[1], sizeExtent, dataExtent, true)];\n // Consider data range is out of visualMap range, see test/visualMap-continuous.html,\n // where china and india has very large population.\n hoverRange[0] < sizeExtent[0] && (valueRange[0] = -Infinity);\n hoverRange[1] > sizeExtent[1] && (valueRange[1] = Infinity);\n // Do not show indicator when mouse is over handle,\n // otherwise labels overlap, especially when dragging.\n if (hoverOnBar) {\n if (valueRange[0] === -Infinity) {\n this._showIndicator(cursorValue, valueRange[1], '< ', halfHoverLinkSize);\n } else if (valueRange[1] === Infinity) {\n this._showIndicator(cursorValue, valueRange[0], '> ', halfHoverLinkSize);\n } else {\n this._showIndicator(cursorValue, cursorValue, '≈ ', halfHoverLinkSize);\n }\n }\n // When realtime is set as false, handles, which are in barGroup,\n // also trigger hoverLink, which help user to realize where they\n // focus on when dragging. (see test/heatmap-large.html)\n // When realtime is set as true, highlight will not show when hover\n // handle, because the label on handle, which displays a exact value\n // but not range, might mislead users.\n var oldBatch = this._hoverLinkDataIndices;\n var newBatch = [];\n if (hoverOnBar || useHoverLinkOnHandle(visualMapModel)) {\n newBatch = this._hoverLinkDataIndices = visualMapModel.findTargetDataIndices(valueRange);\n }\n var resultBatches = modelUtil.compressBatches(oldBatch, newBatch);\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(resultBatches[0], visualMapModel));\n this._dispatchHighDown('highlight', helper.makeHighDownBatch(resultBatches[1], visualMapModel));\n };\n ContinuousView.prototype._hoverLinkFromSeriesMouseOver = function (e) {\n var ecData;\n findEventDispatcher(e.target, function (target) {\n var currECData = getECData(target);\n if (currECData.dataIndex != null) {\n ecData = currECData;\n return true;\n }\n }, true);\n if (!ecData) {\n return;\n }\n var dataModel = this.ecModel.getSeriesByIndex(ecData.seriesIndex);\n var visualMapModel = this.visualMapModel;\n if (!visualMapModel.isTargetSeries(dataModel)) {\n return;\n }\n var data = dataModel.getData(ecData.dataType);\n var value = data.getStore().get(visualMapModel.getDataDimensionIndex(data), ecData.dataIndex);\n if (!isNaN(value)) {\n this._showIndicator(value, value);\n }\n };\n ContinuousView.prototype._hideIndicator = function () {\n var shapes = this._shapes;\n shapes.indicator && shapes.indicator.attr('invisible', true);\n shapes.indicatorLabel && shapes.indicatorLabel.attr('invisible', true);\n var handleLabels = this._shapes.handleLabels;\n if (handleLabels) {\n for (var i = 0; i < handleLabels.length; i++) {\n // Fade out handle labels.\n // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it.\n this.api.leaveBlur(handleLabels[i]);\n }\n }\n };\n ContinuousView.prototype._clearHoverLinkToSeries = function () {\n this._hideIndicator();\n var indices = this._hoverLinkDataIndices;\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(indices, this.visualMapModel));\n indices.length = 0;\n };\n ContinuousView.prototype._clearHoverLinkFromSeries = function () {\n this._hideIndicator();\n var zr = this.api.getZr();\n zr.off('mouseover', this._hoverLinkFromSeriesMouseOver);\n zr.off('mouseout', this._hideIndicator);\n };\n ContinuousView.prototype._applyTransform = function (vertex, element, inverse, global) {\n var transform = graphic.getTransform(element, global ? null : this.group);\n return zrUtil.isArray(vertex) ? graphic.applyTransform(vertex, transform, inverse) : graphic.transformDirection(vertex, transform, inverse);\n };\n // TODO: TYPE more specified payload types.\n ContinuousView.prototype._dispatchHighDown = function (type, batch) {\n batch && batch.length && this.api.dispatchAction({\n type: type,\n batch: batch\n });\n };\n /**\n * @override\n */\n ContinuousView.prototype.dispose = function () {\n this._clearHoverLinkFromSeries();\n this._clearHoverLinkToSeries();\n };\n ContinuousView.type = 'visualMap.continuous';\n return ContinuousView;\n}(VisualMapView);\nfunction createPolygon(points, cursor, onDrift, onDragEnd) {\n return new graphic.Polygon({\n shape: {\n points: points\n },\n draggable: !!onDrift,\n cursor: cursor,\n drift: onDrift,\n onmousemove: function (e) {\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd\n });\n}\nfunction getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent) {\n var halfHoverLinkSize = HOVER_LINK_SIZE / 2;\n var hoverLinkDataSize = visualMapModel.get('hoverLinkDataSize');\n if (hoverLinkDataSize) {\n halfHoverLinkSize = linearMap(hoverLinkDataSize, dataExtent, sizeExtent, true) / 2;\n }\n return halfHoverLinkSize;\n}\nfunction useHoverLinkOnHandle(visualMapModel) {\n var hoverLinkOnHandle = visualMapModel.get('hoverLinkOnHandle');\n return !!(hoverLinkOnHandle == null ? visualMapModel.get('realtime') : hoverLinkOnHandle);\n}\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\nexport default ContinuousView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport var visualMapActionInfo = {\n type: 'selectDataRange',\n event: 'dataRangeSelected',\n // FIXME use updateView appears wrong\n update: 'update'\n};\nexport var visualMapActionHander = function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'visualMap',\n query: payload\n }, function (model) {\n model.setSelected(payload.selected);\n });\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nexport var visualMapEncodingHandlers = [{\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var resetDefines = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n var pipelineContext = seriesModel.pipelineContext;\n if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) {\n return;\n }\n resetDefines.push(visualSolution.incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, zrUtil.bind(visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimensionIndex(seriesModel.getData())));\n });\n return resetDefines;\n }\n},\n// Only support color.\n{\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var visualMetaList = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n if (visualMapModel.isTargetSeries(seriesModel)) {\n var visualMeta = visualMapModel.getVisualMeta(zrUtil.bind(getColorVisual, null, seriesModel, visualMapModel)) || {\n stops: [],\n outerColors: []\n };\n var dimIdx = visualMapModel.getDataDimensionIndex(data);\n if (dimIdx >= 0) {\n // visualMeta.dimension should be dimension index, but not concrete dimension.\n visualMeta.dimension = dimIdx;\n visualMetaList.push(visualMeta);\n }\n }\n });\n // console.log(JSON.stringify(visualMetaList.map(a => a.stops)));\n seriesModel.getData().setVisual('visualMeta', visualMetaList);\n }\n}];\n// FIXME\n// performance and export for heatmap?\n// value can be Infinity or -Infinity\nfunction getColorVisual(seriesModel, visualMapModel, value, valueState) {\n var mappings = visualMapModel.targetVisuals[valueState];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n var resultVisual = {\n color: getVisualFromData(seriesModel.getData(), 'color') // default color.\n };\n\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n var mapping = mappings[type === 'opacity' ? '__alphaForOpacity' : type];\n mapping && mapping.applyVisual(value, getVisual, setVisual);\n }\n return resultVisual.color;\n function getVisual(key) {\n return resultVisual[key];\n }\n function setVisual(key, value) {\n resultVisual[key] = value;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// @ts-nocheck\nimport * as zrUtil from 'zrender/lib/core/util.js';\nvar each = zrUtil.each;\nexport default function visualMapPreprocessor(option) {\n var visualMap = option && option.visualMap;\n if (!zrUtil.isArray(visualMap)) {\n visualMap = visualMap ? [visualMap] : [];\n }\n each(visualMap, function (opt) {\n if (!opt) {\n return;\n }\n // rename splitList to pieces\n if (has(opt, 'splitList') && !has(opt, 'pieces')) {\n opt.pieces = opt.splitList;\n delete opt.splitList;\n }\n var pieces = opt.pieces;\n if (pieces && zrUtil.isArray(pieces)) {\n each(pieces, function (piece) {\n if (zrUtil.isObject(piece)) {\n if (has(piece, 'start') && !has(piece, 'min')) {\n piece.min = piece.start;\n }\n if (has(piece, 'end') && !has(piece, 'max')) {\n piece.max = piece.end;\n }\n }\n });\n }\n });\n}\nfunction has(obj, name) {\n return obj && obj.hasOwnProperty && obj.hasOwnProperty(name);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { visualMapActionInfo, visualMapActionHander } from './visualMapAction.js';\nimport { visualMapEncodingHandlers } from './visualEncoding.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport preprocessor from './preprocessor.js';\nvar installed = false;\nexport default function installCommon(registers) {\n if (installed) {\n return;\n }\n installed = true;\n registers.registerSubTypeDefaulter('visualMap', function (option) {\n // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used.\n return !option.categories && (!(option.pieces ? option.pieces.length > 0 : option.splitNumber > 0) || option.calculable) ? 'continuous' : 'piecewise';\n });\n registers.registerAction(visualMapActionInfo, visualMapActionHander);\n each(visualMapEncodingHandlers, function (handler) {\n registers.registerVisual(registers.PRIORITY.VISUAL.COMPONENT, handler);\n });\n registers.registerPreprocessor(preprocessor);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport ContinuousModel from './ContinuousModel.js';\nimport ContinuousView from './ContinuousView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(ContinuousModel);\n registers.registerComponentView(ContinuousView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapModel from './VisualMapModel.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport visualDefault from '../../visual/visualDefault.js';\nimport { reformIntervals } from '../../util/number.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar PiecewiseModel = /** @class */function (_super) {\n __extends(PiecewiseModel, _super);\n function PiecewiseModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PiecewiseModel.type;\n /**\n * The order is always [low, ..., high].\n * [{text: string, interval: Array.}, ...]\n */\n _this._pieceList = [];\n return _this;\n }\n PiecewiseModel.prototype.optionUpdated = function (newOption, isInit) {\n _super.prototype.optionUpdated.apply(this, arguments);\n this.resetExtent();\n var mode = this._mode = this._determineMode();\n this._pieceList = [];\n resetMethods[this._mode].call(this, this._pieceList);\n this._resetSelected(newOption, isInit);\n var categories = this.option.categories;\n this.resetVisual(function (mappingOption, state) {\n if (mode === 'categories') {\n mappingOption.mappingMethod = 'category';\n mappingOption.categories = zrUtil.clone(categories);\n } else {\n mappingOption.dataExtent = this.getExtent();\n mappingOption.mappingMethod = 'piecewise';\n mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) {\n piece = zrUtil.clone(piece);\n if (state !== 'inRange') {\n // FIXME\n // outOfRange do not support special visual in pieces.\n piece.visual = null;\n }\n return piece;\n });\n }\n });\n };\n /**\n * @protected\n * @override\n */\n PiecewiseModel.prototype.completeVisualOption = function () {\n // Consider this case:\n // visualMap: {\n // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}]\n // }\n // where no inRange/outOfRange set but only pieces. So we should make\n // default inRange/outOfRange for this case, otherwise visuals that only\n // appear in `pieces` will not be taken into account in visual encoding.\n var option = this.option;\n var visualTypesInPieces = {};\n var visualTypes = VisualMapping.listVisualTypes();\n var isCategory = this.isCategory();\n zrUtil.each(option.pieces, function (piece) {\n zrUtil.each(visualTypes, function (visualType) {\n if (piece.hasOwnProperty(visualType)) {\n visualTypesInPieces[visualType] = 1;\n }\n });\n });\n zrUtil.each(visualTypesInPieces, function (v, visualType) {\n var exists = false;\n zrUtil.each(this.stateList, function (state) {\n exists = exists || has(option, state, visualType) || has(option.target, state, visualType);\n }, this);\n !exists && zrUtil.each(this.stateList, function (state) {\n (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory);\n });\n }, this);\n function has(obj, state, visualType) {\n return obj && obj[state] && obj[state].hasOwnProperty(visualType);\n }\n _super.prototype.completeVisualOption.apply(this, arguments);\n };\n PiecewiseModel.prototype._resetSelected = function (newOption, isInit) {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n // Selected do not merge but all override.\n var selected = (isInit ? thisOption : newOption).selected || {};\n thisOption.selected = selected;\n // Consider 'not specified' means true.\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n if (!selected.hasOwnProperty(key)) {\n selected[key] = true;\n }\n }, this);\n if (thisOption.selectedMode === 'single') {\n // Ensure there is only one selected.\n var hasSel_1 = false;\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n if (selected[key]) {\n hasSel_1 ? selected[key] = false : hasSel_1 = true;\n }\n }, this);\n }\n // thisOption.selectedMode === 'multiple', default: all selected.\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getItemSymbol = function () {\n return this.get('itemSymbol');\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getSelectedMapKey = function (piece) {\n return this._mode === 'categories' ? piece.value + '' : piece.index + '';\n };\n /**\n * @public\n */\n PiecewiseModel.prototype.getPieceList = function () {\n return this._pieceList;\n };\n /**\n * @return {string}\n */\n PiecewiseModel.prototype._determineMode = function () {\n var option = this.option;\n return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber';\n };\n /**\n * @override\n */\n PiecewiseModel.prototype.setSelected = function (selected) {\n this.option.selected = zrUtil.clone(selected);\n };\n /**\n * @override\n */\n PiecewiseModel.prototype.getValueState = function (value) {\n var index = VisualMapping.findPieceIndex(value, this._pieceList);\n return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange';\n };\n /**\n * @public\n * @param pieceIndex piece index in visualMapModel.getPieceList()\n */\n PiecewiseModel.prototype.findTargetDataIndices = function (pieceIndex) {\n var result = [];\n var pieceList = this._pieceList;\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimensionIndex(data), function (value, dataIndex) {\n // Should always base on model pieceList, because it is order sensitive.\n var pIdx = VisualMapping.findPieceIndex(value, pieceList);\n pIdx === pieceIndex && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n };\n /**\n * @private\n * @param piece piece.value or piece.interval is required.\n * @return Can be Infinity or -Infinity\n */\n PiecewiseModel.prototype.getRepresentValue = function (piece) {\n var representValue;\n if (this.isCategory()) {\n representValue = piece.value;\n } else {\n if (piece.value != null) {\n representValue = piece.value;\n } else {\n var pieceInterval = piece.interval || [];\n representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2;\n }\n }\n return representValue;\n };\n PiecewiseModel.prototype.getVisualMeta = function (getColorVisual) {\n // Do not support category. (category axis is ordinal, numerical)\n if (this.isCategory()) {\n return;\n }\n var stops = [];\n var outerColors = ['', ''];\n var visualMapModel = this;\n function setStop(interval, valueState) {\n var representValue = visualMapModel.getRepresentValue({\n interval: interval\n }); // Not category\n if (!valueState) {\n valueState = visualMapModel.getValueState(representValue);\n }\n var color = getColorVisual(representValue, valueState);\n if (interval[0] === -Infinity) {\n outerColors[0] = color;\n } else if (interval[1] === Infinity) {\n outerColors[1] = color;\n } else {\n stops.push({\n value: interval[0],\n color: color\n }, {\n value: interval[1],\n color: color\n });\n }\n }\n // Suplement\n var pieceList = this._pieceList.slice();\n if (!pieceList.length) {\n pieceList.push({\n interval: [-Infinity, Infinity]\n });\n } else {\n var edge = pieceList[0].interval[0];\n edge !== -Infinity && pieceList.unshift({\n interval: [-Infinity, edge]\n });\n edge = pieceList[pieceList.length - 1].interval[1];\n edge !== Infinity && pieceList.push({\n interval: [edge, Infinity]\n });\n }\n var curr = -Infinity;\n zrUtil.each(pieceList, function (piece) {\n var interval = piece.interval;\n if (interval) {\n // Fulfill gap.\n interval[0] > curr && setStop([curr, interval[0]], 'outOfRange');\n setStop(interval.slice());\n curr = interval[1];\n }\n }, this);\n return {\n stops: stops,\n outerColors: outerColors\n };\n };\n PiecewiseModel.type = 'visualMap.piecewise';\n PiecewiseModel.defaultOption = inheritDefaultOption(VisualMapModel.defaultOption, {\n selected: null,\n minOpen: false,\n maxOpen: false,\n align: 'auto',\n itemWidth: 20,\n itemHeight: 14,\n itemSymbol: 'roundRect',\n pieces: null,\n categories: null,\n splitNumber: 5,\n selectedMode: 'multiple',\n itemGap: 10,\n hoverLink: true // Enable hover highlight.\n });\n\n return PiecewiseModel;\n}(VisualMapModel);\n;\n/**\n * Key is this._mode\n * @type {Object}\n * @this {module:echarts/component/viusalMap/PiecewiseMode}\n */\nvar resetMethods = {\n splitNumber: function (outPieceList) {\n var thisOption = this.option;\n var precision = Math.min(thisOption.precision, 20);\n var dataExtent = this.getExtent();\n var splitNumber = thisOption.splitNumber;\n splitNumber = Math.max(parseInt(splitNumber, 10), 1);\n thisOption.splitNumber = splitNumber;\n var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber;\n // Precision auto-adaption\n while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {\n precision++;\n }\n thisOption.precision = precision;\n splitStep = +splitStep.toFixed(precision);\n if (thisOption.minOpen) {\n outPieceList.push({\n interval: [-Infinity, dataExtent[0]],\n close: [0, 0]\n });\n }\n for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) {\n var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep;\n outPieceList.push({\n interval: [curr, max],\n close: [1, 1]\n });\n }\n if (thisOption.maxOpen) {\n outPieceList.push({\n interval: [dataExtent[1], Infinity],\n close: [0, 0]\n });\n }\n reformIntervals(outPieceList);\n zrUtil.each(outPieceList, function (piece, index) {\n piece.index = index;\n piece.text = this.formatValueText(piece.interval);\n }, this);\n },\n categories: function (outPieceList) {\n var thisOption = this.option;\n zrUtil.each(thisOption.categories, function (cate) {\n // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。\n // 是否改一致。\n outPieceList.push({\n text: this.formatValueText(cate, true),\n value: cate\n });\n }, this);\n // See \"Order Rule\".\n normalizeReverse(thisOption, outPieceList);\n },\n pieces: function (outPieceList) {\n var thisOption = this.option;\n zrUtil.each(thisOption.pieces, function (pieceListItem, index) {\n if (!zrUtil.isObject(pieceListItem)) {\n pieceListItem = {\n value: pieceListItem\n };\n }\n var item = {\n text: '',\n index: index\n };\n if (pieceListItem.label != null) {\n item.text = pieceListItem.label;\n }\n if (pieceListItem.hasOwnProperty('value')) {\n var value = item.value = pieceListItem.value;\n item.interval = [value, value];\n item.close = [1, 1];\n } else {\n // `min` `max` is legacy option.\n // `lt` `gt` `lte` `gte` is recommended.\n var interval = item.interval = [];\n var close_1 = item.close = [0, 0];\n var closeList = [1, 0, 1];\n var infinityList = [-Infinity, Infinity];\n var useMinMax = [];\n for (var lg = 0; lg < 2; lg++) {\n var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg];\n for (var i = 0; i < 3 && interval[lg] == null; i++) {\n interval[lg] = pieceListItem[names[i]];\n close_1[lg] = closeList[i];\n useMinMax[lg] = i === 2;\n }\n interval[lg] == null && (interval[lg] = infinityList[lg]);\n }\n useMinMax[0] && interval[1] === Infinity && (close_1[0] = 0);\n useMinMax[1] && interval[0] === -Infinity && (close_1[1] = 0);\n if (process.env.NODE_ENV !== 'production') {\n if (interval[0] > interval[1]) {\n console.warn('Piece ' + index + 'is illegal: ' + interval + ' lower bound should not greater then uppper bound.');\n }\n }\n if (interval[0] === interval[1] && close_1[0] && close_1[1]) {\n // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}],\n // we use value to lift the priority when min === max\n item.value = interval[0];\n }\n }\n item.visual = VisualMapping.retrieveVisuals(pieceListItem);\n outPieceList.push(item);\n }, this);\n // See \"Order Rule\".\n normalizeReverse(thisOption, outPieceList);\n // Only pieces\n reformIntervals(outPieceList);\n zrUtil.each(outPieceList, function (piece) {\n var close = piece.close;\n var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]];\n piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols);\n }, this);\n }\n};\nfunction normalizeReverse(thisOption, pieceList) {\n var inverse = thisOption.inverse;\n if (thisOption.orient === 'vertical' ? !inverse : inverse) {\n pieceList.reverse();\n }\n}\nexport default PiecewiseModel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapView from './VisualMapView.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport * as layout from '../../util/layout.js';\nimport * as helper from './helper.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nvar PiecewiseVisualMapView = /** @class */function (_super) {\n __extends(PiecewiseVisualMapView, _super);\n function PiecewiseVisualMapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = PiecewiseVisualMapView.type;\n return _this;\n }\n PiecewiseVisualMapView.prototype.doRender = function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var textStyleModel = visualMapModel.textStyleModel;\n var textFont = textStyleModel.getFont();\n var textFill = textStyleModel.getTextColor();\n var itemAlign = this._getItemAlign();\n var itemSize = visualMapModel.itemSize;\n var viewData = this._getViewData();\n var endsText = viewData.endsText;\n var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText);\n endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign);\n zrUtil.each(viewData.viewPieceList, function (item) {\n var piece = item.piece;\n var itemGroup = new graphic.Group();\n itemGroup.onclick = zrUtil.bind(this._onItemClick, this, piece);\n this._enableHoverLink(itemGroup, item.indexInModelPieceList);\n // TODO Category\n var representValue = visualMapModel.getRepresentValue(piece);\n this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]);\n if (showLabel) {\n var visualState = this.visualMapModel.getValueState(representValue);\n itemGroup.add(new graphic.Text({\n style: {\n x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap,\n y: itemSize[1] / 2,\n text: piece.text,\n verticalAlign: 'middle',\n align: itemAlign,\n font: textFont,\n fill: textFill,\n opacity: visualState === 'outOfRange' ? 0.5 : 1\n }\n }));\n }\n thisGroup.add(itemGroup);\n }, this);\n endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign);\n layout.box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap'));\n this.renderBackground(thisGroup);\n this.positionGroup(thisGroup);\n };\n PiecewiseVisualMapView.prototype._enableHoverLink = function (itemGroup, pieceIndex) {\n var _this = this;\n itemGroup.on('mouseover', function () {\n return onHoverLink('highlight');\n }).on('mouseout', function () {\n return onHoverLink('downplay');\n });\n var onHoverLink = function (method) {\n var visualMapModel = _this.visualMapModel;\n // TODO: TYPE More detailed action types\n visualMapModel.option.hoverLink && _this.api.dispatchAction({\n type: method,\n batch: helper.makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel)\n });\n };\n };\n PiecewiseVisualMapView.prototype._getItemAlign = function () {\n var visualMapModel = this.visualMapModel;\n var modelOption = visualMapModel.option;\n if (modelOption.orient === 'vertical') {\n return helper.getItemAlign(visualMapModel, this.api, visualMapModel.itemSize);\n } else {\n // horizontal, most case left unless specifying right.\n var align = modelOption.align;\n if (!align || align === 'auto') {\n align = 'left';\n }\n return align;\n }\n };\n PiecewiseVisualMapView.prototype._renderEndsText = function (group, text, itemSize, showLabel, itemAlign) {\n if (!text) {\n return;\n }\n var itemGroup = new graphic.Group();\n var textStyleModel = this.visualMapModel.textStyleModel;\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2,\n y: itemSize[1] / 2,\n verticalAlign: 'middle',\n align: showLabel ? itemAlign : 'center',\n text: text\n })\n }));\n group.add(itemGroup);\n };\n /**\n * @private\n * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.\n */\n PiecewiseVisualMapView.prototype._getViewData = function () {\n var visualMapModel = this.visualMapModel;\n var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) {\n return {\n piece: piece,\n indexInModelPieceList: index\n };\n });\n var endsText = visualMapModel.get('text');\n // Consider orient and inverse.\n var orient = visualMapModel.get('orient');\n var inverse = visualMapModel.get('inverse');\n // Order of model pieceList is always [low, ..., high]\n if (orient === 'horizontal' ? inverse : !inverse) {\n viewPieceList.reverse();\n }\n // Origin order of endsText is [high, low]\n else if (endsText) {\n endsText = endsText.slice().reverse();\n }\n return {\n viewPieceList: viewPieceList,\n endsText: endsText\n };\n };\n PiecewiseVisualMapView.prototype._createItemSymbol = function (group, representValue, shapeParam) {\n group.add(createSymbol(\n // symbol will be string\n this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3],\n // color will be string\n this.getControllerVisual(representValue, 'color')));\n };\n PiecewiseVisualMapView.prototype._onItemClick = function (piece) {\n var visualMapModel = this.visualMapModel;\n var option = visualMapModel.option;\n var selectedMode = option.selectedMode;\n if (!selectedMode) {\n return;\n }\n var selected = zrUtil.clone(option.selected);\n var newKey = visualMapModel.getSelectedMapKey(piece);\n if (selectedMode === 'single' || selectedMode === true) {\n selected[newKey] = true;\n zrUtil.each(selected, function (o, key) {\n selected[key] = key === newKey;\n });\n } else {\n selected[newKey] = !selected[newKey];\n }\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: selected\n });\n };\n PiecewiseVisualMapView.type = 'visualMap.piecewise';\n return PiecewiseVisualMapView;\n}(VisualMapView);\nexport default PiecewiseVisualMapView;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport PiecewiseModel from './PiecewiseModel.js';\nimport PiecewiseView from './PiecewiseView.js';\nimport installCommon from './installCommon.js';\nexport function install(registers) {\n registers.registerComponentModel(PiecewiseModel);\n registers.registerComponentView(PiecewiseView);\n installCommon(registers);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from '../../extension.js';\nimport { install as installVisualMapContinuous } from './installVisualMapContinuous.js';\nimport { install as installVisualMapPiecewise } from './installVisualMapPiecewise.js';\nexport function install(registers) {\n use(installVisualMapContinuous);\n use(installVisualMapPiecewise);\n // Do not install './dataZoomSelect',\n // since it only work for toolbox dataZoom.\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { makeInner } from '../util/model.js';\nimport { getDecalFromPalette } from '../model/mixin/palette.js';\nvar DEFAULT_OPTION = {\n label: {\n enabled: true\n },\n decal: {\n show: false\n }\n};\nvar inner = makeInner();\nvar decalPaletteScope = {};\nexport default function ariaVisual(ecModel, api) {\n var ariaModel = ecModel.getModel('aria');\n // See \"area enabled\" detection code in `GlobalModel.ts`.\n if (!ariaModel.get('enabled')) {\n return;\n }\n var defaultOption = zrUtil.clone(DEFAULT_OPTION);\n zrUtil.merge(defaultOption.label, ecModel.getLocaleModel().get('aria'), false);\n zrUtil.merge(ariaModel.option, defaultOption, false);\n setDecal();\n setLabel();\n function setDecal() {\n var decalModel = ariaModel.getModel('decal');\n var useDecal = decalModel.get('show');\n if (useDecal) {\n // Each type of series use one scope.\n // Pie and funnel are using different scopes.\n var paletteScopeGroupByType_1 = zrUtil.createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.isColorBySeries()) {\n return;\n }\n var decalScope = paletteScopeGroupByType_1.get(seriesModel.type);\n if (!decalScope) {\n decalScope = {};\n paletteScopeGroupByType_1.set(seriesModel.type, decalScope);\n }\n inner(seriesModel).scope = decalScope;\n });\n ecModel.eachRawSeries(function (seriesModel) {\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n if (zrUtil.isFunction(seriesModel.enableAriaDecal)) {\n // Let series define how to use decal palette on data\n seriesModel.enableAriaDecal();\n return;\n }\n var data = seriesModel.getData();\n if (!seriesModel.isColorBySeries()) {\n var dataAll_1 = seriesModel.getRawData();\n var idxMap_1 = {};\n var decalScope_1 = inner(seriesModel).scope;\n data.each(function (idx) {\n var rawIdx = data.getRawIndex(idx);\n idxMap_1[rawIdx] = idx;\n });\n var dataCount_1 = dataAll_1.count();\n dataAll_1.each(function (rawIdx) {\n var idx = idxMap_1[rawIdx];\n var name = dataAll_1.getName(rawIdx) || rawIdx + '';\n var paletteDecal = getDecalFromPalette(seriesModel.ecModel, name, decalScope_1, dataCount_1);\n var specifiedDecal = data.getItemVisual(idx, 'decal');\n data.setItemVisual(idx, 'decal', mergeDecal(specifiedDecal, paletteDecal));\n });\n } else {\n var paletteDecal = getDecalFromPalette(seriesModel.ecModel, seriesModel.name, decalPaletteScope, ecModel.getSeriesCount());\n var specifiedDecal = data.getVisual('decal');\n data.setVisual('decal', mergeDecal(specifiedDecal, paletteDecal));\n }\n function mergeDecal(specifiedDecal, paletteDecal) {\n // Merge decal from palette to decal from itemStyle.\n // User do not need to specify all of the decal props.\n var resultDecal = specifiedDecal ? zrUtil.extend(zrUtil.extend({}, paletteDecal), specifiedDecal) : paletteDecal;\n resultDecal.dirty = true;\n return resultDecal;\n }\n });\n }\n }\n function setLabel() {\n var dom = api.getZr().dom;\n // TODO: support for SSR\n if (!dom) {\n return;\n }\n var labelLocale = ecModel.getLocaleModel().get('aria');\n var labelModel = ariaModel.getModel('label');\n labelModel.option = zrUtil.defaults(labelModel.option, labelLocale);\n if (!labelModel.get('enabled')) {\n return;\n }\n if (labelModel.get('description')) {\n dom.setAttribute('aria-label', labelModel.get('description'));\n return;\n }\n var seriesCnt = ecModel.getSeriesCount();\n var maxDataCnt = labelModel.get(['data', 'maxCount']) || 10;\n var maxSeriesCnt = labelModel.get(['series', 'maxCount']) || 10;\n var displaySeriesCnt = Math.min(seriesCnt, maxSeriesCnt);\n var ariaLabel;\n if (seriesCnt < 1) {\n // No series, no aria label\n return;\n } else {\n var title = getTitle();\n if (title) {\n var withTitle = labelModel.get(['general', 'withTitle']);\n ariaLabel = replace(withTitle, {\n title: title\n });\n } else {\n ariaLabel = labelModel.get(['general', 'withoutTitle']);\n }\n var seriesLabels_1 = [];\n var prefix = seriesCnt > 1 ? labelModel.get(['series', 'multiple', 'prefix']) : labelModel.get(['series', 'single', 'prefix']);\n ariaLabel += replace(prefix, {\n seriesCount: seriesCnt\n });\n ecModel.eachSeries(function (seriesModel, idx) {\n if (idx < displaySeriesCnt) {\n var seriesLabel = void 0;\n var seriesName = seriesModel.get('name');\n var withName = seriesName ? 'withName' : 'withoutName';\n seriesLabel = seriesCnt > 1 ? labelModel.get(['series', 'multiple', withName]) : labelModel.get(['series', 'single', withName]);\n seriesLabel = replace(seriesLabel, {\n seriesId: seriesModel.seriesIndex,\n seriesName: seriesModel.get('name'),\n seriesType: getSeriesTypeName(seriesModel.subType)\n });\n var data = seriesModel.getData();\n if (data.count() > maxDataCnt) {\n // Show part of data\n var partialLabel = labelModel.get(['data', 'partialData']);\n seriesLabel += replace(partialLabel, {\n displayCnt: maxDataCnt\n });\n } else {\n seriesLabel += labelModel.get(['data', 'allData']);\n }\n var middleSeparator_1 = labelModel.get(['data', 'separator', 'middle']);\n var endSeparator_1 = labelModel.get(['data', 'separator', 'end']);\n var dataLabels = [];\n for (var i = 0; i < data.count(); i++) {\n if (i < maxDataCnt) {\n var name_1 = data.getName(i);\n var value = data.getValues(i);\n var dataLabel = labelModel.get(['data', name_1 ? 'withName' : 'withoutName']);\n dataLabels.push(replace(dataLabel, {\n name: name_1,\n value: value.join(middleSeparator_1)\n }));\n }\n }\n seriesLabel += dataLabels.join(middleSeparator_1) + endSeparator_1;\n seriesLabels_1.push(seriesLabel);\n }\n });\n var separatorModel = labelModel.getModel(['series', 'multiple', 'separator']);\n var middleSeparator = separatorModel.get('middle');\n var endSeparator = separatorModel.get('end');\n ariaLabel += seriesLabels_1.join(middleSeparator) + endSeparator;\n dom.setAttribute('aria-label', ariaLabel);\n }\n }\n function replace(str, keyValues) {\n if (!zrUtil.isString(str)) {\n return str;\n }\n var result = str;\n zrUtil.each(keyValues, function (value, key) {\n result = result.replace(new RegExp('\\\\{\\\\s*' + key + '\\\\s*\\\\}', 'g'), value);\n });\n return result;\n }\n function getTitle() {\n var title = ecModel.get('title');\n if (title && title.length) {\n title = title[0];\n }\n return title && title.text;\n }\n function getSeriesTypeName(type) {\n var typeNames = ecModel.getLocaleModel().get(['series', 'typeNames']);\n return typeNames[type] || typeNames.chart;\n }\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function ariaPreprocessor(option) {\n if (!option || !option.aria) {\n return;\n }\n var aria = option.aria;\n // aria.show is deprecated and should use aria.enabled instead\n if (aria.show != null) {\n aria.enabled = aria.show;\n }\n aria.label = aria.label || {};\n // move description, general, series, data to be under aria.label\n zrUtil.each(['description', 'general', 'series', 'data'], function (name) {\n if (aria[name] != null) {\n aria.label[name] = aria[name];\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport ariaVisual from '../../visual/aria.js';\nimport ariaPreprocessor from './preprocessor.js';\nexport function install(registers) {\n registers.registerPreprocessor(ariaPreprocessor);\n registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { keys, isArray, map, isObject, isString, isRegExp, isArrayLike, hasOwn, isNumber } from 'zrender/lib/core/util.js';\nimport { throwError, makePrintable } from './log.js';\nimport { getRawValueParser, createFilterComparator } from '../data/helper/dataValueHelper.js';\n;\nvar RELATIONAL_EXPRESSION_OP_ALIAS_MAP = {\n value: 'eq',\n // PENDING: not good for literal semantic?\n '<': 'lt',\n '<=': 'lte',\n '>': 'gt',\n '>=': 'gte',\n '=': 'eq',\n '!=': 'ne',\n '<>': 'ne'\n // Might be misleading for sake of the difference between '==' and '===',\n // so don't support them.\n // '==': 'eq',\n // '===': 'seq',\n // '!==': 'sne'\n // PENDING: Whether support some common alias \"ge\", \"le\", \"neq\"?\n // ge: 'gte',\n // le: 'lte',\n // neq: 'ne',\n};\n// type RelationalExpressionOpEvaluate = (tarVal: unknown, condVal: unknown) => boolean;\nvar RegExpEvaluator = /** @class */function () {\n function RegExpEvaluator(rVal) {\n // Support condVal: RegExp | string\n var condValue = this._condVal = isString(rVal) ? new RegExp(rVal) : isRegExp(rVal) ? rVal : null;\n if (condValue == null) {\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal regexp', rVal, 'in');\n }\n throwError(errMsg);\n }\n }\n RegExpEvaluator.prototype.evaluate = function (lVal) {\n var type = typeof lVal;\n return isString(type) ? this._condVal.test(lVal) : isNumber(type) ? this._condVal.test(lVal + '') : false;\n };\n return RegExpEvaluator;\n}();\nvar ConstConditionInternal = /** @class */function () {\n function ConstConditionInternal() {}\n ConstConditionInternal.prototype.evaluate = function () {\n return this.value;\n };\n return ConstConditionInternal;\n}();\nvar AndConditionInternal = /** @class */function () {\n function AndConditionInternal() {}\n AndConditionInternal.prototype.evaluate = function () {\n var children = this.children;\n for (var i = 0; i < children.length; i++) {\n if (!children[i].evaluate()) {\n return false;\n }\n }\n return true;\n };\n return AndConditionInternal;\n}();\nvar OrConditionInternal = /** @class */function () {\n function OrConditionInternal() {}\n OrConditionInternal.prototype.evaluate = function () {\n var children = this.children;\n for (var i = 0; i < children.length; i++) {\n if (children[i].evaluate()) {\n return true;\n }\n }\n return false;\n };\n return OrConditionInternal;\n}();\nvar NotConditionInternal = /** @class */function () {\n function NotConditionInternal() {}\n NotConditionInternal.prototype.evaluate = function () {\n return !this.child.evaluate();\n };\n return NotConditionInternal;\n}();\nvar RelationalConditionInternal = /** @class */function () {\n function RelationalConditionInternal() {}\n RelationalConditionInternal.prototype.evaluate = function () {\n var needParse = !!this.valueParser;\n // Call getValue with no `this`.\n var getValue = this.getValue;\n var tarValRaw = getValue(this.valueGetterParam);\n var tarValParsed = needParse ? this.valueParser(tarValRaw) : null;\n // Relational cond follow \"and\" logic internally.\n for (var i = 0; i < this.subCondList.length; i++) {\n if (!this.subCondList[i].evaluate(needParse ? tarValParsed : tarValRaw)) {\n return false;\n }\n }\n return true;\n };\n return RelationalConditionInternal;\n}();\nfunction parseOption(exprOption, getters) {\n if (exprOption === true || exprOption === false) {\n var cond = new ConstConditionInternal();\n cond.value = exprOption;\n return cond;\n }\n var errMsg = '';\n if (!isObjectNotArray(exprOption)) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal config. Expect a plain object but actually', exprOption);\n }\n throwError(errMsg);\n }\n if (exprOption.and) {\n return parseAndOrOption('and', exprOption, getters);\n } else if (exprOption.or) {\n return parseAndOrOption('or', exprOption, getters);\n } else if (exprOption.not) {\n return parseNotOption(exprOption, getters);\n }\n return parseRelationalOption(exprOption, getters);\n}\nfunction parseAndOrOption(op, exprOption, getters) {\n var subOptionArr = exprOption[op];\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('\"and\"/\"or\" condition should only be `' + op + ': [...]` and must not be empty array.', 'Illegal condition:', exprOption);\n }\n if (!isArray(subOptionArr)) {\n throwError(errMsg);\n }\n if (!subOptionArr.length) {\n throwError(errMsg);\n }\n var cond = op === 'and' ? new AndConditionInternal() : new OrConditionInternal();\n cond.children = map(subOptionArr, function (subOption) {\n return parseOption(subOption, getters);\n });\n if (!cond.children.length) {\n throwError(errMsg);\n }\n return cond;\n}\nfunction parseNotOption(exprOption, getters) {\n var subOption = exprOption.not;\n var errMsg = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('\"not\" condition should only be `not: {}`.', 'Illegal condition:', exprOption);\n }\n if (!isObjectNotArray(subOption)) {\n throwError(errMsg);\n }\n var cond = new NotConditionInternal();\n cond.child = parseOption(subOption, getters);\n if (!cond.child) {\n throwError(errMsg);\n }\n return cond;\n}\nfunction parseRelationalOption(exprOption, getters) {\n var errMsg = '';\n var valueGetterParam = getters.prepareGetValue(exprOption);\n var subCondList = [];\n var exprKeys = keys(exprOption);\n var parserName = exprOption.parser;\n var valueParser = parserName ? getRawValueParser(parserName) : null;\n for (var i = 0; i < exprKeys.length; i++) {\n var keyRaw = exprKeys[i];\n if (keyRaw === 'parser' || getters.valueGetterAttrMap.get(keyRaw)) {\n continue;\n }\n var op = hasOwn(RELATIONAL_EXPRESSION_OP_ALIAS_MAP, keyRaw) ? RELATIONAL_EXPRESSION_OP_ALIAS_MAP[keyRaw] : keyRaw;\n var condValueRaw = exprOption[keyRaw];\n var condValueParsed = valueParser ? valueParser(condValueRaw) : condValueRaw;\n var evaluator = createFilterComparator(op, condValueParsed) || op === 'reg' && new RegExpEvaluator(condValueParsed);\n if (!evaluator) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Illegal relational operation: \"' + keyRaw + '\" in condition:', exprOption);\n }\n throwError(errMsg);\n }\n subCondList.push(evaluator);\n }\n if (!subCondList.length) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Relational condition must have at least one operator.', 'Illegal condition:', exprOption);\n }\n // No relational operator always disabled in case of dangers result.\n throwError(errMsg);\n }\n var cond = new RelationalConditionInternal();\n cond.valueGetterParam = valueGetterParam;\n cond.valueParser = valueParser;\n cond.getValue = getters.getValue;\n cond.subCondList = subCondList;\n return cond;\n}\nfunction isObjectNotArray(val) {\n return isObject(val) && !isArrayLike(val);\n}\nvar ConditionalExpressionParsed = /** @class */function () {\n function ConditionalExpressionParsed(exprOption, getters) {\n this._cond = parseOption(exprOption, getters);\n }\n ConditionalExpressionParsed.prototype.evaluate = function () {\n return this._cond.evaluate();\n };\n return ConditionalExpressionParsed;\n}();\n;\nexport function parseConditionalExpression(exprOption, getters) {\n return new ConditionalExpressionParsed(exprOption, getters);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { parseConditionalExpression } from '../../util/conditionalExpression.js';\nimport { hasOwn, createHashMap } from 'zrender/lib/core/util.js';\nimport { makePrintable, throwError } from '../../util/log.js';\nexport var filterTransform = {\n type: 'echarts:filter',\n // PENDING: enhance to filter by index rather than create new data\n transform: function (params) {\n // [Caveat] Fail-Fast:\n // Do not return the whole dataset unless user config indicates it explicitly.\n // For example, if no condition is specified by mistake, returning an empty result\n // is better than returning the entire raw source for the user to find the mistake.\n var upstream = params.upstream;\n var rawItem;\n var condition = parseConditionalExpression(params.config, {\n valueGetterAttrMap: createHashMap({\n dimension: true\n }),\n prepareGetValue: function (exprOption) {\n var errMsg = '';\n var dimLoose = exprOption.dimension;\n if (!hasOwn(exprOption, 'dimension')) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Relation condition must has prop \"dimension\" specified.', 'Illegal condition:', exprOption);\n }\n throwError(errMsg);\n }\n var dimInfo = upstream.getDimensionInfo(dimLoose);\n if (!dimInfo) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\\n', 'Illegal condition:', exprOption, '.\\n');\n }\n throwError(errMsg);\n }\n return {\n dimIdx: dimInfo.index\n };\n },\n getValue: function (param) {\n return upstream.retrieveValueFromItem(rawItem, param.dimIdx);\n }\n });\n var resultData = [];\n for (var i = 0, len = upstream.count(); i < len; i++) {\n rawItem = upstream.getRawDataItem(i);\n if (condition.evaluate()) {\n resultData.push(rawItem);\n }\n }\n return {\n data: resultData\n };\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { SOURCE_FORMAT_ARRAY_ROWS, SOURCE_FORMAT_OBJECT_ROWS } from '../../util/types.js';\nimport { makePrintable, throwError } from '../../util/log.js';\nimport { each } from 'zrender/lib/core/util.js';\nimport { normalizeToArray } from '../../util/model.js';\nimport { getRawValueParser, SortOrderComparator } from '../../data/helper/dataValueHelper.js';\nvar sampleLog = '';\nif (process.env.NODE_ENV !== 'production') {\n sampleLog = ['Valid config is like:', '{ dimension: \"age\", order: \"asc\" }', 'or [{ dimension: \"age\", order: \"asc\"], { dimension: \"date\", order: \"desc\" }]'].join(' ');\n}\nexport var sortTransform = {\n type: 'echarts:sort',\n transform: function (params) {\n var upstream = params.upstream;\n var config = params.config;\n var errMsg = '';\n // Normalize\n // const orderExprList: OrderExpression[] = isArray(config[0])\n // ? config as OrderExpression[]\n // : [config as OrderExpression];\n var orderExprList = normalizeToArray(config);\n if (!orderExprList.length) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Empty `config` in sort transform.';\n }\n throwError(errMsg);\n }\n var orderDefList = [];\n each(orderExprList, function (orderExpr) {\n var dimLoose = orderExpr.dimension;\n var order = orderExpr.order;\n var parserName = orderExpr.parser;\n var incomparable = orderExpr.incomparable;\n if (dimLoose == null) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Sort transform config must has \"dimension\" specified.' + sampleLog;\n }\n throwError(errMsg);\n }\n if (order !== 'asc' && order !== 'desc') {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'Sort transform config must has \"order\" specified.' + sampleLog;\n }\n throwError(errMsg);\n }\n if (incomparable && incomparable !== 'min' && incomparable !== 'max') {\n var errMsg_1 = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg_1 = 'incomparable must be \"min\" or \"max\" rather than \"' + incomparable + '\".';\n }\n throwError(errMsg_1);\n }\n if (order !== 'asc' && order !== 'desc') {\n var errMsg_2 = '';\n if (process.env.NODE_ENV !== 'production') {\n errMsg_2 = 'order must be \"asc\" or \"desc\" rather than \"' + order + '\".';\n }\n throwError(errMsg_2);\n }\n var dimInfo = upstream.getDimensionInfo(dimLoose);\n if (!dimInfo) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Can not find dimension info via: ' + dimLoose + '.\\n', 'Existing dimensions: ', upstream.cloneAllDimensionInfo(), '.\\n', 'Illegal config:', orderExpr, '.\\n');\n }\n throwError(errMsg);\n }\n var parser = parserName ? getRawValueParser(parserName) : null;\n if (parserName && !parser) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = makePrintable('Invalid parser name ' + parserName + '.\\n', 'Illegal config:', orderExpr, '.\\n');\n }\n throwError(errMsg);\n }\n orderDefList.push({\n dimIdx: dimInfo.index,\n parser: parser,\n comparator: new SortOrderComparator(order, incomparable)\n });\n });\n // TODO: support it?\n var sourceFormat = upstream.sourceFormat;\n if (sourceFormat !== SOURCE_FORMAT_ARRAY_ROWS && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) {\n if (process.env.NODE_ENV !== 'production') {\n errMsg = 'sourceFormat \"' + sourceFormat + '\" is not supported yet';\n }\n throwError(errMsg);\n }\n // Other upstream format are all array.\n var resultData = [];\n for (var i = 0, len = upstream.count(); i < len; i++) {\n resultData.push(upstream.getRawDataItem(i));\n }\n resultData.sort(function (item0, item1) {\n for (var i = 0; i < orderDefList.length; i++) {\n var orderDef = orderDefList[i];\n var val0 = upstream.retrieveValueFromItem(item0, orderDef.dimIdx);\n var val1 = upstream.retrieveValueFromItem(item1, orderDef.dimIdx);\n if (orderDef.parser) {\n val0 = orderDef.parser(val0);\n val1 = orderDef.parser(val1);\n }\n var result = orderDef.comparator.evaluate(val0, val1);\n if (result !== 0) {\n return result;\n }\n }\n return 0;\n });\n return {\n data: resultData\n };\n }\n};","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { filterTransform } from './filterTransform.js';\nimport { sortTransform } from './sortTransform.js';\nexport function install(registers) {\n registers.registerTransform(filterTransform);\n registers.registerTransform(sortTransform);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * This module is imported by echarts directly.\n *\n * Notice:\n * Always keep this file exists for backward compatibility.\n * Because before 4.1.0, dataset is an optional component,\n * some users may import this module manually.\n */\nimport ComponentModel from '../../model/Component.js';\nimport ComponentView from '../../view/Component.js';\nimport { SERIES_LAYOUT_BY_COLUMN } from '../../util/types.js';\nimport { disableTransformOptionMerge, SourceManager } from '../../data/helper/sourceManager.js';\nvar DatasetModel = /** @class */function (_super) {\n __extends(DatasetModel, _super);\n function DatasetModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataset';\n return _this;\n }\n DatasetModel.prototype.init = function (option, parentModel, ecModel) {\n _super.prototype.init.call(this, option, parentModel, ecModel);\n this._sourceManager = new SourceManager(this);\n disableTransformOptionMerge(this);\n };\n DatasetModel.prototype.mergeOption = function (newOption, ecModel) {\n _super.prototype.mergeOption.call(this, newOption, ecModel);\n disableTransformOptionMerge(this);\n };\n DatasetModel.prototype.optionUpdated = function () {\n this._sourceManager.dirty();\n };\n DatasetModel.prototype.getSourceManager = function () {\n return this._sourceManager;\n };\n DatasetModel.type = 'dataset';\n DatasetModel.defaultOption = {\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN\n };\n return DatasetModel;\n}(ComponentModel);\nexport { DatasetModel };\nvar DatasetView = /** @class */function (_super) {\n __extends(DatasetView, _super);\n function DatasetView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dataset';\n return _this;\n }\n DatasetView.type = 'dataset';\n return DatasetView;\n}(ComponentView);\nexport function install(registers) {\n registers.registerComponentModel(DatasetModel);\n registers.registerComponentView(DatasetView);\n}","import { cubicSubdivide } from '../core/curve.js';\nimport PathProxy from '../core/PathProxy.js';\nvar CMD = PathProxy.CMD;\nfunction aroundEqual(a, b) {\n return Math.abs(a - b) < 1e-5;\n}\nexport function pathToBezierCurves(path) {\n var data = path.data;\n var len = path.len();\n var bezierArrayGroups = [];\n var currentSubpath;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n function createNewSubpath(x, y) {\n if (currentSubpath && currentSubpath.length > 2) {\n bezierArrayGroups.push(currentSubpath);\n }\n currentSubpath = [x, y];\n }\n function addLine(x0, y0, x1, y1) {\n if (!(aroundEqual(x0, x1) && aroundEqual(y0, y1))) {\n currentSubpath.push(x0, y0, x1, y1, x1, y1);\n }\n }\n function addArc(startAngle, endAngle, cx, cy, rx, ry) {\n var delta = Math.abs(endAngle - startAngle);\n var len = Math.tan(delta / 4) * 4 / 3;\n var dir = endAngle < startAngle ? -1 : 1;\n var c1 = Math.cos(startAngle);\n var s1 = Math.sin(startAngle);\n var c2 = Math.cos(endAngle);\n var s2 = Math.sin(endAngle);\n var x1 = c1 * rx + cx;\n var y1 = s1 * ry + cy;\n var x4 = c2 * rx + cx;\n var y4 = s2 * ry + cy;\n var hx = rx * len * dir;\n var hy = ry * len * dir;\n currentSubpath.push(x1 - hx * s1, y1 + hy * c1, x4 + hx * s2, y4 - hy * c2, x4, y4);\n }\n var x1;\n var y1;\n var x2;\n var y2;\n for (var i = 0; i < len;) {\n var cmd = data[i++];\n var isFirst = i === 1;\n if (isFirst) {\n xi = data[i];\n yi = data[i + 1];\n x0 = xi;\n y0 = yi;\n if (cmd === CMD.L || cmd === CMD.C || cmd === CMD.Q) {\n currentSubpath = [x0, y0];\n }\n }\n switch (cmd) {\n case CMD.M:\n xi = x0 = data[i++];\n yi = y0 = data[i++];\n createNewSubpath(x0, y0);\n break;\n case CMD.L:\n x1 = data[i++];\n y1 = data[i++];\n addLine(xi, yi, x1, y1);\n xi = x1;\n yi = y1;\n break;\n case CMD.C:\n currentSubpath.push(data[i++], data[i++], data[i++], data[i++], xi = data[i++], yi = data[i++]);\n break;\n case CMD.Q:\n x1 = data[i++];\n y1 = data[i++];\n x2 = data[i++];\n y2 = data[i++];\n currentSubpath.push(xi + 2 / 3 * (x1 - xi), yi + 2 / 3 * (y1 - yi), x2 + 2 / 3 * (x1 - x2), y2 + 2 / 3 * (y1 - y2), x2, y2);\n xi = x2;\n yi = y2;\n break;\n case CMD.A:\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++];\n var endAngle = data[i++] + startAngle;\n i += 1;\n var anticlockwise = !data[i++];\n x1 = Math.cos(startAngle) * rx + cx;\n y1 = Math.sin(startAngle) * ry + cy;\n if (isFirst) {\n x0 = x1;\n y0 = y1;\n createNewSubpath(x0, y0);\n }\n else {\n addLine(xi, yi, x1, y1);\n }\n xi = Math.cos(endAngle) * rx + cx;\n yi = Math.sin(endAngle) * ry + cy;\n var step = (anticlockwise ? -1 : 1) * Math.PI / 2;\n for (var angle = startAngle; anticlockwise ? angle > endAngle : angle < endAngle; angle += step) {\n var nextAngle = anticlockwise ? Math.max(angle + step, endAngle)\n : Math.min(angle + step, endAngle);\n addArc(angle, nextAngle, cx, cy, rx, ry);\n }\n break;\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n x1 = x0 + data[i++];\n y1 = y0 + data[i++];\n createNewSubpath(x1, y0);\n addLine(x1, y0, x1, y1);\n addLine(x1, y1, x0, y1);\n addLine(x0, y1, x0, y0);\n addLine(x0, y0, x1, y0);\n break;\n case CMD.Z:\n currentSubpath && addLine(xi, yi, x0, y0);\n xi = x0;\n yi = y0;\n break;\n }\n }\n if (currentSubpath && currentSubpath.length > 2) {\n bezierArrayGroups.push(currentSubpath);\n }\n return bezierArrayGroups;\n}\nfunction adpativeBezier(x0, y0, x1, y1, x2, y2, x3, y3, out, scale) {\n if (aroundEqual(x0, x1) && aroundEqual(y0, y1) && aroundEqual(x2, x3) && aroundEqual(y2, y3)) {\n out.push(x3, y3);\n return;\n }\n var PIXEL_DISTANCE = 2 / scale;\n var PIXEL_DISTANCE_SQR = PIXEL_DISTANCE * PIXEL_DISTANCE;\n var dx = x3 - x0;\n var dy = y3 - y0;\n var d = Math.sqrt(dx * dx + dy * dy);\n dx /= d;\n dy /= d;\n var dx1 = x1 - x0;\n var dy1 = y1 - y0;\n var dx2 = x2 - x3;\n var dy2 = y2 - y3;\n var cp1LenSqr = dx1 * dx1 + dy1 * dy1;\n var cp2LenSqr = dx2 * dx2 + dy2 * dy2;\n if (cp1LenSqr < PIXEL_DISTANCE_SQR && cp2LenSqr < PIXEL_DISTANCE_SQR) {\n out.push(x3, y3);\n return;\n }\n var projLen1 = dx * dx1 + dy * dy1;\n var projLen2 = -dx * dx2 - dy * dy2;\n var d1Sqr = cp1LenSqr - projLen1 * projLen1;\n var d2Sqr = cp2LenSqr - projLen2 * projLen2;\n if (d1Sqr < PIXEL_DISTANCE_SQR && projLen1 >= 0\n && d2Sqr < PIXEL_DISTANCE_SQR && projLen2 >= 0) {\n out.push(x3, y3);\n return;\n }\n var tmpSegX = [];\n var tmpSegY = [];\n cubicSubdivide(x0, x1, x2, x3, 0.5, tmpSegX);\n cubicSubdivide(y0, y1, y2, y3, 0.5, tmpSegY);\n adpativeBezier(tmpSegX[0], tmpSegY[0], tmpSegX[1], tmpSegY[1], tmpSegX[2], tmpSegY[2], tmpSegX[3], tmpSegY[3], out, scale);\n adpativeBezier(tmpSegX[4], tmpSegY[4], tmpSegX[5], tmpSegY[5], tmpSegX[6], tmpSegY[6], tmpSegX[7], tmpSegY[7], out, scale);\n}\nexport function pathToPolygons(path, scale) {\n var bezierArrayGroups = pathToBezierCurves(path);\n var polygons = [];\n scale = scale || 1;\n for (var i = 0; i < bezierArrayGroups.length; i++) {\n var beziers = bezierArrayGroups[i];\n var polygon = [];\n var x0 = beziers[0];\n var y0 = beziers[1];\n polygon.push(x0, y0);\n for (var k = 2; k < beziers.length;) {\n var x1 = beziers[k++];\n var y1 = beziers[k++];\n var x2 = beziers[k++];\n var y2 = beziers[k++];\n var x3 = beziers[k++];\n var y3 = beziers[k++];\n adpativeBezier(x0, y0, x1, y1, x2, y2, x3, y3, polygon, scale);\n x0 = x3;\n y0 = y3;\n }\n polygons.push(polygon);\n }\n return polygons;\n}\n","import { fromPoints } from '../core/bbox.js';\nimport BoundingRect from '../core/BoundingRect.js';\nimport Point from '../core/Point.js';\nimport { map } from '../core/util.js';\nimport Polygon from '../graphic/shape/Polygon.js';\nimport Rect from '../graphic/shape/Rect.js';\nimport Sector from '../graphic/shape/Sector.js';\nimport { pathToPolygons } from './convertPath.js';\nimport { clonePath } from './path.js';\nfunction getDividingGrids(dimSize, rowDim, count) {\n var rowSize = dimSize[rowDim];\n var columnSize = dimSize[1 - rowDim];\n var ratio = Math.abs(rowSize / columnSize);\n var rowCount = Math.ceil(Math.sqrt(ratio * count));\n var columnCount = Math.floor(count / rowCount);\n if (columnCount === 0) {\n columnCount = 1;\n rowCount = count;\n }\n var grids = [];\n for (var i = 0; i < rowCount; i++) {\n grids.push(columnCount);\n }\n var currentCount = rowCount * columnCount;\n var remained = count - currentCount;\n if (remained > 0) {\n for (var i = 0; i < remained; i++) {\n grids[i % rowCount] += 1;\n }\n }\n return grids;\n}\nfunction divideSector(sectorShape, count, outShapes) {\n var r0 = sectorShape.r0;\n var r = sectorShape.r;\n var startAngle = sectorShape.startAngle;\n var endAngle = sectorShape.endAngle;\n var angle = Math.abs(endAngle - startAngle);\n var arcLen = angle * r;\n var deltaR = r - r0;\n var isAngleRow = arcLen > Math.abs(deltaR);\n var grids = getDividingGrids([arcLen, deltaR], isAngleRow ? 0 : 1, count);\n var rowSize = (isAngleRow ? angle : deltaR) / grids.length;\n for (var row = 0; row < grids.length; row++) {\n var columnSize = (isAngleRow ? deltaR : angle) / grids[row];\n for (var column = 0; column < grids[row]; column++) {\n var newShape = {};\n if (isAngleRow) {\n newShape.startAngle = startAngle + rowSize * row;\n newShape.endAngle = startAngle + rowSize * (row + 1);\n newShape.r0 = r0 + columnSize * column;\n newShape.r = r0 + columnSize * (column + 1);\n }\n else {\n newShape.startAngle = startAngle + columnSize * column;\n newShape.endAngle = startAngle + columnSize * (column + 1);\n newShape.r0 = r0 + rowSize * row;\n newShape.r = r0 + rowSize * (row + 1);\n }\n newShape.clockwise = sectorShape.clockwise;\n newShape.cx = sectorShape.cx;\n newShape.cy = sectorShape.cy;\n outShapes.push(newShape);\n }\n }\n}\nfunction divideRect(rectShape, count, outShapes) {\n var width = rectShape.width;\n var height = rectShape.height;\n var isHorizontalRow = width > height;\n var grids = getDividingGrids([width, height], isHorizontalRow ? 0 : 1, count);\n var rowSizeDim = isHorizontalRow ? 'width' : 'height';\n var columnSizeDim = isHorizontalRow ? 'height' : 'width';\n var rowDim = isHorizontalRow ? 'x' : 'y';\n var columnDim = isHorizontalRow ? 'y' : 'x';\n var rowSize = rectShape[rowSizeDim] / grids.length;\n for (var row = 0; row < grids.length; row++) {\n var columnSize = rectShape[columnSizeDim] / grids[row];\n for (var column = 0; column < grids[row]; column++) {\n var newShape = {};\n newShape[rowDim] = row * rowSize;\n newShape[columnDim] = column * columnSize;\n newShape[rowSizeDim] = rowSize;\n newShape[columnSizeDim] = columnSize;\n newShape.x += rectShape.x;\n newShape.y += rectShape.y;\n outShapes.push(newShape);\n }\n }\n}\nfunction crossProduct2d(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\nfunction lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) {\n var mx = a2x - a1x;\n var my = a2y - a1y;\n var nx = b2x - b1x;\n var ny = b2y - b1y;\n var nmCrossProduct = crossProduct2d(nx, ny, mx, my);\n if (Math.abs(nmCrossProduct) < 1e-6) {\n return null;\n }\n var b1a1x = a1x - b1x;\n var b1a1y = a1y - b1y;\n var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct;\n if (p < 0 || p > 1) {\n return null;\n }\n return new Point(p * mx + a1x, p * my + a1y);\n}\nfunction projPtOnLine(pt, lineA, lineB) {\n var dir = new Point();\n Point.sub(dir, lineB, lineA);\n dir.normalize();\n var dir2 = new Point();\n Point.sub(dir2, pt, lineA);\n var len = dir2.dot(dir);\n return len;\n}\nfunction addToPoly(poly, pt) {\n var last = poly[poly.length - 1];\n if (last && last[0] === pt[0] && last[1] === pt[1]) {\n return;\n }\n poly.push(pt);\n}\nfunction splitPolygonByLine(points, lineA, lineB) {\n var len = points.length;\n var intersections = [];\n for (var i = 0; i < len; i++) {\n var p0 = points[i];\n var p1 = points[(i + 1) % len];\n var intersectionPt = lineLineIntersect(p0[0], p0[1], p1[0], p1[1], lineA.x, lineA.y, lineB.x, lineB.y);\n if (intersectionPt) {\n intersections.push({\n projPt: projPtOnLine(intersectionPt, lineA, lineB),\n pt: intersectionPt,\n idx: i\n });\n }\n }\n if (intersections.length < 2) {\n return [{ points: points }, { points: points }];\n }\n intersections.sort(function (a, b) {\n return a.projPt - b.projPt;\n });\n var splitPt0 = intersections[0];\n var splitPt1 = intersections[intersections.length - 1];\n if (splitPt1.idx < splitPt0.idx) {\n var tmp = splitPt0;\n splitPt0 = splitPt1;\n splitPt1 = tmp;\n }\n var splitPt0Arr = [splitPt0.pt.x, splitPt0.pt.y];\n var splitPt1Arr = [splitPt1.pt.x, splitPt1.pt.y];\n var newPolyA = [splitPt0Arr];\n var newPolyB = [splitPt1Arr];\n for (var i = splitPt0.idx + 1; i <= splitPt1.idx; i++) {\n addToPoly(newPolyA, points[i].slice());\n }\n addToPoly(newPolyA, splitPt1Arr);\n addToPoly(newPolyA, splitPt0Arr);\n for (var i = splitPt1.idx + 1; i <= splitPt0.idx + len; i++) {\n addToPoly(newPolyB, points[i % len].slice());\n }\n addToPoly(newPolyB, splitPt0Arr);\n addToPoly(newPolyB, splitPt1Arr);\n return [{\n points: newPolyA\n }, {\n points: newPolyB\n }];\n}\nfunction binaryDividePolygon(polygonShape) {\n var points = polygonShape.points;\n var min = [];\n var max = [];\n fromPoints(points, min, max);\n var boundingRect = new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n var width = boundingRect.width;\n var height = boundingRect.height;\n var x = boundingRect.x;\n var y = boundingRect.y;\n var pt0 = new Point();\n var pt1 = new Point();\n if (width > height) {\n pt0.x = pt1.x = x + width / 2;\n pt0.y = y;\n pt1.y = y + height;\n }\n else {\n pt0.y = pt1.y = y + height / 2;\n pt0.x = x;\n pt1.x = x + width;\n }\n return splitPolygonByLine(points, pt0, pt1);\n}\nfunction binaryDivideRecursive(divider, shape, count, out) {\n if (count === 1) {\n out.push(shape);\n }\n else {\n var mid = Math.floor(count / 2);\n var sub = divider(shape);\n binaryDivideRecursive(divider, sub[0], mid, out);\n binaryDivideRecursive(divider, sub[1], count - mid, out);\n }\n return out;\n}\nexport function clone(path, count) {\n var paths = [];\n for (var i = 0; i < count; i++) {\n paths.push(clonePath(path));\n }\n return paths;\n}\nfunction copyPathProps(source, target) {\n target.setStyle(source.style);\n target.z = source.z;\n target.z2 = source.z2;\n target.zlevel = source.zlevel;\n}\nfunction polygonConvert(points) {\n var out = [];\n for (var i = 0; i < points.length;) {\n out.push([points[i++], points[i++]]);\n }\n return out;\n}\nexport function split(path, count) {\n var outShapes = [];\n var shape = path.shape;\n var OutShapeCtor;\n switch (path.type) {\n case 'rect':\n divideRect(shape, count, outShapes);\n OutShapeCtor = Rect;\n break;\n case 'sector':\n divideSector(shape, count, outShapes);\n OutShapeCtor = Sector;\n break;\n case 'circle':\n divideSector({\n r0: 0, r: shape.r, startAngle: 0, endAngle: Math.PI * 2,\n cx: shape.cx, cy: shape.cy\n }, count, outShapes);\n OutShapeCtor = Sector;\n break;\n default:\n var m = path.getComputedTransform();\n var scale = m ? Math.sqrt(Math.max(m[0] * m[0] + m[1] * m[1], m[2] * m[2] + m[3] * m[3])) : 1;\n var polygons = map(pathToPolygons(path.getUpdatedPathProxy(), scale), function (poly) { return polygonConvert(poly); });\n var polygonCount = polygons.length;\n if (polygonCount === 0) {\n binaryDivideRecursive(binaryDividePolygon, {\n points: polygons[0]\n }, count, outShapes);\n }\n else if (polygonCount === count) {\n for (var i = 0; i < polygonCount; i++) {\n outShapes.push({\n points: polygons[i]\n });\n }\n }\n else {\n var totalArea_1 = 0;\n var items = map(polygons, function (poly) {\n var min = [];\n var max = [];\n fromPoints(poly, min, max);\n var area = (max[1] - min[1]) * (max[0] - min[0]);\n totalArea_1 += area;\n return { poly: poly, area: area };\n });\n items.sort(function (a, b) { return b.area - a.area; });\n var left = count;\n for (var i = 0; i < polygonCount; i++) {\n var item = items[i];\n if (left <= 0) {\n break;\n }\n var selfCount = i === polygonCount - 1\n ? left\n : Math.ceil(item.area / totalArea_1 * count);\n if (selfCount < 0) {\n continue;\n }\n binaryDivideRecursive(binaryDividePolygon, {\n points: item.poly\n }, selfCount, outShapes);\n left -= selfCount;\n }\n ;\n }\n OutShapeCtor = Polygon;\n break;\n }\n if (!OutShapeCtor) {\n return clone(path, count);\n }\n var out = [];\n for (var i = 0; i < outShapes.length; i++) {\n var subPath = new OutShapeCtor();\n subPath.setShape(outShapes[i]);\n copyPathProps(path, subPath);\n out.push(subPath);\n }\n return out;\n}\n","import { cubicSubdivide } from '../core/curve.js';\nimport Path from '../graphic/Path.js';\nimport { defaults, map } from '../core/util.js';\nimport { lerp } from '../core/vector.js';\nimport { clonePath } from './path.js';\nimport Transformable from '../core/Transformable.js';\nimport { split } from './dividePath.js';\nimport { pathToBezierCurves } from './convertPath.js';\nfunction alignSubpath(subpath1, subpath2) {\n var len1 = subpath1.length;\n var len2 = subpath2.length;\n if (len1 === len2) {\n return [subpath1, subpath2];\n }\n var tmpSegX = [];\n var tmpSegY = [];\n var shorterPath = len1 < len2 ? subpath1 : subpath2;\n var shorterLen = Math.min(len1, len2);\n var diff = Math.abs(len2 - len1) / 6;\n var shorterBezierCount = (shorterLen - 2) / 6;\n var eachCurveSubDivCount = Math.ceil(diff / shorterBezierCount) + 1;\n var newSubpath = [shorterPath[0], shorterPath[1]];\n var remained = diff;\n for (var i = 2; i < shorterLen;) {\n var x0 = shorterPath[i - 2];\n var y0 = shorterPath[i - 1];\n var x1 = shorterPath[i++];\n var y1 = shorterPath[i++];\n var x2 = shorterPath[i++];\n var y2 = shorterPath[i++];\n var x3 = shorterPath[i++];\n var y3 = shorterPath[i++];\n if (remained <= 0) {\n newSubpath.push(x1, y1, x2, y2, x3, y3);\n continue;\n }\n var actualSubDivCount = Math.min(remained, eachCurveSubDivCount - 1) + 1;\n for (var k = 1; k <= actualSubDivCount; k++) {\n var p = k / actualSubDivCount;\n cubicSubdivide(x0, x1, x2, x3, p, tmpSegX);\n cubicSubdivide(y0, y1, y2, y3, p, tmpSegY);\n x0 = tmpSegX[3];\n y0 = tmpSegY[3];\n newSubpath.push(tmpSegX[1], tmpSegY[1], tmpSegX[2], tmpSegY[2], x0, y0);\n x1 = tmpSegX[5];\n y1 = tmpSegY[5];\n x2 = tmpSegX[6];\n y2 = tmpSegY[6];\n }\n remained -= actualSubDivCount - 1;\n }\n return shorterPath === subpath1 ? [newSubpath, subpath2] : [subpath1, newSubpath];\n}\nfunction createSubpath(lastSubpathSubpath, otherSubpath) {\n var len = lastSubpathSubpath.length;\n var lastX = lastSubpathSubpath[len - 2];\n var lastY = lastSubpathSubpath[len - 1];\n var newSubpath = [];\n for (var i = 0; i < otherSubpath.length;) {\n newSubpath[i++] = lastX;\n newSubpath[i++] = lastY;\n }\n return newSubpath;\n}\nexport function alignBezierCurves(array1, array2) {\n var _a;\n var lastSubpath1;\n var lastSubpath2;\n var newArray1 = [];\n var newArray2 = [];\n for (var i = 0; i < Math.max(array1.length, array2.length); i++) {\n var subpath1 = array1[i];\n var subpath2 = array2[i];\n var newSubpath1 = void 0;\n var newSubpath2 = void 0;\n if (!subpath1) {\n newSubpath1 = createSubpath(lastSubpath1 || subpath2, subpath2);\n newSubpath2 = subpath2;\n }\n else if (!subpath2) {\n newSubpath2 = createSubpath(lastSubpath2 || subpath1, subpath1);\n newSubpath1 = subpath1;\n }\n else {\n _a = alignSubpath(subpath1, subpath2), newSubpath1 = _a[0], newSubpath2 = _a[1];\n lastSubpath1 = newSubpath1;\n lastSubpath2 = newSubpath2;\n }\n newArray1.push(newSubpath1);\n newArray2.push(newSubpath2);\n }\n return [newArray1, newArray2];\n}\nexport function centroid(array) {\n var signedArea = 0;\n var cx = 0;\n var cy = 0;\n var len = array.length;\n for (var i = 0, j = len - 2; i < len; j = i, i += 2) {\n var x0 = array[j];\n var y0 = array[j + 1];\n var x1 = array[i];\n var y1 = array[i + 1];\n var a = x0 * y1 - x1 * y0;\n signedArea += a;\n cx += (x0 + x1) * a;\n cy += (y0 + y1) * a;\n }\n if (signedArea === 0) {\n return [array[0] || 0, array[1] || 0];\n }\n return [cx / signedArea / 3, cy / signedArea / 3, signedArea];\n}\nfunction findBestRingOffset(fromSubBeziers, toSubBeziers, fromCp, toCp) {\n var bezierCount = (fromSubBeziers.length - 2) / 6;\n var bestScore = Infinity;\n var bestOffset = 0;\n var len = fromSubBeziers.length;\n var len2 = len - 2;\n for (var offset = 0; offset < bezierCount; offset++) {\n var cursorOffset = offset * 6;\n var score = 0;\n for (var k = 0; k < len; k += 2) {\n var idx = k === 0 ? cursorOffset : ((cursorOffset + k - 2) % len2 + 2);\n var x0 = fromSubBeziers[idx] - fromCp[0];\n var y0 = fromSubBeziers[idx + 1] - fromCp[1];\n var x1 = toSubBeziers[k] - toCp[0];\n var y1 = toSubBeziers[k + 1] - toCp[1];\n var dx = x1 - x0;\n var dy = y1 - y0;\n score += dx * dx + dy * dy;\n }\n if (score < bestScore) {\n bestScore = score;\n bestOffset = offset;\n }\n }\n return bestOffset;\n}\nfunction reverse(array) {\n var newArr = [];\n var len = array.length;\n for (var i = 0; i < len; i += 2) {\n newArr[i] = array[len - i - 2];\n newArr[i + 1] = array[len - i - 1];\n }\n return newArr;\n}\nfunction findBestMorphingRotation(fromArr, toArr, searchAngleIteration, searchAngleRange) {\n var result = [];\n var fromNeedsReverse;\n for (var i = 0; i < fromArr.length; i++) {\n var fromSubpathBezier = fromArr[i];\n var toSubpathBezier = toArr[i];\n var fromCp = centroid(fromSubpathBezier);\n var toCp = centroid(toSubpathBezier);\n if (fromNeedsReverse == null) {\n fromNeedsReverse = fromCp[2] < 0 !== toCp[2] < 0;\n }\n var newFromSubpathBezier = [];\n var newToSubpathBezier = [];\n var bestAngle = 0;\n var bestScore = Infinity;\n var tmpArr = [];\n var len = fromSubpathBezier.length;\n if (fromNeedsReverse) {\n fromSubpathBezier = reverse(fromSubpathBezier);\n }\n var offset = findBestRingOffset(fromSubpathBezier, toSubpathBezier, fromCp, toCp) * 6;\n var len2 = len - 2;\n for (var k = 0; k < len2; k += 2) {\n var idx = (offset + k) % len2 + 2;\n newFromSubpathBezier[k + 2] = fromSubpathBezier[idx] - fromCp[0];\n newFromSubpathBezier[k + 3] = fromSubpathBezier[idx + 1] - fromCp[1];\n }\n newFromSubpathBezier[0] = fromSubpathBezier[offset] - fromCp[0];\n newFromSubpathBezier[1] = fromSubpathBezier[offset + 1] - fromCp[1];\n if (searchAngleIteration > 0) {\n var step = searchAngleRange / searchAngleIteration;\n for (var angle = -searchAngleRange / 2; angle <= searchAngleRange / 2; angle += step) {\n var sa = Math.sin(angle);\n var ca = Math.cos(angle);\n var score = 0;\n for (var k = 0; k < fromSubpathBezier.length; k += 2) {\n var x0 = newFromSubpathBezier[k];\n var y0 = newFromSubpathBezier[k + 1];\n var x1 = toSubpathBezier[k] - toCp[0];\n var y1 = toSubpathBezier[k + 1] - toCp[1];\n var newX1 = x1 * ca - y1 * sa;\n var newY1 = x1 * sa + y1 * ca;\n tmpArr[k] = newX1;\n tmpArr[k + 1] = newY1;\n var dx = newX1 - x0;\n var dy = newY1 - y0;\n score += dx * dx + dy * dy;\n }\n if (score < bestScore) {\n bestScore = score;\n bestAngle = angle;\n for (var m = 0; m < tmpArr.length; m++) {\n newToSubpathBezier[m] = tmpArr[m];\n }\n }\n }\n }\n else {\n for (var i_1 = 0; i_1 < len; i_1 += 2) {\n newToSubpathBezier[i_1] = toSubpathBezier[i_1] - toCp[0];\n newToSubpathBezier[i_1 + 1] = toSubpathBezier[i_1 + 1] - toCp[1];\n }\n }\n result.push({\n from: newFromSubpathBezier,\n to: newToSubpathBezier,\n fromCp: fromCp,\n toCp: toCp,\n rotation: -bestAngle\n });\n }\n return result;\n}\nexport function isCombineMorphing(path) {\n return path.__isCombineMorphing;\n}\nexport function isMorphing(el) {\n return el.__morphT >= 0;\n}\nvar SAVED_METHOD_PREFIX = '__mOriginal_';\nfunction saveAndModifyMethod(obj, methodName, modifiers) {\n var savedMethodName = SAVED_METHOD_PREFIX + methodName;\n var originalMethod = obj[savedMethodName] || obj[methodName];\n if (!obj[savedMethodName]) {\n obj[savedMethodName] = obj[methodName];\n }\n var replace = modifiers.replace;\n var after = modifiers.after;\n var before = modifiers.before;\n obj[methodName] = function () {\n var args = arguments;\n var res;\n before && before.apply(this, args);\n if (replace) {\n res = replace.apply(this, args);\n }\n else {\n res = originalMethod.apply(this, args);\n }\n after && after.apply(this, args);\n return res;\n };\n}\nfunction restoreMethod(obj, methodName) {\n var savedMethodName = SAVED_METHOD_PREFIX + methodName;\n if (obj[savedMethodName]) {\n obj[methodName] = obj[savedMethodName];\n obj[savedMethodName] = null;\n }\n}\nfunction applyTransformOnBeziers(bezierCurves, mm) {\n for (var i = 0; i < bezierCurves.length; i++) {\n var subBeziers = bezierCurves[i];\n for (var k = 0; k < subBeziers.length;) {\n var x = subBeziers[k];\n var y = subBeziers[k + 1];\n subBeziers[k++] = mm[0] * x + mm[2] * y + mm[4];\n subBeziers[k++] = mm[1] * x + mm[3] * y + mm[5];\n }\n }\n}\nfunction prepareMorphPath(fromPath, toPath) {\n var fromPathProxy = fromPath.getUpdatedPathProxy();\n var toPathProxy = toPath.getUpdatedPathProxy();\n var _a = alignBezierCurves(pathToBezierCurves(fromPathProxy), pathToBezierCurves(toPathProxy)), fromBezierCurves = _a[0], toBezierCurves = _a[1];\n var fromPathTransform = fromPath.getComputedTransform();\n var toPathTransform = toPath.getComputedTransform();\n function updateIdentityTransform() {\n this.transform = null;\n }\n fromPathTransform && applyTransformOnBeziers(fromBezierCurves, fromPathTransform);\n toPathTransform && applyTransformOnBeziers(toBezierCurves, toPathTransform);\n saveAndModifyMethod(toPath, 'updateTransform', { replace: updateIdentityTransform });\n toPath.transform = null;\n var morphingData = findBestMorphingRotation(fromBezierCurves, toBezierCurves, 10, Math.PI);\n var tmpArr = [];\n saveAndModifyMethod(toPath, 'buildPath', { replace: function (path) {\n var t = toPath.__morphT;\n var onet = 1 - t;\n var newCp = [];\n for (var i = 0; i < morphingData.length; i++) {\n var item = morphingData[i];\n var from = item.from;\n var to = item.to;\n var angle = item.rotation * t;\n var fromCp = item.fromCp;\n var toCp = item.toCp;\n var sa = Math.sin(angle);\n var ca = Math.cos(angle);\n lerp(newCp, fromCp, toCp, t);\n for (var m = 0; m < from.length; m += 2) {\n var x0_1 = from[m];\n var y0_1 = from[m + 1];\n var x1 = to[m];\n var y1 = to[m + 1];\n var x = x0_1 * onet + x1 * t;\n var y = y0_1 * onet + y1 * t;\n tmpArr[m] = (x * ca - y * sa) + newCp[0];\n tmpArr[m + 1] = (x * sa + y * ca) + newCp[1];\n }\n var x0 = tmpArr[0];\n var y0 = tmpArr[1];\n path.moveTo(x0, y0);\n for (var m = 2; m < from.length;) {\n var x1 = tmpArr[m++];\n var y1 = tmpArr[m++];\n var x2 = tmpArr[m++];\n var y2 = tmpArr[m++];\n var x3 = tmpArr[m++];\n var y3 = tmpArr[m++];\n if (x0 === x1 && y0 === y1 && x2 === x3 && y2 === y3) {\n path.lineTo(x3, y3);\n }\n else {\n path.bezierCurveTo(x1, y1, x2, y2, x3, y3);\n }\n x0 = x3;\n y0 = y3;\n }\n }\n } });\n}\nexport function morphPath(fromPath, toPath, animationOpts) {\n if (!fromPath || !toPath) {\n return toPath;\n }\n var oldDone = animationOpts.done;\n var oldDuring = animationOpts.during;\n prepareMorphPath(fromPath, toPath);\n toPath.__morphT = 0;\n function restoreToPath() {\n restoreMethod(toPath, 'buildPath');\n restoreMethod(toPath, 'updateTransform');\n toPath.__morphT = -1;\n toPath.createPathProxy();\n toPath.dirtyShape();\n }\n toPath.animateTo({\n __morphT: 1\n }, defaults({\n during: function (p) {\n toPath.dirtyShape();\n oldDuring && oldDuring(p);\n },\n done: function () {\n restoreToPath();\n oldDone && oldDone();\n }\n }, animationOpts));\n return toPath;\n}\nfunction hilbert(x, y, minX, minY, maxX, maxY) {\n var bits = 16;\n x = (maxX === minX) ? 0 : Math.round(32767 * (x - minX) / (maxX - minX));\n y = (maxY === minY) ? 0 : Math.round(32767 * (y - minY) / (maxY - minY));\n var d = 0;\n var tmp;\n for (var s = (1 << bits) / 2; s > 0; s /= 2) {\n var rx = 0;\n var ry = 0;\n if ((x & s) > 0) {\n rx = 1;\n }\n if ((y & s) > 0) {\n ry = 1;\n }\n d += s * s * ((3 * rx) ^ ry);\n if (ry === 0) {\n if (rx === 1) {\n x = s - 1 - x;\n y = s - 1 - y;\n }\n tmp = x;\n x = y;\n y = tmp;\n }\n }\n return d;\n}\nfunction sortPaths(pathList) {\n var xMin = Infinity;\n var yMin = Infinity;\n var xMax = -Infinity;\n var yMax = -Infinity;\n var cps = map(pathList, function (path) {\n var rect = path.getBoundingRect();\n var m = path.getComputedTransform();\n var x = rect.x + rect.width / 2 + (m ? m[4] : 0);\n var y = rect.y + rect.height / 2 + (m ? m[5] : 0);\n xMin = Math.min(x, xMin);\n yMin = Math.min(y, yMin);\n xMax = Math.max(x, xMax);\n yMax = Math.max(y, yMax);\n return [x, y];\n });\n var items = map(cps, function (cp, idx) {\n return {\n cp: cp,\n z: hilbert(cp[0], cp[1], xMin, yMin, xMax, yMax),\n path: pathList[idx]\n };\n });\n return items.sort(function (a, b) { return a.z - b.z; }).map(function (item) { return item.path; });\n}\n;\nfunction defaultDividePath(param) {\n return split(param.path, param.count);\n}\nfunction createEmptyReturn() {\n return {\n fromIndividuals: [],\n toIndividuals: [],\n count: 0\n };\n}\nexport function combineMorph(fromList, toPath, animationOpts) {\n var fromPathList = [];\n function addFromPath(fromList) {\n for (var i = 0; i < fromList.length; i++) {\n var from = fromList[i];\n if (isCombineMorphing(from)) {\n addFromPath(from.childrenRef());\n }\n else if (from instanceof Path) {\n fromPathList.push(from);\n }\n }\n }\n addFromPath(fromList);\n var separateCount = fromPathList.length;\n if (!separateCount) {\n return createEmptyReturn();\n }\n var dividePath = animationOpts.dividePath || defaultDividePath;\n var toSubPathList = dividePath({\n path: toPath, count: separateCount\n });\n if (toSubPathList.length !== separateCount) {\n console.error('Invalid morphing: unmatched splitted path');\n return createEmptyReturn();\n }\n fromPathList = sortPaths(fromPathList);\n toSubPathList = sortPaths(toSubPathList);\n var oldDone = animationOpts.done;\n var oldDuring = animationOpts.during;\n var individualDelay = animationOpts.individualDelay;\n var identityTransform = new Transformable();\n for (var i = 0; i < separateCount; i++) {\n var from = fromPathList[i];\n var to = toSubPathList[i];\n to.parent = toPath;\n to.copyTransform(identityTransform);\n if (!individualDelay) {\n prepareMorphPath(from, to);\n }\n }\n toPath.__isCombineMorphing = true;\n toPath.childrenRef = function () {\n return toSubPathList;\n };\n function addToSubPathListToZr(zr) {\n for (var i = 0; i < toSubPathList.length; i++) {\n toSubPathList[i].addSelfToZr(zr);\n }\n }\n saveAndModifyMethod(toPath, 'addSelfToZr', {\n after: function (zr) {\n addToSubPathListToZr(zr);\n }\n });\n saveAndModifyMethod(toPath, 'removeSelfFromZr', {\n after: function (zr) {\n for (var i = 0; i < toSubPathList.length; i++) {\n toSubPathList[i].removeSelfFromZr(zr);\n }\n }\n });\n function restoreToPath() {\n toPath.__isCombineMorphing = false;\n toPath.__morphT = -1;\n toPath.childrenRef = null;\n restoreMethod(toPath, 'addSelfToZr');\n restoreMethod(toPath, 'removeSelfFromZr');\n }\n var toLen = toSubPathList.length;\n if (individualDelay) {\n var animating_1 = toLen;\n var eachDone = function () {\n animating_1--;\n if (animating_1 === 0) {\n restoreToPath();\n oldDone && oldDone();\n }\n };\n for (var i = 0; i < toLen; i++) {\n var indivdualAnimationOpts = individualDelay ? defaults({\n delay: (animationOpts.delay || 0) + individualDelay(i, toLen, fromPathList[i], toSubPathList[i]),\n done: eachDone\n }, animationOpts) : animationOpts;\n morphPath(fromPathList[i], toSubPathList[i], indivdualAnimationOpts);\n }\n }\n else {\n toPath.__morphT = 0;\n toPath.animateTo({\n __morphT: 1\n }, defaults({\n during: function (p) {\n for (var i = 0; i < toLen; i++) {\n var child = toSubPathList[i];\n child.__morphT = toPath.__morphT;\n child.dirtyShape();\n }\n oldDuring && oldDuring(p);\n },\n done: function () {\n restoreToPath();\n for (var i = 0; i < fromList.length; i++) {\n restoreMethod(fromList[i], 'updateTransform');\n }\n oldDone && oldDone();\n }\n }, animationOpts));\n }\n if (toPath.__zr) {\n addToSubPathListToZr(toPath.__zr);\n }\n return {\n fromIndividuals: fromPathList,\n toIndividuals: toSubPathList,\n count: toLen\n };\n}\nexport function separateMorph(fromPath, toPathList, animationOpts) {\n var toLen = toPathList.length;\n var fromPathList = [];\n var dividePath = animationOpts.dividePath || defaultDividePath;\n function addFromPath(fromList) {\n for (var i = 0; i < fromList.length; i++) {\n var from = fromList[i];\n if (isCombineMorphing(from)) {\n addFromPath(from.childrenRef());\n }\n else if (from instanceof Path) {\n fromPathList.push(from);\n }\n }\n }\n if (isCombineMorphing(fromPath)) {\n addFromPath(fromPath.childrenRef());\n var fromLen = fromPathList.length;\n if (fromLen < toLen) {\n var k = 0;\n for (var i = fromLen; i < toLen; i++) {\n fromPathList.push(clonePath(fromPathList[k++ % fromLen]));\n }\n }\n fromPathList.length = toLen;\n }\n else {\n fromPathList = dividePath({ path: fromPath, count: toLen });\n var fromPathTransform = fromPath.getComputedTransform();\n for (var i = 0; i < fromPathList.length; i++) {\n fromPathList[i].setLocalTransform(fromPathTransform);\n }\n if (fromPathList.length !== toLen) {\n console.error('Invalid morphing: unmatched splitted path');\n return createEmptyReturn();\n }\n }\n fromPathList = sortPaths(fromPathList);\n toPathList = sortPaths(toPathList);\n var individualDelay = animationOpts.individualDelay;\n for (var i = 0; i < toLen; i++) {\n var indivdualAnimationOpts = individualDelay ? defaults({\n delay: (animationOpts.delay || 0) + individualDelay(i, toLen, fromPathList[i], toPathList[i])\n }, animationOpts) : animationOpts;\n morphPath(fromPathList[i], toPathList[i], indivdualAnimationOpts);\n }\n return {\n fromIndividuals: fromPathList,\n toIndividuals: toPathList,\n count: toPathList.length\n };\n}\nexport { split as defaultDividePath };\n","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { separateMorph, combineMorph, morphPath, isCombineMorphing } from 'zrender/lib/tool/morphPath.js';\nimport { Path } from '../util/graphic.js';\nimport { defaults, isArray } from 'zrender/lib/core/util.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { clonePath } from 'zrender/lib/tool/path.js';\nfunction isMultiple(elements) {\n return isArray(elements[0]);\n}\nfunction prepareMorphBatches(one, many) {\n var batches = [];\n var batchCount = one.length;\n for (var i = 0; i < batchCount; i++) {\n batches.push({\n one: one[i],\n many: []\n });\n }\n for (var i = 0; i < many.length; i++) {\n var len = many[i].length;\n var k = void 0;\n for (k = 0; k < len; k++) {\n batches[k % batchCount].many.push(many[i][k]);\n }\n }\n var off = 0;\n // If one has more paths than each one of many. average them.\n for (var i = batchCount - 1; i >= 0; i--) {\n if (!batches[i].many.length) {\n var moveFrom = batches[off].many;\n if (moveFrom.length <= 1) {\n // Not enough\n // Start from the first one.\n if (off) {\n off = 0;\n } else {\n return batches;\n }\n }\n var len = moveFrom.length;\n var mid = Math.ceil(len / 2);\n batches[i].many = moveFrom.slice(mid, len);\n batches[off].many = moveFrom.slice(0, mid);\n off++;\n }\n }\n return batches;\n}\nvar pathDividers = {\n clone: function (params) {\n var ret = [];\n // Fitting the alpha\n var approxOpacity = 1 - Math.pow(1 - params.path.style.opacity, 1 / params.count);\n for (var i = 0; i < params.count; i++) {\n var cloned = clonePath(params.path);\n cloned.setStyle('opacity', approxOpacity);\n ret.push(cloned);\n }\n return ret;\n },\n // Use the default divider\n split: null\n};\nexport function applyMorphAnimation(from, to, divideShape, seriesModel, dataIndex, animateOtherProps) {\n if (!from.length || !to.length) {\n return;\n }\n var updateAnimationCfg = getAnimationConfig('update', seriesModel, dataIndex);\n if (!(updateAnimationCfg && updateAnimationCfg.duration > 0)) {\n return;\n }\n var animationDelay = seriesModel.getModel('universalTransition').get('delay');\n var animationCfg = Object.assign({\n // Need to setToFinal so the further calculation based on the style can be correct.\n // Like emphasis color.\n setToFinal: true\n }, updateAnimationCfg);\n var many;\n var one;\n if (isMultiple(from)) {\n // manyToOne\n many = from;\n one = to;\n }\n if (isMultiple(to)) {\n // oneToMany\n many = to;\n one = from;\n }\n function morphOneBatch(batch, fromIsMany, animateIndex, animateCount, forceManyOne) {\n var batchMany = batch.many;\n var batchOne = batch.one;\n if (batchMany.length === 1 && !forceManyOne) {\n // Is one to one\n var batchFrom = fromIsMany ? batchMany[0] : batchOne;\n var batchTo = fromIsMany ? batchOne : batchMany[0];\n if (isCombineMorphing(batchFrom)) {\n // Keep doing combine animation.\n morphOneBatch({\n many: [batchFrom],\n one: batchTo\n }, true, animateIndex, animateCount, true);\n } else {\n var individualAnimationCfg = animationDelay ? defaults({\n delay: animationDelay(animateIndex, animateCount)\n }, animationCfg) : animationCfg;\n morphPath(batchFrom, batchTo, individualAnimationCfg);\n animateOtherProps(batchFrom, batchTo, batchFrom, batchTo, individualAnimationCfg);\n }\n } else {\n var separateAnimationCfg = defaults({\n dividePath: pathDividers[divideShape],\n individualDelay: animationDelay && function (idx, count, fromPath, toPath) {\n return animationDelay(idx + animateIndex, animateCount);\n }\n }, animationCfg);\n var _a = fromIsMany ? combineMorph(batchMany, batchOne, separateAnimationCfg) : separateMorph(batchOne, batchMany, separateAnimationCfg),\n fromIndividuals = _a.fromIndividuals,\n toIndividuals = _a.toIndividuals;\n var count = fromIndividuals.length;\n for (var k = 0; k < count; k++) {\n var individualAnimationCfg = animationDelay ? defaults({\n delay: animationDelay(k, count)\n }, animationCfg) : animationCfg;\n animateOtherProps(fromIndividuals[k], toIndividuals[k], fromIsMany ? batchMany[k] : batch.one, fromIsMany ? batch.one : batchMany[k], individualAnimationCfg);\n }\n }\n }\n var fromIsMany = many ? many === from\n // Is one to one. If the path number not match. also needs do merge and separate morphing.\n : from.length > to.length;\n var morphBatches = many ? prepareMorphBatches(one, many) : prepareMorphBatches(fromIsMany ? to : from, [fromIsMany ? from : to]);\n var animateCount = 0;\n for (var i = 0; i < morphBatches.length; i++) {\n animateCount += morphBatches[i].many.length;\n }\n var animateIndex = 0;\n for (var i = 0; i < morphBatches.length; i++) {\n morphOneBatch(morphBatches[i], fromIsMany, animateIndex, animateCount);\n animateIndex += morphBatches[i].many.length;\n }\n}\nexport function getPathList(elements) {\n if (!elements) {\n return [];\n }\n if (isArray(elements)) {\n var pathList_1 = [];\n for (var i = 0; i < elements.length; i++) {\n pathList_1.push(getPathList(elements[i]));\n }\n return pathList_1;\n }\n var pathList = [];\n elements.traverse(function (el) {\n if (el instanceof Path && !el.disableMorphing && !el.invisible && !el.ignore) {\n pathList.push(el);\n }\n });\n return pathList;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Universal transitions that can animate between any shapes(series) and any properties in any amounts.\nimport { SERIES_UNIVERSAL_TRANSITION_PROP } from '../model/Series.js';\nimport { createHashMap, each, map, filter, isArray, extend } from 'zrender/lib/core/util.js';\nimport { applyMorphAnimation, getPathList } from './morphTransitionHelper.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { initProps } from '../util/graphic.js';\nimport DataDiffer from '../data/DataDiffer.js';\nimport { makeInner, normalizeToArray } from '../util/model.js';\nimport { warn } from '../util/log.js';\nimport { getAnimationConfig, getOldStyle } from './basicTransition.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nvar DATA_COUNT_THRESHOLD = 1e4;\nvar TRANSITION_NONE = 0;\nvar TRANSITION_P2C = 1;\nvar TRANSITION_C2P = 2;\n;\nvar getUniversalTransitionGlobalStore = makeInner();\nfunction getDimension(data, visualDimension) {\n var dimensions = data.dimensions;\n for (var i = 0; i < dimensions.length; i++) {\n var dimInfo = data.getDimensionInfo(dimensions[i]);\n if (dimInfo && dimInfo.otherDims[visualDimension] === 0) {\n return dimensions[i];\n }\n }\n}\n// get value by dimension. (only get value of itemGroupId or childGroupId, so convert it to string)\nfunction getValueByDimension(data, dataIndex, dimension) {\n var dimInfo = data.getDimensionInfo(dimension);\n var dimOrdinalMeta = dimInfo && dimInfo.ordinalMeta;\n if (dimInfo) {\n var value = data.get(dimInfo.name, dataIndex);\n if (dimOrdinalMeta) {\n return dimOrdinalMeta.categories[value] || value + '';\n }\n return value + '';\n }\n}\nfunction getGroupId(data, dataIndex, dataGroupId, isChild) {\n // try to get groupId from encode\n var visualDimension = isChild ? 'itemChildGroupId' : 'itemGroupId';\n var groupIdDim = getDimension(data, visualDimension);\n if (groupIdDim) {\n var groupId = getValueByDimension(data, dataIndex, groupIdDim);\n return groupId;\n }\n // try to get groupId from raw data item\n var rawDataItem = data.getRawDataItem(dataIndex);\n var property = isChild ? 'childGroupId' : 'groupId';\n if (rawDataItem && rawDataItem[property]) {\n return rawDataItem[property] + '';\n }\n // fallback\n if (isChild) {\n return;\n }\n // try to use series.dataGroupId as groupId, otherwise use dataItem's id as groupId\n return dataGroupId || data.getId(dataIndex);\n}\n// flatten all data items from different serieses into one arrary\nfunction flattenDataDiffItems(list) {\n var items = [];\n each(list, function (seriesInfo) {\n var data = seriesInfo.data;\n var dataGroupId = seriesInfo.dataGroupId;\n if (data.count() > DATA_COUNT_THRESHOLD) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Universal transition is disabled on large data > 10k.');\n }\n return;\n }\n var indices = data.getIndices();\n for (var dataIndex = 0; dataIndex < indices.length; dataIndex++) {\n items.push({\n data: data,\n groupId: getGroupId(data, dataIndex, dataGroupId, false),\n childGroupId: getGroupId(data, dataIndex, dataGroupId, true),\n divide: seriesInfo.divide,\n dataIndex: dataIndex\n });\n }\n });\n return items;\n}\nfunction fadeInElement(newEl, newSeries, newIndex) {\n newEl.traverse(function (el) {\n if (el instanceof Path) {\n // TODO use fade in animation for target element.\n initProps(el, {\n style: {\n opacity: 0\n }\n }, newSeries, {\n dataIndex: newIndex,\n isFrom: true\n });\n }\n });\n}\nfunction removeEl(el) {\n if (el.parent) {\n // Bake parent transform to element.\n // So it can still have proper transform to transition after it's removed.\n var computedTransform = el.getComputedTransform();\n el.setLocalTransform(computedTransform);\n el.parent.remove(el);\n }\n}\nfunction stopAnimation(el) {\n el.stopAnimation();\n if (el.isGroup) {\n el.traverse(function (child) {\n child.stopAnimation();\n });\n }\n}\nfunction animateElementStyles(el, dataIndex, seriesModel) {\n var animationConfig = getAnimationConfig('update', seriesModel, dataIndex);\n animationConfig && el.traverse(function (child) {\n if (child instanceof Displayable) {\n var oldStyle = getOldStyle(child);\n if (oldStyle) {\n child.animateFrom({\n style: oldStyle\n }, animationConfig);\n }\n }\n });\n}\nfunction isAllIdSame(oldDiffItems, newDiffItems) {\n var len = oldDiffItems.length;\n if (len !== newDiffItems.length) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n var oldItem = oldDiffItems[i];\n var newItem = newDiffItems[i];\n if (oldItem.data.getId(oldItem.dataIndex) !== newItem.data.getId(newItem.dataIndex)) {\n return false;\n }\n }\n return true;\n}\nfunction transitionBetween(oldList, newList, api) {\n var oldDiffItems = flattenDataDiffItems(oldList);\n var newDiffItems = flattenDataDiffItems(newList);\n function updateMorphingPathProps(from, to, rawFrom, rawTo, animationCfg) {\n if (rawFrom || from) {\n to.animateFrom({\n style: rawFrom && rawFrom !== from\n // dividingMethod like clone may override the style(opacity)\n // So extend it to raw style.\n ? extend(extend({}, rawFrom.style), from.style) : from.style\n }, animationCfg);\n }\n }\n var hasMorphAnimation = false;\n /**\n * With groupId and childGroupId, we can build parent-child relationships between dataItems.\n * However, we should mind the parent-child \"direction\" between old and new options.\n *\n * For example, suppose we have two dataItems from two series.data:\n *\n * dataA: [ dataB: [\n * { {\n * value: 5, value: 3,\n * groupId: 'creatures', groupId: 'animals',\n * childGroupId: 'animals' childGroupId: 'dogs'\n * }, },\n * ... ...\n * ] ]\n *\n * where dataA is belong to optionA and dataB is belong to optionB.\n *\n * When we `setOption(optionB)` from optionA, we choose childGroupId of dataItemA and groupId of\n * dataItemB as keys so the two keys are matched (both are 'animals'), then universalTransition\n * will work. This derection is \"parent -> child\".\n *\n * If we `setOption(optionA)` from optionB, we also choose groupId of dataItemB and childGroupId\n * of dataItemA as keys and universalTransition will work. This derection is \"child -> parent\".\n *\n * If there is no childGroupId specified, which means no multiLevelDrillDown/Up is needed and no\n * parent-child relationship exists. This direction is \"none\".\n *\n * So we need to know whether to use groupId or childGroupId as the key when we call the keyGetter\n * functions. Thus, we need to decide the direction first.\n *\n * The rule is:\n *\n * if (all childGroupIds in oldDiffItems and all groupIds in newDiffItems have common value) {\n * direction = 'parent -> child';\n * } else if (all groupIds in oldDiffItems and all childGroupIds in newDiffItems have common value) {\n * direction = 'child -> parent';\n * } else {\n * direction = 'none';\n * }\n */\n var direction = TRANSITION_NONE;\n // find all groupIds and childGroupIds from oldDiffItems\n var oldGroupIds = createHashMap();\n var oldChildGroupIds = createHashMap();\n oldDiffItems.forEach(function (item) {\n item.groupId && oldGroupIds.set(item.groupId, true);\n item.childGroupId && oldChildGroupIds.set(item.childGroupId, true);\n });\n // traverse newDiffItems and decide the direction according to the rule\n for (var i = 0; i < newDiffItems.length; i++) {\n var newGroupId = newDiffItems[i].groupId;\n if (oldChildGroupIds.get(newGroupId)) {\n direction = TRANSITION_P2C;\n break;\n }\n var newChildGroupId = newDiffItems[i].childGroupId;\n if (newChildGroupId && oldGroupIds.get(newChildGroupId)) {\n direction = TRANSITION_C2P;\n break;\n }\n }\n function createKeyGetter(isOld, onlyGetId) {\n return function (diffItem) {\n var data = diffItem.data;\n var dataIndex = diffItem.dataIndex;\n // TODO if specified dim\n if (onlyGetId) {\n return data.getId(dataIndex);\n }\n if (isOld) {\n return direction === TRANSITION_P2C ? diffItem.childGroupId : diffItem.groupId;\n } else {\n return direction === TRANSITION_C2P ? diffItem.childGroupId : diffItem.groupId;\n }\n };\n }\n // Use id if it's very likely to be an one to one animation\n // It's more robust than groupId\n // TODO Check if key dimension is specified.\n var useId = isAllIdSame(oldDiffItems, newDiffItems);\n var isElementStillInChart = {};\n if (!useId) {\n // We may have different diff strategy with basicTransition if we use other dimension as key.\n // If so, we can't simply check if oldEl is same with newEl. We need a map to check if oldEl is still being used in the new chart.\n // We can't use the elements that already being morphed. Let it keep it's original basic transition.\n for (var i = 0; i < newDiffItems.length; i++) {\n var newItem = newDiffItems[i];\n var el = newItem.data.getItemGraphicEl(newItem.dataIndex);\n if (el) {\n isElementStillInChart[el.id] = true;\n }\n }\n }\n function updateOneToOne(newIndex, oldIndex) {\n var oldItem = oldDiffItems[oldIndex];\n var newItem = newDiffItems[newIndex];\n var newSeries = newItem.data.hostModel;\n // TODO Mark this elements is morphed and don't morph them anymore\n var oldEl = oldItem.data.getItemGraphicEl(oldItem.dataIndex);\n var newEl = newItem.data.getItemGraphicEl(newItem.dataIndex);\n // Can't handle same elements.\n if (oldEl === newEl) {\n newEl && animateElementStyles(newEl, newItem.dataIndex, newSeries);\n return;\n }\n if (\n // We can't use the elements that already being morphed\n oldEl && isElementStillInChart[oldEl.id]) {\n return;\n }\n if (newEl) {\n // TODO: If keep animating the group in case\n // some of the elements don't want to be morphed.\n // TODO Label?\n stopAnimation(newEl);\n if (oldEl) {\n stopAnimation(oldEl);\n // If old element is doing leaving animation. stop it and remove it immediately.\n removeEl(oldEl);\n hasMorphAnimation = true;\n applyMorphAnimation(getPathList(oldEl), getPathList(newEl), newItem.divide, newSeries, newIndex, updateMorphingPathProps);\n } else {\n fadeInElement(newEl, newSeries, newIndex);\n }\n }\n // else keep oldEl leaving animation.\n }\n\n new DataDiffer(oldDiffItems, newDiffItems, createKeyGetter(true, useId), createKeyGetter(false, useId), null, 'multiple').update(updateOneToOne).updateManyToOne(function (newIndex, oldIndices) {\n var newItem = newDiffItems[newIndex];\n var newData = newItem.data;\n var newSeries = newData.hostModel;\n var newEl = newData.getItemGraphicEl(newItem.dataIndex);\n var oldElsList = filter(map(oldIndices, function (idx) {\n return oldDiffItems[idx].data.getItemGraphicEl(oldDiffItems[idx].dataIndex);\n }), function (oldEl) {\n return oldEl && oldEl !== newEl && !isElementStillInChart[oldEl.id];\n });\n if (newEl) {\n stopAnimation(newEl);\n if (oldElsList.length) {\n // If old element is doing leaving animation. stop it and remove it immediately.\n each(oldElsList, function (oldEl) {\n stopAnimation(oldEl);\n removeEl(oldEl);\n });\n hasMorphAnimation = true;\n applyMorphAnimation(getPathList(oldElsList), getPathList(newEl), newItem.divide, newSeries, newIndex, updateMorphingPathProps);\n } else {\n fadeInElement(newEl, newSeries, newItem.dataIndex);\n }\n }\n // else keep oldEl leaving animation.\n }).updateOneToMany(function (newIndices, oldIndex) {\n var oldItem = oldDiffItems[oldIndex];\n var oldEl = oldItem.data.getItemGraphicEl(oldItem.dataIndex);\n // We can't use the elements that already being morphed\n if (oldEl && isElementStillInChart[oldEl.id]) {\n return;\n }\n var newElsList = filter(map(newIndices, function (idx) {\n return newDiffItems[idx].data.getItemGraphicEl(newDiffItems[idx].dataIndex);\n }), function (el) {\n return el && el !== oldEl;\n });\n var newSeris = newDiffItems[newIndices[0]].data.hostModel;\n if (newElsList.length) {\n each(newElsList, function (newEl) {\n return stopAnimation(newEl);\n });\n if (oldEl) {\n stopAnimation(oldEl);\n // If old element is doing leaving animation. stop it and remove it immediately.\n removeEl(oldEl);\n hasMorphAnimation = true;\n applyMorphAnimation(getPathList(oldEl), getPathList(newElsList), oldItem.divide,\n // Use divide on old.\n newSeris, newIndices[0], updateMorphingPathProps);\n } else {\n each(newElsList, function (newEl) {\n return fadeInElement(newEl, newSeris, newIndices[0]);\n });\n }\n }\n // else keep oldEl leaving animation.\n }).updateManyToMany(function (newIndices, oldIndices) {\n // If two data are same and both have groupId.\n // Normally they should be diff by id.\n new DataDiffer(oldIndices, newIndices, function (rawIdx) {\n return oldDiffItems[rawIdx].data.getId(oldDiffItems[rawIdx].dataIndex);\n }, function (rawIdx) {\n return newDiffItems[rawIdx].data.getId(newDiffItems[rawIdx].dataIndex);\n }).update(function (newIndex, oldIndex) {\n // Use the original index\n updateOneToOne(newIndices[newIndex], oldIndices[oldIndex]);\n }).execute();\n }).execute();\n if (hasMorphAnimation) {\n each(newList, function (_a) {\n var data = _a.data;\n var seriesModel = data.hostModel;\n var view = seriesModel && api.getViewOfSeriesModel(seriesModel);\n var animationCfg = getAnimationConfig('update', seriesModel, 0); // use 0 index.\n if (view && seriesModel.isAnimationEnabled() && animationCfg && animationCfg.duration > 0) {\n view.group.traverse(function (el) {\n if (el instanceof Path && !el.animators.length) {\n // We can't accept there still exists element that has no animation\n // if universalTransition is enabled\n el.animateFrom({\n style: {\n opacity: 0\n }\n }, animationCfg);\n }\n });\n }\n });\n }\n}\nfunction getSeriesTransitionKey(series) {\n var seriesKey = series.getModel('universalTransition').get('seriesKey');\n if (!seriesKey) {\n // Use series id by default.\n return series.id;\n }\n return seriesKey;\n}\nfunction convertArraySeriesKeyToString(seriesKey) {\n if (isArray(seriesKey)) {\n // Order independent.\n return seriesKey.sort().join(',');\n }\n return seriesKey;\n}\nfunction getDivideShapeFromData(data) {\n if (data.hostModel) {\n return data.hostModel.getModel('universalTransition').get('divideShape');\n }\n}\nfunction findTransitionSeriesBatches(globalStore, params) {\n var updateBatches = createHashMap();\n var oldDataMap = createHashMap();\n // Map that only store key in array seriesKey.\n // Which is used to query the old data when transition from one to multiple series.\n var oldDataMapForSplit = createHashMap();\n each(globalStore.oldSeries, function (series, idx) {\n var oldDataGroupId = globalStore.oldDataGroupIds[idx];\n var oldData = globalStore.oldData[idx];\n var transitionKey = getSeriesTransitionKey(series);\n var transitionKeyStr = convertArraySeriesKeyToString(transitionKey);\n oldDataMap.set(transitionKeyStr, {\n dataGroupId: oldDataGroupId,\n data: oldData\n });\n if (isArray(transitionKey)) {\n // Same key can't in different array seriesKey.\n each(transitionKey, function (key) {\n oldDataMapForSplit.set(key, {\n key: transitionKeyStr,\n dataGroupId: oldDataGroupId,\n data: oldData\n });\n });\n }\n });\n function checkTransitionSeriesKeyDuplicated(transitionKeyStr) {\n if (updateBatches.get(transitionKeyStr)) {\n warn(\"Duplicated seriesKey in universalTransition \" + transitionKeyStr);\n }\n }\n each(params.updatedSeries, function (series) {\n if (series.isUniversalTransitionEnabled() && series.isAnimationEnabled()) {\n var newDataGroupId = series.get('dataGroupId');\n var newData = series.getData();\n var transitionKey = getSeriesTransitionKey(series);\n var transitionKeyStr = convertArraySeriesKeyToString(transitionKey);\n // Only transition between series with same id.\n var oldData = oldDataMap.get(transitionKeyStr);\n // string transition key is the best match.\n if (oldData) {\n if (process.env.NODE_ENV !== 'production') {\n checkTransitionSeriesKeyDuplicated(transitionKeyStr);\n }\n // TODO check if data is same?\n updateBatches.set(transitionKeyStr, {\n oldSeries: [{\n dataGroupId: oldData.dataGroupId,\n divide: getDivideShapeFromData(oldData.data),\n data: oldData.data\n }],\n newSeries: [{\n dataGroupId: newDataGroupId,\n divide: getDivideShapeFromData(newData),\n data: newData\n }]\n });\n } else {\n // Transition from multiple series.\n // e.g. 'female', 'male' -> ['female', 'male']\n if (isArray(transitionKey)) {\n if (process.env.NODE_ENV !== 'production') {\n checkTransitionSeriesKeyDuplicated(transitionKeyStr);\n }\n var oldSeries_1 = [];\n each(transitionKey, function (key) {\n var oldData = oldDataMap.get(key);\n if (oldData.data) {\n oldSeries_1.push({\n dataGroupId: oldData.dataGroupId,\n divide: getDivideShapeFromData(oldData.data),\n data: oldData.data\n });\n }\n });\n if (oldSeries_1.length) {\n updateBatches.set(transitionKeyStr, {\n oldSeries: oldSeries_1,\n newSeries: [{\n dataGroupId: newDataGroupId,\n data: newData,\n divide: getDivideShapeFromData(newData)\n }]\n });\n }\n } else {\n // Try transition to multiple series.\n // e.g. ['female', 'male'] -> 'female', 'male'\n var oldData_1 = oldDataMapForSplit.get(transitionKey);\n if (oldData_1) {\n var batch = updateBatches.get(oldData_1.key);\n if (!batch) {\n batch = {\n oldSeries: [{\n dataGroupId: oldData_1.dataGroupId,\n data: oldData_1.data,\n divide: getDivideShapeFromData(oldData_1.data)\n }],\n newSeries: []\n };\n updateBatches.set(oldData_1.key, batch);\n }\n batch.newSeries.push({\n dataGroupId: newDataGroupId,\n data: newData,\n divide: getDivideShapeFromData(newData)\n });\n }\n }\n }\n }\n });\n return updateBatches;\n}\nfunction querySeries(series, finder) {\n for (var i = 0; i < series.length; i++) {\n var found = finder.seriesIndex != null && finder.seriesIndex === series[i].seriesIndex || finder.seriesId != null && finder.seriesId === series[i].id;\n if (found) {\n return i;\n }\n }\n}\nfunction transitionSeriesFromOpt(transitionOpt, globalStore, params, api) {\n var from = [];\n var to = [];\n each(normalizeToArray(transitionOpt.from), function (finder) {\n var idx = querySeries(globalStore.oldSeries, finder);\n if (idx >= 0) {\n from.push({\n dataGroupId: globalStore.oldDataGroupIds[idx],\n data: globalStore.oldData[idx],\n // TODO can specify divideShape in transition.\n divide: getDivideShapeFromData(globalStore.oldData[idx]),\n groupIdDim: finder.dimension\n });\n }\n });\n each(normalizeToArray(transitionOpt.to), function (finder) {\n var idx = querySeries(params.updatedSeries, finder);\n if (idx >= 0) {\n var data = params.updatedSeries[idx].getData();\n to.push({\n dataGroupId: globalStore.oldDataGroupIds[idx],\n data: data,\n divide: getDivideShapeFromData(data),\n groupIdDim: finder.dimension\n });\n }\n });\n if (from.length > 0 && to.length > 0) {\n transitionBetween(from, to, api);\n }\n}\nexport function installUniversalTransition(registers) {\n registers.registerUpdateLifecycle('series:beforeupdate', function (ecMOdel, api, params) {\n each(normalizeToArray(params.seriesTransition), function (transOpt) {\n each(normalizeToArray(transOpt.to), function (finder) {\n var series = params.updatedSeries;\n for (var i = 0; i < series.length; i++) {\n if (finder.seriesIndex != null && finder.seriesIndex === series[i].seriesIndex || finder.seriesId != null && finder.seriesId === series[i].id) {\n series[i][SERIES_UNIVERSAL_TRANSITION_PROP] = true;\n }\n }\n });\n });\n });\n registers.registerUpdateLifecycle('series:transition', function (ecModel, api, params) {\n // TODO api provide an namespace that can save stuff per instance\n var globalStore = getUniversalTransitionGlobalStore(api);\n // TODO multiple to multiple series.\n if (globalStore.oldSeries && params.updatedSeries && params.optionChanged) {\n // TODO transitionOpt was used in an old implementation and can be removed now\n // Use give transition config if its' give;\n var transitionOpt = params.seriesTransition;\n if (transitionOpt) {\n each(normalizeToArray(transitionOpt), function (opt) {\n transitionSeriesFromOpt(opt, globalStore, params, api);\n });\n } else {\n // Else guess from series based on transition series key.\n var updateBatches_1 = findTransitionSeriesBatches(globalStore, params);\n each(updateBatches_1.keys(), function (key) {\n var batch = updateBatches_1.get(key);\n transitionBetween(batch.oldSeries, batch.newSeries, api);\n });\n }\n // Reset\n each(params.updatedSeries, function (series) {\n // Reset;\n if (series[SERIES_UNIVERSAL_TRANSITION_PROP]) {\n series[SERIES_UNIVERSAL_TRANSITION_PROP] = false;\n }\n });\n }\n // Save all series of current update. Not only the updated one.\n var allSeries = ecModel.getSeries();\n var savedSeries = globalStore.oldSeries = [];\n var savedDataGroupIds = globalStore.oldDataGroupIds = [];\n var savedData = globalStore.oldData = [];\n for (var i = 0; i < allSeries.length; i++) {\n var data = allSeries[i].getData();\n // Only save the data that can have transition.\n // Avoid large data costing too much extra memory\n if (data.count() < DATA_COUNT_THRESHOLD) {\n savedSeries.push(allSeries[i]);\n savedDataGroupIds.push(allSeries[i].get('dataGroupId'));\n savedData.push(data);\n }\n }\n });\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { use } from './lib/extension.js';\nexport * from './lib/export/core.js';\n// ----------------------------------------------\n// All of the modules that are allowed to be\n// imported are listed below.\n//\n// Users MUST NOT import other modules that are\n// not included in this list.\n// ----------------------------------------------\nimport { SVGRenderer, CanvasRenderer } from './lib/export/renderers.js';\nimport { LineChart, BarChart, PieChart, ScatterChart, RadarChart, MapChart, TreeChart, TreemapChart, GraphChart, GaugeChart, FunnelChart, ParallelChart, SankeyChart, BoxplotChart, CandlestickChart, EffectScatterChart, LinesChart, HeatmapChart, PictorialBarChart, ThemeRiverChart, SunburstChart, CustomChart } from './lib/export/charts.js';\nimport { GridComponent, PolarComponent, GeoComponent, SingleAxisComponent, ParallelComponent, CalendarComponent, GraphicComponent, ToolboxComponent, TooltipComponent, AxisPointerComponent, BrushComponent, TitleComponent, TimelineComponent, MarkPointComponent, MarkLineComponent, MarkAreaComponent, LegendComponent, DataZoomComponent, DataZoomInsideComponent, DataZoomSliderComponent, VisualMapComponent, VisualMapContinuousComponent, VisualMapPiecewiseComponent, AriaComponent, DatasetComponent, TransformComponent } from './lib/export/components.js';\nimport { UniversalTransition, LabelLayout } from './lib/export/features.js';\n// -----------------\n// Render engines\n// -----------------\n// Render via Canvas.\n// echarts.init(dom, null, { renderer: 'canvas' })\nuse([CanvasRenderer]);\n// Render via SVG.\n// echarts.init(dom, null, { renderer: 'svg' })\nuse([SVGRenderer]);\n// ----------------\n// Charts (series)\n// ----------------\n// All of the series types, for example:\n// chart.setOption({\n// series: [{\n// type: 'line' // or 'bar', 'pie', ...\n// }]\n// });\nuse([LineChart, BarChart, PieChart, ScatterChart, RadarChart, MapChart, TreeChart, TreemapChart, GraphChart, GaugeChart, FunnelChart, ParallelChart, SankeyChart, BoxplotChart, CandlestickChart, EffectScatterChart, LinesChart, HeatmapChart, PictorialBarChart, ThemeRiverChart, SunburstChart, CustomChart]);\n// -------------------\n// Coordinate systems\n// -------------------\n// All of the axis modules have been included in the\n// coordinate system module below, do not need to\n// make extra import.\n// `cartesian` coordinate system. For some historical\n// reasons, it is named as grid, for example:\n// chart.setOption({\n// grid: {...},\n// xAxis: {...},\n// yAxis: {...},\n// series: [{...}]\n// });\nuse(GridComponent);\n// `polar` coordinate system, for example:\n// chart.setOption({\n// polar: {...},\n// radiusAxis: {...},\n// angleAxis: {...},\n// series: [{\n// coordinateSystem: 'polar'\n// }]\n// });\nuse(PolarComponent);\n// `geo` coordinate system, for example:\n// chart.setOption({\n// geo: {...},\n// series: [{\n// coordinateSystem: 'geo'\n// }]\n// });\nuse(GeoComponent);\n// `singleAxis` coordinate system (notice, it is a coordinate system\n// with only one axis, work for chart like theme river), for example:\n// chart.setOption({\n// singleAxis: {...}\n// series: [{type: 'themeRiver', ...}]\n// });\nuse(SingleAxisComponent);\n// `parallel` coordinate system, only work for parallel series, for example:\n// chart.setOption({\n// parallel: {...},\n// parallelAxis: [{...}, ...],\n// series: [{\n// type: 'parallel'\n// }]\n// });\nuse(ParallelComponent);\n// `calendar` coordinate system. for example,\n// chart.setOption({\n// calendar: {...},\n// series: [{\n// coordinateSystem: 'calendar'\n// }]\n// );\nuse(CalendarComponent);\n// ------------------\n// Other components\n// ------------------\n// `graphic` component, for example:\n// chart.setOption({\n// graphic: {...}\n// });\nuse(GraphicComponent);\n// `toolbox` component, for example:\n// chart.setOption({\n// toolbox: {...}\n// });\nuse(ToolboxComponent);\n// `tooltip` component, for example:\n// chart.setOption({\n// tooltip: {...}\n// });\nuse(TooltipComponent);\n// `axisPointer` component, for example:\n// chart.setOption({\n// tooltip: {axisPointer: {...}, ...}\n// });\n// Or\n// chart.setOption({\n// axisPointer: {...}\n// });\nuse(AxisPointerComponent);\n// `brush` component, for example:\n// chart.setOption({\n// brush: {...}\n// });\n// Or\n// chart.setOption({\n// tooltip: {feature: {brush: {...}}\n// })\nuse(BrushComponent);\n// `title` component, for example:\n// chart.setOption({\n// title: {...}\n// });\nuse(TitleComponent);\n// `timeline` component, for example:\n// chart.setOption({\n// timeline: {...}\n// });\nuse(TimelineComponent);\n// `markPoint` component, for example:\n// chart.setOption({\n// series: [{markPoint: {...}}]\n// });\nuse(MarkPointComponent);\n// `markLine` component, for example:\n// chart.setOption({\n// series: [{markLine: {...}}]\n// });\nuse(MarkLineComponent);\n// `markArea` component, for example:\n// chart.setOption({\n// series: [{markArea: {...}}]\n// });\nuse(MarkAreaComponent);\n// `legend` component not scrollable. for example:\n// chart.setOption({\n// legend: {...}\n// });\nuse(LegendComponent);\n// `dataZoom` component including both `dataZoomInside` and `dataZoomSlider`.\nuse(DataZoomComponent);\n// `dataZoom` component providing drag, pinch, wheel behaviors\n// inside coordinate system, for example:\n// chart.setOption({\n// dataZoom: {type: 'inside'}\n// });\nuse(DataZoomInsideComponent);\n// `dataZoom` component providing a slider bar, for example:\n// chart.setOption({\n// dataZoom: {type: 'slider'}\n// });\nuse(DataZoomSliderComponent);\n// `visualMap` component including both `visualMapContinuous` and `visualMapPiecewise`.\nuse(VisualMapComponent);\n// `visualMap` component providing continuous bar, for example:\n// chart.setOption({\n// visualMap: {type: 'continuous'}\n// });\nuse(VisualMapContinuousComponent);\n// `visualMap` component providing pieces bar, for example:\n// chart.setOption({\n// visualMap: {type: 'piecewise'}\n// });\nuse(VisualMapPiecewiseComponent);\n// `aria` component providing aria, for example:\n// chart.setOption({\n// aria: {...}\n// });\nuse(AriaComponent);\n// dataset transform\n// chart.setOption({\n// dataset: {\n// transform: []\n// }\n// });\nuse(TransformComponent);\nuse(DatasetComponent);\n// universal transition\n// chart.setOption({\n// series: {\n// universalTransition: { enabled: true }\n// }\n// })\nuse(UniversalTransition);\n// label layout\n// chart.setOption({\n// series: {\n// labelLayout: { hideOverlap: true }\n// }\n// })\nuse(LabelLayout);","/**\n * 保留 object 中的部分内容\n * @param obj\n * @param keys\n */\nexport function pick(obj, keys) {\n var r = {};\n keys.forEach(function (key) {\n r[key] = obj[key];\n });\n return r;\n}\n//# sourceMappingURL=pick.js.map","export function isFunction(v) {\n return typeof v === 'function';\n}\n//# sourceMappingURL=is-function.js.map","export function isString(v) {\n return typeof v === 'string';\n}\n//# sourceMappingURL=is-string.js.map","import { __assign, __extends } from \"tslib\";\nimport React, { PureComponent } from 'react';\nimport { bind, clear } from 'size-sensor';\nimport { pick } from './helper/pick';\nimport { isFunction } from './helper/is-function';\nimport { isString } from './helper/is-string';\nimport { isEqual } from './helper/is-equal';\n/**\n * core component for echarts binding\n */\nvar EChartsReactCore = /** @class */ (function (_super) {\n __extends(EChartsReactCore, _super);\n function EChartsReactCore(props) {\n var _this = _super.call(this, props) || this;\n _this.echarts = props.echarts;\n _this.ele = null;\n _this.isInitialResize = true;\n return _this;\n }\n EChartsReactCore.prototype.componentDidMount = function () {\n this.renderNewEcharts();\n };\n // update\n EChartsReactCore.prototype.componentDidUpdate = function (prevProps) {\n /**\n * if shouldSetOption return false, then return, not update echarts options\n * default is true\n */\n var shouldSetOption = this.props.shouldSetOption;\n if (isFunction(shouldSetOption) && !shouldSetOption(prevProps, this.props)) {\n return;\n }\n // 以下属性修改的时候,需要 dispose 之后再新建\n // 1. 切换 theme 的时候\n // 2. 修改 opts 的时候\n // 3. 修改 onEvents 的时候,这样可以取消所有之前绑定的事件 issue #151\n if (!isEqual(prevProps.theme, this.props.theme) ||\n !isEqual(prevProps.opts, this.props.opts) ||\n !isEqual(prevProps.onEvents, this.props.onEvents)) {\n this.dispose();\n this.renderNewEcharts(); // 重建\n return;\n }\n // when these props are not isEqual, update echarts\n var pickKeys = ['option', 'notMerge', 'lazyUpdate', 'showLoading', 'loadingOption'];\n if (!isEqual(pick(this.props, pickKeys), pick(prevProps, pickKeys))) {\n this.updateEChartsOption();\n }\n /**\n * when style or class name updated, change size.\n */\n if (!isEqual(prevProps.style, this.props.style) || !isEqual(prevProps.className, this.props.className)) {\n this.resize();\n }\n };\n EChartsReactCore.prototype.componentWillUnmount = function () {\n this.dispose();\n };\n /**\n * return the echart object\n * 1. if exist, return the existed instance\n * 2. or new one instance\n */\n EChartsReactCore.prototype.getEchartsInstance = function () {\n return this.echarts.getInstanceByDom(this.ele) || this.echarts.init(this.ele, this.props.theme, this.props.opts);\n };\n /**\n * dispose echarts and clear size-sensor\n */\n EChartsReactCore.prototype.dispose = function () {\n if (this.ele) {\n try {\n clear(this.ele);\n }\n catch (e) {\n console.warn(e);\n }\n // dispose echarts instance\n this.echarts.dispose(this.ele);\n }\n };\n /**\n * render a new echarts instance\n */\n EChartsReactCore.prototype.renderNewEcharts = function () {\n var _this = this;\n var _a = this.props, onEvents = _a.onEvents, onChartReady = _a.onChartReady;\n // 1. new echarts instance\n var echartsInstance = this.updateEChartsOption();\n // 2. bind events\n this.bindEvents(echartsInstance, onEvents || {});\n // 3. on chart ready\n if (isFunction(onChartReady))\n onChartReady(echartsInstance);\n // 4. on resize\n if (this.ele) {\n bind(this.ele, function () {\n _this.resize();\n });\n }\n };\n // bind the events\n EChartsReactCore.prototype.bindEvents = function (instance, events) {\n function _bindEvent(eventName, func) {\n // ignore the event config which not satisfy\n if (isString(eventName) && isFunction(func)) {\n // binding event\n instance.on(eventName, function (param) {\n func(param, instance);\n });\n }\n }\n // loop and bind\n for (var eventName in events) {\n if (Object.prototype.hasOwnProperty.call(events, eventName)) {\n _bindEvent(eventName, events[eventName]);\n }\n }\n };\n /**\n * render the echarts\n */\n EChartsReactCore.prototype.updateEChartsOption = function () {\n var _a = this.props, option = _a.option, _b = _a.notMerge, notMerge = _b === void 0 ? false : _b, _c = _a.lazyUpdate, lazyUpdate = _c === void 0 ? false : _c, showLoading = _a.showLoading, _d = _a.loadingOption, loadingOption = _d === void 0 ? null : _d;\n // 1. get or initial the echarts object\n var echartInstance = this.getEchartsInstance();\n // 2. set the echarts option\n echartInstance.setOption(option, notMerge, lazyUpdate);\n // 3. set loading mask\n if (showLoading)\n echartInstance.showLoading(loadingOption);\n else\n echartInstance.hideLoading();\n return echartInstance;\n };\n /**\n * resize wrapper\n */\n EChartsReactCore.prototype.resize = function () {\n // 1. get the echarts object\n var echartsInstance = this.getEchartsInstance();\n // 2. call echarts instance resize if not the initial resize\n // resize should not happen on first render as it will cancel initial echarts animations\n if (!this.isInitialResize) {\n try {\n echartsInstance.resize();\n }\n catch (e) {\n console.warn(e);\n }\n }\n // 3. update variable for future calls\n this.isInitialResize = false;\n };\n EChartsReactCore.prototype.render = function () {\n var _this = this;\n var _a = this.props, style = _a.style, _b = _a.className, className = _b === void 0 ? '' : _b;\n // default height = 300\n var newStyle = __assign({ height: 300 }, style);\n return (React.createElement(\"div\", { ref: function (e) {\n _this.ele = e;\n }, style: newStyle, className: \"echarts-for-react \" + className }));\n };\n return EChartsReactCore;\n}(PureComponent));\nexport default EChartsReactCore;\n//# sourceMappingURL=core.js.map","import { __extends } from \"tslib\";\nimport * as echarts from 'echarts';\nimport EChartsReactCore from './core';\n// export the Component the echarts Object.\nvar EChartsReact = /** @class */ (function (_super) {\n __extends(EChartsReact, _super);\n function EChartsReact(props) {\n var _this = _super.call(this, props) || this;\n // 初始化为 echarts 整个包\n _this.echarts = echarts;\n return _this;\n }\n return EChartsReact;\n}(EChartsReactCore));\nexport default EChartsReact;\n//# sourceMappingURL=index.js.map","\"use strict\";var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));var _react=_interopRequireDefault(require(\"react\"));function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r 1 && arguments[1] !== undefined ? arguments[1] : 60;\n var timer = null;\n return function () {\n var _this = this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n clearTimeout(timer);\n timer = setTimeout(function () {\n fn.apply(_this, args);\n }, delay);\n };\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n/**\n * Created by hustcc on 18/6/9.\n * Contract: i@hust.cc\n */\n\nvar id = 1;\n\n/**\n * generate unique id in application\n * @return {string}\n */\nvar _default = function _default() {\n return \"\".concat(id++);\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ver = exports.clear = exports.bind = void 0;\nvar _sensorPool = require(\"./sensorPool\");\n/**\n * Created by hustcc on 18/6/9.[高考时间]\n * Contract: i@hust.cc\n */\n\n/**\n * bind an element with resize callback function\n * @param {*} element\n * @param {*} cb\n */\nvar bind = function bind(element, cb) {\n var sensor = (0, _sensorPool.getSensor)(element);\n\n // listen with callback\n sensor.bind(cb);\n\n // return unbind function\n return function () {\n sensor.unbind(cb);\n };\n};\n\n/**\n * clear all the listener and sensor of an element\n * @param element\n */\nexports.bind = bind;\nvar clear = function clear(element) {\n var sensor = (0, _sensorPool.getSensor)(element);\n (0, _sensorPool.removeSensor)(sensor);\n};\nexports.clear = clear;\nvar ver = \"1.0.2\";\nexports.ver = ver;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.removeSensor = exports.getSensor = exports.Sensors = void 0;\nvar _id = _interopRequireDefault(require(\"./id\"));\nvar _sensors = require(\"./sensors\");\nvar _constant = require(\"./constant\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/**\n * Created by hustcc on 18/6/9.\n * Contract: i@hust.cc\n */\n\n/**\n * all the sensor objects.\n * sensor pool\n */\nvar Sensors = {};\n\n/**\n * When destroy the sensor, remove it from the pool\n */\nexports.Sensors = Sensors;\nfunction clean(sensorId) {\n // exist, then remove from pool\n if (sensorId && Sensors[sensorId]) {\n delete Sensors[sensorId];\n }\n}\n\n/**\n * get one sensor\n * @param element\n * @returns {*}\n */\nvar getSensor = function getSensor(element) {\n var sensorId = element.getAttribute(_constant.SizeSensorId);\n\n // 1. if the sensor exists, then use it\n if (sensorId && Sensors[sensorId]) {\n return Sensors[sensorId];\n }\n\n // 2. not exist, then create one\n var newId = (0, _id[\"default\"])();\n element.setAttribute(_constant.SizeSensorId, newId);\n var sensor = (0, _sensors.createSensor)(element, function () {\n return clean(newId);\n });\n // add sensor into pool\n Sensors[newId] = sensor;\n return sensor;\n};\n\n/**\n * 移除 sensor\n * @param sensor\n */\nexports.getSensor = getSensor;\nvar removeSensor = function removeSensor(sensor) {\n var sensorId = sensor.element.getAttribute(_constant.SizeSensorId);\n // remove event, dom of the sensor used\n sensor.destroy();\n clean(sensorId);\n};\nexports.removeSensor = removeSensor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createSensor = void 0;\nvar _object = require(\"./object\");\nvar _resizeObserver = require(\"./resizeObserver\");\n/**\n * Created by hustcc on 18/7/5.\n * Contract: i@hust.cc\n */\n\n/**\n * sensor strategies\n */\n// export const createSensor = createObjectSensor;\nvar createSensor = typeof ResizeObserver !== 'undefined' ? _resizeObserver.createSensor : _object.createSensor;\nexports.createSensor = createSensor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createSensor = void 0;\nvar _debounce = _interopRequireDefault(require(\"../debounce\"));\nvar _constant = require(\"../constant\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/**\n * Created by hustcc on 18/6/9.\n * Contract: i@hust.cc\n */\n\nvar createSensor = function createSensor(element, whenDestroy) {\n var sensor = undefined;\n // callback\n var listeners = [];\n\n /**\n * create object DOM of sensor\n * @returns {HTMLObjectElement}\n */\n var newSensor = function newSensor() {\n // adjust style\n if (getComputedStyle(element).position === 'static') {\n element.style.position = 'relative';\n }\n var obj = document.createElement('object');\n obj.onload = function () {\n obj.contentDocument.defaultView.addEventListener('resize', resizeListener);\n // 直接触发一次 resize\n resizeListener();\n };\n obj.style.display = 'block';\n obj.style.position = 'absolute';\n obj.style.top = '0';\n obj.style.left = '0';\n obj.style.height = '100%';\n obj.style.width = '100%';\n obj.style.overflow = 'hidden';\n obj.style.pointerEvents = 'none';\n obj.style.zIndex = '-1';\n obj.style.opacity = '0';\n obj.setAttribute('class', _constant.SensorClassName);\n obj.setAttribute('tabindex', _constant.SensorTabIndex);\n obj.type = 'text/html';\n\n // append into dom\n element.appendChild(obj);\n // for ie, should set data attribute delay, or will be white screen\n obj.data = 'about:blank';\n return obj;\n };\n\n /**\n * trigger listeners\n */\n var resizeListener = (0, _debounce[\"default\"])(function () {\n // trigger all listener\n listeners.forEach(function (listener) {\n listener(element);\n });\n });\n\n /**\n * listen with one callback function\n * @param cb\n */\n var bind = function bind(cb) {\n // if not exist sensor, then create one\n if (!sensor) {\n sensor = newSensor();\n }\n if (listeners.indexOf(cb) === -1) {\n listeners.push(cb);\n }\n };\n\n /**\n * destroy all\n */\n var destroy = function destroy() {\n if (sensor && sensor.parentNode) {\n if (sensor.contentDocument) {\n // remote event\n sensor.contentDocument.defaultView.removeEventListener('resize', resizeListener);\n }\n // remove dom\n sensor.parentNode.removeChild(sensor);\n // initial variable\n element.removeAttribute(_constant.SizeSensorId);\n sensor = undefined;\n listeners = [];\n whenDestroy && whenDestroy();\n }\n };\n\n /**\n * cancel listener bind\n * @param cb\n */\n var unbind = function unbind(cb) {\n var idx = listeners.indexOf(cb);\n if (idx !== -1) {\n listeners.splice(idx, 1);\n }\n\n // no listener, and sensor is exist\n // then destroy the sensor\n if (listeners.length === 0 && sensor) {\n destroy();\n }\n };\n return {\n element: element,\n bind: bind,\n destroy: destroy,\n unbind: unbind\n };\n};\nexports.createSensor = createSensor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createSensor = void 0;\nvar _constant = require(\"../constant\");\nvar _debounce = _interopRequireDefault(require(\"../debounce\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/**\n * Created by hustcc on 18/7/5.\n * Contract: i@hust.cc\n */\n\nvar createSensor = function createSensor(element, whenDestroy) {\n var sensor = undefined;\n // callback\n var listeners = [];\n\n /**\n * trigger listeners\n */\n var resizeListener = (0, _debounce[\"default\"])(function () {\n // trigger all\n listeners.forEach(function (listener) {\n listener(element);\n });\n });\n\n /**\n * create ResizeObserver sensor\n * @returns\n */\n var newSensor = function newSensor() {\n var s = new ResizeObserver(resizeListener);\n // listen element\n s.observe(element);\n\n // trigger once\n resizeListener();\n return s;\n };\n\n /**\n * listen with callback\n * @param cb\n */\n var bind = function bind(cb) {\n if (!sensor) {\n sensor = newSensor();\n }\n if (listeners.indexOf(cb) === -1) {\n listeners.push(cb);\n }\n };\n\n /**\n * destroy\n */\n var destroy = function destroy() {\n sensor.disconnect();\n listeners = [];\n sensor = undefined;\n element.removeAttribute(_constant.SizeSensorId);\n whenDestroy && whenDestroy();\n };\n\n /**\n * cancel bind\n * @param cb\n */\n var unbind = function unbind(cb) {\n var idx = listeners.indexOf(cb);\n if (idx !== -1) {\n listeners.splice(idx, 1);\n }\n\n // no listener, and sensor is exist\n // then destroy the sensor\n if (listeners.length === 0 && sensor) {\n destroy();\n }\n };\n return {\n element: element,\n bind: bind,\n destroy: destroy,\n unbind: unbind\n };\n};\nexports.createSensor = createSensor;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n"],"names":["createDom","id","painter","dpr","newDom","platform","width","height","newDomStyle","Layer","_super","_this","dom","util","domStyle","displayList","prevList","viewWidth","viewHeight","mergedRepaintRects","maxRepaintRectCount","full","pendingRect","BoundingRect","addRectToMergePool","rect","boundingRect","isMerged","minDeltaArea","bestRectToMergeIdx","i","mergedRect","pendingRect_1","aArea","bArea","pendingArea","deltaArea","el","shouldPaint","prevRect","curRect","hasIntersections","j","domBack","clearAll","clearColor","repaintRects","ctx","haveMotionBLur","lastFrameAlpha","self","doClear","x","clearColorGradientOrPattern","shouldCache","Eventful","HOVER_LAYER_ZLEVEL","CANVAS_ZLEVEL","EL_AFTER_INCREMENTAL_INC","INCREMENTAL_INC","isLayerValid","layer","createRoot","domRoot","CanvasPainter","root","storage","opts","singleCanvas","rootStyle","zlevelList","layers","rootCanvas","mainLayer","viewportRoot","paintAll","list","z","len","hoverLayer","scope","redrawId","_a","finished","needsRefreshHover","self_1","requestAnimationFrame","layerList","useDirtyRect","zi","zlevel","_loop_1","k","this_1","start","useTimer","startTime","firstEl","repaint","repaintRect","dTime","r","env","currentLayer","isLast","paintRect","virtual","layersMap","prevLayer","prevDom","cb","context","updatePrevLayer","idx","i_1","incrementalLayerCount","prevZlevel","backgroundColor","config","layerConfig","_zlevel","imageLayer","width_1","height_1","install","registers","mathSin","mathCos","PI","PI2","degree","SVGPathRebuilder","precision","y","x2","y2","x3","y3","cx","cy","startAngle","endAngle","anticlockwise","rx","ry","psi","dTheta","clockwise","dThetaPositive","isCircle","unifiedTheta","large","x0","y0","xRot","p","dTheta_1","w","h","cmd","a","b","c","d","e","f","g","vals","val","NONE","mathRound","pathHasFill","style","fill","pathHasStroke","stroke","strokeProps","svgStrokeProps","prop","mapStyleToAttrs","updateAttr","forceUpdate","opacity","fillOpacity","strokeScale","strokeWidth","strokeOpacity","strokeFirst","lineDash","lineDashOffset","propName","SVGNS","XLINKNS","XMLNS","XML_NAMESPACE","META_DATA_PREFIX","createElement","name","createVNode","tag","key","attrs","children","text","createElementOpen","attrsStr","part","createElementClose","vNodeToString","S","convertElToString","child","getCssString","selectorNodes","animationNodes","bracketBegin","bracketEnd","selectors","className","attrName","animations","animationName","percent","createBrushScope","zrId","createSVGVNode","useViewBox","cssClassIdx","getClassId","EASING_MAP","transformOriginKey","buildPathString","kfShape","path","shape","svgPathBuilder","setTransformOrigin","target","transform","originX","originY","ANIMATE_STYLE_MAP","addAnimation","cssAnim","createCompoundPathCSSAnimation","paths","composedAnim","cssAnimationCfg","cssAnimationName","subScope","createCSSAnimation","cssAnims","cssNodes","animNames","lastAnim","kf","getEasingFunc","easing","onlyShape","animators","cssAnimations","CompoundPath","animationCfg","groupAnimators","animator","cfgArr","delay","cfg","createSingleCSSAnimation","groupAnimator","transformKfs","shapeKfs","finalKfs","animationTimingFunctionAttrName","saveAnimatorTrackToCssKfs","cssKfs","toCssAttrName","tracks","maxTime","track","kfs","kfEasing","rawValue","targetProp","str","timingFunction","canAnimateShape","isFirst","PathProxy","len_1","newLen","percents","allTransformOriginSame","transformOrigin","p0","p1","createCSSEmphasis","setClassAttribute","emphasisStyle","normalFill","selectFill","fromFill","lineWidth","scaleX","withHover","styleKey","round","isImageLike","isCanvasLike","setStyleAttrs","isFillStroke","setGradient","setPattern","setShadow","setMetaData","metaData","noRotateScale","m","noTranslate","setTransform","compress","mul","convertPolyShape","points","strArr","validatePolyShape","createAttrsConvert","desc","normalizedDesc","item","builtinShapesDef","hasShapeAnimation","brushSVGPath","builtinShpDef","needsAnimate","svgElType","strokePercent","needBuildPath","pathVersion","elExt","brushSVGImage","image","dw","dh","brushSVGTSpan","font","textAlign","separatedFontStr","fontStyle","fontSize","fontFamily","fontWeight","brush","Path","TSpan","shadowKey","shadowCache","shadowId","globalScale","scaleY","offsetX","offsetY","blur_1","color","stdDx","stdDy","stdDeviation","gradientTag","gradientAttrs","colors","colorStops","offset","stopColor","stopsAttrs","gradientVNode","gradientKey","gradientCache","gradientId","patternAttrs","repeat","noRepeat","repeatX","repeatY","imageWidth_1","imageHeight_1","imageSrc","patternImage","errMsg","setSizeToVNode_1","vNode","img","svgEl","createdImage","patternVNode","patternWidth","patternHeight","patternTransform","patternKey","patternCache","patternId","setClipPath","clipPath","clipPathCache","defs","clipPathId","clipPathAttrs","createTextNode","createComment","insertBefore","parentNode","newNode","referenceNode","removeChild","node","appendChild","nextSibling","tagName","elm","setTextContent","getTextContent","isElement","isText","isComment","colonChar","xChar","emptyNode","isUndef","s","isDef","createKeyToOldIdx","beginIdx","endIdx","map","sameVnode","vnode1","vnode2","isSameKey","isSameTag","createElm","vnode","updateAttrs","ch","addVnodes","parentElm","before","vnodes","startIdx","removeVnodes","parent_1","oldVnode","oldAttrs","cur","old","updateChildren","oldCh","newCh","oldStartIdx","newStartIdx","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","oldKeyToIdx","idxInOld","elmToMove","patchVnode","patch","parent_2","svgId","SVGPainter","createMethodNotSupport","viewport","svgDom","bgVNode","createBackgroundVNode","mainVNode","animationCssStr","styleNode","out","listLen","clipPathsGroupsStack","clipPathsGroupsStackDepth","currentClipPathGroup","prevClipPaths","clipGroupNodeIdx","displayable","clipPaths","prevLen","lca","i_2","groupAttrs","ret","viewportStyle","bgEl","base64","prefix","method","LineSeriesModel","option","createSeriesData","opt","group","Group","line","visualType","visualRotate","symbolType","size","symbol","symbolRotate","Series","getDefaultLabel","data","dataIndex","labelDims","rawVal","getDefaultInterpolatedLabel","interpolatedValue","dimIndex","Symbol","seriesScope","symbolSize","keepAspect","symbolPath","driftSymbol","toLastFrame","draggable","hasCursorOption","seriesModel","isInit","disableAnimation","emphasisItemStyle","blurItemStyle","selectItemStyle","focus","blurScope","emphasisDisabled","labelStatesModels","hoverScale","cursorStyle","itemModel","emphasisModel","symbolOffset","symbolStyle","visualColor","pathStyle","liftZ","z2Origin","useNameLabel","getLabelDefaultText","emphasisState","scaleRatio","scale","animationOpt","textContent","dx","dy","symbolNeedsDraw","point","normalizeUpdateOpt","makeSeriesScope","SymbolDraw","SymbolCtor","oldData","symbolUpdateOpt","getSymbolPoint","newIdx","symbolEl","oldIdx","newSymbolType","oldSymbolType","taskParams","updateIncrementalAndHover","enableAnimation","prepareDataCoordInfo","coordSys","valueOrigin","baseAxis","valueAxis","valueStart","getValueStart","baseAxisDim","valueAxisDim","valueDim","baseDim","baseDataOffset","dims","coordDim","stacked","stackResultDim","extent","getStackedOnPoint","dataCoordInfo","value","stackedData","diffData","newData","diffResult","lineAnimationDiff","oldStackedOnPoints","newStackedOnPoints","oldCoordSys","newCoordSys","oldValueOrigin","newValueOrigin","diff","currPoints","nextPoints","currStackedPoints","nextStackedPoints","status","sortedIndices","rawIndices","newDataOldCoordInfo","oldPoints","newPoints","diffItem","pointAdded","oldIdx2","newIdx2","currentX","currentY","nextX","nextY","newDataDimsForPoint","oldPt","stackedOnPoint","sortedCurrPoints","sortedNextPoints","sortedCurrStackedPoints","sortedNextStackedPoints","sortedStatus","i2","idx2","mathMin","mathMax","isPointNull","drawSegment","segLen","allLen","dir","smooth","smoothMonotone","connectNulls","prevX","prevY","cpx0","cpy0","cpx1","cpy1","nextIdx","tmpK","ratioNextSeg","vx","vy","nextCpx0","nextCpy0","dx0","dx1","dy0","dy1","lenPrevSeg","lenNextSeg","dir_1","dir_2","ECPolylineShape","ECPolyline","xOrY","dim","CMD","isDimX","roots","t","nRoot","t_1","ECPolygonShape","ECPolygon","stackedOnPoints","createGridClipPath","cartesian","hasAnimation","done","during","isHorizontal","isAxisInversed","duringCb","createPolarClipPath","polar","sectorArea","r0","isRadial","createClipPath","isCoordinateSystemType","type","isPointsSame","points1","points2","bboxFromPoints","minX","minY","maxX","maxY","getBoundingDiff","min1","max1","_b","min2","max2","getSmooth","getStackedOnPoints","pt","turnPointsIntoStep","stepTurnAt","baseIndex","stepPoints","stepPt","nextPt","filteredPoints","middle","stepPt2","clipColorStops","maxSize","newColorStops","prevOutOfRangeColorStop","prevInRangeColorStop","lerpStop","stop0","stop1","clippedCoord","coord0","stop_1","coord","getVisualGradient","api","visualMetaList","visualMeta","dimInfo","axis","stop","stopLen","outerColors","colorStopsInRange","inRangeStopLen","tinyExtent","minCoord","maxCoord","coordSpan","gradient","getIsIgnoreFunc","showAllSymbol","isAuto","categoryAxis","canShowAllSymbolForCategory","categoryDataDim","labelMap","labelItem","ordinalNumber","axisExtent","availSize","dataLen","step","getLastIndexNotNull","getPointAtIndex","getIndexRange","dimIdx","prevIndex","nextIndex","anyStateShowEndLabel","createLineClipPath","lineView","endLabelModel_1","valueAnimation_1","data_1","labelAnimationRecord_1","clipRect","endLabel","rectShape","expandSize","getEndLabelStateSpecified","endLabelModel","isBaseInversed","align","verticalAlign","LineView","lineGroup","symbolDraw","ecModel","lineStyleModel","areaStyleModel","isCoordSysPolar","prevCoordSys","polyline","polygon","isAreaChart","showSymbol","isIgnoreFunc","clipShapeForSymbol","oldClipPath","newClipPath","emphasisLineStyle","stackedOnSeries","stackedOnSmooth","changePolyState","toState","payload","symbolLabel","Chart","clipShape","isHorizontalOrRadial","isAxisInverse","seriesDuration","seriesDelay","seriesDelayValue","end","current","polarClip","gridClip","ratio","inheritColor","data_2","animationRecord","valueAnimation","distance","distanceX","distanceY","dataIndexRange","indices","startValue","endValue","inner","stackedOnCurrent","next","stackedOnNext","updatedDataInfo","diffStatus","pointsLayout","seriesType","forceStoreInTypedArray","createRenderPlanner","pipelineContext","useTypedArray","dimLen","store","dimIdx0","dimIdx1","params","segCount","tmpIn","tmpOut","samplers","frame","sum","count","max","min","turningPointAbsoluteValue","turningPointOriginalValue","originalValue","absoluteValue","indexSampler","dataSample","sampling","rate","sampler","LineSeries","lineStyle","BaseBarSeriesModel","startingAtTick","clampData_1","pt_1","tickCoords","alignTicksWithLabel","targetTickId","isEnd","leftCoord","stepTickValue","tickCoord","tickValue","offsetIndex","BarSeriesModel","progressiveThreshold","largeThreshold","BaseBarSeries","SausageShape","SausagePath","dr","rCenter","lessThanCircle","unitStartX","unitStartY","unitEndX","unitEndY","createSectorCalculateTextPosition","positionMapping","isRoundCap","textPosition","mappedSectorPosition","sector","middleR","middleAngle","extraDist","textVerticalAlign","adjustAngleDistanceX","adjustAngleDistanceY","setSectorTextRotation","rotateType","anchorAngle","rotate","angle","getSectorCornerRadius","model","zeroIfNull","cornerRadius","cr","getClipArea","coordSysClipArea","expandWidth","BarView","coordinateSystemType","isLargeDraw","animationModel","realtimeSortCfg","shouldRealtimeSort","needsClip","roundCap","drawBackground","backgroundModel","barBorderRadius","bgEls","oldBgEls","isInitSort","isChangeOrder","createBackground","bgLayout","getLayout","createBackgroundEl","layout","isValidLayout","isClipped","clip","elementCreator","updateStyle","updateRealtimeAnimation","newIndex","oldIndex","createBackgroundShape","textEl","labelInnerStore","bgGroup","createLarge","orderMapping_1","orderMapping","info","dataIdx","mappedValue","ordinalDataDim","lastValue","tickNum","rawIdx","orderInfo","tickMax","sortInfo","sortResult","coordSysBoundingRect","signWidth","signHeight","coordSysX2","coordSysY2","xClipped","yClipped","signR","tmp","clipped","axisModel","isUpdate","Rect","animateProperty","ShapeClass","Sector","positionMap","createPolarPositionMapping","sectorShape","animateTarget","realtimeSortOption","seriesAnimationModel","seriesTarget","axisTarget","axisAnimationModel","checkPropertiesNotValid","obj","props","rectPropties","polarPropties","fixedLineWidth","getLineWidth","signX","signY","isZeroOnPolar","arcOrAngle","position","isPolar","borderRadius","labelPositionOutside","label","state","rawLayout","borderColor","LagePathShape","LargePath","baseDimIdx","valueDimIdx","startPoint","barWidth","progressiveEls","incremental","largeDataIndices","bgPoints","largePathUpdateDataIndex","throttle","event","largePath","largePathFindDataIndex","ii","coordLayout","ElementClz","BarSeries","componentType","componentModel","RADIAN","getViewRect","getBasicPieLayout","viewRect","center","radius","pieLayout","padAngle","minAngle","minAndPadAngle","validDataCount","unitRadian","roseType","stillShowZeroSum","angles","halfPadAngle","layoutData","getSeriesLayoutData","angleRange","restAngle","valueSumLargerThanMinAngle","currentAngle","actualStartAngle","actualEndAngle","angle_1","layout_1","layout_2","dataFilter","legendModels","adjustSingleSide","viewLeft","viewTop","farthestX","recalculateXOnSemiToAlignOnEllipseCurve","semi","rB","rB2","rA","rA2","newX","deltaX","newTargetWidth","constrainTextWidth","recalculateX","items","topSemi","bottomSemi","avoidOverlap","labelLayoutList","leftList","rightList","leftmostX","rightmostX","isPositionCenter","linePoints","targetTextWidth","isAlignToEdge","padding","paddingH","extraPaddingH","realTextWidth","dist","availableWidth","forceRecalculate","textRect","bgColor","overflow","oldOuterWidth","oldHeight","innerRect","availableInnerWidth","newWidth","newRect","margin","pieLabelLayout","hasLabelRotate","minShowLabelRadian","setNotShow","isLabelShown","labelLine","labelModel","labelPosition","labelDistance","labelAlignTo","edgeDistance","bleedMargin","labelLineModel","labelLineLen","labelLineLen2","midAngle","nx","ny","textX","textY","isLabelInside","x1","y1","labelRotate","radialAngle","rad","isDown","selectState","Point","notShowLabel","PiePiece","firstCreate","animationType","labelText","visualOpacity","PieView","piePiece","itemLayout","createSeriesDataSimply","nameList","source","dimensions","SeriesData","LegendVisualProvider","getDataWithEncodedVisual","getRawData","rawData","dataWithEncodedVisual","innerData","PieSeriesModel","dataInner","seats","valueList_1","labelLineNormalOpt","labelLineEmphasisOpt","negativeDataFilter","curValue","PieSeries","ScatterSeriesModel","progressive","BOOST_SIZE_THRESHOLD","LargeSymbolPathShape","LargeSymbolPath","symbolProxy","symbolProxyShape","canBoost","softClipShape","localPos","LargeSymbolDraw","byteOffset","lastAdded","oldLen","hostModel","extrudeShadow","globalStyle","ecData","ScatterView","res","GridModel","CartesianAxisModel","defaultOption","timeAxis","logAxis","AXIS_TYPES","axisModelCreator","axisName","BaseAxisModelClass","extraDefaultOption","v","axisType","axisDefault","AxisModel","layoutMode","inputPositionParams","themeModel","getAxisType","thisOption","OrdinalMeta","Cartesian","scaleType","cartesian2DDimensions","canCalculateAffineTransform","Cartesian2D","xAxisScale","yAxisScale","xScaleExtent","yScaleExtent","xScaleSpan","yScaleSpan","translateX","translateY","axisX","axisY","data1","data2","zoneDiag1","zoneDiag2","area","zone","clamp","xVal","yVal","xAxis","yAxis","xScale","yScale","xAxisExtent","yAxisExtent","tolerance","xExtent","yExtent","Axis2D","coordExtent","asc","Axis","gridModel","grid","otherAxisOnZeroOf","rawAxisPosition","axisPosition","axisDim","rectBound","axisOffset","posBound","onZeroCoord","dirMap","isCartesian2DSeries","findAxisModels","axisModelMap","mathLog","alignScaleTicks","alignToScale","intervalScaleProto","Interval","alignToTicks","alignToNicedTicks","alignToSplitNumber","alignToInterval","scaleExtent","rawExtent","isMinFixed","isMaxFixed","logBase","interval","nicedSplitNumber","range","t0","t1","Grid","axesMap","updateAxisTicks","axes","alignTo","axesIndices","axisNeedsAlign","onZeroRecords","fixAxisOnZero","ignoreContainLabel","boxLayoutParams","isContainLabel","gridRect","axesList","adjustAxes","labelUnionRect","updateAxisTransform","axisIndex","axesMapOnDim","xAxisIndex","yAxisIndex","coordList","finder","xAxisModel","yAxisModel","coordsList","axisPositionUsed","axesCount","createAxisCreator","dimName","isAxisUsedInTheGrid","isCategory","categorySortInfo","axesModelMap","unionExtent","baseAxes","otherAxes","otherAxis","grids","otherAxisDim","onZero","onZeroAxisIndex","canOnZeroToAxis","getOnZeroRecordKey","coordBase","axisExtentSum","AxisBuilder","transformGroup","builders","axisRotation","textRotation","direction","rotationDiff","eventData","tooltipOpt","shown","matrix","pt1","pt2","inverse","arrows","arrowSize","arrowOffset","symbolWidth_1","symbolHeight_1","index","ticksEls","buildAxisMajorTicks","labelEls","buildAxisLabel","fixMinMaxLabelShow","buildAxisMinorTicks","labelList","nameLocation","nameDirection","textStyleModel","gap","gapSignal","pos","isNameLocationCenter","labelLayout","nameRotation","axisNameAvailableWidth","endTextLayout","textFont","truncateOpt","ellipsis","maxWidth","rotation","textRotate","onLeft","tickEls","showMinLabel","showMaxLabel","firstLabel","nextLabel","lastLabel","prevLabel","firstTick","nextTick","lastTick","prevTick","ignoreEl","isTwoLabelOverlapped","firstRect","nextRect","mRotationBack","createTicks","ticksCoords","tickTransform","tickEndCoord","tickLineStyle","anidPrefix","tickEl","tickModel","tickDirection","minorTickModel","minorTicksCoords","minorTickLineStyle","minorTicksEls","show","labelMargin","labels","labelRotation","rawCategoryData","silent","triggerEvent","formattedLabel","rawLabel","itemLabelModel","rawCategoryItem","Model","textColor","alignMin","alignMax","verticalAlignMin","verticalAlignMax","collect","result","collectAxesInfo","collectSeriesInfo","globalTooltipModel","globalAxisPointerModel","linksOption","linkGroups","coordSysKey","makeKey","axesInfoInCoordSys","coordSysModel","baseTooltipModel","saveTooltipAxisInfo","triggerAxis","cross","tooltipAxes","fromTooltip","triggerTooltip","axisPointerModel","axisPointerShow","isHandleTrigger","makeAxisPointerModel","snap","triggerEmphasis","axisKey","involveSeries","axisInfo","groupIndex","getLinkGroupIndex","linkGroup","tooltipAxisPointerModel","fields","volatileOption","field","labelOption","tooltipAxisPointerLabelShow","crossStyle","seriesTooltipTrigger","seriesTooltipShow","linkOption","checkPropInLink","linkPropValue","axisPropValue","fixValue","getAxisInfo","useHandle","coordSysAxesInfo","getAxisPointerModel","axisPointerClazz","AxisView","axisPointer","forceRender","Clazz","clazz","Component","rectCoordAxisBuildSplitArea","axisView","axisGroup","splitAreaModel","areaColors","areaColorsLen","lastSplitAreaColors","newSplitAreaColors","colorIndex","cIndex","prev","areaStyle","rectCoordAxisHandleRemove","axisBuilderAttrs","selfBuilderAttrs","CartesianAxisView","oldAxisGroup","axisBuilder","elementType","cartesians","axisElementBuilders","isInitialSortFromBarRacing","splitLineModel","lineColors","lineCount","p2","minorSplitLineModel","CartesianXAxisView","CartesianYAxisView","GridView","extraOption","ScatterSeries","radarLayout","isValidPoint","getValueMissingPoint","firstPoint","radarBackwardCompat","polarOptArr","polarNotRadar_1","polarOpt","seriesOpt","RadarView","createSymbol","updateSymbols","symbolGroup","getInitialPoints","itemGroup","itemStyle","polygonIgnore","stateName","stateModel","stateIgnore","itemHoverStyle","pathEmphasisState","defaultText","RadarSeriesModel","multipleSeries","dataType","indicatorAxes","nameToDisplay","markerColor","values","valueAxisDefault","defaultsShow","RadarModel","boundaryGap","splitNumber","axisLine","axisTick","axisLabel","nameTextStyle","showName","nameFormatter","nameGap","indicatorModels","indicatorOpt","iNameTextStyle","innerIndicatorOpt","indName","radarModel","radar","axisBuilders","indicatorAxis","showSplitLine","showSplitArea","splitLineColors","splitAreaColors","splitLineColorsArr","splitAreaColorsArr","splitLines","splitAreas","getColorIndex","areaOrLine","areaOrLineColorList","ticksRadius","realSplitNumber_1","axesTicksPoints","prevPoints","IndicatorAxis","radiusExtent","Radar","indicatorModel","indicatorIndex","radian","minRadianDiff","closestAxis","closestAxisIdx","viewSize","number","radarSeries","dummyScale","pixel","radarList","RadarSeries","ATTR","take","zr","resourceKey","userKey","getStore","release","uKey","isTaken","echarts","RoamController","mousedownHandler","mousemoveHandler","mouseupHandler","mousewheelHandler","pinchHandler","controlType","pointerChecker","isAvailableBehavior","oldX","oldY","trigger","shouldZoom","shouldMove","wheelDelta","absWheelDeltaDelta","factor","checkPointerAndTrigger","absDelta","scrollDelta","controller","eventName","behaviorToCheck","contollerEvent","settings","setting","updateViewOnPan","controllerHost","updateViewOnZoom","zoomDelta","zoomX","zoomY","zoomLimit","newZoom","zoomMin","zoomMax","zoomScale","IRRELEVANT_EXCLUDES","onIrrelevantElement","targetCoordSysModel","parseXML","svg","parser","svgNode","nodeParsers","INHERITABLE_STYLE_ATTRIBUTES_MAP","INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS","SELF_STYLE_ATTRIBUTES_MAP","SELF_STYLE_ATTRIBUTES_MAP_KEYS","SVGParser","xml","named","viewBox","parseAttributes","applyDefs","viewBoxRect","viewBoxTransform","viewBoxArr","splitNumberSequence","makeViewBoxTransform","elRoot","xmlNode","parentGroup","namedFrom","isInDefs","isInText","nodeName","namedFromForSub","parser_1","nameAttr","newNamed","paintServerParsers","def","inheritStyle","applyTextAlignment","textStyle","circle","Circle","Line","ellipse","Ellipse","pointsStr","pointsArr","parsePoints","Polygon","LinearGradient","parsePaintServerUnit","parseGradientColorStops","RadialGradient","gradientUnits","offsetStr","styleVals","parseInlineStyle","parent","pointsString","defsUsePending","onlyInlineStyle","isTextGroup","disp","inheritedStyle","selfStyle","parseTransformAttribute","parseAttributeStyle","getFillStrokeStyle","parentSelfStyle","textBaseline","zrTextBaseline","parentInheritedStyle","zrTextAlign","urlRegex","urlMatch","url","numberReg","rawStr","transformRegex","DEGREE_TO_ANGLE","transformOps_1","mt","valueArr","sx","sy","styleRegex","inheritableStyleResult","selfStyleResult","styleRegResult","svgStlAttr","zrInheritableStlAttr","zrSelfStlAttr","svgAttrName","attrValue","parseSVG","REGION_AVAILABLE_SVG_TAG_MAP","GeoSVGResource","mapName","firstGraphic","createRegions","regions","regionsMap","svgXML","rootFromParse","svgWidth","svgHeight","bRectX","bRectY","bRectWidth","bRectHeight","calculatedBoundingRect","namedItem","setSilent","hostKey","usedRootMap","svgGraphic","region","geoCoord","nanhaiName","fixNanhai","mapType","exterior","coordsOffsetMap","fixTextCoords","coordFix","cp","fixDiaoyuIsland","DEFAULT_NAME_PROPERTY","GeoJSONResource","geoJSON","specialAreas","parseInput","nameMap","nameProperty","parsed","rawRegions","calculateBoundingRect","finalRegions","regionName","parseGeoJson","specialArea","regionRect","rawDef","rawSpecialAreas","resource","OPTION_STYLE_ENABLED_TAGS","OPTION_STYLE_ENABLED_TAG_MAP","STATE_TRIGGER_TAG_MAP","LABEL_HOST_MAP","mapLabelRaw","getFixedItemStyle","areaColor","fixLineStyle","styleHost","MapDraw","mapOrGeoModel","fromView","isGeo","mapSeries","geo","regionsGroup","transformInfo","transformInfoRaw","transformInfoRoam","isFirstDraw","isVisualEncodedByVisualMap","viewBuildCtx","regionsGroupByName","regionsInfoByName","projection","projectionStream","transformPoint","project","transformPolygonPoints","inPoints","outPoints","newPt","getPolyShape","regionGroup","regionModel","polygonSubpaths","polylineSubpaths","geometry","polys","projectPolys","poly","centerPt","createCompoundPath","subpaths","isLine","compoundPath","applyOptionStyleForRegion","resetLabelForRegion","resetEventTriggerForRegion","resetTooltipForRegion","resetStateTriggerForRegion","svgDispatcherMap","focusSelf","svgNodeTagLower","Displayable","focus_1","els","blurStyle","opacity_1","geoModel","geoSourceManager","mainType","makeActionBase","action","mapDraw","normalStyleModel","emphasisStyleModel","blurStyleModel","selectStyleModel","normalStyle","selectStyle","decal","labelXY","isDataNaN","query","labelFetcher","specifiedTextOpt","eventTrigger","rings","createStream","polygons","curPoly","startPolygon","endPolygon","stream","ring","MapView","mapModel","originalData","originalDataIndex","fullData","name_1","fullIndex_1","MapSeries","dataNameMap","toAppendNames","name_2","geoSource","geoIndex","seriesGroup","seriesNames","otherIndex","zoom","iconType","icon","dataStatistics","datas","statisticType","mapKey","mapDataStatistic","seriesGroups","hostGeoModel","seriesList","mapSymbolLayout","processedMapType","mapSymbolOffsets","subMapSeries","v2ApplyTransform","vector","View","Transformable","rawTransform","rawParent","centerCoord","rawRect","rawTransformMatrix","roamTransform","defaultCenter","roamTransformable","rawTransformable","dummyTransformable","noRoam","invTransform","getCoordSys","GEO_DEFAULT_PARAMS","geo2DDimensions","Geo","resourceType","defaultParams","invertLongitute","projected","resizeGeo","boundingCoords","leftTop_1","rightBottom_1","projection_1","xMin","yMin","xMax","yMax","sampleLine","centerOption","sizeOption","aspect","useCenterAndSize","boxLayoutOption","setGeoCoords","GeoCreator","geoList","getCommonGeoProperties","mapModelGroupBySeries","nameMapList","singleMapSeries","originRegionArr","regionsArr","geoCreator","GeoModel","parentModel","selectedMap","optionModelMap","regionOpt","formatter","selectedMode","getCenterCoord","view","updateCenterAndZoom","previousZoom","fixX","fixY","GeoView","registerMap","geoJson","makeAction","actionInfo","selected","allSelected","names","init","inRoot","nodes","firstWalk","separation","siblings","subtreeW","executeShifts","midPoint","apportion","secondWalk","nodeX","defaultSeparation","radialCoordinate","n","shift","change","subtreeV","ancestor","nodeOutRight","nodeInRight","nodeOutLeft","nodeInLeft","sumOutRight","sumInRight","sumOutLeft","sumInLeft","nextRight","nextLeft","moveSubtree","nextAncestor","wl","wr","node1","node2","TreeEdgeShape","TreePath","childPoints","childLen","parentPoint","firstChildPos","lastChildPos","orient","forkDim","otherDim","forkPosition","tmpPoint","TreeView","layoutInfo","updateNode","removeNode","bbox","oldMin","oldMax","viewCoordSys","nodeScale","nodeScaleRatio","groupZoom","roamZoom","symbolInnerColor","virtualRoot","sourceSymbolEl","sourceLayout","sourceOldLayout","targetLayout","realRoot","rootLayout","length_1","isLeft","normalLabelModel","labelRotateRadian","focusDataIndices","drawEdge","parentEl","edgeShape","curvature","edgeForkPosition","edge","getEdgeShape","childLayout","removeNodeEdge","removeAnimationOpt","getSourceNode","sourceEdge","layoutOpt","childNode","cpx2","cpy2","radialCoor1","radialCoor2","radialCoor3","radialCoor4","linkSeriesData","mainData","linkAll","methodName","transferInjection","cloneShallowInjection","changeInjection","isMainData","linkSingle","getLinkedData","getLinkedDataAll","TreeNode","hostTree","options","order","suppressVisitSub","depth","includeSelf","ancestors","currNode","dimension","merge","Tree","rawIndex","dataRoot","beforeLink","tree","listData","dimMax","buildHierarchy","dataNode","addChild","retrieveTargetInfo","validPayloadTypes","targetNode","targetNodeId","getPathToRoot","aboveViewRoot","viewRoot","viewPath","wrapTreePathInfo","treePathInfo","nodeDataIndex","TreeSeriesModel","leaves","leavesModel","nodeData","treeDepth","expandAndCollapse","expandTreeDepth","eachAfter","callback","eachBefore","treeLayout","commonLayout","left_1","right_1","bottom_1","delta","tx_1","kx_1","ky_1","coorX_1","coorY_1","finalCoor","orient_1","treeVisual","existsStyle","installTreeAction","TreeSeries","actionTypes","installTreemapAction","handleRootToNode","types","targetInfo","originViewRoot","enableAriaDecalForTree","decalPaletteScope","TreemapSeriesModel","completeTreeValue","levels","designatedVisualItemStyle","designatedVisualModel","setDefault","levelModels","levelDefine","levelModel","idIndexMap","childValue","thisValue","globalColorList","globalDecalList","hasColorDefine","hasDecalDefine","modelColor","modelDecal","level0","TEXT_PADDING","ITEM_GAP","ARRAY_LENGTH","Breadcrumb","containerGroup","onSelect","thisGroup","emphasisTextStyleModel","layoutParam","itemWidth","lastX","emptyItemWidth","availableSize","totalWidth","renderList","itemNode","makeItemPoints","packEventData","itemHeight","head","tail","AnimationWrap","duration","checkTerminate","createWrap","DRAG_THRESHOLD","PATH_LABEL_NOAMAL","PATH_UPPERLABEL_NORMAL","Z2_BASE","Z2_BG","Z2_CONTENT","getStateItemStyle","makeStyleMapper","getItemStyleNormal","TreemapView","createStorage","models","payloadType","thisStorage","reRoot","renderResult","thisTree","oldTree","lastsForAnimation","oldStorage","willInvisibleEls","doRenderNode","thisNode","oldNode","renderNode","dualTravel","willDeleteEls","clearStorage","_oldRootLayout","renderFinally","thisViewChildren","oldViewChildren","sameTree","processNode","DataDiffer","getKey","storageName","delEls","durationOption","easingOption","animationWrap","innerStore","targetX","targetY","last","mouseX","mouseY","_controllerHost","nodeClick","link","linkTarget","thisLayout","nodeModel","thisWidth","thisHeight","borderWidth","thisInvisible","thisRawIndex","oldRawIndex","upperHeight","isParent","itemStyleNormalModel","itemStyleEmphasisModel","itemStyleBlurModel","itemStyleSelectModel","giveGraphic","bg","renderBackground","isDisabled","focusOrIndices","content","renderContent","useUpperLabel","processInvisible","visualBorderColor","upperLabelWidth","prepareText","contentWidth","contentHeight","nodeStyle","element","rectEl","upperLabelRect","isShow","textPadding","addDrillDownIcon","textEmphasisState","iconChar","Ctor","lasts","prepareAnimationWhenHasOld","calculateZ2","prepareAnimationWhenNoOld","lastCfg","isGroup","parentOldX","parentOldY","parentOldBg","z2InLevel","each","isObject","CATEGORY_DEFAULT_VISUAL_INDEX","VisualMapping","mappingMethod","normalizers","visualHandler","normalizeVisualRange","preprocessForPiecewise","preprocessForSpecifiedCategory","normalized","visual","isPrimary","newVisual","newVal","hasVisual","visualTypes","types_1","type1","type2","visualType1","visualType2","pieceList","findClosestWhenOutside","possibleI","abs","pieceValue","updatePossible","piece","close_1","littleThan","newAbs","makeApplyVisual","isNormalized","doMapCategory","returnRGBArray","getSpecifiedVisual","doMapFixed","makePartialColorVisualHandler","createNormalizedToNumericVisual","getter","setter","symbolCfg","doMapToArray","categories","categoryMap","cate","visualArr_1","setVisualToOption","visualArr","doNotNeedPair","applyValue","colorChannel","sourceExtent","pieceIndex","close","ITEM_STYLE_NORMAL","travelTree","designatedVisual","viewRootAncestors","nodeLayout","nodeItemStyleModel","visuals","buildVisuals","borderColorSaturation","thisNodeColor","calculateColor","calculateBorderColor","viewChildren","mapping_1","buildVisualMapping","childVisual","mapVisual","visualName","getValueVisualDefine","colorAlpha","colorSaturation","rangeVisual","getRangeVisual","visualMin","visualMax","dataExtent","colorMappingBy","mapping","childVisuals","mappingType","retrieveValue","PATH_BORDER_WIDTH","PATH_GAP_WIDTH","PATH_UPPER_LABEL_SHOW","PATH_UPPER_LABEL_HEIGHT","ecWidth","ecHeight","seriesOption","containerWidth","containerHeight","rootRect","viewAbovePath","rootSize","estimateRootSize","sort_1","viewRootLayout_1","squarify","treeRoot","calculateRootPosition","prunning","hideChildren","halfGapWidth","upperLabelHeight","getUpperLabelHeight","layoutOffset","layoutOffsetUpper","totalArea","initChildren","rowFixedLength","best","row","score","worst","childrenVisibleMin","orderBy","overLeafDepth","sort","statistic","filterByThreshold","orderedChildren","visibleMin","deletePoint","areaMax","areaMin","squareArea","flush","idx0WhenH","idx1WhenH","xy","wh","rowOtherLength","rowLen","wh1","remain","modWH","wh0","defaultSize","viewArea","currNodeValue","defaultPosition","targetCenter","nodeInViewAbovePath","isAboveViewRoot","childClipRect","TreemapSeries","treemapVisual","treemapLayout","categoryFilter","graphSeries","categoriesData","graph","categoryNames","category","categoryVisual","paletteScope","categoryNameIdxMap","symbolVisualList","symbolVisual","categoryIdx","categoryStyle","visualList","normalize","graphEdgeVisual","edgeData","KEY_DELIMITER","getAutoCurvenessParams","createCurveness","appendLength","autoCurvenessParmas","length","curvenessList","getKeyOfEdges","n1","n2","getOppositeKey","keys","getEdgeFromMap","getTotalLengthBetweenNodes","getEdgeMapLengthWithKey","lenV","edgeMap","initCurvenessList","createEdgeMapForCurveness","oppositeEdges","getCurvenessForEdge","needReverse","autoCurvenessParams","isArrayParam","edgeArray","edgeIndex","totalLen","curKey","parityCorrection","oppositeKey","resValue","simpleLayout","simpleLayoutEdge","curveness","graphSimpleLayout","dimensions_1","hasValue","getNodeGlobalScale","getSymbolSize","_symbolRadiansHalf","circularLayout","basedOn","draggingNode","pointer","tempX","tempY","circularRotateLabel","rotateNodeLabel","_layoutNodesBasedOn","cp1","x12","y12","unitAngle","radianHalf","sumRadian","symbolRadianHalf","halfRemainRadian","graphCircularLayout","scaleAndAdd","forceLayout","inNodes","inEdges","edges","gravity","initialFriction","friction","beforeStepCallback","afterStepCallback","v12","nLen","repFact","graphForceLayout","preservedPoints_1","graph_1","nodeData_1","forceModel","initLayout","nodeDataExtent_1","edgeDataExtent_1","repulsion","edgeLength","repulsionArr_1","edgeLengthArr_1","nodes_1","rep","edgeModel","forceInstance","l","stopped","createViewCoordSys","viewList","coordSysType","positions","bbWidth","bbHeight","straightLineProto","bezierCurveProto","StraightLineShape","CurveShape","isStraightLine","ECLinePath","SYMBOL_CATEGORIES","makeSymbolTypeKey","symbolCategory","makeSymbolTypeValue","lineData","symbolKeepAspect","symbolSizeArr","symbolOffsetArr","createLine","setLinePoints","targetShape","blurLineStyle","selectLineStyle","lineState","lineStateStyle","stateStyle","labelNormalModel","linePath","symbolFrom","symbolTo","invScale","fromPos","toPos","setSymbolRotation","specifiedRotation","tangent","halfPercent","LineDraw","LineCtor","lineDraw","oldLineData","isEffectObject","lineNeedsDraw","newLineData","itemEl","isPointNaN","pts","v1","v2","v3","quadraticAt","curve","v2DistSquare","mathAbs","intersectCurveCircle","curvePoints","radiusSquare","_t","nextDiff","adjustEdge","tmp0","quadraticSubdivide","pts2","fromSymbol","toSymbol","originalPoints","isViewCoordSys","GraphView","groupNewProp","layoutAnimation","generateNodeKey","Graph","directed","nodesMap","GraphNode","edgesMap","GraphEdge","startNode","edgeType","queue","currentNode","otherNode","dataIndices","adjacentEdge","connectedEdgesMap","connectedNodesMap","sourceNodesQueue","targetNodesQueue","nodeIteratorIndex","sourceNode","sourceNodes","targetNodes","createGraphDataProxyMixin","hostName","dataName","createGraphFromNodeEdge","linkNameList","validEdges","linkCount","coordSysCtor","CoordinateSystem","coordDimensions","GraphSeriesModel","getCategoriesData","categoriesModels","categoryModel","oldGetModel","newGetModel","resolveParentPath","pathArr","newPathArr","sourceName","targetName","nameArr","nodeMarkup","GraphSeries","PointerShape","PointerPath","parsePosition","formatLabel","labelFormatter","GaugeView","colorList","posInfo","axisLineModel","MainPath","showAxis","axisLineWidth","angleRangeSpan","prevEndAngle","sectors","getColor","minVal","maxVal","subSplitNumber","splitLineLen","tickLen","subStep","splitLineStyle","splitLineDistance","unitX","unitY","splitLine","autoColor","textStyleX","textStyleY","tickLine","oldProgressData","progressList","showPointer","progressModel","showProgress","valueExtent","angleExtent","createPointer","pointerModel","pointerWidth","pointerLength","pointerStr","pointerOffset","pointerOffsetX","pointerOffsetY","pointerKeepAspect","createProgress","ProgressPath","isOverlap","progressWidth","progress","isClip","previousPointer","previousRotate","previousProgress","previousEndAngle","anchorModel","showAnchor","anchorSize","anchorType","offsetCenter","anchorKeepAspect","anchor","contentGroup","newTitleEls","newDetailEls","showPointerAbove","itemTitleModel","titleOffsetCenter","titleX","titleY","labelEl","itemDetailModel","detailOffsetCenter","detailX","detailY","detailColor","formatter_1","labelDataIndex","labelDimIndex","fmt","extendParams","GaugeSeriesModel","GaugeSeries","opacityAccessPath","FunnelPiece","FunnelView","funnelPiece","FunnelSeriesModel","getSortedIndices","isAscending","funnelLayout","sizeExtent","funnelAlign","itemSize","getLinePoints","val_1","FunnelSeries","DEFAULT_SMOOTH","ParallelView","dataGroup","add","update","remove","newDataIndex","addEl","updateElCommon","oldDataIndex","createLinePoints","createGridClipShape","parallelModel","isEmptyValue","ParallelSeriesModel","makeDefaultEncode","activeState","theActiveState","encodeDefine","dataDimIndex","convertDimNameToNumber","parallelVisual","opacityMap","itemOpacity","parallelPreprocessor","createParallelIfNeeded","mergeAxisOptionFromParallel","hasParallelSeries","axisOption","parallelIndex","parallelOption","CLICK_THRESHOLD","handlers","handler","checkTrigger","mouseDownPoint","behavior","triggerOn","ParallelModel","newOption","parallelAxisIndex","axisModels","ParallelAxis","sliderMove","handleEnds","handleIndex","minSpan","maxSpan","extentSpan","restrict","handleSpan","originalDistSign","getSpanSign","extentMinSpan","realExtent","currDistSign","extend","mathFloor","mathCeil","Parallel","axisHelper","axisBase","layoutBase","pixelDimIndex","pAxis","pLayout","layoutLength","layoutExtent","axisCount","axisExpandWidth","axisExpandCount","axisExpandable","axisExpandWindow","winSize","axisExpandCenter","axisCollapseWidth","winInnerIndices","axisExpandWindow0Pos","layoutAxisWithExpand","layoutAxisWithoutExpand","positionTable","rotationTable","dataDimensions","hasActiveSet","lenj","axisLayout","pointCoord","triggerArea","useJump","winSize2","axisLabelShow","nameTruncateMaxWidth","createParallelCoordSys","coordSysList","parallelCoordSysCreator","ParallelAxisModel","intervals","activeIntervals","BRUSH_PANEL_GLOBAL","mathPow","COVER_Z","UNSELECT_THRESHOLD","MIN_RESIZE_LINE_WIDTH","MUTEX_RESOURCE_KEY","DIRECTION_MAP","CURSOR_MAP","DEFAULT_BRUSH_OPT","baseUID","BrushController","pointerHandlers","brushOption","panelOpts","panels_1","coverConfigList","coverConfig","tmpIdPrefix","oldCovers","newCovers","creatingCover","oldGetKey","addOrUpdate","cover","newBrushInternal","endCreating","createCover","updateCoverAfterCreation","clearCovers","coverRenderers","updateZ","coverRenderer","getCoverRenderer","updateCoverShape","getPanelByPoint","localCursorPoint","panels","panel","pn","getPanelByCover","panelId","covers","originalLength","areas","shouldShowCover","getTrackEnds","createBaseRectCover","rectRangeConverter","edgeNameSequences","makeStyle","driftRect","nameSequence","updateBaseRect","localRange","handleSize","xa","ya","x2a","y2a","widtha","heighta","updateRectShape","updateCommon","transformable","mainEl","globalDir","getGlobalDirection1","getGlobalDirection2","pointsToRect","clipByPanel","formatRectRange","getTransform","localDirName","inverseMap","localDirNameSeq","dirNameSequence","rectRange","localDelta","toLocalDelta","dirName","ind","driftPolygon","localD","localZero","xmin","ymin","xmax","ymax","resetCursor","isOutsideZrArea","currPanel","preventDefault","rawE","mainShapeContain","updateCoverByMouse","thisBrushOption","eventParams","determineBrushType","coverBrushOption","brushType","handleDragEnd","getLineRenderer","returnInput","localTrack","ends","xyIndex","otherExtent","makeRectPanelClipPath","normalizeRect","localPoints","makeLinearBrushOtherExtent","specifiedXYIndex","brushWidth","base","makeRectIsTargetByCursor","targetModel","elementList","ParallelAxisView","fromAxisAreaSelect","getCoordSysModel","areaSelectStyle","areaWidth","builderOpt","extentLen","extra","getCoverInfoList","eventParam","coverInfoList","coverInfo","installParallelActions","parallelAxisModel","defaultAxisOption","ParallelSeries","SankeyPathShape","SankeyPath","SankeyView","sankeyView","n1Layout","node1Model","dragX1","dragY1","n2Layout","node2Model","dragX2","dragY2","edgeLayout","applyCurveStyle","defaultEdgeLabelText","edgeLabelStateModels","dragX","dragY","curveProps","sourceColor","targetColor","SankeySeriesModel","links","nodeDepth","localPosition","dataItem","noValue","rawDataOpt","edgeValue","edgeName","nodeValue","sankeyLayout","nodeWidth","nodeGap","computeNodeValues","filteredNodes","iterations","nodeAlign","layoutSankey","computeNodeBreadths","computeNodeDepths","computeEdgeDepths","value1","getEdgeValue","value2","nodeRawValue","remainEdges","indegreeArr","zeroIndegrees","nextTargetNode","maxNodeDepth","isItemDepth","edgeIdx","indexEdge","nodeIndex","maxDepth","adjustNodeWithNodeAlign","kx","scaleNodeBreadths","isNodeDepth","nextSourceNode","remainNodes","nodeHeight","moveSinksRight","nodesByBreadth","prepareNodesByBreadth","initializeNodeDepth","resolveCollisions","alpha","relaxRightToLeft","relaxLeftToRight","keyAttr","groupResult","minKy","ky","nodeDy","edgeDy","nodeDyAttr","weightedTarget","centerTarget","nodeY","weightedSource","centerSource","array","ty","sankeyVisual","minValue_1","maxValue_1","mapValueToColor","customColor","edgeStyle","SankeySeries","WhiskerBoxCommonMixin","ordinalMeta","xAxisType","yAxisType","addOrdinal","coordDims","baseAxisDimIndex","baseAxisType","otherAxisType","newOptionData_1","newItem","defaultValueDimensions","BoxplotSeriesModel","BoxplotView","constDim","createNormalBox","updateNormalBoxData","BoxPathShape","BoxPath","transInit","updateMethod","boxplotLayout","groupSeriesByAxis","groupItem","seriesModels","calculateBase","layoutSingleSeries","axisList","seriesCount","boxWidthList","boxOffsetList","boundList","bandWidth","maxDataCount_1","boxWidthBound","boxGap","boxWidth","halfWidth","cDimIdx","vDimIdx","cDim","vDims","axisDimVal","median","getPoint","end1","end2","end4","end5","addBodyEnd","layEndLine","point1","point2","endCenter","from","to","prepareBoxplotData","boxData","outliers","boundIQR","useExtreme","ascList","Q1","Q2","Q3","bound","low","high","itemNameFormatter","itemName","outlier","boxplotTransform","upstream","BoxplotSeries","SKIP_PROPS","CandlestickView","isSimpleBox","clipArea","isNormalBoxClipped","setBoxCommon","NormalBoxPathShape","NormalBoxPath","LargeBoxPathShape","LargeBoxPath","largePoints","elP","elN","elDoji","setLargeStyle","sign","CandlestickSeriesModel","candlestickPreprocessor","seriesItem","positiveBorderColorQuery","negativeBorderColorQuery","dojiBorderColorQuery","positiveColorQuery","negativeColorQuery","candlestickVisual","getBorderColor","isLargeRender","candlestickLayout","candleWidth","calculateCandleWidth","cDimI","vDimsI","openDimI","closeDimI","lowestDimI","highestDimI","largeProgress","normalProgress","openVal","closeVal","lowestVal","highestVal","ocLow","ocHigh","ocLowPoint","ocHighPoint","lowestPoint","highestPoint","subPixelOptimizePoint","hasDojiColor","getSign","makeBrushRect","pmin","pmax","barMaxWidth","barMinWidth","CandlestickSeries","updateRipplePath","rippleGroup","effectCfg","ripplePath","EffectSymbol","rippleNumber","oldEffectCfg","DIFFICULT_PROPS","EffectScatterView","effectSymbolDraw","EffectScatterSeriesModel","EffectScatterSeries","EffectLine","effectModel","period","loop","roundTrip","constantSpeed","delayExpr","delayNum","lastPos","quadraticDerivativeAt","tx","Polyline","lineEmphasisState","EffectPolyline","accLenArr","offsets","lastFrame","LargeLinesPathShape","LargeLinesPath","segs","quadratic","LargeLineDraw","lineEl","oldSegs","newSegs","isIncremental","linesLayout","isPolyline","isLarge","lineCoords","totalCoordsCount","LinesView","trailLength","isSvg","hasEffect","Uint32Arr","Float64Arr","compatEc2","itemOpt","coords","LinesSeriesModel","startOffset","coordsOffsetAndLenStorage","coordsStorage","coordsCursor","offsetCursor","dataCount","fromName","toName","linesVisual","dataEach","LinesSeries","GRADIENT_LEVELS","HeatmapLayer","canvas","colorFunc","isInRange","gradientInRange","gradientOutOfRange","imageData","pixels","pixelLen","minOpacity","maxOpacity","diffOpacity","gradientOffset","brushCanvas","gradientPixels","pixelsSingleState","off","getIsInPiecewiseRange","dataSpan","lastIndex","getIsInContinuousRange","isGeoCoordSys","HeatmapView","visualMapOfThisSeries","visualMap","targetSeries","isCartesian2d","dataDims","dataDimX","dataDimY","emphasisModel_1","visualMapModel","inRangeVisuals","outOfRangeVisuals","hmLayer","lng","lat","HeatmapSeriesModel","coordSysCreator","HeatmapSeries","BAR_BORDER_WIDTH_QUERY","LAYOUT_ATTRS","pathForLineWidth","PictorialBarView","coordSysRect","getItemModel","symbolMeta","getSymbolMeta","bar","createBar","pictorialShapeStr","getShapeStr","updateBar","removeBar","symbolRepeat","symbolClip","symbolPosition","symbolPatternSize","isAnimationEnabled","prepareBarLength","prepareSymbolSize","prepareLineWidth","prepareLayoutInfo","outputSymbolMeta","symbolBoundingData","zeroPx","pxSignIdx","boundingLength","symbolBoundingExtent","convertToCoordOnAxis","pxSign","categoryDim","categorySize","parsedSymbolSize","symbolScale","valueLineWidth","repeatCutLength","unitLength","pathLen","absBoundingLength","symbolMargin","hasEndGap","symbolMarginNumeric","uLenWithMargin","endFix","repeatSpecified","repeatTimes","toIntTimes","mDiff","sizeFix","pathPosition","bundlePosition","barRectShape","createPath","createOrUpdateRepeatSymbols","bundle","unit","eachPath","makeTarget","createOrUpdateSingleSymbol","mainPath","createOrUpdateBarRect","barRect","createOrUpdateClip","getAnimationDelayParams","labelRect","immediateAttrs","animationAttrs","barPositionOutside","times","roundedTimes","PictorialBarSeriesModel","PictorialBarSeries","ThemeRiverView","layersSeries","keyGetter","dataDiffer","newLayersGroups","process","oldLayersGroups","points0","textLayout","layerGroup","DATA_NAME_INDEX","ThemeRiverSeriesModel","rawDataLength","timeValueKeys","layerData","layerNum","timeValue","singleAxisModel","filterData","lenCount","indexArr","timeDim","layerSeries","index1","index2","nestestValue","minDist","nearestIdx","pointNum","theValue","themeRiverLayout","single","doThemeRiverLayout","layerPoints","singleLayer","computeBaseline","baseLine","baseY0","sums","temp","ThemeRiverSeries","DEFAULT_SECTOR_Z","DEFAULT_TEXT_Z","SunburstPiece","itemStyleModel","labelMinAngle","isNormalShown","labelStateModel","isNormal","isShown","getLabelAttr","sectorState","labelColor","labelPadding","flipStartAngle","flipEndAngle","midAngleNormal","needsFlip","stateAttr","ROOT_TO_NODE_ACTION","HIGHLIGHT_ACTION","UNHIGHLIGHT_ACTION","installSunburstAction","handleHighlight","SunburstView","newRoot","renderLabelForZeroData","newChildren","oldChildren","renderRollUp","targetFound","SunburstSeriesModel","sunburstLayout","rootDepth","renderRollupNode","rPerLevel","rStart","rEnd","r0_1","r_1","radius_1","siblingAngle_1","sortOrder","sortTargets","isAsc_1","sunburstVisual","pickColor","treeHeight","SunburstSeries","STYLE_VISUAL_TYPE","NON_STYLE_VISUAL_PROPS","customInnerStore","CustomSeriesModel","dataToCoordSize","dataSize","halfSize","cartesianPrepareCustom","geoPrepareCustom","singlePrepareCustom","getterName","polarPrepareCustom","radiusAxis","angleAxis","calendarPrepareCustom","rangeInfo","deprecatedLogs","isEC4CompatibleStyle","elType","hasOwnTextContentOption","hasOwnTextConfig","convertFromEC4CompatibleStyle","hostStyle","srcStyle","textConfig","textContentStyle","hasOwnPos","convertEC4CompatibleRichItem","richItem","convertToEC4StyleForCustomSerise","itemStl","txStl","txCfg","isInside","hostFill","convertToEC4RichItem","textFillNotSet","warnDeprecated","deprecated","insteadApproach","LEGACY_TRANSFORM_PROPS_MAP","LEGACY_TRANSFORM_PROPS","TRANSFORM_PROPS_MAP","transformPropNamesStr","ELEMENT_ANIMATABLE_PROPS","transitionInnerStore","getElementAnimationConfig","elOption","animationProp","userDuring","duringCall","applyUpdateTransition","animatableModel","clearStyle","styleOpt","transFromProps","propsToSet","prepareTransformAllPropsFinal","prepareShapeOrExtraAllPropsFinal","prepareTransformTransitionFrom","prepareShapeOrExtraTransitionFrom","prepareStyleTransitionFrom","applyPropsDirectly","applyMiscProps","enterFromProps_1","applyPropsTransition","updateLeaveTo","leaveToProps","applyLeaveTransition","onRemove","isTransitionAll","transition","allPropsFinal","tmpDuringScope","transitionDuringAPI","assertNotReserved","latestUserDuring","scopeUserDuring","mainAttr","fromEl","attrOpt","elPropsInAttr","transFromPropsInAttr","attrTransition","transitionKeys","elVal","elPropsInAttrKeys","isNonStyleTransitionEnabled","allProps","allPropsInAttr","keysInAttr","legacyName","xyName","legacyArr","fromElStyle","transFromStyleProps","styleTransition","elTransition","animationProps","animationStyleProps","styleKeys","optVal","checkTransformPropRefer","getStateToRestore","KEYFRAME_EXCLUDE_KEYS","stopPreviousKeyframeAnimationAndRestore","applyKeyframeAnimation","animationOpts","singleAnimationOpts","keyframes","stateToRestore","targetPropName","endFrameIsSet","kfValues","propKeys","savedTarget","EMPHASIS","NORMAL","BLUR","SELECT","STATES","PATH_ITEM_STYLE","PATH_LABEL","DEFAULT_TRANSITION","GROUP_DIFF_PREFIX","attachedTxInfoTmp","prepareCustoms","isPath","isDisplayable","copyElement","sourceEl","targetEl","CustomChartView","customSeries","renderItem","makeRenderItem","createOrUpdateItem","oldEl","setIncrementalAndHoverLayer","eventType","packedEvent","elementName","createEl","graphicType","pathRect","pathData","getPathData","Clz","updateElNormal","attachedTxInfo","txCfgOpt","textOptionStyle","decalPattern","decalObj","updateElOnState","elStateOpt","elDisplayable","stateObj","existingEmphasisState","currentZ","currentZLevel","optZ2","updateZForEachState","retrieveStateOption","prepareResult","userAPI","ordinalRawValue","styleEmphasis","barLayout","currentSeriesIndices","userParams","wrapEncodeDef","currDataIndexInside","currItemModel","currItemStyleModels","currLabelModels","seriesItemStyleModels","seriesLabelModels","dataIndexInside","getItemStyleModel","getLabelModel","userProps","labelStyle","preFetchFromExtra","applyUserPropsAfter","style_1","encodeDef","existsEl","doCreateOrUpdateEl","toBeReplacedIdx","doesElNeedRecreate","doCreateOrUpdateAttachedTx","doCreateOrUpdateClipPath","otherStateOpt","otherStyleOpt","retrieveStyleOptionOnState","mergeChildren","elInner","elOptionType","elOptionShape","elOptionStyle","hasOwnPathData","clipPathOpt","processTxInfo","txConOptNormal","txConOptEmphasis","txConOptBlur","txConOptSelect","txConStlOptNormal","txConOptOtherState","stateOpt","txConOpt","convertResult","txConOptNormal_1","stateOptionNormal","stateOption","byName","notMerge","diffGroupChildren","newChild","oldChild","removeChildFromGroup","processAddUpdate","processRemove","childOption","CustomSeries","clone","bind","BaseAxisPointer","handle","graphicKey","moveAnimation","doUpdateProps","updateProps","updateMandatoryProps","animation","isCategoryAxis","useSnap","animationThreshold","seriesDataCount","pointerOption","pointerEl","updateLabelShowHide","handleModel","getHandleTransProps","trans","payloadInfo","xDimIndex","propsEqual","lastProps","newProps","equals_1","buildElStyle","axisPointerType","styleModel","buildLabelElOption","labelPos","getValueLabel","paddings","format","confineInContainer","seriesDataIndices","params_1","idxItem","series","dataParams","getTransformedPosition","buildCartesianSingleLabelElOption","makeLineShape","makeRectShape","makeSectorShape","CartesianAxisPointer","getCartesian","pixelValue","elStyle","pointerShapeBuilder","currPosition","cursorOtherValue","cursorPoint","tooltipOptions","getAxisDimIndex","span","AxisPointerModel","register","initGlobalListeners","record","useHandler","doEnter","onLeave","dis","makeDispatchAction","dispatchTooltipFinally","pendings","showLen","hideLen","actuallyPayload","dispatchAction","currTrigger","pendingList","unregister","AxisPointerView","findPointFromSeries","seriesIndex","axisTrigger","illegalPoint","isIllegalPoint","inputAxesInfo","axesInfo","shouldHide","outputPayload","showValueMap","dataByCoordSys","updaters","showTooltip","coordSysContainsPoint","inputAxisInfo","findInputAxisInfo","processOnAxis","linkTriggers","tarAxisInfo","tarKey","srcAxisInfo","srcKey","srcValItem","makeMapperParam","updateModelActually","dispatchTooltipActually","dispatchHighDownActually","newValue","noSnap","outputFinder","buildPayloadsBySeries","payloadBatch","snapToValue","minDiff","dataDim","seriesNestestValue","coordSysItem","outputAxesInfo","valItem","sampleItem","highDownKey","lastHighlights","newHighlights","batchItem","toHighlight","toDownplay","PolarAxisPointer","coordValue","getLabelPosition","axisAngle","PolarModel","foundAxisModel","PolarAxisModel","AngleAxisModel","RadiusAxisModel","RadiusAxis","AngleAxis","ordinalScale","ordinalExtent","tickCount","unitSpan","unitH","maxH","cache","lastAutoInterval","lastTickCount","polarDimensions","Polar","maxAngle","d2","polarModel","resizePolar","parsedRadius","updatePolarScale","isAngleAxisModel","setAxis","polarCreator","polarList","radiusAxisModel","angleAxisModel","getAxisLineShape","rExtent","getRadiusIdx","fixAngleOverlap","firstItem","lastItem","AngleAxisView","ticksAngles","minorTickAngles","angelAxisElementsBuilders","rId","r0Id","shapeType","lines","tickAngleItem","tickAngles","commonLabelModel","labelTextAlign","labelTextVerticalAlign","prevAngle","r1","RadiusAxisView","newAxisGroup","layoutAxis","prevRadius","getSeriesStackId","getAxisKey","barLayoutPolar","lastStackCoords","barWidthAndOffset","calRadialBar","stackId","columnLayoutInfo","columnOffset","columnWidth","barMinHeight","barMinAngle","clampLayout","valueAxisModel","valueAxisStart","baseValue","baseCoord","radiusSpan","angleSpan","barSeries","columnsMap","columnsOnAxis","stacks","barGap","barCategoryGap","coordSysName","categoryGap","barGapPercent","remainedWidth","autoWidthCount","autoWidth","column","stack","widthSum","lastColumn","angleAxisExtraOption","radiusAxisExtraOption","PolarView","directionMap","SingleAxisView","SingleAxisModel","SingleAxis","singleDimensions","Single","extentSum","singleModel","create","singles","singleCreator","XY","WH","SingleAxisPointer","getGlobalExtent","getPointDimIndex","SingleView","CalendarModel","mergeAndNormalizeLayoutParams","raw","cellSize","cellSizeArr","ignoreSize","hvIdx","CalendarView","calendarModel","rangeData","localeModel","itemRectStyleModel","sw","sh","firstDay","addPoints","date","rs","poyline","parsedDate","tmpD","aligns","yearLabel","xc","yc","posPoints","yearText","isCenter","vAlign","monthLabel","termPoints","firstDayPoints","monthText","isStart","dayLabel","firstDayOfWeek","dayOfWeekShort","day","weekText","PROXIMATE_ONE_DAY","Calendar","mStr","dStr","weeks","whNames","layoutParams","cellNumbers","cellSizeSpecified","whGlobal","calendarRect","dayInfo","week","nthWeek","nthX","nthY","normalizedRange","rangeStr","parsedRange","reversed","allDay","startDateNum","endDateNum","dateNum","nthDay","calendarList","calendar","calendarSeries","setKeyInfoToNewElOption","resultItem","newElOption","existElOption","newElParentOption","isSetLoc","isSet","mergeNewElOptionToExist","existList","newElOptCopy","$action","copyTransitionInfo","TRANSITION_PROPS_TO_COPY","ROOT_TRANSITION_PROPS_TO_COPY","setLayoutInfoToExist","existItem","existingGroupOpt","newGroupOpt","GraphicComponentModel","elements","newList","flattenedList","mappingResult","elOptionsToUpdate","optionList","parentOption","nonShapeGraphicElements","GraphicComponentView","graphicModel","elMap","rootGroup","globalZ","globalZLevel","elExisting","parentId","targetElParent","textContentOption","elOptionCleaned","getCleanedElOption","isMerge","isReplace","el_1","updateCommonAttrs","removeEl","el_2","textContentExisting","clipPathOption","clipPathType","newEl","setEventData","elOptions","apiWidth","apiHeight","isParentRoot","parentElInner","containerInfo","layoutPos","layouted","animatePos","existElParent","defaultZ","defaultZlevel","graphicOption","DATA_ZOOM_AXIS_DIMENSIONS","SERIES_COORDS","isCoordSupported","coordType","getAxisMainType","getAxisIndexPropName","getAxisIdPropName","findEffectedDataZooms","axisRecords","effectedModels","effectedModelMap","dataZoomModel","addToEffected","foundNewLink","processSingle","isLinked","dataZoom","markAxisControlled","isLink","axisIdxArr","collectReferCoordSysModelInfo","coordSysInfoWrap","coordSysUid","coordSysInfo","DataZoomAxisInfo","axisCmptIdx","DataZoomModel","inputRawOption","retrieveRawOption","settledOption","optionOrient","targetAxisIndexMap","hasAxisSpecified","refering","needAuto","setParallelAxis","gridModel_1","axModel","globalOption","rangePropMode","rangeModeInOption","percentSpecified","valueSpecified","firstAxisModel","axisProxy","firstProxy","axisDimList","proxy","SelectDataZoomModel","DataZoomView","SelectDataZoomView","AxisProxy","axisMainType","percentExtent","percentWindow","valueWindow","hasPropModeValue","boundPercent","boundValue","spans","restrictSet","fromWindow","toWindow","fromExtent","toExtent","toValue","suffix","calculateDataExtent","dataWindow","filterMode","seriesData","store_1","dataDimIndices_1","leftOut","rightOut","thisHasValue","thisLeftOut","thisRightOut","isInWindow","minMaxSpan","minMax","percentSpan","valueSpan","rawExtentInfo","rawExtentResult","dataZoomProcessor","eachAxisModel","proxyList","seriesModelMap","percentRange","valueRange","installDataZoomAction","installed","installCommon","SelectZoomModel","SelectZoomView","ToolboxFeature","features","registerFeature","ctor","getFeature","ToolboxModel","featureOpt","featureName","Feature","viewportSize","makeBackground","ToolboxView","toolboxModel","isVertical","featureOpts","featureNames","processFeature","oldName","featureModel","feature","isUserFeatureName","isToolboxFeature","createIconPaths","iconName","iconPaths","iconStyleModel","iconStyleEmphasisModel","icons","titles","iconsMap","titlesMap","iconStr","hoverStyle","defaultTextPosition","titleText","emphasisTextConfig","emphasisTextState","emphasisTextStyle","needPutOnTop","topOffset","SaveAsImage","title","browser","$a","evt","parts","base64Encoded","bstr","filename","u8arr","blob","cw","doc","lang","html","tab","INNER_STACK_KEYWORD","ICON_TYPES","TITLE_TYPES","radioTypes","MagicType","availableIcons","seriesOptGenreator","generateNewSeriesTypes","seriesId","newSeriesOpt","radio","newTitle","currentType","isStack","BLOCK_SPLITER","ITEM_SPLITER","groupSeries","seriesGroupByCategoryAxis","otherSeries","meta","assembleSeriesWithCategoryAxis","groups","tables","headers","columns","assembleOtherSeries","argLen","getContentFromModel","trim","isTSVFormat","block","firstLine","itemSplitRegex","parseTSVContents","tsv","tsvLines","header","parseListContents","seriesName","hasName","parseContents","blockMetaList","blocks","blockMeta","DataView","container","viewMain","textarea","optionToContent","contentToOption","htmlOrDom","buttonContainer","buttonStyle","closeButton","refreshButton","tryMergeDataOption","original","newValIsObject","shouldDeleteName","newSeriesOptList","push","newSnapshot","storedSnapshots","getStoreSnapshots","dataZoomId","snapshot","pop","clear","RestoreOption","INCLUDE_FINDER_MAIN_TYPES","BrushTargetManager","foundCpts","parseFinder","targetInfoBuilders","builder","coordRange","coordConvert","diffProcessor","rangeOffset","getScales","getDefaultBrushType","targetInfoList","areaPanelId","targetInfoMatchers","formatMinMax","xAxisModels","yAxisModels","gridModels","gridModelMap","xAxesHas","yAxesHas","panelRectBuilders","axisConvert","rangeOrCoordRange","xminymin","xmaxymax","xyMinMax","axisNameIndex","axisDiffProcessor","refer","scales","xyMinMaxCurr","xyMinMaxOrigin","sizeCurr","getSize","sizeOrigin","DATA_ZOOM_ID_BASE","DataZoomFeature","updateZoomBtnStatus","updateBackBtnStatus","brushTargetManager","makeAxisFinder","setBatch","findDataZoom","found","dzModel","has","batch","nextActive","dzFeatureModel","zoomActive","featureDataZoomPath","dzOptions","finderResult","buildInternalOptions","axisIndexPropName","newOpt","DataZoom","Restore","TooltipModel","shouldTooltipConfine","tooltipModel","confineOption","testStyle","styleProps","TRANSFORM_VENDOR","TRANSITION_VENDOR","toCSSVendorPrefix","styleVendor","styleProp","getComputedStyle","stl","CSS_TRANSITION_VENDOR","CSS_TRANSFORM_VENDOR","gCssText","mirrorPos","assembleArrow","arrowPosition","arrowPos","positionStyle","transformStyle","rotateDeg","rotateRadian","arrowWH","rotatedWH","borderStyle","styleCss","assembleTransition","onlyFade","transitionCurve","transitionOption","transitionText","assembleTransform","toString","is3d","translate","assembleFont","cssText","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","assembleCssText","enableTransition","transitionDuration","boxShadow","borderName","camelCase","makeStyleCoord","zrX","zrY","zrPainter","zrViewportRoot","viewportRootOffset","TooltipHTMLContent","appendTo","alwaysShowContent","nearPointColor","styleCoord","markers","arrow","arrowEl","enterable","transforms","ratioX","ratioY","time","TooltipRichContent","markupStyleCreator","bounding","shadowOuterSize","calcShadowOuterSize","mathMaxWith0","proxyRect","TooltipView","renderMode","tooltipContent","cmptRef","findComponentReference","pointInfo","tooltipCascadedModel","buildTooltipModel","seriesDispatcher_1","cmptDispatcher_1","singleTooltipModel","cbParamsList","articleMarkup","markupTextArrLegacy","itemCoordSys","axisItem","axisValue","axisValueLabel","axisSectionMarkup","cbParams","seriesTooltipResult","frag","valueFormatter","positionExpr","orderMode","builtMarkupText","blockBreak","allMarkupText","dispatcher","dataModel","positionDefault","tooltipTrigger","markupText","asyncTicket","isHTMLRenderMode","tooltipConfig","encodeHTMLContent","tooltipModelCascade","cmpt","subTooltipModel","defaultHtml","formatterParams","nearPoint","useUTC","params0","isTimeAxis","cbTicket","tooltipDataParams","contentSize","boxLayoutPosition","layoutRect","calcTooltipPosition","refixTooltipPosition","isCenterAlign","confineTooltipPosition","lastCoordSys","lastCbParamsList","contentNotChanged","lastItemCoordSys","indexCoordSys","lastDataByAxis","thisItemCoordSys","thisDataByAxis","indexAxis","thisItem","lastIndices","newIndices","lastIdxItem","newIdxItem","seriesIdx","lastCbParams","modelCascade","defaultTooltipOption","resultModel","gapH","gapV","domWidth","domHeight","rectWidth","rectHeight","queryOptionMap","componentMainType","queryResult","subEl","DEFAULT_TOOLBOX_BTNS","brushPreprocessor","isNew","brushComponents","brushComponentSpecifiedBtns","brushOpt","tbs","toolbox","toolboxFeature","toolboxBrush","brushTypes","removeDuplicate","arr","flag","hasKeys","createVisualMappings","stateList","supplementVisualOption","visualMappings","mappings","createMappings","visualData","mappingOption","Creater","replaceVisualOption","applyVisual","getValueState","visualTypesMap","getVisual","setVisual","eachItem","valueOrIndex","rawDataItem","valueState","incrementalApplyVisual","makeBrushCommonSelectorForSeries","selector","getLineSelectors","inLineRange","layoutRange","STATE_LIST","DISPATCH_METHOD","DISPATCH_FLAG","layoutCovers","brushModel","brushVisual","brushSelected","throttleType","throttleDelay","brushIndex","thisBrushSelected","brushLink","linkedSeriesMap","selectedDataIndexForLink","rangeInfoBySeries","hasBrushExists","boundingRectBuilders","selectableArea","linkOthers","brushed","rangeInfoList","stepAParallel","stepAOthers","brushModelNotControll","checkInRange","seriesBrushSelected","doDispatch","fn","seriesIndices","getBoundingRectFromMinMax","rg","BrushView","modelId","DEFAULT_OUT_OF_BRUSH_COLOR","BrushModel","inBrush","generateBrushOption","BrushFeature","brushMode","isBrushed","Brush","TitleModel","TitleView","titleModel","subtextStyleModel","subText","subTextEl","sublink","groupRect","layoutOption","alignStyle","TimelineModel","currentIndex","dataArr","processedDataArr","dimType","SliderTimelineModel","TimelineView","TimelineAxis","labelDataIndexStore","SliderTimelineView","timelineModel","layoutInfo_1","mainGroup_1","labelGroup","axis_1","labelPosOpt","parsedLabelPos","labelAlignMap","labelBaselineMap","rotationMap","mainLength","controlModel","showControl","controlSize","controlGap","sizePlusGap","playPosition","prevBtnPosition","nextBtnPosition","controlPosition","showPlayBtn","showPrevBtn","showNextBtn","xLeft","xRight","mainGroup","rotateOriginX","rotateOriginY","viewBound","getBound","mainBound","labelBound","mainPosition","labelsPosition","mainBoundIdx","toBound","setOrigin","targetGroup","boundIdx","createScaleByModel","newGroup","progressLine","ticks","tick","hoverStyleModel","progressStyleModel","symbolOpt","giveSymbol","hoverLabelModel","progressLabelModel","playState","makeBtn","onclick","willRotate","iconSize","btn","makeControlIcon","me","pointerMoveTo","nextState","mousePos","toCoord","targetDataIndex","vertex","axisCoord","tickSymbols","tickLabels","Ordinal","Time","objPath","noAnimation","installTimelineAction","timelinePreprocessor","timelineOpt","compatibleEC2","ec2Types","transferItem","controlStyle","itemStyleEmphasis","labelNormal","excludeLabelAttr","attr","checkMarkerInSeries","seriesOpts","markerType","seriesOptArr","fillLabel","MarkerModel","hostSeries","createdBySelf","markerOpt","markerModel","MarkPointModel","masterMarkerModel","hasXOrY","hasXAndY","markerTypeCalculatorWithExtent","otherDataDim","targetDataDim","otherCoordIndex","targetCoordIndex","coordArr","calcDataDim","numCalculate","coordArrValue","markerTypeCalculator","dataTransform","coordInfo","dataDimToCoordDim","dimItem","zoneFilter","item1","item2","createMarkerDimValueGetter","inCoordSys","valueDataDim","sum_1","count_1","MarkerView","markerGroupMap","drawGroup","seriesModelList","isBlur","updateMarkerLayout","mpData","xPx","yPx","MarkPointView","markPointModel","mpModel","symbolDrawMap","createData","coordDimsInfos","dataOpt","dimValueGetter","MarkLineModel","markLineTransform","mlModel","itemArray","mlType","valueIndex","mlFrom","mlTo","normalizedItem","isInfinity","ifMarkLineHasOnlyDim","fromCoord","otherDimIndex","markLineFilter","updateSingleMarkerEndLayout","isFrom","MarkLineView","markLineModel","mlData_1","fromData_1","toData_1","lineDrawMap","mlData","createList","fromData","toData","updateDataVisualAndLayout","optData","MarkAreaModel","markAreaTransform","maModel","item0","lt","rb","ltCoord","rbCoord","ifMarkAreaHasOnlyDim","markAreaFilter","getSingleMarkerEndPoint","pointValue0","pointValue1","clampPointValue0","clampPointValue1","pointValue","dimPermutations","MarkAreaView","markAreaModel","areaData_1","areaGroupMap","polygonGroup","areaData","xPointExtent","yPointExtent","overlapped","allClipped","coordDimsInfos_1","getDefaultSelectorOptions","LegendModel","legendData","hasSelected","potentialData","availableNames","isPotential","provider","legendNameMap","curry","LegendView","legendModel","isFirstRender","itemAlign","selectorPosition","positionInfo","mainRect","legendDrawnMap","selectMode","excludeSeriesId","legendItemModel","lineVisualStyle","legendIcon","dispatchSelectAction","dispatchHighlightAction","dispatchDownplayAction","colorArr","selectorGroup","selectorItem","emphasisLabelModel","itemVisualStyle","drawType","isSelected","iconRotate","legendIconType","getLegendStyle","getDefaultLegendIcon","hitRect","contentRect","contentPos","selectorRect","selectorPos","selectorButtonGap","orientIdx","hw","yx","handleCommonProps","visualStyle","propVal","iconBrushType","decalStyle","legendLineModel","visualHasBorder","symboType","isUseHoverLayer","legendFilter","legendSelectActionHandler","isToggleSelect","isItemSelected","installLegendAction","ScrollableLegendModel","scrollDataIndex","ScrollableLegendView","controllerGroup","pageIconSize","pageIconSizeArr","createPageButton","pageTextStyleModel","iconIdx","pageDataIndexName","processMaxSize","controllerRect","showController","containerPos","controllerPos","pageButtonGap","pageButtonPosition","pageInfo","canJump","pageText","pageFormatter","pageIndex","total","containerRectSize","targetItemIndex","targetItem","itemCount","pCount","targetItemInfo","getItemInfo","winStartItemInfo","winEndItemInfo","currItemInfo","intersect","itemRect","itemInfo","winStart","defaultIndex","legendDataIdx","installScrollableLegendAction","InsideZoomModel","setViewInfoToCoordSysRecord","getRange","coordSysRecord","dzInfo","disposeCoordSysRecordIfNeeded","coordSysRecordMap","coordSysKeyArr","dataZoomInfoMap","dzUid","disposeCoordSysRecord","createCoordSysRecord","containsPoint","mergeControllerParams","typePriority","preventDefaultMouseMove","dataZoomInfo","oneType","installDataZoomRoamProcessor","apiInner","dzReferCoordSysWrap","dzCoordSysInfo","firstDzInfo","firstDzKey","controllerParams","InsideZoomView","getRangeHandlers","coordSysMainType","lastRange","directionInfo","getDirectionInfo","percentPoint","makeMover","getPercentDelta","percentDelta","oldPoint","newPoint","SliderZoomModel","DEFAULT_LOCATION_EDGE_GAP","DEFAULT_FRAME_BORDER_WIDTH","DEFAULT_FILLER_SIZE","DEFAULT_MOVE_HANDLE_SIZE","HORIZONTAL","VERTICAL","LABEL_GAP","SHOW_DATA_SHADOW_SERIES_TYPE","REALTIME_ANIMATION_CONFIG","SliderZoomView","barGroup","showMoveHandle","moveHandleSize","coordRect","ecSize","location","targetAxisModel","sliderGroup","otherAxisInverse","brushSelect","clickPanel","oldSize","candlestickDim","polygonPts","polylinePts","otherDataExtent_1","otherOffset","otherShadowExtent_1","thisShadowExtent","areaPoints_1","linePoints_1","step_1","thisCoord_1","stride_1","lastIsEmpty_1","isEmpty","otherCoord","createDataShadowGroup","isSelectedArea","showDataShadow","thisAxis","getOtherDim","displayables","handles","handleLabels","filler","getCursor","bRect","handleColor","actualMoveZone","moveHandleHeight","moveHandle_1","moveHandleIcon","moveZoneExpandSize","viewExtent","viewExtend","nonRealtime","displaybles","handleInterval","handleHeight","dataShadowSegs","segIntervals","segGroup","labelTexts","dataInterval","orderedHandleEnds","setLabel","barTransform","textPoint","labelPrecision","valueStr","showOrHide","changed","realtime","localPoint","brushRect","brushShape","brushEndTime","brushStart","endPoint","coordSysInfoList","thisDim","visualDefault","eachVisual","isArray","linearMap","VisualMapModel","optionSeriesIndex","is","edgeSymbols","dataBound","isMinMax","textValue","toFixed","optDim","dimNames","completeSingle","completeInactive","completeController","stateExist","stateAbsent","optExist","optAbsent","defa","symbolExists","symbolSizeExists","inactiveColor","itemSymbol","defaultSymbol","max_1","getColorVisual","DEFAULT_BAR_BOUND","ContinuousModel","oVals","getColorStopValues","iVals","stops","setStop","iIdx","oIdx","iLen","oLen","first","stopsLen","stopValues","VisualMapView","targetValue","visualCluster","forceState","visualObj","defaultColor","visualMapping","paramsSet","getItemAlign","modelOption","realIndex","reals","fakeValue","layoutInput","rParam","makeHighDownBatch","HOVER_LINK_SIZE","HOVER_LINK_OUT","ContinuousView","dataRangeText","endsIndex","textGap","shapes","gradientBarGroup","createPolygon","textSize","onDrift","onDragEnd","handleThumb","cursor","handleLabel","handleLabelPoint","indicator","indicatorStyle","indicatorLabel","indicatorLabelPoint","useHoverLinkOnHandle","forSketch","outOfRangeHandleEnds","inRangeHandleEnds","visualInRange","visualOutOfRange","symbolSizes","barPoints","sampleNumber","currValue","handleThumbs","cursorValue","rangeSymbol","halfHoverLinkSize","oldIndicatorPos","indicatorNewProps","labelNewProps","cursorPos","hoverOnBar","getHalfHoverLinkSize","hoverRange","oldBatch","newBatch","resultBatches","currECData","global","hoverLinkDataSize","hoverLinkOnHandle","visualMapActionInfo","visualMapActionHander","visualMapEncodingHandlers","resetDefines","resultVisual","visualMapPreprocessor","pieces","PiecewiseModel","mode","resetMethods","visualTypesInPieces","exists","hasSel_1","pIdx","representValue","pieceInterval","curr","outPieceList","splitStep","normalizeReverse","pieceListItem","closeList","infinityList","useMinMax","lg","PiecewiseVisualMapView","textFill","viewData","endsText","showLabel","visualState","onHoverLink","viewPieceList","shapeParam","newKey","o","PiecewiseView","DEFAULT_OPTION","ariaVisual","ariaModel","setDecal","decalModel","useDecal","paletteScopeGroupByType_1","decalScope","paletteDecal","specifiedDecal","mergeDecal","dataAll_1","idxMap_1","decalScope_1","dataCount_1","resultDecal","labelLocale","seriesCnt","maxDataCnt","maxSeriesCnt","displaySeriesCnt","ariaLabel","getTitle","withTitle","replace","seriesLabels_1","seriesLabel","withName","getSeriesTypeName","partialLabel","middleSeparator_1","endSeparator_1","dataLabels","dataLabel","separatorModel","middleSeparator","endSeparator","keyValues","typeNames","ariaPreprocessor","aria","RELATIONAL_EXPRESSION_OP_ALIAS_MAP","RegExpEvaluator","rVal","condValue","lVal","ConstConditionInternal","AndConditionInternal","OrConditionInternal","NotConditionInternal","RelationalConditionInternal","needParse","getValue","tarValRaw","tarValParsed","parseOption","exprOption","getters","cond","isObjectNotArray","parseAndOrOption","parseNotOption","parseRelationalOption","op","subOptionArr","subOption","valueGetterParam","subCondList","exprKeys","parserName","valueParser","keyRaw","condValueRaw","condValueParsed","evaluator","ConditionalExpressionParsed","parseConditionalExpression","filterTransform","rawItem","condition","dimLoose","param","resultData","sampleLog","sortTransform","orderExprList","orderDefList","orderExpr","incomparable","errMsg_1","errMsg_2","sourceFormat","orderDef","val0","val1","DatasetModel","DatasetView","aroundEqual","pathToBezierCurves","bezierArrayGroups","currentSubpath","xi","yi","createNewSubpath","addLine","addArc","c1","s1","c2","s2","x4","y4","hx","hy","nextAngle","adpativeBezier","PIXEL_DISTANCE","PIXEL_DISTANCE_SQR","dx2","dy2","cp1LenSqr","cp2LenSqr","projLen1","projLen2","d1Sqr","d2Sqr","tmpSegX","tmpSegY","pathToPolygons","beziers","getDividingGrids","dimSize","rowDim","rowSize","columnSize","rowCount","columnCount","currentCount","remained","divideSector","outShapes","arcLen","deltaR","isAngleRow","newShape","divideRect","isHorizontalRow","rowSizeDim","columnSizeDim","columnDim","crossProduct2d","lineLineIntersect","a1x","a1y","a2x","a2y","b1x","b1y","b2x","b2y","mx","my","nmCrossProduct","b1a1x","b1a1y","projPtOnLine","lineA","lineB","dir2","addToPoly","splitPolygonByLine","intersections","intersectionPt","splitPt0","splitPt1","splitPt0Arr","splitPt1Arr","newPolyA","newPolyB","binaryDividePolygon","polygonShape","pt0","binaryDivideRecursive","divider","mid","sub","copyPathProps","polygonConvert","split","OutShapeCtor","polygonCount","totalArea_1","left","selfCount","subPath","alignSubpath","subpath1","subpath2","len1","len2","shorterPath","shorterLen","shorterBezierCount","eachCurveSubDivCount","newSubpath","actualSubDivCount","createSubpath","lastSubpathSubpath","otherSubpath","lastY","alignBezierCurves","array1","array2","lastSubpath1","lastSubpath2","newArray1","newArray2","newSubpath1","newSubpath2","centroid","signedArea","findBestRingOffset","fromSubBeziers","toSubBeziers","fromCp","toCp","bezierCount","bestScore","bestOffset","cursorOffset","reverse","newArr","findBestMorphingRotation","fromArr","toArr","searchAngleIteration","searchAngleRange","fromNeedsReverse","fromSubpathBezier","toSubpathBezier","newFromSubpathBezier","newToSubpathBezier","bestAngle","tmpArr","sa","ca","newX1","newY1","isCombineMorphing","isMorphing","SAVED_METHOD_PREFIX","saveAndModifyMethod","modifiers","savedMethodName","originalMethod","after","args","restoreMethod","applyTransformOnBeziers","bezierCurves","mm","subBeziers","prepareMorphPath","fromPath","toPath","fromPathProxy","toPathProxy","fromBezierCurves","toBezierCurves","fromPathTransform","toPathTransform","updateIdentityTransform","morphingData","onet","newCp","x0_1","y0_1","morphPath","oldDone","oldDuring","restoreToPath","hilbert","bits","sortPaths","pathList","cps","defaultDividePath","createEmptyReturn","combineMorph","fromList","fromPathList","addFromPath","separateCount","dividePath","toSubPathList","individualDelay","identityTransform","addToSubPathListToZr","toLen","animating_1","eachDone","indivdualAnimationOpts","separateMorph","toPathList","fromLen","isMultiple","prepareMorphBatches","one","many","batches","batchCount","moveFrom","pathDividers","approxOpacity","cloned","applyMorphAnimation","divideShape","animateOtherProps","updateAnimationCfg","animationDelay","morphOneBatch","fromIsMany","animateIndex","animateCount","forceManyOne","batchMany","batchOne","batchFrom","batchTo","individualAnimationCfg","separateAnimationCfg","fromIndividuals","toIndividuals","morphBatches","getPathList","pathList_1","DATA_COUNT_THRESHOLD","TRANSITION_NONE","TRANSITION_P2C","TRANSITION_C2P","getUniversalTransitionGlobalStore","getDimension","visualDimension","getValueByDimension","dimOrdinalMeta","getGroupId","dataGroupId","isChild","groupIdDim","groupId","property","flattenDataDiffItems","seriesInfo","fadeInElement","newSeries","computedTransform","stopAnimation","animateElementStyles","animationConfig","oldStyle","isAllIdSame","oldDiffItems","newDiffItems","oldItem","transitionBetween","oldList","updateMorphingPathProps","rawFrom","rawTo","hasMorphAnimation","oldGroupIds","oldChildGroupIds","newGroupId","newChildGroupId","createKeyGetter","isOld","onlyGetId","useId","isElementStillInChart","updateOneToOne","oldIndices","oldElsList","newElsList","newSeris","getSeriesTransitionKey","seriesKey","convertArraySeriesKeyToString","getDivideShapeFromData","findTransitionSeriesBatches","globalStore","updateBatches","oldDataMap","oldDataMapForSplit","oldDataGroupId","transitionKey","transitionKeyStr","checkTransitionSeriesKeyDuplicated","newDataGroupId","oldSeries_1","oldData_1","querySeries","transitionSeriesFromOpt","transitionOpt","installUniversalTransition","ecMOdel","transOpt","updateBatches_1","allSeries","savedSeries","savedDataGroupIds","savedData","pick","isFunction","isString","EChartsReactCore","prevProps","shouldSetOption","pickKeys","onEvents","onChartReady","echartsInstance","instance","events","_bindEvent","func","_c","lazyUpdate","showLoading","_d","loadingOption","echartInstance","newStyle","EChartsReact","_interopRequireDefault","exports","_defineProperty2","_react","ownKeys","_objectSpread","FixTabPanel","_ref","_default","_FixTabPanel","_echartsForReact","Echarts","module","equal","SizeSensorId","SensorClassName","SensorTabIndex","timer","_len","_key","_sensorPool","sensor","ver","_id","_sensors","_constant","Sensors","clean","sensorId","getSensor","newId","removeSensor","_object","_resizeObserver","createSensor","_debounce","whenDestroy","listeners","newSensor","resizeListener","listener","destroy","unbind","toPropertyKey","_defineProperty","_typeof","toPrimitive","extendStatics","__extends","__","__assign","__rest","__decorate","decorators","__param","paramIndex","decorator","__esDecorate","descriptorIn","contextIn","initializers","extraInitializers","accept","kind","descriptor","_","__runInitializers","thisArg","useValue","__propKey","__setFunctionName","__metadata","metadataKey","metadataValue","__awaiter","_arguments","P","generator","adopt","resolve","reject","fulfilled","rejected","__generator","body","verb","__createBinding","k2","__exportStar","__values","__read","ar","error","__spread","__spreadArrays","il","jl","__spreadArray","pack","__await","__asyncGenerator","q","awaitReturn","resume","settle","fulfill","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","__setModuleDefault","__importStar","mod","__importDefault","__classPrivateFieldGet","receiver","__classPrivateFieldSet","__classPrivateFieldIn","__addDisposableResource","async","dispose","_SuppressedError","suppressed","message","__disposeResources","fail","__rewriteRelativeImportExtension","preserveJsx","tsx","ext","cm"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/3971.ca5531f7a8430d763cc8.js.gz b/static/js/3971.ca5531f7a8430d763cc8.js.gz deleted file mode 100644 index 9c9971ec..00000000 Binary files a/static/js/3971.ca5531f7a8430d763cc8.js.gz and /dev/null differ diff --git a/static/js/runtime.5d63805f61b881890c73.js b/static/js/runtime.5d63805f61b881890c73.js deleted file mode 100644 index 8fe056bc..00000000 --- a/static/js/runtime.5d63805f61b881890c73.js +++ /dev/null @@ -1,4 +0,0 @@ -(function(){"use strict";var h={},v={};function f(e){var c=v[e];if(c!==void 0)return c.exports;var n=v[e]={id:e,loaded:!1,exports:{}};return h[e].call(n.exports,n,n.exports,f),n.loaded=!0,n.exports}f.m=h,function(){var e=[];f.O=function(c,n,a,o){if(n){o=o||0;for(var r=e.length;r>0&&e[r-1][2]>o;r--)e[r]=e[r-1];e[r]=[n,a,o];return}for(var t=1/0,r=0;r=o)&&Object.keys(f.O).every(function(p){return f.O[p](n[i])})?n.splice(i--,1):(b=!1,o0&&e[r-1][2]>o;r--)e[r]=e[r-1];e[r]=[n,a,o];return}for(var f=1/0,r=0;r=o)&&Object.keys(t.O).every(function(p){return t.O[p](n[i])})?n.splice(i--,1):(b=!1,o 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"static/js/\" + chunkId + \".\" + {\"200\":\"e3e111cfe298d5eb56cb\",\"236\":\"f126d042aa6ac961d533\",\"267\":\"e033a56ee5a8385435c3\",\"300\":\"ad5a2aaa97e1c172cdda\",\"346\":\"bb35e31f108081488d80\",\"406\":\"ece899a70bcc4a4e63f3\",\"990\":\"82788cb8d0110d73d5ac\",\"1274\":\"b72aa4b6772206596305\",\"1330\":\"2f6dab08a1474befc359\",\"1559\":\"a84828712c687c003e07\",\"2486\":\"e1929bb6ee5ce2aeae98\",\"2625\":\"a80a9a47b00be8c7e5cf\",\"3221\":\"813bcdf80b7bfe4c2e07\",\"3260\":\"215679a4c21e80c08cc0\",\"3473\":\"f9301ce4fe1c59b974aa\",\"3694\":\"c845dea794770be4060d\",\"3739\":\"fe33dcbf5f09e1384617\",\"3780\":\"73f4a658b6b841880230\",\"3961\":\"a1bf671cdf7efdc4e185\",\"3971\":\"ca5531f7a8430d763cc8\",\"4049\":\"ec5ea4835070b50517d2\",\"4419\":\"1fed618f51e44e613b8b\",\"4456\":\"22d76ae2c8dee6add840\",\"4598\":\"3768e669082844be1fff\",\"4616\":\"1fe22bf387bfcb042265\",\"5050\":\"27b86a75cb060f8fc3a0\",\"5420\":\"0427cf97d431e34b6780\",\"5730\":\"886c3934be796a850e74\",\"6006\":\"d13b6b75d64084d2b8d2\",\"6091\":\"e79d3a04e143021125f0\",\"6475\":\"ad999aa5a3116550a7e2\",\"6612\":\"7893659e9402c0b3b0b1\",\"6624\":\"7e1aa7088e724e4febe5\",\"7028\":\"d66c66b0bf15521d9bca\",\"7265\":\"57e86e1e56b45a8ae335\",\"7334\":\"988a351462c305f87fb4\",\"7589\":\"bcbe075af17352ba946f\",\"7645\":\"ef8a0a37ef67eeeea297\",\"7720\":\"a523887adfd621527067\",\"7879\":\"39473fbc163c0552d8e6\",\"8029\":\"c1ad6ed2291644ebedd0\",\"8287\":\"036b5e2790509a644082\",\"8618\":\"97589d1d5f2b7b36c25b\",\"9050\":\"de3516ac6ecc71dcbd07\",\"9473\":\"28e669be12bdbd0ebe33\",\"9571\":\"be87b78fcc83279945ff\",\"9645\":\"5edd90d79e39b862547a\",\"9676\":\"9f2c513e05378738e54e\",\"9885\":\"753e4d4b7b5564a32ab4\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","var inProgress = {};\nvar dataWebpackPrefix = \"pro-react-admin:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"./\";","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9121: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(9121 != chunkId) {\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpro_react_admin\"] = self[\"webpackChunkpro_react_admin\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;"],"names":["__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","module","__webpack_modules__","deferred","result","chunkIds","fn","priority","i","notFulfilled","fulfilled","j","key","r","getter","getProto","obj","leafPrototypes","value","mode","ns","def","current","exports","definition","chunkId","promises","prop","inProgress","dataWebpackPrefix","url","done","script","needAttach","scripts","s","onScriptComplete","prev","event","timeout","doneFns","installedChunks","installedChunkData","promise","resolve","reject","error","loadingEnded","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","id","chunkLoadingGlobal"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/runtime.ada603e2c6c246ec8553.js","mappings":"kCACIA,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,EAAU,CAEtC,IAAIC,EAAeH,EAAyBE,CAAQ,EACpD,GAAIC,IAAiB,OACpB,OAAOA,EAAa,QAGrB,IAAIC,EAASJ,EAAyBE,CAAQ,EAAI,CACjD,GAAIA,EACJ,OAAQ,GACR,QAAS,CAAC,CACX,EAGA,OAAAG,EAAoBH,CAAQ,EAAE,KAAKE,EAAO,QAASA,EAAQA,EAAO,QAASH,CAAmB,EAG9FG,EAAO,OAAS,GAGTA,EAAO,OACf,CAGAH,EAAoB,EAAII,E,WC5BxB,IAAIC,EAAW,CAAC,EAChBL,EAAoB,EAAI,SAASM,EAAQC,EAAUC,EAAIC,EAAU,CAChE,GAAGF,EAAU,CACZE,EAAWA,GAAY,EACvB,QAAQC,EAAIL,EAAS,OAAQK,EAAI,GAAKL,EAASK,EAAI,CAAC,EAAE,CAAC,EAAID,EAAUC,IAAKL,EAASK,CAAC,EAAIL,EAASK,EAAI,CAAC,EACtGL,EAASK,CAAC,EAAI,CAACH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A3B,EAAoB,EAAE,EAAI,SAAS2B,EAAS,CAAE,OAAOgB,EAAgBhB,CAAO,IAAM,CAAG,EAGrF,IAAIyB,EAAuB,SAASC,EAA4BC,EAAM,CACrE,IAAI/C,EAAW+C,EAAK,CAAC,EACjBC,EAAcD,EAAK,CAAC,EACpBE,EAAUF,EAAK,CAAC,EAGhBrD,EAAU0B,EAASjB,EAAI,EAC3B,GAAGH,EAAS,KAAK,SAASkD,EAAI,CAAE,OAAOd,EAAgBc,CAAE,IAAM,CAAG,CAAC,EAAG,CACrE,IAAIxD,KAAYsD,EACZvD,EAAoB,EAAEuD,EAAatD,CAAQ,IAC7CD,EAAoB,EAAEC,CAAQ,EAAIsD,EAAYtD,CAAQ,GAGxD,GAAGuD,EAAS,IAAIlD,EAASkD,EAAQxD,CAAmB,CACrD,CAEA,IADGqD,GAA4BA,EAA2BC,CAAI,EACzD5C,EAAIH,EAAS,OAAQG,IACzBiB,EAAUpB,EAASG,CAAC,EACjBV,EAAoB,EAAE2C,EAAiBhB,CAAO,GAAKgB,EAAgBhB,CAAO,GAC5EgB,EAAgBhB,CAAO,EAAE,CAAC,EAAE,EAE7BgB,EAAgBhB,CAAO,EAAI,EAE5B,OAAO3B,EAAoB,EAAEM,CAAM,CACpC,EAEIoD,EAAqB,KAAK,4BAAiC,KAAK,6BAAkC,CAAC,EACvGA,EAAmB,QAAQN,EAAqB,KAAK,KAAM,CAAC,CAAC,EAC7DM,EAAmB,KAAON,EAAqB,KAAK,KAAMM,EAAmB,KAAK,KAAKA,CAAkB,CAAC,C,eCvF1G1D,EAAoB,GAAK,M","sources":["webpack://pro-react-admin/webpack/bootstrap","webpack://pro-react-admin/webpack/runtime/chunk loaded","webpack://pro-react-admin/webpack/runtime/compat get default export","webpack://pro-react-admin/webpack/runtime/create fake namespace object","webpack://pro-react-admin/webpack/runtime/define property getters","webpack://pro-react-admin/webpack/runtime/ensure chunk","webpack://pro-react-admin/webpack/runtime/get javascript chunk filename","webpack://pro-react-admin/webpack/runtime/get mini-css chunk filename","webpack://pro-react-admin/webpack/runtime/global","webpack://pro-react-admin/webpack/runtime/hasOwnProperty shorthand","webpack://pro-react-admin/webpack/runtime/load script","webpack://pro-react-admin/webpack/runtime/make namespace object","webpack://pro-react-admin/webpack/runtime/node module decorator","webpack://pro-react-admin/webpack/runtime/publicPath","webpack://pro-react-admin/webpack/runtime/jsonp chunk loading","webpack://pro-react-admin/webpack/runtime/nonce"],"sourcesContent":["// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"static/js/\" + chunkId + \".\" + {\"200\":\"e3e111cfe298d5eb56cb\",\"236\":\"f126d042aa6ac961d533\",\"267\":\"e033a56ee5a8385435c3\",\"300\":\"ad5a2aaa97e1c172cdda\",\"346\":\"bb35e31f108081488d80\",\"406\":\"ece899a70bcc4a4e63f3\",\"990\":\"82788cb8d0110d73d5ac\",\"1274\":\"b72aa4b6772206596305\",\"1330\":\"2f6dab08a1474befc359\",\"1559\":\"a84828712c687c003e07\",\"2486\":\"e1929bb6ee5ce2aeae98\",\"2625\":\"a80a9a47b00be8c7e5cf\",\"3221\":\"813bcdf80b7bfe4c2e07\",\"3260\":\"215679a4c21e80c08cc0\",\"3473\":\"f9301ce4fe1c59b974aa\",\"3694\":\"c845dea794770be4060d\",\"3739\":\"fe33dcbf5f09e1384617\",\"3780\":\"73f4a658b6b841880230\",\"3961\":\"a1bf671cdf7efdc4e185\",\"3971\":\"20c5a168732a0363e328\",\"4049\":\"ec5ea4835070b50517d2\",\"4419\":\"1fed618f51e44e613b8b\",\"4456\":\"22d76ae2c8dee6add840\",\"4598\":\"3768e669082844be1fff\",\"4616\":\"1fe22bf387bfcb042265\",\"5050\":\"27b86a75cb060f8fc3a0\",\"5420\":\"0427cf97d431e34b6780\",\"5730\":\"886c3934be796a850e74\",\"6006\":\"d13b6b75d64084d2b8d2\",\"6091\":\"e79d3a04e143021125f0\",\"6475\":\"ad999aa5a3116550a7e2\",\"6612\":\"7893659e9402c0b3b0b1\",\"6624\":\"7e1aa7088e724e4febe5\",\"7028\":\"d66c66b0bf15521d9bca\",\"7265\":\"57e86e1e56b45a8ae335\",\"7334\":\"988a351462c305f87fb4\",\"7589\":\"bcbe075af17352ba946f\",\"7645\":\"ef8a0a37ef67eeeea297\",\"7720\":\"a523887adfd621527067\",\"7879\":\"39473fbc163c0552d8e6\",\"8029\":\"c1ad6ed2291644ebedd0\",\"8287\":\"036b5e2790509a644082\",\"8618\":\"97589d1d5f2b7b36c25b\",\"9050\":\"de3516ac6ecc71dcbd07\",\"9473\":\"28e669be12bdbd0ebe33\",\"9571\":\"be87b78fcc83279945ff\",\"9645\":\"5edd90d79e39b862547a\",\"9676\":\"9f2c513e05378738e54e\",\"9885\":\"753e4d4b7b5564a32ab4\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","var inProgress = {};\nvar dataWebpackPrefix = \"pro-react-admin:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"./\";","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9121: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(9121 != chunkId) {\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpro_react_admin\"] = self[\"webpackChunkpro_react_admin\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;"],"names":["__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","module","__webpack_modules__","deferred","result","chunkIds","fn","priority","i","notFulfilled","fulfilled","j","key","r","getter","getProto","obj","leafPrototypes","value","mode","ns","def","current","exports","definition","chunkId","promises","prop","inProgress","dataWebpackPrefix","url","done","script","needAttach","scripts","s","onScriptComplete","prev","event","timeout","doneFns","installedChunks","installedChunkData","promise","resolve","reject","error","loadingEnded","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","id","chunkLoadingGlobal"],"sourceRoot":""} \ No newline at end of file