@nocobase/portal-template-default 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{LineDraw-iG-ADes-.js → LineDraw-vPRTWiQ5.js} +1 -1
- package/dist/assets/{SymbolDraw-DXoSw1tM.js → SymbolDraw-DOl_Tss3.js} +1 -1
- package/dist/assets/{VisualMapping-C_ee4Eht.js → VisualMapping-j08W3KBm.js} +1 -1
- package/dist/assets/{auth-method-demo-DaOCuvsq.js → auth-method-demo-B2qcpY8z.js} +1 -1
- package/dist/assets/auto-login-provider-BMtzvdxG.js +1 -0
- package/dist/assets/{auto-login-provider-5Uxza9Ms.js → auto-login-provider-Bukw7zEe.js} +2 -2
- package/dist/assets/auto-redirect-provider-C6GNPg5r.js +1 -0
- package/dist/assets/auto-redirect-provider-D5c6kN2R.js +1 -0
- package/dist/assets/{auto-redirect-provider-CfwRvYOI.js → auto-redirect-provider-iTzGEDpU.js} +1 -1
- package/dist/assets/{calendar-DjDRfD5t.js → calendar-Dv2RNnsr.js} +1 -1
- package/dist/assets/{card-DuQBOS6A.js → card-C9Hpeq1c.js} +1 -1
- package/dist/assets/{cas-sign-in-button-CyqG1QME.js → cas-sign-in-button-BQn3Mttx.js} +1 -1
- package/dist/assets/{components-D-ptYjX_.js → components-BT5mL9gW.js} +1 -1
- package/dist/assets/{configuration-gate-C08mkkiX.js → configuration-gate-BJoadoA6.js} +1 -1
- package/dist/assets/{createClipPathFromCoordSys-wj34-b1B.js → createClipPathFromCoordSys-m8IbnJ1z.js} +1 -1
- package/dist/assets/createSeriesDataSimply-DKUV5b5e.js +1 -0
- package/dist/assets/{customGraphicKeyframeAnimation-DWrhrHL_.js → customGraphicKeyframeAnimation-CYLPurwK.js} +1 -1
- package/dist/assets/{demo-DkIhyiRK.js → demo-BWGOwqtJ.js} +1 -1
- package/dist/assets/{demo-D4OiKplc.js → demo-BWbcvkya.js} +1 -1
- package/dist/assets/{demo-BYWHeKUe.js → demo-DIASSPgn.js} +1 -1
- package/dist/assets/{demo-DBueJg0m.js → demo-DuZ6asUU.js} +1 -1
- package/dist/assets/{demo-CPWoNtx8.js → demo-Dxcy4bDE.js} +1 -1
- package/dist/assets/{demo-CyvJk5zV.js → demo-YpEC76uw.js} +1 -1
- package/dist/assets/{demo-tpTjO0sC.js → demo-wzkoR8T2.js} +1 -1
- package/dist/assets/{dingtalk-sign-in-button-DSWsSruv.js → dingtalk-sign-in-button-DSluFaP9.js} +1 -1
- package/dist/assets/{echarts-preview-DxHNfq1C.js → echarts-preview-mRXoEciY.js} +1 -1
- package/dist/assets/{echarts-runtime-D8kXn6ME.js → echarts-runtime-CvLr4Slh.js} +3 -3
- package/dist/assets/{echarts-runtime-advanced-QY8v95qK.js → echarts-runtime-advanced-BC1tvfQ0.js} +1 -1
- package/dist/assets/{echarts-runtime-common-D-yqAK-r.js → echarts-runtime-common-DhNaV5B8.js} +1 -1
- package/dist/assets/{echarts-runtime-components-P4-i8jPU.js → echarts-runtime-components-BiioS8t1.js} +1 -1
- package/dist/assets/{echarts-runtime-hierarchy-ByQZ-DbP.js → echarts-runtime-hierarchy-CAWqYvFh.js} +1 -1
- package/dist/assets/{floating-BFVEyPEp.js → floating-RVbHvIiD.js} +1 -1
- package/dist/assets/{index-um5hdKdZ.js → index-BysibBZu.js} +1 -1
- package/dist/assets/{index-CwNxd66J.js → index-C-tdHirk.js} +1 -1
- package/dist/assets/{index-gFtCXH3o.js → index-CBZbj45X.js} +1 -1
- package/dist/assets/index-CgkdZ6Oc.js +686 -0
- package/dist/assets/{index-Btk35Nx-.js → index-Dw20Lzpp.js} +3 -3
- package/dist/assets/{index-BgCbGDMc.js → index-hSBzW-VA.js} +1 -1
- package/dist/assets/{labelHelper-DQqRy3a_.js → labelHelper-DbITmOUW.js} +1 -1
- package/dist/assets/{ldap-sign-in-form--6Gt3yGq.js → ldap-sign-in-form-BOMNDTkK.js} +1 -1
- package/dist/assets/{oidc-sign-in-button-CQdRcR_p.js → oidc-sign-in-button-Cgpa8Qzj.js} +1 -1
- package/dist/assets/{page-context-CnQ4GYM7.js → page-context-AU6RU0Qi.js} +4 -4
- package/dist/assets/prompt-card-FWugRgi-.js +1 -0
- package/dist/assets/{prompt-output-DZHRM2ft.js → prompt-output-DMTuTNab.js} +1 -1
- package/dist/assets/{saml-sign-in-button-BHL5a0JV.js → saml-sign-in-button-qt8bMeoQ.js} +1 -1
- package/dist/assets/{sectorHelper-DN_Vv6OL.js → sectorHelper-C6L782Ue.js} +1 -1
- package/dist/assets/shortcut-Bu7jT_-w.js +47 -0
- package/dist/assets/{sms-sign-in-form-DTX9GV2I.js → sms-sign-in-form-Bo2WLZuP.js} +1 -1
- package/dist/assets/{static.browser-jI1psK0d.js → static.browser-CoPxsICt.js} +8 -8
- package/dist/assets/switch-DQkkIE7G.js +1 -0
- package/dist/assets/{tool-cards-DFttLAfo.js → tool-cards-ipgJ_3Ec.js} +1 -1
- package/dist/assets/{use-authenticator-sign-in-CRGjzXju.js → use-authenticator-sign-in-BzFeh7qe.js} +1 -1
- package/dist/assets/{use-dingtalk-sign-in-8WYzJ2jf.js → use-dingtalk-sign-in-mrq6K5Yx.js} +1 -1
- package/dist/assets/{use-wecom-sign-in-C9j8wfCD.js → use-wecom-sign-in-PPIMLvGa.js} +1 -1
- package/dist/assets/wecom-sign-in-button-rUq9RW8R.js +1 -0
- package/dist/index.html +1 -1
- package/dist/index.raw.html +1 -1
- package/package.json +1 -1
- package/scripts/build-html.mjs +59 -2
- package/src/components/auth/sign-up-form.tsx +287 -59
- package/src/components/auth/types.ts +23 -1
- package/dist/assets/auto-login-provider-DyaPGK2D.js +0 -1
- package/dist/assets/auto-redirect-provider-Cr3jmYts.js +0 -1
- package/dist/assets/auto-redirect-provider-QkJQRBbG.js +0 -1
- package/dist/assets/createSeriesDataSimply-D0A6SAVQ.js +0 -1
- package/dist/assets/index-MB-jfQld.js +0 -686
- package/dist/assets/prompt-card-B2RS4nt2.js +0 -1
- package/dist/assets/shortcut-C5x5LQWU.js +0 -47
- package/dist/assets/switch-CRL8PmRI.js +0 -1
- package/dist/assets/wecom-sign-in-button-mIS1zGSU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as T,cL as Gr,cM as La,cN as Wr,cO as Fe,cP as Fr,cj as Zr,b5 as Se,cz as lt,bR as Mt,be as $r,bQ as J,c6 as ke,a1 as ne,bO as Yr,bV as tt,cQ as ka,aC as et,y as M,cR as Ze,cy as be,cx as Kr,a4 as R,H as k,m as P,aL as z,cS as It,M as Ur,bT as U,k as F,bx as ot,a9 as Lt,aX as Xr,Z as O,b3 as Z,l as j,a2 as qr,bS as Pa,G as Y,cC as jr,ai as Ra,bh as kt,i as Qr,X as ct,cT as Jr,cG as _e,T as N,bU as rt,aj as st,cU as za,cV as Va,cW as Ea,aB as Pt,cX as Oa,cY as Ba,cZ as Na,c_ as ta,c$ as Ha,d0 as ea,R as ut,aw as ra,D as q,d1 as Ga,o as G,N as B,d2 as $e,d3 as Wa,d4 as Fa,bN as vt,d5 as Za,a_ as At,aW as _t,cs as $a,b0 as aa,a3 as wt,x as ia,d6 as Ya,c8 as Me,ab as ft,bc as Ka,aV as Ua,al as na,cc as Xa,a$ as oa,d7 as sa,d8 as la,d9 as mt,W as Pe,da as Bt,db as qa,cv as Re,cB as ja,f as C,dc as Qa,aY as Ye,dd as Ja,de as ti,at as ht,E as Rt,df as ze,aN as Ae,dg as Kt,aq as we,a5 as X,bW as ei,dh as ri,di as ai,a as dt,ae as ii,af as ni,dj as oi,dk as si,aH as li,dl as Qt,dm as ui,dn as hi,dp as ci,dq as oe,dr as vi,b as pi,bg as Ke,aK as Jt,r as fi,u as di,s as gi,t as yi,c4 as mi,ds as te,dt as ua,du as ha,cA as se,dv as ca,cw as xi,aA as $,dw as Si,dx as bi,dy as Ut,dz as va,bL as Tt,au as _i,dA as Mi,b9 as Ai,L as wi,dB as Ti,cu as Di,dC as Ue,dD as Ci}from"./echarts-runtime-D8kXn6ME.js";import{V as E,i as Ii}from"./VisualMapping-C_ee4Eht.js";import{L as Li,R as ki}from"./LineDraw-iG-ADes-.js";import{f as Pi,h as Ri,s as zi,d as le,u as Vi,e as Xe,j as Ei,b as Oi,i as Bi,a as Ni}from"./customGraphicKeyframeAnimation-DWrhrHL_.js";import{i as Ve}from"./CoordinateSystem-C8P-Cleg.js";import{S as Hi}from"./SymbolDraw-DXoSw1tM.js";import"./index-MB-jfQld.js";import"./labelHelper-DQqRy3a_.js";var Gi=(function(i){T(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,a,n,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),c=s.dataToCoord(r),v=n.get("type");if(v&&v!=="none"){var p=Gr(n),f=Fi[v](s,l,c,h);f.style=p,t.graphicKey=f.type,t.pointer=f}var d=n.get(["label","margin"]),g=Wi(r,a,n,l,d);La(t,a,n,o,g)},e})(Wr);function Wi(i,e,t,r,a){var n=e.axis,o=n.dataToCoord(i),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,h,c;if(n.dim==="radius"){var v=$r();Zr(v,v,s),Se(v,v,[r.cx,r.cy]),u=lt([o,-a],v);var p=e.getModel("axisLabel").get("rotate")||0,f=Mt.innerTextLayout(s,p*Math.PI/180,-1);h=f.textAlign,c=f.textVerticalAlign}else{var d=l[1];u=r.coordToPoint([d+a,o]);var g=r.cx,y=r.cy;h=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:h,verticalAlign:c}}var Fi={line:function(i,e,t,r){return i.dim==="angle"?{type:"Line",shape:Fr(e.coordToPoint([r[0],t]),e.coordToPoint([r[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(i,e,t,r){var a=Math.max(1,i.getBandWidth()),n=Math.PI/180;return i.dim==="angle"?{type:"Sector",shape:Fe(e.cx,e.cy,r[0],r[1],(-t-a/2)*n,(-t+a/2)*n)}:{type:"Sector",shape:Fe(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},Zi=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var r,a=this.ecModel;return a.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})(J),Ee=(function(i){T(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ke).models[0]},e.type="polarAxis",e})(J);ne(Ee,Yr);var $i=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(Ee),Yi=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(Ee),Oe=(function(i){T(e,i);function e(t,r){return i.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})(tt);Oe.prototype.dataToRadius=tt.prototype.dataToCoord;Oe.prototype.radiusToData=tt.prototype.coordToData;var Ki=et(),Be=(function(i){T(e,i);function e(t,r){return i.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(),a=t.scale,n=a.getExtent(),o=a.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=ka(s==null?"":s+"",r.getFont(),"center","top"),c=Math.max(h.height,7),v=c/u;isNaN(v)&&(v=1/0);var p=Math.max(0,Math.floor(v)),f=Ki(t.model),d=f.lastAutoInterval,g=f.lastTickCount;return d!=null&&g!=null&&Math.abs(d-p)<=1&&Math.abs(g-o)<=1&&d>p?p=d:(f.lastTickCount=o,f.lastAutoInterval=p),p},e})(tt);Be.prototype.dataToAngle=tt.prototype.dataToCoord;Be.prototype.angleToData=tt.prototype.coordToData;var pa=["radius","angle"],Ui=(function(){function i(e){this.dimensions=pa,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Oe,this._angleAxis=new Be,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return i.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},i.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},i.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},i.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},i.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,a=this._radiusAxis;return r.scale.type===e&&t.push(r),a.scale.type===e&&t.push(a),t},i.prototype.getAngleAxis=function(){return this._angleAxis},i.prototype.getRadiusAxis=function(){return this._radiusAxis},i.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},i.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},i.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},i.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},i.prototype.pointToData=function(e,t){var r=this.pointToCoord(e);return[this._radiusAxis.radiusToData(r[0],t),this._angleAxis.angleToData(r[1],t)]},i.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,a=this.getAngleAxis(),n=a.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);a.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=u<o?1:-1;u<o||u>s;)u+=h*360;return[l,u]},i.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,a=Math.cos(r)*t+this.cx,n=-Math.sin(r)*t+this.cy;return[a,n]},i.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var a=e.getExtent(),n=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-a[0]*n,endAngle:-a[1]*n,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,h=l-this.cy,c=u*u+h*h,v=this.r,p=this.r0;return v!==p&&c-o<=v*v&&c+o>=p*p}}},i.prototype.convertToPixel=function(e,t,r){var a=qe(t);return a===this?this.dataToPoint(r):null},i.prototype.convertFromPixel=function(e,t,r){var a=qe(t);return a===this?this.pointToData(r):null},i})();function qe(i){var e=i.seriesModel,t=i.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Xi(i,e,t){var r=e.get("center"),a=t.getWidth(),n=t.getHeight();i.cx=R(r[0],a),i.cy=R(r[1],n);var o=i.getRadiusAxis(),s=Math.min(a,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:k(l)||(l=[0,l]);var u=[R(l[0],s),R(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function qi(i,e){var t=this,r=t.getAngleAxis(),a=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),i.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();M(Ze(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),M(Ze(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),be(r.scale,r.model),be(a.scale,a.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 ji(i){return i.mainType==="angleAxis"}function je(i,e){var t;if(i.type=e.get("type"),i.scale=Kr(e),i.onBand=e.get("boundaryGap")&&i.type==="category",i.inverse=e.get("inverse"),ji(e)){i.inverse=i.inverse!==e.get("clockwise");var r=e.get("startAngle"),a=(t=e.get("endAngle"))!==null&&t!==void 0?t:r+(i.inverse?-360:360);i.setExtent(r,a)}e.axis=i,i.model=e}var Qi={dimensions:pa,create:function(i,e){var t=[];return i.eachComponent("polar",function(r,a){var n=new Ui(a+"");n.update=qi;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");je(o,l),je(s,u),Xi(n,r,e),t.push(n),r.coordinateSystem=n,n.model=r}),i.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var a=r.getReferringComponents("polar",ke).models[0];r.coordinateSystem=a.coordinateSystem}}),t}},Ji=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Nt(i,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=i.coordToPoint([e[0],t]),a=i.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:a[0],y2:a[1]}}function Ht(i){var e=i.getRadiusAxis();return e.inverse?0:1}function Qe(i){var e=i[0],t=i[i.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&i.pop()}var tn=(function(i){T(e,i);function e(){var t=i!==null&&i.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 a=t.axis,n=a.polar,o=n.getRadiusAxis().getExtent(),s=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=P(a.getViewLabels(),function(h){h=z(h);var c=a.scale,v=c.type==="ordinal"?c.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=a.dataToCoord(v),h});Qe(u),Qe(s),M(Ji,function(h){t.get([h,"show"])&&(!a.scale.isBlank()||h==="axisLine")&&en[h](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e})(It),en={axisLine:function(i,e,t,r,a,n){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=Ht(t),c=h?0:1,v,p=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[c]===0?v=new qr[p]({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}):v=new Pa({shape:{cx:t.cx,cy:t.cy,r:n[h],r0:n[c]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,i.add(v)},axisTick:function(i,e,t,r,a,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[Ht(t)],u=P(r,function(h){return new ot({shape:Nt(t,[l,l+s],h.coord)})});i.add(U(u,{style:F(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(i,e,t,r,a,n){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[Ht(t)],h=[],c=0;c<a.length;c++)for(var v=0;v<a[c].length;v++)h.push(new ot({shape:Nt(t,[u,u+l],a[c][v].coord)}));i.add(U(h,{style:F(s.getModel("lineStyle").getLineStyle(),F(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(i,e,t,r,a,n,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),h=e.get("triggerEvent");M(o,function(c,v){var p=l,f=c.tickValue,d=n[Ht(t)],g=t.coordToPoint([d+u,c.coord]),y=t.cx,S=t.cy,b=Math.abs(g[0]-y)/d<.3?"center":g[0]>y?"left":"right",m=Math.abs(g[1]-S)/d<.3?"middle":g[1]>S?"top":"bottom";if(s&&s[f]){var x=s[f];Lt(x)&&x.textStyle&&(p=new Xr(x.textStyle,l,l.ecModel))}var _=new O({silent:Mt.isLabelSilent(e),style:Z(p,{x:g[0],y:g[1],fill:p.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:b,verticalAlign:m})});if(i.add(_),h){var A=Mt.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=c.rawLabel,j(_).eventData=A}},this)},splitLine:function(i,e,t,r,a,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=[],c=0;c<r.length;c++){var v=u++%l.length;h[v]=h[v]||[],h[v].push(new ot({shape:Nt(t,n,r[c].coord)}))}for(var c=0;c<h.length;c++)i.add(U(h[c],{style:F({stroke:l[c%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(i,e,t,r,a,n){if(a.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var h=0;h<a[u].length;h++)l.push(new ot({shape:Nt(t,n,a[u][h].coord)}));i.add(U(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(i,e,t,r,a,n){if(r.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=Math.PI/180,v=-r[0].coord*c,p=Math.min(n[0],n[1]),f=Math.max(n[0],n[1]),d=e.get("clockwise"),g=1,y=r.length;g<=y;g++){var S=g===y?r[0].coord:r[g].coord,b=u++%l.length;h[b]=h[b]||[],h[b].push(new Ur({shape:{cx:t.cx,cy:t.cy,r0:p,r:f,startAngle:v,endAngle:-S*c,clockwise:d},silent:!0})),v=-S*c}for(var g=0;g<h.length;g++)i.add(U(h[g],{style:F({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},rn=["axisLine","axisTickLabel","axisName"],an=["splitLine","splitArea","minorSplitLine"],nn=(function(i){T(e,i);function e(){var t=i!==null&&i.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 a=this._axisGroup,n=this._axisGroup=new Y;this.group.add(n);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),h=o.getMinorTicksCoords(),c=l.getExtent()[0],v=o.getExtent(),p=sn(s,t,c),f=new Mt(t,p);M(rn,f.add,f),n.add(f.getGroup()),jr(a,n,t),M(an,function(d){t.get([d,"show"])&&!o.scale.isBlank()&&on[d](this.group,t,s,c,v,u,h)},this)}},e.type="radiusAxis",e})(It),on={splitLine:function(i,e,t,r,a,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,h=t.getAngleAxis(),c=Math.PI/180,v=h.getExtent(),p=Math.abs(v[1]-v[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var f=[],d=0;d<n.length;d++){var g=u++%l.length;f[g]=f[g]||[],f[g].push(new qr[p]({shape:{cx:t.cx,cy:t.cy,r:Math.max(n[d].coord,0),startAngle:-v[0]*c,endAngle:-v[1]*c,clockwise:h.inverse}}))}for(var d=0;d<f.length;d++)i.add(U(f[d],{style:F({stroke:l[d%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(i,e,t,r,a,n,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++)u.push(new Ra({shape:{cx:t.cx,cy:t.cy,r:o[h][c].coord}}));i.add(U(u,{style:F({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(i,e,t,r,a,n){if(n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=n[0].coord,v=1;v<n.length;v++){var p=u++%l.length;h[p]=h[p]||[],h[p].push(new Ur({shape:{cx:t.cx,cy:t.cy,r0:c,r:n[v].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),c=n[v].coord}for(var v=0;v<h.length;v++)i.add(U(h[v],{style:F({fill:l[v%l.length]},s.getAreaStyle()),silent:!0}))}}};function sn(i,e,t){return{position:[i.cx,i.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function fa(i){return i.get("stack")||"__ec_stack_"+i.seriesIndex}function da(i,e){return e.dim+i.model.componentIndex}function ln(i,e,t){var r={},a=un(kt(e.getSeriesByType(i),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(i,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=da(s,l),h=fa(n),c=a[u][h],v=c.offset,p=c.width,f=s.getOtherAxis(l),d=n.coordinateSystem.cx,g=n.coordinateSystem.cy,y=n.get("barMinHeight")||0,S=n.get("barMinAngle")||0;r[h]=r[h]||[];for(var b=o.mapDimension(f.dim),m=o.mapDimension(l.dim),x=Qr(o,b),_=l.dim!=="radius"||!n.get("roundCap",!0),A=f.model,D=A.get("startValue"),w=f.dataToCoord(D||0),I=0,L=o.count();I<L;I++){var H=o.get(b,I),V=o.get(m,I),at=H>=0?"p":"n",it=w;x&&(r[h][V]||(r[h][V]={p:w,n:w}),it=r[h][V][at]);var zt=void 0,Vt=void 0,gt=void 0,yt=void 0;if(f.dim==="radius"){var Et=f.dataToCoord(H)-w,Ca=l.dataToCoord(V);Math.abs(Et)<y&&(Et=(Et<0?-1:1)*y),zt=it,Vt=it+Et,gt=Ca-v,yt=gt-p,x&&(r[h][V][at]=Vt)}else{var Ot=f.dataToCoord(H,_)-w,Ia=l.dataToCoord(V);Math.abs(Ot)<S&&(Ot=(Ot<0?-1:1)*S),zt=Ia+v,Vt=zt+p,gt=it,yt=it+Ot,x&&(r[h][V][at]=yt)}o.setItemLayout(I,{cx:d,cy:g,r0:zt,r:Vt,startAngle:-gt*Math.PI/180,endAngle:-yt*Math.PI/180,clockwise:gt>=yt})}}})}function un(i){var e={};M(i,function(r,a){var n=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=da(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),c=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;e[l]=c;var p=fa(r);v[p]||c.autoWidthCount++,v[p]=v[p]||{width:0,maxWidth:0};var f=R(r.get("barWidth"),h),d=R(r.get("barMaxWidth"),h),g=r.get("barGap"),y=r.get("barCategoryGap");f&&!v[p].width&&(f=Math.min(c.remainedWidth,f),v[p].width=f,c.remainedWidth-=f),d&&(v[p].maxWidth=d),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var t={};return M(e,function(r,a){t[a]={};var n=r.stacks,o=r.bandWidth,s=R(r.categoryGap,o),l=R(r.gap,1),u=r.remainedWidth,h=r.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),M(n,function(d,g){var y=d.maxWidth;y&&y<c&&(y=Math.min(y,u),d.width&&(y=Math.min(y,d.width)),u-=y,d.width=y,h--)}),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var v=0,p;M(n,function(d,g){d.width||(d.width=c),p=d,v+=d.width*(1+l)}),p&&(v-=p.width*l);var f=-v/2;M(n,function(d,g){t[a][g]=t[a][g]||{offset:f,width:d.width},f+=d.width*(1+l)})}),t}var hn={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},cn={splitNumber:5},vn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e})(rt);function pn(i){ct(Jr),It.registerAxisPointerClass("PolarAxisPointer",Gi),i.registerCoordinateSystem("polar",Qi),i.registerComponentModel(Zi),i.registerComponentView(vn),_e(i,"angle",$i,hn),_e(i,"radius",Yi,cn),i.registerComponentView(tn),i.registerComponentView(nn),i.registerLayout(N(ln,"bar"))}function Te(i,e){e=e||{};var t=i.coordinateSystem,r=i.axis,a={},n=r.position,o=r.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var h={horizontal:0,vertical:1};a.rotation=Math.PI/2*h[o];var c={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=c[n],i.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),st(e.labelInside,i.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var v=e.rotate;return v==null&&(v=i.get(["axisLabel","rotate"])),a.labelRotation=n==="top"?-v:v,a.z2=1,a}var fn=["axisLine","axisTickLabel","axisName"],dn=["splitArea","splitLine"],gn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,a,n){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Y;var l=Te(t),u=new Mt(t,l);M(fn,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),M(dn,function(h){t.get([h,"show"])&&yn[h](this,this.group,this._axisGroup,t)},this),jr(s,this._axisGroup,t),i.prototype.render.call(this,t,r,a,n)},e.prototype.remove=function(){za(this)},e.type="singleAxis",e})(It),yn={splitLine:function(i,e,t,r){var a=r.axis;if(!a.scale.isBlank()){var n=r.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=r.coordinateSystem.getRect(),h=a.isHorizontal(),c=[],v=0,p=a.getTicksCoords({tickModel:n}),f=[],d=[],g=0;g<p.length;++g){var y=a.toGlobalCoord(p[g].coord);h?(f[0]=y,f[1]=u.y,d[0]=y,d[1]=u.y+u.height):(f[0]=u.x,f[1]=y,d[0]=u.x+u.width,d[1]=y);var S=new ot({shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},silent:!0});Ea(S.shape,l);var b=v++%s.length;c[b]=c[b]||[],c[b].push(S)}for(var m=o.getLineStyle(["color"]),g=0;g<c.length;++g)e.add(U(c[g],{style:F({stroke:s[g%s.length]},m),silent:!0}))}},splitArea:function(i,e,t,r){Va(i,t,r,r)}},Xt=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e})(J);ne(Xt,Yr.prototype);var mn=(function(i){T(e,i);function e(t,r,a,n,o){var s=i.call(this,t,r,a)||this;return 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.pointToData=function(t,r){return this.coordinateSystem.pointToData(t)[0]},e})(tt),ga=["single"],xn=(function(){function i(e,t,r){this.type="single",this.dimension="single",this.dimensions=ga,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return i.prototype._init=function(e,t,r){var a=this.dimension,n=new mn(a,Kr(e),[0,0],e.get("type"),e.get("position")),o=n.type==="category";n.onBand=o&&e.get("boundaryGap"),n.inverse=e.get("inverse"),n.orient=e.get("orient"),e.axis=n,n.model=e,n.coordinateSystem=this,this._axis=n},i.prototype.update=function(e,t){e.eachSeries(function(r){if(r.coordinateSystem===this){var a=r.getData();M(a.mapDimensionsAll(this.dimension),function(n){this._axis.scale.unionExtentFromData(a,n)},this),be(this._axis.scale,this._axis.model)}},this)},i.prototype.resize=function(e,t){this._rect=Pt({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},i.prototype.getRect=function(){return this._rect},i.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),a=r?[0,e.width]:[0,e.height],n=t.inverse?1:0;t.setExtent(a[n],a[1-n]),this._updateAxisTransform(t,r?e.x:e.y)},i.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),a=r[0]+r[1],n=e.isHorizontal();e.toGlobalCoord=n?function(o){return o+t}:function(o){return a-o+t},e.toLocalCoord=n?function(o){return o-t}:function(o){return a-o+t}},i.prototype.getAxis=function(){return this._axis},i.prototype.getBaseAxis=function(){return this._axis},i.prototype.getAxes=function(){return[this._axis]},i.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},i.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),a=r.orient;return a==="horizontal"?r.contain(r.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},i.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},i.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),a=[],n=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[n]=t.toGlobalCoord(t.dataToCoord(+e)),a[1-n]=n===0?r.y+r.height/2:r.x+r.width/2,a},i.prototype.convertToPixel=function(e,t,r){var a=Je(t);return a===this?this.dataToPoint(r):null},i.prototype.convertFromPixel=function(e,t,r){var a=Je(t);return a===this?this.pointToData(r):null},i})();function Je(i){var e=i.seriesModel,t=i.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Sn(i,e){var t=[];return i.eachComponent("singleAxis",function(r,a){var n=new xn(r,i,e);n.name="single_"+a,n.resize(r,e),r.coordinateSystem=n,t.push(n)}),i.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var a=r.getReferringComponents("singleAxis",ke).models[0];r.coordinateSystem=a&&a.coordinateSystem}}),t}var bn={create:Sn,dimensions:ga},tr=["x","y"],_n=["width","height"],Mn=(function(i){T(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,a,n,o){var s=a.axis,l=s.coordinateSystem,u=ue(l,1-ee(s)),h=l.dataToPoint(r)[0],c=n.get("type");if(c&&c!=="none"){var v=Gr(n),p=An[c](s,h,u);p.style=v,t.graphicKey=p.type,t.pointer=p}var f=Te(a);Oa(r,t,f,a,n,o)},e.prototype.getHandleTransform=function(t,r,a){var n=Te(r,{labelInside:!1});n.labelMargin=a.get(["handle","margin"]);var o=Ba(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,a,n){var o=a.axis,s=o.coordinateSystem,l=ee(o),u=ue(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 c=ue(s,1-l),v=(c[1]+c[0])/2,p=[v,v];return p[l]=h[l],{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},e})(Wr),An={line:function(i,e,t){var r=Fr([e,t[0]],[e,t[1]],ee(i));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(i,e,t){var r=i.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:Na([e-r/2,t[0]],[r,a],ee(i))}}};function ee(i){return i.isHorizontal()?0:1}function ue(i,e){var t=i.getRect();return[t[tr[e]],t[tr[e]]+t[_n[e]]]}var wn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(rt);function Tn(i){ct(Jr),It.registerAxisPointerClass("SingleAxisPointer",Mn),i.registerComponentView(wn),i.registerComponentView(gn),i.registerComponentModel(Xt),_e(i,"single",Xt,Xt.defaultOption),i.registerCoordinateSystem("single",bn)}var Dn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,a){var n=ta(t);i.prototype.init.apply(this,arguments),er(t,n)},e.prototype.mergeOption=function(t){i.prototype.mergeOption.apply(this,arguments),er(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})(J);function er(i,e){var t=i.cellSize,r;k(t)?r=t:r=i.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var a=P([0,1],function(n){return Ha(e,n)&&(r[n]="auto"),r[n]!=null&&r[n]!=="auto"});ea(i,e,{type:"box",ignoreSize:a})}var Cn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,a){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,a){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,c=new ut({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});a.add(c)}},e.prototype._renderLines=function(t,r,a,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 c=r.start,v=0;c.time<=r.end.time;v++){f(c.formatedDate),v===0&&(c=s.getDateInfo(r.start.y+"-"+r.start.m));var p=c.date;p.setMonth(p.getMonth()+1),c=s.getDateInfo(p)}f(s.getNextNDay(r.end.time,1).formatedDate);function f(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,a);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,a),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,a),l,n)},e.prototype._getEdgesPoints=function(t,r,a){var n=[t[0].slice(),t[t.length-1].slice()],o=a==="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,a){var n=new ra({z2:20,shape:{points:t},style:r});a.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,r,a){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[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return q(t)&&t?Ga(t,r):G(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,a,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,a,n){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,v=a==="horizontal"?0:1,p={top:[h,u[v][1]],bottom:[h,u[1-v][1]],left:[u[1-v][0],c],right:[u[v][0],c]},f=r.start.y;+r.end.y>+r.start.y&&(f=f+"-"+r.end.y);var d=o.get("formatter"),g={start:r.start.y,end:r.end.y,nameMap:f},y=this._formatterLabel(d,g),S=new O({z2:30,style:Z(o,{text:y}),silent:o.get("silent")});S.attr(this._yearTextPositionControl(S,p[l],a,l,s)),n.add(S)}},e.prototype._monthTextPositionControl=function(t,r,a,n,o){var s="left",l="top",u=t[0],h=t[1];return a==="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,a,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"),c=[this._tlpoints,this._blpoints];(!s||q(s))&&(s&&(r=$e(s)||r),s=r.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,p=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var f=h==="center",d=o.get("silent"),g=0;g<c[v].length-1;g++){var y=c[v][g].slice(),S=this._firstDayOfMonth[g];if(f){var b=this._firstDayPoints[g];y[p]=(b[p]+c[0][g+1][p])/2}var m=o.get("formatter"),x=s[+S.m-1],_={yyyy:S.y,yy:(S.y+"").slice(2),MM:S.m,M:+S.m,nameMap:x},A=this._formatterLabel(m,_),D=new O({z2:30,style:B(Z(o,{text:A}),this._monthTextPositionControl(y,f,a,u,l)),silent:d});n.add(D)}}},e.prototype._weekTextPositionControl=function(t,r,a,n,o){var s="center",l="middle",u=t[0],h=t[1],c=a==="start";return r==="horizontal"?(u=u+n+(c?1:-1)*o[0]/2,s=c?"right":"left"):(h=h+n+(c?1:-1)*o[1]/2,l=c?"bottom":"top"),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,r,a,n,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),h=s.get("nameMap"),c=s.get("margin"),v=l.getFirstDayOfWeek();if(!h||q(h)){h&&(r=$e(h)||r);var p=r.get(["time","dayOfWeekShort"]);h=p||P(r.get(["time","dayOfWeekAbbr"]),function(_){return _[0]})}var f=l.getNextNDay(a.end.time,7-a.lweek).time,d=[l.getCellWidth(),l.getCellHeight()];c=R(c,Math.min(d[1],d[0])),u==="start"&&(f=l.getNextNDay(a.start.time,-(7+a.fweek)).time,c=-c);for(var g=s.get("silent"),y=0;y<7;y++){var S=l.getNextNDay(f,y),b=l.dataToRect([S.time],!1).center,m=y;m=Math.abs((y+v)%7);var x=new O({z2:30,style:B(Z(s,{text:h[m]}),this._weekTextPositionControl(b,n,u,c,d)),silent:g});o.add(x)}}},e.type="calendar",e})(rt),he=864e5,In=(function(){function i(e,t,r){this.type="calendar",this.dimensions=i.dimensions,this.getDimensionsInfo=i.getDimensionsInfo,this._model=e}return i.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},i.prototype.getRangeInfo=function(){return this._rangeInfo},i.prototype.getModel=function(){return this._model},i.prototype.getRect=function(){return this._rect},i.prototype.getCellWidth=function(){return this._sw},i.prototype.getCellHeight=function(){return this._sh},i.prototype.getOrient=function(){return this._orient},i.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},i.prototype.getDateInfo=function(e){e=Wa(e);var t=e.getFullYear(),r=e.getMonth()+1,a=r<10?"0"+r:""+r,n=e.getDate(),o=n<10?"0"+n:""+n,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+a+"-"+o,date:e}},i.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},i.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,a=["width","height"],n=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[r,7]:[7,r];M([0,1],function(c){h(n,c)&&(o[a[c]]=n[c]*s[c])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Pt(o,l);M([0,1],function(c){h(n,c)||(n[c]=u[a[c]]/s[c])});function h(c,v){return c[v]!=null&&c[v]!=="auto"}this._sw=n[0],this._sh=n[1]},i.prototype.dataToPoint=function(e,t){k(e)&&(e=e[0]),t==null&&(t=!0);var r=this.getDateInfo(e),a=this._rangeInfo,n=r.formatedDate;if(t&&!(r.time>=a.start.time&&r.time<a.end.time+he))return[NaN,NaN];var o=r.day,s=this._getRangeInfo([a.start.time,n]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},i.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},i.prototype.dataToRect=function(e,t){var r=this.dataToPoint(e,t);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},i.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,r=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,t-1,a):this._getDateByWeeksAndDay(t,r-1,a)},i.prototype.convertToPixel=function(e,t,r){var a=rr(t);return a===this?a.dataToPoint(r):null},i.prototype.convertFromPixel=function(e,t,r){var a=rr(t);return a===this?a.pointToData(r):null},i.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},i.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(k(e)&&e.length===1&&(e=e[0]),k(e))t=e;else{var r=e.toString();if(/^\d{4}$/.test(r)&&(t=[r+"-01-01",r+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(r)){var a=this.getDateInfo(r),n=a.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r)&&(t=[r,r])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},i.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 a=Math.floor(t[1].time/he)-Math.floor(t[0].time/he)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+a-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;)a-=u,n.setDate(l-u);var h=Math.floor((a+t[0].day+6)/7),c=r?-h+1:h-1;return r&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:h,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},i.prototype._getDateByWeeksAndDay=function(e,t,r){var a=this._getRangeInfo(r);if(e>a.weeks||e===0&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var n=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+n),this.getDateInfo(o)},i.create=function(e,t){var r=[];return e.eachComponent("calendar",function(a){var n=new i(a);r.push(n),a.coordinateSystem=n}),e.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=r[a.get("calendarIndex")||0])}),r},i.dimensions=["time","value"],i})();function rr(i){var e=i.calendarModel,t=i.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}function Ln(i){i.registerComponentModel(Dn),i.registerComponentView(Cn),i.registerCoordinateSystem("calendar",In)}function kn(i,e){var t=i.existing;if(e.id=i.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 ar(i,e){var t;return M(e,function(r){i[r]!=null&&i[r]!=="auto"&&(t=!0)}),t}function Pn(i,e,t){var r=B({},t),a=i[e],n=t.$action||"merge";n==="merge"?a?(vt(a,r,!0),ea(a,r,{ignoreSize:!0}),Za(t,a),Gt(t,a),Gt(t,a,"shape"),Gt(t,a,"style"),Gt(t,a,"extra"),t.clipPath=a.clipPath):i[e]=r:n==="replace"?i[e]=r:n==="remove"&&a&&(i[e]=null)}var ya=["transition","enterFrom","leaveTo"],Rn=ya.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Gt(i,e,t){if(t&&(!i[t]&&e[t]&&(i[t]={}),i=i[t],e=e[t]),!(!i||!e))for(var r=t?ya:Rn,a=0;a<r.length;a++){var n=r[a];i[n]==null&&e[n]!=null&&(i[n]=e[n])}}function zn(i,e){if(i&&(i.hv=e.hv=[ar(e,["left","right"]),ar(e,["top","bottom"])],i.type==="group")){var t=i,r=e;t.width==null&&(t.width=r.width=0),t.height==null&&(t.height=r.height=0)}}var Vn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,r){var a=this.option.elements;this.option.elements=null,i.prototype.mergeOption.call(this,t,r),this.option.elements=a},e.prototype.optionUpdated=function(t,r){var a=this.option,n=(r?a:t).elements,o=a.elements=r?[]:a.elements,s=[];this._flatten(n,s,null);var l=Fa(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];M(l,function(h,c){var v=h.newOption;v&&(u.push(v),kn(h,v),Pn(o,c,v),zn(o[c],v))},this),a.elements=kt(o,function(h){return h&&delete h.$action,h!=null})},e.prototype._flatten=function(t,r,a){M(t,function(n){if(n){a&&(n.parentOption=a),r.push(n);var o=n.children;o&&o.length&&this._flatten(o,r,n),delete n.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e})(J),ir={path:null,compoundPath:null,group:Y,image:na,text:O},W=et(),En=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=At()},e.prototype.render=function(t,r,a){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,a)},e.prototype._updateElements=function(t){var r=t.useElOptionsToUpdate();if(r){var a=this._elMap,n=this.group,o=t.get("z"),s=t.get("zlevel");M(r,function(l){var u=_t(l.id,null),h=u!=null?a.get(u):null,c=_t(l.parentId,null),v=c!=null?a.get(c):n,p=l.type,f=l.style;p==="text"&&f&&l.hv&&l.hv[1]&&(f.textVerticalAlign=f.textBaseline=f.verticalAlign=f.align=null);var d=l.textContent,g=l.textConfig;if(f&&Pi(f,p,!!g,!!d)){var y=Ri(f,p,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!d&&y.textContent&&(d=y.textContent)}var S=On(l),b=l.$action||"merge",m=b==="merge",x=b==="replace";if(m){var _=!h,A=h;_?A=nr(u,v,l.type,a):(A&&(W(A).isNew=!1),zi(A)),A&&(le(A,S,t,{isInit:_}),or(A,l,o,s))}else if(x){qt(h,l,a,t);var D=nr(u,v,l.type,a);D&&(le(D,S,t,{isInit:!0}),or(D,l,o,s))}else b==="remove"&&(Vi(h,l),qt(h,l,a,t));var w=a.get(u);if(w&&d)if(m){var I=w.getTextContent();I?I.attr(d):w.setTextContent(new O(d))}else x&&w.setTextContent(new O(d));if(w){var L=l.clipPath;if(L){var H=L.type,V=void 0,_=!1;if(m){var at=w.getClipPath();_=!at||W(at).type!==H,V=_?De(H):at}else x&&(_=!0,V=De(H));w.setClipPath(V),le(V,L,t,{isInit:_}),Xe(V,L.keyframeAnimation,t)}var it=W(w);w.setTextConfig(g),it.option=l,Bn(w,t,l),$a({el:w,componentModel:t,itemName:w.name,itemTooltipOption:l.tooltip}),Xe(w,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,r){for(var a=t.option.elements,n=this.group,o=this._elMap,s=r.getWidth(),l=r.getHeight(),u=["x","y"],h=0;h<a.length;h++){var c=a[h],v=_t(c.id,null),p=v!=null?o.get(v):null;if(!(!p||!p.isGroup)){var f=p.parent,d=f===n,g=W(p),y=W(f);g.width=R(g.option.width,d?s:y.width)||0,g.height=R(g.option.height,d?l:y.height)||0}}for(var h=a.length-1;h>=0;h--){var c=a[h],v=_t(c.id,null),p=v!=null?o.get(v):null;if(p){var f=p.parent,y=W(f),S=f===n?{width:s,height:l}:{width:y.width,height:y.height},b={},m=aa(p,c,S,null,{hv:c.hv,boundingMode:c.bounding},b);if(!W(p).isNew&&m){for(var x=c.transition,_={},A=0;A<u.length;A++){var D=u[A],w=b[D];x&&(Ei(x)||wt(x,D)>=0)?_[D]=w:p[D]=w}ia(p,_,t,0)}else p.attr(b)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(a){qt(a,W(a).option,r,t._lastGraphicModel)}),this._elMap=At()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(rt);function De(i){var e=Me(ir,i)?ir[i]:Xa(i),t=new e({});return W(t).type=i,t}function nr(i,e,t,r){var a=De(t);return e.add(a),r.set(i,a),W(a).id=i,W(a).isNew=!0,a}function qt(i,e,t,r){var a=i&&i.parent;a&&(i.type==="group"&&i.traverse(function(n){qt(n,e,t,r)}),Oi(i,e,r),t.removeKey(W(i).id))}function or(i,e,t,r){i.isGroup||M([["cursor",Ka.prototype.cursor],["zlevel",r||0],["z",t||0],["z2",0]],function(a){var n=a[0];Me(e,n)?i[n]=ft(e[n],a[1]):i[n]==null&&(i[n]=a[1])}),M(Ua(e),function(a){if(a.indexOf("on")===0){var n=e[a];i[a]=G(n)?n:null}}),Me(e,"draggable")&&(i.draggable=e.draggable),e.name!=null&&(i.name=e.name),e.id!=null&&(i.id=e.id)}function On(i){return i=B({},i),M(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Ya),function(e){delete i[e]}),i}function Bn(i,e,t){var r=j(i).eventData;!i.silent&&!i.ignore&&!r&&(r=j(i).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:i.name}),r&&(r.info=t.info)}function Nn(i){i.registerComponentModel(Vn),i.registerComponentView(En),i.registerPreprocessor(function(e){var t=e.graphic;k(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Hn=["rect","polygon","keep","clear"];function Gn(i,e){var t=oa(i?i.brush:[]);if(t.length){var r=[];M(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var a=i&&i.toolbox;k(a)&&(a=a[0]),a||(a={feature:{}},i.toolbox=[a]);var n=a.feature||(a.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),Wn(s),e&&!s.length&&s.push.apply(s,Hn)}}function Wn(i){var e={};M(i,function(t){e[t]=1}),i.length=0,M(e,function(t,r){i.push(r)})}var sr=M;function lr(i){if(i){for(var e in i)if(i.hasOwnProperty(e))return!0}}function Ce(i,e,t){var r={};return sr(e,function(n){var o=r[n]=a();sr(i[n],function(s,l){if(E.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new E(u),l==="opacity"&&(u=z(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new E(u))}})}),r;function a(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function ma(i,e,t){var r;M(t,function(a){e.hasOwnProperty(a)&&lr(e[a])&&(r=!0)}),r&&M(t,function(a){e.hasOwnProperty(a)&&lr(e[a])?i[a]=z(e[a]):delete i[a]})}function Fn(i,e,t,r,a,n){var o={};M(i,function(c){var v=E.prepareVisualTypes(e[c]);o[c]=v});var s;function l(c){return sa(t,s,c)}function u(c,v){la(t,s,c,v)}t.each(h);function h(c,v){s=c;var p=t.getRawDataItem(s);if(!(p&&p.visualMap===!1))for(var f=r.call(a,c),d=e[f],g=o[f],y=0,S=g.length;y<S;y++){var b=g[y];d[b]&&d[b].applyVisual(c,l,u)}}}function Zn(i,e,t,r){var a={};return M(i,function(n){var o=E.prepareVisualTypes(e[n]);a[n]=o}),{progress:function(o,s){var l;r!=null&&(l=s.getDimensionIndex(r));function u(x){return sa(s,c,x)}function h(x,_){la(s,c,x,_)}for(var c,v=s.getStore();(c=o.next())!=null;){var p=s.getRawDataItem(c);if(!(p&&p.visualMap===!1))for(var f=r!=null?v.get(l,c):c,d=t(f),g=e[d],y=a[d],S=0,b=y.length;S<b;S++){var m=y[S];g[m]&&g[m].applyVisual(f,u,h)}}}}}function $n(i){var e=i.brushType,t={point:function(r){return ur[e].point(r,t,i)},rect:function(r){return ur[e].rect(r,t,i)}};return t}var ur={lineX:hr(0),lineY:hr(1),rect:{point:function(i,e,t){return i&&t.boundingRect.contain(i[0],i[1])},rect:function(i,e,t){return i&&t.boundingRect.intersect(i)}},polygon:{point:function(i,e,t){return i&&t.boundingRect.contain(i[0],i[1])&&mt(t.range,i[0],i[1])},rect:function(i,e,t){var r=t.range;if(!i||r.length<=1)return!1;var a=i.x,n=i.y,o=i.width,s=i.height,l=r[0];if(mt(r,a,n)||mt(r,a+o,n)||mt(r,a,n+s)||mt(r,a+o,n+s)||Pe.create(i).contain(l[0],l[1])||Bt(a,n,a+o,n,r)||Bt(a,n,a,n+s,r)||Bt(a+o,n,a+o,n+s,r)||Bt(a,n+s,a+o,n+s,r))return!0}}};function hr(i){var e=["x","y"],t=["width","height"];return{point:function(r,a,n){if(r){var o=n.range,s=r[i];return xt(s,o)}},rect:function(r,a,n){if(r){var o=n.range,s=[r[e[i]],r[e[i]]+r[t[i]]];return s[1]<s[0]&&s.reverse(),xt(s[0],o)||xt(s[1],o)||xt(o[0],s)||xt(o[1],s)}}}}function xt(i,e){return e[0]<=i&&i<=e[1]}var cr=["inBrush","outOfBrush"],ce="__ecBrushSelect",Ie="__ecInBrushSelectEvent";function xa(i){i.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new qa(e.option,i);t.setInputRanges(e.areas,i)})}function Yn(i,e,t){var r=[],a,n;i.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),xa(i),i.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:z(o.areas),selected:[]};r.push(l);var u=o.option,h=u.brushLink,c=[],v=[],p=[],f=!1;s||(a=u.throttleType,n=u.throttleDelay);var d=P(o.areas,function(x){var _=qn[x.brushType],A=F({boundingRect:_?_(x):void 0},x);return A.selectors=$n(A),A}),g=Ce(o.option,cr,function(x){x.mappingMethod="fixed"});k(h)&&M(h,function(x){c[x]=1});function y(x){return h==="all"||!!c[x]}function S(x){return!!x.length}i.eachSeries(function(x,_){var A=p[_]=[];x.subType==="parallel"?b(x,_):m(x,_,A)});function b(x,_){var A=x.coordinateSystem;f=f||A.hasAxisBrushed(),y(_)&&A.eachActiveState(x.getData(),function(D,w){D==="active"&&(v[w]=1)})}function m(x,_,A){if(!(!x.brushSelector||Xn(o,_))&&(M(d,function(w){o.brushTargetManager.controlSeries(w,x,i)&&A.push(w),f=f||S(A)}),y(_)&&S(A))){var D=x.getData();D.each(function(w){vr(x,A,D,w)&&(v[w]=1)})}}i.eachSeries(function(x,_){var A={seriesId:x.id,seriesIndex:_,seriesName:x.name,dataIndex:[]};l.selected.push(A);var D=p[_],w=x.getData(),I=y(_)?function(L){return v[L]?(A.dataIndex.push(w.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return vr(x,D,w,L)?(A.dataIndex.push(w.getRawIndex(L)),"inBrush"):"outOfBrush"};(y(_)?f:S(D))&&Fn(cr,g,w,I)})}),Kn(e,a,n,r,t)}function Kn(i,e,t,r,a){if(a){var n=i.getZr();if(!n[Ie]){n[ce]||(n[ce]=Un);var o=Re(n,ce,t,e);o(i,r)}}}function Un(i,e){if(!i.isDisposed()){var t=i.getZr();t[Ie]=!0,i.dispatchAction({type:"brushSelect",batch:e}),t[Ie]=!1}}function vr(i,e,t,r){for(var a=0,n=e.length;a<n;a++){var o=e[a];if(i.brushSelector(r,t,o.selectors,o))return!0}}function Xn(i,e){var t=i.option.seriesIndex;return t!=null&&t!=="all"&&(k(t)?wt(t,e)<0:e!==t)}var qn={rect:function(i){return pr(i.range)},polygon:function(i){for(var e,t=i.range,r=0,a=t.length;r<a;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=t[r];n[0]<e[0][0]&&(e[0][0]=n[0]),n[0]>e[0][1]&&(e[0][1]=n[0]),n[1]<e[1][0]&&(e[1][0]=n[1]),n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&pr(e)}};function pr(i){return new Pe(i[0][0],i[1][0],i[0][1]-i[0][0],i[1][1]-i[1][0])}var jn=(function(i){T(e,i);function e(){var t=i!==null&&i.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 ja(r.getZr())).on("brush",C(this._onBrush,this)).mount()},e.prototype.render=function(t,r,a,n){this.model=t,this._updateController(t,r,a,n)},e.prototype.updateTransform=function(t,r,a,n){xa(r),this._updateController(t,r,a,n)},e.prototype.updateVisual=function(t,r,a,n){this.updateTransform(t,r,a,n)},e.prototype.updateView=function(t,r,a,n){this._updateController(t,r,a,n)},e.prototype._updateController=function(t,r,a,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:z(a),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:z(a),$from:r})},e.type="brush",e})(rt),Qn="#ddd",Jn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var a=this.option;!r&&ma(a,t,["inBrush","outOfBrush"]);var n=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:Qn},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=P(t,function(r){return fr(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=fr(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})(J);function fr(i,e){return vt({brushType:i.brushType,brushMode:i.brushMode,transformable:i.transformable,brushStyle:new Xr(i.brushStyle).getItemStyle(),removeOnClick:i.removeOnClick,z:i.z},e,!0)}var to=["rect","polygon","lineX","lineY","keep","clear"],eo=(function(i){T(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.render=function(t,r,a){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,M(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,a){this.render(t,r,a)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),a={};return M(t.get("type",!0),function(n){r[n]&&(a[n]=r[n])}),a},e.prototype.onclick=function(t,r,a){var n=this._brushType,o=this._brushMode;a==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?n:n===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:to.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})(Qa);function ro(i){i.registerComponentView(jn),i.registerComponentModel(Jn),i.registerPreprocessor(Gn),i.registerVisual(i.PRIORITY.VISUAL.BRUSH,Yn),i.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),i.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ye),i.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ye),Ja("brush",eo)}var dr=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,r,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){i.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||[],a=t.axisType,n=this._names=[],o;a==="category"?(o=[],M(r,function(u,h){var c=_t(ti(u),""),v;Lt(u)?(v=z(u),v.value=h):v=h,o.push(v),n.push(c)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new ht([{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})(J),Sa=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Rt(dr.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})(dr);ne(Sa,ze.prototype);var ao=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(rt),io=(function(i){T(e,i);function e(t,r,a,n){var o=i.call(this,t,r,a)||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})(tt),ve=Math.PI,gr=et(),no=(function(i){T(e,i);function e(){var t=i!==null&&i.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,a){if(this.model=t,this.api=a,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,a),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 Ae("nameValue",{noName:!0,value:h})},M(["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 a=t.get(["label","position"]),n=t.get("orient"),o=so(t,r),s;a==null||a==="auto"?s=n==="horizontal"?o.y+o.height/2<r.getHeight()/2?"-":"+":o.x+o.width/2<r.getWidth()/2?"+":"-":q(a)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][a]:s=a;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:ve/2},c=n==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),p=v.get("show",!0),f=p?v.get("itemSize"):0,d=p?v.get("itemGap"):0,g=f+d,y=t.get(["label","rotate"])||0;y=y*ve/180;var S,b,m,x=v.get("position",!0),_=p&&v.get("showPlayBtn",!0),A=p&&v.get("showPrevBtn",!0),D=p&&v.get("showNextBtn",!0),w=0,I=c;x==="left"||x==="bottom"?(_&&(S=[0,0],w+=g),A&&(b=[w,0],w+=g),D&&(m=[I-f,0],I-=g)):(_&&(S=[I-f,0],I-=g),A&&(b=[0,0],w+=g),D&&(m=[I-f,0],I-=g));var L=[w,I];return t.get("inverse")&&L.reverse(),{viewRect:o,mainLength:c,orient:n,rotation:h[n],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:S,prevBtnPosition:b,nextBtnPosition:m,axisExtent:L,controlSize:f,controlGap:d}},e.prototype._position=function(t,r){var a=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=$r(),l=o.x,u=o.y+o.height;Se(s,s,[-l,-u]),Zr(s,s,-ve/2),Se(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=S(o),c=S(a.getBoundingRect()),v=S(n.getBoundingRect()),p=[a.x,a.y],f=[n.x,n.y];f[0]=p[0]=h[0][0];var d=t.labelPosOpt;if(d==null||q(d)){var g=d==="+"?0:1;b(p,c,h,1,g),b(f,v,h,1,1-g)}else{var g=d>=0?0:1;b(p,c,h,1,g),f[1]=p[1]+d}a.setPosition(p),n.setPosition(f),a.rotation=n.rotation=t.rotation,y(a),y(n);function y(m){m.originX=h[0][0]-m.x,m.originY=h[1][0]-m.y}function S(m){return[[m.x,m.x+m.width],[m.y,m.y+m.height]]}function b(m,x,_,A,D){m[A]+=_[A][D]-x[A][D]}},e.prototype._createAxis=function(t,r){var a=r.getData(),n=r.get("axisType"),o=oo(r,n);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new io("value",o,t.axisExtent,n);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new Y;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,a,n){var o=a.getExtent();if(n.get(["lineStyle","show"])){var s=new ot({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:B({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new ot({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:F({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,a,n){var o=this,s=n.getData(),l=a.scale.getTicks();this._tickSymbols=[],M(l,function(u){var h=a.dataToCoord(u.value),c=s.getItemModel(u.value),v=c.getModel("itemStyle"),p=c.getModel(["emphasis","itemStyle"]),f=c.getModel(["progress","itemStyle"]),d={x:h,y:0,onclick:C(o._changeTimeline,o,u.value)},g=yr(c,v,r,d);g.ensureState("emphasis").style=p.getItemStyle(),g.ensureState("progress").style=f.getItemStyle(),Kt(g);var y=j(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=n):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,r,a,n){var o=this,s=a.getLabelModel();if(s.get("show")){var l=n.getData(),u=a.getViewLabels();this._tickLabels=[],M(u,function(h){var c=h.tickValue,v=l.getItemModel(c),p=v.getModel("label"),f=v.getModel(["emphasis","label"]),d=v.getModel(["progress","label"]),g=a.dataToCoord(h.tickValue),y=new O({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:C(o._changeTimeline,o,c),silent:!1,style:Z(p,{text:h.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Z(f),y.ensureState("progress").style=Z(d),r.add(y),Kt(y),gr(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,r,a,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),h=n.getPlayState(),c=n.get("inverse",!0);v(t.nextBtnPosition,"next",C(this._changeTimeline,this,c?"-":"+")),v(t.prevBtnPosition,"prev",C(this._changeTimeline,this,c?"+":"-")),v(t.playPosition,h?"stop":"play",C(this._handlePlayClick,this,!h),!0);function v(p,f,d,g){if(p){var y=we(ft(n.get(["controlStyle",f+"BtnSize"]),o),o),S=[0,-y/2,y,y],b=lo(n,f+"Icon",S,{x:p[0],y:p[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});b.ensureState("emphasis").style=u,r.add(b),Kt(b)}}},e.prototype._renderCurrentPointer=function(t,r,a,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(c){c.draggable=!0,c.drift=C(u._handlePointerDrag,u),c.ondragend=C(u._handlePointerDragend,u),mr(c,u._progressLine,s,a,n,!0)},onUpdate:function(c){mr(c,u._progressLine,s,a,n)}};this._currentPointer=yr(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,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var a=this._toAxisCoord(t)[0],n=this._axis,o=X(n.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=a,s.dirty());var l=this._findNearestTick(a),u=this.model;(r||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var r=t.model;t._changeTimeline(r.getCurrentIndex()+(r.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var r=this._mainGroup.getLocalTransform();return lt(t,r,!0)},e.prototype._findNearestTick=function(t){var r=this.model.getData(),a=1/0,n,o=this._axis;return r.each(["value"],function(s,l){var u=o.dataToCoord(s),h=Math.abs(u-t);h<a&&(a=h,n=l)}),n},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var r=this.model.getCurrentIndex();t==="+"?t=r+1:t==="-"&&(t=r-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),r=this._tickSymbols,a=this._tickLabels;if(r)for(var n=0;n<r.length;n++)r&&r[n]&&r[n].toggleState("progress",n<t);if(a)for(var n=0;n<a.length;n++)a&&a[n]&&a[n].toggleState("progress",gr(a[n]).dataIndex<=t)},e.type="timeline.slider",e})(ao);function oo(i,e){if(e=e||i.get("type"),e)switch(e){case"category":return new ai({ordinalMeta:i.getCategories(),extent:[1/0,-1/0]});case"time":return new ri({locale:i.ecModel.getLocaleModel(),useUTC:i.ecModel.get("useUTC")});default:return new ei}}function so(i,e){return Pt(i.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},i.get("padding"))}function lo(i,e,t,r){var a=r.style,n=oi(i.get(["controlStyle",e]),r||{},new Pe(t[0],t[1],t[2],t[3]));return a&&n.setStyle(a),n}function yr(i,e,t,r,a,n){var o=e.get("color");if(a)a.setColor(o),t.add(a),n&&n.onUpdate(a);else{var s=i.get("symbol");a=dt(s,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),t.add(a),n&&n.onCreate(a)}var l=e.getItemStyle(["color"]);a.setStyle(l),r=vt({rectHover:!0,z2:100},r,!0);var u=ii(i.get("symbolSize"));r.scaleX=u[0]/2,r.scaleY=u[1]/2;var h=ni(i.get("symbolOffset"),u);h&&(r.x=(r.x||0)+h[0],r.y=(r.y||0)+h[1]);var c=i.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,a.attr(r),a.updateTransform(),a}function mr(i,e,t,r,a,n){if(!i.dragging){var o=a.getModel("checkpointStyle"),s=r.dataToCoord(a.getData().get("value",t));if(n||!o.get("animation",!0))i.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};i.stopAnimation(null,!0),i.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function uo(i){i.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,r){var a=t.getComponent("timeline");return a&&e.currentIndex!=null&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),r.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),F({currentIndex:a.option.currentIndex},e)}),i.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var r=t.getComponent("timeline");r&&e.playState!=null&&r.setPlayState(e.playState)})}function ho(i){var e=i&&i.timeline;k(e)||(e=e?[e]:[]),M(e,function(t){t&&co(t)})}function co(i){var e=i.type,t={number:"value",time:"time"};if(t[e]&&(i.axisType=t[e],delete i.type),xr(i),nt(i,"controlPosition")){var r=i.controlStyle||(i.controlStyle={});nt(r,"position")||(r.position=i.controlPosition),r.position==="none"&&!nt(r,"show")&&(r.show=!1,delete r.position),delete i.controlPosition}M(i.data||[],function(a){Lt(a)&&!k(a)&&(!nt(a,"value")&&nt(a,"name")&&(a.value=a.name),xr(a))})}function xr(i){var e=i.itemStyle||(i.itemStyle={}),t=e.emphasis||(e.emphasis={}),r=i.label||i.label||{},a=r.normal||(r.normal={}),n={normal:1,emphasis:1};M(r,function(o,s){!n[s]&&!nt(a,s)&&(a[s]=o)}),t.label&&!nt(r,"emphasis")&&(r.emphasis=t.label,delete t.label)}function nt(i,e){return i.hasOwnProperty(e)}function vo(i){i.registerComponentModel(Sa),i.registerComponentView(no),i.registerSubTypeDefaulter("timeline",function(){return"slider"}),uo(i),i.registerPreprocessor(ho)}function Ne(i,e){if(!i)return!1;for(var t=k(i)?i:[i],r=0;r<t.length;r++)if(t[r]&&t[r][e])return!0;return!1}function Wt(i){li(i,"label",["show"])}var Ft=et(),Q=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,r,a){this.mergeDefaultAndTheme(t,a),this._mergeOption(t,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(si.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,r){this._mergeOption(t,r,!1,!1)},e.prototype._mergeOption=function(t,r,a,n){var o=this.mainType;a||r.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Ft(s)[o];if(!l||!l.data){Ft(s)[o]=null;return}u?u._mergeOption(l,r,!0):(n&&Wt(l),M(l.data,function(h){h instanceof Array?(Wt(h[0]),Wt(h[1])):Wt(h)}),u=this.createMarkerModelFromSeries(l,this,r),B(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Ft(s)[o]=u},this)},e.prototype.formatTooltip=function(t,r,a){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return Ae("section",{header:this.name,blocks:[Ae("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,r){var a=ze.prototype.getDataParams.call(this,t,r),n=this.__hostSeries;return n&&(a.seriesId=n.id,a.seriesName=n.name,a.seriesType=n.subType),a},e.getMarkerModelFromSeries=function(t,r){return Ft(t)[r]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(J);ne(Q,ze.prototype);var po=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,a){return new e(t,r,a)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e})(Q);function Le(i){return!(isNaN(parseFloat(i.x))&&isNaN(parseFloat(i.y)))}function fo(i){return!isNaN(parseFloat(i.x))&&!isNaN(parseFloat(i.y))}function Zt(i,e,t,r,a,n){var o=[],s=Qr(e,r),l=s?e.getCalculationInfo("stackResultDimension"):r,u=He(e,l,i),h=e.indicesOfNearest(l,u)[0];o[a]=e.get(t,h),o[n]=e.get(l,h);var c=e.get(r,h),v=ui(e.get(r,h));return v=Math.min(v,20),v>=0&&(o[n]=+o[n].toFixed(v)),[o,c]}var pe={min:N(Zt,"min"),max:N(Zt,"max"),average:N(Zt,"average"),median:N(Zt,"median")};function Dt(i,e){if(e){var t=i.getData(),r=i.coordinateSystem,a=r&&r.dimensions;if(!fo(e)&&!k(e.coord)&&k(a)){var n=ba(e,t,r,i);if(e=z(e),e.type&&pe[e.type]&&n.baseAxis&&n.valueAxis){var o=wt(a,n.baseAxis.dim),s=wt(a,n.valueAxis.dim),l=pe[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||!k(a))e.coord=[];else for(var u=e.coord,h=0;h<2;h++)pe[u[h]]&&(u[h]=He(t,t.mapDimension(a[h]),u[h]));return e}}function ba(i,e,t,r){var a={};return i.valueIndex!=null||i.valueDim!=null?(a.valueDataDim=i.valueIndex!=null?e.getDimension(i.valueIndex):i.valueDim,a.valueAxis=t.getAxis(go(r,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=r.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function go(i,e){var t=i.getData().getDimensionInfo(e);return t&&t.coordDim}function Ct(i,e){return i&&i.containData&&e.coord&&!Le(e)?i.containData(e.coord):!0}function yo(i,e,t){return i&&i.containZone&&e.coord&&t.coord&&!Le(e)&&!Le(t)?i.containZone(e.coord,t.coord):!0}function _a(i,e){return i?function(t,r,a,n){var o=n<2?t.coord&&t.coord[n]:t.value;return Qt(o,e[n])}:function(t,r,a,n){return Qt(t.value,e[n])}}function He(i,e,t){if(t==="average"){var r=0,a=0;return i.each(e,function(n,o){isNaN(n)||(r+=n,a++)}),r/a}else return t==="median"?i.getMedian(e):i.getDataExtent(e)[t==="max"?1:0]}var fe=et(),Ge=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=At()},e.prototype.render=function(t,r,a){var n=this,o=this.markerGroupMap;o.each(function(s){fe(s).keep=!1}),r.eachSeries(function(s){var l=Q.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,r,a)}),o.each(function(s){!fe(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){fe(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var a=this;M(t,function(n){var o=Q.getMarkerModelFromSeries(n,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?hi(l):ci(l))})}})},e.type="marker",e})(rt);function Sr(i,e,t){var r=e.coordinateSystem;i.each(function(a){var n=i.getItemModel(a),o,s=R(n.get("x"),t.getWidth()),l=R(n.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(i.getValues(i.dimensions,a));else if(r){var u=i.get(r.dimensions[0],a),h=i.get(r.dimensions[1],a);o=r.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),i.setItemLayout(a,o)})}var mo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,a){r.eachSeries(function(n){var o=Q.getMarkerModelFromSeries(n,"markPoint");o&&(Sr(o.getData(),n,a),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Hi),c=xo(o,t,r);r.setData(c),Sr(r.getData(),t,n),c.each(function(v){var p=c.getItemModel(v),f=p.getShallow("symbol"),d=p.getShallow("symbolSize"),g=p.getShallow("symbolRotate"),y=p.getShallow("symbolOffset"),S=p.getShallow("symbolKeepAspect");if(G(f)||G(d)||G(g)||G(y)){var b=r.getRawValue(v),m=r.getDataParams(v);G(f)&&(f=f(b,m)),G(d)&&(d=d(b,m)),G(g)&&(g=g(b,m)),G(y)&&(y=y(b,m))}var x=p.getModel("itemStyle").getItemStyle(),_=oe(l,"color");x.fill||(x.fill=_),c.setItemVisual(v,{symbol:f,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:S,style:x})}),h.updateData(c),this.group.add(h.group),c.eachItemGraphicEl(function(v){v.traverse(function(p){j(p).dataModel=r})}),this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e})(Ge);function xo(i,e,t){var r;i?r=P(i&&i.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return B(B({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var a=new ht(r,t),n=P(t.get("data"),N(Dt,e));i&&(n=kt(n,N(Ct,i)));var o=_a(!!i,r);return a.initData(n,null,o),a}function So(i){i.registerComponentModel(po),i.registerComponentView(mo),i.registerPreprocessor(function(e){Ne(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var bo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,a){return new e(t,r,a)},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})(Q),$t=et(),_o=function(i,e,t,r){var a=i.getData(),n;if(k(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=st(r.yAxis,r.xAxis);else{var u=ba(r,a,e,i);s=u.valueAxis;var h=vi(a,u.valueDataDim);l=He(a,h,o)}var c=s.dim==="x"?0:1,v=1-c,p=z(r),f={coord:[]};p.type=null,p.coord=[],p.coord[v]=-1/0,f.coord[v]=1/0;var d=t.get("precision");d>=0&&pi(l)&&(l=+l.toFixed(Math.min(d,20))),p.coord[c]=f.coord[c]=l,n=[p,f,{type:o,valueIndex:r.valueIndex,value:l}]}else n=[]}var g=[Dt(i,n[0]),Dt(i,n[1]),B({},n[2])];return g[2].type=g[2].type||null,vt(g[2],g[0]),vt(g[2],g[1]),g};function re(i){return!isNaN(i)&&!isFinite(i)}function br(i,e,t,r){var a=1-i,n=r.dimensions[i];return re(e[a])&&re(t[a])&&e[i]===t[i]&&r.getAxis(n).containData(e[i])}function Mo(i,e){if(i.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(br(1,t,r,i)||br(0,t,r,i)))return!0}return Ct(i,e[0])&&Ct(i,e[1])}function de(i,e,t,r,a){var n=r.coordinateSystem,o=i.getItemModel(e),s,l=R(o.get("x"),a.getWidth()),u=R(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(i.getValues(i.dimensions,e));else{var h=n.dimensions,c=i.get(h[0],e),v=i.get(h[1],e);s=n.dataToPoint([c,v])}if(Ve(n,"cartesian2d")){var p=n.getAxis("x"),f=n.getAxis("y"),h=n.dimensions;re(i.get(h[0],e))?s[0]=p.toGlobalCoord(p.getExtent()[t?0:1]):re(i.get(h[1],e))&&(s[1]=f.toGlobalCoord(f.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}i.setItemLayout(e,s)}var Ao=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,a){r.eachSeries(function(n){var o=Q.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=$t(o).from,u=$t(o).to;l.each(function(h){de(l,h,!0,n,a),de(u,h,!1,n,a)}),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,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Li);this.group.add(h.group);var c=wo(o,t,r),v=c.from,p=c.to,f=c.line;$t(r).from=v,$t(r).to=p,r.setData(f);var d=r.get("symbol"),g=r.get("symbolSize"),y=r.get("symbolRotate"),S=r.get("symbolOffset");k(d)||(d=[d,d]),k(g)||(g=[g,g]),k(y)||(y=[y,y]),k(S)||(S=[S,S]),c.from.each(function(m){b(v,m,!0),b(p,m,!1)}),f.each(function(m){var x=f.getItemModel(m).getModel("lineStyle").getLineStyle();f.setItemLayout(m,[v.getItemLayout(m),p.getItemLayout(m)]),x.stroke==null&&(x.stroke=v.getItemVisual(m,"style").fill),f.setItemVisual(m,{fromSymbolKeepAspect:v.getItemVisual(m,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(m,"symbolOffset"),fromSymbolRotate:v.getItemVisual(m,"symbolRotate"),fromSymbolSize:v.getItemVisual(m,"symbolSize"),fromSymbol:v.getItemVisual(m,"symbol"),toSymbolKeepAspect:p.getItemVisual(m,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(m,"symbolOffset"),toSymbolRotate:p.getItemVisual(m,"symbolRotate"),toSymbolSize:p.getItemVisual(m,"symbolSize"),toSymbol:p.getItemVisual(m,"symbol"),style:x})}),h.updateData(f),c.line.eachItemGraphicEl(function(m){j(m).dataModel=r,m.traverse(function(x){j(x).dataModel=r})});function b(m,x,_){var A=m.getItemModel(x);de(m,x,_,t,n);var D=A.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=oe(l,"color")),m.setItemVisual(x,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:ft(A.get("symbolOffset",!0),S[_?0:1]),symbolRotate:ft(A.get("symbolRotate",!0),y[_?0:1]),symbolSize:ft(A.get("symbolSize"),g[_?0:1]),symbol:ft(A.get("symbol",!0),d[_?0:1]),style:D})}this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e})(Ge);function wo(i,e,t){var r;i?r=P(i&&i.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return B(B({},h),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var a=new ht(r,t),n=new ht(r,t),o=new ht([],t),s=P(t.get("data"),N(_o,e,i,t));i&&(s=kt(s,N(Mo,i)));var l=_a(!!i,r);return a.initData(P(s,function(u){return u[0]}),null,l),n.initData(P(s,function(u){return u[1]}),null,l),o.initData(P(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:n,line:o}}function To(i){i.registerComponentModel(bo),i.registerComponentView(Ao),i.registerPreprocessor(function(e){Ne(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Do=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,a){return new e(t,r,a)},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})(Q),Yt=et(),Co=function(i,e,t,r){var a=r[0],n=r[1];if(!(!a||!n)){var o=Dt(i,a),s=Dt(i,n),l=o.coord,u=s.coord;l[0]=st(l[0],-1/0),l[1]=st(l[1],-1/0),u[0]=st(u[0],1/0),u[1]=st(u[1],1/0);var h=mi([{},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 ae(i){return!isNaN(i)&&!isFinite(i)}function _r(i,e,t,r){var a=1-i;return ae(e[a])&&ae(t[a])}function Io(i,e){var t=e.coord[0],r=e.coord[1],a={coord:t,x:e.x0,y:e.y0},n={coord:r,x:e.x1,y:e.y1};return Ve(i,"cartesian2d")?t&&r&&(_r(1,t,r)||_r(0,t,r))?!0:yo(i,a,n):Ct(i,a)||Ct(i,n)}function Mr(i,e,t,r,a){var n=r.coordinateSystem,o=i.getItemModel(e),s,l=R(o.get(t[0]),a.getWidth()),u=R(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition){var h=i.getValues(["x0","y0"],e),c=i.getValues(["x1","y1"],e),v=n.clampData(h),p=n.clampData(c),f=[];t[0]==="x0"?f[0]=v[0]>p[0]?c[0]:h[0]:f[0]=v[0]>p[0]?h[0]:c[0],t[1]==="y0"?f[1]=v[1]>p[1]?c[1]:h[1]:f[1]=v[1]>p[1]?h[1]:c[1],s=r.getMarkerPosition(f,t,!0)}else{var d=i.get(t[0],e),g=i.get(t[1],e),y=[d,g];n.clampData&&n.clampData(y,y),s=n.dataToPoint(y,!0)}if(Ve(n,"cartesian2d")){var S=n.getAxis("x"),b=n.getAxis("y"),d=i.get(t[0],e),g=i.get(t[1],e);ae(d)?s[0]=S.toGlobalCoord(S.getExtent()[t[0]==="x0"?0:1]):ae(g)&&(s[1]=b.toGlobalCoord(b.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Ar=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Lo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,a){r.eachSeries(function(n){var o=Q.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=P(Ar,function(c){return Mr(s,l,c,n,a)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new Y});this.group.add(h.group),this.markKeep(h);var c=ko(o,t,r);r.setData(c),c.each(function(v){var p=P(Ar,function(D){return Mr(c,v,D,t,n)}),f=o.getAxis("x").scale,d=o.getAxis("y").scale,g=f.getExtent(),y=d.getExtent(),S=[f.parse(c.get("x0",v)),f.parse(c.get("x1",v))],b=[d.parse(c.get("y0",v)),d.parse(c.get("y1",v))];X(S),X(b);var m=!(g[0]>S[1]||g[1]<S[0]||y[0]>b[1]||y[1]<b[0]),x=!m;c.setItemLayout(v,{points:p,allClipped:x});var _=c.getItemModel(v).getModel("itemStyle").getItemStyle(),A=oe(l,"color");_.fill||(_.fill=A,q(_.fill)&&(_.fill=Ke(_.fill,.4))),_.stroke||(_.stroke=A),c.setItemVisual(v,"style",_)}),c.diff(Yt(h).data).add(function(v){var p=c.getItemLayout(v);if(!p.allClipped){var f=new Jt({shape:{points:p.points}});c.setItemGraphicEl(v,f),h.group.add(f)}}).update(function(v,p){var f=Yt(h).data.getItemGraphicEl(p),d=c.getItemLayout(v);d.allClipped?f&&h.group.remove(f):(f?ia(f,{shape:{points:d.points}},r,v):f=new Jt({shape:{points:d.points}}),c.setItemGraphicEl(v,f),h.group.add(f))}).remove(function(v){var p=Yt(h).data.getItemGraphicEl(v);h.group.remove(p)}).execute(),c.eachItemGraphicEl(function(v,p){var f=c.getItemModel(p),d=c.getItemVisual(p,"style");v.useStyle(c.getItemVisual(p,"style")),fi(v,di(f),{labelFetcher:r,labelDataIndex:p,defaultText:c.getName(p)||"",inheritColor:q(d.fill)?Ke(d.fill,1):"#000"}),gi(v,f),yi(v,null,null,f.get(["emphasis","disabled"])),j(v).dataModel=r}),Yt(h).data=c,h.group.silent=r.get("silent")||t.get("silent")},e.type="markArea",e})(Ge);function ko(i,e,t){var r,a,n=["x0","y0","x1","y1"];if(i){var o=P(i&&i.dimensions,function(u){var h=e.getData(),c=h.getDimensionInfo(h.mapDimension(u))||{};return B(B({},c),{name:u,ordinalMeta:null})});a=P(n,function(u,h){return{name:u,type:o[h%2].type}}),r=new ht(a,t)}else a=[{name:"value",type:"float"}],r=new ht(a,t);var s=P(t.get("data"),N(Co,e,i,t));i&&(s=kt(s,N(Io,i)));var l=i?function(u,h,c,v){var p=u.coord[Math.floor(v/2)][v%2];return Qt(p,a[v])}:function(u,h,c,v){return Qt(u.value,a[v])};return r.initData(s,null,l),r.hasItemOption=!0,r}function Po(i){i.registerComponentModel(Do),i.registerComponentView(Lo),i.registerPreprocessor(function(e){Ne(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Ro=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Rt(te.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(te),We=et();function zo(i,e,t){We(i).coordSysRecordMap.each(function(r){var a=r.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Vo(i,e){for(var t=We(i).coordSysRecordMap,r=t.keys(),a=0;a<r.length;a++){var n=r[a],o=t.get(n),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||Ma(t,o))}}}function Ma(i,e){if(e){i.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Eo(i,e){var t={model:e,containsPoint:N(Bo,e),dispatchAction:N(Oo,i),dataZoomInfoMap:null,controller:null},r=t.controller=new ki(i.getZr());return M(["pan","zoom","scrollMove"],function(a){r.on(a,function(n){var o=[];t.dataZoomInfoMap.each(function(s){if(n.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,n);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function Oo(i,e){i.isDisposed()||i.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Bo(i,e,t,r){return i.coordinateSystem.containPoint([t,r])}function No(i){var e,t="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return i.each(function(n){var o=n.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;r[t+s]>r[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function Ho(i){i.registerProcessor(i.PRIORITY.PROCESSOR.FILTER,function(e,t){var r=We(t),a=r.coordSysRecordMap||(r.coordSysRecordMap=At());a.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=ua(n);M(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Eo(t,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=At());h.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),a.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){Ma(a,n);return}var h=No(l);o.enable(h.controlType,h.opt),o.setPointerChecker(n.containsPoint),Re(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Go=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,r,a){if(i.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),zo(a,t,{pan:C(ge.pan,this),zoom:C(ge.zoom,this),scrollMove:C(ge.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),i.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Vo(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(ha),ge={zoom:function(i,e,t,r){var a=this.range,n=a.slice(),o=i.axisModels[0];if(o){var s=ye[e](null,[r.originX,r.originY],o,t,i),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(se(0,n,[0,100],0,h.minSpan,h.maxSpan),this.range=n,a[0]!==n[0]||a[1]!==n[1])return n}},pan:wr(function(i,e,t,r,a,n){var o=ye[r]([n.oldX,n.oldY],[n.newX,n.newY],e,a,t);return o.signal*(i[1]-i[0])*o.pixel/o.pixelLength}),scrollMove:wr(function(i,e,t,r,a,n){var o=ye[r]([0,0],[n.scrollDelta,n.scrollDelta],e,a,t);return o.signal*(i[1]-i[0])*n.scrollDelta})};function wr(i){return function(e,t,r,a){var n=this.range,o=n.slice(),s=e.axisModels[0];if(s){var l=i(o,s,e,t,r,a);if(se(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var ye={grid:function(i,e,t,r,a){var n=t.axis,o={},s=a.model.coordinateSystem.getRect();return i=i||[0,0],n.dim==="x"?(o.pixel=e[0]-i[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-i[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(i,e,t,r,a){var n=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return i=i?s.pointToCoord(i):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-i[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-i[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(i,e,t,r,a){var n=t.axis,o=a.model.coordinateSystem.getRect(),s={};return i=i||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-i[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-i[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}};function Wo(i){ca(i),i.registerComponentModel(Ro),i.registerComponentView(Go),Ho(i)}var Fo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Rt(te.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:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e})(te),St=ut,Tr=7,Zo=1,me=30,$o=7,bt="horizontal",Dr="vertical",Yo=5,Ko=["line","bar","candlestick","scatter"],Uo={easing:"cubicOut",duration:100,delay:0},Xo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,r){this.api=r,this._onBrush=C(this._onBrush,this),this._onBrushEnd=C(this._onBrushEnd,this)},e.prototype.render=function(t,r,a,n){if(i.prototype.render.apply(this,arguments),Re(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(),i.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){xi(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 Y;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(r),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,r=this.api,a=t.get("brushSelect"),n=a?$o:0,o=this._findCoordRect(),s={width:r.getWidth(),height:r.getHeight()},l=this._orient===bt?{right:s.width-o.x-o.width,top:s.height-me-Tr-n,width:o.width,height:me}:{right:Tr,top:o.y,width:me,height:o.height},u=ta(t.option);M(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var h=Pt(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===Dr&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,r=this._location,a=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===bt&&!o?{scaleY:l?1:-1,scaleX:1}:a===bt&&o?{scaleY:l?1:-1,scaleX:-1}:a===Dr&&!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,a=this._displayables.sliderGroup,n=t.get("brushSelect");a.add(new St({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new St({shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:"transparent"},z2:0,onclick:C(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)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var r=this._size,a=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]!==a[0]||r[1]!==a[1]){var c=o.getDataExtent(l),v=(c[1]-c[0])*.3;c=[c[0]-v,c[1]+v];var p=[0,r[1]],f=[0,r[0]],d=[[r[0],0],[0,0]],g=[],y=f[1]/(o.count()-1),S=0,b=Math.round(o.count()/r[0]),m;o.each([l],function(w,I){if(b>0&&I%b){S+=y;return}var L=w==null||isNaN(w)||w==="",H=L?0:$(w,c,p,!0);L&&!m&&I?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!L&&m&&(d.push([S,0]),g.push([S,0])),d.push([S,H]),g.push([S,H]),S+=y,m=L}),u=this._shadowPolygonPts=d,h=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[r[0],r[1]];var x=this.dataZoomModel;function _(w){var I=x.getModel(w?"selectedDataBackground":"dataBackground"),L=new Y,H=new Jt({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),V=new ra({shape:{points:h},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return L.add(H),L.add(V),L}for(var A=0;A<3;A++){var D=_(A===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,r=t.get("showDataShadow");if(r!==!1){var a,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();M(l,function(u){if(!a&&!(r!==!0&&wt(Ko,u.get("type"))<0)){var h=n.getComponent(Si(o),s).axis,c=qo(o),v,p=u.coordinateSystem;c!=null&&p.getOtherAxis&&(v=p.getOtherAxis(h).inverse),c=u.getData().mapDimension(c),a={thisAxis:h,series:u,thisDim:o,otherDim:c,otherAxisInverse:v}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,r=this._displayables,a=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,c=l.get("brushSelect"),v=r.filler=new St({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new St({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:Zo,fill:"rgba(0,0,0,0)"}})),M([0,1],function(b){var m=l.get("handleIcon");!bi[m]&&m.indexOf("path://")<0&&m.indexOf("image://")<0&&(m="path://"+m);var x=dt(m,-1,0,2,2,null,!0);x.attr({cursor:Cr(this._orient),draggable:!0,drift:C(this._onDragMove,this,b),ondragend:C(this._onDragEnd,this),onmouseover:C(this._showDataInfo,this,!0),onmouseout:C(this._showDataInfo,this,!1),z2:5});var _=x.getBoundingRect(),A=l.get("handleSize");this._handleHeight=R(A,this._size[1]),this._handleWidth=_.width/_.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Kt(x);var D=l.get("handleColor");D!=null&&(x.style.fill=D),o.add(a[b]=x);var w=l.getModel("textStyle"),I=l.get("handleLabel")||{},L=I.show||!1;t.add(n[b]=new O({silent:!0,invisible:!L,style:Z(w,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:w.getTextColor(),font:w.getFont()}),z2:10}))},this);var p=v;if(c){var f=R(l.get("moveHandleSize"),s[1]),d=r.moveHandle=new ut({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:f}}),g=f*.8,y=r.moveHandleIcon=dt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+f/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var S=Math.min(s[1]/2,Math.max(f,10));p=r.moveZone=new ut({invisible:!0,shape:{y:s[1]-S,height:f+S}}),p.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(p)}p.attr({draggable:!0,cursor:Cr(this._orient),drift:C(this._onDragMove,this,"all"),ondragstart:C(this._showDataInfo,this,!0),ondragend:C(this._onDragEnd,this),onmouseover:C(this._showDataInfo,this,!0),onmouseout:C(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),r=this._getViewExtent();this._handleEnds=[$(t[0],[0,100],r,!0),$(t[1],[0,100],r,!0)]},e.prototype._updateInterval=function(t,r){var a=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];se(r,n,o,a.get("zoomLock")?"all":t,s.minSpan!=null?$(s.minSpan,l,o,!0):null,s.maxSpan!=null?$(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=X([$(n[0],o,l,!0),$(n[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(t){var r=this._displayables,a=this._handleEnds,n=X(a.slice()),o=this._size;M([0,1],function(p){var f=r.handles[p],d=this._handleHeight;f.attr({scaleX:d/2,scaleY:d/2,x:a[p]+(p?-1:1),y:o[1]/2-d/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;h<l.length;h++){var c=l[h],v=c.getClipPath();v||(v=new ut,c.setClipPath(v)),v.setShape({x:u[h],y:0,width:u[h+1]-u[h],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var r=this.dataZoomModel,a=this._displayables,n=a.handleLabels,o=this._orient,s=["",""];if(r.get("showDetail")){var l=r.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,h=this._range,c=t?l.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(c[0],u),this._formatLabel(c[1],u)]}}var v=X(this._handleEnds.slice());p.call(this,0),p.call(this,1);function p(f){var d=Ut(a.handles[f].parent,this.group),g=va(f===0?"right":"left",d),y=this._handleWidth/2+Yo,S=lt([v[f]+(f===0?-y:y),this._size[1]/2],d);n[f].setStyle({x:S[0],y:S[1],verticalAlign:o===bt?"middle":g,align:o===bt?g:"center",text:s[f]})}},e.prototype._formatLabel=function(t,r){var a=this.dataZoomModel,n=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=r.getPixelPrecision());var s=t==null||isNaN(t)?"":r.type==="category"||r.type==="time"?r.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return G(n)?n(t,s):q(n)?n.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var r=this.dataZoomModel.get("handleLabel")||{},a=r.show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=n.get("show")||!1,s=t||this._dragging?o:a,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,r,a,n){this._dragging=!0,Tt(n.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=lt([r,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var r=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>r[0]||a[1]<0||a[1]>r[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var r=t.offsetX,a=t.offsetY;this._brushStart=new _i(r,a),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 a=r.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=X([$(a.x,o,s,!0),$(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Tt(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,r){var a=this._displayables,n=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new St({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),a.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),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:c[1]})},e.prototype._dispatchZoomAction=function(t){var r=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Uo:null,start:r[0],end:r[1]})},e.prototype._findCoordRect=function(){var t,r=ua(this.dataZoomModel).infoList;if(!t&&r.length){var a=r[0].model.coordinateSystem;t=a.getRect&&a.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})(ha);function qo(i){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[i]}function Cr(i){return i==="vertical"?"ns-resize":"ew-resize"}function jo(i){i.registerComponentModel(Fo),i.registerComponentView(Xo),ca(i)}function Qo(i){ct(Wo),ct(jo)}var Aa={get:function(i,e,t){var r=z((Jo[i]||{})[e]);return t&&k(r)?r[r.length-1]:r}},Jo={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]}},Ir=E.mapVisual,ts=E.eachVisual,es=k,Lr=M,rs=X,as=$,ie=(function(i){T(e,i);function e(){var t=i!==null&&i.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,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,r){var a=this.option;!r&&ma(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=C(t,this),this.controllerVisuals=Ce(this.option.controller,r,t),this.targetVisuals=Ce(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(a,n){r.push(n)}):r=oa(t),r},e.prototype.eachTargetSeries=function(t,r){M(this.getTargetSeriesIndices(),function(a){var n=this.ecModel.getSeriesByIndex(a);n&&t.call(r,n)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(a){a===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,a){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;a=a||["<",">"],k(t)&&(t=t.slice(),u=!0);var h=r?t:u?[c(t[0]),c(t[1])]:c(t);if(q(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(G(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+h[1]:t[1]===s[1]?a[1]+" "+h[0]:h[0]+" - "+h[1];return h;function c(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,r=rs([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 a=t.dimensions,n=a.length-1;n>=0;n--){var o=a[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,a={inRange:r.inRange,outOfRange:r.outOfRange},n=r.target||(r.target={}),o=r.controller||(r.controller={});vt(n,a),vt(o,a);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),h.call(this,o);function l(c){es(r.color)&&!c.inRange&&(c.inRange={color:r.color.slice().reverse()}),c.inRange=c.inRange||{color:t.get("gradientColor")}}function u(c,v,p){var f=c[v],d=c[p];f&&!d&&(d=c[p]={},Lr(f,function(g,y){if(E.isValidType(y)){var S=Aa.get(y,"inactive",s);S!=null&&(d[y]=S,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function h(c){var v=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,p=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,f=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";Lr(this.stateList,function(y){var S=this.itemSize,b=c[y];b||(b=c[y]={color:s?f:[f]}),b.symbol==null&&(b.symbol=v&&z(v)||(s?g:[g])),b.symbolSize==null&&(b.symbolSize=p&&z(p)||(s?S[0]:[S[0],S[0]])),b.symbol=Ir(b.symbol,function(_){return _==="none"?g:_});var m=b.symbolSize;if(m!=null){var x=-1/0;ts(m,function(_){_>x&&(x=_)}),b.symbolSize=Ir(m,function(_){return as(_,[0,x],[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})(J),kr=[20,140],is=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,r){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){i.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=kr[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=kr[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):k(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(){i.prototype.completeVisualOption.apply(this,arguments),M(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=X((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]<t[0]&&(r[0]=t[0]),r[1]<t[0]&&(r[1]=t[0]),r},e.prototype.getValueState=function(t){var r=this.option.range,a=this.getExtent();return(r[0]<=a[0]||r[0]<=t)&&(r[1]>=a[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(a){var n=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),r.push({seriesId:a.id,dataIndex:n})},this),r},e.prototype.getVisualMeta=function(t){var r=Pr(this,"outOfRange",this.getExtent()),a=Pr(this,"inRange",this.option.range.slice()),n=[];function o(p,f){n.push({value:p,color:t(p,f)})}for(var s=0,l=0,u=a.length,h=r.length;l<h&&(!a.length||r[l]<=a[0]);l++)r[l]<a[s]&&o(r[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&n.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var c=1;l<h;l++)(!a.length||a[a.length-1]<r[l])&&(c&&(n.length&&o(n[n.length-1].value,"outOfRange"),c=0),o(r[l],"outOfRange"));var v=n.length;return{stops:n,outerColors:[v?n[0].color:"transparent",v?n[v-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Rt(ie.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,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",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e})(ie);function Pr(i,e,t){if(t[0]===t[1])return t.slice();for(var r=200,a=(t[1]-t[0])/r,n=t[0],o=[],s=0;s<=r&&n<t[1];s++)o.push(n),n+=a;return o.push(t[1]),o}var wa=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r},e.prototype.render=function(t,r,a,n){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,r,a,n)},e.prototype.renderBackground=function(t){var r=this.visualMapModel,a=Mi(r.get("padding")||0),n=t.getBoundingRect();t.add(new ut({z2:-1,silent:!0,shape:{x:n.x-a[3],y:n.y-a[0],width:n.width+a[3]+a[1],height:n.height+a[0]+a[2]},style:{fill:r.get("backgroundColor"),stroke:r.get("borderColor"),lineWidth:r.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,r,a){a=a||{};var n=a.forceState,o=this.visualMapModel,s={};if(r==="color"){var l=o.get("contentColor");s.color=l}function u(p){return s[p]}function h(p,f){s[p]=f}var c=o.controllerVisuals[n||o.getValueState(t)],v=E.prepareVisualTypes(c);return M(v,function(p){var f=c[p];a.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",f=c.__alphaForOpacity),E.dependsOn(p,r)&&f&&f.applyVisual(t,u,h)}),s[r]},e.prototype.positionGroup=function(t){var r=this.visualMapModel,a=this.api;aa(t,r.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,r,a,n){},e.type="visualMap",e})(rt),Rr=[["left","right","width"],["top","bottom","height"]];function Ta(i,e,t){var r=i.option,a=r.align;if(a!=null&&a!=="auto")return a;for(var n={width:e.getWidth(),height:e.getHeight()},o=r.orient==="horizontal"?1:0,s=Rr[o],l=[0,null,10],u={},h=0;h<3;h++)u[Rr[1-o][h]]=l[h],u[s[h]]=h===2?t[0]:r[s[h]];var c=[["x","width",3],["y","height",0]][o],v=Pt(u,n,r.padding);return s[(v.margin[c[2]]||0)+v[c[0]]+v[c[1]]*.5<n[c[1]]*.5?0:1]}function jt(i,e){return M(i||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),i}var K=$,ns=M,zr=Math.min,xe=Math.max,os=12,ss=6,ls=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,r){i.prototype.init.call(this,t,r),this._hoverLinkFromSeriesMouseOver=C(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=C(this._hideIndicator,this)},e.prototype.doRender=function(t,r,a,n){(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,r=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(r);var a=t.get("text");this._renderEndsText(r,a,0),this._renderEndsText(r,a,1),this._updateView(!0),this.renderBackground(r),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(r)},e.prototype._renderEndsText=function(t,r,a){if(r){var n=r[1-a];n=n!=null?n+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,h=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),c=this._applyTransform(a===0?"bottom":"top",u),v=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new O({style:Z(p,{x:h[0],y:h[1],verticalAlign:v==="horizontal"?"middle":c,align:v==="horizontal"?c:"center",text:n})}))}},e.prototype._renderBar=function(t){var r=this.visualMapModel,a=this._shapes,n=r.itemSize,o=this._orient,s=this._useHandle,l=Ta(r,this.api,n),u=a.mainGroup=this._createBarGroup(l),h=new Y;u.add(h),h.add(a.outOfRange=Vr()),h.add(a.inRange=Vr(null,s?Or(this._orient):null,C(this._dragHandle,this,"all",!1),C(this._dragHandle,this,"all",!0))),h.setClipPath(new ut({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var c=r.textStyleModel.getTextRect("国"),v=xe(c.width,c.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(r,u,0,n,v,o),this._createHandle(r,u,1,n,v,o)),this._createIndicator(r,u,n,v,o),t.add(u)},e.prototype._createHandle=function(t,r,a,n,o,s){var l=C(this._dragHandle,this,a,!1),u=C(this._dragHandle,this,a,!0),h=we(t.get("handleSize"),n[0]),c=dt(t.get("handleIcon"),-h/2,-h/2,h,h,null,!0),v=Or(this._orient);c.attr({cursor:v,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){Tt(y.event)}}),c.x=n[0]/2,c.useStyle(t.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Ai(c,!0),r.add(c);var p=this.visualMapModel.textStyleModel,f=new O({cursor:v,draggable:!0,drift:l,onmousemove:function(y){Tt(y.event)},ondragend:u,style:Z(p,{x:0,y:0,text:""})});f.ensureState("blur").style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var d=[h,0],g=this._shapes;g.handleThumbs[a]=c,g.handleLabelPoints[a]=d,g.handleLabels[a]=f},e.prototype._createIndicator=function(t,r,a,n,o){var s=we(t.get("indicatorSize"),a[0]),l=dt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof na){var h=l.style;l.useStyle(B({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},u))}else l.useStyle(u);r.add(l);var c=this.visualMapModel.textStyleModel,v=new O({silent:!0,invisible:!0,style:Z(c,{x:0,y:0,text:""})});this.group.add(v);var p=[(o==="horizontal"?n/2:ss)+a[0]/2,0],f=this._shapes;f.indicator=l,f.indicatorLabel=v,f.indicatorLabelPoint=p,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,r,a,n){if(this._useHandle){if(this._dragging=!r,!r){var o=this._applyTransform([a,n],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}r===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),r?!this._hovering&&this._clearHoverLinkToSeries():Er(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,r=this._dataInterval=t.getSelected(),a=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[K(r[0],a,n,!0),K(r[1],a,n,!0)]},e.prototype._updateInterval=function(t,r){r=r||0;var a=this.visualMapModel,n=this._handleEnds,o=[0,a.itemSize[1]];se(r,n,o,t,0);var s=a.getExtent();this._dataInterval=[K(n[0],o,s,!0),K(n[1],o,s,!0)]},e.prototype._updateView=function(t){var r=this.visualMapModel,a=r.getExtent(),n=this._shapes,o=[0,r.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");n.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),n.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,r,a,n){var o={forceState:n,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new wi(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,r){var a=100,n=[],o=(t[1]-t[0])/a;n.push({color:this.getControllerVisual(t[0],"color",r),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;n.push({color:this.getControllerVisual(l,"color",r),offset:s/a})}return n.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),n},e.prototype._createBarPoints=function(t,r){var a=this.visualMapModel.itemSize;return[[a[0]-r[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,a=this.visualMapModel.get("inverse");return new Y(r==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(this._useHandle){var a=this._shapes,n=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=n.itemSize,u=n.getExtent(),h=this._applyTransform("left",a.mainGroup);ns([0,1],function(c){var v=o[c];v.setStyle("fill",r.handlesColor[c]),v.y=t[c];var p=K(t[c],[0,l[1]],u,!0),f=this.getControllerVisual(p,"symbolSize");v.scaleX=v.scaleY=f/l[0],v.x=l[0]-f/2;var d=lt(a.handleLabelPoints[c],Ut(v,this.group));if(this._orient==="horizontal"){var g=h==="left"||h==="top"?(l[0]-f)/2:(l[0]-f)/-2;d[1]+=g}s[c].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,a,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,c=h.indicator;if(c){c.attr("invisible",!1);var v={convertOpacityToAlpha:!0},p=this.getControllerVisual(t,"color",v),f=this.getControllerVisual(t,"symbolSize"),d=K(t,s,u,!0),g=l[0]-f/2,y={x:c.x,y:c.y};c.y=d,c.x=g;var S=lt(h.indicatorLabelPoint,Ut(c,this.group)),b=h.indicatorLabel;b.attr("invisible",!1);var m=this._applyTransform("left",h.mainGroup),x=this._orient,_=x==="horizontal";b.setStyle({text:(a||"")+o.formatValueText(r),verticalAlign:_?m:"middle",align:_?"center":m});var A={x:g,y:d,style:{fill:p}},D={style:{x:S[0],y:S[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(A,w),b.animateTo(D,w)}else c.attr(A),b.attr(D);this._firstShowIndicator=!1;var I=this._shapes.handleLabels;if(I)for(var L=0;L<I.length;L++)this.api.enterBlur(I[L])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(r){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,n=t._applyTransform([r.offsetX,r.offsetY],t._shapes.mainGroup,!0,!0);n[1]=zr(xe(0,n[1]),a[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,r){var a=this.visualMapModel,n=a.itemSize;if(a.option.hoverLink){var o=[0,n[1]],s=a.getExtent();t=zr(xe(o[0],t),o[1]);var l=us(a,s,o),u=[t-l,t+l],h=K(t,o,s,!0),c=[K(u[0],o,s,!0),K(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),r&&(c[0]===-1/0?this._showIndicator(h,c[1],"< ",l):c[1]===1/0?this._showIndicator(h,c[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var v=this._hoverLinkDataIndices,p=[];(r||Er(a))&&(p=this._hoverLinkDataIndices=a.findTargetDataIndices(c));var f=Ti(v,p);this._dispatchHighDown("downplay",jt(f[0],a)),this._dispatchHighDown("highlight",jt(f[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r;if(Di(t.target,function(l){var u=j(l);if(u.dataIndex!=null)return r=u,!0},!0),!!r){var a=this.ecModel.getSeriesByIndex(r.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(a)){var o=a.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 a=0;a<r.length;a++)this.api.leaveBlur(r[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",jt(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,r,a,n){var o=Ut(r,n?null:this.group);return k(t)?lt(t,o,a):va(t,o,a)},e.prototype._dispatchHighDown=function(t,r){r&&r.length&&this.api.dispatchAction({type:t,batch:r})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(wa);function Vr(i,e,t,r){return new Jt({shape:{points:i},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){Tt(a.event)},ondragend:r})}function us(i,e,t){var r=os/2,a=i.get("hoverLinkDataSize");return a&&(r=K(a,e,t,!0)/2),r}function Er(i){var e=i.get("hoverLinkOnHandle");return!!(e??i.get("realtime"))}function Or(i){return i==="vertical"?"ns-resize":"ew-resize"}var hs={type:"selectDataRange",event:"dataRangeSelected",update:"update"},cs=function(i,e){e.eachComponent({mainType:"visualMap",query:i},function(t){t.setSelected(i.selected)})},vs=[{createOnAllSeries:!0,reset:function(i,e){var t=[];return e.eachComponent("visualMap",function(r){var a=i.pipelineContext;!r.isTargetSeries(i)||a&&a.large||t.push(Zn(r.stateList,r.targetVisuals,C(r.getValueState,r),r.getDataDimensionIndex(i.getData())))}),t}},{createOnAllSeries:!0,reset:function(i,e){var t=i.getData(),r=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(i)){var n=a.getVisualMeta(C(ps,null,i,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(n.dimension=o,r.push(n))}}),i.getData().setVisual("visualMeta",r)}}];function ps(i,e,t,r){for(var a=e.targetVisuals[r],n=E.prepareVisualTypes(a),o={color:oe(i.getData(),"color")},s=0,l=n.length;s<l;s++){var u=n[s],h=a[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(t,c,v)}return o.color;function c(p){return o[p]}function v(p,f){o[p]=f}}var Br=M;function fs(i){var e=i&&i.visualMap;k(e)||(e=e?[e]:[]),Br(e,function(t){if(t){pt(t,"splitList")&&!pt(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var r=t.pieces;r&&k(r)&&Br(r,function(a){Lt(a)&&(pt(a,"start")&&!pt(a,"min")&&(a.min=a.start),pt(a,"end")&&!pt(a,"max")&&(a.max=a.end))})}})}function pt(i,e){return i&&i.hasOwnProperty&&i.hasOwnProperty(e)}var Nr=!1;function Da(i){Nr||(Nr=!0,i.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),i.registerAction(hs,cs),M(vs,function(e){i.registerVisual(i.PRIORITY.VISUAL.COMPONENT,e)}),i.registerPreprocessor(fs))}function ds(i){i.registerComponentModel(is),i.registerComponentView(ls),Da(i)}var gs=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,r){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],ys[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var n=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=z(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=P(this._pieceList,function(l){return l=z(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},a=E.listVisualTypes(),n=this.isCategory();M(t.pieces,function(s){M(a,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),M(r,function(s,l){var u=!1;M(this.stateList,function(h){u=u||o(t,h,l)||o(t.target,h,l)},this),!u&&M(this.stateList,function(h){(t[h]||(t[h]={}))[l]=Aa.get(l,h==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}i.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,r){var a=this.option,n=this._pieceList,o=(r?a:t).selected||{};if(a.selected=o,M(n,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),a.selectedMode==="single"){var s=!1;M(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=z(t)},e.prototype.getValueState=function(t){var r=E.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],a=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=E.findPieceIndex(l,a);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 a=t.interval||[];r=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],a=["",""],n=this;function o(h,c){var v=n.getRepresentValue({interval:h});c||(c=n.getValueState(v));var p=t(v,c);h[0]===-1/0?a[0]=p:h[1]===1/0?a[1]=p:r.push({value:h[0],color:p},{value:h[1],color:p})}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 M(s,function(h){var c=h.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:r,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=Rt(ie.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})(ie),ys={splitNumber:function(i){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var n=(r[1]-r[0])/a;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&i.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<a;s+=n,o++){var l=o===a-1?r[1]:s+n;i.push({interval:[s,l],close:[1,1]})}e.maxOpen&&i.push({interval:[r[1],1/0],close:[0,0]}),Ue(i),M(i,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(i){var e=this.option;M(e.categories,function(t){i.push({text:this.formatValueText(t,!0),value:t})},this),Hr(e,i)},pieces:function(i){var e=this.option;M(e.pieces,function(t,r){Lt(t)||(t={value:t});var a={text:"",index:r};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var n=a.value=t.value;a.interval=[n,n],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],h=[],c=0;c<2;c++){for(var v=[["gte","gt","min"],["lte","lt","max"]][c],p=0;p<3&&o[c]==null;p++)o[c]=t[v[p]],s[c]=l[p],h[c]=p===2;o[c]==null&&(o[c]=u[c])}h[0]&&o[1]===1/0&&(s[0]=0),h[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=E.retrieveVisuals(t),i.push(a)},this),Hr(e,i),Ue(i),M(i,function(t){var r=t.close,a=[["<","≤"][r[1]],[">","≥"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function Hr(i,e){var t=i.inverse;(i.orient==="vertical"?!t:t)&&e.reverse()}var ms=(function(i){T(e,i);function e(){var t=i!==null&&i.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,a=r.get("textGap"),n=r.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=r.itemSize,h=this._getViewData(),c=h.endsText,v=st(r.get("showLabel",!0),!c),p=!r.get("selectedMode");c&&this._renderEndsText(t,c[0],u,v,l),M(h.viewPieceList,function(f){var d=f.piece,g=new Y;g.onclick=C(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]],p),v){var S=this.visualMapModel.getValueState(y);g.add(new O({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:S==="outOfRange"?.5:1},silent:p}))}t.add(g)},this),c&&this._renderEndsText(t,c[1],u,v,l),Ci(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var a=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:jt(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return Ta(t,this.api,t.itemSize);var a=r.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,r,a,n,o){if(r){var s=new Y,l=this.visualMapModel.textStyleModel;s.add(new O({style:Z(l,{x:n?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:n?o:"center",text:r})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=P(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?r.reverse():a&&(a=a.slice().reverse()),{viewPieceList:r,endsText:a}},e.prototype._createItemSymbol=function(t,r,a,n){var o=dt(this.getControllerVisual(r,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(r,"color"));o.silent=n,t.add(o)},e.prototype._onItemClick=function(t){var r=this.visualMapModel,a=r.option,n=a.selectedMode;if(n){var o=z(a.selected),s=r.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,M(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})(wa);function xs(i){i.registerComponentModel(gs),i.registerComponentView(ms),Da(i)}function Ss(i){ct(ds),ct(xs)}ct([ro,Ln,Qo,Bi,Nn,Po,To,So,Ni,pn,Ii,Tn,vo,Ss]);
|
|
1
|
+
import{_ as T,cL as Gr,cM as La,cN as Wr,cO as Fe,cP as Fr,cj as Zr,b5 as Se,cz as lt,bR as Mt,be as $r,bQ as J,c6 as ke,a1 as ne,bO as Yr,bV as tt,cQ as ka,aC as et,y as M,cR as Ze,cy as be,cx as Kr,a4 as R,H as k,m as P,aL as z,cS as It,M as Ur,bT as U,k as F,bx as ot,a9 as Lt,aX as Xr,Z as O,b3 as Z,l as j,a2 as qr,bS as Pa,G as Y,cC as jr,ai as Ra,bh as kt,i as Qr,X as ct,cT as Jr,cG as _e,T as N,bU as rt,aj as st,cU as za,cV as Va,cW as Ea,aB as Pt,cX as Oa,cY as Ba,cZ as Na,c_ as ta,c$ as Ha,d0 as ea,R as ut,aw as ra,D as q,d1 as Ga,o as G,N as B,d2 as $e,d3 as Wa,d4 as Fa,bN as vt,d5 as Za,a_ as At,aW as _t,cs as $a,b0 as aa,a3 as wt,x as ia,d6 as Ya,c8 as Me,ab as ft,bc as Ka,aV as Ua,al as na,cc as Xa,a$ as oa,d7 as sa,d8 as la,d9 as mt,W as Pe,da as Bt,db as qa,cv as Re,cB as ja,f as C,dc as Qa,aY as Ye,dd as Ja,de as ti,at as ht,E as Rt,df as ze,aN as Ae,dg as Kt,aq as we,a5 as X,bW as ei,dh as ri,di as ai,a as dt,ae as ii,af as ni,dj as oi,dk as si,aH as li,dl as Qt,dm as ui,dn as hi,dp as ci,dq as oe,dr as vi,b as pi,bg as Ke,aK as Jt,r as fi,u as di,s as gi,t as yi,c4 as mi,ds as te,dt as ua,du as ha,cA as se,dv as ca,cw as xi,aA as $,dw as Si,dx as bi,dy as Ut,dz as va,bL as Tt,au as _i,dA as Mi,b9 as Ai,L as wi,dB as Ti,cu as Di,dC as Ue,dD as Ci}from"./echarts-runtime-CvLr4Slh.js";import{V as E,i as Ii}from"./VisualMapping-j08W3KBm.js";import{L as Li,R as ki}from"./LineDraw-vPRTWiQ5.js";import{f as Pi,h as Ri,s as zi,d as le,u as Vi,e as Xe,j as Ei,b as Oi,i as Bi,a as Ni}from"./customGraphicKeyframeAnimation-CYLPurwK.js";import{i as Ve}from"./CoordinateSystem-C8P-Cleg.js";import{S as Hi}from"./SymbolDraw-DOl_Tss3.js";import"./index-CgkdZ6Oc.js";import"./labelHelper-DbITmOUW.js";var Gi=(function(i){T(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,a,n,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),c=s.dataToCoord(r),v=n.get("type");if(v&&v!=="none"){var p=Gr(n),f=Fi[v](s,l,c,h);f.style=p,t.graphicKey=f.type,t.pointer=f}var d=n.get(["label","margin"]),g=Wi(r,a,n,l,d);La(t,a,n,o,g)},e})(Wr);function Wi(i,e,t,r,a){var n=e.axis,o=n.dataToCoord(i),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,h,c;if(n.dim==="radius"){var v=$r();Zr(v,v,s),Se(v,v,[r.cx,r.cy]),u=lt([o,-a],v);var p=e.getModel("axisLabel").get("rotate")||0,f=Mt.innerTextLayout(s,p*Math.PI/180,-1);h=f.textAlign,c=f.textVerticalAlign}else{var d=l[1];u=r.coordToPoint([d+a,o]);var g=r.cx,y=r.cy;h=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:h,verticalAlign:c}}var Fi={line:function(i,e,t,r){return i.dim==="angle"?{type:"Line",shape:Fr(e.coordToPoint([r[0],t]),e.coordToPoint([r[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(i,e,t,r){var a=Math.max(1,i.getBandWidth()),n=Math.PI/180;return i.dim==="angle"?{type:"Sector",shape:Fe(e.cx,e.cy,r[0],r[1],(-t-a/2)*n,(-t+a/2)*n)}:{type:"Sector",shape:Fe(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},Zi=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var r,a=this.ecModel;return a.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})(J),Ee=(function(i){T(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ke).models[0]},e.type="polarAxis",e})(J);ne(Ee,Yr);var $i=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(Ee),Yi=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(Ee),Oe=(function(i){T(e,i);function e(t,r){return i.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})(tt);Oe.prototype.dataToRadius=tt.prototype.dataToCoord;Oe.prototype.radiusToData=tt.prototype.coordToData;var Ki=et(),Be=(function(i){T(e,i);function e(t,r){return i.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(),a=t.scale,n=a.getExtent(),o=a.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=ka(s==null?"":s+"",r.getFont(),"center","top"),c=Math.max(h.height,7),v=c/u;isNaN(v)&&(v=1/0);var p=Math.max(0,Math.floor(v)),f=Ki(t.model),d=f.lastAutoInterval,g=f.lastTickCount;return d!=null&&g!=null&&Math.abs(d-p)<=1&&Math.abs(g-o)<=1&&d>p?p=d:(f.lastTickCount=o,f.lastAutoInterval=p),p},e})(tt);Be.prototype.dataToAngle=tt.prototype.dataToCoord;Be.prototype.angleToData=tt.prototype.coordToData;var pa=["radius","angle"],Ui=(function(){function i(e){this.dimensions=pa,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Oe,this._angleAxis=new Be,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return i.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},i.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},i.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},i.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},i.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,a=this._radiusAxis;return r.scale.type===e&&t.push(r),a.scale.type===e&&t.push(a),t},i.prototype.getAngleAxis=function(){return this._angleAxis},i.prototype.getRadiusAxis=function(){return this._radiusAxis},i.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},i.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},i.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},i.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},i.prototype.pointToData=function(e,t){var r=this.pointToCoord(e);return[this._radiusAxis.radiusToData(r[0],t),this._angleAxis.angleToData(r[1],t)]},i.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,a=this.getAngleAxis(),n=a.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);a.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=u<o?1:-1;u<o||u>s;)u+=h*360;return[l,u]},i.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,a=Math.cos(r)*t+this.cx,n=-Math.sin(r)*t+this.cy;return[a,n]},i.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var a=e.getExtent(),n=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-a[0]*n,endAngle:-a[1]*n,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,h=l-this.cy,c=u*u+h*h,v=this.r,p=this.r0;return v!==p&&c-o<=v*v&&c+o>=p*p}}},i.prototype.convertToPixel=function(e,t,r){var a=qe(t);return a===this?this.dataToPoint(r):null},i.prototype.convertFromPixel=function(e,t,r){var a=qe(t);return a===this?this.pointToData(r):null},i})();function qe(i){var e=i.seriesModel,t=i.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Xi(i,e,t){var r=e.get("center"),a=t.getWidth(),n=t.getHeight();i.cx=R(r[0],a),i.cy=R(r[1],n);var o=i.getRadiusAxis(),s=Math.min(a,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:k(l)||(l=[0,l]);var u=[R(l[0],s),R(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function qi(i,e){var t=this,r=t.getAngleAxis(),a=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),i.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();M(Ze(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),M(Ze(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),be(r.scale,r.model),be(a.scale,a.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 ji(i){return i.mainType==="angleAxis"}function je(i,e){var t;if(i.type=e.get("type"),i.scale=Kr(e),i.onBand=e.get("boundaryGap")&&i.type==="category",i.inverse=e.get("inverse"),ji(e)){i.inverse=i.inverse!==e.get("clockwise");var r=e.get("startAngle"),a=(t=e.get("endAngle"))!==null&&t!==void 0?t:r+(i.inverse?-360:360);i.setExtent(r,a)}e.axis=i,i.model=e}var Qi={dimensions:pa,create:function(i,e){var t=[];return i.eachComponent("polar",function(r,a){var n=new Ui(a+"");n.update=qi;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");je(o,l),je(s,u),Xi(n,r,e),t.push(n),r.coordinateSystem=n,n.model=r}),i.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var a=r.getReferringComponents("polar",ke).models[0];r.coordinateSystem=a.coordinateSystem}}),t}},Ji=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Nt(i,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=i.coordToPoint([e[0],t]),a=i.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:a[0],y2:a[1]}}function Ht(i){var e=i.getRadiusAxis();return e.inverse?0:1}function Qe(i){var e=i[0],t=i[i.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&i.pop()}var tn=(function(i){T(e,i);function e(){var t=i!==null&&i.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 a=t.axis,n=a.polar,o=n.getRadiusAxis().getExtent(),s=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=P(a.getViewLabels(),function(h){h=z(h);var c=a.scale,v=c.type==="ordinal"?c.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=a.dataToCoord(v),h});Qe(u),Qe(s),M(Ji,function(h){t.get([h,"show"])&&(!a.scale.isBlank()||h==="axisLine")&&en[h](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e})(It),en={axisLine:function(i,e,t,r,a,n){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=Ht(t),c=h?0:1,v,p=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[c]===0?v=new qr[p]({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}):v=new Pa({shape:{cx:t.cx,cy:t.cy,r:n[h],r0:n[c]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,i.add(v)},axisTick:function(i,e,t,r,a,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[Ht(t)],u=P(r,function(h){return new ot({shape:Nt(t,[l,l+s],h.coord)})});i.add(U(u,{style:F(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(i,e,t,r,a,n){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[Ht(t)],h=[],c=0;c<a.length;c++)for(var v=0;v<a[c].length;v++)h.push(new ot({shape:Nt(t,[u,u+l],a[c][v].coord)}));i.add(U(h,{style:F(s.getModel("lineStyle").getLineStyle(),F(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(i,e,t,r,a,n,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),h=e.get("triggerEvent");M(o,function(c,v){var p=l,f=c.tickValue,d=n[Ht(t)],g=t.coordToPoint([d+u,c.coord]),y=t.cx,S=t.cy,b=Math.abs(g[0]-y)/d<.3?"center":g[0]>y?"left":"right",m=Math.abs(g[1]-S)/d<.3?"middle":g[1]>S?"top":"bottom";if(s&&s[f]){var x=s[f];Lt(x)&&x.textStyle&&(p=new Xr(x.textStyle,l,l.ecModel))}var _=new O({silent:Mt.isLabelSilent(e),style:Z(p,{x:g[0],y:g[1],fill:p.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:b,verticalAlign:m})});if(i.add(_),h){var A=Mt.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=c.rawLabel,j(_).eventData=A}},this)},splitLine:function(i,e,t,r,a,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=[],c=0;c<r.length;c++){var v=u++%l.length;h[v]=h[v]||[],h[v].push(new ot({shape:Nt(t,n,r[c].coord)}))}for(var c=0;c<h.length;c++)i.add(U(h[c],{style:F({stroke:l[c%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(i,e,t,r,a,n){if(a.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var h=0;h<a[u].length;h++)l.push(new ot({shape:Nt(t,n,a[u][h].coord)}));i.add(U(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(i,e,t,r,a,n){if(r.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=Math.PI/180,v=-r[0].coord*c,p=Math.min(n[0],n[1]),f=Math.max(n[0],n[1]),d=e.get("clockwise"),g=1,y=r.length;g<=y;g++){var S=g===y?r[0].coord:r[g].coord,b=u++%l.length;h[b]=h[b]||[],h[b].push(new Ur({shape:{cx:t.cx,cy:t.cy,r0:p,r:f,startAngle:v,endAngle:-S*c,clockwise:d},silent:!0})),v=-S*c}for(var g=0;g<h.length;g++)i.add(U(h[g],{style:F({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},rn=["axisLine","axisTickLabel","axisName"],an=["splitLine","splitArea","minorSplitLine"],nn=(function(i){T(e,i);function e(){var t=i!==null&&i.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 a=this._axisGroup,n=this._axisGroup=new Y;this.group.add(n);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),h=o.getMinorTicksCoords(),c=l.getExtent()[0],v=o.getExtent(),p=sn(s,t,c),f=new Mt(t,p);M(rn,f.add,f),n.add(f.getGroup()),jr(a,n,t),M(an,function(d){t.get([d,"show"])&&!o.scale.isBlank()&&on[d](this.group,t,s,c,v,u,h)},this)}},e.type="radiusAxis",e})(It),on={splitLine:function(i,e,t,r,a,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,h=t.getAngleAxis(),c=Math.PI/180,v=h.getExtent(),p=Math.abs(v[1]-v[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var f=[],d=0;d<n.length;d++){var g=u++%l.length;f[g]=f[g]||[],f[g].push(new qr[p]({shape:{cx:t.cx,cy:t.cy,r:Math.max(n[d].coord,0),startAngle:-v[0]*c,endAngle:-v[1]*c,clockwise:h.inverse}}))}for(var d=0;d<f.length;d++)i.add(U(f[d],{style:F({stroke:l[d%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(i,e,t,r,a,n,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],h=0;h<o.length;h++)for(var c=0;c<o[h].length;c++)u.push(new Ra({shape:{cx:t.cx,cy:t.cy,r:o[h][c].coord}}));i.add(U(u,{style:F({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(i,e,t,r,a,n){if(n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=n[0].coord,v=1;v<n.length;v++){var p=u++%l.length;h[p]=h[p]||[],h[p].push(new Ur({shape:{cx:t.cx,cy:t.cy,r0:c,r:n[v].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),c=n[v].coord}for(var v=0;v<h.length;v++)i.add(U(h[v],{style:F({fill:l[v%l.length]},s.getAreaStyle()),silent:!0}))}}};function sn(i,e,t){return{position:[i.cx,i.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function fa(i){return i.get("stack")||"__ec_stack_"+i.seriesIndex}function da(i,e){return e.dim+i.model.componentIndex}function ln(i,e,t){var r={},a=un(kt(e.getSeriesByType(i),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(i,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=da(s,l),h=fa(n),c=a[u][h],v=c.offset,p=c.width,f=s.getOtherAxis(l),d=n.coordinateSystem.cx,g=n.coordinateSystem.cy,y=n.get("barMinHeight")||0,S=n.get("barMinAngle")||0;r[h]=r[h]||[];for(var b=o.mapDimension(f.dim),m=o.mapDimension(l.dim),x=Qr(o,b),_=l.dim!=="radius"||!n.get("roundCap",!0),A=f.model,D=A.get("startValue"),w=f.dataToCoord(D||0),I=0,L=o.count();I<L;I++){var H=o.get(b,I),V=o.get(m,I),at=H>=0?"p":"n",it=w;x&&(r[h][V]||(r[h][V]={p:w,n:w}),it=r[h][V][at]);var zt=void 0,Vt=void 0,gt=void 0,yt=void 0;if(f.dim==="radius"){var Et=f.dataToCoord(H)-w,Ca=l.dataToCoord(V);Math.abs(Et)<y&&(Et=(Et<0?-1:1)*y),zt=it,Vt=it+Et,gt=Ca-v,yt=gt-p,x&&(r[h][V][at]=Vt)}else{var Ot=f.dataToCoord(H,_)-w,Ia=l.dataToCoord(V);Math.abs(Ot)<S&&(Ot=(Ot<0?-1:1)*S),zt=Ia+v,Vt=zt+p,gt=it,yt=it+Ot,x&&(r[h][V][at]=yt)}o.setItemLayout(I,{cx:d,cy:g,r0:zt,r:Vt,startAngle:-gt*Math.PI/180,endAngle:-yt*Math.PI/180,clockwise:gt>=yt})}}})}function un(i){var e={};M(i,function(r,a){var n=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=da(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),c=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;e[l]=c;var p=fa(r);v[p]||c.autoWidthCount++,v[p]=v[p]||{width:0,maxWidth:0};var f=R(r.get("barWidth"),h),d=R(r.get("barMaxWidth"),h),g=r.get("barGap"),y=r.get("barCategoryGap");f&&!v[p].width&&(f=Math.min(c.remainedWidth,f),v[p].width=f,c.remainedWidth-=f),d&&(v[p].maxWidth=d),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var t={};return M(e,function(r,a){t[a]={};var n=r.stacks,o=r.bandWidth,s=R(r.categoryGap,o),l=R(r.gap,1),u=r.remainedWidth,h=r.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),M(n,function(d,g){var y=d.maxWidth;y&&y<c&&(y=Math.min(y,u),d.width&&(y=Math.min(y,d.width)),u-=y,d.width=y,h--)}),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var v=0,p;M(n,function(d,g){d.width||(d.width=c),p=d,v+=d.width*(1+l)}),p&&(v-=p.width*l);var f=-v/2;M(n,function(d,g){t[a][g]=t[a][g]||{offset:f,width:d.width},f+=d.width*(1+l)})}),t}var hn={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},cn={splitNumber:5},vn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e})(rt);function pn(i){ct(Jr),It.registerAxisPointerClass("PolarAxisPointer",Gi),i.registerCoordinateSystem("polar",Qi),i.registerComponentModel(Zi),i.registerComponentView(vn),_e(i,"angle",$i,hn),_e(i,"radius",Yi,cn),i.registerComponentView(tn),i.registerComponentView(nn),i.registerLayout(N(ln,"bar"))}function Te(i,e){e=e||{};var t=i.coordinateSystem,r=i.axis,a={},n=r.position,o=r.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var h={horizontal:0,vertical:1};a.rotation=Math.PI/2*h[o];var c={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=c[n],i.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),st(e.labelInside,i.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var v=e.rotate;return v==null&&(v=i.get(["axisLabel","rotate"])),a.labelRotation=n==="top"?-v:v,a.z2=1,a}var fn=["axisLine","axisTickLabel","axisName"],dn=["splitArea","splitLine"],gn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,a,n){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Y;var l=Te(t),u=new Mt(t,l);M(fn,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),M(dn,function(h){t.get([h,"show"])&&yn[h](this,this.group,this._axisGroup,t)},this),jr(s,this._axisGroup,t),i.prototype.render.call(this,t,r,a,n)},e.prototype.remove=function(){za(this)},e.type="singleAxis",e})(It),yn={splitLine:function(i,e,t,r){var a=r.axis;if(!a.scale.isBlank()){var n=r.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=r.coordinateSystem.getRect(),h=a.isHorizontal(),c=[],v=0,p=a.getTicksCoords({tickModel:n}),f=[],d=[],g=0;g<p.length;++g){var y=a.toGlobalCoord(p[g].coord);h?(f[0]=y,f[1]=u.y,d[0]=y,d[1]=u.y+u.height):(f[0]=u.x,f[1]=y,d[0]=u.x+u.width,d[1]=y);var S=new ot({shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},silent:!0});Ea(S.shape,l);var b=v++%s.length;c[b]=c[b]||[],c[b].push(S)}for(var m=o.getLineStyle(["color"]),g=0;g<c.length;++g)e.add(U(c[g],{style:F({stroke:s[g%s.length]},m),silent:!0}))}},splitArea:function(i,e,t,r){Va(i,t,r,r)}},Xt=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e})(J);ne(Xt,Yr.prototype);var mn=(function(i){T(e,i);function e(t,r,a,n,o){var s=i.call(this,t,r,a)||this;return 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.pointToData=function(t,r){return this.coordinateSystem.pointToData(t)[0]},e})(tt),ga=["single"],xn=(function(){function i(e,t,r){this.type="single",this.dimension="single",this.dimensions=ga,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return i.prototype._init=function(e,t,r){var a=this.dimension,n=new mn(a,Kr(e),[0,0],e.get("type"),e.get("position")),o=n.type==="category";n.onBand=o&&e.get("boundaryGap"),n.inverse=e.get("inverse"),n.orient=e.get("orient"),e.axis=n,n.model=e,n.coordinateSystem=this,this._axis=n},i.prototype.update=function(e,t){e.eachSeries(function(r){if(r.coordinateSystem===this){var a=r.getData();M(a.mapDimensionsAll(this.dimension),function(n){this._axis.scale.unionExtentFromData(a,n)},this),be(this._axis.scale,this._axis.model)}},this)},i.prototype.resize=function(e,t){this._rect=Pt({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},i.prototype.getRect=function(){return this._rect},i.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),a=r?[0,e.width]:[0,e.height],n=t.inverse?1:0;t.setExtent(a[n],a[1-n]),this._updateAxisTransform(t,r?e.x:e.y)},i.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),a=r[0]+r[1],n=e.isHorizontal();e.toGlobalCoord=n?function(o){return o+t}:function(o){return a-o+t},e.toLocalCoord=n?function(o){return o-t}:function(o){return a-o+t}},i.prototype.getAxis=function(){return this._axis},i.prototype.getBaseAxis=function(){return this._axis},i.prototype.getAxes=function(){return[this._axis]},i.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},i.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),a=r.orient;return a==="horizontal"?r.contain(r.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},i.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},i.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),a=[],n=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[n]=t.toGlobalCoord(t.dataToCoord(+e)),a[1-n]=n===0?r.y+r.height/2:r.x+r.width/2,a},i.prototype.convertToPixel=function(e,t,r){var a=Je(t);return a===this?this.dataToPoint(r):null},i.prototype.convertFromPixel=function(e,t,r){var a=Je(t);return a===this?this.pointToData(r):null},i})();function Je(i){var e=i.seriesModel,t=i.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Sn(i,e){var t=[];return i.eachComponent("singleAxis",function(r,a){var n=new xn(r,i,e);n.name="single_"+a,n.resize(r,e),r.coordinateSystem=n,t.push(n)}),i.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var a=r.getReferringComponents("singleAxis",ke).models[0];r.coordinateSystem=a&&a.coordinateSystem}}),t}var bn={create:Sn,dimensions:ga},tr=["x","y"],_n=["width","height"],Mn=(function(i){T(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,a,n,o){var s=a.axis,l=s.coordinateSystem,u=ue(l,1-ee(s)),h=l.dataToPoint(r)[0],c=n.get("type");if(c&&c!=="none"){var v=Gr(n),p=An[c](s,h,u);p.style=v,t.graphicKey=p.type,t.pointer=p}var f=Te(a);Oa(r,t,f,a,n,o)},e.prototype.getHandleTransform=function(t,r,a){var n=Te(r,{labelInside:!1});n.labelMargin=a.get(["handle","margin"]);var o=Ba(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,a,n){var o=a.axis,s=o.coordinateSystem,l=ee(o),u=ue(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 c=ue(s,1-l),v=(c[1]+c[0])/2,p=[v,v];return p[l]=h[l],{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},e})(Wr),An={line:function(i,e,t){var r=Fr([e,t[0]],[e,t[1]],ee(i));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(i,e,t){var r=i.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:Na([e-r/2,t[0]],[r,a],ee(i))}}};function ee(i){return i.isHorizontal()?0:1}function ue(i,e){var t=i.getRect();return[t[tr[e]],t[tr[e]]+t[_n[e]]]}var wn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(rt);function Tn(i){ct(Jr),It.registerAxisPointerClass("SingleAxisPointer",Mn),i.registerComponentView(wn),i.registerComponentView(gn),i.registerComponentModel(Xt),_e(i,"single",Xt,Xt.defaultOption),i.registerCoordinateSystem("single",bn)}var Dn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,a){var n=ta(t);i.prototype.init.apply(this,arguments),er(t,n)},e.prototype.mergeOption=function(t){i.prototype.mergeOption.apply(this,arguments),er(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})(J);function er(i,e){var t=i.cellSize,r;k(t)?r=t:r=i.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var a=P([0,1],function(n){return Ha(e,n)&&(r[n]="auto"),r[n]!=null&&r[n]!=="auto"});ea(i,e,{type:"box",ignoreSize:a})}var Cn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,a){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,a){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,c=new ut({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});a.add(c)}},e.prototype._renderLines=function(t,r,a,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 c=r.start,v=0;c.time<=r.end.time;v++){f(c.formatedDate),v===0&&(c=s.getDateInfo(r.start.y+"-"+r.start.m));var p=c.date;p.setMonth(p.getMonth()+1),c=s.getDateInfo(p)}f(s.getNextNDay(r.end.time,1).formatedDate);function f(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,a);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,a),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,a),l,n)},e.prototype._getEdgesPoints=function(t,r,a){var n=[t[0].slice(),t[t.length-1].slice()],o=a==="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,a){var n=new ra({z2:20,shape:{points:t},style:r});a.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,r,a){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[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return q(t)&&t?Ga(t,r):G(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,a,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,a,n){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,v=a==="horizontal"?0:1,p={top:[h,u[v][1]],bottom:[h,u[1-v][1]],left:[u[1-v][0],c],right:[u[v][0],c]},f=r.start.y;+r.end.y>+r.start.y&&(f=f+"-"+r.end.y);var d=o.get("formatter"),g={start:r.start.y,end:r.end.y,nameMap:f},y=this._formatterLabel(d,g),S=new O({z2:30,style:Z(o,{text:y}),silent:o.get("silent")});S.attr(this._yearTextPositionControl(S,p[l],a,l,s)),n.add(S)}},e.prototype._monthTextPositionControl=function(t,r,a,n,o){var s="left",l="top",u=t[0],h=t[1];return a==="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,a,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"),c=[this._tlpoints,this._blpoints];(!s||q(s))&&(s&&(r=$e(s)||r),s=r.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,p=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var f=h==="center",d=o.get("silent"),g=0;g<c[v].length-1;g++){var y=c[v][g].slice(),S=this._firstDayOfMonth[g];if(f){var b=this._firstDayPoints[g];y[p]=(b[p]+c[0][g+1][p])/2}var m=o.get("formatter"),x=s[+S.m-1],_={yyyy:S.y,yy:(S.y+"").slice(2),MM:S.m,M:+S.m,nameMap:x},A=this._formatterLabel(m,_),D=new O({z2:30,style:B(Z(o,{text:A}),this._monthTextPositionControl(y,f,a,u,l)),silent:d});n.add(D)}}},e.prototype._weekTextPositionControl=function(t,r,a,n,o){var s="center",l="middle",u=t[0],h=t[1],c=a==="start";return r==="horizontal"?(u=u+n+(c?1:-1)*o[0]/2,s=c?"right":"left"):(h=h+n+(c?1:-1)*o[1]/2,l=c?"bottom":"top"),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,r,a,n,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),h=s.get("nameMap"),c=s.get("margin"),v=l.getFirstDayOfWeek();if(!h||q(h)){h&&(r=$e(h)||r);var p=r.get(["time","dayOfWeekShort"]);h=p||P(r.get(["time","dayOfWeekAbbr"]),function(_){return _[0]})}var f=l.getNextNDay(a.end.time,7-a.lweek).time,d=[l.getCellWidth(),l.getCellHeight()];c=R(c,Math.min(d[1],d[0])),u==="start"&&(f=l.getNextNDay(a.start.time,-(7+a.fweek)).time,c=-c);for(var g=s.get("silent"),y=0;y<7;y++){var S=l.getNextNDay(f,y),b=l.dataToRect([S.time],!1).center,m=y;m=Math.abs((y+v)%7);var x=new O({z2:30,style:B(Z(s,{text:h[m]}),this._weekTextPositionControl(b,n,u,c,d)),silent:g});o.add(x)}}},e.type="calendar",e})(rt),he=864e5,In=(function(){function i(e,t,r){this.type="calendar",this.dimensions=i.dimensions,this.getDimensionsInfo=i.getDimensionsInfo,this._model=e}return i.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},i.prototype.getRangeInfo=function(){return this._rangeInfo},i.prototype.getModel=function(){return this._model},i.prototype.getRect=function(){return this._rect},i.prototype.getCellWidth=function(){return this._sw},i.prototype.getCellHeight=function(){return this._sh},i.prototype.getOrient=function(){return this._orient},i.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},i.prototype.getDateInfo=function(e){e=Wa(e);var t=e.getFullYear(),r=e.getMonth()+1,a=r<10?"0"+r:""+r,n=e.getDate(),o=n<10?"0"+n:""+n,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+a+"-"+o,date:e}},i.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},i.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,a=["width","height"],n=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[r,7]:[7,r];M([0,1],function(c){h(n,c)&&(o[a[c]]=n[c]*s[c])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Pt(o,l);M([0,1],function(c){h(n,c)||(n[c]=u[a[c]]/s[c])});function h(c,v){return c[v]!=null&&c[v]!=="auto"}this._sw=n[0],this._sh=n[1]},i.prototype.dataToPoint=function(e,t){k(e)&&(e=e[0]),t==null&&(t=!0);var r=this.getDateInfo(e),a=this._rangeInfo,n=r.formatedDate;if(t&&!(r.time>=a.start.time&&r.time<a.end.time+he))return[NaN,NaN];var o=r.day,s=this._getRangeInfo([a.start.time,n]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},i.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},i.prototype.dataToRect=function(e,t){var r=this.dataToPoint(e,t);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},i.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,r=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,t-1,a):this._getDateByWeeksAndDay(t,r-1,a)},i.prototype.convertToPixel=function(e,t,r){var a=rr(t);return a===this?a.dataToPoint(r):null},i.prototype.convertFromPixel=function(e,t,r){var a=rr(t);return a===this?a.pointToData(r):null},i.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},i.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(k(e)&&e.length===1&&(e=e[0]),k(e))t=e;else{var r=e.toString();if(/^\d{4}$/.test(r)&&(t=[r+"-01-01",r+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(r)){var a=this.getDateInfo(r),n=a.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r)&&(t=[r,r])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},i.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 a=Math.floor(t[1].time/he)-Math.floor(t[0].time/he)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+a-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;)a-=u,n.setDate(l-u);var h=Math.floor((a+t[0].day+6)/7),c=r?-h+1:h-1;return r&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:h,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},i.prototype._getDateByWeeksAndDay=function(e,t,r){var a=this._getRangeInfo(r);if(e>a.weeks||e===0&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var n=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+n),this.getDateInfo(o)},i.create=function(e,t){var r=[];return e.eachComponent("calendar",function(a){var n=new i(a);r.push(n),a.coordinateSystem=n}),e.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=r[a.get("calendarIndex")||0])}),r},i.dimensions=["time","value"],i})();function rr(i){var e=i.calendarModel,t=i.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}function Ln(i){i.registerComponentModel(Dn),i.registerComponentView(Cn),i.registerCoordinateSystem("calendar",In)}function kn(i,e){var t=i.existing;if(e.id=i.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 ar(i,e){var t;return M(e,function(r){i[r]!=null&&i[r]!=="auto"&&(t=!0)}),t}function Pn(i,e,t){var r=B({},t),a=i[e],n=t.$action||"merge";n==="merge"?a?(vt(a,r,!0),ea(a,r,{ignoreSize:!0}),Za(t,a),Gt(t,a),Gt(t,a,"shape"),Gt(t,a,"style"),Gt(t,a,"extra"),t.clipPath=a.clipPath):i[e]=r:n==="replace"?i[e]=r:n==="remove"&&a&&(i[e]=null)}var ya=["transition","enterFrom","leaveTo"],Rn=ya.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Gt(i,e,t){if(t&&(!i[t]&&e[t]&&(i[t]={}),i=i[t],e=e[t]),!(!i||!e))for(var r=t?ya:Rn,a=0;a<r.length;a++){var n=r[a];i[n]==null&&e[n]!=null&&(i[n]=e[n])}}function zn(i,e){if(i&&(i.hv=e.hv=[ar(e,["left","right"]),ar(e,["top","bottom"])],i.type==="group")){var t=i,r=e;t.width==null&&(t.width=r.width=0),t.height==null&&(t.height=r.height=0)}}var Vn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,r){var a=this.option.elements;this.option.elements=null,i.prototype.mergeOption.call(this,t,r),this.option.elements=a},e.prototype.optionUpdated=function(t,r){var a=this.option,n=(r?a:t).elements,o=a.elements=r?[]:a.elements,s=[];this._flatten(n,s,null);var l=Fa(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];M(l,function(h,c){var v=h.newOption;v&&(u.push(v),kn(h,v),Pn(o,c,v),zn(o[c],v))},this),a.elements=kt(o,function(h){return h&&delete h.$action,h!=null})},e.prototype._flatten=function(t,r,a){M(t,function(n){if(n){a&&(n.parentOption=a),r.push(n);var o=n.children;o&&o.length&&this._flatten(o,r,n),delete n.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e})(J),ir={path:null,compoundPath:null,group:Y,image:na,text:O},W=et(),En=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=At()},e.prototype.render=function(t,r,a){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,a)},e.prototype._updateElements=function(t){var r=t.useElOptionsToUpdate();if(r){var a=this._elMap,n=this.group,o=t.get("z"),s=t.get("zlevel");M(r,function(l){var u=_t(l.id,null),h=u!=null?a.get(u):null,c=_t(l.parentId,null),v=c!=null?a.get(c):n,p=l.type,f=l.style;p==="text"&&f&&l.hv&&l.hv[1]&&(f.textVerticalAlign=f.textBaseline=f.verticalAlign=f.align=null);var d=l.textContent,g=l.textConfig;if(f&&Pi(f,p,!!g,!!d)){var y=Ri(f,p,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!d&&y.textContent&&(d=y.textContent)}var S=On(l),b=l.$action||"merge",m=b==="merge",x=b==="replace";if(m){var _=!h,A=h;_?A=nr(u,v,l.type,a):(A&&(W(A).isNew=!1),zi(A)),A&&(le(A,S,t,{isInit:_}),or(A,l,o,s))}else if(x){qt(h,l,a,t);var D=nr(u,v,l.type,a);D&&(le(D,S,t,{isInit:!0}),or(D,l,o,s))}else b==="remove"&&(Vi(h,l),qt(h,l,a,t));var w=a.get(u);if(w&&d)if(m){var I=w.getTextContent();I?I.attr(d):w.setTextContent(new O(d))}else x&&w.setTextContent(new O(d));if(w){var L=l.clipPath;if(L){var H=L.type,V=void 0,_=!1;if(m){var at=w.getClipPath();_=!at||W(at).type!==H,V=_?De(H):at}else x&&(_=!0,V=De(H));w.setClipPath(V),le(V,L,t,{isInit:_}),Xe(V,L.keyframeAnimation,t)}var it=W(w);w.setTextConfig(g),it.option=l,Bn(w,t,l),$a({el:w,componentModel:t,itemName:w.name,itemTooltipOption:l.tooltip}),Xe(w,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,r){for(var a=t.option.elements,n=this.group,o=this._elMap,s=r.getWidth(),l=r.getHeight(),u=["x","y"],h=0;h<a.length;h++){var c=a[h],v=_t(c.id,null),p=v!=null?o.get(v):null;if(!(!p||!p.isGroup)){var f=p.parent,d=f===n,g=W(p),y=W(f);g.width=R(g.option.width,d?s:y.width)||0,g.height=R(g.option.height,d?l:y.height)||0}}for(var h=a.length-1;h>=0;h--){var c=a[h],v=_t(c.id,null),p=v!=null?o.get(v):null;if(p){var f=p.parent,y=W(f),S=f===n?{width:s,height:l}:{width:y.width,height:y.height},b={},m=aa(p,c,S,null,{hv:c.hv,boundingMode:c.bounding},b);if(!W(p).isNew&&m){for(var x=c.transition,_={},A=0;A<u.length;A++){var D=u[A],w=b[D];x&&(Ei(x)||wt(x,D)>=0)?_[D]=w:p[D]=w}ia(p,_,t,0)}else p.attr(b)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(a){qt(a,W(a).option,r,t._lastGraphicModel)}),this._elMap=At()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(rt);function De(i){var e=Me(ir,i)?ir[i]:Xa(i),t=new e({});return W(t).type=i,t}function nr(i,e,t,r){var a=De(t);return e.add(a),r.set(i,a),W(a).id=i,W(a).isNew=!0,a}function qt(i,e,t,r){var a=i&&i.parent;a&&(i.type==="group"&&i.traverse(function(n){qt(n,e,t,r)}),Oi(i,e,r),t.removeKey(W(i).id))}function or(i,e,t,r){i.isGroup||M([["cursor",Ka.prototype.cursor],["zlevel",r||0],["z",t||0],["z2",0]],function(a){var n=a[0];Me(e,n)?i[n]=ft(e[n],a[1]):i[n]==null&&(i[n]=a[1])}),M(Ua(e),function(a){if(a.indexOf("on")===0){var n=e[a];i[a]=G(n)?n:null}}),Me(e,"draggable")&&(i.draggable=e.draggable),e.name!=null&&(i.name=e.name),e.id!=null&&(i.id=e.id)}function On(i){return i=B({},i),M(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Ya),function(e){delete i[e]}),i}function Bn(i,e,t){var r=j(i).eventData;!i.silent&&!i.ignore&&!r&&(r=j(i).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:i.name}),r&&(r.info=t.info)}function Nn(i){i.registerComponentModel(Vn),i.registerComponentView(En),i.registerPreprocessor(function(e){var t=e.graphic;k(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Hn=["rect","polygon","keep","clear"];function Gn(i,e){var t=oa(i?i.brush:[]);if(t.length){var r=[];M(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var a=i&&i.toolbox;k(a)&&(a=a[0]),a||(a={feature:{}},i.toolbox=[a]);var n=a.feature||(a.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),Wn(s),e&&!s.length&&s.push.apply(s,Hn)}}function Wn(i){var e={};M(i,function(t){e[t]=1}),i.length=0,M(e,function(t,r){i.push(r)})}var sr=M;function lr(i){if(i){for(var e in i)if(i.hasOwnProperty(e))return!0}}function Ce(i,e,t){var r={};return sr(e,function(n){var o=r[n]=a();sr(i[n],function(s,l){if(E.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new E(u),l==="opacity"&&(u=z(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new E(u))}})}),r;function a(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function ma(i,e,t){var r;M(t,function(a){e.hasOwnProperty(a)&&lr(e[a])&&(r=!0)}),r&&M(t,function(a){e.hasOwnProperty(a)&&lr(e[a])?i[a]=z(e[a]):delete i[a]})}function Fn(i,e,t,r,a,n){var o={};M(i,function(c){var v=E.prepareVisualTypes(e[c]);o[c]=v});var s;function l(c){return sa(t,s,c)}function u(c,v){la(t,s,c,v)}t.each(h);function h(c,v){s=c;var p=t.getRawDataItem(s);if(!(p&&p.visualMap===!1))for(var f=r.call(a,c),d=e[f],g=o[f],y=0,S=g.length;y<S;y++){var b=g[y];d[b]&&d[b].applyVisual(c,l,u)}}}function Zn(i,e,t,r){var a={};return M(i,function(n){var o=E.prepareVisualTypes(e[n]);a[n]=o}),{progress:function(o,s){var l;r!=null&&(l=s.getDimensionIndex(r));function u(x){return sa(s,c,x)}function h(x,_){la(s,c,x,_)}for(var c,v=s.getStore();(c=o.next())!=null;){var p=s.getRawDataItem(c);if(!(p&&p.visualMap===!1))for(var f=r!=null?v.get(l,c):c,d=t(f),g=e[d],y=a[d],S=0,b=y.length;S<b;S++){var m=y[S];g[m]&&g[m].applyVisual(f,u,h)}}}}}function $n(i){var e=i.brushType,t={point:function(r){return ur[e].point(r,t,i)},rect:function(r){return ur[e].rect(r,t,i)}};return t}var ur={lineX:hr(0),lineY:hr(1),rect:{point:function(i,e,t){return i&&t.boundingRect.contain(i[0],i[1])},rect:function(i,e,t){return i&&t.boundingRect.intersect(i)}},polygon:{point:function(i,e,t){return i&&t.boundingRect.contain(i[0],i[1])&&mt(t.range,i[0],i[1])},rect:function(i,e,t){var r=t.range;if(!i||r.length<=1)return!1;var a=i.x,n=i.y,o=i.width,s=i.height,l=r[0];if(mt(r,a,n)||mt(r,a+o,n)||mt(r,a,n+s)||mt(r,a+o,n+s)||Pe.create(i).contain(l[0],l[1])||Bt(a,n,a+o,n,r)||Bt(a,n,a,n+s,r)||Bt(a+o,n,a+o,n+s,r)||Bt(a,n+s,a+o,n+s,r))return!0}}};function hr(i){var e=["x","y"],t=["width","height"];return{point:function(r,a,n){if(r){var o=n.range,s=r[i];return xt(s,o)}},rect:function(r,a,n){if(r){var o=n.range,s=[r[e[i]],r[e[i]]+r[t[i]]];return s[1]<s[0]&&s.reverse(),xt(s[0],o)||xt(s[1],o)||xt(o[0],s)||xt(o[1],s)}}}}function xt(i,e){return e[0]<=i&&i<=e[1]}var cr=["inBrush","outOfBrush"],ce="__ecBrushSelect",Ie="__ecInBrushSelectEvent";function xa(i){i.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new qa(e.option,i);t.setInputRanges(e.areas,i)})}function Yn(i,e,t){var r=[],a,n;i.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),xa(i),i.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:z(o.areas),selected:[]};r.push(l);var u=o.option,h=u.brushLink,c=[],v=[],p=[],f=!1;s||(a=u.throttleType,n=u.throttleDelay);var d=P(o.areas,function(x){var _=qn[x.brushType],A=F({boundingRect:_?_(x):void 0},x);return A.selectors=$n(A),A}),g=Ce(o.option,cr,function(x){x.mappingMethod="fixed"});k(h)&&M(h,function(x){c[x]=1});function y(x){return h==="all"||!!c[x]}function S(x){return!!x.length}i.eachSeries(function(x,_){var A=p[_]=[];x.subType==="parallel"?b(x,_):m(x,_,A)});function b(x,_){var A=x.coordinateSystem;f=f||A.hasAxisBrushed(),y(_)&&A.eachActiveState(x.getData(),function(D,w){D==="active"&&(v[w]=1)})}function m(x,_,A){if(!(!x.brushSelector||Xn(o,_))&&(M(d,function(w){o.brushTargetManager.controlSeries(w,x,i)&&A.push(w),f=f||S(A)}),y(_)&&S(A))){var D=x.getData();D.each(function(w){vr(x,A,D,w)&&(v[w]=1)})}}i.eachSeries(function(x,_){var A={seriesId:x.id,seriesIndex:_,seriesName:x.name,dataIndex:[]};l.selected.push(A);var D=p[_],w=x.getData(),I=y(_)?function(L){return v[L]?(A.dataIndex.push(w.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return vr(x,D,w,L)?(A.dataIndex.push(w.getRawIndex(L)),"inBrush"):"outOfBrush"};(y(_)?f:S(D))&&Fn(cr,g,w,I)})}),Kn(e,a,n,r,t)}function Kn(i,e,t,r,a){if(a){var n=i.getZr();if(!n[Ie]){n[ce]||(n[ce]=Un);var o=Re(n,ce,t,e);o(i,r)}}}function Un(i,e){if(!i.isDisposed()){var t=i.getZr();t[Ie]=!0,i.dispatchAction({type:"brushSelect",batch:e}),t[Ie]=!1}}function vr(i,e,t,r){for(var a=0,n=e.length;a<n;a++){var o=e[a];if(i.brushSelector(r,t,o.selectors,o))return!0}}function Xn(i,e){var t=i.option.seriesIndex;return t!=null&&t!=="all"&&(k(t)?wt(t,e)<0:e!==t)}var qn={rect:function(i){return pr(i.range)},polygon:function(i){for(var e,t=i.range,r=0,a=t.length;r<a;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=t[r];n[0]<e[0][0]&&(e[0][0]=n[0]),n[0]>e[0][1]&&(e[0][1]=n[0]),n[1]<e[1][0]&&(e[1][0]=n[1]),n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&pr(e)}};function pr(i){return new Pe(i[0][0],i[1][0],i[0][1]-i[0][0],i[1][1]-i[1][0])}var jn=(function(i){T(e,i);function e(){var t=i!==null&&i.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 ja(r.getZr())).on("brush",C(this._onBrush,this)).mount()},e.prototype.render=function(t,r,a,n){this.model=t,this._updateController(t,r,a,n)},e.prototype.updateTransform=function(t,r,a,n){xa(r),this._updateController(t,r,a,n)},e.prototype.updateVisual=function(t,r,a,n){this.updateTransform(t,r,a,n)},e.prototype.updateView=function(t,r,a,n){this._updateController(t,r,a,n)},e.prototype._updateController=function(t,r,a,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:z(a),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:z(a),$from:r})},e.type="brush",e})(rt),Qn="#ddd",Jn=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var a=this.option;!r&&ma(a,t,["inBrush","outOfBrush"]);var n=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:Qn},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=P(t,function(r){return fr(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=fr(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})(J);function fr(i,e){return vt({brushType:i.brushType,brushMode:i.brushMode,transformable:i.transformable,brushStyle:new Xr(i.brushStyle).getItemStyle(),removeOnClick:i.removeOnClick,z:i.z},e,!0)}var to=["rect","polygon","lineX","lineY","keep","clear"],eo=(function(i){T(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.render=function(t,r,a){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,M(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,a){this.render(t,r,a)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),a={};return M(t.get("type",!0),function(n){r[n]&&(a[n]=r[n])}),a},e.prototype.onclick=function(t,r,a){var n=this._brushType,o=this._brushMode;a==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?n:n===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:to.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})(Qa);function ro(i){i.registerComponentView(jn),i.registerComponentModel(Jn),i.registerPreprocessor(Gn),i.registerVisual(i.PRIORITY.VISUAL.BRUSH,Yn),i.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),i.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ye),i.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ye),Ja("brush",eo)}var dr=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,r,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){i.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||[],a=t.axisType,n=this._names=[],o;a==="category"?(o=[],M(r,function(u,h){var c=_t(ti(u),""),v;Lt(u)?(v=z(u),v.value=h):v=h,o.push(v),n.push(c)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new ht([{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})(J),Sa=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Rt(dr.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})(dr);ne(Sa,ze.prototype);var ao=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(rt),io=(function(i){T(e,i);function e(t,r,a,n){var o=i.call(this,t,r,a)||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})(tt),ve=Math.PI,gr=et(),no=(function(i){T(e,i);function e(){var t=i!==null&&i.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,a){if(this.model=t,this.api=a,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,a),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 Ae("nameValue",{noName:!0,value:h})},M(["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 a=t.get(["label","position"]),n=t.get("orient"),o=so(t,r),s;a==null||a==="auto"?s=n==="horizontal"?o.y+o.height/2<r.getHeight()/2?"-":"+":o.x+o.width/2<r.getWidth()/2?"+":"-":q(a)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][a]:s=a;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:ve/2},c=n==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),p=v.get("show",!0),f=p?v.get("itemSize"):0,d=p?v.get("itemGap"):0,g=f+d,y=t.get(["label","rotate"])||0;y=y*ve/180;var S,b,m,x=v.get("position",!0),_=p&&v.get("showPlayBtn",!0),A=p&&v.get("showPrevBtn",!0),D=p&&v.get("showNextBtn",!0),w=0,I=c;x==="left"||x==="bottom"?(_&&(S=[0,0],w+=g),A&&(b=[w,0],w+=g),D&&(m=[I-f,0],I-=g)):(_&&(S=[I-f,0],I-=g),A&&(b=[0,0],w+=g),D&&(m=[I-f,0],I-=g));var L=[w,I];return t.get("inverse")&&L.reverse(),{viewRect:o,mainLength:c,orient:n,rotation:h[n],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:S,prevBtnPosition:b,nextBtnPosition:m,axisExtent:L,controlSize:f,controlGap:d}},e.prototype._position=function(t,r){var a=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=$r(),l=o.x,u=o.y+o.height;Se(s,s,[-l,-u]),Zr(s,s,-ve/2),Se(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=S(o),c=S(a.getBoundingRect()),v=S(n.getBoundingRect()),p=[a.x,a.y],f=[n.x,n.y];f[0]=p[0]=h[0][0];var d=t.labelPosOpt;if(d==null||q(d)){var g=d==="+"?0:1;b(p,c,h,1,g),b(f,v,h,1,1-g)}else{var g=d>=0?0:1;b(p,c,h,1,g),f[1]=p[1]+d}a.setPosition(p),n.setPosition(f),a.rotation=n.rotation=t.rotation,y(a),y(n);function y(m){m.originX=h[0][0]-m.x,m.originY=h[1][0]-m.y}function S(m){return[[m.x,m.x+m.width],[m.y,m.y+m.height]]}function b(m,x,_,A,D){m[A]+=_[A][D]-x[A][D]}},e.prototype._createAxis=function(t,r){var a=r.getData(),n=r.get("axisType"),o=oo(r,n);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new io("value",o,t.axisExtent,n);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new Y;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,a,n){var o=a.getExtent();if(n.get(["lineStyle","show"])){var s=new ot({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:B({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new ot({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:F({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,a,n){var o=this,s=n.getData(),l=a.scale.getTicks();this._tickSymbols=[],M(l,function(u){var h=a.dataToCoord(u.value),c=s.getItemModel(u.value),v=c.getModel("itemStyle"),p=c.getModel(["emphasis","itemStyle"]),f=c.getModel(["progress","itemStyle"]),d={x:h,y:0,onclick:C(o._changeTimeline,o,u.value)},g=yr(c,v,r,d);g.ensureState("emphasis").style=p.getItemStyle(),g.ensureState("progress").style=f.getItemStyle(),Kt(g);var y=j(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=n):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,r,a,n){var o=this,s=a.getLabelModel();if(s.get("show")){var l=n.getData(),u=a.getViewLabels();this._tickLabels=[],M(u,function(h){var c=h.tickValue,v=l.getItemModel(c),p=v.getModel("label"),f=v.getModel(["emphasis","label"]),d=v.getModel(["progress","label"]),g=a.dataToCoord(h.tickValue),y=new O({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:C(o._changeTimeline,o,c),silent:!1,style:Z(p,{text:h.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Z(f),y.ensureState("progress").style=Z(d),r.add(y),Kt(y),gr(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,r,a,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),h=n.getPlayState(),c=n.get("inverse",!0);v(t.nextBtnPosition,"next",C(this._changeTimeline,this,c?"-":"+")),v(t.prevBtnPosition,"prev",C(this._changeTimeline,this,c?"+":"-")),v(t.playPosition,h?"stop":"play",C(this._handlePlayClick,this,!h),!0);function v(p,f,d,g){if(p){var y=we(ft(n.get(["controlStyle",f+"BtnSize"]),o),o),S=[0,-y/2,y,y],b=lo(n,f+"Icon",S,{x:p[0],y:p[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});b.ensureState("emphasis").style=u,r.add(b),Kt(b)}}},e.prototype._renderCurrentPointer=function(t,r,a,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(c){c.draggable=!0,c.drift=C(u._handlePointerDrag,u),c.ondragend=C(u._handlePointerDragend,u),mr(c,u._progressLine,s,a,n,!0)},onUpdate:function(c){mr(c,u._progressLine,s,a,n)}};this._currentPointer=yr(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,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var a=this._toAxisCoord(t)[0],n=this._axis,o=X(n.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=a,s.dirty());var l=this._findNearestTick(a),u=this.model;(r||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var r=t.model;t._changeTimeline(r.getCurrentIndex()+(r.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var r=this._mainGroup.getLocalTransform();return lt(t,r,!0)},e.prototype._findNearestTick=function(t){var r=this.model.getData(),a=1/0,n,o=this._axis;return r.each(["value"],function(s,l){var u=o.dataToCoord(s),h=Math.abs(u-t);h<a&&(a=h,n=l)}),n},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var r=this.model.getCurrentIndex();t==="+"?t=r+1:t==="-"&&(t=r-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),r=this._tickSymbols,a=this._tickLabels;if(r)for(var n=0;n<r.length;n++)r&&r[n]&&r[n].toggleState("progress",n<t);if(a)for(var n=0;n<a.length;n++)a&&a[n]&&a[n].toggleState("progress",gr(a[n]).dataIndex<=t)},e.type="timeline.slider",e})(ao);function oo(i,e){if(e=e||i.get("type"),e)switch(e){case"category":return new ai({ordinalMeta:i.getCategories(),extent:[1/0,-1/0]});case"time":return new ri({locale:i.ecModel.getLocaleModel(),useUTC:i.ecModel.get("useUTC")});default:return new ei}}function so(i,e){return Pt(i.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},i.get("padding"))}function lo(i,e,t,r){var a=r.style,n=oi(i.get(["controlStyle",e]),r||{},new Pe(t[0],t[1],t[2],t[3]));return a&&n.setStyle(a),n}function yr(i,e,t,r,a,n){var o=e.get("color");if(a)a.setColor(o),t.add(a),n&&n.onUpdate(a);else{var s=i.get("symbol");a=dt(s,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),t.add(a),n&&n.onCreate(a)}var l=e.getItemStyle(["color"]);a.setStyle(l),r=vt({rectHover:!0,z2:100},r,!0);var u=ii(i.get("symbolSize"));r.scaleX=u[0]/2,r.scaleY=u[1]/2;var h=ni(i.get("symbolOffset"),u);h&&(r.x=(r.x||0)+h[0],r.y=(r.y||0)+h[1]);var c=i.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,a.attr(r),a.updateTransform(),a}function mr(i,e,t,r,a,n){if(!i.dragging){var o=a.getModel("checkpointStyle"),s=r.dataToCoord(a.getData().get("value",t));if(n||!o.get("animation",!0))i.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};i.stopAnimation(null,!0),i.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function uo(i){i.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,r){var a=t.getComponent("timeline");return a&&e.currentIndex!=null&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),r.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),F({currentIndex:a.option.currentIndex},e)}),i.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var r=t.getComponent("timeline");r&&e.playState!=null&&r.setPlayState(e.playState)})}function ho(i){var e=i&&i.timeline;k(e)||(e=e?[e]:[]),M(e,function(t){t&&co(t)})}function co(i){var e=i.type,t={number:"value",time:"time"};if(t[e]&&(i.axisType=t[e],delete i.type),xr(i),nt(i,"controlPosition")){var r=i.controlStyle||(i.controlStyle={});nt(r,"position")||(r.position=i.controlPosition),r.position==="none"&&!nt(r,"show")&&(r.show=!1,delete r.position),delete i.controlPosition}M(i.data||[],function(a){Lt(a)&&!k(a)&&(!nt(a,"value")&&nt(a,"name")&&(a.value=a.name),xr(a))})}function xr(i){var e=i.itemStyle||(i.itemStyle={}),t=e.emphasis||(e.emphasis={}),r=i.label||i.label||{},a=r.normal||(r.normal={}),n={normal:1,emphasis:1};M(r,function(o,s){!n[s]&&!nt(a,s)&&(a[s]=o)}),t.label&&!nt(r,"emphasis")&&(r.emphasis=t.label,delete t.label)}function nt(i,e){return i.hasOwnProperty(e)}function vo(i){i.registerComponentModel(Sa),i.registerComponentView(no),i.registerSubTypeDefaulter("timeline",function(){return"slider"}),uo(i),i.registerPreprocessor(ho)}function Ne(i,e){if(!i)return!1;for(var t=k(i)?i:[i],r=0;r<t.length;r++)if(t[r]&&t[r][e])return!0;return!1}function Wt(i){li(i,"label",["show"])}var Ft=et(),Q=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,r,a){this.mergeDefaultAndTheme(t,a),this._mergeOption(t,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(si.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,r){this._mergeOption(t,r,!1,!1)},e.prototype._mergeOption=function(t,r,a,n){var o=this.mainType;a||r.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Ft(s)[o];if(!l||!l.data){Ft(s)[o]=null;return}u?u._mergeOption(l,r,!0):(n&&Wt(l),M(l.data,function(h){h instanceof Array?(Wt(h[0]),Wt(h[1])):Wt(h)}),u=this.createMarkerModelFromSeries(l,this,r),B(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Ft(s)[o]=u},this)},e.prototype.formatTooltip=function(t,r,a){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return Ae("section",{header:this.name,blocks:[Ae("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,r){var a=ze.prototype.getDataParams.call(this,t,r),n=this.__hostSeries;return n&&(a.seriesId=n.id,a.seriesName=n.name,a.seriesType=n.subType),a},e.getMarkerModelFromSeries=function(t,r){return Ft(t)[r]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(J);ne(Q,ze.prototype);var po=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,a){return new e(t,r,a)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e})(Q);function Le(i){return!(isNaN(parseFloat(i.x))&&isNaN(parseFloat(i.y)))}function fo(i){return!isNaN(parseFloat(i.x))&&!isNaN(parseFloat(i.y))}function Zt(i,e,t,r,a,n){var o=[],s=Qr(e,r),l=s?e.getCalculationInfo("stackResultDimension"):r,u=He(e,l,i),h=e.indicesOfNearest(l,u)[0];o[a]=e.get(t,h),o[n]=e.get(l,h);var c=e.get(r,h),v=ui(e.get(r,h));return v=Math.min(v,20),v>=0&&(o[n]=+o[n].toFixed(v)),[o,c]}var pe={min:N(Zt,"min"),max:N(Zt,"max"),average:N(Zt,"average"),median:N(Zt,"median")};function Dt(i,e){if(e){var t=i.getData(),r=i.coordinateSystem,a=r&&r.dimensions;if(!fo(e)&&!k(e.coord)&&k(a)){var n=ba(e,t,r,i);if(e=z(e),e.type&&pe[e.type]&&n.baseAxis&&n.valueAxis){var o=wt(a,n.baseAxis.dim),s=wt(a,n.valueAxis.dim),l=pe[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||!k(a))e.coord=[];else for(var u=e.coord,h=0;h<2;h++)pe[u[h]]&&(u[h]=He(t,t.mapDimension(a[h]),u[h]));return e}}function ba(i,e,t,r){var a={};return i.valueIndex!=null||i.valueDim!=null?(a.valueDataDim=i.valueIndex!=null?e.getDimension(i.valueIndex):i.valueDim,a.valueAxis=t.getAxis(go(r,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=r.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function go(i,e){var t=i.getData().getDimensionInfo(e);return t&&t.coordDim}function Ct(i,e){return i&&i.containData&&e.coord&&!Le(e)?i.containData(e.coord):!0}function yo(i,e,t){return i&&i.containZone&&e.coord&&t.coord&&!Le(e)&&!Le(t)?i.containZone(e.coord,t.coord):!0}function _a(i,e){return i?function(t,r,a,n){var o=n<2?t.coord&&t.coord[n]:t.value;return Qt(o,e[n])}:function(t,r,a,n){return Qt(t.value,e[n])}}function He(i,e,t){if(t==="average"){var r=0,a=0;return i.each(e,function(n,o){isNaN(n)||(r+=n,a++)}),r/a}else return t==="median"?i.getMedian(e):i.getDataExtent(e)[t==="max"?1:0]}var fe=et(),Ge=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=At()},e.prototype.render=function(t,r,a){var n=this,o=this.markerGroupMap;o.each(function(s){fe(s).keep=!1}),r.eachSeries(function(s){var l=Q.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,r,a)}),o.each(function(s){!fe(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){fe(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var a=this;M(t,function(n){var o=Q.getMarkerModelFromSeries(n,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?hi(l):ci(l))})}})},e.type="marker",e})(rt);function Sr(i,e,t){var r=e.coordinateSystem;i.each(function(a){var n=i.getItemModel(a),o,s=R(n.get("x"),t.getWidth()),l=R(n.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(i.getValues(i.dimensions,a));else if(r){var u=i.get(r.dimensions[0],a),h=i.get(r.dimensions[1],a);o=r.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),i.setItemLayout(a,o)})}var mo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,a){r.eachSeries(function(n){var o=Q.getMarkerModelFromSeries(n,"markPoint");o&&(Sr(o.getData(),n,a),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Hi),c=xo(o,t,r);r.setData(c),Sr(r.getData(),t,n),c.each(function(v){var p=c.getItemModel(v),f=p.getShallow("symbol"),d=p.getShallow("symbolSize"),g=p.getShallow("symbolRotate"),y=p.getShallow("symbolOffset"),S=p.getShallow("symbolKeepAspect");if(G(f)||G(d)||G(g)||G(y)){var b=r.getRawValue(v),m=r.getDataParams(v);G(f)&&(f=f(b,m)),G(d)&&(d=d(b,m)),G(g)&&(g=g(b,m)),G(y)&&(y=y(b,m))}var x=p.getModel("itemStyle").getItemStyle(),_=oe(l,"color");x.fill||(x.fill=_),c.setItemVisual(v,{symbol:f,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:S,style:x})}),h.updateData(c),this.group.add(h.group),c.eachItemGraphicEl(function(v){v.traverse(function(p){j(p).dataModel=r})}),this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e})(Ge);function xo(i,e,t){var r;i?r=P(i&&i.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return B(B({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var a=new ht(r,t),n=P(t.get("data"),N(Dt,e));i&&(n=kt(n,N(Ct,i)));var o=_a(!!i,r);return a.initData(n,null,o),a}function So(i){i.registerComponentModel(po),i.registerComponentView(mo),i.registerPreprocessor(function(e){Ne(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var bo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,a){return new e(t,r,a)},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})(Q),$t=et(),_o=function(i,e,t,r){var a=i.getData(),n;if(k(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=st(r.yAxis,r.xAxis);else{var u=ba(r,a,e,i);s=u.valueAxis;var h=vi(a,u.valueDataDim);l=He(a,h,o)}var c=s.dim==="x"?0:1,v=1-c,p=z(r),f={coord:[]};p.type=null,p.coord=[],p.coord[v]=-1/0,f.coord[v]=1/0;var d=t.get("precision");d>=0&&pi(l)&&(l=+l.toFixed(Math.min(d,20))),p.coord[c]=f.coord[c]=l,n=[p,f,{type:o,valueIndex:r.valueIndex,value:l}]}else n=[]}var g=[Dt(i,n[0]),Dt(i,n[1]),B({},n[2])];return g[2].type=g[2].type||null,vt(g[2],g[0]),vt(g[2],g[1]),g};function re(i){return!isNaN(i)&&!isFinite(i)}function br(i,e,t,r){var a=1-i,n=r.dimensions[i];return re(e[a])&&re(t[a])&&e[i]===t[i]&&r.getAxis(n).containData(e[i])}function Mo(i,e){if(i.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(br(1,t,r,i)||br(0,t,r,i)))return!0}return Ct(i,e[0])&&Ct(i,e[1])}function de(i,e,t,r,a){var n=r.coordinateSystem,o=i.getItemModel(e),s,l=R(o.get("x"),a.getWidth()),u=R(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(i.getValues(i.dimensions,e));else{var h=n.dimensions,c=i.get(h[0],e),v=i.get(h[1],e);s=n.dataToPoint([c,v])}if(Ve(n,"cartesian2d")){var p=n.getAxis("x"),f=n.getAxis("y"),h=n.dimensions;re(i.get(h[0],e))?s[0]=p.toGlobalCoord(p.getExtent()[t?0:1]):re(i.get(h[1],e))&&(s[1]=f.toGlobalCoord(f.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}i.setItemLayout(e,s)}var Ao=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,a){r.eachSeries(function(n){var o=Q.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=$t(o).from,u=$t(o).to;l.each(function(h){de(l,h,!0,n,a),de(u,h,!1,n,a)}),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,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Li);this.group.add(h.group);var c=wo(o,t,r),v=c.from,p=c.to,f=c.line;$t(r).from=v,$t(r).to=p,r.setData(f);var d=r.get("symbol"),g=r.get("symbolSize"),y=r.get("symbolRotate"),S=r.get("symbolOffset");k(d)||(d=[d,d]),k(g)||(g=[g,g]),k(y)||(y=[y,y]),k(S)||(S=[S,S]),c.from.each(function(m){b(v,m,!0),b(p,m,!1)}),f.each(function(m){var x=f.getItemModel(m).getModel("lineStyle").getLineStyle();f.setItemLayout(m,[v.getItemLayout(m),p.getItemLayout(m)]),x.stroke==null&&(x.stroke=v.getItemVisual(m,"style").fill),f.setItemVisual(m,{fromSymbolKeepAspect:v.getItemVisual(m,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(m,"symbolOffset"),fromSymbolRotate:v.getItemVisual(m,"symbolRotate"),fromSymbolSize:v.getItemVisual(m,"symbolSize"),fromSymbol:v.getItemVisual(m,"symbol"),toSymbolKeepAspect:p.getItemVisual(m,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(m,"symbolOffset"),toSymbolRotate:p.getItemVisual(m,"symbolRotate"),toSymbolSize:p.getItemVisual(m,"symbolSize"),toSymbol:p.getItemVisual(m,"symbol"),style:x})}),h.updateData(f),c.line.eachItemGraphicEl(function(m){j(m).dataModel=r,m.traverse(function(x){j(x).dataModel=r})});function b(m,x,_){var A=m.getItemModel(x);de(m,x,_,t,n);var D=A.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=oe(l,"color")),m.setItemVisual(x,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:ft(A.get("symbolOffset",!0),S[_?0:1]),symbolRotate:ft(A.get("symbolRotate",!0),y[_?0:1]),symbolSize:ft(A.get("symbolSize"),g[_?0:1]),symbol:ft(A.get("symbol",!0),d[_?0:1]),style:D})}this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e})(Ge);function wo(i,e,t){var r;i?r=P(i&&i.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return B(B({},h),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var a=new ht(r,t),n=new ht(r,t),o=new ht([],t),s=P(t.get("data"),N(_o,e,i,t));i&&(s=kt(s,N(Mo,i)));var l=_a(!!i,r);return a.initData(P(s,function(u){return u[0]}),null,l),n.initData(P(s,function(u){return u[1]}),null,l),o.initData(P(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:n,line:o}}function To(i){i.registerComponentModel(bo),i.registerComponentView(Ao),i.registerPreprocessor(function(e){Ne(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Do=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,a){return new e(t,r,a)},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})(Q),Yt=et(),Co=function(i,e,t,r){var a=r[0],n=r[1];if(!(!a||!n)){var o=Dt(i,a),s=Dt(i,n),l=o.coord,u=s.coord;l[0]=st(l[0],-1/0),l[1]=st(l[1],-1/0),u[0]=st(u[0],1/0),u[1]=st(u[1],1/0);var h=mi([{},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 ae(i){return!isNaN(i)&&!isFinite(i)}function _r(i,e,t,r){var a=1-i;return ae(e[a])&&ae(t[a])}function Io(i,e){var t=e.coord[0],r=e.coord[1],a={coord:t,x:e.x0,y:e.y0},n={coord:r,x:e.x1,y:e.y1};return Ve(i,"cartesian2d")?t&&r&&(_r(1,t,r)||_r(0,t,r))?!0:yo(i,a,n):Ct(i,a)||Ct(i,n)}function Mr(i,e,t,r,a){var n=r.coordinateSystem,o=i.getItemModel(e),s,l=R(o.get(t[0]),a.getWidth()),u=R(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition){var h=i.getValues(["x0","y0"],e),c=i.getValues(["x1","y1"],e),v=n.clampData(h),p=n.clampData(c),f=[];t[0]==="x0"?f[0]=v[0]>p[0]?c[0]:h[0]:f[0]=v[0]>p[0]?h[0]:c[0],t[1]==="y0"?f[1]=v[1]>p[1]?c[1]:h[1]:f[1]=v[1]>p[1]?h[1]:c[1],s=r.getMarkerPosition(f,t,!0)}else{var d=i.get(t[0],e),g=i.get(t[1],e),y=[d,g];n.clampData&&n.clampData(y,y),s=n.dataToPoint(y,!0)}if(Ve(n,"cartesian2d")){var S=n.getAxis("x"),b=n.getAxis("y"),d=i.get(t[0],e),g=i.get(t[1],e);ae(d)?s[0]=S.toGlobalCoord(S.getExtent()[t[0]==="x0"?0:1]):ae(g)&&(s[1]=b.toGlobalCoord(b.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Ar=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Lo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,a){r.eachSeries(function(n){var o=Q.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=P(Ar,function(c){return Mr(s,l,c,n,a)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new Y});this.group.add(h.group),this.markKeep(h);var c=ko(o,t,r);r.setData(c),c.each(function(v){var p=P(Ar,function(D){return Mr(c,v,D,t,n)}),f=o.getAxis("x").scale,d=o.getAxis("y").scale,g=f.getExtent(),y=d.getExtent(),S=[f.parse(c.get("x0",v)),f.parse(c.get("x1",v))],b=[d.parse(c.get("y0",v)),d.parse(c.get("y1",v))];X(S),X(b);var m=!(g[0]>S[1]||g[1]<S[0]||y[0]>b[1]||y[1]<b[0]),x=!m;c.setItemLayout(v,{points:p,allClipped:x});var _=c.getItemModel(v).getModel("itemStyle").getItemStyle(),A=oe(l,"color");_.fill||(_.fill=A,q(_.fill)&&(_.fill=Ke(_.fill,.4))),_.stroke||(_.stroke=A),c.setItemVisual(v,"style",_)}),c.diff(Yt(h).data).add(function(v){var p=c.getItemLayout(v);if(!p.allClipped){var f=new Jt({shape:{points:p.points}});c.setItemGraphicEl(v,f),h.group.add(f)}}).update(function(v,p){var f=Yt(h).data.getItemGraphicEl(p),d=c.getItemLayout(v);d.allClipped?f&&h.group.remove(f):(f?ia(f,{shape:{points:d.points}},r,v):f=new Jt({shape:{points:d.points}}),c.setItemGraphicEl(v,f),h.group.add(f))}).remove(function(v){var p=Yt(h).data.getItemGraphicEl(v);h.group.remove(p)}).execute(),c.eachItemGraphicEl(function(v,p){var f=c.getItemModel(p),d=c.getItemVisual(p,"style");v.useStyle(c.getItemVisual(p,"style")),fi(v,di(f),{labelFetcher:r,labelDataIndex:p,defaultText:c.getName(p)||"",inheritColor:q(d.fill)?Ke(d.fill,1):"#000"}),gi(v,f),yi(v,null,null,f.get(["emphasis","disabled"])),j(v).dataModel=r}),Yt(h).data=c,h.group.silent=r.get("silent")||t.get("silent")},e.type="markArea",e})(Ge);function ko(i,e,t){var r,a,n=["x0","y0","x1","y1"];if(i){var o=P(i&&i.dimensions,function(u){var h=e.getData(),c=h.getDimensionInfo(h.mapDimension(u))||{};return B(B({},c),{name:u,ordinalMeta:null})});a=P(n,function(u,h){return{name:u,type:o[h%2].type}}),r=new ht(a,t)}else a=[{name:"value",type:"float"}],r=new ht(a,t);var s=P(t.get("data"),N(Co,e,i,t));i&&(s=kt(s,N(Io,i)));var l=i?function(u,h,c,v){var p=u.coord[Math.floor(v/2)][v%2];return Qt(p,a[v])}:function(u,h,c,v){return Qt(u.value,a[v])};return r.initData(s,null,l),r.hasItemOption=!0,r}function Po(i){i.registerComponentModel(Do),i.registerComponentView(Lo),i.registerPreprocessor(function(e){Ne(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Ro=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Rt(te.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(te),We=et();function zo(i,e,t){We(i).coordSysRecordMap.each(function(r){var a=r.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Vo(i,e){for(var t=We(i).coordSysRecordMap,r=t.keys(),a=0;a<r.length;a++){var n=r[a],o=t.get(n),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||Ma(t,o))}}}function Ma(i,e){if(e){i.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Eo(i,e){var t={model:e,containsPoint:N(Bo,e),dispatchAction:N(Oo,i),dataZoomInfoMap:null,controller:null},r=t.controller=new ki(i.getZr());return M(["pan","zoom","scrollMove"],function(a){r.on(a,function(n){var o=[];t.dataZoomInfoMap.each(function(s){if(n.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,n);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function Oo(i,e){i.isDisposed()||i.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Bo(i,e,t,r){return i.coordinateSystem.containPoint([t,r])}function No(i){var e,t="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return i.each(function(n){var o=n.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;r[t+s]>r[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function Ho(i){i.registerProcessor(i.PRIORITY.PROCESSOR.FILTER,function(e,t){var r=We(t),a=r.coordSysRecordMap||(r.coordSysRecordMap=At());a.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=ua(n);M(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Eo(t,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=At());h.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),a.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){Ma(a,n);return}var h=No(l);o.enable(h.controlType,h.opt),o.setPointerChecker(n.containsPoint),Re(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Go=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,r,a){if(i.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),zo(a,t,{pan:C(ge.pan,this),zoom:C(ge.zoom,this),scrollMove:C(ge.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),i.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Vo(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(ha),ge={zoom:function(i,e,t,r){var a=this.range,n=a.slice(),o=i.axisModels[0];if(o){var s=ye[e](null,[r.originX,r.originY],o,t,i),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(se(0,n,[0,100],0,h.minSpan,h.maxSpan),this.range=n,a[0]!==n[0]||a[1]!==n[1])return n}},pan:wr(function(i,e,t,r,a,n){var o=ye[r]([n.oldX,n.oldY],[n.newX,n.newY],e,a,t);return o.signal*(i[1]-i[0])*o.pixel/o.pixelLength}),scrollMove:wr(function(i,e,t,r,a,n){var o=ye[r]([0,0],[n.scrollDelta,n.scrollDelta],e,a,t);return o.signal*(i[1]-i[0])*n.scrollDelta})};function wr(i){return function(e,t,r,a){var n=this.range,o=n.slice(),s=e.axisModels[0];if(s){var l=i(o,s,e,t,r,a);if(se(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var ye={grid:function(i,e,t,r,a){var n=t.axis,o={},s=a.model.coordinateSystem.getRect();return i=i||[0,0],n.dim==="x"?(o.pixel=e[0]-i[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-i[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(i,e,t,r,a){var n=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return i=i?s.pointToCoord(i):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-i[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-i[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(i,e,t,r,a){var n=t.axis,o=a.model.coordinateSystem.getRect(),s={};return i=i||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-i[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-i[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}};function Wo(i){ca(i),i.registerComponentModel(Ro),i.registerComponentView(Go),Ho(i)}var Fo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Rt(te.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:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e})(te),St=ut,Tr=7,Zo=1,me=30,$o=7,bt="horizontal",Dr="vertical",Yo=5,Ko=["line","bar","candlestick","scatter"],Uo={easing:"cubicOut",duration:100,delay:0},Xo=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,r){this.api=r,this._onBrush=C(this._onBrush,this),this._onBrushEnd=C(this._onBrushEnd,this)},e.prototype.render=function(t,r,a,n){if(i.prototype.render.apply(this,arguments),Re(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(),i.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){xi(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 Y;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(r),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,r=this.api,a=t.get("brushSelect"),n=a?$o:0,o=this._findCoordRect(),s={width:r.getWidth(),height:r.getHeight()},l=this._orient===bt?{right:s.width-o.x-o.width,top:s.height-me-Tr-n,width:o.width,height:me}:{right:Tr,top:o.y,width:me,height:o.height},u=ta(t.option);M(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var h=Pt(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===Dr&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,r=this._location,a=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===bt&&!o?{scaleY:l?1:-1,scaleX:1}:a===bt&&o?{scaleY:l?1:-1,scaleX:-1}:a===Dr&&!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,a=this._displayables.sliderGroup,n=t.get("brushSelect");a.add(new St({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new St({shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:"transparent"},z2:0,onclick:C(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)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var r=this._size,a=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]!==a[0]||r[1]!==a[1]){var c=o.getDataExtent(l),v=(c[1]-c[0])*.3;c=[c[0]-v,c[1]+v];var p=[0,r[1]],f=[0,r[0]],d=[[r[0],0],[0,0]],g=[],y=f[1]/(o.count()-1),S=0,b=Math.round(o.count()/r[0]),m;o.each([l],function(w,I){if(b>0&&I%b){S+=y;return}var L=w==null||isNaN(w)||w==="",H=L?0:$(w,c,p,!0);L&&!m&&I?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!L&&m&&(d.push([S,0]),g.push([S,0])),d.push([S,H]),g.push([S,H]),S+=y,m=L}),u=this._shadowPolygonPts=d,h=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[r[0],r[1]];var x=this.dataZoomModel;function _(w){var I=x.getModel(w?"selectedDataBackground":"dataBackground"),L=new Y,H=new Jt({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),V=new ra({shape:{points:h},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return L.add(H),L.add(V),L}for(var A=0;A<3;A++){var D=_(A===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,r=t.get("showDataShadow");if(r!==!1){var a,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();M(l,function(u){if(!a&&!(r!==!0&&wt(Ko,u.get("type"))<0)){var h=n.getComponent(Si(o),s).axis,c=qo(o),v,p=u.coordinateSystem;c!=null&&p.getOtherAxis&&(v=p.getOtherAxis(h).inverse),c=u.getData().mapDimension(c),a={thisAxis:h,series:u,thisDim:o,otherDim:c,otherAxisInverse:v}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,r=this._displayables,a=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,c=l.get("brushSelect"),v=r.filler=new St({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new St({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:Zo,fill:"rgba(0,0,0,0)"}})),M([0,1],function(b){var m=l.get("handleIcon");!bi[m]&&m.indexOf("path://")<0&&m.indexOf("image://")<0&&(m="path://"+m);var x=dt(m,-1,0,2,2,null,!0);x.attr({cursor:Cr(this._orient),draggable:!0,drift:C(this._onDragMove,this,b),ondragend:C(this._onDragEnd,this),onmouseover:C(this._showDataInfo,this,!0),onmouseout:C(this._showDataInfo,this,!1),z2:5});var _=x.getBoundingRect(),A=l.get("handleSize");this._handleHeight=R(A,this._size[1]),this._handleWidth=_.width/_.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Kt(x);var D=l.get("handleColor");D!=null&&(x.style.fill=D),o.add(a[b]=x);var w=l.getModel("textStyle"),I=l.get("handleLabel")||{},L=I.show||!1;t.add(n[b]=new O({silent:!0,invisible:!L,style:Z(w,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:w.getTextColor(),font:w.getFont()}),z2:10}))},this);var p=v;if(c){var f=R(l.get("moveHandleSize"),s[1]),d=r.moveHandle=new ut({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:f}}),g=f*.8,y=r.moveHandleIcon=dt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+f/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var S=Math.min(s[1]/2,Math.max(f,10));p=r.moveZone=new ut({invisible:!0,shape:{y:s[1]-S,height:f+S}}),p.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(p)}p.attr({draggable:!0,cursor:Cr(this._orient),drift:C(this._onDragMove,this,"all"),ondragstart:C(this._showDataInfo,this,!0),ondragend:C(this._onDragEnd,this),onmouseover:C(this._showDataInfo,this,!0),onmouseout:C(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),r=this._getViewExtent();this._handleEnds=[$(t[0],[0,100],r,!0),$(t[1],[0,100],r,!0)]},e.prototype._updateInterval=function(t,r){var a=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];se(r,n,o,a.get("zoomLock")?"all":t,s.minSpan!=null?$(s.minSpan,l,o,!0):null,s.maxSpan!=null?$(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=X([$(n[0],o,l,!0),$(n[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(t){var r=this._displayables,a=this._handleEnds,n=X(a.slice()),o=this._size;M([0,1],function(p){var f=r.handles[p],d=this._handleHeight;f.attr({scaleX:d/2,scaleY:d/2,x:a[p]+(p?-1:1),y:o[1]/2-d/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;h<l.length;h++){var c=l[h],v=c.getClipPath();v||(v=new ut,c.setClipPath(v)),v.setShape({x:u[h],y:0,width:u[h+1]-u[h],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var r=this.dataZoomModel,a=this._displayables,n=a.handleLabels,o=this._orient,s=["",""];if(r.get("showDetail")){var l=r.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,h=this._range,c=t?l.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(c[0],u),this._formatLabel(c[1],u)]}}var v=X(this._handleEnds.slice());p.call(this,0),p.call(this,1);function p(f){var d=Ut(a.handles[f].parent,this.group),g=va(f===0?"right":"left",d),y=this._handleWidth/2+Yo,S=lt([v[f]+(f===0?-y:y),this._size[1]/2],d);n[f].setStyle({x:S[0],y:S[1],verticalAlign:o===bt?"middle":g,align:o===bt?g:"center",text:s[f]})}},e.prototype._formatLabel=function(t,r){var a=this.dataZoomModel,n=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=r.getPixelPrecision());var s=t==null||isNaN(t)?"":r.type==="category"||r.type==="time"?r.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return G(n)?n(t,s):q(n)?n.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var r=this.dataZoomModel.get("handleLabel")||{},a=r.show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=n.get("show")||!1,s=t||this._dragging?o:a,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,r,a,n){this._dragging=!0,Tt(n.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=lt([r,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var r=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>r[0]||a[1]<0||a[1]>r[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var r=t.offsetX,a=t.offsetY;this._brushStart=new _i(r,a),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 a=r.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=X([$(a.x,o,s,!0),$(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Tt(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,r){var a=this._displayables,n=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new St({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),a.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),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:c[1]})},e.prototype._dispatchZoomAction=function(t){var r=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Uo:null,start:r[0],end:r[1]})},e.prototype._findCoordRect=function(){var t,r=ua(this.dataZoomModel).infoList;if(!t&&r.length){var a=r[0].model.coordinateSystem;t=a.getRect&&a.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})(ha);function qo(i){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[i]}function Cr(i){return i==="vertical"?"ns-resize":"ew-resize"}function jo(i){i.registerComponentModel(Fo),i.registerComponentView(Xo),ca(i)}function Qo(i){ct(Wo),ct(jo)}var Aa={get:function(i,e,t){var r=z((Jo[i]||{})[e]);return t&&k(r)?r[r.length-1]:r}},Jo={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]}},Ir=E.mapVisual,ts=E.eachVisual,es=k,Lr=M,rs=X,as=$,ie=(function(i){T(e,i);function e(){var t=i!==null&&i.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,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,r){var a=this.option;!r&&ma(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=C(t,this),this.controllerVisuals=Ce(this.option.controller,r,t),this.targetVisuals=Ce(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(a,n){r.push(n)}):r=oa(t),r},e.prototype.eachTargetSeries=function(t,r){M(this.getTargetSeriesIndices(),function(a){var n=this.ecModel.getSeriesByIndex(a);n&&t.call(r,n)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(a){a===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,a){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;a=a||["<",">"],k(t)&&(t=t.slice(),u=!0);var h=r?t:u?[c(t[0]),c(t[1])]:c(t);if(q(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(G(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+h[1]:t[1]===s[1]?a[1]+" "+h[0]:h[0]+" - "+h[1];return h;function c(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,r=rs([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 a=t.dimensions,n=a.length-1;n>=0;n--){var o=a[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,a={inRange:r.inRange,outOfRange:r.outOfRange},n=r.target||(r.target={}),o=r.controller||(r.controller={});vt(n,a),vt(o,a);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),h.call(this,o);function l(c){es(r.color)&&!c.inRange&&(c.inRange={color:r.color.slice().reverse()}),c.inRange=c.inRange||{color:t.get("gradientColor")}}function u(c,v,p){var f=c[v],d=c[p];f&&!d&&(d=c[p]={},Lr(f,function(g,y){if(E.isValidType(y)){var S=Aa.get(y,"inactive",s);S!=null&&(d[y]=S,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function h(c){var v=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,p=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,f=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";Lr(this.stateList,function(y){var S=this.itemSize,b=c[y];b||(b=c[y]={color:s?f:[f]}),b.symbol==null&&(b.symbol=v&&z(v)||(s?g:[g])),b.symbolSize==null&&(b.symbolSize=p&&z(p)||(s?S[0]:[S[0],S[0]])),b.symbol=Ir(b.symbol,function(_){return _==="none"?g:_});var m=b.symbolSize;if(m!=null){var x=-1/0;ts(m,function(_){_>x&&(x=_)}),b.symbolSize=Ir(m,function(_){return as(_,[0,x],[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})(J),kr=[20,140],is=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,r){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){i.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=kr[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=kr[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):k(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(){i.prototype.completeVisualOption.apply(this,arguments),M(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=X((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]<t[0]&&(r[0]=t[0]),r[1]<t[0]&&(r[1]=t[0]),r},e.prototype.getValueState=function(t){var r=this.option.range,a=this.getExtent();return(r[0]<=a[0]||r[0]<=t)&&(r[1]>=a[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(a){var n=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),r.push({seriesId:a.id,dataIndex:n})},this),r},e.prototype.getVisualMeta=function(t){var r=Pr(this,"outOfRange",this.getExtent()),a=Pr(this,"inRange",this.option.range.slice()),n=[];function o(p,f){n.push({value:p,color:t(p,f)})}for(var s=0,l=0,u=a.length,h=r.length;l<h&&(!a.length||r[l]<=a[0]);l++)r[l]<a[s]&&o(r[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&n.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var c=1;l<h;l++)(!a.length||a[a.length-1]<r[l])&&(c&&(n.length&&o(n[n.length-1].value,"outOfRange"),c=0),o(r[l],"outOfRange"));var v=n.length;return{stops:n,outerColors:[v?n[0].color:"transparent",v?n[v-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Rt(ie.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,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",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e})(ie);function Pr(i,e,t){if(t[0]===t[1])return t.slice();for(var r=200,a=(t[1]-t[0])/r,n=t[0],o=[],s=0;s<=r&&n<t[1];s++)o.push(n),n+=a;return o.push(t[1]),o}var wa=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r},e.prototype.render=function(t,r,a,n){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,r,a,n)},e.prototype.renderBackground=function(t){var r=this.visualMapModel,a=Mi(r.get("padding")||0),n=t.getBoundingRect();t.add(new ut({z2:-1,silent:!0,shape:{x:n.x-a[3],y:n.y-a[0],width:n.width+a[3]+a[1],height:n.height+a[0]+a[2]},style:{fill:r.get("backgroundColor"),stroke:r.get("borderColor"),lineWidth:r.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,r,a){a=a||{};var n=a.forceState,o=this.visualMapModel,s={};if(r==="color"){var l=o.get("contentColor");s.color=l}function u(p){return s[p]}function h(p,f){s[p]=f}var c=o.controllerVisuals[n||o.getValueState(t)],v=E.prepareVisualTypes(c);return M(v,function(p){var f=c[p];a.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",f=c.__alphaForOpacity),E.dependsOn(p,r)&&f&&f.applyVisual(t,u,h)}),s[r]},e.prototype.positionGroup=function(t){var r=this.visualMapModel,a=this.api;aa(t,r.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,r,a,n){},e.type="visualMap",e})(rt),Rr=[["left","right","width"],["top","bottom","height"]];function Ta(i,e,t){var r=i.option,a=r.align;if(a!=null&&a!=="auto")return a;for(var n={width:e.getWidth(),height:e.getHeight()},o=r.orient==="horizontal"?1:0,s=Rr[o],l=[0,null,10],u={},h=0;h<3;h++)u[Rr[1-o][h]]=l[h],u[s[h]]=h===2?t[0]:r[s[h]];var c=[["x","width",3],["y","height",0]][o],v=Pt(u,n,r.padding);return s[(v.margin[c[2]]||0)+v[c[0]]+v[c[1]]*.5<n[c[1]]*.5?0:1]}function jt(i,e){return M(i||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),i}var K=$,ns=M,zr=Math.min,xe=Math.max,os=12,ss=6,ls=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,r){i.prototype.init.call(this,t,r),this._hoverLinkFromSeriesMouseOver=C(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=C(this._hideIndicator,this)},e.prototype.doRender=function(t,r,a,n){(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,r=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(r);var a=t.get("text");this._renderEndsText(r,a,0),this._renderEndsText(r,a,1),this._updateView(!0),this.renderBackground(r),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(r)},e.prototype._renderEndsText=function(t,r,a){if(r){var n=r[1-a];n=n!=null?n+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,h=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),c=this._applyTransform(a===0?"bottom":"top",u),v=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new O({style:Z(p,{x:h[0],y:h[1],verticalAlign:v==="horizontal"?"middle":c,align:v==="horizontal"?c:"center",text:n})}))}},e.prototype._renderBar=function(t){var r=this.visualMapModel,a=this._shapes,n=r.itemSize,o=this._orient,s=this._useHandle,l=Ta(r,this.api,n),u=a.mainGroup=this._createBarGroup(l),h=new Y;u.add(h),h.add(a.outOfRange=Vr()),h.add(a.inRange=Vr(null,s?Or(this._orient):null,C(this._dragHandle,this,"all",!1),C(this._dragHandle,this,"all",!0))),h.setClipPath(new ut({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var c=r.textStyleModel.getTextRect("国"),v=xe(c.width,c.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(r,u,0,n,v,o),this._createHandle(r,u,1,n,v,o)),this._createIndicator(r,u,n,v,o),t.add(u)},e.prototype._createHandle=function(t,r,a,n,o,s){var l=C(this._dragHandle,this,a,!1),u=C(this._dragHandle,this,a,!0),h=we(t.get("handleSize"),n[0]),c=dt(t.get("handleIcon"),-h/2,-h/2,h,h,null,!0),v=Or(this._orient);c.attr({cursor:v,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){Tt(y.event)}}),c.x=n[0]/2,c.useStyle(t.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Ai(c,!0),r.add(c);var p=this.visualMapModel.textStyleModel,f=new O({cursor:v,draggable:!0,drift:l,onmousemove:function(y){Tt(y.event)},ondragend:u,style:Z(p,{x:0,y:0,text:""})});f.ensureState("blur").style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var d=[h,0],g=this._shapes;g.handleThumbs[a]=c,g.handleLabelPoints[a]=d,g.handleLabels[a]=f},e.prototype._createIndicator=function(t,r,a,n,o){var s=we(t.get("indicatorSize"),a[0]),l=dt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof na){var h=l.style;l.useStyle(B({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},u))}else l.useStyle(u);r.add(l);var c=this.visualMapModel.textStyleModel,v=new O({silent:!0,invisible:!0,style:Z(c,{x:0,y:0,text:""})});this.group.add(v);var p=[(o==="horizontal"?n/2:ss)+a[0]/2,0],f=this._shapes;f.indicator=l,f.indicatorLabel=v,f.indicatorLabelPoint=p,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,r,a,n){if(this._useHandle){if(this._dragging=!r,!r){var o=this._applyTransform([a,n],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}r===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),r?!this._hovering&&this._clearHoverLinkToSeries():Er(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,r=this._dataInterval=t.getSelected(),a=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[K(r[0],a,n,!0),K(r[1],a,n,!0)]},e.prototype._updateInterval=function(t,r){r=r||0;var a=this.visualMapModel,n=this._handleEnds,o=[0,a.itemSize[1]];se(r,n,o,t,0);var s=a.getExtent();this._dataInterval=[K(n[0],o,s,!0),K(n[1],o,s,!0)]},e.prototype._updateView=function(t){var r=this.visualMapModel,a=r.getExtent(),n=this._shapes,o=[0,r.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");n.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),n.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,r,a,n){var o={forceState:n,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new wi(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,r){var a=100,n=[],o=(t[1]-t[0])/a;n.push({color:this.getControllerVisual(t[0],"color",r),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;n.push({color:this.getControllerVisual(l,"color",r),offset:s/a})}return n.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),n},e.prototype._createBarPoints=function(t,r){var a=this.visualMapModel.itemSize;return[[a[0]-r[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,a=this.visualMapModel.get("inverse");return new Y(r==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(this._useHandle){var a=this._shapes,n=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=n.itemSize,u=n.getExtent(),h=this._applyTransform("left",a.mainGroup);ns([0,1],function(c){var v=o[c];v.setStyle("fill",r.handlesColor[c]),v.y=t[c];var p=K(t[c],[0,l[1]],u,!0),f=this.getControllerVisual(p,"symbolSize");v.scaleX=v.scaleY=f/l[0],v.x=l[0]-f/2;var d=lt(a.handleLabelPoints[c],Ut(v,this.group));if(this._orient==="horizontal"){var g=h==="left"||h==="top"?(l[0]-f)/2:(l[0]-f)/-2;d[1]+=g}s[c].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,a,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,c=h.indicator;if(c){c.attr("invisible",!1);var v={convertOpacityToAlpha:!0},p=this.getControllerVisual(t,"color",v),f=this.getControllerVisual(t,"symbolSize"),d=K(t,s,u,!0),g=l[0]-f/2,y={x:c.x,y:c.y};c.y=d,c.x=g;var S=lt(h.indicatorLabelPoint,Ut(c,this.group)),b=h.indicatorLabel;b.attr("invisible",!1);var m=this._applyTransform("left",h.mainGroup),x=this._orient,_=x==="horizontal";b.setStyle({text:(a||"")+o.formatValueText(r),verticalAlign:_?m:"middle",align:_?"center":m});var A={x:g,y:d,style:{fill:p}},D={style:{x:S[0],y:S[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(A,w),b.animateTo(D,w)}else c.attr(A),b.attr(D);this._firstShowIndicator=!1;var I=this._shapes.handleLabels;if(I)for(var L=0;L<I.length;L++)this.api.enterBlur(I[L])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(r){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,n=t._applyTransform([r.offsetX,r.offsetY],t._shapes.mainGroup,!0,!0);n[1]=zr(xe(0,n[1]),a[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,r){var a=this.visualMapModel,n=a.itemSize;if(a.option.hoverLink){var o=[0,n[1]],s=a.getExtent();t=zr(xe(o[0],t),o[1]);var l=us(a,s,o),u=[t-l,t+l],h=K(t,o,s,!0),c=[K(u[0],o,s,!0),K(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),r&&(c[0]===-1/0?this._showIndicator(h,c[1],"< ",l):c[1]===1/0?this._showIndicator(h,c[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var v=this._hoverLinkDataIndices,p=[];(r||Er(a))&&(p=this._hoverLinkDataIndices=a.findTargetDataIndices(c));var f=Ti(v,p);this._dispatchHighDown("downplay",jt(f[0],a)),this._dispatchHighDown("highlight",jt(f[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r;if(Di(t.target,function(l){var u=j(l);if(u.dataIndex!=null)return r=u,!0},!0),!!r){var a=this.ecModel.getSeriesByIndex(r.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(a)){var o=a.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 a=0;a<r.length;a++)this.api.leaveBlur(r[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",jt(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,r,a,n){var o=Ut(r,n?null:this.group);return k(t)?lt(t,o,a):va(t,o,a)},e.prototype._dispatchHighDown=function(t,r){r&&r.length&&this.api.dispatchAction({type:t,batch:r})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(wa);function Vr(i,e,t,r){return new Jt({shape:{points:i},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){Tt(a.event)},ondragend:r})}function us(i,e,t){var r=os/2,a=i.get("hoverLinkDataSize");return a&&(r=K(a,e,t,!0)/2),r}function Er(i){var e=i.get("hoverLinkOnHandle");return!!(e??i.get("realtime"))}function Or(i){return i==="vertical"?"ns-resize":"ew-resize"}var hs={type:"selectDataRange",event:"dataRangeSelected",update:"update"},cs=function(i,e){e.eachComponent({mainType:"visualMap",query:i},function(t){t.setSelected(i.selected)})},vs=[{createOnAllSeries:!0,reset:function(i,e){var t=[];return e.eachComponent("visualMap",function(r){var a=i.pipelineContext;!r.isTargetSeries(i)||a&&a.large||t.push(Zn(r.stateList,r.targetVisuals,C(r.getValueState,r),r.getDataDimensionIndex(i.getData())))}),t}},{createOnAllSeries:!0,reset:function(i,e){var t=i.getData(),r=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(i)){var n=a.getVisualMeta(C(ps,null,i,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(n.dimension=o,r.push(n))}}),i.getData().setVisual("visualMeta",r)}}];function ps(i,e,t,r){for(var a=e.targetVisuals[r],n=E.prepareVisualTypes(a),o={color:oe(i.getData(),"color")},s=0,l=n.length;s<l;s++){var u=n[s],h=a[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(t,c,v)}return o.color;function c(p){return o[p]}function v(p,f){o[p]=f}}var Br=M;function fs(i){var e=i&&i.visualMap;k(e)||(e=e?[e]:[]),Br(e,function(t){if(t){pt(t,"splitList")&&!pt(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var r=t.pieces;r&&k(r)&&Br(r,function(a){Lt(a)&&(pt(a,"start")&&!pt(a,"min")&&(a.min=a.start),pt(a,"end")&&!pt(a,"max")&&(a.max=a.end))})}})}function pt(i,e){return i&&i.hasOwnProperty&&i.hasOwnProperty(e)}var Nr=!1;function Da(i){Nr||(Nr=!0,i.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),i.registerAction(hs,cs),M(vs,function(e){i.registerVisual(i.PRIORITY.VISUAL.COMPONENT,e)}),i.registerPreprocessor(fs))}function ds(i){i.registerComponentModel(is),i.registerComponentView(ls),Da(i)}var gs=(function(i){T(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,r){i.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],ys[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var n=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=z(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=P(this._pieceList,function(l){return l=z(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},a=E.listVisualTypes(),n=this.isCategory();M(t.pieces,function(s){M(a,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),M(r,function(s,l){var u=!1;M(this.stateList,function(h){u=u||o(t,h,l)||o(t.target,h,l)},this),!u&&M(this.stateList,function(h){(t[h]||(t[h]={}))[l]=Aa.get(l,h==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}i.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,r){var a=this.option,n=this._pieceList,o=(r?a:t).selected||{};if(a.selected=o,M(n,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),a.selectedMode==="single"){var s=!1;M(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=z(t)},e.prototype.getValueState=function(t){var r=E.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],a=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=E.findPieceIndex(l,a);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 a=t.interval||[];r=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],a=["",""],n=this;function o(h,c){var v=n.getRepresentValue({interval:h});c||(c=n.getValueState(v));var p=t(v,c);h[0]===-1/0?a[0]=p:h[1]===1/0?a[1]=p:r.push({value:h[0],color:p},{value:h[1],color:p})}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 M(s,function(h){var c=h.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:r,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=Rt(ie.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})(ie),ys={splitNumber:function(i){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var n=(r[1]-r[0])/a;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&i.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<a;s+=n,o++){var l=o===a-1?r[1]:s+n;i.push({interval:[s,l],close:[1,1]})}e.maxOpen&&i.push({interval:[r[1],1/0],close:[0,0]}),Ue(i),M(i,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(i){var e=this.option;M(e.categories,function(t){i.push({text:this.formatValueText(t,!0),value:t})},this),Hr(e,i)},pieces:function(i){var e=this.option;M(e.pieces,function(t,r){Lt(t)||(t={value:t});var a={text:"",index:r};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var n=a.value=t.value;a.interval=[n,n],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],h=[],c=0;c<2;c++){for(var v=[["gte","gt","min"],["lte","lt","max"]][c],p=0;p<3&&o[c]==null;p++)o[c]=t[v[p]],s[c]=l[p],h[c]=p===2;o[c]==null&&(o[c]=u[c])}h[0]&&o[1]===1/0&&(s[0]=0),h[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=E.retrieveVisuals(t),i.push(a)},this),Hr(e,i),Ue(i),M(i,function(t){var r=t.close,a=[["<","≤"][r[1]],[">","≥"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function Hr(i,e){var t=i.inverse;(i.orient==="vertical"?!t:t)&&e.reverse()}var ms=(function(i){T(e,i);function e(){var t=i!==null&&i.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,a=r.get("textGap"),n=r.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=r.itemSize,h=this._getViewData(),c=h.endsText,v=st(r.get("showLabel",!0),!c),p=!r.get("selectedMode");c&&this._renderEndsText(t,c[0],u,v,l),M(h.viewPieceList,function(f){var d=f.piece,g=new Y;g.onclick=C(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]],p),v){var S=this.visualMapModel.getValueState(y);g.add(new O({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:S==="outOfRange"?.5:1},silent:p}))}t.add(g)},this),c&&this._renderEndsText(t,c[1],u,v,l),Ci(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var a=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:jt(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return Ta(t,this.api,t.itemSize);var a=r.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,r,a,n,o){if(r){var s=new Y,l=this.visualMapModel.textStyleModel;s.add(new O({style:Z(l,{x:n?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:n?o:"center",text:r})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=P(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?r.reverse():a&&(a=a.slice().reverse()),{viewPieceList:r,endsText:a}},e.prototype._createItemSymbol=function(t,r,a,n){var o=dt(this.getControllerVisual(r,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(r,"color"));o.silent=n,t.add(o)},e.prototype._onItemClick=function(t){var r=this.visualMapModel,a=r.option,n=a.selectedMode;if(n){var o=z(a.selected),s=r.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,M(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})(wa);function xs(i){i.registerComponentModel(gs),i.registerComponentView(ms),Da(i)}function Ss(i){ct(ds),ct(xs)}ct([ro,Ln,Qo,Bi,Nn,Po,To,So,Ni,pn,Ii,Tn,vo,Ss]);
|