x-print-designer 0.0.1

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.
@@ -0,0 +1,22 @@
1
+ import{G as ot,d as N,Z,au as ae,l as O,c as H,b as R,o as ct,g as w,av as un,a0 as Ye,aw as hn,p as E,n as F,a4 as cn,v as st,q as V,h as W,m as sr,f as q,i as Et,a7 as Zt,R as et,B as Lt,ak as Ut,I as lr,V as it,P as mt,ae as Ka,ax as ne,E as K,ay as Gr,r as rt,j as vt,at as oe,a3 as ls,_ as qa,a as ja,az as Hr,aA as Hn,aB as us,aC as hs,aD as cs,aE as vs,e as ps,$ as Xe,Q as Wr,a6 as Wn,ap as fs,aF as ds,aG as gs,aH as ys,aI as gr,aJ as ms,aK as xs}from"./graphic-Cay9kDL2.js";import{bf as vn,V as ur,c6 as Te,c7 as Ke,a4 as hr,b9 as dt,c8 as zt,aa as cr,a as nt,c9 as Qa,aQ as D,aR as M,ad as Q,ae as at,aW as Ss,aM as pt,bP as Yt,A as Ja,ag as Nt,ca as Zn,n as Zr,c as to,bq as kt,w as U,S as eo,a1 as Tt,L as Rt,M as tt,cb as Me,f as $,Q as _s,cc as ro,I as bs,i as no,cd as ws,h as ft,ce as pn,cf as Cs,cg as fn,O as io,ch as Ts,ci as Fn,v as Ms,cj as dn,bA as ao,ck as oo,cl as P,cm as St,cn as Dt,co as Vt,cp as $n,cq as Fr,cr as Bt,aY as gn,cs as yr,ct as As,cu as Ds,cv as Is,bp as xe,bt as yn,cw as Ls,Y as ks,cx as Ps,s as j,m as Rs,cy as Os,cz as zs,k as wt,bu as Vs,cA as Bs,bG as Un,bH as Yn,bT as Es,cB as Ft,av as mn,cC as so,Z as Se,cD as Ns,cE as Gs,ab as lo,aT as qe,cF as uo,bM as X,cG as Hs,cH as ho,bi as _e,cI as mr,cJ as Xn,cK as Kn,E as Ws,a8 as Zs,cL as Fs,cM as co,bs as vo,cN as po,cO as fo,cP as ce,cQ as Ae,bv as qn,c5 as $s,ah as $t,b1 as ue,cR as xn,d as ie,cS as Us,cT as Ys,b as Xt,bg as Xs,bO as Ks,bc as qs,cU as je,o as js,cV as Qs,cW as Js,cX as go,cY as yo,cZ as vr,g as tl,P as Qe,aZ as el,aU as rl,aV as nl,c_ as il,bQ as al,c$ as ol,d0 as mo,bx as sl,N as ll,d1 as ul,B as jn,d2 as hl,d3 as cl,br as Qn,d4 as xo,d5 as vl,d6 as pl,bL as fl,d7 as dl,d8 as gl,d9 as Jn,da as yl}from"./Axis-hDyHms34.js";import{z as ml,A as se,B as ti,C as xl,D as he,F as Sl,d as _l,G as $r,H as bl,I as wl,x as Cl,y as Tl,t as Ml,v as xr,J as Al,w as ei,K as Dl,q as Il,N as Kt,O as Ll,P as kl,Q as Pl,T as So,k as lt,S as Rl,L as Ol,i as Sn,R as _o,U as ri,V as zl}from"./customGraphicKeyframeAnimation-g4tvH6et.js";import{h as Up,o as Yp,e as Xp}from"./customGraphicKeyframeAnimation-g4tvH6et.js";var Ht=dt(),ni=H,Sr=R,_n=(function(){function n(){this._dragging=!1,this.animationThreshold=15}return n.prototype.render=function(e,t,r,i){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=r,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,r);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=h;var c=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new ot,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),r.getZr().add(s);else{var v=N(ii,t,c);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,t)}oi(s,t,!0),this._renderHandle(a)}},n.prototype.remove=function(e){this.clear(e)},n.prototype.dispose=function(e){this.clear(e)},n.prototype.determineAnimation=function(e,t){var r=t.get("animation"),i=e.axis,a=i.type==="category",o=t.get("snap");if(!o&&!a)return!1;if(r==="auto"||r==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=ml(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return r===!0},n.prototype.makeElOption=function(e,t,r,i,a){},n.prototype.createPointerEl=function(e,t,r,i){var a=t.pointer;if(a){var o=Ht(e).pointerEl=new vn[a.type](ni(t.pointer));e.add(o)}},n.prototype.createLabelEl=function(e,t,r,i){if(t.label){var a=Ht(e).labelEl=new Z(ni(t.label));e.add(a),ai(a,i)}},n.prototype.updatePointerEl=function(e,t,r){var i=Ht(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),r(i,{shape:t.pointer.shape}))},n.prototype.updateLabelEl=function(e,t,r,i){var a=Ht(e).labelEl;a&&(a.setStyle(t.label.style),r(a,{x:t.label.x,y:t.label.y}),ai(a,i))},n.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,r=this._api.getZr(),i=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){i&&r.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=ur(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ae(u.event)},onmousedown:Sr(this._onHandleDragMove,this,0,0),drift:Sr(this._onHandleDragMove,this),ondragend:Sr(this._onHandleDragEnd,this)}),r.add(i)),oi(i,t,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");O(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Te(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},n.prototype._moveHandleToValue=function(e,t){ii(this._axisPointerModel,!t&&this._moveAnimation,this._handle,_r(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},n.prototype._onHandleDragMove=function(e,t){var r=this._handle;if(r){this._dragging=!0;var i=this.updateHandleTransform(_r(r),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,r.stopAnimation(),r.attr(_r(i)),Ht(r).lastProp=null,this._doDispatchAxisPointer()}},n.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},n.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},n.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),r=this._group,i=this._handle;t&&r&&(this._lastGraphicKey=null,r&&t.remove(r),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Ke(this,"_doDispatchAxisPointer")},n.prototype.doClear=function(){},n.prototype.buildLabel=function(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}},n})();function ii(n,e,t,r){bo(Ht(t).lastProp,r)||(Ht(t).lastProp=r,e?hr(t,r,n):(t.stopAnimation(),t.attr(r)))}function bo(n,e){if(ct(n)&&ct(e)){var t=!0;return w(e,function(r,i){t=t&&bo(n[i],r)}),!!t}else return n===e}function ai(n,e){n[e.get(["label","show"])?"show":"hide"]()}function _r(n){return{x:n.x||0,y:n.y||0,rotation:n.rotation||0}}function oi(n,e,t){var r=e.get("z"),i=e.get("zlevel");n&&n.traverse(function(a){a.type!=="group"&&(r!=null&&(a.z=r),i!=null&&(a.zlevel=i),a.silent=t)})}function bn(n){var e=n.get("type"),t=n.getModel(e+"Style"),r;return e==="line"?(r=t.getLineStyle(),r.fill=null):e==="shadow"&&(r=t.getAreaStyle(),r.stroke=null),r}function wo(n,e,t,r,i){var a=t.get("value"),o=Co(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=cr(s.get("padding")||0),u=s.getFont(),h=hn(o,u),c=i.position,v=h.width+l[1]+l[3],p=h.height+l[0]+l[2],f=i.align;f==="right"&&(c[0]-=v),f==="center"&&(c[0]-=v/2);var d=i.verticalAlign;d==="bottom"&&(c[1]-=p),d==="middle"&&(c[1]-=p/2),Vl(c,v,p,r);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),n.label={x:c[0],y:c[1],style:nt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Vl(n,e,t,r){var i=r.getWidth(),a=r.getHeight();n[0]=Math.min(n[0]+e,i)-e,n[1]=Math.min(n[1]+t,a)-t,n[0]=Math.max(n[0],0),n[1]=Math.max(n[1],0)}function Co(n,e,t,r,i){n=e.scale.parse(n);var a=e.scale.getLabel({value:n},{precision:i.precision}),o=i.formatter;if(o){var s={value:Qa(e,{value:n}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};w(r,function(l){var u=t.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,c=u&&u.getDataParams(h);c&&s.seriesData.push(c)}),E(o)?a=o.replace("{value}",a):F(o)&&(a=o(s))}return a}function wn(n,e,t){var r=cn();return un(r,r,t.rotation),Ye(r,r,t.position),zt([n.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],r)}function To(n,e,t,r,i,a){var o=se.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),wo(e,r,i,a,{position:wn(r.axis,n,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Cn(n,e,t){return t=t||0,{x1:n[t],y1:n[1-t],x2:e[t],y2:e[1-t]}}function Mo(n,e,t){return t=t||0,{x:n[t],y:n[1-t],width:e[t],height:e[1-t]}}function si(n,e,t,r,i,a){return{cx:n,cy:e,r0:t,r,startAngle:i,endAngle:a,clockwise:!0}}var Bl=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),h=li(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(r,!0));if(u&&u!=="none"){var v=bn(a),p=El[u](s,c,h);p.style=v,t.graphicKey=p.type,t.pointer=p}var f=ti(l.getRect(),i);To(r,t,f,i,a,o)},e.prototype.getHandleTransform=function(t,r,i){var a=ti(r.axis.grid.getRect(),r,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=wn(r.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=li(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,c=[t.x,t.y];c[h]+=r[h],c[h]=Math.min(l[1],c[h]),c[h]=Math.max(l[0],c[h]);var v=(u[1]+u[0])/2,p=[v,v];p[h]=c[h];var f=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:p,tooltipOption:f[h]}},e})(_n);function li(n,e){var t={};return t[e.dim+"AxisIndex"]=e.index,n.getCartesian(t)}var El={line:function(n,e,t){var r=Cn([e,t[0]],[e,t[1]],ui(n));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(n,e,t){var r=Math.max(1,n.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:Mo([e-r/2,t[0]],[r,i],ui(n))}}};function ui(n){return n.dim==="x"?0:1}var Nl=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:M.color.border,width:1,type:"dashed"},shadowStyle:{color:M.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:M.color.neutral00,padding:[5,7,5,7],backgroundColor:M.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:M.color.accent40,throttle:40}},e})(Q),At=dt(),Gl=w;function Ao(n,e,t){if(!st.node){var r=e.getZr();At(r).records||(At(r).records={}),Hl(r,e);var i=At(r).records[n]||(At(r).records[n]={});i.handler=t}}function Hl(n,e){if(At(n).initialized)return;At(n).initialized=!0,t("click",N(hi,"click")),t("mousemove",N(hi,"mousemove")),t("globalout",Zl);function t(r,i){n.on(r,function(a){var o=Fl(e);Gl(At(n).records,function(s){s&&i(s,a,o.dispatchAction)}),Wl(o.pendings,e)})}}function Wl(n,e){var t=n.showTip.length,r=n.hideTip.length,i;t?i=n.showTip[t-1]:r&&(i=n.hideTip[r-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function Zl(n,e,t){n.handler("leave",null,t)}function hi(n,e,t,r){e.handler(n,t,r)}function Fl(n){var e={showTip:[],hideTip:[]},t=function(r){var i=e[r.type];i?i.push(r):(r.dispatchAction=t,n.dispatchAction(r))};return{dispatchAction:t,pendings:e}}function Ur(n,e){if(!st.node){var t=e.getZr(),r=(At(t).records||{})[n];r&&(At(t).records[n]=null)}}var $l=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var a=r.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Ao("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,r){Ur("axisPointer",r)},e.prototype.dispose=function(t,r){Ur("axisPointer",r)},e.type="axisPointer",e})(at);function Do(n,e){var t=[],r=n.seriesIndex,i;if(r==null||!(i=e.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Ss(a,n);if(o==null||o<0||O(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(n.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),c=h.dim,v=u.dim,p=c==="x"||c==="radius"?1:0,f=a.mapDimension(v),d=[];d[p]=a.get(f,o),d[1-p]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(a.getValues(V(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var ci=dt();function Ul(n,e,t){var r=n.currTrigger,i=[n.x,n.y],a=n,o=n.dispatchAction||R(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Ze(i)&&(i=Do({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Ze(i),u=a.axesInfo,h=s.axesInfo,c=r==="leave"||Ze(i),v={},p={},f={list:[],map:{}},d={showPointer:N(Xl,p),showTooltip:N(Kl,f)};w(s.coordSysMap,function(y,m){var x=l||y.containPoint(i);w(s.coordSysAxesInfo[m],function(S,_){var b=S.axis,C=Jl(u,S);if(!c&&x&&(!u||C)){var T=C&&C.value;T==null&&!l&&(T=b.pointToData(i)),T!=null&&vi(S,T,d,!1,v)}})});var g={};return w(h,function(y,m){var x=y.linkGroup;x&&!p[m]&&w(x.axesInfo,function(S,_){var b=p[_];if(S!==y&&b){var C=b.value;x.mapper&&(C=y.axis.scale.parse(x.mapper(C,pi(S),pi(y)))),g[y.key]=C}})}),w(g,function(y,m){vi(h[m],y,d,!0,v)}),ql(p,h,v),jl(f,i,n,o),Ql(h,o,t),v}}function vi(n,e,t,r,i){var a=n.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!n.involveSeries){t.showPointer(n,e);return}var o=Yl(e,n),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&W(i,s[0]),!r&&n.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(n,e,s),t.showTooltip(n,o,l)}}function Yl(n,e){var t=e.axis,r=t.dim,i=n,a=[],o=Number.MAX_VALUE,s=-1;return w(e.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(r),c,v;if(l.getAxisTooltipData){var p=l.getAxisTooltipData(h,n,t);v=p.dataIndices,c=p.nestestValue}else{if(v=l.indicesOfNearest(r,h[0],n,t.type==="category"?.5:null),!v.length)return;c=l.getData().get(h[0],v[0])}if(!(c==null||!isFinite(c))){var f=n-c,d=Math.abs(f);d<=o&&((d<o||f>=0&&s<0)&&(o=d,s=f,i=c,a.length=0),w(v,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function Xl(n,e,t,r){n[e.key]={value:t,payloadBatch:r}}function Kl(n,e,t,r){var i=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=xl(l),h=n.map[u];h||(h=n.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},n.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function ql(n,e,t){var r=t.axesInfo=[];w(e,function(i,a){var o=i.axisPointerModel.option,s=n[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&r.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function jl(n,e,t,r){if(Ze(e)||!n.list.length){r({type:"hideTip"});return}var i=((n.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:n.list})}function Ql(n,e,t){var r=t.getZr(),i="axisPointerLastHighlights",a=ci(r)[i]||{},o=ci(r)[i]={};w(n,function(u,h){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&w(c.seriesDataIndices,function(v){var p=v.seriesIndex+" | "+v.dataIndex;o[p]=v})});var s=[],l=[];w(a,function(u,h){!o[h]&&l.push(u)}),w(o,function(u,h){!a[h]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Jl(n,e){for(var t=0;t<(n||[]).length;t++){var r=n[t];if(e.axis.dim===r.axisDim&&e.axis.model.componentIndex===r.axisIndex)return r}}function pi(n){var e=n.axis.model,t={},r=t.axisDim=n.axis.dim;return t.axisIndex=t[r+"AxisIndex"]=e.componentIndex,t.axisName=t[r+"AxisName"]=e.name,t.axisId=t[r+"AxisId"]=e.id,t}function Ze(n){return!n||n[0]==null||isNaN(n[0])||n[1]==null||isNaN(n[1])}function pr(n){he.registerAxisPointerClass("CartesianAxisPointer",Bl),n.registerComponentModel(Nl),n.registerComponentView($l),n.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!O(t)&&(e.axisPointer.link=[t])}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=Sl(e,t)}),n.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Ul)}function wp(n){pt(_l),pt(pr)}var tu=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,a,o){var s=i.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=a.get("type");if(v&&v!=="none"){var p=bn(a),f=ru[v](s,l,c,h);f.style=p,t.graphicKey=f.type,t.pointer=f}var d=a.get(["label","margin"]),g=eu(r,i,a,l,d);wo(t,i,a,o,g)},e})(_n);function eu(n,e,t,r,i){var a=e.axis,o=a.dataToCoord(n),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,h,c;if(a.dim==="radius"){var v=cn();un(v,v,s),Ye(v,v,[r.cx,r.cy]),u=zt([o,-i],v);var p=e.getModel("axisLabel").get("rotate")||0,f=se.innerTextLayout(s,p*Math.PI/180,-1);h=f.textAlign,c=f.textVerticalAlign}else{var d=l[1];u=r.coordToPoint([d+i,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 ru={line:function(n,e,t,r){return n.dim==="angle"?{type:"Line",shape:Cn(e.coordToPoint([r[0],t]),e.coordToPoint([r[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(n,e,t,r){var i=Math.max(1,n.getBandWidth()),a=Math.PI/180;return n.dim==="angle"?{type:"Sector",shape:si(e.cx,e.cy,r[0],r[1],(-t-i/2)*a,(-t+i/2)*a)}:{type:"Sector",shape:si(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},nu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var r,i=this.ecModel;return i.eachComponent(t,function(a){a.getCoordSysModel()===this&&(r=a)},this),r},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e})(Q),Tn=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Yt).models[0]},e.type="polarAxis",e})(Q);sr(Tn,Ja);var iu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(Tn),au=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(Tn),Mn=(function(n){D(e,n);function e(t,r){return n.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})(Nt);Mn.prototype.dataToRadius=Nt.prototype.dataToCoord;Mn.prototype.radiusToData=Nt.prototype.coordToData;var ou=dt(),An=(function(n){D(e,n);function e(t,r){return n.call(this,"angle",t,r||[0,360])||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,r=t.getLabelModel(),i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),h=hn(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=ou(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})(Nt);An.prototype.dataToAngle=Nt.prototype.dataToCoord;An.prototype.angleToData=Nt.prototype.coordToData;var Io=["radius","angle"],su=(function(){function n(e){this.dimensions=Io,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Mn,this._angleAxis=new An,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return n.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},n.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},n.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},n.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},n.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,i=this._radiusAxis;return r.scale.type===e&&t.push(r),i.scale.type===e&&t.push(i),t},n.prototype.getAngleAxis=function(){return this._angleAxis},n.prototype.getRadiusAxis=function(){return this._radiusAxis},n.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},n.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},n.prototype.dataToPoint=function(e,t,r){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],r)},n.prototype.pointToData=function(e,t,r){r=r||[];var i=this.pointToCoord(e);return r[0]=this._radiusAxis.radiusToData(i[0],t),r[1]=this._angleAxis.angleToData(i[1],t),r},n.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+r*r);t/=l,r/=l;for(var u=Math.atan2(-r,t)/Math.PI*180,h=u<o?1:-1;u<o||u>s;)u+=h*360;return[l,u]},n.prototype.coordToPoint=function(e,t){t=t||[];var r=e[0],i=e[1]/180*Math.PI;return t[0]=Math.cos(i)*r+this.cx,t[1]=-Math.sin(i)*r+this.cy,t},n.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-i[0]*a,endAngle:-i[1]*a,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},x:this.cx-r[1],y:this.cy-r[1],width:r[1]*2,height:r[1]*2}},n.prototype.convertToPixel=function(e,t,r){var i=fi(t);return i===this?this.dataToPoint(r):null},n.prototype.convertFromPixel=function(e,t,r){var i=fi(t);return i===this?this.pointToData(r):null},n})();function fi(n){var e=n.seriesModel,t=n.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function lu(n,e,t){var r=e.get("center"),i=kt(e,t).refContainer;n.cx=U(r[0],i.width)+i.x,n.cy=U(r[1],i.height)+i.y;var a=n.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:O(s)||(s=[0,s]);var l=[U(s[0],o),U(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function uu(n,e){var t=this,r=t.getAngleAxis(),i=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),n.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();w(Zn(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),w(Zn(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),Zr(r.scale,r.model),Zr(i.scale,i.model),r.type==="category"&&!r.onBand){var a=r.getExtent(),o=360/r.scale.count();r.inverse?a[1]+=o:a[1]-=o,r.setExtent(a[0],a[1])}}function hu(n){return n.mainType==="angleAxis"}function di(n,e){var t;if(n.type=e.get("type"),n.scale=to(e),n.onBand=e.get("boundaryGap")&&n.type==="category",n.inverse=e.get("inverse"),hu(e)){n.inverse=n.inverse!==e.get("clockwise");var r=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:r+(n.inverse?-360:360);n.setExtent(r,i)}e.axis=n,n.model=e}var cu={dimensions:Io,create:function(n,e){var t=[];return n.eachComponent("polar",function(r,i){var a=new su(i+"");a.update=uu;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");di(o,l),di(s,u),lu(a,r,e),t.push(a),r.coordinateSystem=a,a.model=r}),n.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var i=r.getReferringComponents("polar",Yt).models[0];r.coordinateSystem=i.coordinateSystem}}),t}},vu=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function De(n,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=n.coordToPoint([e[0],t]),i=n.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function Ie(n){var e=n.getRadiusAxis();return e.inverse?0:1}function gi(n){var e=n[0],t=n[n.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&n.pop()}var pu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=V(i.getViewLabels(),function(h){h=H(h);var c=i.scale,v=c.type==="ordinal"?c.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=i.dataToCoord(v),h});gi(u),gi(s),w(vu,function(h){t.get([h,"show"])&&(!i.scale.isBlank()||h==="axisLine")&&fu[h](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e})(he),fu={axisLine:function(n,e,t,r,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),h=Ie(t),c=h?0:1,v,p=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[c]===0?v=new vn[p]({shape:{cx:t.cx,cy:t.cy,r:a[h],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new _s({shape:{cx:t.cx,cy:t.cy,r:a[h],r0:a[c]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,n.add(v)},axisTick:function(n,e,t,r,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Ie(t)],u=V(r,function(h){return new Rt({shape:De(t,[l,l+s],h.coord)})});n.add(Tt(u,{style:q(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(n,e,t,r,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Ie(t)],h=[],c=0;c<i.length;c++)for(var v=0;v<i[c].length;v++)h.push(new Rt({shape:De(t,[u,u+l],i[c][v].coord)}));n.add(Tt(h,{style:q(s.getModel("lineStyle").getLineStyle(),q(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(n,e,t,r,i,a,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),h=e.get("triggerEvent");w(o,function(c,v){var p=l,f=c.tickValue,d=a[Ie(t)],g=t.coordToPoint([d+u,c.coord]),y=t.cx,m=t.cy,x=Math.abs(g[0]-y)/d<.3?"center":g[0]>y?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[f]){var _=s[f];ct(_)&&_.textStyle&&(p=new tt(_.textStyle,l,l.ecModel))}var b=new Z({silent:se.isLabelSilent(e),style:nt(p,{x:g[0],y:g[1],fill:p.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:x,verticalAlign:S})});if(n.add(b),Me({el:b,componentModel:e,itemName:c.formattedLabel,formatterParamsExtra:{isTruncated:function(){return b.isTruncated},value:c.rawLabel,tickIndex:v}}),h){var C=se.makeAxisEventDataBase(e);C.targetType="axisLabel",C.value=c.rawLabel,$(b).eventData=C}},this)},splitLine:function(n,e,t,r,i,a){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 Rt({shape:De(t,a,r[c].coord)}))}for(var c=0;c<h.length;c++)n.add(Tt(h[c],{style:q({stroke:l[c%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(n,e,t,r,i,a){if(i.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var h=0;h<i[u].length;h++)l.push(new Rt({shape:De(t,a,i[u][h].coord)}));n.add(Tt(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(n,e,t,r,i,a){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(a[0],a[1]),f=Math.max(a[0],a[1]),d=e.get("clockwise"),g=1,y=r.length;g<=y;g++){var m=g===y?r[0].coord:r[g].coord,x=u++%l.length;h[x]=h[x]||[],h[x].push(new eo({shape:{cx:t.cx,cy:t.cy,r0:p,r:f,startAngle:v,endAngle:-m*c,clockwise:d},silent:!0})),v=-m*c}for(var g=0;g<h.length;g++)n.add(Tt(h[g],{style:q({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},du=["splitLine","splitArea","minorSplitLine"],gu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r,i){if(this.group.removeAll(),!!t.get("show")){var a=this._axisGroup,o=this._axisGroup=new ot;this.group.add(o);var s=t.axis,l=s.polar,u=l.getAngleAxis(),h=s.getTicksCoords(),c=s.getMinorTicksCoords(),v=u.getExtent()[0],p=s.getExtent(),f=mu(l,t,v),d=new se(t,i,f);d.build(),o.add(d.group),ro(a,o,t),w(du,function(g){t.get([g,"show"])&&!s.scale.isBlank()&&yu[g](this.group,t,l,v,p,h,c)},this)}},e.type="radiusAxis",e})(he),yu={splitLine:function(n,e,t,r,i,a){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<a.length;d++){var g=u++%l.length;f[g]=f[g]||[],f[g].push(new vn[p]({shape:{cx:t.cx,cy:t.cy,r:Math.max(a[d].coord,0),startAngle:-v[0]*c,endAngle:-v[1]*c,clockwise:h.inverse}}))}for(var d=0;d<f.length;d++)n.add(Tt(f[d],{style:q({stroke:l[d%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(n,e,t,r,i,a,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 bs({shape:{cx:t.cx,cy:t.cy,r:o[h][c].coord}}));n.add(Tt(u,{style:q({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(n,e,t,r,i,a){if(a.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=a[0].coord,v=1;v<a.length;v++){var p=u++%l.length;h[p]=h[p]||[],h[p].push(new eo({shape:{cx:t.cx,cy:t.cy,r0:c,r:a[v].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),c=a[v].coord}for(var v=0;v<h.length;v++)n.add(Tt(h[v],{style:q({fill:l[v%l.length]},s.getAreaStyle()),silent:!0}))}}};function mu(n,e,t){return{position:[n.cx,n.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Lo(n){return n.get("stack")||"__ec_stack_"+n.seriesIndex}function ko(n,e){return e.dim+n.model.componentIndex}function xu(n,e,t){var r={},i=Su(Et(e.getSeriesByType(n),function(a){return!e.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));e.eachSeriesByType(n,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=ko(s,l),h=Lo(a),c=i[u][h],v=c.offset,p=c.width,f=s.getOtherAxis(l),d=a.coordinateSystem.cx,g=a.coordinateSystem.cy,y=a.get("barMinHeight")||0,m=a.get("barMinAngle")||0;r[h]=r[h]||[];for(var x=o.mapDimension(f.dim),S=o.mapDimension(l.dim),_=no(o,x),b=l.dim!=="radius"||!a.get("roundCap",!0),C=f.model,T=C.get("startValue"),A=f.dataToCoord(T||0),I=0,k=o.count();I<k;I++){var B=o.get(x,I),L=o.get(S,I),z=B>=0?"p":"n",G=A;_&&(r[h][L]||(r[h][L]={p:A,n:A}),G=r[h][L][z]);var Y=void 0,ut=void 0,ht=void 0,gt=void 0;if(f.dim==="radius"){var Gt=f.dataToCoord(B)-A,dr=l.dataToCoord(L);Math.abs(Gt)<y&&(Gt=(Gt<0?-1:1)*y),Y=G,ut=G+Gt,ht=dr-v,gt=ht-p,_&&(r[h][L][z]=ut)}else{var qt=f.dataToCoord(B,b)-A,Gn=l.dataToCoord(L);Math.abs(qt)<m&&(qt=(qt<0?-1:1)*m),Y=Gn+v,ut=Y+p,ht=G,gt=G+qt,_&&(r[h][L][z]=gt)}o.setItemLayout(I,{cx:d,cy:g,r0:Y,r:ut,startAngle:-ht*Math.PI/180,endAngle:-gt*Math.PI/180,clockwise:ht>=gt})}}})}function Su(n){var e={};w(n,function(r,i){var a=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=ko(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),c=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;e[l]=c;var p=Lo(r);v[p]||c.autoWidthCount++,v[p]=v[p]||{width:0,maxWidth:0};var f=U(r.get("barWidth"),h),d=U(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 w(e,function(r,i){t[i]={};var a=r.stacks,o=r.bandWidth,s=U(r.categoryGap,o),l=U(r.gap,1),u=r.remainedWidth,h=r.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),w(a,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;w(a,function(d,g){d.width||(d.width=c),p=d,v+=d.width*(1+l)}),p&&(v-=p.width*l);var f=-v/2;w(a,function(d,g){t[i][g]=t[i][g]||{offset:f,width:d.width},f+=d.width*(1+l)})}),t}var _u={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},bu={splitNumber:5},wu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e})(at);function Cp(n){pt(pr),he.registerAxisPointerClass("PolarAxisPointer",tu),n.registerCoordinateSystem("polar",cu),n.registerComponentModel(nu),n.registerComponentView(wu),$r(n,"angle",iu,_u),$r(n,"radius",au,bu),n.registerComponentView(pu),n.registerComponentView(gu),n.registerLayout(N(xu,"bar"))}function Yr(n,e){e=e||{};var t=n.coordinateSystem,r=n.axis,i={},a=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]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};i.rotation=Math.PI/2*h[o];var c={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=c[a],n.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Zt(e.labelInside,n.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var v=n.get(["axisLabel","rotate"]);return i.labelRotate=a==="top"?-v:v,i.z2=1,i}var Cu=["splitArea","splitLine","breakArea"],Tu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new ot;var l=Yr(t),u=new se(t,i,l);u.build(),o.add(this._axisGroup),o.add(u.group),w(Cu,function(h){t.get([h,"show"])&&Mu[h](this,this.group,this._axisGroup,t,i)},this),ro(s,this._axisGroup,t),n.prototype.render.call(this,t,r,i,a)},e.prototype.remove=function(){bl(this)},e.type="singleAxis",e})(he),Mu={splitLine:function(n,e,t,r,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),h=r.coordinateSystem.getRect(),c=a.isHorizontal(),v=[],p=0,f=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),d=[],g=[],y=0;y<f.length;++y){var m=a.toGlobalCoord(f[y].coord);c?(d[0]=m,d[1]=h.y,g[0]=m,g[1]=h.y+h.height):(d[0]=h.x,d[1]=m,g[0]=h.x+h.width,g[1]=m);var x=new Rt({shape:{x1:d[0],y1:d[1],x2:g[0],y2:g[1]},silent:!0});ws(x.shape,u);var S=p++%l.length;v[S]=v[S]||[],v[S].push(x)}for(var _=s.getLineStyle(["color"]),y=0;y<v.length;++y)e.add(Tt(v[y],{style:q({stroke:l[y%l.length]},_),silent:!0}))}},splitArea:function(n,e,t,r,i){wl(n,t,r,r)},breakArea:function(n,e,t,r,i){r.axis.scale}},Fe=(function(n){D(e,n);function e(){var t=n!==null&&n.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}},jitter:0,jitterOverlap:!0,jitterMargin:2},e})(Q);sr(Fe,Ja.prototype);var Au=(function(n){D(e,n);function e(t,r,i,a,o){var s=n.call(this,t,r,i)||this;return s.type=a||"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})(Nt),Po=["single"],Du=(function(){function n(e,t,r){this.type="single",this.dimension="single",this.dimensions=Po,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return n.prototype._init=function(e,t,r){var i=this.dimension,a=new Au(i,to(e),[0,0],e.get("type"),e.get("position")),o=a.type==="category";a.onBand=o&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},n.prototype.update=function(e,t){e.eachSeries(function(r){if(r.coordinateSystem===this){var i=r.getData();w(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),Zr(this._axis.scale,this._axis.model)}},this)},n.prototype.resize=function(e,t){var r=kt(e,t).refContainer;this._rect=ft(e.getBoxLayoutParams(),r),this._adjustAxis()},n.prototype.getRect=function(){return this._rect},n.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),i=r?[0,e.width]:[0,e.height],a=t.inverse?1:0;t.setExtent(i[a],i[1-a]),this._updateAxisTransform(t,r?e.x:e.y)},n.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),i=r[0]+r[1],a=e.isHorizontal();e.toGlobalCoord=a?function(o){return o+t}:function(o){return i-o+t},e.toLocalCoord=a?function(o){return o-t}:function(o){return i-o+t}},n.prototype.getAxis=function(){return this._axis},n.prototype.getBaseAxis=function(){return this._axis},n.prototype.getAxes=function(){return[this._axis]},n.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},n.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),i=r.orient;return i==="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},n.prototype.pointToData=function(e,t,r){r=r||[];var i=this.getAxis();return r[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),r},n.prototype.dataToPoint=function(e,t,r){var i=this.getAxis(),a=this.getRect();r=r||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),r[o]=i.toGlobalCoord(i.dataToCoord(+e)),r[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,r},n.prototype.convertToPixel=function(e,t,r){var i=yi(t);return i===this?this.dataToPoint(r):null},n.prototype.convertFromPixel=function(e,t,r){var i=yi(t);return i===this?this.pointToData(r):null},n})();function yi(n){var e=n.seriesModel,t=n.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Iu(n,e){var t=[];return n.eachComponent("singleAxis",function(r,i){var a=new Du(r,n,e);a.name="single_"+i,a.resize(r,e),r.coordinateSystem=a,t.push(a)}),n.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var i=r.getReferringComponents("singleAxis",Yt).models[0];r.coordinateSystem=i&&i.coordinateSystem}}),t}var Lu={create:Iu,dimensions:Po},mi=["x","y"],ku=["width","height"],Pu=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,a,o){var s=i.axis,l=s.coordinateSystem,u=br(l,1-Je(s)),h=l.dataToPoint(r)[0],c=a.get("type");if(c&&c!=="none"){var v=bn(a),p=Ru[c](s,h,u);p.style=v,t.graphicKey=p.type,t.pointer=p}var f=Yr(i);To(r,t,f,i,a,o)},e.prototype.getHandleTransform=function(t,r,i){var a=Yr(r,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=wn(r.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,a){var o=i.axis,s=o.coordinateSystem,l=Je(o),u=br(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=br(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})(_n),Ru={line:function(n,e,t){var r=Cn([e,t[0]],[e,t[1]],Je(n));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(n,e,t){var r=n.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:Mo([e-r/2,t[0]],[r,i],Je(n))}}};function Je(n){return n.isHorizontal()?0:1}function br(n,e){var t=n.getRect();return[t[mi[e]],t[mi[e]]+t[ku[e]]]}var Ou=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(at);function Tp(n){pt(pr),he.registerAxisPointerClass("SingleAxisPointer",Pu),n.registerComponentView(Ou),n.registerComponentView(Tu),n.registerComponentModel(Fe),$r(n,"single",Fe,Fe.defaultOption),n.registerCoordinateSystem("single",Lu)}var zu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,i){var a=pn(t);n.prototype.init.apply(this,arguments),xi(t,a)},e.prototype.mergeOption=function(t){n.prototype.mergeOption.apply(this,arguments),xi(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:M.color.axisLine,width:1,type:"solid"}},itemStyle:{color:M.color.neutral00,borderWidth:1,borderColor:M.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:M.size.s,color:M.color.secondary},monthLabel:{show:!0,position:"start",margin:M.size.s,align:"center",formatter:null,color:M.color.secondary},yearLabel:{show:!0,position:null,margin:M.size.xl,formatter:null,color:M.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e})(Q);function xi(n,e){var t=n.cellSize,r;O(t)?r=t:r=n.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var i=V([0,1],function(a){return Cs(e,a)&&(r[a]="auto"),r[a]!=null&&r[a]!=="auto"});fn(n,e,{type:"box",ignoreSize:i})}var Vu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var a=this.group;a.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=r.getLocaleModel();this._renderDayRect(t,s,a),this._renderLines(t,s,l,a),this._renderYearText(t,s,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,s,l,a)},e.prototype._renderDayRect=function(t,r,i){for(var a=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=r.start.time;u<=r.end.time;u=a.getNextNDay(u,1).time){var h=a.dataToCalendarLayout([u],!1).tl,c=new et({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});i.add(c)}},e.prototype._renderLines=function(t,r,i,a){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.dataToCalendarLayout([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,i),l,a)},e.prototype._getEdgesPoints=function(t,r,i){var a=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-r/2,a[1][o]=a[1][o]+r/2,a},e.prototype._drawSplitline=function(t,r,i){var a=new io({z2:20,shape:{points:t},style:r});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,r,i){for(var a=t.coordinateSystem,o=a.getDateInfo(r),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),h=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return E(t)&&t?Ts(t,r):F(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,i,a,o){var s=r[0],l=r[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(a==="left"||a==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,r,i,a){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,v=i==="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),m=new Z({z2:30,style:nt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,p[l],i,l,s)),a.add(m)}},e.prototype._monthTextPositionControl=function(t,r,i,a,o){var s="left",l="top",u=t[0],h=t[1];return i==="horizontal"?(h=h+o,r&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,r&&(l="middle"),a==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,r,i,a){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||E(s))&&(s&&(r=Fn(s)||r),s=r.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,p=i==="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(),m=this._firstDayOfMonth[g];if(f){var x=this._firstDayPoints[g];y[p]=(x[p]+c[0][g+1][p])/2}var S=o.get("formatter"),_=s[+m.m-1],b={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:_},C=this._formatterLabel(S,b),T=new Z({z2:30,style:W(nt(o,{text:C}),this._monthTextPositionControl(y,f,i,u,l)),silent:d});a.add(T)}}},e.prototype._weekTextPositionControl=function(t,r,i,a,o){var s="center",l="middle",u=t[0],h=t[1],c=i==="start";return r==="horizontal"?(u=u+a+(c?1:-1)*o[0]/2,s=c?"right":"left"):(h=h+a+(c?1:-1)*o[1]/2,l=c?"bottom":"top"),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,r,i,a,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||E(h)){h&&(r=Fn(h)||r);var p=r.get(["time","dayOfWeekShort"]);h=p||V(r.get(["time","dayOfWeekAbbr"]),function(b){return b[0]})}var f=l.getNextNDay(i.end.time,7-i.lweek).time,d=[l.getCellWidth(),l.getCellHeight()];c=U(c,Math.min(d[1],d[0])),u==="start"&&(f=l.getNextNDay(i.start.time,-(7+i.fweek)).time,c=-c);for(var g=s.get("silent"),y=0;y<7;y++){var m=l.getNextNDay(f,y),x=l.dataToCalendarLayout([m.time],!1).center,S=y;S=Math.abs((y+v)%7);var _=new Z({z2:30,style:W(nt(s,{text:h[S]}),this._weekTextPositionControl(x,a,u,c,d)),silent:g});o.add(_)}}},e.type="calendar",e})(at),wr=864e5,Bu=(function(){function n(e,t,r){this.type="calendar",this.dimensions=n.dimensions,this.getDimensionsInfo=n.getDimensionsInfo,this._model=e,this._update(t,r)}return n.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},n.prototype.getRangeInfo=function(){return this._rangeInfo},n.prototype.getModel=function(){return this._model},n.prototype.getRect=function(){return this._rect},n.prototype.getCellWidth=function(){return this._sw},n.prototype.getCellHeight=function(){return this._sh},n.prototype.getOrient=function(){return this._orient},n.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},n.prototype.getDateInfo=function(e){e=Ms(e);var t=e.getFullYear(),r=e.getMonth()+1,i=r<10?"0"+r:""+r,a=e.getDate(),o=a<10?"0"+a:""+a,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:i,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+i+"-"+o,date:e}},n.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))},n.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,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[r,7]:[7,r];w([0,1],function(c){h(a,c)&&(o[i[c]]=a[c]*s[c])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=ft(o,l);w([0,1],function(c){h(a,c)||(a[c]=u[i[c]]/s[c])});function h(c,v){return c[v]!=null&&c[v]!=="auto"}this._sw=a[0],this._sh=a[1]},n.prototype.dataToPoint=function(e,t,r){r=r||[],O(e)&&(e=e[0]),t==null&&(t=!0);var i=this.getDateInfo(e),a=this._rangeInfo,o=i.formatedDate;if(t&&!(i.time>=a.start.time&&i.time<a.end.time+wr))return r[0]=r[1]=NaN,r;var s=i.day,l=this._getRangeInfo([a.start.time,o]).nthWeek;return this._orient==="vertical"?(r[0]=this._rect.x+s*this._sw+this._sw/2,r[1]=this._rect.y+l*this._sh+this._sh/2):(r[0]=this._rect.x+l*this._sw+this._sw/2,r[1]=this._rect.y+s*this._sh+this._sh/2),r},n.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},n.prototype.dataToLayout=function(e,t,r){r=r||{};var i=r.rect=r.rect||{},a=r.contentRect=r.contentRect||{},o=this.dataToPoint(e,t);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,Lt.copy(a,i),dn(a,this._lineWidth/2,!0,!0),r},n.prototype.dataToCalendarLayout=function(e,t){var r=this.dataToPoint(e,t);return{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]}},n.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,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,t-1,i):this._getDateByWeeksAndDay(t,r-1,i)},n.prototype.convertToPixel=function(e,t,r){var i=Cr(t);return i===this?i.dataToPoint(r):null},n.prototype.convertToLayout=function(e,t,r){var i=Cr(t);return i===this?i.dataToLayout(r):null},n.prototype.convertFromPixel=function(e,t,r){var i=Cr(t);return i===this?i.pointToData(r):null},n.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},n.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(O(e)&&e.length===1&&(e=e[0]),O(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 i=this.getDateInfo(r),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);t=[i.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},n.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],r;t[0].time>t[1].time&&(r=!0,t.reverse());var i=Math.floor(t[1].time/wr)-Math.floor(t[0].time/wr)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-t[1].time)*u>0;)i-=u,a.setDate(l-u);var h=Math.floor((i+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:i,weeks:h,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},n.prototype._getDateByWeeksAndDay=function(e,t,r){var i=this._getRangeInfo(r);if(e>i.weeks||e===0&&t<i.fweek||e===i.weeks&&t>i.lweek)return null;var a=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},n.create=function(e,t){var r=[];return e.eachComponent("calendar",function(i){var a=new n(i,e,t);r.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){ao({targetModel:a,coordSysType:"calendar",coordSysProvider:oo})}),r},n.dimensions=["time","value"],n})();function Cr(n){var e=n.calendarModel,t=n.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}function Mp(n){n.registerComponentModel(zu),n.registerComponentView(Vu),n.registerCoordinateSystem("calendar",Bu)}var Mt={level:1,leaf:2,nonLeaf:3},It={none:0,all:1,body:2,corner:3};function Xr(n,e,t){var r=e[P[t]].getCell(n);return!r&&lr(n)&&n<0&&(r=e[P[1-t]].getUnitLayoutInfo(t,Math.round(n))),r}function Ro(n){var e=n||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function Oo(n,e,t,r,i){Si(n[0],e,i,t,r,0),Si(n[1],e,i,t,r,1)}function Si(n,e,t,r,i,a){n[0]=1/0,n[1]=-1/0;var o=r[a],s=O(o)?o:[o],l=s.length,u=!!t;if(l>=1?(_i(n,e,s,u,i,a,0),l>1&&_i(n,e,s,u,i,a,l-1)):n[0]=n[1]=NaN,u){var h=-i[P[1-a]].getLocatorCount(a),c=i[P[a]].getLocatorCount(a)-1;t===It.body?h=Dt(0,h):t===It.corner&&(c=Vt(-1,c)),c<h&&(h=c=NaN),Ut(n[0])&&(n[0]=h),Ut(n[1])&&(n[1]=c),n[0]=Dt(Vt(n[0],c),h),n[1]=Dt(Vt(n[1],c),h)}}function _i(n,e,t,r,i,a,o){var s=Xr(t[o],i,a);if(!s){n[0]=n[1]=NaN;return}var l=s.id[P[a]],u=l,h=Hu(s);h&&(u+=h.span[P[a]]-1),n[0]=Vt(n[0],l,u),n[1]=Dt(n[1],l,u)}function Le(n,e){return Ut(n[e][0])||Ut(n[e][1])}function bi(n,e,t,r){e=e||Eu;for(var i=0;i<r;i++)e[i]=!1;for(;;){for(var a=!1,i=0;i<r;i++){var o=t[i];!e[i]&&o.cellMergeOwner&&Nu(n,o.locatorRange)&&(e[i]=!0,a=!0)}if(!a)break}}var Eu=[];function Nu(n,e){return!wi(n[0],e[0])||!wi(n[1],e[1])?!1:(n[0][0]=Vt(n[0][0],e[0][0]),n[0][1]=Dt(n[0][1],e[0][1]),n[1][0]=Vt(n[1][0],e[1][0]),n[1][1]=Dt(n[1][1],e[1][1]),!0)}function wi(n,e){return n[1]>=e[0]&&n[0]<=e[1]}function Ci(n,e){n.id.set(e[0][0],e[1][0]),n.span.set(e[0][1]-n.id.x+1,e[1][1]-n.id.y+1)}function Gu(n,e){n[0][0]=e[0][0],n[0][1]=e[0][1],n[1][0]=e[1][0],n[1][1]=e[1][1]}function Ti(n,e,t,r){var i=Xr(e[r][0],t,r),a=Xr(e[r][1],t,r);n[P[r]]=n[St[r]]=NaN,i&&a&&(n[P[r]]=i.xy,n[St[r]]=a.xy+a.wh-i.xy)}function ve(n,e,t,r){return n[P[e]]=t,n[P[1-e]]=r,n}function Hu(n){return n&&(n.type===Mt.leaf||n.type===Mt.nonLeaf)?n:null}function tr(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var Mi=(function(){function n(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=Wu(e);var r=t.get("data",!0);r!=null&&!O(r)&&(r=[]),r?this._initByDimModelData(r):this._initBySeriesData()}return n.prototype._initByDimModelData=function(e){var t=this,r=t._cells,i=t._levels,a=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,h,c){var v=0;return u&&w(u,function(p,f){var d;E(p)?d={value:p}:ct(p)?(d=p,p.value!=null&&!E(p.value)&&(d={value:null})):d={value:null};var g={type:Mt.nonLeaf,ordinal:NaN,level:c,firstLeafLocator:h,id:new mt,span:ve(new mt,t.dimIdx,1,1),option:d,xy:NaN,wh:NaN,dim:t,rect:tr()};o++,(a[h]||(a[h]=[])).push(g),i[c]||(i[c]={type:Mt.level,xy:NaN,wh:NaN,option:null,id:new mt,dim:t});var y=s(d.children,h,c+1),m=Math.max(1,y);g.span[P[t.dimIdx]]=m,v+=m,h+=m}),v}function l(){for(var u=[];r.length<o;)for(var h=0;h<a.length;h++){var c=a[h].pop();if(c){c.ordinal=u.length;var v=c.option.value;u.push(v),r.push(c),t._uniqueValueGen.calcDupBase(v)}}t._uniqueValueGen.ensureValueUnique(u,r);var p=t._ordinalMeta=new $n({categories:u,needCollect:!1,deduplication:!1});t._scale=new Fr({ordinalMeta:p});for(var f=0;f<t._leavesCount;f++){var d=t._cells[f];d.type=Mt.leaf,d.span[P[1-t.dimIdx]]=t._levels.length-d.level}t._initCellsId(),t._initLevelIdOptions()}},n.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:Mt.level,xy:NaN,wh:NaN,option:null,id:new mt,dim:e}],e._initLevelIdOptions();var t=e._ordinalMeta=new $n({needCollect:!0,deduplication:!0,onCollect:function(r,i){var a=e._cells[i]={type:Mt.leaf,ordinal:i,level:0,firstLeafLocator:i,id:new mt,span:ve(new mt,e.dimIdx,1,1),option:{value:r+""},xy:NaN,wh:NaN,dim:e,rect:tr()};e._leavesCount++,e._setCellId(a)}});e._scale=new Fr({ordinalMeta:t})},n.prototype._setCellId=function(e){var t=this._levels.length,r=this.dimIdx;ve(e.id,r,e.firstLeafLocator,e.level-t)},n.prototype._initCellsId=function(){var e=this._levels.length,t=this.dimIdx;w(this._cells,function(r){ve(r.id,t,r.firstLeafLocator,r.level-e)})},n.prototype._initLevelIdOptions=function(){var e=this._levels.length,t=this.dimIdx,r=this._model.get("levels",!0);r=O(r)?r:[],w(this._levels,function(i,a){ve(i.id,t,0,a-e),i.option=r[a]})},n.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},n.prototype.resetLayoutIterator=function(e,t,r,i){if(e=e||new Bt,t===this.dimIdx){var a=this._leavesCount,o=r!=null?Math.max(0,r):0;i=i!=null?Math.min(i,a):a,e.reset(this._cells,o,o+i)}else{var a=this._levels.length,o=r!=null?Math.max(0,r+a):0;i=i!=null?Math.min(i,a):a,e.reset(this._levels,o,o+i)}return e},n.prototype.resetCellIterator=function(e){return(e||new Bt).reset(this._cells,0)},n.prototype.resetLevelIterator=function(e){return(e||new Bt).reset(this._levels,0)},n.prototype.getLayout=function(e,t,r){var i=this.getUnitLayoutInfo(t,r);e[P[t]]=i?i.xy:NaN,e[St[t]]=i?i.wh:NaN},n.prototype.getUnitLayoutInfo=function(e,t){return e===this.dimIdx?t<this._leavesCount?this._cells[t]:void 0:this._levels[t+this._levels.length]},n.prototype.getCell=function(e){var t=this._scale.parse(e);return Ut(t)?void 0:this._cells[t]},n.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},n.prototype.getOrdinalMeta=function(){return this._ordinalMeta},n})();function Wu(n){var e=n.toUpperCase(),t=new RegExp("^"+e+"([0-9]+)$"),r=0;function i(s){var l;s!=null&&(l=s.match(t))&&(r=Dt(r,+l[1]+1))}function a(){return""+e+r++}function o(s,l){for(var u=it(),h=0;h<s.length;h++){var c=s[h];(c==null||u.get(c)!=null)&&(s[h]=c=a(),l[h].option=q({value:c},l[h].option)),u.set(c,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var Ai=(function(){function n(e,t,r){this._model=t,this._dims=r,this._kind=e,this._cellMergeOwnerList=[]}return n.prototype._ensureCellMap=function(){var e=this,t=e._cellMap;return t||(t=e._cellMap=it(),r()),t;function r(){var a=[],o=e._model.getShallow("data");o&&!O(o)&&(o=null),w(o,function(f,d){if(!(!ct(f)||!O(f.coord))){var g=Ro([]),y=null;if(Oo(g,y,f.coord,e._dims,f.coordClamp?It[e._kind]:It.none),!(Le(g,0)||Le(g,1))){var m=f&&f.mergeCells,x={id:new mt,span:new mt,locatorRange:g,option:f,cellMergeOwner:m};Ci(x,g),a.push(x)}}});for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u.cellMergeOwner){var h=u.locatorRange;bi(h,s,a,l);for(var c=0;c<l;c++)s[c]&&(a[c].cellMergeOwner=!1);if(h[0][0]!==u.id.x||h[1][0]!==u.id.y){u.cellMergeOwner=!1;var v=W({},u.option);v.coord=null;var p={id:new mt,span:new mt,locatorRange:h,option:v,cellMergeOwner:!0};Ci(p,h),a.push(p)}}}w(a,function(f){var d=i(f.id.x,f.id.y);if(f.cellMergeOwner&&(d.cellMergeOwner=!0,d.span=f.span,d.locatorRange=f.locatorRange,d.spanRect=tr(),e._cellMergeOwnerList.push(d)),!(!f.cellMergeOwner&&!f.option))for(var g=0;g<f.span.y;g++)for(var y=0;y<f.span.x;y++){var m=i(f.id.x+y,f.id.y+g);m.option=f.option,f.cellMergeOwner&&(m.inSpanOf=d)}})}function i(a,o){var s=Di(a,o),l=t.get(s);return l||(l=t.set(s,{id:new mt(a,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},n.prototype.getCell=function(e){return this._ensureCellMap().get(Di(e[0],e[1]))},n.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},n.prototype.expandRangeByCellMerge=function(e){if(!Le(e,0)&&!Le(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){Tr[0]=e[0][0],Tr[1]=e[1][0];var t=this.getCell(Tr),r=t&&t.inSpanOf;if(r){Gu(e,r.locatorRange);return}}var i=this._cellMergeOwnerList;bi(e,null,i,i.length)},n})(),Tr=[];function Di(n,e){return n+"|"+e}var Dn={show:!0,color:M.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function In(n){return{color:"none",borderWidth:1,borderColor:n?"none":M.color.borderTint}}var Ii={show:!0,label:Dn,itemStyle:In(!1),silent:void 0,dividerLineStyle:{width:1,color:M.color.border}},Zu={label:Dn,itemStyle:In(!1),silent:void 0},Fu={label:Dn,itemStyle:In(!0),silent:void 0},$u={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:Ii,y:Ii,body:Zu,corner:Fu,backgroundStyle:{color:"none",borderColor:M.color.axisLine,borderWidth:1}},Uu=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this._dimModels={x:new Li(this.get("x",!0)||{}),y:new Li(this.get("y",!0)||{})};t.x.option.type=t.y.option.type="category";var r=t.x.dim=new Mi("x",t.x),i=t.y.dim=new Mi("y",t.y),a={x:r,y:i};this._body=new Ai("body",new tt(this.getShallow("body")),a),this._corner=new Ai("corner",new tt(this.getShallow("corner")),a)},e.prototype.getDimensionModel=function(t){return this._dimModels[t]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=$u,e})(Q),Li=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e})(tt),ke=Math.round,Yu=0,Xu=99,Ku={normal:25,special:100},qu={normal:50,special:125},ju=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r){this.group.removeAll();var i=this.group,a=t.coordinateSystem,o=a.getRect(),s=t.getDimensionModel("x"),l=t.getDimensionModel("y"),u=s.dim,h=l.dim;Qu(i,t,r),Ju(i,t,u,h,r);var c=t.getShallow("borderZ2",!0),v=K(c,Xu),p=v-1,f=t.getModel("backgroundStyle").getItemStyle(["borderWidth"]);f.lineWidth=0;var d=t.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);d.fill="none";var g=Kr(o.clone(),f,Yu),y=Kr(o.clone(),d,v);g.silent=!0,y.silent=!0,i.add(g),i.add(y);var m=u.getUnitLayoutInfo(0,0),x=h.getUnitLayoutInfo(1,0);m&&x&&(u.shouldShow()&&i.add(ki({x1:o.x,y1:x.xy,x2:o.x+o.width,y2:x.xy},s.getModel("dividerLineStyle").getLineStyle(),p)),h.shouldShow()&&i.add(ki({x1:m.xy,y1:o.y,x2:m.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),p)))},e.type="matrix",e})(at);function Qu(n,e,t){r(0),r(1);function r(i){var a=e.getDimensionModel(P[i]),o=a.dim;if(o.shouldShow())for(var s=a.getModel("itemStyle"),l=a.getModel("label"),u=e.getShallow("tooltip",!0),h=[],c=o.resetCellIterator();c.next();){var v=c.item,p={};Lt.copy(p,v.rect),Ka(h,v.id.x,v.id.y),zo(h,e,n,t,v.option,s,l,a,p,v.option.value,qu,u)}}}function Ju(n,e,t,r,i){a("body",e.getBody(),t,r),t.shouldShow()&&r.shouldShow()&&a("corner",e.getCorner(),r,t);function a(o,s,l,u){var h=new tt(e.getShallow(o,!0)),c=h.getModel("itemStyle"),v=h.getModel("label"),p=new Bt,f=new Bt,d=[],g=e.getShallow("tooltip",!0);for(u.resetLayoutIterator(f,1);f.next();)for(l.resetLayoutIterator(p,0);p.next();){var y=p.item,m=f.item;Ka(d,y.id.x,m.id.y);var x=s.getCell(d);if(!(x&&x.inSpanOf&&x.inSpanOf!==x)){var S={};x&&x.span?Lt.copy(S,x.spanRect):(y.dim.getLayout(S,0,d[0]),m.dim.getLayout(S,1,d[1]));var _=x?x.option:null;zo(d,e,n,i,_,c,v,h,S,_?_.value:null,Ku,g)}}}}function zo(n,e,t,r,i,a,o,s,l,u,h,c){var v;Pe.option=i?i.itemStyle:null,Pe.parentModel=a,jt.option=i,jt.parentModel=s;var p=K(jt.getShallow("z2"),i&&i.itemStyle?h.special:h.normal),f=c&&c.show,d=Kr(l,Pe.getItemStyle(),p);t.add(d);var g=jt.get("cursor");g!=null&&d.attr("cursor",g);var y;if(u!=null){var m=u+"";if(Qt.option=i?i.label:null,Qt.parentModel=o,Qt.ecModel=r,gn(d,{normal:Qt},{defaultText:m,autoOverflowArea:!0,layoutRect:H(d.shape)}),y=d.getTextContent(),y){y.z2=p+1;var x=y.style;if(x&&x.overflow&&x.overflow!=="none"&&x.lineOverflow){var S={};Lt.copy(S,l),dn(S,(((v=d.style)===null||v===void 0?void 0:v.lineWidth)||0)/2,!0,!0),d.updateInnerText(),y.getLocalTransform(Re),Gr(Re,Re),Lt.applyTransform(S,S,Re),y.setClipPath(new et({shape:S}))}}Me({el:d,componentModel:e,itemName:m,itemTooltipOption:c,formatterParamsExtra:{xyLocator:n.slice()}})}if(y){var _=Qt.get("silent");_==null&&(_=!f),y.silent=_,y.ignoreHostSilent=!0}var b=jt.get("silent");b==null&&(b=!d.style||d.style.fill==="none"||!d.style.fill),d.silent=b,yr(jt),yr(Pe),yr(Qt)}var jt=new tt,Pe=new tt,Qt=new tt,Re=[];function Kr(n,e,t){var r=e.lineWidth;if(r){var i=n.x+n.width,a=n.y+n.height;n.x=ne(n.x,r,!0),n.y=ne(n.y,r,!0),n.width=ne(i,r,!0)-n.x,n.height=ne(a,r,!0)-n.y}return new et({shape:n,style:e,z2:t})}function ki(n,e,t){var r=e.lineWidth;return r&&(ke(n.x1*2)===ke(n.x2*2)&&(n.x1=n.x2=ne(n.x1,r,!0)),ke(n.y1*2)===ke(n.y2*2)&&(n.y1=n.y2=ne(n.y1,r,!0))),new Rt({shape:n,style:e,silent:!0,z2:t})}var th=(function(){function n(e,t,r){this.dimensions=n.dimensions,this.type="matrix",this._model=e;var i=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.y.dim},this._resize(e,r)}return n.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},n.create=function(e,t){var r=[];return e.eachComponent("matrix",function(i){var a=new n(i,e,t);r.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){ao({targetModel:a,coordSysType:"matrix",coordSysProvider:oo})}),r},n.prototype.getRect=function(){return this._rect},n.prototype._resize=function(e,t){var r=this._dims,i=this._dimModels,a=this._rect=ft(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});Pi(i,r,a,0),Pi(i,r,a,1),Ri(0,r),Ri(1,r),Oi(this._model.getBody(),r),Oi(this._model.getCorner(),r)},n.prototype.dataToPoint=function(e,t,r){return r=r||[],this.dataToLayout(e,t,pe),r[0]=pe.rect.x+pe.rect.width/2,r[1]=pe.rect.y+pe.rect.height/2,r},n.prototype.dataToLayout=function(e,t,r){var i=this._dims;r=r||{};var a=r.rect=r.rect||{};a.x=a.y=a.width=a.height=NaN;var o=r.matrixXYLocatorRange=Ro(r.matrixXYLocatorRange);return O(e)&&(Oo(o,null,e,i,K(t&&t.clamp,It.none)),(!t||!t.ignoreMergeCells)&&((!t||t.clamp!==It.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!t||t.clamp!==It.body)&&this._model.getCorner().expandRangeByCellMerge(o)),Ti(a,o,i,0),Ti(a,o,i,1)),r},n.prototype.pointToData=function(e,t,r){var i=this._dims;return zi(_t,0,i,e,t&&t.clamp),zi(_t,1,i,e,t&&t.clamp),r=r||[],r[0]=r[1]=NaN,_t.y===J.inCorner&&_t.x===J.inBody?Vi(_t,r,0,i):_t.x===J.inCorner&&_t.y===J.inBody?Vi(_t,r,1,i):(Bi(_t,r,0,i),Bi(_t,r,1,i)),r},n.prototype.convertToPixel=function(e,t,r,i){var a=Ar(t);return a===this?a.dataToPoint(r,i):void 0},n.prototype.convertToLayout=function(e,t,r,i){var a=Ar(t);return a===this?a.dataToLayout(r,i):void 0},n.prototype.convertFromPixel=function(e,t,r,i){var a=Ar(t);return a===this?a.pointToData(r,i):void 0},n.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},n.dimensions=["x","y","value"],n})(),pe={rect:tr()},Oe=new Bt,Mr=new Bt;function Pi(n,e,t,r){for(var i=1-r,a=e[P[r]],o=e[P[i]],s=o.shouldShow(),l=a.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,r);u.next();)u.item.wh=u.item.xy=NaN;for(var h=t[St[r]],c=a.getLocatorCount(r)+o.getLocatorCount(r),v=new tt,p=o.resetLevelIterator();p.next();)v.option=p.item.option,v.parentModel=n[P[i]],g(p.item,s?v.get("levelSize"):0);for(var f=new tt,d=a.resetCellIterator();d.next();)d.item.type===Mt.leaf&&(f.option=d.item.option,f.parentModel=void 0,g(d.item,f.get("size")));function g(C,T){var A=eh(T,r,t);Ut(A)||(C.wh=qr(A,h),h=qr(h-C.wh),c--)}var y=c?h/c:0,m=!c&&h>=1,x=t[P[r]],S=a.getLocatorCount(r)-1,_=new Bt;for(o.resetLayoutIterator(_,r);_.next();)b(_.item);for(a.resetLayoutIterator(_,r);_.next();)b(_.item);function b(C){Ut(C.wh)&&(C.wh=y),C.xy=x,C.id[P[r]]===S&&!m&&(C.wh=t[P[r]]+t[St[r]]-C.xy),x+=C.wh}}function Ri(n,e){for(var t=e[P[n]].resetCellIterator();t.next();){var r=t.item;er(r.rect,n,r.id,r.span,e),er(r.rect,1-n,r.id,r.span,e),r.type===Mt.nonLeaf&&(r.xy=r.rect[P[n]],r.wh=r.rect[St[n]])}}function Oi(n,e){n.travelExistingCells(function(t){var r=t.span;if(r){var i=t.spanRect,a=t.id;er(i,0,a,r,e),er(i,1,a,r,e)}})}function er(n,e,t,r,i){n[St[e]]=0;var a=t[P[e]],o=a<0?i[P[1-e]]:i[P[e]],s=o.getUnitLayoutInfo(e,t[P[e]]);if(n[P[e]]=s.xy,n[St[e]]=s.wh,r[P[e]]>1){var l=o.getUnitLayoutInfo(e,t[P[e]]+r[P[e]]-1);n[St[e]]=l.xy+l.wh-s.xy}}function eh(n,e,t){var r=As(n,t[St[e]]);return qr(r,t[St[e]])}function qr(n,e){return Math.max(Math.min(n,K(e,1/0)),0)}function Ar(n){var e=n.matrixModel,t=n.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}var J={inBody:1,inCorner:2,outside:3},_t={x:null,y:null,point:[]};function zi(n,e,t,r,i){var a=t[P[e]],o=t[P[1-e]],s=a.getUnitLayoutInfo(e,a.getLocatorCount(e)-1),l=a.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),h=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,c=n.point[e]=r[e];if(!l&&!h){n[P[e]]=J.outside;return}if(i===It.body){l?(n[P[e]]=J.inBody,c=Vt(s.xy+s.wh,Dt(l.xy,c)),n.point[e]=c):n[P[e]]=J.outside;return}else if(i===It.corner){h?(n[P[e]]=J.inCorner,c=Vt(h.xy+h.wh,Dt(u.xy,c)),n.point[e]=c):n[P[e]]=J.outside;return}var v=l?l.xy:h?h.xy+h.wh:NaN,p=u?u.xy:v,f=s?s.xy+s.wh:v;if(c<p){if(!i){n[P[e]]=J.outside;return}c=p}else if(c>f){if(!i){n[P[e]]=J.outside;return}c=f}n.point[e]=c,n[P[e]]=v<=c&&c<=f?J.inBody:p<=c&&c<=v?J.inCorner:J.outside}function Vi(n,e,t,r){var i=1-t;if(n[P[t]]!==J.outside)for(r[P[t]].resetCellIterator(Mr);Mr.next();){var a=Mr.item;if(Ei(n.point[t],a.rect,t)&&Ei(n.point[i],a.rect,i)){e[t]=a.ordinal,e[i]=a.id[P[i]];return}}}function Bi(n,e,t,r){if(n[P[t]]!==J.outside){var i=n[P[t]]===J.inCorner?r[P[1-t]]:r[P[t]];for(i.resetLayoutIterator(Oe,t);Oe.next();)if(rh(n.point[t],Oe.item)){e[t]=Oe.item.id[P[t]];return}}}function rh(n,e){return e.xy<=n&&n<=e.xy+e.wh}function Ei(n,e,t){return e[P[t]]<=n&&n<=e[P[t]]+e[St[t]]}function Ap(n){n.registerComponentModel(Uu),n.registerComponentView(ju),n.registerCoordinateSystem("matrix",th)}function nh(n,e){var t=n.existing;if(e.id=n.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 Ni(n,e){var t;return w(e,function(r){n[r]!=null&&n[r]!=="auto"&&(t=!0)}),t}function ih(n,e,t){var r=W({},t),i=n[e],a=t.$action||"merge";a==="merge"?i?(rt(i,r,!0),fn(i,r,{ignoreSize:!0}),Is(t,i),ze(t,i),ze(t,i,"shape"),ze(t,i,"style"),ze(t,i,"extra"),t.clipPath=i.clipPath):n[e]=r:a==="replace"?n[e]=r:a==="remove"&&i&&(n[e]=null)}var Vo=["transition","enterFrom","leaveTo"],ah=Vo.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function ze(n,e,t){if(t&&(!n[t]&&e[t]&&(n[t]={}),n=n[t],e=e[t]),!(!n||!e))for(var r=t?Vo:ah,i=0;i<r.length;i++){var a=r[i];n[a]==null&&e[a]!=null&&(n[a]=e[a])}}function oh(n,e){if(n&&(n.hv=e.hv=[Ni(e,["left","right"]),Ni(e,["top","bottom"])],n.type==="group")){var t=n,r=e;t.width==null&&(t.width=r.width=0),t.height==null&&(t.height=r.height=0)}}var sh=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,r){var i=this.option.elements;this.option.elements=null,n.prototype.mergeOption.call(this,t,r),this.option.elements=i},e.prototype.optionUpdated=function(t,r){var i=this.option,a=(r?i:t).elements,o=i.elements=r?[]:i.elements,s=[];this._flatten(a,s,null);var l=Ds(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];w(l,function(h,c){var v=h.newOption;v&&(u.push(v),nh(h,v),ih(o,c,v),oh(o[c],v))},this),i.elements=Et(o,function(h){return h&&delete h.$action,h!=null})},e.prototype._flatten=function(t,r,i){w(t,function(a){if(a){i&&(a.parentOption=i),r.push(a);var o=a.children;o&&o.length&&this._flatten(o,r,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e})(Q),Gi={path:null,compoundPath:null,group:ot,image:ja,text:Z},yt=dt(),lh=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=it()},e.prototype.render=function(t,r,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var r=t.useElOptionsToUpdate();if(r){var i=this._elMap,a=this.group,o=t.get("z"),s=t.get("zlevel");w(r,function(l){var u=xe(l.id,null),h=u!=null?i.get(u):null,c=xe(l.parentId,null),v=c!=null?i.get(c):a,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&&Cl(f,p,!!g,!!d)){var y=Tl(f,p,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!d&&y.textContent&&(d=y.textContent)}var m=uh(l),x=l.$action||"merge",S=x==="merge",_=x==="replace";if(S){var b=!h,C=h;b?C=Hi(u,v,l.type,i):(C&&(yt(C).isNew=!1),Ml(C)),C&&(xr(C,m,t,{isInit:b}),Wi(C,l,o,s))}else if(_){$e(h,l,i,t);var T=Hi(u,v,l.type,i);T&&(xr(T,m,t,{isInit:!0}),Wi(T,l,o,s))}else x==="remove"&&(Al(h,l),$e(h,l,i,t));var A=i.get(u);if(A&&d)if(S){var I=A.getTextContent();I?I.attr(d):A.setTextContent(new Z(d))}else _&&A.setTextContent(new Z(d));if(A){var k=l.clipPath;if(k){var B=k.type,L=void 0,b=!1;if(S){var z=A.getClipPath();b=!z||yt(z).type!==B,L=b?jr(B):z}else _&&(b=!0,L=jr(B));A.setClipPath(L),xr(L,k,t,{isInit:b}),ei(L,k.keyframeAnimation,t)}var G=yt(A);A.setTextConfig(g),G.option=l,hh(A,t,l),Me({el:A,componentModel:t,itemName:A.name,itemTooltipOption:l.tooltip}),ei(A,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,r){for(var i=t.option.elements,a=this.group,o=this._elMap,s=r.getWidth(),l=r.getHeight(),u=["x","y"],h=0;h<i.length;h++){var c=i[h],v=xe(c.id,null),p=v!=null?o.get(v):null;if(!(!p||!p.isGroup)){var f=p.parent,d=f===a,g=yt(p),y=yt(f);g.width=U(g.option.width,d?s:y.width)||0,g.height=U(g.option.height,d?l:y.height)||0}}for(var h=i.length-1;h>=0;h--){var c=i[h],v=xe(c.id,null),p=v!=null?o.get(v):null;if(p){var f=p.parent,y=yt(f),m=f===a?{width:s,height:l}:{width:y.width,height:y.height},x={},S=yn(p,c,m,null,{hv:c.hv,boundingMode:c.bounding},x);if(!yt(p).isNew&&S){for(var _=c.transition,b={},C=0;C<u.length;C++){var T=u[C],A=x[T];_&&(Dl(_)||vt(_,T)>=0)?b[T]=A:p[T]=A}hr(p,b,t,0)}else p.attr(x)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(i){$e(i,yt(i).option,r,t._lastGraphicModel)}),this._elMap=it()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(at);function jr(n){var e=oe(Gi,n)?Gi[n]:ks(n),t=new e({});return yt(t).type=n,t}function Hi(n,e,t,r){var i=jr(t);return e.add(i),r.set(n,i),yt(i).id=n,yt(i).isNew=!0,i}function $e(n,e,t,r){var i=n&&n.parent;i&&(n.type==="group"&&n.traverse(function(a){$e(a,e,t,r)}),Il(n,e,r),t.removeKey(yt(n).id))}function Wi(n,e,t,r){n.isGroup||w([["cursor",ls.prototype.cursor],["zlevel",r||0],["z",t||0],["z2",0]],function(i){var a=i[0];oe(e,a)?n[a]=K(e[a],i[1]):n[a]==null&&(n[a]=i[1])}),w(qa(e),function(i){if(i.indexOf("on")===0){var a=e[i];n[i]=F(a)?a:null}}),oe(e,"draggable")&&(n.draggable=e.draggable),e.name!=null&&(n.name=e.name),e.id!=null&&(n.id=e.id)}function uh(n){return n=W({},n),w(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Ls),function(e){delete n[e]}),n}function hh(n,e,t){var r=$(n).eventData;!n.silent&&!n.ignore&&!r&&(r=$(n).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:n.name}),r&&(r.info=t.info)}function Dp(n){n.registerComponentModel(sh),n.registerComponentView(lh),n.registerPreprocessor(function(e){var t=e.graphic;O(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Zi=["x","y","radius","angle","single"],ch=["cartesian2d","polar","singleAxis"];function vh(n){var e=n.get("coordinateSystem");return vt(ch,e)>=0}function Ot(n){return n+"Axis"}function ph(n,e){var t=it(),r=[],i=it();n.eachComponent({mainType:"dataZoom",query:e},function(h){i.get(h.uid)||s(h)});var a;do a=!1,n.eachComponent("dataZoom",o);while(a);function o(h){!i.get(h.uid)&&l(h)&&(s(h),a=!0)}function s(h){i.set(h.uid,!0),r.push(h),u(h)}function l(h){var c=!1;return h.eachTargetAxis(function(v,p){var f=t.get(v);f&&f[p]&&(c=!0)}),c}function u(h){h.eachTargetAxis(function(c,v){(t.get(c)||t.set(c,[]))[v]=!0})}return r}function Bo(n){var e=n.ecModel,t={infoList:[],infoMap:it()};return n.eachTargetAxis(function(r,i){var a=e.getComponent(Ot(r),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(a)}}}),t}var Dr=(function(){function n(){this.indexList=[],this.indexMap=[]}return n.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},n})(),be=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,r,i){var a=Fi(t);this.settledOption=a,this.mergeDefaultAndTheme(t,i),this._doInit(a)},e.prototype.mergeOption=function(t){var r=Fi(t);rt(this.option,t,!0),rt(this.settledOption,r,!0),this._doInit(r)},e.prototype._doInit=function(t){var r=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;w([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(r[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),r=this._targetAxisInfoMap=it(),i=this._fillSpecifiedTargetAxis(r);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(r,this._orient)),this._noTarget=!0,r.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var r=!1;return w(Zi,function(i){var a=this.getReferringComponents(Ot(i),Ps);if(a.specified){r=!0;var o=new Dr;w(a.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),r},e.prototype._fillAutoTargetAxisByOrient=function(t,r){var i=this.ecModel,a=!0;if(a){var o=r==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===r}});l(s,"single")}function l(u,h){var c=u[0];if(c){var v=new Dr;if(v.add(c.componentIndex),t.set(h,v),a=!1,h==="x"||h==="y"){var p=c.getReferringComponents("grid",Yt).models[0];p&&w(u,function(f){c.componentIndex!==f.componentIndex&&p===f.getReferringComponents("grid",Yt).models[0]&&v.add(f.componentIndex)})}}}a&&w(Zi,function(u){if(a){var h=i.findComponents({mainType:Ot(u),filter:function(v){return v.get("type",!0)==="category"}});if(h[0]){var c=new Dr;c.add(h[0].componentIndex),t.set(u,c),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(r){!t&&(t=r)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var r=this.ecModel.option;this.option.throttle=r.animation&&r.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var r=this._rangePropMode,i=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?r[o]="percent":!s&&l?r[o]="value":i?r[o]=i[o]:s&&(r[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(r,i){t==null&&(t=this.ecModel.getComponent(Ot(r),i))},this),t},e.prototype.eachTargetAxis=function(t,r){this._targetAxisInfoMap.each(function(i,a){w(i.indexList,function(o){t.call(r,a,o)})})},e.prototype.getAxisProxy=function(t,r){var i=this.getAxisModel(t,r);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,r){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[r])return this.ecModel.getComponent(Ot(t),r)},e.prototype.setRawRange=function(t){var r=this.option,i=this.settledOption;w([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(r[a[0]]=i[a[0]]=t[a[0]],r[a[1]]=i[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var r=this.option;w(["start","startValue","end","endValue"],function(i){r[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,r){if(t==null&&r==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,r).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var r,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;r||(r=u)}return r},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(Q);function Fi(n){var e={};return w(["start","end","startValue","endValue","throttle"],function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}var fh=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e})(be),Ln=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i,a){this.dataZoomModel=t,this.ecModel=r,this.api=i},e.type="dataZoom",e})(at),dh=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e})(Ln),ee=w,$i=wt,gh=(function(){function n(e,t,r,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=r}return n.prototype.hostedBy=function(e){return this._dataZoomModel===e},n.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},n.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},n.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(vh(t)){var r=Ot(this._dimName),i=t.getReferringComponents(r,Yt).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},n.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},n.prototype.getMinMaxSpan=function(){return H(this._minMaxSpan)},n.prototype.calculateDataWindow=function(e){var t=this._dataExtent,r=this.getAxisModel(),i=r.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;ee(["start","end"],function(v,p){var f=e[v],d=e[v+"Value"];a[p]==="percent"?(f==null&&(f=o[p]),d=i.parse(j(f,o,t))):(u=!0,d=d==null?t[p]:i.parse(d),f=j(d,t,o)),l[p]=d==null||isNaN(d)?t[p]:d,s[p]=f==null||isNaN(f)?o[p]:f}),$i(l),$i(s);var h=this._minMaxSpan;u?c(l,s,t,o,!1):c(s,l,o,t,!0);function c(v,p,f,d,g){var y=g?"Span":"ValueSpan";Kt(0,v,f,"all",h["min"+y],h["max"+y]);for(var m=0;m<2;m++)p[m]=j(v[m],f,d,!0),g&&(p[m]=i.parse(p[m]))}return{valueWindow:l,percentWindow:s}},n.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=yh(this,this._dimName,t),this._updateMinMaxSpan();var r=this.calculateDataWindow(e.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,this._setAxisModel()}},n.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var r=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),o=this._valueWindow;if(a==="none")return;ee(i,function(l){var u=l.getData(),h=u.mapDimensionsAll(r);if(h.length){if(a==="weakFilter"){var c=u.getStore(),v=V(h,function(p){return u.getDimensionIndex(p)},u);u.filterSelf(function(p){for(var f,d,g,y=0;y<h.length;y++){var m=c.get(v[y],p),x=!isNaN(m),S=m<o[0],_=m>o[1];if(x&&!S&&!_)return!0;x&&(g=!0),S&&(f=!0),_&&(d=!0)}return g&&f&&d})}else ee(h,function(p){if(a==="empty")l.setData(u=u.map(p,function(d){return s(d)?d:NaN}));else{var f={};f[p]=o,u.selectRange(f)}});ee(h,function(p){u.setApproximateExtent(o,p)})}});function s(l){return l>=o[0]&&l<=o[1]}},n.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,r=this._dataExtent;ee(["min","max"],function(i){var a=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=j(r[0]+o,r,[0,100],!0):a!=null&&(o=j(a,[0,100],r,!0)-r[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},n.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,r=this._valueWindow;if(t){var i=Rs(r,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+r[0].toFixed(i)),t[1]!==100&&a.setDeterminedMinMax("max",+r[1].toFixed(i)),a.freeze()}},n})();function yh(n,e,t){var r=[1/0,-1/0];ee(t,function(o){Os(r,o.getData(),e)});var i=n.getAxisModel(),a=zs(i.axis.scale,i,r).calculate();return[a.min,a.max]}var mh={getTargetSeries:function(n){function e(i){n.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=n.getComponent(Ot(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new gh(i,a,s,n),t.push(o.__dzAxisProxy))});var r=it();return w(t,function(i){w(i.getTargetSeriesModels(),function(a){r.set(a.uid,a)})}),r},overallReset:function(n,e){n.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(r,i){t.getAxisProxy(r,i).reset(t)}),t.eachTargetAxis(function(r,i){t.getAxisProxy(r,i).filterData(t,e)})}),n.eachComponent("dataZoom",function(t){var r=t.findRepresentativeAxisProxy();if(r){var i=r.getDataPercentWindow(),a=r.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function xh(n){n.registerAction("dataZoom",function(e,t){var r=ph(t,e);w(r,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Ui=!1;function kn(n){Ui||(Ui=!0,n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,mh),xh(n),n.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Sh(n){n.registerComponentModel(fh),n.registerComponentView(dh),kn(n)}var xt=(function(){function n(){}return n})(),Eo={};function re(n,e){Eo[n]=e}function No(n){return Eo[n]}var _h=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){n.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;w(this.option.feature,function(r,i){var a=No(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),rt(r,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:M.color.border,borderRadius:0,borderWidth:0,padding:M.size.m,itemSize:15,itemGap:M.size.s,showTitle:!0,iconStyle:{borderColor:M.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:M.color.accent50}},tooltip:{show:!1,position:"bottom"}},e})(Q);function Go(n,e){var t=cr(e.get("padding")),r=e.getItemStyle(["color","opacity"]);r.fill=e.get("backgroundColor");var i=new et({shape:{x:n.x-t[3],y:n.y-t[0],width:n.width+t[1]+t[3],height:n.height+t[0]+t[2],r:e.get("borderRadius")},style:r,silent:!0,z2:-1});return i}var bh=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,r,i,a){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},h=this._features||(this._features={}),c=[];w(u,function(m,x){c.push(x)}),new Vs(this._featureNames||[],c).add(v).update(v).remove(N(v,null)).execute(),this._featureNames=c;function v(m,x){var S=c[m],_=c[x],b=u[S],C=new tt(b,t,t.ecModel),T;if(a&&a.newTitle!=null&&a.featureName===S&&(b.title=a.newTitle),S&&!_){if(wh(S))T={onclick:C.option.onclick,featureName:S};else{var A=No(S);if(!A)return;T=new A}h[S]=T}else if(T=h[_],!T)return;T.uid=Bs("toolbox-feature"),T.model=C,T.ecModel=r,T.api=i;var I=T instanceof xt;if(!S&&_){I&&T.dispose&&T.dispose(r,i);return}if(!C.get("show")||I&&T.unusable){I&&T.remove&&T.remove(r,i);return}p(C,T,S),C.setIconStatus=function(k,B){var L=this.option,z=this.iconPaths;L.iconStatus=L.iconStatus||{},L.iconStatus[k]=B,z[k]&&(B==="emphasis"?Un:Yn)(z[k])},T instanceof xt&&T.render&&T.render(C,r,i,a)}function p(m,x,S){var _=m.getModel("iconStyle"),b=m.getModel(["emphasis","iconStyle"]),C=x instanceof xt&&x.getIcons?x.getIcons():m.get("icon"),T=m.get("title")||{},A,I;E(C)?(A={},A[S]=C):A=C,E(T)?(I={},I[S]=T):I=T;var k=m.iconPaths={};w(A,function(B,L){var z=ur(B,{},{x:-s/2,y:-s/2,width:s,height:s});z.setStyle(_.getItemStyle());var G=z.ensureState("emphasis");G.style=b.getItemStyle();var Y=new Z({style:{text:I[L],align:b.get("textAlign"),borderRadius:b.get("textBorderRadius"),padding:b.get("textPadding"),fill:null,font:Es({fontStyle:b.get("textFontStyle"),fontFamily:b.get("textFontFamily"),fontSize:b.get("textFontSize"),fontWeight:b.get("textFontWeight")},r)},ignore:!0});z.setTextContent(Y),Me({el:z,componentModel:t,itemName:L,formatterParamsExtra:{title:I[L]}}),z.__title=I[L],z.on("mouseover",function(){var ut=b.getItemStyle(),ht=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";Y.setStyle({fill:b.get("textFill")||ut.fill||ut.stroke||M.color.neutral99,backgroundColor:b.get("textBackgroundColor")}),z.setTextConfig({position:b.get("textPosition")||ht}),Y.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",L])!=="emphasis"&&i.leaveEmphasis(this),Y.hide()}),(m.get(["iconStatus",L])==="emphasis"?Un:Yn)(z),o.add(z),z.on("click",R(x.onclick,x,r,i,L)),k[L]=z})}var f=kt(t,i).refContainer,d=t.getBoxLayoutParams(),g=t.get("padding"),y=ft(d,f,g);Ft(t.get("orient"),o,t.get("itemGap"),y.width,y.height),yn(o,d,f,g),o.add(Go(o.getBoundingRect(),t)),l||o.eachChild(function(m){var x=m.__title,S=m.ensureState("emphasis"),_=S.textConfig||(S.textConfig={}),b=m.getTextContent(),C=b&&b.ensureState("emphasis");if(C&&!F(C)&&x){var T=C.style||(C.style={}),A=hn(x,Z.makeFont(T)),I=m.x+o.x,k=m.y+o.y+s,B=!1;k+A.height>i.getHeight()&&(_.position="top",B=!0);var L=B?-5-A.height:s+10;I+A.width/2>i.getWidth()?(_.position=["100%",L],T.align="right"):I-A.width/2<0&&(_.position=[0,L],T.align="left")}})},e.prototype.updateView=function(t,r,i,a){w(this._features,function(o){o instanceof xt&&o.updateView&&o.updateView(o.model,r,i,a)})},e.prototype.remove=function(t,r){w(this._features,function(i){i instanceof xt&&i.remove&&i.remove(t,r)}),this.group.removeAll()},e.prototype.dispose=function(t,r){w(this._features,function(i){i instanceof xt&&i.dispose&&i.dispose(t,r)})},e.type="toolbox",e})(at);function wh(n){return n.indexOf("my")===0}var Ch=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){var i=this.model,a=i.get("name")||t.get("title.0.text")||"echarts",o=r.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=r.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||M.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=st.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=a+"."+s,h.target="_blank",h.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),p=v[0].indexOf("base64")>-1,f=o?decodeURIComponent(v[1]):v[1];p&&(f=window.atob(f));var d=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=f.length,y=new Uint8Array(g);g--;)y[g]=f.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var x=document.createElement("iframe");document.body.appendChild(x);var S=x.contentWindow,_=S.document;_.open("image/svg+xml","replace"),_.write(f),_.close(),S.focus(),_.execCommand("SaveAs",!0,d),document.body.removeChild(x)}}else{var b=i.get("lang"),C='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(b&&b[0]||"")+'" /></body>',T=window.open();T.document.write(C),T.document.title=a}},e.getDefaultOption=function(t){var r={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:M.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return r},e})(xt),Yi="__ec_magicType_stack__",Th=[["line","bar"],["stack"]],Mh=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,r=t.get("icon"),i={};return w(t.get("type"),function(a){r[a]&&(i[a]=r[a])}),i},e.getDefaultOption=function(t){var r={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return r},e.prototype.onclick=function(t,r,i){var a=this.model,o=a.get(["seriesIndex",i]);if(Xi[i]){var s={series:[]},l=function(c){var v=c.subType,p=c.id,f=Xi[i](v,p,c,a);f&&(q(f,c.option),s.series.push(f));var d=c.coordinateSystem;if(d&&d.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",x=c.getReferringComponents(m,Yt).models[0],S=x.componentIndex;s[m]=s[m]||[];for(var _=0;_<=S;_++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=i==="bar"}}};w(Th,function(c){vt(c,i)>=0&&w(c,function(v){a.setIconStatus(v,"normal")})}),a.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=i;i==="stack"&&(u=rt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(h="tiled")),r.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},e})(xt),Xi={line:function(n,e,t,r){if(n==="bar")return rt({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(n,e,t,r){if(n==="line")return rt({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(n,e,t,r){var i=t.get("stack")===Yi;if(n==="line"||n==="bar")return r.setIconStatus("stack",i?"normal":"emphasis"),rt({id:e,stack:i?"":Yi},r.get(["option","stack"])||{},!0)}};mn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(n,e){e.mergeOption(n.newOption)});var fr=new Array(60).join("-"),le=" ";function Ah(n){var e={},t=[],r=[];return n.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:r}}function Dh(n){var e=[];return w(n,function(t,r){var i=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(V(t.series,function(p){return p.name})),l=[i.model.getCategories()];w(t.series,function(p){var f=p.getRawData();l.push(p.getRawData().mapArray(f.mapDimension(o),function(d){return d}))});for(var u=[s.join(le)],h=0;h<l[0].length;h++){for(var c=[],v=0;v<l.length;v++)c.push(l[v][h]);u.push(c.join(le))}e.push(u.join(`
2
+ `))}),e.join(`
3
+
4
+ `+fr+`
5
+
6
+ `)}function Ih(n){return V(n,function(e){var t=e.getRawData(),r=[e.name],i=[];return t.each(t.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=t.getName(o),l=0;l<a-1;l++)i[l]=arguments[l];r.push((s?s+le:"")+i.join(le))}),r.join(`
7
+ `)}).join(`
8
+
9
+ `+fr+`
10
+
11
+ `)}function Lh(n){var e=Ah(n);return{value:Et([Dh(e.seriesGroupByCategoryAxis),Ih(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
12
+
13
+ `+fr+`
14
+
15
+ `),meta:e.meta}}function rr(n){return n.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kh(n){var e=n.slice(0,n.indexOf(`
16
+ `));if(e.indexOf(le)>=0)return!0}var Qr=new RegExp("["+le+"]+","g");function Ph(n){for(var e=n.split(/\n+/g),t=rr(e.shift()).split(Qr),r=[],i=V(t,function(l){return{name:l,data:[]}}),a=0;a<e.length;a++){var o=rr(e[a]).split(Qr);r.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:r}}function Rh(n){for(var e=n.split(/\n+/g),t=rr(e.shift()),r=[],i=0;i<e.length;i++){var a=rr(e[i]);if(a){var o=a.split(Qr),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),r[i]={name:s,value:[]},l=r[i].value):l=r[i]=[];for(var h=0;h<o.length;h++)l.push(+o[h]);l.length===1&&(u?r[i].value=l[0]:r[i]=l[0])}}return{name:t,data:r}}function Oh(n,e){var t=n.split(new RegExp(`
17
+ *`+fr+`
18
+ *`,"g")),r={series:[]};return w(t,function(i,a){if(kh(i)){var o=Ph(i),s=e[a],l=s.axisDim+"Axis";s&&(r[l]=r[l]||[],r[l][s.axisIndex]={data:o.categories},r.series=r.series.concat(o.series))}else{var o=Rh(i);r.series.push(o)}}),r}var zh=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){setTimeout(function(){r.dispatchAction({type:"hideTip"})});var i=r.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||M.color.neutral00;var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),h=document.createElement("textarea");u.style.cssText="overflow:auto";var c=a.get("optionToContent"),v=a.get("contentToOption"),p=Lh(t);if(F(c)){var f=c(r.getOption());E(f)?u.innerHTML=f:Hr(f)&&u.appendChild(f)}else{h.readOnly=a.get("readOnly");var d=h.style;d.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",d.color=a.get("textColor"),d.borderColor=a.get("textareaBorderColor"),d.backgroundColor=a.get("textareaColor"),h.value=p.value,u.appendChild(h)}var g=p.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",x=document.createElement("div"),S=document.createElement("div");m+=";background-color:"+a.get("buttonColor"),m+=";color:"+a.get("buttonTextColor");var _=this;function b(){i.removeChild(o),_._dom=null}Hn(x,"click",b),Hn(S,"click",function(){if(v==null&&c!=null||v!=null&&c==null){b();return}var C;try{F(v)?C=v(u,r.getOption()):C=Oh(h.value,g)}catch(T){throw b(),new Error("Data view format error "+T)}C&&r.dispatchAction({type:"changeDataView",newOption:C}),b()}),x.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=x.style.cssText=m,!a.get("readOnly")&&y.appendChild(S),y.appendChild(x),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(t,r){this._dom&&r.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.getDefaultOption=function(t){var r={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:M.color.background,textColor:M.color.primary,textareaColor:M.color.background,textareaBorderColor:M.color.border,buttonColor:M.color.accent50,buttonTextColor:M.color.neutral00};return r},e})(xt);function Vh(n,e){return V(n,function(t,r){var i=e&&e[r];if(ct(i)&&!O(i)){var a=ct(t)&&!O(t);a||(t={value:t});var o=i.name!=null&&t.name==null;return t=q(t,i),o&&delete t.name,t}else return t})}mn({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(n,e){var t=[];w(n.newOption.series,function(r){var i=e.getSeriesByName(r.name)[0];if(!i)t.push(W({type:"scatter"},r));else{var a=i.get("data");t.push({name:r.name,data:Vh(r.data,a)})}}),e.mergeOption(q({series:t},n.newOption))});var Ho=w,Wo=dt();function Bh(n,e){var t=Pn(n);Ho(e,function(r,i){for(var a=t.length-1;a>=0;a--){var o=t[a];if(o[i])break}if(a<0){var s=n.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function Eh(n){var e=Pn(n),t=e[e.length-1];e.length>1&&e.pop();var r={};return Ho(t,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){r[a]=i;break}}),r}function Nh(n){Wo(n).snapshots=null}function Gh(n){return Pn(n).length}function Pn(n){var e=Wo(n);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Hh=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){Nh(t),r.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var r={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return r},e})(xt);mn({type:"restore",event:"restore",update:"prepareAndUpdate"},function(n,e){e.resetOption("recreate")});var Wh=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Rn=(function(){function n(e,t,r){var i=this;this._targetInfoList=[];var a=Ki(t,e);w(Zh,function(o,s){(!r||!r.include||vt(r.include,s)>=0)&&o(a,i._targetInfoList)})}return n.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(r,i,a){if((r.coordRanges||(r.coordRanges=[])).push(i),!r.coordRange){r.coordRange=i;var o=Ir[r.brushType](0,a,i);r.__rangeOffset={offset:Ji[r.brushType](o.values,r.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},n.prototype.matchOutputRanges=function(e,t,r){w(e,function(i){var a=this.findTargetInfo(i,t);a&&a!==!0&&w(a.coordSyses,function(o){var s=Ir[i.brushType](1,o,i.range,!0);r(i,s.values,o,t)})},this)},n.prototype.setInputRanges=function(e,t){w(e,function(r){var i=this.findTargetInfo(r,t);if(r.range=r.range||[],i&&i!==!0){r.panelId=i.panelId;var a=Ir[r.brushType](0,i.coordSys,r.coordRange),o=r.__rangeOffset;r.range=o?Ji[r.brushType](a.values,o.offset,Fh(a.xyMinMax,o.xyMinMax)):a.values}},this)},n.prototype.makePanelOpts=function(e,t){return V(this._targetInfoList,function(r){var i=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:t?t(r):null,clipPath:Pl(i),isTargetByCursor:kl(i,e,r.coordSysModel),getLinearBrushOtherExtent:Ll(i)}})},n.prototype.controlSeries=function(e,t,r){var i=this.findTargetInfo(e,r);return i===!0||i&&vt(i.coordSyses,t.coordinateSystem)>=0},n.prototype.findTargetInfo=function(e,t){for(var r=this._targetInfoList,i=Ki(t,e),a=0;a<r.length;a++){var o=r[a],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<qi.length;l++)if(qi[l](i,o))return o}return!0},n})();function Jr(n){return n[0]>n[1]&&n.reverse(),n}function Ki(n,e){return so(n,e,{includeMainTypes:Wh})}var Zh={grid:function(n,e){var t=n.xAxisModels,r=n.yAxisModels,i=n.gridModels,a=it(),o={},s={};!t&&!r&&!i||(w(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),w(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),w(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,h=[];w(u.getCartesians(),function(c,v){(vt(t,c.getAxis("x").model)>=0||vt(r,c.getAxis("y").model)>=0)&&h.push(c)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:ji.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(n,e){w(n.geoModels,function(t){var r=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:r,coordSyses:[r],getPanelRect:ji.geo})})}},qi=[function(n,e){var t=n.xAxisModel,r=n.yAxisModel,i=n.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===e.gridModel},function(n,e){var t=n.geoModel;return t&&t===e.geoModel}],ji={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var n=this.coordSys,e=n.getBoundingRect().clone();return e.applyTransform(Se(n)),e}},Ir={lineX:N(Qi,0),lineY:N(Qi,1),rect:function(n,e,t,r){var i=n?e.pointToData([t[0][0],t[1][0]],r):e.dataToPoint([t[0][0],t[1][0]],r),a=n?e.pointToData([t[0][1],t[1][1]],r):e.dataToPoint([t[0][1],t[1][1]],r),o=[Jr([i[0],a[0]]),Jr([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(n,e,t,r){var i=[[1/0,-1/0],[1/0,-1/0]],a=V(t,function(o){var s=n?e.pointToData(o,r):e.dataToPoint(o,r);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function Qi(n,e,t,r){var i=t.getAxis(["x","y"][n]),a=Jr(V([0,1],function(s){return e?i.coordToData(i.toLocalCoord(r[s]),!0):i.toGlobalCoord(i.dataToCoord(r[s]))})),o=[];return o[n]=a,o[1-n]=[NaN,NaN],{values:a,xyMinMax:o}}var Ji={lineX:N(ta,0),lineY:N(ta,1),rect:function(n,e,t){return[[n[0][0]-t[0]*e[0][0],n[0][1]-t[0]*e[0][1]],[n[1][0]-t[1]*e[1][0],n[1][1]-t[1]*e[1][1]]]},polygon:function(n,e,t){return V(n,function(r,i){return[r[0]-t[0]*e[i][0],r[1]-t[1]*e[i][1]]})}};function ta(n,e,t,r){return[e[0]-r[n]*t[0],e[1]-r[n]*t[1]]}function Fh(n,e){var t=ea(n),r=ea(e),i=[t[0]/r[0],t[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function ea(n){return n?[n[0][1]-n[0][0],n[1][1]-n[1][0]]:[NaN,NaN]}var tn=w,$h=Gs("toolbox-dataZoom_"),Uh=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,r,i,a){this._brushController||(this._brushController=new So(i.getZr()),this._brushController.on("brush",R(this._onBrush,this)).mount()),Kh(t,r,this,a,i),Xh(t,r)},e.prototype.onclick=function(t,r,i){Yh[i].call(this)},e.prototype.remove=function(t,r){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,r){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var r=t.areas;if(!t.isEnd||!r.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new Rn(On(this.model),a,{include:["grid"]});o.matchOutputRanges(r,a,function(u,h,c){if(c.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",c,h[0]),s("y",c,h[1])):s({lineX:"x",lineY:"y"}[v],c,h)}}),Bh(a,i),this._dispatchZoomAction(i);function s(u,h,c){var v=h.getAxis(u),p=v.model,f=l(u,p,a),d=f.findRepresentativeAxisProxy(p).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(c=Kt(0,c.slice(),v.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),f&&(i[f.id]={dataZoomId:f.id,startValue:c[0],endValue:c[1]})}function l(u,h,c){var v;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(p){var f=p.getAxisModel(u,h.componentIndex);f&&(v=p)}),v}},e.prototype._dispatchZoomAction=function(t){var r=[];tn(t,function(i,a){r.push(H(i))}),r.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:r})},e.getDefaultOption=function(t){var r={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:M.color.backgroundTint}};return r},e})(xt),Yh={zoom:function(){var n=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:n})},back:function(){this._dispatchZoomAction(Eh(this.ecModel))}};function On(n){var e={xAxisIndex:n.get("xAxisIndex",!0),yAxisIndex:n.get("yAxisIndex",!0),xAxisId:n.get("xAxisId",!0),yAxisId:n.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Xh(n,e){n.setIconStatus("back",Gh(e)>1?"emphasis":"normal")}function Kh(n,e,t,r,i){var a=t._isZoomActive;r&&r.type==="takeGlobalCursor"&&(a=r.key==="dataZoomSelect"?r.dataZoomSelectActive:!1),t._isZoomActive=a,n.setIconStatus("zoom",a?"emphasis":"normal");var o=new Rn(On(n),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:n.getModel("brushStyle").getItemStyle()}:!1)}Ns("dataZoom",function(n){var e=n.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var r=e.getModel(t),i=[],a=On(r),o=so(n,a);tn(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),tn(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var c=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:$h+u+c};v[h]=c,i.push(v)}return i});function Ip(n){n.registerComponentModel(_h),n.registerComponentView(bh),re("saveAsImage",Ch),re("magicType",Mh),re("dataView",zh),re("dataZoom",Uh),re("restore",Hh),pt(Sh)}var qh=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:M.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:M.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:M.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:M.color.tertiary,fontSize:14}},e})(Q);function Zo(n){var e=n.get("confine");return e!=null?!!e:n.get("renderMode")==="richText"}function Fo(n){if(st.domSupported){for(var e=document.documentElement.style,t=0,r=n.length;t<r;t++)if(n[t]in e)return n[t]}}var $o=Fo(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),jh=Fo(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function Uo(n,e){if(!n)return e;e=lo(e,!0);var t=n.indexOf(e);return n=t===-1?e:"-"+n.slice(0,t)+"-"+e,n.toLowerCase()}function Qh(n,e){var t=n.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(n);return t?t[e]:null}var Jh=Uo(jh,"transition"),zn=Uo($o,"transform"),tc="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(st.transform3dSupported?"will-change:transform;":"");function ec(n){return n=n==="left"?"right":n==="right"?"left":n==="top"?"bottom":"top",n}function rc(n,e,t){if(!E(t)||t==="inside")return"";var r=n.get("backgroundColor"),i=n.get("borderWidth");e=qe(e);var a=ec(t),o=Math.max(Math.round(i)*1.5,6),s="",l=zn+":",u;vt(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var h=u*Math.PI/180,c=o+i,v=c*Math.abs(Math.cos(h))+c*Math.abs(Math.sin(h)),p=Math.round(((v-Math.SQRT2*i)/2+Math.SQRT2*i-(v-c)/2)*100)/100;s+=";"+a+":-"+p+"px";var f=e+" solid "+i+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"];return'<div style="'+d.join("")+'"></div>'}function nc(n,e,t){var r="cubic-bezier(0.23,1,0.32,1)",i="",a="";return t&&(i=" "+n/2+"s "+r,a="opacity"+i+",visibility"+i),e||(i=" "+n+"s "+r,a+=(a.length?",":"")+(st.transformSupported?""+zn+i:",left"+i+",top"+i)),Jh+":"+a}function ra(n,e,t){var r=n.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!st.transformSupported)return t?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var a=st.transform3dSupported,o="translate"+(a?"3d":"")+"("+r+","+i+(a?",0":"")+")";return t?"top:0;left:0;"+zn+":"+o+";":[["top",0],["left",0],[$o,o]]}function ic(n){var e=[],t=n.get("fontSize"),r=n.getTextColor();r&&e.push("color:"+r),e.push("font:"+n.getFont());var i=K(n.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+i+"px");var a=n.get("textShadowColor"),o=n.get("textShadowBlur")||0,s=n.get("textShadowOffsetX")||0,l=n.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),w(["decoration","align"],function(u){var h=n.get(u);h&&e.push("text-"+u+":"+h)}),e.join(";")}function ac(n,e,t,r){var i=[],a=n.get("transitionDuration"),o=n.get("backgroundColor"),s=n.get("shadowBlur"),l=n.get("shadowColor"),u=n.get("shadowOffsetX"),h=n.get("shadowOffsetY"),c=n.getModel("textStyle"),v=uo(n,"html"),p=u+"px "+h+"px "+s+"px "+l;return i.push("box-shadow:"+p),e&&a>0&&i.push(nc(a,t,r)),o&&i.push("background-color:"+o),w(["width","color","radius"],function(f){var d="border-"+f,g=lo(d),y=n.get(g);y!=null&&i.push(d+":"+y+(f==="color"?"":"px"))}),i.push(ic(c)),v!=null&&i.push("padding:"+cr(v).join("px ")+"px"),i.join(";")+";"}function na(n,e,t,r,i){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&hs(n,o,t,r,i)}else{n[0]=r,n[1]=i;var s=a&&a.getViewportRootOffset();s&&(n[0]+=s.offsetLeft,n[1]+=s.offsetTop)}n[2]=n[0]/e.getWidth(),n[3]=n[1]/e.getHeight()}var oc=(function(){function n(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,st.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var i=this._zr=e.getZr(),a=t.appendTo,o=a&&(E(a)?document.querySelector(a):Hr(a)?a:F(a)&&a(e.getDom()));na(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(r),this._api=e,this._container=o;var s=this;r.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},r.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,h=i.painter.getViewportRoot();us(h,l,!0),u.dispatch("mousemove",l)}},r.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return n.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),r=Qh(t,"position"),i=t.style;i.position!=="absolute"&&r!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},n.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,i=r.style,a=this._styleCoord;r.innerHTML?i.cssText=tc+ac(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+ra(a[0],a[1],!0)+("border-color:"+qe(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},n.prototype.setContent=function(e,t,r,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(E(a)&&r.get("trigger")==="item"&&!Zo(r)&&(s=rc(r,i,a)),E(e))o.innerHTML=e+s;else if(e){o.innerHTML="",O(e)||(e=[e]);for(var l=0;l<e.length;l++)Hr(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},n.prototype.setEnterable=function(e){this._enterable=e},n.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},n.prototype.moveTo=function(e,t){if(this.el){var r=this._styleCoord;if(na(r,this._zr,this._container,e,t),r[0]!=null&&r[1]!=null){var i=this.el.style,a=ra(r[0],r[1]);w(a,function(o){i[o[0]]=o[1]})}}},n.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},n.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",st.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},n.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(R(this.hide,this),e)):this.hide())},n.prototype.isShow=function(){return this._show},n.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;cs(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var r=t.parentNode;r&&r.removeChild(t)}this.el=this._container=null},n})(),sc=(function(){function n(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),aa(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return n.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},n.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},n.prototype.setContent=function(e,t,r,i,a){var o=this;ct(e)&&X(""),this.el&&this._zr.remove(this.el);var s=r.getModel("textStyle");this.el=new Z({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:r.get(["textStyle","color"]),padding:uo(r,"richText"),verticalAlign:"top",align:"left"},z:r.get("z")}),w(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=r.get(u)}),w(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},n.prototype.setEnterable=function(e){this._enterable=e},n.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),r=ia(e.style);return[t.width+r.left+r.right,t.height+r.top+r.bottom]},n.prototype.moveTo=function(e,t){var r=this.el;if(r){var i=this._styleCoord;aa(i,this._zr,e,t),e=i[0],t=i[1];var a=r.style,o=Pt(a.borderWidth||0),s=ia(a);r.x=e+o+s.left,r.y=t+o+s.top,r.markRedraw()}},n.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},n.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},n.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(R(this.hide,this),e)):this.hide())},n.prototype.isShow=function(){return this._show},n.prototype.dispose=function(){this._zr.remove(this.el)},n})();function Pt(n){return Math.max(0,n)}function ia(n){var e=Pt(n.shadowBlur||0),t=Pt(n.shadowOffsetX||0),r=Pt(n.shadowOffsetY||0);return{left:Pt(e-t),right:Pt(e+t),top:Pt(e-r),bottom:Pt(e+r)}}function aa(n,e,t,r){n[0]=t,n[1]=r,n[2]=n[0]/e.getWidth(),n[3]=n[1]/e.getHeight()}var lc=new et({shape:{x:-1,y:-1,width:2,height:2}}),uc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){if(!(st.node||!r.getDom())){var i=t.getComponent("tooltip"),a=this._renderMode=Hs(i.get("renderMode"));this._tooltipContent=a==="richText"?new sc(r):new oc(r,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(t,r,i){if(!(st.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=r,this._api=i;var a=this._tooltipContent;a.update(t),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Te(this,"_updatePosition",50,"fixRate"):Ke(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,r=t.get("triggerOn");Ao("itemTooltip",this._api,R(function(i,a,o){r!=="none"&&(r.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,r=this._ecModel,i=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,r,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,r,i,a){if(!(a.from===this.uid||st.node||!i.getDom())){var o=oa(a,i);this._ticket="";var s=a.dataByCoordSys,l=pc(a,r,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var h=lc;h.x=a.x,h.y=a.y,h.update(),$(h).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:h},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,r,i,a))return;var c=Do(a,r),v=c.point[0],p=c.point[1];v!=null&&p!=null&&this._tryShow({offsetX:v,offsetY:p,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,r,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(oa(a,i))},e.prototype._manuallyAxisShowTip=function(t,r,i,a){var o=a.seriesIndex,s=a.dataIndex,l=r.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=r.getSeriesByIndex(o);if(u){var h=u.getData(),c=fe([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,r){var i=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=$(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;ho(i,function(h){if(h.tooltipDisabled)return l=u=null,!0;l||u||($(h).dataIndex!=null?l=h:$(h).tooltipConfig!=null&&(u=h))},!0),l?this._showSeriesItemTooltip(t,l,r):u?this._showComponentItemTooltip(t,u,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},e.prototype._showOrMove=function(t,r){var i=t.get("showDelay");r=R(r,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(r,i):r()},e.prototype._showAxisTooltip=function(t,r){var i=this._ecModel,a=this._tooltipModel,o=[r.offsetX,r.offsetY],s=fe([r.tooltipOption],a),l=this._renderMode,u=[],h=_e("section",{blocks:[],noHeader:!0}),c=[],v=new mr;w(t,function(m){w(m.dataByAxis,function(x){var S=i.getComponent(x.axisDim+"Axis",x.axisIndex),_=x.value;if(!(!S||_==null)){var b=Co(_,S.axis,i,x.seriesDataIndices,x.valueLabelOpt),C=_e("section",{header:b,noHeader:!vs(b),sortBlocks:!0,blocks:[]});h.blocks.push(C),w(x.seriesDataIndices,function(T){var A=i.getSeriesByIndex(T.seriesIndex),I=T.dataIndexInside,k=A.getDataParams(I);if(!(k.dataIndex<0)){k.axisDim=x.axisDim,k.axisIndex=x.axisIndex,k.axisType=x.axisType,k.axisId=x.axisId,k.axisValue=Qa(S.axis,{value:_}),k.axisValueLabel=b,k.marker=v.makeTooltipMarker("item",qe(k.color),l);var B=Xn(A.formatTooltip(I,!0,null)),L=B.frag;if(L){var z=fe([A],a).get("valueFormatter");C.blocks.push(z?W({valueFormatter:z},L):L)}B.text&&c.push(B.text),u.push(k)}})}})}),h.blocks.reverse(),c.reverse();var p=r.position,f=s.get("order"),d=Kn(h,v,l,f,i.get("useUTC"),s.get("textStyle"));d&&c.unshift(d);var g=l==="richText"?`
19
+
20
+ `:"<br/>",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,p,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],p,null,v)})},e.prototype._showSeriesItemTooltip=function(t,r,i){var a=this._ecModel,o=$(r),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,c=o.dataType,v=u.getData(c),p=this._renderMode,f=t.positionDefault,d=fe([v.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(h,c),m=new mr;y.marker=m.makeTooltipMarker("item",qe(y.color),p);var x=Xn(u.formatTooltip(h,!1,c)),S=d.get("order"),_=d.get("valueFormatter"),b=x.frag,C=b?Kn(_?W({valueFormatter:_},b):b,m,p,S,a.get("useUTC"),d.get("textStyle")):x.text,T="item_"+u.name+"_"+h;this._showOrMove(d,function(){this._showTooltipContent(d,C,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),i({type:"showTip",dataIndexInside:h,dataIndex:v.getRawIndex(h),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,r,i){var a=this._renderMode==="html",o=$(r),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(E(l)){var h=l;l={content:h,formatter:h},u=!0}u&&a&&l.content&&(l=H(l),l.content=ps(l.content));var c=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&c.push(v),c.push({formatter:l.content});var p=t.positionDefault,f=fe(c,this._tooltipModel,p?{position:p}:null),d=f.get("content"),g=Math.random()+"",y=new mr;this._showOrMove(f,function(){var m=H(f.get("formatterParams")||{});this._showTooltipContent(f,d,m,g,t.offsetX,t.offsetY,t.position,r,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,r,i,a,o,s,l,u,h){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var c=this._tooltipContent;c.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var p=r,f=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),d=f.color;if(v)if(E(v)){var g=t.ecModel.get("useUTC"),y=O(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;p=v,m&&(p=Ws(y.axisValue,p,g)),p=Zs(p,i,!0)}else if(F(v)){var x=R(function(S,_){S===this._ticket&&(c.setContent(_,h,t,d,l),this._updatePosition(t,l,o,s,c,i,u))},this);this._ticket=a,p=v(i,a,x)}else p=v;c.setContent(p,h,t,d,l),c.show(t,d),this._updatePosition(t,l,o,s,c,i,u)}},e.prototype._getNearestPoint=function(t,r,i,a,o){if(i==="axis"||O(r))return{color:a||o};if(!O(r))return{color:a||r.color||r.borderColor}},e.prototype._updatePosition=function(t,r,i,a,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();r=r||t.get("position");var c=o.getSize(),v=t.get("align"),p=t.get("verticalAlign"),f=l&&l.getBoundingRect().clone();if(l&&f.applyTransform(l.transform),F(r)&&(r=r([i,a],s,o.el,f,{viewSize:[u,h],contentSize:c.slice()})),O(r))i=U(r[0],u),a=U(r[1],h);else if(ct(r)){var d=r;d.width=c[0],d.height=c[1];var g=ft(d,{width:u,height:h});i=g.x,a=g.y,v=null,p=null}else if(E(r)&&l){var y=vc(r,f,c,t.get("borderWidth"));i=y[0],a=y[1]}else{var y=hc(i,a,o,u,h,v?null:20,p?null:20);i=y[0],a=y[1]}if(v&&(i-=sa(v)?c[0]/2:v==="right"?c[0]:0),p&&(a-=sa(p)?c[1]/2:p==="bottom"?c[1]:0),Zo(t)){var y=cc(i,a,o,u,h);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(t,r){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===t.length;return o&&w(i,function(s,l){var u=s.dataByAxis||[],h=t[l]||{},c=h.dataByAxis||[];o=o&&u.length===c.length,o&&w(u,function(v,p){var f=c[p]||{},d=v.seriesDataIndices||[],g=f.seriesDataIndices||[];o=o&&v.value===f.value&&v.axisType===f.axisType&&v.axisId===f.axisId&&d.length===g.length,o&&w(d,function(y,m){var x=g[m];o=o&&y.seriesIndex===x.seriesIndex&&y.dataIndex===x.dataIndex}),a&&w(v.seriesDataIndices,function(y){var m=y.seriesIndex,x=r[m],S=a[m];x&&S&&S.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=r,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,r){st.node||!r.getDom()||(Ke(this,"_updatePosition"),this._tooltipContent.dispose(),Ur("itemTooltip",r))},e.type="tooltip",e})(at);function fe(n,e,t){var r=e.ecModel,i;t?(i=new tt(t,r,r),i=new tt(e.option,i,r)):i=e;for(var a=n.length-1;a>=0;a--){var o=n[a];o&&(o instanceof tt&&(o=o.get("tooltip",!0)),E(o)&&(o={formatter:o}),o&&(i=new tt(o,i,r)))}return i}function oa(n,e){return n.dispatchAction||R(e.dispatchAction,e)}function hc(n,e,t,r,i,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(n+l+a+2>r?n-=l+a:n+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[n,e]}function cc(n,e,t,r,i){var a=t.getSize(),o=a[0],s=a[1];return n=Math.min(n+o,r)-o,e=Math.min(e+s,i)-s,n=Math.max(n,0),e=Math.max(e,0),[n,e]}function vc(n,e,t,r){var i=t[0],a=t[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=e.width,h=e.height;switch(n){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o,l=e.y+h/2-a/2;break;case"right":s=e.x+u+o,l=e.y+h/2-a/2}return[s,l]}function sa(n){return n==="center"||n==="middle"}function pc(n,e,t){var r=Fs(n).queryOptionMap,i=r.keys()[0];if(!(!i||i==="series")){var a=co(e,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=$(u).tooltipConfig;if(h&&h.name===n.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function Lp(n){pt(pr),n.registerComponentModel(qh),n.registerComponentView(uc),n.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Xe),n.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Xe)}var fc=["rect","polygon","keep","clear"];function dc(n,e){var t=vo(n?n.brush:[]);if(t.length){var r=[];w(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var i=n&&n.toolbox;O(i)&&(i=i[0]),i||(i={feature:{}},n.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),gc(s),e&&!s.length&&s.push.apply(s,fc)}}function gc(n){var e={};w(n,function(t){e[t]=1}),n.length=0,w(e,function(t,r){n.push(r)})}var la=w;function ua(n){if(n){for(var e in n)if(n.hasOwnProperty(e))return!0}}function en(n,e,t){var r={};return la(e,function(a){var o=r[a]=i();la(n[a],function(s,l){if(lt.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new lt(u),l==="opacity"&&(u=H(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new lt(u))}})}),r;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function Yo(n,e,t){var r;w(t,function(i){e.hasOwnProperty(i)&&ua(e[i])&&(r=!0)}),r&&w(t,function(i){e.hasOwnProperty(i)&&ua(e[i])?n[i]=H(e[i]):delete n[i]})}function yc(n,e,t,r,i,a){var o={};w(n,function(c){var v=lt.prepareVisualTypes(e[c]);o[c]=v});var s;function l(c){return po(t,s,c)}function u(c,v){fo(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(i,c),d=e[f],g=o[f],y=0,m=g.length;y<m;y++){var x=g[y];d[x]&&d[x].applyVisual(c,l,u)}}}function mc(n,e,t,r){var i={};return w(n,function(a){var o=lt.prepareVisualTypes(e[a]);i[a]=o}),{progress:function(o,s){var l;r!=null&&(l=s.getDimensionIndex(r));function u(_){return po(s,c,_)}function h(_,b){fo(s,c,_,b)}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=i[d],m=0,x=y.length;m<x;m++){var S=y[m];g[S]&&g[S].applyVisual(f,u,h)}}}}}function xc(n){var e=n.brushType,t={point:function(r){return ha[e].point(r,t,n)},rect:function(r){return ha[e].rect(r,t,n)}};return t}var ha={lineX:ca(0),lineY:ca(1),rect:{point:function(n,e,t){return n&&t.boundingRect.contain(n[0],n[1])},rect:function(n,e,t){return n&&t.boundingRect.intersect(n)}},polygon:{point:function(n,e,t){return n&&t.boundingRect.contain(n[0],n[1])&&ce(t.range,n[0],n[1])},rect:function(n,e,t){var r=t.range;if(!n||r.length<=1)return!1;var i=n.x,a=n.y,o=n.width,s=n.height,l=r[0];if(ce(r,i,a)||ce(r,i+o,a)||ce(r,i,a+s)||ce(r,i+o,a+s)||Lt.create(n).contain(l[0],l[1])||Ae(i,a,i+o,a,r)||Ae(i,a,i,a+s,r)||Ae(i+o,a,i+o,a+s,r)||Ae(i,a+s,i+o,a+s,r))return!0}}};function ca(n){var e=["x","y"],t=["width","height"];return{point:function(r,i,a){if(r){var o=a.range,s=r[n];return de(s,o)}},rect:function(r,i,a){if(r){var o=a.range,s=[r[e[n]],r[e[n]]+r[t[n]]];return s[1]<s[0]&&s.reverse(),de(s[0],o)||de(s[1],o)||de(o[0],s)||de(o[1],s)}}}}function de(n,e){return e[0]<=n&&n<=e[1]}var va=["inBrush","outOfBrush"],Lr="__ecBrushSelect",rn="__ecInBrushSelectEvent";function Xo(n){n.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new Rn(e.option,n);t.setInputRanges(e.areas,n)})}function Sc(n,e,t){var r=[],i,a;n.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),Xo(n),n.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:H(o.areas),selected:[]};r.push(l);var u=o.option,h=u.brushLink,c=[],v=[],p=[],f=!1;s||(i=u.throttleType,a=u.throttleDelay);var d=V(o.areas,function(_){var b=Cc[_.brushType],C=q({boundingRect:b?b(_):void 0},_);return C.selectors=xc(C),C}),g=en(o.option,va,function(_){_.mappingMethod="fixed"});O(h)&&w(h,function(_){c[_]=1});function y(_){return h==="all"||!!c[_]}function m(_){return!!_.length}n.eachSeries(function(_,b){var C=p[b]=[];_.subType==="parallel"?x(_,b):S(_,b,C)});function x(_,b){var C=_.coordinateSystem;f=f||C.hasAxisBrushed(),y(b)&&C.eachActiveState(_.getData(),function(T,A){T==="active"&&(v[A]=1)})}function S(_,b,C){if(!(!_.brushSelector||wc(o,b))&&(w(d,function(A){o.brushTargetManager.controlSeries(A,_,n)&&C.push(A),f=f||m(C)}),y(b)&&m(C))){var T=_.getData();T.each(function(A){pa(_,C,T,A)&&(v[A]=1)})}}n.eachSeries(function(_,b){var C={seriesId:_.id,seriesIndex:b,seriesName:_.name,dataIndex:[]};l.selected.push(C);var T=p[b],A=_.getData(),I=y(b)?function(k){return v[k]?(C.dataIndex.push(A.getRawIndex(k)),"inBrush"):"outOfBrush"}:function(k){return pa(_,T,A,k)?(C.dataIndex.push(A.getRawIndex(k)),"inBrush"):"outOfBrush"};(y(b)?f:m(T))&&yc(va,g,A,I)})}),_c(e,i,a,r,t)}function _c(n,e,t,r,i){if(i){var a=n.getZr();if(!a[rn]){a[Lr]||(a[Lr]=bc);var o=Te(a,Lr,t,e);o(n,r)}}}function bc(n,e){if(!n.isDisposed()){var t=n.getZr();t[rn]=!0,n.dispatchAction({type:"brushSelect",batch:e}),t[rn]=!1}}function pa(n,e,t,r){for(var i=0,a=e.length;i<a;i++){var o=e[i];if(n.brushSelector(r,t,o.selectors,o))return!0}}function wc(n,e){var t=n.option.seriesIndex;return t!=null&&t!=="all"&&(O(t)?vt(t,e)<0:e!==t)}var Cc={rect:function(n){return fa(n.range)},polygon:function(n){for(var e,t=n.range,r=0,i=t.length;r<i;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=t[r];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&fa(e)}};function fa(n){return new Lt(n[0][0],n[1][0],n[0][1]-n[0][0],n[1][1]-n[1][0])}var Tc=(function(n){D(e,n);function e(){var t=n!==null&&n.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 So(r.getZr())).on("brush",R(this._onBrush,this)).mount()},e.prototype.render=function(t,r,i,a){this.model=t,this._updateController(t,r,i,a)},e.prototype.updateTransform=function(t,r,i,a){Xo(r),this._updateController(t,r,i,a)},e.prototype.updateVisual=function(t,r,i,a){this.updateTransform(t,r,i,a)},e.prototype.updateView=function(t,r,i,a){this._updateController(t,r,i,a)},e.prototype._updateController=function(t,r,i,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:H(i),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:H(i),$from:r})},e.type="brush",e})(at),Mc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&Yo(i,t,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=V(t,function(r){return da(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=da(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:M.color.backgroundTint,borderColor:M.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:M.color.disabled},e})(Q);function da(n,e){return rt({brushType:n.brushType,brushMode:n.brushMode,transformable:n.transformable,brushStyle:new tt(n.brushStyle).getItemStyle(),removeOnClick:n.removeOnClick,z:n.z},e,!0)}var Ac=["rect","polygon","lineX","lineY","keep","clear"],Dc=(function(n){D(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,r,i){var a,o,s;r.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,w(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,r,i){this.render(t,r,i)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),i={};return w(t.get("type",!0),function(a){r[a]&&(i[a]=r[a])}),i},e.prototype.onclick=function(t,r,i){var a=this._brushType,o=this._brushMode;i==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:Ac.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})(xt);function kp(n){n.registerComponentView(Tc),n.registerComponentModel(Mc),n.registerPreprocessor(dc),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,Sc),n.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),n.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Xe),n.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Xe),re("brush",Dc)}var Ic=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:M.size.m,backgroundColor:M.color.transparent,borderColor:M.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:M.color.primary},subtextStyle:{fontSize:12,color:M.color.quaternary}},e})(Q),Lc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=K(t.get("textBaseline"),t.get("textVerticalAlign")),h=new Z({style:nt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=h.getBoundingRect(),v=t.get("subtext"),p=new Z({style:nt(s,{text:v,fill:s.getTextColor(),y:c.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),f=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);h.silent=!f&&!g,p.silent=!d&&!g,f&&h.on("click",function(){qn(f,"_"+t.get("target"))}),d&&p.on("click",function(){qn(d,"_"+t.get("subtarget"))}),$(h).eventData=$(p).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(h),v&&a.add(p);var y=a.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var x=kt(t,i),S=ft(m,x.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),a.x=S.x,a.y=S.y,a.markRedraw();var _={align:l,verticalAlign:u};h.setStyle(_),p.setStyle(_),y=a.getBoundingRect();var b=S.margin,C=t.getItemStyle(["color","opacity"]);C.fill=t.get("backgroundColor");var T=new et({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:t.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});a.add(T)}},e.type="title",e})(at);function Pp(n){n.registerComponentModel(Ic),n.registerComponentView(Lc)}var ga=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){n.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var r=this._data.count();this.option.loop?t=(t%r+r)%r:(t>=r&&(t=r-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,r=t.data||[],i=t.axisType,a=this._names=[],o;i==="category"?(o=[],w(r,function(u,h){var c=xe($s(u),""),v;ct(u)?(v=H(u),v.value=h):v=h,o.push(v),a.push(c)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new $t([{name:"value",type:s}],this);l.initData(o,a)},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:M.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:M.color.secondary},data:[]},e})(Q),Ko=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=ue(ga.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:M.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:M.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:M.color.tertiary},itemStyle:{color:M.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:M.color.accent50,borderColor:M.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:M.color.accent50,borderColor:M.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:M.color.accent60},itemStyle:{color:M.color.accent60,borderColor:M.color.accent60},controlStyle:{color:M.color.accent70,borderColor:M.color.accent70}},progress:{lineStyle:{color:M.color.accent30},itemStyle:{color:M.color.accent40}},data:[]}),e})(ga);sr(Ko,xn.prototype);var kc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(at),Pc=(function(n){D(e,n);function e(t,r,i,a){var o=n.call(this,t,r,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(Nt),kr=Math.PI,ya=dt(),Rc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.api=r},e.prototype.render=function(t,r,i){if(this.model=t,this.api=i,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return _e("nameValue",{noName:!0,value:h})},w(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,t)},this),this._renderAxisLabel(a,s,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,r){var i=t.get(["label","position"]),a=t.get("orient"),o=zc(t,r),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<r.getHeight()/2?"-":"+":o.x+o.width/2<r.getWidth()/2?"+":"-":E(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:kr/2},c=a==="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*kr/180;var m,x,S,_=v.get("position",!0),b=p&&v.get("showPlayBtn",!0),C=p&&v.get("showPrevBtn",!0),T=p&&v.get("showNextBtn",!0),A=0,I=c;_==="left"||_==="bottom"?(b&&(m=[0,0],A+=g),C&&(x=[A,0],A+=g),T&&(S=[I-f,0],I-=g)):(b&&(m=[I-f,0],I-=g),C&&(x=[0,0],A+=g),T&&(S=[I-f,0],I-=g));var k=[A,I];return t.get("inverse")&&k.reverse(),{viewRect:o,mainLength:c,orient:a,rotation:h[a],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:m,prevBtnPosition:x,nextBtnPosition:S,axisExtent:k,controlSize:f,controlGap:d}},e.prototype._position=function(t,r){var i=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=cn(),l=o.x,u=o.y+o.height;Ye(s,s,[-l,-u]),un(s,s,-kr/2),Ye(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=m(o),c=m(i.getBoundingRect()),v=m(a.getBoundingRect()),p=[i.x,i.y],f=[a.x,a.y];f[0]=p[0]=h[0][0];var d=t.labelPosOpt;if(d==null||E(d)){var g=d==="+"?0:1;x(p,c,h,1,g),x(f,v,h,1,1-g)}else{var g=d>=0?0:1;x(p,c,h,1,g),f[1]=p[1]+d}i.setPosition(p),a.setPosition(f),i.rotation=a.rotation=t.rotation,y(i),y(a);function y(S){S.originX=h[0][0]-S.x,S.originY=h[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function x(S,_,b,C,T){S[C]+=b[C][T]-_[C][T]}},e.prototype._createAxis=function(t,r){var i=r.getData(),a=r.get("axisType"),o=Oc(r,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Pc("value",o,t.axisExtent,a);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new ot;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Rt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:W({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new Rt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:q({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],w(l,function(u){var h=i.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:R(o._changeTimeline,o,u.value)},g=ma(c,v,r,d);g.ensureState("emphasis").style=p.getItemStyle(),g.ensureState("progress").style=f.getItemStyle(),ie(g);var y=$(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,r,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],w(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=i.dataToCoord(h.tickValue),y=new Z({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:R(o._changeTimeline,o,c),silent:!1,style:nt(p,{text:h.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=nt(f),y.ensureState("progress").style=nt(d),r.add(y),ie(y),ya(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,r,i,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),h=a.getPlayState(),c=a.get("inverse",!0);v(t.nextBtnPosition,"next",R(this._changeTimeline,this,c?"-":"+")),v(t.prevBtnPosition,"prev",R(this._changeTimeline,this,c?"+":"-")),v(t.playPosition,h?"stop":"play",R(this._handlePlayClick,this,!h),!0);function v(p,f,d,g){if(p){var y=Wr(K(a.get(["controlStyle",f+"BtnSize"]),o),o),m=[0,-y/2,y,y],x=Vc(a,f+"Icon",m,{x:p[0],y:p[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});x.ensureState("emphasis").style=u,r.add(x),ie(x)}}},e.prototype._renderCurrentPointer=function(t,r,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(c){c.draggable=!0,c.drift=R(u._handlePointerDrag,u),c.ondragend=R(u._handlePointerDragend,u),xa(c,u._progressLine,s,i,a,!0)},onUpdate:function(c){xa(c,u._progressLine,s,i,a)}};this._currentPointer=ma(l,l,this._mainGroup,{},this._currentPointer,h)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,r,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var i=this._toAxisCoord(t)[0],a=this._axis,o=wt(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),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 zt(t,r,!0)},e.prototype._findNearestTick=function(t){var r=this.model.getData(),i=1/0,a,o=this._axis;return r.each(["value"],function(s,l){var u=o.dataToCoord(s),h=Math.abs(u-t);h<i&&(i=h,a=l)}),a},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,i=this._tickLabels;if(r)for(var a=0;a<r.length;a++)r&&r[a]&&r[a].toggleState("progress",a<t);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",ya(i[a]).dataIndex<=t)},e.type="timeline.slider",e})(kc);function Oc(n,e){if(e=e||n.get("type"),e)switch(e){case"category":return new Fr({ordinalMeta:n.getCategories(),extent:[1/0,-1/0]});case"time":return new Ys({locale:n.ecModel.getLocaleModel(),useUTC:n.ecModel.get("useUTC")});default:return new Us}}function zc(n,e){return ft(n.getBoxLayoutParams(),kt(n,e).refContainer,n.get("padding"))}function Vc(n,e,t,r){var i=r.style,a=ur(n.get(["controlStyle",e]),r||{},new Lt(t[0],t[1],t[2],t[3]));return i&&a.setStyle(i),a}function ma(n,e,t,r,i,a){var o=e.get("color");if(i)i.setColor(o),t.add(i),a&&a.onUpdate(i);else{var s=n.get("symbol");i=Xt(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),t.add(i),a&&a.onCreate(i)}var l=e.getItemStyle(["color"]);i.setStyle(l),r=rt({rectHover:!0,z2:100},r,!0);var u=Xs(n.get("symbolSize"));r.scaleX=u[0]/2,r.scaleY=u[1]/2;var h=Ks(n.get("symbolOffset"),u);h&&(r.x=(r.x||0)+h[0],r.y=(r.y||0)+h[1]);var c=n.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,i.attr(r),i.updateTransform(),i}function xa(n,e,t,r,i,a){if(!n.dragging){var o=i.getModel("checkpointStyle"),s=r.dataToCoord(i.getData().get("value",t));if(a||!o.get("animation",!0))n.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};n.stopAnimation(null,!0),n.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function Bc(n){n.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,r){var i=t.getComponent("timeline");return i&&e.currentIndex!=null&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),r.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),q({currentIndex:i.option.currentIndex},e)}),n.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var r=t.getComponent("timeline");r&&e.playState!=null&&r.setPlayState(e.playState)})}function Ec(n){var e=n&&n.timeline;O(e)||(e=e?[e]:[]),w(e,function(t){t&&Nc(t)})}function Nc(n){var e=n.type,t={number:"value",time:"time"};if(t[e]&&(n.axisType=t[e],delete n.type),Sa(n),Wt(n,"controlPosition")){var r=n.controlStyle||(n.controlStyle={});Wt(r,"position")||(r.position=n.controlPosition),r.position==="none"&&!Wt(r,"show")&&(r.show=!1,delete r.position),delete n.controlPosition}w(n.data||[],function(i){ct(i)&&!O(i)&&(!Wt(i,"value")&&Wt(i,"name")&&(i.value=i.name),Sa(i))})}function Sa(n){var e=n.itemStyle||(n.itemStyle={}),t=e.emphasis||(e.emphasis={}),r=n.label||n.label||{},i=r.normal||(r.normal={}),a={normal:1,emphasis:1};w(r,function(o,s){!a[s]&&!Wt(i,s)&&(i[s]=o)}),t.label&&!Wt(r,"emphasis")&&(r.emphasis=t.label,delete t.label)}function Wt(n,e){return n.hasOwnProperty(e)}function Rp(n){n.registerComponentModel(Ko),n.registerComponentView(Rc),n.registerSubTypeDefaulter("timeline",function(){return"slider"}),Bc(n),n.registerPreprocessor(Ec)}function Vn(n,e){if(!n)return!1;for(var t=O(n)?n:[n],r=0;r<t.length;r++)if(t[r]&&t[r][e])return!0;return!1}function Ve(n){qs(n,"label",["show"])}var Be=dt(),Ct=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t.preventAutoZ=!0,t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(st.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,i,a){var o=this.mainType;i||r.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Be(s)[o];if(!l||!l.data){Be(s)[o]=null;return}u?u._mergeOption(l,r,!0):(a&&Ve(l),w(l.data,function(h){h instanceof Array?(Ve(h[0]),Ve(h[1])):Ve(h)}),u=this.createMarkerModelFromSeries(l,this,r),W(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Be(s)[o]=u},this)},e.prototype.formatTooltip=function(t,r,i){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return _e("section",{header:this.name,blocks:[_e("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 i=xn.prototype.getDataParams.call(this,t,r),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},e.getMarkerModelFromSeries=function(t,r){return Be(t)[r]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(Q);sr(Ct,xn.prototype);var Gc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},e.type="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})(Ct);function nn(n){return!(isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y)))}function Hc(n){return!isNaN(parseFloat(n.x))&&!isNaN(parseFloat(n.y))}function Ee(n,e,t,r,i,a,o){var s=[],l=no(e,i),u=l?e.getCalculationInfo("stackResultDimension"):i,h=nr(e,u,n),c=e.hostModel,v=c.indicesOfNearest(t,u,h)[0];s[a]=e.get(r,v),s[o]=e.get(u,v);var p=e.get(i,v),f=js(e.get(i,v));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,p]}var Ne={min:N(Ee,"min"),max:N(Ee,"max"),average:N(Ee,"average"),median:N(Ee,"median")};function we(n,e){if(e){var t=n.getData(),r=n.coordinateSystem,i=r&&r.dimensions;if(!Hc(e)&&!O(e.coord)&&O(i)){var a=qo(e,t,r,n);if(e=H(e),e.type&&Ne[e.type]&&a.baseAxis&&a.valueAxis){var o=vt(i,a.baseAxis.dim),s=vt(i,a.valueAxis.dim),l=Ne[e.type](t,a.valueAxis.dim,a.baseDataDim,a.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||!O(i)){e.coord=[];var u=n.getBaseAxis();if(u&&e.type&&Ne[e.type]){var h=r.getOtherAxis(u);h&&(e.value=nr(t,t.mapDimension(h.dim),e.type))}}else for(var c=e.coord,v=0;v<2;v++)Ne[c[v]]&&(c[v]=nr(t,t.mapDimension(i[v]),c[v]));return e}}function qo(n,e,t,r){var i={};return n.valueIndex!=null||n.valueDim!=null?(i.valueDataDim=n.valueIndex!=null?e.getDimension(n.valueIndex):n.valueDim,i.valueAxis=t.getAxis(Wc(r,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function Wc(n,e){var t=n.getData().getDimensionInfo(e);return t&&t.coordDim}function Ce(n,e){return n&&n.containData&&e.coord&&!nn(e)?n.containData(e.coord):!0}function Zc(n,e,t){return n&&n.containZone&&e.coord&&t.coord&&!nn(e)&&!nn(t)?n.containZone(e.coord,t.coord):!0}function jo(n,e){return n?function(t,r,i,a){var o=a<2?t.coord&&t.coord[a]:t.value;return je(o,e[a])}:function(t,r,i,a){return je(t.value,e[a])}}function nr(n,e,t){if(t==="average"){var r=0,i=0;return n.each(e,function(a,o){isNaN(a)||(r+=a,i++)}),r/i}else return t==="median"?n.getMedian(e):n.getDataExtent(e)[t==="max"?1:0]}var Pr=dt(),Bn=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=it()},e.prototype.render=function(t,r,i){var a=this,o=this.markerGroupMap;o.each(function(s){Pr(s).keep=!1}),r.eachSeries(function(s){var l=Ct.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,r,i)}),o.each(function(s){!Pr(s).keep&&a.group.remove(s.group)}),Fc(r,o,this.type)},e.prototype.markKeep=function(t){Pr(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var i=this;w(t,function(a){var o=Ct.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?Qs(l):Js(l))})}})},e.type="marker",e})(at);function Fc(n,e,t){n.eachSeries(function(r){var i=Ct.getMarkerModelFromSeries(r,t),a=e.get(r.id);if(i&&a&&a.group){var o=go(i),s=o.z,l=o.zlevel;yo(a.group,s,l)}})}function _a(n,e,t){var r=e.coordinateSystem,i=t.getWidth(),a=t.getHeight(),o=r&&r.getArea&&r.getArea();n.each(function(s){var l=n.getItemModel(s),u=l.get("relativeTo")==="coordinate",h=u?o?o.width:0:i,c=u?o?o.height:0:a,v=u&&o?o.x:0,p=u&&o?o.y:0,f,d=U(l.get("x"),h)+v,g=U(l.get("y"),c)+p;if(!isNaN(d)&&!isNaN(g))f=[d,g];else if(e.getMarkerPosition)f=e.getMarkerPosition(n.getValues(n.dimensions,s));else if(r){var y=n.get(r.dimensions[0],s),m=n.get(r.dimensions[1],s);f=r.dataToPoint([y,m])}isNaN(d)||(f[0]=d),isNaN(g)||(f[1]=g),n.setItemLayout(s,f)})}var $c=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(a){var o=Ct.getMarkerModelFromSeries(a,"markPoint");o&&(_a(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Rl),c=Uc(o,t,r);r.setData(c),_a(r.getData(),t,a),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"),m=p.getShallow("symbolKeepAspect");if(F(f)||F(d)||F(g)||F(y)){var x=r.getRawValue(v),S=r.getDataParams(v);F(f)&&(f=f(x,S)),F(d)&&(d=d(x,S)),F(g)&&(g=g(x,S)),F(y)&&(y=y(x,S))}var _=p.getModel("itemStyle").getItemStyle(),b=p.get("z2"),C=vr(l,"color");_.fill||(_.fill=C),c.setItemVisual(v,{z2:K(b,0),symbol:f,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:_})}),h.updateData(c),this.group.add(h.group),c.eachItemGraphicEl(function(v){v.traverse(function(p){$(p).dataModel=r})}),this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e})(Bn);function Uc(n,e,t){var r;n?r=V(n&&n.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return W(W({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new $t(r,t),a=V(t.get("data"),N(we,e));n&&(a=Et(a,N(Ce,n)));var o=jo(!!n,r);return i.initData(a,null,o),i}function Op(n){n.registerComponentModel(Gc),n.registerComponentView($c),n.registerPreprocessor(function(e){Vn(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Yc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e})(Ct),Ge=dt(),Xc=function(n,e,t,r){var i=n.getData(),a;if(O(r))a=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=Zt(r.yAxis,r.xAxis);else{var u=qo(r,i,e,n);s=u.valueAxis;var h=tl(i,u.valueDataDim);l=nr(i,h,o)}var c=s.dim==="x"?0:1,v=1-c,p=H(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&&lr(l)&&(l=+l.toFixed(Math.min(d,20))),p.coord[c]=f.coord[c]=l,a=[p,f,{type:o,valueIndex:r.valueIndex,value:l}]}else a=[]}var g=[we(n,a[0]),we(n,a[1]),W({},a[2])];return g[2].type=g[2].type||null,rt(g[2],g[0]),rt(g[2],g[1]),g};function ir(n){return!isNaN(n)&&!isFinite(n)}function ba(n,e,t,r){var i=1-n,a=r.dimensions[n];return ir(e[i])&&ir(t[i])&&e[n]===t[n]&&r.getAxis(a).containData(e[n])}function Kc(n,e){if(n.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(ba(1,t,r,n)||ba(0,t,r,n)))return!0}return Ce(n,e[0])&&Ce(n,e[1])}function Rr(n,e,t,r,i){var a=r.coordinateSystem,o=n.getItemModel(e),s,l=U(o.get("x"),i.getWidth()),u=U(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(n.getValues(n.dimensions,e));else{var h=a.dimensions,c=n.get(h[0],e),v=n.get(h[1],e);s=a.dataToPoint([c,v])}if(Sn(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y"),h=a.dimensions;ir(n.get(h[0],e))?s[0]=p.toGlobalCoord(p.getExtent()[t?0:1]):ir(n.get(h[1],e))&&(s[1]=f.toGlobalCoord(f.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}n.setItemLayout(e,s)}var qc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(a){var o=Ct.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Ge(o).from,u=Ge(o).to;l.each(function(h){Rr(l,h,!0,a,i),Rr(u,h,!1,a,i)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,r,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Ol);this.group.add(h.group);var c=jc(o,t,r),v=c.from,p=c.to,f=c.line;Ge(r).from=v,Ge(r).to=p,r.setData(f);var d=r.get("symbol"),g=r.get("symbolSize"),y=r.get("symbolRotate"),m=r.get("symbolOffset");O(d)||(d=[d,d]),O(g)||(g=[g,g]),O(y)||(y=[y,y]),O(m)||(m=[m,m]),c.from.each(function(S){x(v,S,!0),x(p,S,!1)}),f.each(function(S){var _=f.getItemModel(S),b=_.getModel("lineStyle").getLineStyle();f.setItemLayout(S,[v.getItemLayout(S),p.getItemLayout(S)]);var C=_.get("z2");b.stroke==null&&(b.stroke=v.getItemVisual(S,"style").fill),f.setItemVisual(S,{z2:K(C,0),fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.getItemVisual(S,"symbol"),toSymbolKeepAspect:p.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(S,"symbolOffset"),toSymbolRotate:p.getItemVisual(S,"symbolRotate"),toSymbolSize:p.getItemVisual(S,"symbolSize"),toSymbol:p.getItemVisual(S,"symbol"),style:b})}),h.updateData(f),c.line.eachItemGraphicEl(function(S){$(S).dataModel=r,S.traverse(function(_){$(_).dataModel=r})});function x(S,_,b){var C=S.getItemModel(_);Rr(S,_,b,t,a);var T=C.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=vr(l,"color")),S.setItemVisual(_,{symbolKeepAspect:C.get("symbolKeepAspect"),symbolOffset:K(C.get("symbolOffset",!0),m[b?0:1]),symbolRotate:K(C.get("symbolRotate",!0),y[b?0:1]),symbolSize:K(C.get("symbolSize"),g[b?0:1]),symbol:K(C.get("symbol",!0),d[b?0:1]),style:T})}this.markKeep(h),h.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e})(Bn);function jc(n,e,t){var r;n?r=V(n&&n.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return W(W({},h),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new $t(r,t),a=new $t(r,t),o=new $t([],t),s=V(t.get("data"),N(Xc,e,n,t));n&&(s=Et(s,N(Kc,n)));var l=jo(!!n,r);return i.initData(V(s,function(u){return u[0]}),null,l),a.initData(V(s,function(u){return u[1]}),null,l),o.initData(V(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function zp(n){n.registerComponentModel(Yc),n.registerComponentView(qc),n.registerPreprocessor(function(e){Vn(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Qc=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e})(Ct),He=dt(),Jc=function(n,e,t,r){var i=r[0],a=r[1];if(!(!i||!a)){var o=we(n,i),s=we(n,a),l=o.coord,u=s.coord;l[0]=Zt(l[0],-1/0),l[1]=Zt(l[1],-1/0),u[0]=Zt(u[0],1/0),u[1]=Zt(u[1],1/0);var h=fs([{},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 ar(n){return!isNaN(n)&&!isFinite(n)}function wa(n,e,t,r){var i=1-n;return ar(e[i])&&ar(t[i])}function tv(n,e){var t=e.coord[0],r=e.coord[1],i={coord:t,x:e.x0,y:e.y0},a={coord:r,x:e.x1,y:e.y1};return Sn(n,"cartesian2d")?t&&r&&(wa(1,t,r)||wa(0,t,r))?!0:Zc(n,i,a):Ce(n,i)||Ce(n,a)}function Ca(n,e,t,r,i){var a=r.coordinateSystem,o=n.getItemModel(e),s,l=U(o.get(t[0]),i.getWidth()),u=U(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition){var h=n.getValues(["x0","y0"],e),c=n.getValues(["x1","y1"],e),v=a.clampData(h),p=a.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=n.get(t[0],e),g=n.get(t[1],e),y=[d,g];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(Sn(a,"cartesian2d")){var m=a.getAxis("x"),x=a.getAxis("y"),d=n.get(t[0],e),g=n.get(t[1],e);ar(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):ar(g)&&(s[1]=x.toGlobalCoord(x.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Ta=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],ev=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(a){var o=Ct.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=V(Ta,function(c){return Ca(s,l,c,a,i)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new ot});this.group.add(h.group),this.markKeep(h);var c=rv(o,t,r);r.setData(c),c.each(function(v){var p=V(Ta,function(I){return Ca(c,v,I,t,a)}),f=o.getAxis("x").scale,d=o.getAxis("y").scale,g=f.getExtent(),y=d.getExtent(),m=[f.parse(c.get("x0",v)),f.parse(c.get("x1",v))],x=[d.parse(c.get("y0",v)),d.parse(c.get("y1",v))];wt(m),wt(x);var S=!(g[0]>m[1]||g[1]<m[0]||y[0]>x[1]||y[1]<x[0]),_=!S;c.setItemLayout(v,{points:p,allClipped:_});var b=c.getItemModel(v),C=b.getModel("itemStyle").getItemStyle(),T=b.get("z2"),A=vr(l,"color");C.fill||(C.fill=A,E(C.fill)&&(C.fill=Wn(C.fill,.4))),C.stroke||(C.stroke=A),c.setItemVisual(v,"style",C),c.setItemVisual(v,"z2",K(T,0))}),c.diff(He(h).data).add(function(v){var p=c.getItemLayout(v),f=c.getItemVisual(v,"z2");if(!p.allClipped){var d=new Qe({z2:K(f,0),shape:{points:p.points}});c.setItemGraphicEl(v,d),h.group.add(d)}}).update(function(v,p){var f=He(h).data.getItemGraphicEl(p),d=c.getItemLayout(v),g=c.getItemVisual(v,"z2");d.allClipped?f&&h.group.remove(f):(f?hr(f,{z2:K(g,0),shape:{points:d.points}},r,v):f=new Qe({shape:{points:d.points}}),c.setItemGraphicEl(v,f),h.group.add(f))}).remove(function(v){var p=He(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")),gn(v,el(f),{labelFetcher:r,labelDataIndex:p,defaultText:c.getName(p)||"",inheritColor:E(d.fill)?Wn(d.fill,1):M.color.neutral99}),rl(v,f),nl(v,null,null,f.get(["emphasis","disabled"])),$(v).dataModel=r}),He(h).data=c,h.group.silent=r.get("silent")||t.get("silent")},e.type="markArea",e})(Bn);function rv(n,e,t){var r,i,a=["x0","y0","x1","y1"];if(n){var o=V(n&&n.dimensions,function(u){var h=e.getData(),c=h.getDimensionInfo(h.mapDimension(u))||{};return W(W({},c),{name:u,ordinalMeta:null})});i=V(a,function(u,h){return{name:u,type:o[h%2].type}}),r=new $t(i,t)}else i=[{name:"value",type:"float"}],r=new $t(i,t);var s=V(t.get("data"),N(Jc,e,n,t));n&&(s=Et(s,N(tv,n)));var l=n?function(u,h,c,v){var p=u.coord[Math.floor(v/2)][v%2];return je(p,i[v])}:function(u,h,c,v){return je(u.value,i[v])};return r.initData(s,null,l),r.hasItemOption=!0,r}function Vp(n){n.registerComponentModel(Qc),n.registerComponentView(ev),n.registerPreprocessor(function(e){Vn(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var nv=function(n,e){if(e==="all")return{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:n.getLocaleModel().get(["legend","selector","inverse"])}},an=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,r){n.prototype.mergeOption.call(this,t,r),this._updateSelector(t)},e.prototype._updateSelector=function(t){var r=t.selector,i=this.ecModel;r===!0&&(r=t.selector=["all","inverse"]),O(r)&&w(r,function(a,o){E(a)&&(a={type:a}),r[o]=rt(a,nv(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var r=!1,i=0;i<t.length;i++){var a=t[i].get("name");if(this.isSelected(a)){this.select(a),r=!0;break}}!r&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var r=[],i=[];t.eachRawSeries(function(l){var u=l.name;i.push(u);var h;if(l.legendVisualProvider){var c=l.legendVisualProvider,v=c.getAllNames();t.isSeriesFiltered(l)||(i=i.concat(v)),v.length?r=r.concat(v):h=!0}else h=!0;h&&il(l)&&r.push(l.name)}),this._availableNames=i;var a=this.get("data")||r,o=it(),s=V(a,function(l){return(E(l)||lr(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new tt(l,this,this.ecModel))},this);this._data=Et(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var r=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;w(a,function(o){r[o.get("name")]=!1})}r[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var r=this.option.selected;r.hasOwnProperty(t)||(r[t]=!0),this[r[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,r=this.option.selected;w(t,function(i){r[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,r=this.option.selected;w(t,function(i){var a=i.get("name",!0);r.hasOwnProperty(a)||(r[a]=!0),r[a]=!r[a]})},e.prototype.isSelected=function(t){var r=this.option.selected;return!(r.hasOwnProperty(t)&&!r[t])&&vt(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:M.size.m,align:"auto",backgroundColor:M.color.transparent,borderColor:M.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:M.color.disabled,inactiveBorderColor:M.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:M.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:M.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:M.color.tertiary,borderWidth:1,borderColor:M.color.border},emphasis:{selectorLabel:{show:!0,color:M.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(Q),Jt=N,on=w,We=ot,Qo=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new We),this.group.add(this._selectorGroup=new We),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,r,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,r,i,l,s,u);var h=kt(t,i).refContainer,c=t.getBoxLayoutParams(),v=t.get("padding"),p=ft(c,h,v),f=this.layoutInner(t,o,p,a,l,u),d=ft(q({width:f.width,height:f.height},c),h,v);this.group.x=d.x-f.x,this.group.y=d.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Go(f,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,r,i,a,o,s,l){var u=this.getContentGroup(),h=it(),c=r.get("selectedMode"),v=r.get("triggerEvent"),p=[];i.eachRawSeries(function(f){!f.get("legendHoverLink")&&p.push(f.id)}),on(r.getData(),function(f,d){var g=this,y=f.get("name");if(!this.newlineDisabled&&(y===""||y===`
21
+ `)){var m=new We;m.newline=!0,u.add(m);return}var x=i.getSeriesByName(y)[0];if(!h.get(y))if(x){var S=x.getData(),_=S.getVisual("legendLineStyle")||{},b=S.getVisual("legendIcon"),C=S.getVisual("style"),T=this._createItem(x,y,d,f,r,t,_,C,b,c,a);T.on("click",Jt(Ma,y,null,a,p)).on("mouseover",Jt(sn,x.name,null,a,p)).on("mouseout",Jt(ln,x.name,null,a,p)),i.ssr&&T.eachChild(function(A){var I=$(A);I.seriesIndex=x.seriesIndex,I.dataIndex=d,I.ssrType="legend"}),v&&T.eachChild(function(A){g.packEventData(A,r,x,d,y)}),h.set(y,!0)}else i.eachRawSeries(function(A){var I=this;if(!h.get(y)&&A.legendVisualProvider){var k=A.legendVisualProvider;if(!k.containName(y))return;var B=k.indexOfName(y),L=k.getItemVisual(B,"style"),z=k.getItemVisual(B,"legendIcon"),G=ds(L.fill);G&&G[3]===0&&(G[3]=.2,L=W(W({},L),{fill:gs(G,"rgba")}));var Y=this._createItem(A,y,d,f,r,t,{},L,z,c,a);Y.on("click",Jt(Ma,null,y,a,p)).on("mouseover",Jt(sn,null,y,a,p)).on("mouseout",Jt(ln,null,y,a,p)),i.ssr&&Y.eachChild(function(ut){var ht=$(ut);ht.seriesIndex=A.seriesIndex,ht.dataIndex=d,ht.ssrType="legend"}),v&&Y.eachChild(function(ut){I.packEventData(ut,r,A,d,y)}),h.set(y,!0)}},this)},this),o&&this._createSelector(o,r,a,s,l)},e.prototype.packEventData=function(t,r,i,a,o){var s={componentType:"legend",componentIndex:r.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};$(t).eventData=s},e.prototype._createSelector=function(t,r,i,a,o){var s=this.getSelectorGroup();on(t,function(u){var h=u.type,c=new Z({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect",legendId:r.id})}});s.add(c);var v=r.getModel("selectorLabel"),p=r.getModel(["emphasis","selectorLabel"]);gn(c,{normal:v,emphasis:p},{defaultText:u.title}),ie(c)})},e.prototype._createItem=function(t,r,i,a,o,s,l,u,h,c,v){var p=t.visualDrawType,f=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(r),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),x=a.get("icon");h=x||h||"roundRect";var S=iv(h,a,l,u,p,g,v),_=new We,b=a.getModel("textStyle");if(F(t.getLegendIcon)&&(!x||x==="inherit"))_.add(t.getLegendIcon({itemWidth:f,itemHeight:d,icon:h,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var C=x==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;_.add(av({itemWidth:f,itemHeight:d,icon:h,iconRotate:C,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?f+5:-5,A=s,I=o.get("formatter"),k=r;E(I)&&I?k=I.replace("{name}",r??""):F(I)&&(k=I(r));var B=g?b.getTextColor():a.get("inactiveColor");_.add(new Z({style:nt(b,{text:k,x:T,y:d/2,fill:B,align:A,verticalAlign:"middle"},{inheritColor:B})}));var L=new et({shape:_.getBoundingRect(),style:{fill:"transparent"}}),z=a.getModel("tooltip");return z.get("show")&&Me({el:L,componentModel:o,itemName:r,itemTooltipOption:z.option}),_.add(L),_.eachChild(function(G){G.silent=!0}),L.silent=!c,this.getContentGroup().add(_),ie(_),_.__legendDataIndex=i,_},e.prototype.layoutInner=function(t,r,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ft(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var h=l.getBoundingRect(),c=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){Ft("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),p=[-v.x,-v.y],f=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?p[d]+=h[g]+f:c[d]+=v[g]+f,p[1-d]+=h[y]/2-v[y]/2,u.x=p[0],u.y=p[1],l.x=c[0],l.y=c[1];var x={x:0,y:0};return x[g]=h[g]+f+v[g],x[y]=Math.max(h[y],v[y]),x[m]=Math.min(0,v[m]+p[1-d]),x}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(at);function iv(n,e,t,r,i,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),on(g,function(m,x){g[x]==="inherit"&&(g[x]=y[x])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=n.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?r.decal:al(c,o),u.fill==="inherit"&&(u.fill=r[i]),u.stroke==="inherit"&&(u.stroke=r[h]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?r:t).opacity),s(u,r);var v=e.getModel("lineStyle"),p=v.getLineStyle();if(s(p,t),u.fill==="auto"&&(u.fill=r.fill),u.stroke==="auto"&&(u.stroke=r.fill),p.stroke==="auto"&&(p.stroke=r.fill),!a){var f=e.get("inactiveBorderWidth"),d=u[h];u.lineWidth=f==="auto"?r.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=v.get("inactiveColor"),p.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}function av(n){var e=n.icon||"roundRect",t=Xt(e,0,0,n.itemWidth,n.itemHeight,n.itemStyle.fill,n.symbolKeepAspect);return t.setStyle(n.itemStyle),t.rotation=(n.iconRotate||0)*Math.PI/180,t.setOrigin([n.itemWidth/2,n.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=M.color.neutral00,t.style.lineWidth=2),t}function Ma(n,e,t,r){ln(n,e,t,r),t.dispatchAction({type:"legendToggleSelect",name:n??e}),sn(n,e,t,r)}function Jo(n){for(var e=n.getZr().storage.getDisplayList(),t,r=0,i=e.length;r<i&&!(t=e[r].states.emphasis);)r++;return t&&t.hoverLayer}function sn(n,e,t,r){Jo(t)||t.dispatchAction({type:"highlight",seriesName:n,name:e,excludeSeriesId:r})}function ln(n,e,t,r){Jo(t)||t.dispatchAction({type:"downplay",seriesName:n,name:e,excludeSeriesId:r})}function ov(n){var e=n.findComponents({mainType:"legend"});e&&e.length&&n.filterSeries(function(t){for(var r=0;r<e.length;r++)if(!e[r].isSelected(t.name))return!1;return!0})}function ge(n,e,t){var r=n==="allSelect"||n==="inverseSelect",i={},a=[];t.eachComponent({mainType:"legend",query:e},function(s){r?s[n]():s[n](e.name),Aa(s,i),a.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){w(i,function(l,u){s[l?"select":"unSelect"](u)}),Aa(s,o)}),r?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function Aa(n,e){var t=e||{};return w(n.getData(),function(r){var i=r.get("name");if(!(i===`
22
+ `||i==="")){var a=n.isSelected(i);oe(t,i)?t[i]=t[i]&&a:t[i]=a}}),t}function sv(n){n.registerAction("legendToggleSelect","legendselectchanged",N(ge,"toggleSelected")),n.registerAction("legendAllSelect","legendselectall",N(ge,"allSelect")),n.registerAction("legendInverseSelect","legendinverseselect",N(ge,"inverseSelect")),n.registerAction("legendSelect","legendselected",N(ge,"select")),n.registerAction("legendUnSelect","legendunselected",N(ge,"unSelect"))}function ts(n){n.registerComponentModel(an),n.registerComponentView(Qo),n.registerProcessor(n.PRIORITY.PROCESSOR.SERIES_FILTER,ov),n.registerSubTypeDefaulter("legend",function(){return"plain"}),sv(n)}var lv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,r,i){var a=pn(t);n.prototype.init.call(this,t,r,i),Da(this,t,a)},e.prototype.mergeOption=function(t,r){n.prototype.mergeOption.call(this,t,r),Da(this,this.option,t)},e.type="legend.scroll",e.defaultOption=ue(an.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:M.color.accent50,pageIconInactiveColor:M.color.accent10,pageIconSize:15,pageTextStyle:{color:M.color.tertiary},animationDurationUpdate:800}),e})(an);function Da(n,e,t){var r=n.getOrient(),i=[1,1];i[r.index]=0,fn(e,t,{type:"box",ignoreSize:!!i})}var Ia=ot,Or=["width","height"],zr=["x","y"],uv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){n.prototype.init.call(this),this.group.add(this._containerGroup=new Ia),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Ia)},e.prototype.resetInner=function(){n.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,r,i,a,o,s,l){var u=this;n.prototype.renderInner.call(this,t,r,i,a,o,s,l);var h=this._controllerGroup,c=r.get("pageIconSize",!0),v=O(c)?c:[c,c];f("pagePrev",0);var p=r.getModel("pageTextStyle");h.add(new Z({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),f("pageNext",1);function f(d,g){var y=d+"DataIndex",m=ur(r.get("pageIcons",!0)[r.getOrient().name][g],{onclick:R(u._pageGo,u,y,r,a)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});m.name=d,h.add(m)}},e.prototype.layoutInner=function(t,r,i,a,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,h=Or[u],c=zr[u],v=Or[1-u],p=zr[1-u];o&&Ft("horizontal",l,t.get("selectorItemGap",!0));var f=t.get("selectorButtonGap",!0),d=l.getBoundingRect(),g=[-d.x,-d.y],y=H(i);o&&(y[h]=i[h]-d[h]-f);var m=this._layoutContentAndController(t,a,y,u,h,v,p,c);if(o){if(s==="end")g[u]+=m[h]+f;else{var x=d[h]+f;g[u]-=x,m[c]-=x}m[h]+=d[h]+f,g[1-u]+=m[p]+m[v]/2-d[v]/2,m[v]=Math.max(m[v],d[v]),m[p]=Math.min(m[p],d[p]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,r,i,a,o,s,l,u){var h=this.getContentGroup(),c=this._containerGroup,v=this._controllerGroup;Ft(t.get("orient"),h,t.get("itemGap"),a?i.width:null,a?null:i.height),Ft("horizontal",v,t.get("pageButtonItemGap",!0));var p=h.getBoundingRect(),f=v.getBoundingRect(),d=this._showController=p[o]>i[o],g=[-p.x,-p.y];r||(g[a]=h[u]);var y=[0,0],m=[-f.x,-f.y],x=K(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.get("pageButtonPosition",!0);S==="end"?m[a]+=i[o]-f[o]:y[a]+=f[o]+x}m[1-a]+=p[s]/2-f[s]/2,h.setPosition(g),c.setPosition(y),v.setPosition(m);var _={x:0,y:0};if(_[o]=d?i[o]:p[o],_[s]=Math.max(p[s],f[s]),_[l]=Math.min(0,f[l]+m[1-a]),c.__rectSize=i[o],d){var b={x:0,y:0};b[o]=Math.max(i[o]-f[o]-x,0),b[s]=_[s],c.setClipPath(new et({shape:b})),c.__rectSize=b[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(t);return C.pageIndex!=null&&hr(h,{x:C.contentPosition[0],y:C.contentPosition[1]},d?t:null),this._updatePageInfoView(t,C),_},e.prototype._pageGo=function(t,r,i){var a=this._getPageInfo(r)[t];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:r.id})},e.prototype._updatePageInfoView=function(t,r){var i=this._controllerGroup;w(["pagePrev","pageNext"],function(h){var c=h+"DataIndex",v=r[c]!=null,p=i.childOfName(h);p&&(p.setStyle("fill",v?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),p.cursor=v?"pointer":"default")});var a=i.childOfName("pageText"),o=t.get("pageFormatter"),s=r.pageIndex,l=s!=null?s+1:0,u=r.pageCount;a&&o&&a.setStyle("text",E(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var r=t.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=Or[o],l=zr[o],u=this._findTargetItemIndex(r),h=i.children(),c=h[u],v=h.length,p=v?1:0,f={contentPosition:[i.x,i.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return f;var d=S(c);f.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,x=null;g<=v;++g)x=S(h[g]),(!x&&m.e>y.s+a||x&&!_(x,y.s))&&(m.i>y.i?y=m:y=x,y&&(f.pageNextDataIndex==null&&(f.pageNextDataIndex=y.i),++f.pageCount)),m=x;for(var g=u-1,y=d,m=d,x=null;g>=-1;--g)x=S(h[g]),(!x||!_(m,x.s))&&y.i<m.i&&(m=y,f.pagePrevDataIndex==null&&(f.pagePrevDataIndex=y.i),++f.pageCount,++f.pageIndex),y=x;return f;function S(b){if(b){var C=b.getBoundingRect(),T=C[l]+b[l];return{s:T,e:T+C[s],i:b.__legendDataIndex}}}function _(b,C){return b.e>=C&&b.s<=C+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var r,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(r=s)}),r??a},e.type="legend.scroll",e})(Qo);function hv(n){n.registerAction("legendScroll","legendscroll",function(e,t){var r=e.scrollDataIndex;r!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(r)})})}function cv(n){pt(ts),n.registerComponentModel(lv),n.registerComponentView(uv),hv(n)}function Bp(n){pt(ts),pt(cv)}var vv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=ue(be.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(be),En=dt();function pv(n,e,t){En(n).coordSysRecordMap.each(function(r){var i=r.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function fv(n,e){for(var t=En(n).coordSysRecordMap,r=t.keys(),i=0;i<r.length;i++){var a=r[i],o=t.get(a),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||es(t,o))}}}function es(n,e){if(e){n.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function dv(n,e){var t={model:e,containsPoint:N(yv,e),dispatchAction:N(gv,n),dataZoomInfoMap:null,controller:null},r=t.controller=new _o(n.getZr());return w(["pan","zoom","scrollMove"],function(i){r.on(i,function(a){var o=[];t.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,a);!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 gv(n,e){n.isDisposed()||n.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function yv(n,e,t,r){return n.coordinateSystem.containPoint([t,r])}function mv(n,e,t){var r,i="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return n.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;a[i+u]>a[i+r]&&(r=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function xv(n){n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,function(e,t){var r=En(t),i=r.coordSysRecordMap||(r.coordSysRecordMap=it());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=Bo(a);w(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,dv(t,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=it());h.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){es(i,a);return}var h=mv(l,a,t);o.enable(h.controlType,h.opt),Te(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Sv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,r,i){if(n.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),pv(i,t,{pan:R(Vr.pan,this),zoom:R(Vr.zoom,this),scrollMove:R(Vr.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),n.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){fv(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(Ln),Vr={zoom:function(n,e,t,r){var i=this.range,a=i.slice(),o=n.axisModels[0];if(o){var s=Br[e](null,[r.originX,r.originY],o,t,n),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/r.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Kt(0,a,[0,100],0,h.minSpan,h.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:La(function(n,e,t,r,i,a){var o=Br[r]([a.oldX,a.oldY],[a.newX,a.newY],e,i,t);return o.signal*(n[1]-n[0])*o.pixel/o.pixelLength}),scrollMove:La(function(n,e,t,r,i,a){var o=Br[r]([0,0],[a.scrollDelta,a.scrollDelta],e,i,t);return o.signal*(n[1]-n[0])*a.scrollDelta})};function La(n){return function(e,t,r,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=n(o,s,e,t,r,i);if(Kt(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var Br={grid:function(n,e,t,r,i){var a=t.axis,o={},s=i.model.coordinateSystem.getRect();return n=n||[0,0],a.dim==="x"?(o.pixel=e[0]-n[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-n[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(n,e,t,r,i){var a=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return n=n?s.pointToCoord(n):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-n[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-n[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(n,e,t,r,i){var a=t.axis,o=i.model.coordinateSystem.getRect(),s={};return n=n||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-n[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-n[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function _v(n){kn(n),n.registerComponentModel(vv),n.registerComponentView(Sv),xv(n)}var bv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ue(be.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:M.color.accent10,borderRadius:0,backgroundColor:M.color.transparent,dataBackground:{lineStyle:{color:M.color.accent30,width:.5},areaStyle:{color:M.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:M.color.accent40,width:.5},areaStyle:{color:M.color.accent20,opacity:.3}},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:M.color.neutral00,borderColor:M.color.accent20},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:M.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:M.color.tertiary},brushSelect:!0,brushStyle:{color:M.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:M.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(be),ye=et,wv=1,Er=30,Cv=7,me="horizontal",ka="vertical",Tv=5,Mv=["line","bar","candlestick","scatter"],Av={easing:"cubicOut",duration:100,delay:0},Dv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,r){this.api=r,this._onBrush=R(this._onBrush,this),this._onBrushEnd=R(this._onBrushEnd,this)},e.prototype.render=function(t,r,i,a){if(n.prototype.render.apply(this,arguments),Te(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}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),n.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Ke(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 ot;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(r),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,r=this.api,i=t.get("brushSelect"),a=i?Cv:0,o=kt(t,r).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===me?{right:o.width-s.x-s.width,top:o.height-Er-l-a,width:s.width,height:Er}:{right:l,top:s.y,width:Er,height:s.height},h=pn(t.option);w(["right","top","width","height"],function(v){h[v]==="ph"&&(h[v]=u[v])});var c=ft(h,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===ka&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,r=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===me&&!o?{scaleY:l?1:-1,scaleX:1}:i===me&&o?{scaleY:l?1:-1,scaleX:-1}:i===ka&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=r.x-u.x,t.y=r.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,r=this._size,i=this._displayables.sliderGroup,a=t.get("brushSelect");i.add(new ye({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new ye({shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:"transparent"},z2:0,onclick:R(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var r=this._size,i=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||r[0]!==i[0]||r[1]!==i[1]){var c=o.getDataExtent(t.thisDim),v=o.getDataExtent(l),p=(v[1]-v[0])*.3;v=[v[0]-p,v[1]+p];var f=[0,r[1]],d=[0,r[0]],g=[[r[0],0],[0,0]],y=[],m=d[1]/Math.max(1,o.count()-1),x=r[0]/(c[1]-c[0]),S=t.thisAxis.type==="time",_=-m,b=Math.round(o.count()/r[0]),C;o.each([t.thisDim,l],function(B,L,z){if(b>0&&z%b){S||(_+=m);return}_=S?(+B-c[0])*x:_+m;var G=L==null||isNaN(L)||L==="",Y=G?0:j(L,v,f,!0);G&&!C&&z?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!G&&C&&(g.push([_,0]),y.push([_,0])),G||(g.push([_,Y]),y.push([_,Y])),C=G}),u=this._shadowPolygonPts=g,h=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[r[0],r[1]];var T=this.dataZoomModel;function A(B){var L=T.getModel(B?"selectedDataBackground":"dataBackground"),z=new ot,G=new Qe({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),Y=new io({shape:{points:h},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return z.add(G),z.add(Y),z}for(var I=0;I<3;I++){var k=A(I===1);this._displayables.sliderGroup.add(k),this._displayables.dataShadowSegs.push(k)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,r=t.get("showDataShadow");if(r!==!1){var i,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!i&&!(r!==!0&&vt(Mv,u.get("type"))<0)){var h=a.getComponent(Ot(o),s).axis,c=Iv(o),v,p=u.coordinateSystem;c!=null&&p.getOtherAxis&&(v=p.getOtherAxis(h).inverse),c=u.getData().mapDimension(c);var f=u.getData().mapDimension(o);i={thisAxis:h,series:u,thisDim:f,otherDim:c,otherAxisInverse:v}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,r=this._displayables,i=r.handles=[null,null],a=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 ye({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new ye({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:wv,fill:M.color.transparent}})),w([0,1],function(x){var S=l.get("handleIcon");!ol[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var _=Xt(S,-1,0,2,2,null,!0);_.attr({cursor:Lv(this._orient),draggable:!0,drift:R(this._onDragMove,this,x),ondragend:R(this._onDragEnd,this),onmouseover:R(this._showDataInfo,this,!0),onmouseout:R(this._showDataInfo,this,!1),z2:5});var b=_.getBoundingRect(),C=l.get("handleSize");this._handleHeight=U(C,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,_.setStyle(l.getModel("handleStyle").getItemStyle()),_.style.strokeNoScale=!0,_.rectHover=!0,_.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ie(_);var T=l.get("handleColor");T!=null&&(_.style.fill=T),o.add(i[x]=_);var A=l.getModel("textStyle"),I=l.get("handleLabel")||{},k=I.show||!1;t.add(a[x]=new Z({silent:!0,invisible:!k,style:nt(A,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:A.getTextColor(),font:A.getFont()}),z2:10}))},this);var p=v;if(c){var f=U(l.get("moveHandleSize"),s[1]),d=r.moveHandle=new et({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=Xt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,M.color.neutral00,!0);y.silent=!0,y.y=s[1]+f/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(f,10));p=r.moveZone=new et({invisible:!0,shape:{y:s[1]-m,height:f+m}}),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:"default",drift:R(this._onDragMove,this,"all"),ondragstart:R(this._showDataInfo,this,!0),ondragend:R(this._onDragEnd,this),onmouseover:R(this._showDataInfo,this,!0),onmouseout:R(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),r=this._getViewExtent();this._handleEnds=[j(t[0],[0,100],r,!0),j(t[1],[0,100],r,!0)]},e.prototype._updateInterval=function(t,r){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Kt(r,a,o,i.get("zoomLock")?"all":t,s.minSpan!=null?j(s.minSpan,l,o,!0):null,s.maxSpan!=null?j(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=wt([j(a[0],o,l,!0),j(a[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(t){var r=this._displayables,i=this._handleEnds,a=wt(i.slice()),o=this._size;w([0,1],function(p){var f=r.handles[p],d=this._handleHeight;f.attr({scaleX:d/2,scaleY:d/2,x:i[p]+(p?-1:1),y:o[1]/2-d/2})},this),r.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[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,a[0],a[1],o[0]],h=0;h<l.length;h++){var c=l[h],v=c.getClipPath();v||(v=new et,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,i=this._displayables,a=i.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=wt(this._handleEnds.slice());p.call(this,0),p.call(this,1);function p(f){var d=Se(i.handles[f].parent,this.group),g=mo(f===0?"right":"left",d),y=this._handleWidth/2+Tv,m=zt([v[f]+(f===0?-y:y),this._size[1]/2],d);a[f].setStyle({x:m[0],y:m[1],verticalAlign:o===me?"middle":g,align:o===me?g:"center",text:s[f]})}},e.prototype._formatLabel=function(t,r){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.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 F(a)?a(t,s):E(a)?a.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var r=this.dataZoomModel.get("handleLabel")||{},i=r.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=t||this._dragging?o:i,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,i,a){this._dragging=!0,ae(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=zt([r,i],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,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>r[0]||i[1]<0||i[1]>r[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var r=t.offsetX,i=t.offsetY;this._brushStart=new mt(r,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var r=this._displayables.brushRect;if(this._brushing=!1,!!r){r.attr("ignore",!0);var i=r.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Kt(0,l,o,0,u.minSpan!=null?j(u.minSpan,s,o,!0):null,u.maxSpan!=null?j(u.maxSpan,s,o,!0):null),this._range=wt([j(l[0],o,s,!0),j(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ae(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,r){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new ye({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,r),h=l.transformCoordToLocal(s.x,s.y),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?Av:null,start:r[0],end:r[1]})},e.prototype._findCoordRect=function(){var t,r=Bo(this.dataZoomModel).infoList;if(!t&&r.length){var i=r[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(Ln);function Iv(n){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[n]}function Lv(n){return n==="vertical"?"ns-resize":"ew-resize"}function kv(n){n.registerComponentModel(bv),n.registerComponentView(Dv),kn(n)}function Ep(n){pt(_v),pt(kv)}var rs={get:function(n,e,t){var r=H((Pv[n]||{})[e]);return t&&O(r)?r[r.length-1]:r}},Pv={color:{active:["#006edd","#e0ffff"],inactive:[M.color.transparent]},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]}},Pa=lt.mapVisual,Rv=lt.eachVisual,Ov=O,Ra=w,zv=wt,Vv=j,or=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&Yo(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=R(t,this),this.controllerVisuals=en(this.option.controller,r,t),this.targetVisuals=en(this.option.target,r,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,r=this.option.seriesIndex;r==null&&t==null&&(r="all");var i=co(this.ecModel,"series",{index:r,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return V(i,function(a){return a.componentIndex})},e.prototype.eachTargetSeries=function(t,r){w(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&t.call(r,a)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(i){i===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],O(t)&&(t=t.slice(),u=!0);var h=r?t:u?[c(t[0]),c(t[1])]:c(t);if(E(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(F(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+h[1]:t[1]===s[1]?i[1]+" "+h[0]:h[0]+" - "+h[1];return h;function 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=zv([t.min,t.max]);this._dataExtent=r},e.prototype.getDataDimensionIndex=function(t){var r=this.option.dimension;if(r!=null)return t.getDimensionIndex(r);for(var i=t.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,r=this.option,i={inRange:r.inRange,outOfRange:r.outOfRange},a=r.target||(r.target={}),o=r.controller||(r.controller={});rt(a,i),rt(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),h.call(this,o);function l(c){Ov(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]={},Ra(f,function(g,y){if(lt.isValidType(y)){var m=rs.get(y,"inactive",s);m!=null&&(d[y]=m,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";Ra(this.stateList,function(y){var m=this.itemSize,x=c[y];x||(x=c[y]={color:s?f:[f]}),x.symbol==null&&(x.symbol=v&&H(v)||(s?g:[g])),x.symbolSize==null&&(x.symbolSize=p&&H(p)||(s?m[0]:[m[0],m[0]])),x.symbol=Pa(x.symbol,function(b){return b==="none"?g:b});var S=x.symbolSize;if(S!=null){var _=-1/0;Rv(S,function(b){b>_&&(_=b)}),x.symbolSize=Pa(S,function(b){return Vv(b,[0,_],[0,m[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,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:M.color.transparent,borderColor:M.color.borderTint,contentColor:M.color.theme[0],inactiveColor:M.color.disabled,borderWidth:0,padding:M.size.m,textGap:10,precision:0,textStyle:{color:M.color.secondary}},e})(Q),Oa=[20,140],Bv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,r){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){n.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=Oa[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Oa[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):O(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(){n.prototype.completeVisualOption.apply(this,arguments),w(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=wt((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,i=this.getExtent(),a=K(this.option.unboundedRange,!0);return(a&&r[0]<=i[0]||r[0]<=t)&&(a&&r[1]>=i[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),r.push({seriesId:i.id,dataIndex:a})},this),r},e.prototype.getVisualMeta=function(t){var r=za(this,"outOfRange",this.getExtent()),i=za(this,"inRange",this.option.range.slice()),a=[];function o(p,f){a.push({value:p,color:t(p,f)})}for(var s=0,l=0,u=i.length,h=r.length;l<h&&(!i.length||r[l]<=i[0]);l++)r[l]<i[s]&&o(r[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var c=1;l<h;l++)(!i.length||i[i.length-1]<r[l])&&(c&&(a.length&&o(a[a.length-1].value,"outOfRange"),c=0),o(r[l],"outOfRange"));var v=a.length;return{stops:a,outerColors:[v?a[0].color:"transparent",v?a[v-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=ue(or.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:M.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:M.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:M.color.shadow}}),e})(or);function za(n,e,t){if(t[0]===t[1])return t.slice();for(var r=200,i=(t[1]-t[0])/r,a=t[0],o=[],s=0;s<=r&&a<t[1];s++)o.push(a),a+=i;return o.push(t[1]),o}var ns=(function(n){D(e,n);function e(){var t=n!==null&&n.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,i,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,r,i,a)},e.prototype.renderBackground=function(t){var r=this.visualMapModel,i=cr(r.get("padding")||0),a=t.getBoundingRect();t.add(new et({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:r.get("backgroundColor"),stroke:r.get("borderColor"),lineWidth:r.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,r,i){i=i||{};var a=i.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[a||o.getValueState(t)],v=lt.prepareVisualTypes(c);return w(v,function(p){var f=c[p];i.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",f=c.__alphaForOpacity),lt.dependsOn(p,r)&&f&&f.applyVisual(t,u,h)}),s[r]},e.prototype.positionGroup=function(t){var r=this.visualMapModel,i=this.api,a=kt(r,i).refContainer;yn(t,r.getBoxLayoutParams(),a)},e.prototype.doRender=function(t,r,i,a){},e.type="visualMap",e})(at),Va=[["left","right","width"],["top","bottom","height"]];function is(n,e,t){var r=n.option,i=r.align;if(i!=null&&i!=="auto")return i;for(var a={width:e.getWidth(),height:e.getHeight()},o=r.orient==="horizontal"?1:0,s=Va[o],l=[0,null,10],u={},h=0;h<3;h++)u[Va[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=ft(u,a,r.padding);return s[(v.margin[c[2]]||0)+v[c[0]]+v[c[1]]*.5<a[c[1]]*.5?0:1]}function Ue(n,e){return w(n||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),n}var bt=j,Ev=w,Ba=Math.min,Nr=Math.max,Nv=12,Gv=6,Hv=(function(n){D(e,n);function e(){var t=n!==null&&n.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){n.prototype.init.call(this,t,r),this._hoverLinkFromSeriesMouseOver=R(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=R(this._hideIndicator,this)},e.prototype.doRender=function(t,r,i,a){(!a||a.type!=="selectDataRange"||a.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 i=t.get("text");this._renderEndsText(r,i,0),this._renderEndsText(r,i,1),this._updateView(!0),this.renderBackground(r),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(r)},e.prototype._renderEndsText=function(t,r,i){if(r){var a=r[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,h=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),c=this._applyTransform(i===0?"bottom":"top",u),v=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new Z({style:nt(p,{x:h[0],y:h[1],verticalAlign:p.get("verticalAlign")||(v==="horizontal"?"middle":c),align:p.get("align")||(v==="horizontal"?c:"center"),text:a})}))}},e.prototype._renderBar=function(t){var r=this.visualMapModel,i=this._shapes,a=r.itemSize,o=this._orient,s=this._useHandle,l=is(r,this.api,a),u=i.mainGroup=this._createBarGroup(l),h=new ot;u.add(h),h.add(i.outOfRange=Ea()),h.add(i.inRange=Ea(null,s?Ga(this._orient):null,R(this._dragHandle,this,"all",!1),R(this._dragHandle,this,"all",!0))),h.setClipPath(new et({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var c=r.textStyleModel.getTextRect("国"),v=Nr(c.width,c.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(r,u,0,a,v,o),this._createHandle(r,u,1,a,v,o)),this._createIndicator(r,u,a,v,o),t.add(u)},e.prototype._createHandle=function(t,r,i,a,o,s){var l=R(this._dragHandle,this,i,!1),u=R(this._dragHandle,this,i,!0),h=Wr(t.get("handleSize"),a[0]),c=Xt(t.get("handleIcon"),-h/2,-h/2,h,h,null,!0),v=Ga(this._orient);c.attr({cursor:v,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){ae(y.event)}}),c.x=a[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(),sl(c,!0),r.add(c);var p=this.visualMapModel.textStyleModel,f=new Z({cursor:v,draggable:!0,drift:l,onmousemove:function(y){ae(y.event)},ondragend:u,style:nt(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[i]=c,g.handleLabelPoints[i]=d,g.handleLabels[i]=f},e.prototype._createIndicator=function(t,r,i,a,o){var s=Wr(t.get("indicatorSize"),i[0]),l=Xt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ja){var h=l.style;l.useStyle(W({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 Z({silent:!0,invisible:!0,style:nt(c,{x:0,y:0,text:""})});this.group.add(v);var p=[(o==="horizontal"?a/2:Gv)+i[0]/2,0],f=this._shapes;f.indicator=l,f.indicatorLabel=v,f.indicatorLabelPoint=p,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,r,i,a){if(this._useHandle){if(this._dragging=!r,!r){var o=this._applyTransform([i,a],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():Na(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,r=this._dataInterval=t.getSelected(),i=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[bt(r[0],i,a,!0),bt(r[1],i,a,!0)]},e.prototype._updateInterval=function(t,r){r=r||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];Kt(r,a,o,t,0);var s=i.getExtent();this._dataInterval=[bt(a[0],o,s,!0),bt(a[1],o,s,!0)]},e.prototype._updateView=function(t){var r=this.visualMapModel,i=r.getExtent(),a=this._shapes,o=[0,r.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,r,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new ll(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,r){var i=100,a=[],o=(t[1]-t[0])/i;a.push({color:this.getControllerVisual(t[0],"color",r),offset:0});for(var s=1;s<i;s++){var l=t[0]+o*s;if(l>t[1])break;a.push({color:this.getControllerVisual(l,"color",r),offset:s/i})}return a.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),a},e.prototype._createBarPoints=function(t,r){var i=this.visualMapModel.itemSize;return[[i[0]-r[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,i=this.visualMapModel.get("inverse");return new ot(r==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),h=this._applyTransform("left",i.mainGroup);Ev([0,1],function(c){var v=o[c];v.setStyle("fill",r.handlesColor[c]),v.y=t[c];var p=bt(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=zt(i.handleLabelPoints[c],Se(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:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,i,a){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=bt(t,s,u,!0),g=l[0]-f/2,y={x:c.x,y:c.y};c.y=d,c.x=g;var m=zt(h.indicatorLabelPoint,Se(c,this.group)),x=h.indicatorLabel;x.attr("invisible",!1);var S=this._applyTransform("left",h.mainGroup),_=this._orient,b=_==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(r),verticalAlign:b?S:"middle",align:b?"center":S});var C={x:g,y:d,style:{fill:p}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var A={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(C,A),x.animateTo(T,A)}else c.attr(C),x.attr(T);this._firstShowIndicator=!1;var I=this._shapes.handleLabels;if(I)for(var k=0;k<I.length;k++)this.api.enterBlur(I[k])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(r){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,a=t._applyTransform([r.offsetX,r.offsetY],t._shapes.mainGroup,!0,!0);a[1]=Ba(Nr(0,a[1]),i[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[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 i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();t=Ba(Nr(o[0],t),o[1]);var l=Wv(i,s,o),u=[t-l,t+l],h=bt(t,o,s,!0),c=[bt(u[0],o,s,!0),bt(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||Na(i))&&(p=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var f=ul(v,p);this._dispatchHighDown("downplay",Ue(f[0],i)),this._dispatchHighDown("highlight",Ue(f[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r;if(ho(t.target,function(l){var u=$(l);if(u.dataIndex!=null)return r=u,!0},!0),!!r){var i=this.ecModel.getSeriesByIndex(r.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(r.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),r.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var r=this._shapes.handleLabels;if(r)for(var i=0;i<r.length;i++)this.api.leaveBlur(r[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Ue(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,i,a){var o=Se(r,a?null:this.group);return O(t)?zt(t,o,i):mo(t,o,i)},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})(ns);function Ea(n,e,t,r){return new Qe({shape:{points:n},draggable:!!t,cursor:e,drift:t,onmousemove:function(i){ae(i.event)},ondragend:r})}function Wv(n,e,t){var r=Nv/2,i=n.get("hoverLinkDataSize");return i&&(r=bt(i,e,t,!0)/2),r}function Na(n){var e=n.get("hoverLinkOnHandle");return!!(e??n.get("realtime"))}function Ga(n){return n==="vertical"?"ns-resize":"ew-resize"}var Zv={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Fv=function(n,e){e.eachComponent({mainType:"visualMap",query:n},function(t){t.setSelected(n.selected)})},$v=[{createOnAllSeries:!0,reset:function(n,e){var t=[];return e.eachComponent("visualMap",function(r){var i=n.pipelineContext;!r.isTargetSeries(n)||i&&i.large||t.push(mc(r.stateList,r.targetVisuals,R(r.getValueState,r),r.getDataDimensionIndex(n.getData())))}),t}},{createOnAllSeries:!0,reset:function(n,e){var t=n.getData(),r=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(n)){var a=i.getVisualMeta(R(Uv,null,n,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(t);o>=0&&(a.dimension=o,r.push(a))}}),n.getData().setVisual("visualMeta",r)}}];function Uv(n,e,t,r){for(var i=e.targetVisuals[r],a=lt.prepareVisualTypes(i),o={color:vr(n.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],h=i[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 Ha=w;function Yv(n){var e=n&&n.visualMap;O(e)||(e=e?[e]:[]),Ha(e,function(t){if(t){te(t,"splitList")&&!te(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var r=t.pieces;r&&O(r)&&Ha(r,function(i){ct(i)&&(te(i,"start")&&!te(i,"min")&&(i.min=i.start),te(i,"end")&&!te(i,"max")&&(i.max=i.end))})}})}function te(n,e){return n&&n.hasOwnProperty&&n.hasOwnProperty(e)}var Wa=!1;function as(n){Wa||(Wa=!0,n.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),n.registerAction(Zv,Fv),w($v,function(e){n.registerVisual(n.PRIORITY.VISUAL.COMPONENT,e)}),n.registerPreprocessor(Yv))}function Xv(n){n.registerComponentModel(Bv),n.registerComponentView(Hv),as(n)}var Kv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,r){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],qv[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=H(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=V(this._pieceList,function(l){return l=H(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},i=lt.listVisualTypes(),a=this.isCategory();w(t.pieces,function(s){w(i,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),w(r,function(s,l){var u=!1;w(this.stateList,function(h){u=u||o(t,h,l)||o(t.target,h,l)},this),!u&&w(this.stateList,function(h){(t[h]||(t[h]={}))[l]=rs.get(l,h==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}n.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,r){var i=this.option,a=this._pieceList,o=(r?i:t).selected||{};if(i.selected=o,w(a,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),i.selectedMode==="single"){var s=!1;w(a,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=H(t)},e.prototype.getValueState=function(t){var r=lt.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=lt.findPieceIndex(l,i);h===t&&o.push(u)},this),r.push({seriesId:a.id,dataIndex:o})},this),r},e.prototype.getRepresentValue=function(t){var r;if(this.isCategory())r=t.value;else if(t.value!=null)r=t.value;else{var i=t.interval||[];r=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],i=["",""],a=this;function o(h,c){var v=a.getRepresentValue({interval:h});c||(c=a.getValueState(v));var p=t(v,c);h[0]===-1/0?i[0]=p:h[1]===1/0?i[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 w(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:i}},e.type="visualMap.piecewise",e.defaultOption=ue(or.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})(or),qv={splitNumber:function(n){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&n.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var l=o===i-1?r[1]:s+a;n.push({interval:[s,l],close:[1,1]})}e.maxOpen&&n.push({interval:[r[1],1/0],close:[0,0]}),jn(n),w(n,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(n){var e=this.option;w(e.categories,function(t){n.push({text:this.formatValueText(t,!0),value:t})},this),Za(e,n)},pieces:function(n){var e=this.option;w(e.pieces,function(t,r){ct(t)||(t={value:t});var i={text:"",index:r};if(t.label!=null&&(i.text=t.label),t.hasOwnProperty("value")){var a=i.value=t.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.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]&&(i.value=o[0])}i.visual=lt.retrieveVisuals(t),n.push(i)},this),Za(e,n),jn(n),w(n,function(t){var r=t.close,i=[["<","≤"][r[1]],[">","≥"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function Za(n,e){var t=n.inverse;(n.orient==="vertical"?!t:t)&&e.reverse()}var jv=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var r=this.visualMapModel,i=r.get("textGap"),a=r.textStyleModel,o=this._getItemAlign(),s=r.itemSize,l=this._getViewData(),u=l.endsText,h=Zt(r.get("showLabel",!0),!u),c=!r.get("selectedMode");u&&this._renderEndsText(t,u[0],s,h,o),w(l.viewPieceList,function(v){var p=v.piece,f=new ot;f.onclick=R(this._onItemClick,this,p),this._enableHoverLink(f,v.indexInModelPieceList);var d=r.getRepresentValue(p);if(this._createItemSymbol(f,d,[0,0,s[0],s[1]],c),h){var g=this.visualMapModel.getValueState(d),y=a.get("align")||o;f.add(new Z({style:nt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:p.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:K(a.get("opacity"),g==="outOfRange"?.5:1)}),silent:c}))}t.add(f)},this),u&&this._renderEndsText(t,u[1],s,h,o),Ft(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var i=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Ue(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return is(t,this.api,t.itemSize);var i=r.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,r,i,a,o){if(r){var s=new ot,l=this.visualMapModel.textStyleModel;s.add(new Z({style:nt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:r})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=V(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?r.reverse():i&&(i=i.slice().reverse()),{viewPieceList:r,endsText:i}},e.prototype._createItemSymbol=function(t,r,i,a){var o=Xt(this.getControllerVisual(r,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(r,"color"));o.silent=a,t.add(o)},e.prototype._onItemClick=function(t){var r=this.visualMapModel,i=r.option,a=i.selectedMode;if(a){var o=H(i.selected),s=r.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,w(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})(ns);function Qv(n){n.registerComponentModel(Kv),n.registerComponentView(jv),as(n)}function Np(n){pt(Xv),pt(Qv)}var Jv=(function(){function n(e){this._thumbnailModel=e}return n.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},n.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:hl(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},n.prototype.updateWindow=function(e,t){var r=t.getViewOfComponentModel(this._thumbnailModel);r&&r.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},n})(),tp=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,r){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new Jv(this);if(this._target=null,this.ecModel.eachSeries(function(i){ri(i,null)}),this.shouldShow()){var r=this.getTarget();ri(r.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:M.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:M.color.neutral30,borderColor:M.color.neutral40,opacity:.3},z:10},e})(Q),ep=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){if(this._api=i,this._model=t,this._coordSys||(this._coordSys=new zl),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=r.get("backgroundColor")||M.color.neutral00);var l=kt(t,i).refContainer,u=ft(cl(t,!0),l),h=s.lineWidth||0,c=this._contentRect=dn(u.clone(),h/2,!0,!0),v=new ot;a.add(v),v.setClipPath(new et({shape:c.plain()}));var p=this._targetGroup=new ot;v.add(p);var f=u.plain();f.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new et({style:s,shape:f,silent:!1,cursor:"grab"}));var d=t.getModel("windowStyle"),g=d.getShallow("borderRadius",!0);v.add(this._windowRect=new et({shape:{x:0,y:0,width:0,height:0,r:g},style:d.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),$a(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),$a(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var r=this._targetGroup,i=this._coordSys,a=this._contentRect;if(r.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();r.add(o),this._bgRect.z2=t.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=ft({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var r=this._bridgeRendered;r&&r.renderVersion===t.renderVersion&&(r.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var r=Gr([],t.targetTrans),i=ys([],this._coordSys.transform,r);this._transThisToTarget=Gr([],i);var a=t.viewportRect;a?a=a.clone():a=new Lt(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(q({r:s},a))}},e.prototype._resetRoamController=function(t){var r=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new _o(i.getZr())),!t||!this._isEnabled()){a.disable();return}a.enable(t,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return r._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",R(this._onPan,this)).on("zoom",R(this._onZoom,this))},e.prototype._onPan=function(t){var r=this._transThisToTarget;if(!(!this._isEnabled()||!r)){var i=gr([],[t.oldX,t.oldY],r),a=gr([],[t.oldX-t.dx,t.oldY-t.dy],r);this._api.dispatchAction(Fa(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},e.prototype._onZoom=function(t){var r=this._transThisToTarget;if(!(!this._isEnabled()||!r)){var i=gr([],[t.originX,t.originY],r);this._api.dispatchAction(Fa(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var r=t.getTarget().baseMapProvider;return!!r},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e})(at);function Fa(n,e){var t=n.mainType==="series"?n.subType+"Roam":n.mainType+"Roam",r={type:t};return r[n.mainType+"Id"]=n.id,W(r,e),r}function $a(n,e){var t=go(n);yo(e.group,t.z,t.zlevel)}function Gp(n){n.registerComponentModel(tp),n.registerComponentView(ep)}var rp={label:{enabled:!0},decal:{show:!1}},Ua=dt(),np={};function ip(n,e){var t=n.getModel("aria");if(!t.get("enabled"))return;var r=H(rp);rt(r.label,n.getLocaleModel().get("aria"),!1),rt(t.option,r,!1),i(),a();function i(){var u=t.getModel("decal"),h=u.get("show");if(h){var c=it();n.eachSeries(function(v){if(!v.isColorBySeries()){var p=c.get(v.type);p||(p={},c.set(v.type,p)),Ua(v).scope=p}}),n.eachRawSeries(function(v){if(n.isSeriesFiltered(v))return;if(F(v.enableAriaDecal)){v.enableAriaDecal();return}var p=v.getData();if(v.isColorBySeries()){var m=Qn(v.ecModel,v.name,np,n.getSeriesCount()),x=p.getVisual("decal");p.setVisual("decal",S(x,m))}else{var f=v.getRawData(),d={},g=Ua(v).scope;p.each(function(_){var b=p.getRawIndex(_);d[b]=_});var y=f.count();f.each(function(_){var b=d[_],C=f.getName(_)||_+"",T=Qn(v.ecModel,C,g,y),A=p.getItemVisual(b,"decal");p.setItemVisual(b,"decal",S(A,T))})}function S(_,b){var C=_?W(W({},b),_):b;return C.dirty=!0,C}})}}function a(){var u=e.getZr().dom;if(u){var h=n.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=q(c.option,h),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var v=n.getSeriesCount(),p=c.get(["data","maxCount"])||10,f=c.get(["series","maxCount"])||10,d=Math.min(v,f),g;if(!(v<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var x=[],S=v>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),n.eachSeries(function(T,A){if(A<d){var I=void 0,k=T.get("name"),B=k?"withName":"withoutName";I=v>1?c.get(["series","multiple",B]):c.get(["series","single",B]),I=o(I,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>p){var z=c.get(["data","partialData"]);I+=o(z,{displayCnt:p})}else I+=c.get(["data","allData"]);for(var G=c.get(["data","separator","middle"]),Y=c.get(["data","separator","end"]),ut=c.get(["data","excludeDimensionId"]),ht=[],gt=0;gt<L.count();gt++)if(gt<p){var Gt=L.getName(gt),dr=ut?Et(L.getValues(gt),function(Gn,ss){return vt(ut,ss)===-1}):L.getValues(gt),qt=c.get(["data",Gt?"withName":"withoutName"]);ht.push(o(qt,{name:Gt,value:dr.join(G)}))}I+=ht.join(G)+Y,x.push(I)}});var _=c.getModel(["series","multiple","separator"]),b=_.get("middle"),C=_.get("end");g+=x.join(b)+C,u.setAttribute("aria-label",g)}}}}function o(u,h){if(!E(u))return u;var c=u;return w(h,function(v,p){c=c.replace(new RegExp("\\{\\s*"+p+"\\s*\\}","g"),v)}),c}function s(){var u=n.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var h=n.getLocaleModel().get(["series","typeNames"]);return h[u]||h.chart}}function ap(n){if(!(!n||!n.aria)){var e=n.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},w(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function Hp(n){n.registerPreprocessor(ap),n.registerVisual(n.PRIORITY.VISUAL.ARIA,ip)}var Ya={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},op=(function(){function n(e){var t=this._condVal=E(e)?new RegExp(e):xs(e)?e:null;if(t==null){var r="";X(r)}}return n.prototype.evaluate=function(e){var t=typeof e;return E(t)?this._condVal.test(e):lr(t)?this._condVal.test(e+""):!1},n})(),sp=(function(){function n(){}return n.prototype.evaluate=function(){return this.value},n})(),lp=(function(){function n(){}return n.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},n})(),up=(function(){function n(){}return n.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},n})(),hp=(function(){function n(){}return n.prototype.evaluate=function(){return!this.child.evaluate()},n})(),cp=(function(){function n(){}return n.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,r=t(this.valueGetterParam),i=e?this.valueParser(r):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?i:r))return!1;return!0},n})();function Nn(n,e){if(n===!0||n===!1){var t=new sp;return t.value=n,t}var r="";return os(n)||X(r),n.and?Xa("and",n,e):n.or?Xa("or",n,e):n.not?vp(n,e):pp(n,e)}function Xa(n,e,t){var r=e[n],i="";O(r)||X(i),r.length||X(i);var a=n==="and"?new lp:new up;return a.children=V(r,function(o){return Nn(o,t)}),a.children.length||X(i),a}function vp(n,e){var t=n.not,r="";os(t)||X(r);var i=new hp;return i.child=Nn(t,e),i.child||X(r),i}function pp(n,e){for(var t="",r=e.prepareGetValue(n),i=[],a=qa(n),o=n.parser,s=o?xo(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var h=oe(Ya,u)?Ya[u]:u,c=n[u],v=s?s(c):c,p=vl(h,v)||h==="reg"&&new op(v);p||X(t),i.push(p)}}i.length||X(t);var f=new cp;return f.valueGetterParam=r,f.valueParser=s,f.getValue=e.getValue,f.subCondList=i,f}function os(n){return ct(n)&&!ms(n)}var fp=(function(){function n(e,t){this._cond=Nn(e,t)}return n.prototype.evaluate=function(){return this._cond.evaluate()},n})();function dp(n,e){return new fp(n,e)}var gp={type:"echarts:filter",transform:function(n){for(var e=n.upstream,t,r=dp(n.config,{valueGetterAttrMap:it({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;oe(s,"dimension")||X(l);var h=e.getDimensionInfo(u);return h||X(l),{dimIdx:h.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),i=[],a=0,o=e.count();a<o;a++)t=e.getRawDataItem(a),r.evaluate()&&i.push(t);return{data:i}}},yp={type:"echarts:sort",transform:function(n){var e=n.upstream,t=n.config,r="",i=vo(t);i.length||X(r);var a=[];w(i,function(h){var c=h.dimension,v=h.order,p=h.parser,f=h.incomparable;if(c==null&&X(r),v!=="asc"&&v!=="desc"&&X(r),f&&f!=="min"&&f!=="max"){var d="";X(d)}if(v!=="asc"&&v!=="desc"){var g="";X(g)}var y=e.getDimensionInfo(c);y||X(r);var m=p?xo(p):null;p&&!m&&X(r),a.push({dimIdx:y.index,parser:m,comparator:new pl(v,f)})});var o=e.sourceFormat;o!==fl&&o!==dl&&X(r);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(h,c){for(var v=0;v<a.length;v++){var p=a[v],f=e.retrieveValueFromItem(h,p.dimIdx),d=e.retrieveValueFromItem(c,p.dimIdx);p.parser&&(f=p.parser(f),d=p.parser(d));var g=p.comparator.evaluate(f,d);if(g!==0)return g}return 0}),{data:s}}};function Wp(n){n.registerTransform(gp),n.registerTransform(yp)}var mp=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,r,i){n.prototype.init.call(this,t,r,i),this._sourceManager=new gl(this),Jn(this)},e.prototype.mergeOption=function(t,r){n.prototype.mergeOption.call(this,t,r),Jn(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:yl},e})(Q),xp=(function(n){D(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(at);function Zp(n){n.registerComponentModel(mp),n.registerComponentView(xp)}export{Hp as AriaComponent,pr as AxisPointerComponent,kp as BrushComponent,Mp as CalendarComponent,Ep as DataZoomComponent,_v as DataZoomInsideComponent,kv as DataZoomSliderComponent,Zp as DatasetComponent,Up as GeoComponent,Dp as GraphicComponent,wp as GridComponent,_l as GridSimpleComponent,Bp as LegendComponent,ts as LegendPlainComponent,cv as LegendScrollComponent,Vp as MarkAreaComponent,zp as MarkLineComponent,Op as MarkPointComponent,Ap as MatrixComponent,Yp as ParallelComponent,Cp as PolarComponent,Xp as RadarComponent,Tp as SingleAxisComponent,Gp as ThumbnailComponent,Rp as TimelineComponent,Pp as TitleComponent,Ip as ToolboxComponent,Lp as TooltipComponent,Wp as TransformComponent,Np as VisualMapComponent,Xv as VisualMapContinuousComponent,Qv as VisualMapPiecewiseComponent};