@databrainhq/plugin 0.6.8 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -80797,11 +80797,11 @@ const GaugeChart = ({
80797
80797
  enableSaveAs,
80798
80798
  colors: colors2
80799
80799
  }) => {
80800
- let total = 0;
80801
- gaugeData == null ? void 0 : gaugeData.map((item) => {
80802
- total += item.value;
80803
- });
80804
- const average = Math.floor(total / (gaugeData == null ? void 0 : gaugeData.length));
80800
+ const newGuageData = Array.isArray(gaugeData) ? gaugeData : [];
80801
+ const total = newGuageData.reduce((sum2, item) => {
80802
+ return sum2 + item.value;
80803
+ }, 0);
80804
+ const average = Math.floor(total / newGuageData.length);
80805
80805
  const option2 = {
80806
80806
  toolbox: {
80807
80807
  feature: {
@@ -81405,10 +81405,12 @@ const MetricChart = ({
81405
81405
  legendSettings,
81406
81406
  labelSettings,
81407
81407
  axisSettings,
81408
+ customSettings,
81408
81409
  enableSaveAs,
81409
81410
  colors: colors2,
81410
81411
  updateGroup,
81411
- isEnableGroupBy
81412
+ isEnableGroupBy,
81413
+ backGroundColor
81412
81414
  });
81413
81415
  }
81414
81416
  if (chartType2 === CHART_TYPES.bar) {
@@ -81435,7 +81437,9 @@ const MetricChart = ({
81435
81437
  enableSaveAs,
81436
81438
  colors: colors2,
81437
81439
  updateGroup,
81438
- isEnableGroupBy
81440
+ isEnableGroupBy,
81441
+ backGroundColor,
81442
+ customSettings
81439
81443
  });
81440
81444
  }
81441
81445
  if (chartType2 === CHART_TYPES.histogram) {
@@ -81448,7 +81452,9 @@ const MetricChart = ({
81448
81452
  enableSaveAs,
81449
81453
  colors: colors2,
81450
81454
  updateGroup,
81451
- isEnableGroupBy
81455
+ isEnableGroupBy,
81456
+ backGroundColor,
81457
+ customSettings
81452
81458
  });
81453
81459
  }
81454
81460
  if (chartType2 === CHART_TYPES.bubble) {
@@ -81461,7 +81467,9 @@ const MetricChart = ({
81461
81467
  enableSaveAs,
81462
81468
  colors: colors2,
81463
81469
  updateGroup,
81464
- isEnableGroupBy
81470
+ isEnableGroupBy,
81471
+ backGroundColor,
81472
+ customSettings
81465
81473
  });
81466
81474
  }
81467
81475
  if (chartType2 === CHART_TYPES.scatter) {
@@ -81474,7 +81482,9 @@ const MetricChart = ({
81474
81482
  enableSaveAs,
81475
81483
  colors: colors2,
81476
81484
  updateGroup,
81477
- isEnableGroupBy
81485
+ isEnableGroupBy,
81486
+ backGroundColor,
81487
+ customSettings
81478
81488
  });
81479
81489
  }
81480
81490
  if (chartType2 === CHART_TYPES.row) {
@@ -81486,7 +81496,9 @@ const MetricChart = ({
81486
81496
  enableSaveAs,
81487
81497
  colors: colors2,
81488
81498
  updateGroup,
81489
- isEnableGroupBy
81499
+ isEnableGroupBy,
81500
+ backGroundColor,
81501
+ customSettings
81490
81502
  });
81491
81503
  }
81492
81504
  if (chartType2 === CHART_TYPES.area) {
@@ -81502,7 +81514,9 @@ const MetricChart = ({
81502
81514
  enableSaveAs,
81503
81515
  colors: colors2,
81504
81516
  updateGroup,
81505
- isEnableGroupBy
81517
+ isEnableGroupBy,
81518
+ backGroundColor,
81519
+ customSettings
81506
81520
  });
81507
81521
  }
81508
81522
  if (chartType2 === CHART_TYPES.combo) {
@@ -81520,7 +81534,9 @@ const MetricChart = ({
81520
81534
  enableSaveAs,
81521
81535
  colors: colors2,
81522
81536
  updateGroup,
81523
- isEnableGroupBy
81537
+ isEnableGroupBy,
81538
+ backGroundColor,
81539
+ customSettings
81524
81540
  });
81525
81541
  }
81526
81542
  if (chartType2 === CHART_TYPES.pie) {
@@ -81571,7 +81587,9 @@ const MetricChart = ({
81571
81587
  enableSaveAs,
81572
81588
  colors: colors2,
81573
81589
  updateGroup,
81574
- isEnableGroupBy
81590
+ isEnableGroupBy,
81591
+ backGroundColor,
81592
+ customSettings
81575
81593
  });
81576
81594
  }
81577
81595
  if (chartType2 === CHART_TYPES.funnel) {
@@ -81600,7 +81618,8 @@ const MetricChart = ({
81600
81618
  legendSettings,
81601
81619
  labelSettings,
81602
81620
  enableSaveAs,
81603
- colors: colors2
81621
+ colors: colors2,
81622
+ backGroundColor
81604
81623
  });
81605
81624
  }
81606
81625
  if (chartType2 === CHART_TYPES.singleValue) {
@@ -81619,7 +81638,8 @@ const MetricChart = ({
81619
81638
  labelSettings,
81620
81639
  axisSettings,
81621
81640
  enableSaveAs,
81622
- colors: colors2
81641
+ colors: colors2,
81642
+ customSettings
81623
81643
  });
81624
81644
  }
81625
81645
  if (chartType2 === CHART_TYPES.table) {
package/dist/index.umd.js CHANGED
@@ -89,7 +89,7 @@ yyyy`);var n=yn(e),a=t?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n
89
89
 
90
90
  `:"<br/>",y=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,h)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=Me(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),v=this._renderMode,d=t.positionDefault,p=uh([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(c,f),m=new W_;y.marker=m.makeTooltipMarker("item",xs(y.color),v);var _=OM(u.formatTooltip(c,!1,f)),b=p.get("order"),w=p.get("valueFormatter"),x=_.frag,S=x?jM(w?K({valueFormatter:w},x):x,m,v,b,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,S,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),a({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=Me(n),o=i.tooltipConfig,s=o.option||{};if(ue(s)){var l=s;s={content:l,formatter:l}}var u=[s],c=this._ecModel.getComponent(i.componentMainType,i.componentIndex);c&&u.push(c),u.push({formatter:s.content});var f=t.positionDefault,h=uh(u,this._tooltipModel,f?{position:f}:null),v=h.get("content"),d=Math.random()+"",p=new W_;this._showOrMove(h,function(){var g=Ce(h.get("formatterParams")||{});this._showTooltipContent(h,v,g,d,t.offsetX,t.offsetY,t.position,n,p)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var v=n,d=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor")),p=d.color;if(h)if(ue(h)){var g=t.ecModel.get("useUTC"),y=Q(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,m&&(v=sf(y.axisValue,v,g)),v=S_(v,a,!0)}else if(be(h)){var _=ve(function(b,w){b===this._ticket&&(f.setContent(w,c,t,p,l),this._updatePosition(t,l,o,s,f,a,u))},this);this._ticket=i,v=h(a,i,_)}else v=h;f.setContent(v,c,t,p,l),f.show(t,p),this._updatePosition(t,l,o,s,f,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i){if(a==="axis"||Q(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!Q(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),h=t.get("align"),v=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),be(n)&&(n=n([a,i],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),Q(n))a=oe(n[0],u),i=oe(n[1],c);else if(we(n)){var p=n;p.width=f[0],p.height=f[1];var g=Ht(p,{width:u,height:c});a=g.x,i=g.y,h=null,v=null}else if(ue(n)&&l){var y=fie(n,d,f,t.get("borderWidth"));a=y[0],i=y[1]}else{var y=uie(a,i,o,u,c,h?null:20,v?null:20);a=y[0],i=y[1]}if(h&&(a-=t5(h)?f[0]/2:h==="right"?f[0]:0),v&&(i-=t5(v)?f[1]/2:v==="bottom"?f[1]:0),qN(t)){var y=cie(a,i,o,u,c);a=y[0],i=y[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&L(a,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&L(u,function(h,v){var d=f[v]||{},p=h.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===g.length,o&&L(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&L(h.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],b=i[m];_&&b&&b.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){je.node||!n.getDom()||(gf(this,"_updatePosition"),this._tooltipContent.dispose(),Yx("itemTooltip",n))},e.type="tooltip",e}(Tt);function uh(r,e,t){var n=e.ecModel,a;t?(a=new dt(t,n,n),a=new dt(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof dt&&(o=o.get("tooltip",!0)),ue(o)&&(o={formatter:o}),o&&(a=new dt(o,a,n)))}return a}function e5(r,e){return r.dispatchAction||ve(e.dispatchAction,e)}function uie(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function cie(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function fie(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+c+o;break;case"left":s=e.x-a-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function t5(r){return r==="center"||r==="middle"}function hie(r,e,t){var n=x0(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=zc(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(!!o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Me(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}var vie=lie;function die(r){Ve(sh),r.registerComponentModel(Yae),r.registerComponentView(vie),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},kt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},kt)}var pie=["rect","polygon","keep","clear"];function gie(r,e){var t=vt(r?r.brush:[]);if(!!t.length){var n=[];L(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;Q(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),yie(s),e&&!s.length&&s.push.apply(s,pie)}}function yie(r){var e={};L(r,function(t){e[t]=1}),r.length=0,L(e,function(t,n){r.push(n)})}var r5=L;function n5(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function vw(r,e,t){var n={};return r5(e,function(i){var o=n[i]=a();r5(r[i],function(s,l){if(!!yr.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new yr(u),l==="opacity"&&(u=Ce(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new yr(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function a5(r,e,t){var n;L(t,function(a){e.hasOwnProperty(a)&&n5(e[a])&&(n=!0)}),n&&L(t,function(a){e.hasOwnProperty(a)&&n5(e[a])?r[a]=Ce(e[a]):delete r[a]})}function mie(r,e,t,n,a,i){var o={};L(r,function(f){var h=yr.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return j_(t,s,f)}function u(f,h){bL(t,s,f,h)}i==null?t.each(c):t.each([i],c);function c(f,h){s=i==null?f:h;var v=t.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=n.call(a,f),p=e[d],g=o[d],y=0,m=g.length;y<m;y++){var _=g[y];p[_]&&p[_].applyVisual(f,l,u)}}}function _ie(r,e,t,n){var a={};return L(r,function(i){var o=yr.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(w){return j_(s,f,w)}function c(w,x){bL(s,f,w,x)}for(var f,h=s.getStore();(f=o.next())!=null;){var v=s.getRawDataItem(f);if(!(v&&v.visualMap===!1))for(var d=n!=null?h.get(l,f):f,p=t(d),g=e[p],y=a[p],m=0,_=y.length;m<_;m++){var b=y[m];g[b]&&g[b].applyVisual(d,u,c)}}}}}function bie(r){var e=r.brushType,t={point:function(n){return i5[e].point(n,t,r)},rect:function(n){return i5[e].rect(n,t,r)}};return t}var i5={lineX:o5(0),lineY:o5(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Es(t.range,r[0],r[1])},rect:function(r,e,t){var n=t.range;if(!r||n.length<=1)return!1;var a=r.x,i=r.y,o=r.width,s=r.height,l=n[0];if(Es(n,a,i)||Es(n,a+o,i)||Es(n,a,i+s)||Es(n,a+o,i+s)||Ne.create(r).contain(l[0],l[1])||tf(a,i,a+o,i,n)||tf(a,i,a,i+s,n)||tf(a+o,i,a+o,i+s,n)||tf(a,i+s,a+o,i+s,n))return!0}}};function o5(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return ch(s,o)}},rect:function(n,a,i){if(n){var o=i.range,s=[n[e[r]],n[e[r]]+n[t[r]]];return s[1]<s[0]&&s.reverse(),ch(s[0],o)||ch(s[1],o)||ch(o[0],s)||ch(o[1],s)}}}}function ch(r,e){return e[0]<=r&&r<=e[1]}var s5=["inBrush","outOfBrush"],dw="__ecBrushSelect",pw="__ecInBrushSelectEvent";function l5(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new uw(e.option,r);t.setInputRanges(e.areas,r)})}function xie(r,e,t){var n=[],a,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),l5(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Ce(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],h=[],v=[],d=!1;s||(a=u.throttleType,i=u.throttleDelay);var p=ee(o.areas,function(w){var x=Tie[w.brushType],S=xe({boundingRect:x?x(w):void 0},w);return S.selectors=bie(S),S}),g=vw(o.option,s5,function(w){w.mappingMethod="fixed"});Q(c)&&L(c,function(w){f[w]=1});function y(w){return c==="all"||!!f[w]}function m(w){return!!w.length}r.eachSeries(function(w,x){var S=v[x]=[];w.subType==="parallel"?_(w,x):b(w,x,S)});function _(w,x){var S=w.coordinateSystem;d=d||S.hasAxisBrushed(),y(x)&&S.eachActiveState(w.getData(),function(T,D){T==="active"&&(h[D]=1)})}function b(w,x,S){if(!(!w.brushSelector||Cie(o,x))&&(L(p,function(D){o.brushTargetManager.controlSeries(D,w,r)&&S.push(D),d=d||m(S)}),y(x)&&m(S))){var T=w.getData();T.each(function(D){u5(w,S,T,D)&&(h[D]=1)})}}r.eachSeries(function(w,x){var S={seriesId:w.id,seriesIndex:x,seriesName:w.name,dataIndex:[]};l.selected.push(S);var T=v[x],D=w.getData(),A=y(x)?function(M){return h[M]?(S.dataIndex.push(D.getRawIndex(M)),"inBrush"):"outOfBrush"}:function(M){return u5(w,T,D,M)?(S.dataIndex.push(D.getRawIndex(M)),"inBrush"):"outOfBrush"};(y(x)?d:m(T))&&mie(s5,g,D,A)})}),wie(e,a,i,n,t)}function wie(r,e,t,n,a){if(!!a){var i=r.getZr();if(!i[pw]){i[dw]||(i[dw]=Sie);var o=ou(i,dw,t,e);o(r,n)}}}function Sie(r,e){if(!r.isDisposed()){var t=r.getZr();t[pw]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[pw]=!1}}function u5(r,e,t,n){for(var a=0,i=e.length;a<i;a++){var o=e[a];if(r.brushSelector(n,t,o.selectors,o))return!0}}function Cie(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(Q(t)?ze(t,e)<0:e!==t)}var Tie={rect:function(r){return c5(r.range)},polygon:function(r){for(var e,t=r.range,n=0,a=t.length;n<a;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[n];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&c5(e)}};function c5(r){return new Ne(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Die=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new gx(n.getZr())).on("brush",ve(this._onBrush,this)).mount()},e.prototype.render=function(t,n,a,i){this.model=t,this._updateController(t,n,a,i)},e.prototype.updateTransform=function(t,n,a,i){l5(n),this._updateController(t,n,a,i)},e.prototype.updateVisual=function(t,n,a,i){this.updateTransform(t,n,a,i)},e.prototype.updateView=function(t,n,a,i){this._updateController(t,n,a,i)},e.prototype._updateController=function(t,n,a,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Ce(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Ce(a),$from:n})},e.type="brush",e}(Tt),Aie=Die,Mie="#ddd",Lie=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&a5(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:Mie},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=ee(t,function(n){return f5(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=f5(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(qe);function f5(r,e){return Ee({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new dt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Pie=Lie,Iie=["rect","polygon","lineX","lineY","keep","clear"],Oie=function(r){U(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,L(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,a){this.render(t,n,a)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),a={};return L(t.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},e.prototype.onclick=function(t,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:Iie.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 n},e}(Zn),Eie=Oie;function Rie(r){r.registerComponentView(Aie),r.registerComponentModel(Pie),r.registerPreprocessor(gie),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,xie),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},kt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},kt),Lu("brush",Eie)}var kie=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(qe),Nie=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Re(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Ze({style:bt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),v=new Ze({style:bt(s,{text:h,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0);c.silent=!d&&!g,v.silent=!p&&!g,d&&c.on("click",function(){Nd(d,"_"+t.get("target"))}),p&&v.on("click",function(){Nd(p,"_"+t.get("subtarget"))}),Me(c).eventData=Me(v).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),h&&i.add(v);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Ht(m,{width:a.getWidth(),height:a.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),v.setStyle(b),y=i.getBoundingRect();var w=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var S=new Ye({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(S)}},e.type="title",e}(Tt);function Bie(r){r.registerComponentModel(kie),r.registerComponentView(Nie)}var zie=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-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,n=t.data||[],a=t.axisType,i=this._names=[],o;a==="category"?(o=[],L(n,function(u,c){var f=Ut(Nl(u),""),h;we(u)?(h=Ce(u),h.value=c):h=c,o.push(h),i.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new Pr([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(qe),h5=zie,v5=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=oo(h5.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(h5);Rt(v5,z_.prototype);var Vie=v5,Fie=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Tt),$ie=Fie,Hie=function(r){U(e,r);function e(t,n,a,i){var o=r.call(this,t,n,a)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Hn),Gie=Hie,gw=Math.PI,d5=Ke(),Wie=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,a){if(this.model=t,this.api=a,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return er("nameValue",{noName:!0,value:c})},L(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,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,n){var a=t.get(["label","position"]),i=t.get("orient"),o=qie(t,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":ue(a)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][a]:s=a;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:gw/2},f=i==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),v=h.get("show",!0),d=v?h.get("itemSize"):0,p=v?h.get("itemGap"):0,g=d+p,y=t.get(["label","rotate"])||0;y=y*gw/180;var m,_,b,w=h.get("position",!0),x=v&&h.get("showPlayBtn",!0),S=v&&h.get("showPrevBtn",!0),T=v&&h.get("showNextBtn",!0),D=0,A=f;w==="left"||w==="bottom"?(x&&(m=[0,0],D+=g),S&&(_=[D,0],D+=g),T&&(b=[A-d,0],A-=g)):(x&&(m=[A-d,0],A-=g),S&&(_=[0,0],D+=g),T&&(b=[A-d,0],A-=g));var M=[D,A];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:c[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:b,axisExtent:M,controlSize:d,controlGap:p}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=vn(),l=o.x,u=o.y+o.height;ia(s,s,[-l,-u]),Ui(s,s,-gw/2),ia(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=m(o),f=m(a.getBoundingRect()),h=m(i.getBoundingRect()),v=[a.x,a.y],d=[i.x,i.y];d[0]=v[0]=c[0][0];var p=t.labelPosOpt;if(p==null||ue(p)){var g=p==="+"?0:1;_(v,f,c,1,g),_(d,h,c,1,1-g)}else{var g=p>=0?0:1;_(v,f,c,1,g),d[1]=v[1]+p}a.setPosition(v),i.setPosition(d),a.rotation=i.rotation=t.rotation,y(a),y(i);function y(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function m(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function _(b,w,x,S,T){b[S]+=x[S][T]-w[S][T]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=Uie(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Gie("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new De;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,a,i){var o=a.getExtent();if(!!i.get(["lineStyle","show"])){var s=new Qt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:K({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Qt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:xe({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],L(l,function(u){var c=a.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),v=f.getModel(["emphasis","itemStyle"]),d=f.getModel(["progress","itemStyle"]),p={x:c,y:0,onclick:ve(o._changeTimeline,o,u.value)},g=p5(f,h,n,p);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),ro(g);var y=Me(g);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,n,a,i){var o=this,s=a.getLabelModel();if(!!s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],L(u,function(c){var f=c.tickValue,h=l.getItemModel(f),v=h.getModel("label"),d=h.getModel(["emphasis","label"]),p=h.getModel(["progress","label"]),g=a.dataToCoord(c.tickValue),y=new Ze({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:ve(o._changeTimeline,o,f),silent:!1,style:bt(v,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=bt(d),y.ensureState("progress").style=bt(p),n.add(y),ro(y),d5(y).dataIndex=f,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,n,a,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),f=i.get("inverse",!0);h(t.nextBtnPosition,"next",ve(this._changeTimeline,this,f?"-":"+")),h(t.prevBtnPosition,"prev",ve(this._changeTimeline,this,f?"+":"-")),h(t.playPosition,c?"stop":"play",ve(this._handlePlayClick,this,!c),!0);function h(v,d,p,g){if(!!v){var y=ua(Re(i.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=Yie(i,d+"Icon",m,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,n.add(_),ro(_)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=ve(u._handlePointerDrag,u),f.ondragend=ve(u._handlePointerDragend,u),g5(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){g5(f,u._progressLine,s,a,i)}};this._currentPointer=p5(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var a=this._toAxisCoord(t)[0],i=this._axis,o=gn(i.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=a,s.dirty());var l=this._findNearestTick(a),u=this.model;(n||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 n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var n=this._mainGroup.getLocalTransform();return da(t,n,!0)},e.prototype._findNearestTick=function(t){var n=this.model.getData(),a=1/0,i,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<a&&(a=c,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();t==="+"?t=n+1:t==="-"&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,a=this._tickLabels;if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",i<t);if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",d5(a[i]).dataIndex<=t)},e.type="timeline.slider",e}($ie);function Uie(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new A1({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new zP({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new po}}function qie(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function Yie(r,e,t,n){var a=n.style,i=ql(r.get(["controlStyle",e]),n||{},new Ne(t[0],t[1],t[2],t[3]));return a&&i.setStyle(a),i}function p5(r,e,t,n,a,i){var o=e.get("color");if(a)a.setColor(o),t.add(a),i&&i.onUpdate(a);else{var s=r.get("symbol");a=zt(s,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),t.add(a),i&&i.onCreate(a)}var l=e.getItemStyle(["color"]);a.setStyle(l),n=Ee({rectHover:!0,z2:100},n,!0);var u=bf(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=lu(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function g5(r,e,t,n,a,i){if(!r.dragging){var o=a.getModel("checkpointStyle"),s=n.dataToCoord(a.getData().get("value",t));if(i||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}var Zie=Wie;function jie(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var a=t.getComponent("timeline");return a&&e.currentIndex!=null&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),xe({currentIndex:a.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function Xie(r){var e=r&&r.timeline;Q(e)||(e=e?[e]:[]),L(e,function(t){!t||Kie(t)})}function Kie(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),y5(r),Js(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});Js(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!Js(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}L(r.data||[],function(a){we(a)&&!Q(a)&&(!Js(a,"value")&&Js(a,"name")&&(a.value=a.name),y5(a))})}function y5(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),n=r.label||r.label||{},a=n.normal||(n.normal={}),i={normal:1,emphasis:1};L(n,function(o,s){!i[s]&&!Js(a,s)&&(a[s]=o)}),t.label&&!Js(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function Js(r,e){return r.hasOwnProperty(e)}function Qie(r){r.registerComponentModel(Vie),r.registerComponentView(Zie),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),jie(r),r.registerPreprocessor(Xie)}function yw(r,e){if(!r)return!1;for(var t=Q(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function dg(r){ts(r,"label",["show"])}var pg=Ke(),m5=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._mergeOption(t,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(je.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},e.prototype._mergeOption=function(t,n,a,i){var o=this.mainType;a||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=pg(s)[o];if(!l||!l.data){pg(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&dg(l),L(l.data,function(c){c instanceof Array?(dg(c[0]),dg(c[1])):dg(c)}),u=this.createMarkerModelFromSeries(l,this,n),K(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),pg(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return er("section",{header:this.name,blocks:[er("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.getMarkerModelFromSeries=function(t,n){return pg(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(qe);Rt(m5,z_.prototype);var Do=m5,Jie=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Do),eoe=Jie;function mw(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function toe(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function gg(r,e,t,n,a,i){var o=[],s=_i(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=bw(e,l,r),c=e.indicesOfNearest(l,u)[0];o[a]=e.get(t,c),o[i]=e.get(l,c);var f=e.get(n,c),h=ca(e.get(n,c));return h=Math.min(h,20),h>=0&&(o[i]=+o[i].toFixed(h)),[o,f]}var _w={min:Le(gg,"min"),max:Le(gg,"max"),average:Le(gg,"average"),median:Le(gg,"median")};function fh(r,e){if(!!e){var t=r.getData(),n=r.coordinateSystem,a=n.dimensions;if(!toe(e)&&!Q(e.coord)&&n){var i=_5(e,t,n,r);if(e=Ce(e),e.type&&_w[e.type]&&i.baseAxis&&i.valueAxis){var o=ze(a,i.baseAxis.dim),s=ze(a,i.valueAxis.dim),l=_w[e.type](t,i.baseDataDim,i.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)e.coord=[];else for(var u=e.coord,c=0;c<2;c++)_w[u[c]]&&(u[c]=bw(t,t.mapDimension(a[c]),u[c]));return e}}function _5(r,e,t,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(roe(n,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function roe(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function hh(r,e){return r&&r.containData&&e.coord&&!mw(e)?r.containData(e.coord):!0}function noe(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!mw(e)&&!mw(t)?r.containZone(e.coord,t.coord):!0}function b5(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return uo(o,e[i])}:function(t,n,a,i){return uo(t.value,e[i])}}function bw(r,e,t){if(t==="average"){var n=0,a=0;return r.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var xw=Ke(),aoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=_e()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){xw(s).keep=!1}),n.eachSeries(function(s){var l=Do.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!xw(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){xw(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;L(t,function(i){var o=Do.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?BD(l):U0(l))})}})},e.type="marker",e}(Tt),ww=aoe;function x5(r,e,t){var n=e.coordinateSystem;r.each(function(a){var i=r.getItemModel(a),o,s=oe(i.get("x"),t.getWidth()),l=oe(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,a));else if(n){var u=r.get(n.dimensions[0],a),c=r.get(n.dimensions[1],a);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(a,o)})}var ioe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Do.getMarkerModelFromSeries(i,"markPoint");o&&(x5(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Vf),f=ooe(o,t,n);n.setData(f),x5(n.getData(),t,i),f.each(function(h){var v=f.getItemModel(h),d=v.getShallow("symbol"),p=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),m=v.getShallow("symbolKeepAspect");if(be(d)||be(p)||be(g)||be(y)){var _=n.getRawValue(h),b=n.getDataParams(h);be(d)&&(d=d(_,b)),be(p)&&(p=p(_,b)),be(g)&&(g=g(_,b)),be(y)&&(y=y(_,b))}var w=v.getModel("itemStyle").getItemStyle(),x=_f(l,"color");w.fill||(w.fill=x),f.setItemVisual(h,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:w})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(v){Me(v).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}(ww);function ooe(r,e,t){var n;r?n=ee(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return K(K({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Pr(n,t),i=ee(t.get("data"),Le(fh,e));r&&(i=lt(i,Le(hh,r)));var o=b5(!!r,n);return a.initData(i,null,o),a}var soe=ioe;function loe(r){r.registerComponentModel(eoe),r.registerComponentView(soe),r.registerPreprocessor(function(e){yw(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var uoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Do),coe=uoe,yg=Ke(),foe=function(r,e,t,n){var a=r.getData(),i;if(Q(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Xt(n.yAxis,n.xAxis);else{var u=_5(n,a,e,r);s=u.valueAxis;var c=S1(a,u.valueDataDim);l=bw(a,c,o)}var f=s.dim==="x"?0:1,h=1-f,v=Ce(n),d={coord:[]};v.type=null,v.coord=[],v.coord[h]=-1/0,d.coord[h]=1/0;var p=t.get("precision");p>=0&&Xe(l)&&(l=+l.toFixed(Math.min(p,20))),v.coord[f]=d.coord[f]=l,i=[v,d,{type:o,valueIndex:n.valueIndex,value:l}]}else i=[]}var g=[fh(r,i[0]),fh(r,i[1]),K({},i[2])];return g[2].type=g[2].type||null,Ee(g[2],g[0]),Ee(g[2],g[1]),g};function mg(r){return!isNaN(r)&&!isFinite(r)}function w5(r,e,t,n){var a=1-r,i=n.dimensions[r];return mg(e[a])&&mg(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function hoe(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(w5(1,t,n,r)||w5(0,t,n,r)))return!0}return hh(r,e[0])&&hh(r,e[1])}function Sw(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=oe(o.get("x"),a.getWidth()),u=oe(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=i.dimensions,f=r.get(c[0],e),h=r.get(c[1],e);s=i.dataToPoint([f,h])}if(Fs(i,"cartesian2d")){var v=i.getAxis("x"),d=i.getAxis("y"),c=i.dimensions;mg(r.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[t?0:1]):mg(r.get(c[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var voe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Do.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=yg(o).from,u=yg(o).to;l.each(function(c){Sw(l,c,!0,i,a),Sw(u,c,!1,i,a)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Xb);this.group.add(c.group);var f=doe(o,t,n),h=f.from,v=f.to,d=f.line;yg(n).from=h,yg(n).to=v,n.setData(d);var p=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");Q(p)||(p=[p,p]),Q(g)||(g=[g,g]),Q(y)||(y=[y,y]),Q(m)||(m=[m,m]),f.from.each(function(b){_(h,b,!0),_(v,b,!1)}),d.each(function(b){var w=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[h.getItemLayout(b),v.getItemLayout(b)]),w.stroke==null&&(w.stroke=h.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(b,"symbolOffset"),fromSymbolRotate:h.getItemVisual(b,"symbolRotate"),fromSymbolSize:h.getItemVisual(b,"symbolSize"),fromSymbol:h.getItemVisual(b,"symbol"),toSymbolKeepAspect:v.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(b,"symbolOffset"),toSymbolRotate:v.getItemVisual(b,"symbolRotate"),toSymbolSize:v.getItemVisual(b,"symbolSize"),toSymbol:v.getItemVisual(b,"symbol"),style:w})}),c.updateData(d),f.line.eachItemGraphicEl(function(b){Me(b).dataModel=n,b.traverse(function(w){Me(w).dataModel=n})});function _(b,w,x){var S=b.getItemModel(w);Sw(b,w,x,t,i);var T=S.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=_f(l,"color")),b.setItemVisual(w,{symbolKeepAspect:S.get("symbolKeepAspect"),symbolOffset:Re(S.get("symbolOffset",!0),m[x?0:1]),symbolRotate:Re(S.get("symbolRotate",!0),y[x?0:1]),symbolSize:Re(S.get("symbolSize"),g[x?0:1]),symbol:Re(S.get("symbol",!0),p[x?0:1]),style:T})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}(ww);function doe(r,e,t){var n;r?n=ee(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return K(K({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Pr(n,t),i=new Pr(n,t),o=new Pr([],t),s=ee(t.get("data"),Le(foe,e,r,t));r&&(s=lt(s,Le(hoe,r)));var l=b5(!!r,n);return a.initData(ee(s,function(u){return u[0]}),null,l),i.initData(ee(s,function(u){return u[1]}),null,l),o.initData(ee(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}var poe=voe;function goe(r){r.registerComponentModel(coe),r.registerComponentView(poe),r.registerPreprocessor(function(e){yw(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var yoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Do),moe=yoe,_g=Ke(),_oe=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=fh(r,a),s=fh(r,i),l=o.coord,u=s.coord;l[0]=Xt(l[0],-1/0),l[1]=Xt(l[1],-1/0),u[0]=Xt(u[0],1/0),u[1]=Xt(u[1],1/0);var c=xv([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function bg(r){return!isNaN(r)&&!isFinite(r)}function S5(r,e,t,n){var a=1-r;return bg(e[a])&&bg(t[a])}function boe(r,e){var t=e.coord[0],n=e.coord[1],a={coord:t,x:e.x0,y:e.y0},i={coord:n,x:e.x1,y:e.y1};return Fs(r,"cartesian2d")?t&&n&&(S5(1,t,n)||S5(0,t,n))?!0:noe(r,a,i):hh(r,a)||hh(r,i)}function C5(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=oe(o.get(t[0]),a.getWidth()),u=oe(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),h=i.clampData(c),v=i.clampData(f),d=[];t[0]==="x0"?d[0]=h[0]>v[0]?f[0]:c[0]:d[0]=h[0]>v[0]?c[0]:f[0],t[1]==="y0"?d[1]=h[1]>v[1]?f[1]:c[1]:d[1]=h[1]>v[1]?c[1]:f[1],s=n.getMarkerPosition(d,t,!0)}else{var p=r.get(t[0],e),g=r.get(t[1],e),y=[p,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(Fs(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),p=r.get(t[0],e),g=r.get(t[1],e);bg(p)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):bg(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var T5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],xoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Do.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=ee(T5,function(f){return C5(s,l,f,i,a)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new De});this.group.add(c.group),this.markKeep(c);var f=woe(o,t,n);n.setData(f),f.each(function(h){var v=ee(T5,function(T){return C5(f,h,T,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(f.get("x0",h)),d.parse(f.get("x1",h))],_=[p.parse(f.get("y0",h)),p.parse(f.get("y1",h))];gn(m),gn(_);var b=!(g[0]>m[1]||g[1]<m[0]||y[0]>_[1]||y[1]<_[0]),w=!b;f.setItemLayout(h,{points:v,allClipped:w});var x=f.getItemModel(h).getModel("itemStyle").getItemStyle(),S=_f(l,"color");x.fill||(x.fill=S,ue(x.fill)&&(x.fill=Dc(x.fill,.4))),x.stroke||(x.stroke=S),f.setItemVisual(h,"style",x)}),f.diff(_g(c).data).add(function(h){var v=f.getItemLayout(h);if(!v.allClipped){var d=new Vr({shape:{points:v.points}});f.setItemGraphicEl(h,d),c.group.add(d)}}).update(function(h,v){var d=_g(c).data.getItemGraphicEl(v),p=f.getItemLayout(h);p.allClipped?d&&c.group.remove(d):(d?Qe(d,{shape:{points:p.points}},n,h):d=new Vr({shape:{points:p.points}}),f.setItemGraphicEl(h,d),c.group.add(d))}).remove(function(h){var v=_g(c).data.getItemGraphicEl(h);c.group.remove(v)}).execute(),f.eachItemGraphicEl(function(h,v){var d=f.getItemModel(v),p=f.getItemVisual(v,"style");h.useStyle(f.getItemVisual(v,"style")),pr(h,Jt(d),{labelFetcher:n,labelDataIndex:v,defaultText:f.getName(v)||"",inheritColor:ue(p.fill)?Dc(p.fill,1):"#000"}),dr(h,d),Pt(h,null,null,d.get(["emphasis","disabled"])),Me(h).dataModel=n}),_g(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}(ww);function woe(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=ee(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return K(K({},f),{name:u,ordinalMeta:null})});a=ee(i,function(u,c){return{name:u,type:o[c%2].type}}),n=new Pr(a,t)}else a=[{name:"value",type:"float"}],n=new Pr(a,t);var s=ee(t.get("data"),Le(_oe,e,r,t));r&&(s=lt(s,Le(boe,r)));var l=r?function(u,c,f,h){var v=u.coord[Math.floor(h/2)][h%2];return uo(v,a[h])}:function(u,c,f,h){return uo(u.value,a[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}var Soe=xoe;function Coe(r){r.registerComponentModel(moe),r.registerComponentView(Soe),r.registerPreprocessor(function(e){yw(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Toe=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Doe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,a=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),Q(n)&&L(n,function(i,o){ue(i)&&(i={type:i}),n[o]=Ee(i,Toe(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<t.length;a++){var i=t[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],a=[];t.eachRawSeries(function(l){var u=l.name;a.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();t.isSeriesFiltered(l)||(a=a.concat(h)),h.length?n=n.concat(h):c=!0}else c=!0;c&&b0(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=_e(),s=ee(i,function(l){return(ue(l)||Xe(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new dt(l,this,this.ecModel))},this);this._data=lt(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;L(i,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;L(t,function(a){n[a.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;L(t,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&ze(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",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(qe),Cw=Doe,Iu=Le,Tw=L,xg=De,Aoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new xg),this.group.add(this._selectorGroup=new xg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=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,n,a,l,s,u);var c=t.getBoxLayoutParams(),f={width:a.getWidth(),height:a.getHeight()},h=t.get("padding"),v=Ht(c,f,h),d=this.layoutInner(t,o,v,i,l,u),p=Ht(xe({width:d.width,height:d.height},c),f,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=RN(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),c=_e(),f=n.get("selectedMode"),h=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),Tw(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
91
91
  `)){var g=new xg;g.newline=!0,u.add(g);return}var y=a.getSeriesByName(p)[0];if(!c.get(p))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},b=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,p,d,v,n,t,_,w,b,f,i);x.on("click",Iu(D5,p,null,i,h)).on("mouseover",Iu(Dw,y.name,null,i,h)).on("mouseout",Iu(Aw,y.name,null,i,h)),c.set(p,!0)}else a.eachRawSeries(function(S){if(!c.get(p)&&S.legendVisualProvider){var T=S.legendVisualProvider;if(!T.containName(p))return;var D=T.indexOfName(p),A=T.getItemVisual(D,"style"),M=T.getItemVisual(D,"legendIcon"),P=kr(A.fill);P&&P[3]===0&&(P[3]=.2,A=K(K({},A),{fill:sa(P,"rgba")}));var I=this._createItem(S,p,d,v,n,t,{},A,M,f,i);I.on("click",Iu(D5,null,p,i,h)).on("mouseover",Iu(Dw,null,p,i,h)).on("mouseout",Iu(Aw,null,p,i,h)),c.set(p,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();Tw(t,function(u){var c=u.type,f=new Ze({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);pr(f,{normal:h,emphasis:v},{defaultText:u.title}),ro(f)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,c,f,h){var v=t.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");c=_||c||"roundRect";var b=Moe(c,i,l,u,v,g,h),w=new xg,x=i.getModel("textStyle");if(be(t.getLegendIcon)&&(!_||_==="inherit"))w.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:c,iconRotate:y,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:m}));else{var S=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;w.add(Loe({itemWidth:d,itemHeight:p,icon:c,iconRotate:S,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,D=s,A=o.get("formatter"),M=n;ue(A)&&A?M=A.replace("{name}",n!=null?n:""):be(A)&&(M=A(n));var P=i.get("inactiveColor");w.add(new Ze({style:bt(x,{text:M,x:T,y:p/2,fill:g?x.getTextColor():P,align:D,verticalAlign:"middle"})}));var I=new Ye({shape:w.getBoundingRect(),invisible:!0}),O=i.getModel("tooltip");return O.get("show")&&Yl({el:I,componentModel:o,itemName:n,itemTooltipOption:O.option}),w.add(I),w.eachChild(function(E){E.silent=!0}),I.silent=!f,this.getContentGroup().add(w),ro(w),w.__legendDataIndex=a,w},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ss(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ss("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=c[g]+d:f[p]+=h[g]+d,v[1-p]+=c[y]/2-h[y]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+d+h[g],_[y]=Math.max(c[y],h[y]),_[m]=Math.min(0,h[m]+v[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Tt);function Moe(r,e,t,n,a,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Tw(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:cu(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var h=e.getModel("lineStyle"),v=h.getLineStyle();if(s(v,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var d=e.get("inactiveBorderWidth"),p=u[c];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function Loe(r){var e=r.icon||"roundRect",t=zt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function D5(r,e,t,n){Aw(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),Dw(r,e,t,n)}function A5(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;n<a&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function Dw(r,e,t,n){A5(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function Aw(r,e,t,n){A5(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}var M5=Aoe;function Poe(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function vh(r,e,t){var n={},a=r==="toggleSelected",i;return t.eachComponent("legend",function(o){a&&i!=null?o[i?"select":"unSelect"](e.name):r==="allSelect"||r==="inverseSelect"?o[r]():(o[r](e.name),i=o.isSelected(e.name));var s=o.getData();L(s,function(l){var u=l.get("name");if(!(u===`
92
- `||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),r==="allSelect"||r==="inverseSelect"?{selected:n}:{name:e.name,selected:n}}function Ioe(r){r.registerAction("legendToggleSelect","legendselectchanged",Le(vh,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Le(vh,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Le(vh,"inverseSelect")),r.registerAction("legendSelect","legendselected",Le(vh,"select")),r.registerAction("legendUnSelect","legendunselected",Le(vh,"unSelect"))}function L5(r){r.registerComponentModel(Cw),r.registerComponentView(M5),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Poe),r.registerSubTypeDefaulter("legend",function(){return"plain"}),Ioe(r)}var Ooe=function(r){U(e,r);function e(){var t=r!==null&&r.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,n,a){var i=Ql(t);r.prototype.init.call(this,t,n,a),P5(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),P5(this,this.option,t)},e.type="legend.scroll",e.defaultOption=oo(Cw.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:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(Cw);function P5(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,so(e,t,{type:"box",ignoreSize:!!a})}var Eoe=Ooe,I5=De,Mw=["width","height"],Lw=["x","y"],Roe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new I5),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new I5)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=Q(f)?f:[f,f];d("pagePrev",0);var v=n.getModel("pageTextStyle");c.add(new Ze({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=ql(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:ve(u._pageGo,u,y,n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=p,c.add(m)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=Mw[u],f=Lw[u],h=Mw[1-u],v=Lw[1-u];o&&Ss("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=Ce(a);o&&(y[c]=a[c]-p[c]-d);var m=this._layoutContentAndController(t,i,y,u,c,h,v,f);if(o){if(s==="end")g[u]+=m[c]+d;else{var _=p[c]+d;g[u]-=_,m[f]-=_}m[c]+=p[c]+d,g[1-u]+=m[v]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[v]=Math.min(m[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;Ss(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),Ss("horizontal",h,t.get("pageButtonItemGap",!0));var v=c.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>a[o],g=[-v.x,-v.y];n||(g[i]=c[u]);var y=[0,0],m=[-d.x,-d.y],_=Re(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var b=t.get("pageButtonPosition",!0);b==="end"?m[i]+=a[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,c.setPosition(g),f.setPosition(y),h.setPosition(m);var w={x:0,y:0};if(w[o]=p?a[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-i]),f.__rectSize=a[o],p){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=w[s],f.setClipPath(new Ye({shape:x})),f.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(t);return S.pageIndex!=null&&Qe(c,{x:S.contentPosition[0],y:S.contentPosition[1]},p?t:null),this._updatePageInfoView(t,S),w},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;L(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=a.childOfName(c);v&&(v.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",ue(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=Mw[o],l=Lw[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],h=c.length,v=h?1:0,d={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var p=b(f);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=h;++g)_=b(c[g]),(!_&&m.e>y.s+i||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!w(m,_.s))&&y.i<m.i&&(m=y,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=y.i),++d.pageCount,++d.pageIndex),y=_;return d;function b(x){if(x){var S=x.getBoundingRect(),T=S[l]+x[l];return{s:T,e:T+S[s],i:x.__legendDataIndex}}}function w(x,S){return x.e>=S&&x.s<=S+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n!=null?n:i},e.type="legend.scroll",e}(M5),koe=Roe;function Noe(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function Boe(r){Ve(L5),r.registerComponentModel(Eoe),r.registerComponentView(koe),Noe(r)}function zoe(r){Ve(L5),Ve(Boe)}var Voe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=oo(lh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(lh),Foe=Voe,Pw=Ke();function $oe(r,e,t){Pw(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Hoe(r,e){for(var t=Pw(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||O5(t,o))}}}function O5(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Goe(r,e){var t={model:e,containsPoint:Le(Uoe,e),dispatchAction:Le(Woe,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Uf(r.getZr());return L(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(!!i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!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 Woe(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Uoe(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function qoe(r){var e,t="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return r.each(function(i){var o=i.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[t+s]>n[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function Yoe(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Pw(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=_e());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=MN(i);L(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Goe(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=_e());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){O5(a,i);return}var c=qoe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),ou(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Zoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),$oe(a,t,{pan:ve(Iw.pan,this),zoom:ve(Iw.zoom,this),scrollMove:ve(Iw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Hoe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(nw),Iw={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(!!o){var s=Ow[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Zs(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:E5(function(r,e,t,n,a,i){var o=Ow[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:E5(function(r,e,t,n,a,i){var o=Ow[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function E5(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(!!s){var l=r(o,s,e,t,n,a);if(Zs(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Ow={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}},joe=Zoe;function R5(r){aw(r),r.registerComponentModel(Foe),r.registerComponentView(joe),Yoe(r)}var Xoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=oo(lh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(lh),Koe=Xoe,dh=Ye,k5=7,Qoe=1,Ew=30,Joe=7,ph="horizontal",N5="vertical",ese=5,tse=["line","bar","candlestick","scatter"],rse={easing:"cubicOut",duration:100,delay:0},nse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=ve(this._onBrush,this),this._onBrushEnd=ve(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),ou(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}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){gf(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 n=this._displayables.sliderGroup=new De;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?Joe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===ph?{right:s.width-o.x-o.width,top:s.height-Ew-k5-i,width:o.width,height:Ew}:{right:k5,top:o.y,width:Ew,height:o.height},u=Ql(t.option);L(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=Ht(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===N5&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===ph&&!o?{scaleY:l?1:-1,scaleX:1}:a===ph&&o?{scaleY:l?1:-1,scaleX:-1}:a===N5&&!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=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new dh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new dh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ve(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var v=[0,n[1]],d=[0,n[0]],p=[[n[0],0],[0,0]],g=[],y=d[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]),b;o.each([l],function(D,A){if(_>0&&A%_){m+=y;return}var M=D==null||isNaN(D)||D==="",P=M?0:ut(D,f,v,!0);M&&!b&&A?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&b&&(p.push([m,0]),g.push([m,0])),p.push([m,P]),g.push([m,P]),m+=y,b=M}),u=this._shadowPolygonPts=p,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function x(D){var A=w.getModel(D?"selectedDataBackground":"dataBackground"),M=new De,P=new Vr({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Fr({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(P),M.add(I),M}for(var S=0;S<3;S++){var T=x(S===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();L(l,function(u){if(!a&&!(n!==!0&&ze(tse,u.get("type"))<0)){var c=i.getComponent(Co(o),s).axis,f=ase(o),h,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),a={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new dh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new dh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Qoe,fill:"rgba(0,0,0,0)"}})),L([0,1],function(_){var b=l.get("handleIcon");!Kd[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var w=zt(b,-1,0,2,2,null,!0);w.attr({cursor:B5(this._orient),draggable:!0,drift:ve(this._onDragMove,this,_),ondragend:ve(this._onDragEnd,this),onmouseover:ve(this._showDataInfo,this,!0),onmouseout:ve(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),S=l.get("handleSize");this._handleHeight=oe(S,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ro(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(a[_]=w);var D=l.getModel("textStyle");t.add(i[_]=new Ze({silent:!0,invisible:!0,style:bt(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var v=h;if(f){var d=oe(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Ye({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=n.moveHandleIcon=zt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=n.moveZone=new Ye({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:B5(this._orient),drift:ve(this._onDragMove,this,"all"),ondragstart:ve(this._showDataInfo,this,!0),ondragend:ve(this._onDragEnd,this),onmouseover:ve(this._showDataInfo,this,!0),onmouseout:ve(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[ut(t[0],[0,100],n,!0),ut(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Zs(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?ut(s.minSpan,l,o,!0):null,s.maxSpan!=null?ut(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=gn([ut(i[0],o,l,!0),ut(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=gn(a.slice()),o=this._size;L([0,1],function(v){var d=n.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:a[v]+(v?-1:1),y:o[1]/2-p/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new Ye,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=gn(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=ao(a.handles[d].parent,this.group),g=Dd(d===0?"right":"left",p),y=this._handleWidth/2+ese,m=da([h[d]+(d===0?-y:y),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===ph?"middle":g,align:o===ph?g:"center",text:s[d]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return be(i)?i(t,s):ue(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){t=this._dragging||t;var n=this._displayables,a=n.handleLabels;a[0].attr("invisible",!t),a[1].attr("invisible",!t),n.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,ui(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=da([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new ke(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(!!this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=gn([ut(a.x,o,s,!0),ut(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ui(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new dh({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?rse:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=MN(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(nw);function ase(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function B5(r){return r==="vertical"?"ns-resize":"ew-resize"}var ise=nse;function z5(r){r.registerComponentModel(Koe),r.registerComponentView(ise),aw(r)}function ose(r){Ve(R5),Ve(z5)}var sse={get:function(r,e,t){var n=Ce((lse[r]||{})[e]);return t&&Q(n)?n[n.length-1]:n}},lse={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},V5=sse,F5=yr.mapVisual,use=yr.eachVisual,cse=Q,$5=L,fse=gn,hse=ut,vse=function(r){U(e,r);function e(){var t=r!==null&&r.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,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&a5(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=ve(t,this),this.controllerVisuals=vw(this.option.controller,n,t),this.targetVisuals=vw(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(a,i){n.push(i)}):n=vt(t),n},e.prototype.eachTargetSeries=function(t,n){L(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],Q(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(ue(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(be(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=fse([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],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,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Ee(i,a),Ee(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){cse(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,v){var d=f[h],p=f[v];d&&!p&&(p=f[v]={},$5(d,function(g,y){if(!!yr.isValidType(y)){var m=V5.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";$5(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&Ce(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&Ce(v)||(s?m[0]:[m[0],m[0]])),_.symbol=F5(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var w=-1/0;use(b,function(x){x>w&&(w=x)}),_.symbolSize=F5(b,function(x){return hse(x,[0,w],[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,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(qe),wg=vse,H5=[20,140],dse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=H5[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=H5[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):Q(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=gn((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent();return(n[0]<=a[0]||n[0]<=t)&&(n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=G5(this,"outOfRange",this.getExtent()),a=G5(this,"inRange",this.option.range.slice()),i=[];function o(v,d){i.push({value:v,color:t(v,d)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var f=1;l<c;l++)(!a.length||a[a.length-1]<n[l])&&(f&&(i.length&&o(i[i.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=oo(wg.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(wg);function G5(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var pse=dse,gse=function(r){U(e,r);function e(){var t=r!==null&&r.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,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=bs(n.get("padding")||0),i=t.getBoundingRect();t.add(new Ye({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function c(v,d){s[v]=d}var f=o.controllerVisuals[i||o.getValueState(t)],h=yr.prepareVisualTypes(f);return L(h,function(v){var d=f[v];a.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=f.__alphaForOpacity),yr.dependsOn(v,n)&&d&&d.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api;zd(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(Tt),W5=gse,U5=[["left","right","width"],["top","bottom","height"]];function q5(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=U5[o],l=[0,null,10],u={},c=0;c<3;c++)u[U5[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=Ht(u,i,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<i[f[1]]*.5?0:1]}function Sg(r,e){return L(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var ja=ut,yse=L,Y5=Math.min,Rw=Math.max,mse=12,_se=6,bse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.doRender=function(t,n,a,i){this._api=a,(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(!!n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new Ze({style:bt(v,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="horizontal"?f:"center",text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=q5(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new De;u.add(c),c.add(a.outOfRange=Z5()),c.add(a.inRange=Z5(null,s?X5(this._orient):null,ve(this._dragHandle,this,"all",!1),ve(this._dragHandle,this,"all",!0))),c.setClipPath(new Ye({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("\u56FD"),h=Rw(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,h,o),this._createHandle(n,u,1,i,h,o)),this._createIndicator(n,u,i,h,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=ve(this._dragHandle,this,a,!1),u=ve(this._dragHandle,this,a,!0),c=ua(t.get("handleSize"),i[0]),f=zt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=X5(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){ui(y.event)}}),f.x=i[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ps(f,!0),n.add(f);var v=this.visualMapModel.textStyleModel,d=new Ze({cursor:h,draggable:!0,drift:l,onmousemove:function(y){ui(y.event)},ondragend:u,style:bt(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[c,0],g=this._shapes;g.handleThumbs[a]=f,g.handleLabelPoints[a]=p,g.handleLabels[a]=d},e.prototype._createIndicator=function(t,n,a,i,o){var s=ua(t.get("indicatorSize"),a[0]),l=zt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ir){var c=l.style;l.useStyle(K({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new Ze({silent:!0,invisible:!0,style:bt(f,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:_se)+a[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=h,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(!!this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():j5(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[ja(n[0],a,i,!0),ja(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];Zs(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[ja(i[0],o,s,!0),ja(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new Hl(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new De(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(!!this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent();yse([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=t[c];var h=ja(t[c],[0,l[1]],u,!0),v=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=v/l[0],f.x=l[0]-v/2;var d=da(a.handleLabelPoints[c],ao(f,this.group));s[c].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(!!f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(t,"color",h),d=this.getControllerVisual(t,"symbolSize"),p=ja(t,s,u,!0),g=l[0]-d/2,y={x:f.x,y:f.y};f.y=p,f.x=g;var m=da(c.indicatorLabelPoint,ao(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),w=this._orient,x=w==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:x?b:"middle",align:x?"center":b});var S={x:g,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(S,D),_.animateTo(T,D)}else f.attr(S),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this._api.enterBlur(A[M])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=Y5(Rw(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(!!a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=Y5(Rw(o[0],t),o[1]);var l=xse(a,s,o),u=[t-l,t+l],c=ja(t,o,s,!0),f=[ja(u[0],o,s,!0),ja(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var h=this._hoverLinkDataIndices,v=[];(n||j5(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var d=XH(h,v);this._dispatchHighDown("downplay",Sg(d[0],a)),this._dispatchHighDown("highlight",Sg(d[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(As(t.target,function(l){var u=Me(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(!!i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.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 n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this._api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Sg(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,n,a,i){var o=ao(n,i?null:this.group);return Q(t)?da(t,o,a):Dd(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(W5);function Z5(r,e,t,n){return new Vr({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){ui(a.event)},ondragend:n})}function xse(r,e,t){var n=mse/2,a=r.get("hoverLinkDataSize");return a&&(n=ja(a,e,t,!0)/2),n}function j5(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function X5(r){return r==="vertical"?"ns-resize":"ew-resize"}var wse=bse,Sse={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Cse=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Tse=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(_ie(n.stateList,n.targetVisuals,ve(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(ve(Dse,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function Dse(r,e,t,n){for(var a=e.targetVisuals[n],i=yr.prepareVisualTypes(a),o={color:_f(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,h)}return o.color;function f(v){return o[v]}function h(v,d){o[v]=d}}var K5=L;function Ase(r){var e=r&&r.visualMap;Q(e)||(e=e?[e]:[]),K5(e,function(t){if(!!t){Ou(t,"splitList")&&!Ou(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&Q(n)&&K5(n,function(a){we(a)&&(Ou(a,"start")&&!Ou(a,"min")&&(a.min=a.start),Ou(a,"end")&&!Ou(a,"max")&&(a.max=a.end))})}})}function Ou(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var Q5=!1;function J5(r){Q5||(Q5=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Sse,Cse),L(Tse,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Ase))}function eB(r){r.registerComponentModel(pse),r.registerComponentView(wse),J5(r)}var Mse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],Lse[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=Ce(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=ee(this._pieceList,function(l){return l=Ce(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=yr.listVisualTypes(),i=this.isCategory();L(t.pieces,function(s){L(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),L(n,function(s,l){var u=!1;L(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&L(this.stateList,function(c){(t[c]||(t[c]={}))[l]=V5.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,L(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;L(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!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=Ce(t)},e.prototype.getValueState=function(t){var n=yr.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=yr.findPieceIndex(l,a);c===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(c,f){var h=i.getRepresentValue({interval:c});f||(f=i.getValueState(h));var v=t(h,f);c[0]===-1/0?a[0]=v:c[1]===1/0?a[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}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 L(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=oo(wg.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}(wg),Lse={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),m0(r),L(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;L(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),tB(e,r)},pieces:function(r){var e=this.option;L(e.pieces,function(t,n){we(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=t[h[v]],s[f]=l[v],c[f]=v===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=yr.retrieveVisuals(t),r.push(a)},this),tB(e,r),m0(r),L(r,function(t){var n=t.close,a=[["<","\u2264"][n[1]],[">","\u2265"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function tB(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Pse=Mse,Ise=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=Xt(n.get("showLabel",!0),!f);f&&this._renderEndsText(t,f[0],u,h,l),L(c.viewPieceList,function(v){var d=v.piece,p=new De;p.onclick=ve(this._onItemClick,this,d),this._enableHoverLink(p,v.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);p.add(new Ze({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(p)},this),f&&this._renderEndsText(t,f[1],u,h,l),Ss(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:Sg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return q5(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(!!n){var s=new De,l=this.visualMapModel.textStyleModel;s.add(new Ze({style:bt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=ee(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a){t.add(zt(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(!!i){var o=Ce(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,L(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}(W5),Ose=Ise;function rB(r){r.registerComponentModel(Pse),r.registerComponentView(Ose),J5(r)}function Ese(r){Ve(eB),Ve(rB)}var Rse={label:{enabled:!0},decal:{show:!1}},nB=Ke(),kse={};function Nse(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=Ce(Rse);Ee(n.label,r.getLocaleModel().get("aria"),!1),Ee(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=_e();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),nB(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(be(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var m=L_(h.ecModel,h.name,kse,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",b(_,m))}else{var d=h.getRawData(),p={},g=nB(h).scope;v.each(function(w){var x=v.getRawIndex(w);p[x]=w});var y=d.count();d.each(function(w){var x=p[w],S=d.getName(w)||w+"",T=L_(h.ecModel,S,g,y),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",b(D,T))})}function b(w,x){var S=w?K(K({},x),w):x;return S.dirty=!0,S}})}}function i(){var u=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=xe(c.option,u),!!c.get("enabled")){var f=e.getZr().dom;if(c.get("description")){f.setAttribute("aria-label",c.get("description"));return}var h=r.getSeriesCount(),v=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(h,d),g;if(!(h<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],b=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(b,{seriesCount:h}),r.eachSeries(function(T,D){if(D<p){var A=void 0,M=T.get("name"),P=M?"withName":"withoutName";A=h>1?c.get(["series","multiple",P]):c.get(["series","single",P]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var O=c.get(["data","partialData"]);A+=o(O,{displayCnt:v})}else A+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),z=[],V=0;V<I.count();V++)if(V<v){var G=I.getName(V),Z=I.getValues(V),te=c.get(["data",G?"withName":"withoutName"]);z.push(o(te,{name:G,value:Z.join(E)}))}A+=z.join(E)+R,_.push(A)}});var w=c.getModel(["series","multiple","separator"]),x=w.get("middle"),S=w.get("end");g+=_.join(x)+S,f.setAttribute("aria-label",g)}}}function o(u,c){if(!ue(u))return u;var f=u;return L(c,function(h,v){f=f.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),h)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){return r.getLocaleModel().get(["series","typeNames"])[u]||"\u81EA\u5B9A\u4E49\u56FE"}}function Bse(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},L(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function zse(r){r.registerPreprocessor(Bse),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Nse)}var aB={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Vse=function(){function r(e){var t=this._condVal=ue(e)?new RegExp(e):CT(e)?e:null;if(t==null){var n="";ot(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ue(t)?this._condVal.test(e):Xe(t)?this._condVal.test(e+""):!1},r}(),Fse=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),$se=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),Hse=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),Gse=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),Wse=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r}();function kw(r,e){if(r===!0||r===!1){var t=new Fse;return t.value=r,t}var n="";return oB(r)||ot(n),r.and?iB("and",r,e):r.or?iB("or",r,e):r.not?Use(r,e):qse(r,e)}function iB(r,e,t){var n=e[r],a="";Q(n)||ot(a),n.length||ot(a);var i=r==="and"?new $se:new Hse;return i.children=ee(n,function(o){return kw(o,t)}),i.children.length||ot(a),i}function Use(r,e){var t=r.not,n="";oB(t)||ot(n);var a=new Gse;return a.child=kw(t,e),a.child||ot(n),a}function qse(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Ge(r),o=r.parser,s=o?RM(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=ge(aB,u)?aB[u]:u,f=r[u],h=s?s(f):f,v=u7(c,h)||c==="reg"&&new Vse(h);v||ot(t),a.push(v)}}a.length||ot(t);var d=new Wse;return d.valueGetterParam=n,d.valueParser=s,d.getValue=e.getValue,d.subCondList=a,d}function oB(r){return we(r)&&!vr(r)}var Yse=function(){function r(e,t){this._cond=kw(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function Zse(r,e){return new Yse(r,e)}var jse={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=Zse(r.config,{valueGetterAttrMap:_e({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;ge(s,"dimension")||ot(l);var c=e.getDimensionInfo(u);return c||ot(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},Xse={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=vt(t);a.length||ot(n);var i=[];L(a,function(c){var f=c.dimension,h=c.order,v=c.parser,d=c.incomparable;if(f==null&&ot(n),h!=="asc"&&h!=="desc"&&ot(n),d&&d!=="min"&&d!=="max"){var p="";ot(p)}if(h!=="asc"&&h!=="desc"){var g="";ot(g)}var y=e.getDimensionInfo(f);y||ot(n);var m=v?RM(v):null;v&&!m&&ot(n),i.push({dimIdx:y.index,parser:m,comparator:new NM(h,d)})});var o=e.sourceFormat;o!==Ar&&o!==Vn&&ot(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<i.length;h++){var v=i[h],d=e.retrieveValueFromItem(c,v.dimIdx),p=e.retrieveValueFromItem(f,v.dimIdx);v.parser&&(d=v.parser(d),p=v.parser(p));var g=v.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function Kse(r){r.registerTransform(jse),r.registerTransform(Xse)}var Qse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new HM(this),GM(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),GM(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ha},e}(qe),Jse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(Tt);function ele(r){r.registerComponentModel(Qse),r.registerComponentView(Jse)}var Xa=Va.CMD;function Eu(r,e){return Math.abs(r-e)<1e-5}function Nw(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(I,O){a&&a.length>2&&n.push(a),a=[I,O]}function c(I,O,E,R){Eu(I,E)&&Eu(O,R)||a.push(I,O,E,R,E,R)}function f(I,O,E,R,z,V){var G=Math.abs(O-I),Z=Math.tan(G/4)*4/3,te=O<I?-1:1,$=Math.cos(I),H=Math.sin(I),Y=Math.cos(O),q=Math.sin(O),re=$*z+E,J=H*V+R,ne=Y*z+E,fe=q*V+R,ce=z*Z*te,se=V*Z*te;a.push(re-ce*H,J+se*$,ne+ce*q,fe-se*Y,ne,fe)}for(var h,v,d,p,g=0;g<t;){var y=e[g++],m=g===1;switch(m&&(i=e[g],o=e[g+1],s=i,l=o,(y===Xa.L||y===Xa.C||y===Xa.Q)&&(a=[s,l])),y){case Xa.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Xa.L:h=e[g++],v=e[g++],c(i,o,h,v),i=h,o=v;break;case Xa.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Xa.Q:h=e[g++],v=e[g++],d=e[g++],p=e[g++],a.push(i+2/3*(h-i),o+2/3*(v-o),d+2/3*(h-d),p+2/3*(v-p),d,p),i=d,o=p;break;case Xa.A:var _=e[g++],b=e[g++],w=e[g++],x=e[g++],S=e[g++],T=e[g++]+S;g+=1;var D=!e[g++];h=Math.cos(S)*w+_,v=Math.sin(S)*x+b,m?(s=h,l=v,u(s,l)):c(i,o,h,v),i=Math.cos(T)*w+_,o=Math.sin(T)*x+b;for(var A=(D?-1:1)*Math.PI/2,M=S;D?M>T:M<T;M+=A){var P=D?Math.max(M+A,T):Math.min(M+A,T);f(M,P,_,b,w,x)}break;case Xa.R:s=i=e[g++],l=o=e[g++],h=s+e[g++],v=l+e[g++],u(h,l),c(h,l,h,v),c(h,v,s,v),c(s,v,s,l),c(s,l,h,l);break;case Xa.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function Bw(r,e,t,n,a,i,o,s,l,u){if(Eu(r,t)&&Eu(e,n)&&Eu(a,o)&&Eu(i,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,v=s-e,d=Math.sqrt(h*h+v*v);h/=d,v/=d;var p=t-r,g=n-e,y=a-o,m=i-s,_=p*p+g*g,b=y*y+m*m;if(_<f&&b<f){l.push(o,s);return}var w=h*p+v*g,x=-h*y-v*m,S=_-w*w,T=b-x*x;if(S<f&&w>=0&&T<f&&x>=0){l.push(o,s);return}var D=[],A=[];Zi(r,t,a,o,.5,D),Zi(e,n,i,s,.5,A),Bw(D[0],A[0],D[1],A[1],D[2],A[2],D[3],A[3],l,u),Bw(D[4],A[4],D[5],A[5],D[6],A[6],D[7],A[7],l,u)}function tle(r,e){var t=Nw(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],f=i[u++],h=i[u++],v=i[u++],d=i[u++],p=i[u++];Bw(s,l,c,f,h,v,d,p,o,e),s=d,l=p}n.push(o)}return n}function sB(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function lB(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,c=l>Math.abs(u),f=sB([l,u],c?0:1,e),h=(c?s:u)/f.length,v=0;v<f.length;v++)for(var d=(c?u:s)/f[v],p=0;p<f[v];p++){var g={};c?(g.startAngle=i+h*v,g.endAngle=i+h*(v+1),g.r0=n+d*p,g.r=n+d*(p+1)):(g.startAngle=i+d*p,g.endAngle=i+d*(p+1),g.r0=n+h*v,g.r=n+h*(v+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function rle(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=sB([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,h=0;h<o.length;h++)for(var v=r[l]/o[h],d=0;d<o[h];d++){var p={};p[u]=h*f,p[c]=d*v,p[s]=f,p[l]=v,p.x+=r.x,p.y+=r.y,t.push(p)}}function uB(r,e,t,n){return r*n-t*e}function nle(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=uB(c,f,l,u);if(Math.abs(h)<1e-6)return null;var v=r-a,d=e-i,p=uB(v,d,c,f)/h;return p<0||p>1?null:new ke(p*l+r,p*u+e)}function ale(r,e,t){var n=new ke;ke.sub(n,t,e),n.normalize();var a=new ke;ke.sub(a,r,e);var i=a.dot(n);return i}function Ru(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function ile(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=nle(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:ale(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(g,y){return g.projPt-y.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],v=[c.pt.x,c.pt.y],d=[h],p=[v],i=u.idx+1;i<=c.idx;i++)Ru(d,r[i].slice());Ru(d,v),Ru(d,h);for(var i=c.idx+1;i<=u.idx+n;i++)Ru(p,r[i%n].slice());return Ru(p,h),Ru(p,v),[{points:d},{points:p}]}function cB(r){var e=r.points,t=[],n=[];od(e,t,n);var a=new Ne(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new ke,c=new ke;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),ile(e,u,c)}function Cg(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Cg(r,i[0],a,n),Cg(r,i[1],t-a,n)}return n}function ole(r,e){for(var t=[],n=0;n<e;n++)t.push(J0(r));return t}function sle(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function lle(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function ule(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":rle(n,e,t),a=Ye;break;case"sector":lB(n,e,t),a=zr;break;case"circle":lB({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=zr;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=ee(tle(r.getUpdatedPathProxy(),o),function(y){return lle(y)}),l=s.length;if(l===0)Cg(cB,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=ee(s,function(y){var m=[],_=[];od(y,m,_);var b=(_[1]-m[1])*(_[0]-m[0]);return c+=b,{poly:y,area:b}});f.sort(function(y,m){return m.area-y.area});for(var h=e,u=0;u<l;u++){var v=f[u];if(h<=0)break;var d=u===l-1?h:Math.ceil(v.area/c*e);d<0||(Cg(cB,{points:v.poly},d,t),h-=d)}}a=Vr;break}if(!a)return ole(r,e);for(var p=[],u=0;u<t.length;u++){var g=new a;g.setShape(t[u]),sle(r,g),p.push(g)}return p}function cle(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,v=2;v<s;){var d=o[v-2],p=o[v-1],g=o[v++],y=o[v++],m=o[v++],_=o[v++],b=o[v++],w=o[v++];if(h<=0){f.push(g,y,m,_,b,w);continue}for(var x=Math.min(h,c-1)+1,S=1;S<=x;S++){var T=S/x;Zi(d,g,m,b,T,a),Zi(p,y,_,w,T,i),d=a[3],p=i[3],f.push(a[1],i[1],a[2],i[2],d,p),g=a[5],y=i[5],m=a[6],_=i[6]}h-=x-1}return o===r?[f,e]:[r,f]}function fB(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function fle(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,f=void 0;l?u?(t=cle(l,u),c=t[0],f=t[1],n=c,a=f):(f=fB(a||l,l),c=l):(c=fB(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function hB(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],c=r[i+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function hle(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var v=h===0?c:(c+h-2)%l+2,d=r[v]-t[0],p=r[v+1]-t[1],g=e[h]-n[0],y=e[h+1]-n[1],m=g-d,_=y-p;f+=m*m+_*_}f<i&&(i=f,o=u)}return o}function vle(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function dle(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=hB(s),c=hB(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],h=[],v=0,d=1/0,p=[],g=s.length;i&&(s=vle(s));for(var y=hle(s,l,u,c)*6,m=g-2,_=0;_<m;_+=2){var b=(y+_)%m+2;f[_+2]=s[b]-u[0],f[_+3]=s[b+1]-u[1]}if(f[0]=s[y]-u[0],f[1]=s[y+1]-u[1],t>0)for(var w=n/t,x=-n/2;x<=n/2;x+=w){for(var S=Math.sin(x),T=Math.cos(x),D=0,_=0;_<s.length;_+=2){var A=f[_],M=f[_+1],P=l[_]-c[0],I=l[_+1]-c[1],O=P*T-I*S,E=P*S+I*T;p[_]=O,p[_+1]=E;var R=O-A,z=E-M;D+=R*R+z*z}if(D<d){d=D,v=x;for(var V=0;V<p.length;V++)h[V]=p[V]}}else for(var G=0;G<g;G+=2)h[G]=l[G]-c[0],h[G+1]=l[G+1]-c[1];a.push({from:f,to:h,fromCp:u,toCp:c,rotation:-v})}return a}function Tg(r){return r.__isCombineMorphing}var vB="__mOriginal_";function Dg(r,e,t){var n=vB+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function gh(r,e){var t=vB+e;r[t]&&(r[e]=r[t],r[t]=null)}function dB(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function pB(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=fle(Nw(t),Nw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&dB(i,s),l&&dB(o,l),Dg(e,"updateTransform",{replace:u}),e.transform=null;var c=dle(i,o,10,Math.PI),f=[];Dg(e,"buildPath",{replace:function(h){for(var v=e.__morphT,d=1-v,p=[],g=0;g<c.length;g++){var y=c[g],m=y.from,_=y.to,b=y.rotation*v,w=y.fromCp,x=y.toCp,S=Math.sin(b),T=Math.cos(b);pc(p,w,x,v);for(var D=0;D<m.length;D+=2){var A=m[D],M=m[D+1],P=_[D],I=_[D+1],O=A*d+P*v,E=M*d+I*v;f[D]=O*T-E*S+p[0],f[D+1]=O*S+E*T+p[1]}var R=f[0],z=f[1];h.moveTo(R,z);for(var D=2;D<m.length;){var P=f[D++],I=f[D++],V=f[D++],G=f[D++],Z=f[D++],te=f[D++];R===P&&z===I&&V===Z&&G===te?h.lineTo(Z,te):h.bezierCurveTo(P,I,V,G,Z,te),R=Z,z=te}}}})}function zw(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;pB(r,e),e.__morphT=0;function i(){gh(e,"buildPath"),gh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},xe({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function ple(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Ag(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=ee(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),a=Math.max(f,a),[c,f]}),o=ee(i,function(s,l){return{cp:s,z:ple(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function gB(r){return ule(r.path,r.count)}function Vw(){return{fromIndividuals:[],toIndividuals:[],count:0}}function gle(r,e,t){var n=[];function a(w){for(var x=0;x<w.length;x++){var S=w[x];Tg(S)?a(S.childrenRef()):S instanceof $e&&n.push(S)}}a(r);var i=n.length;if(!i)return Vw();var o=t.dividePath||gB,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Vw();n=Ag(n),s=Ag(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new fi,h=0;h<i;h++){var v=n[h],d=s[h];d.parent=e,d.copyTransform(f),c||pB(v,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function p(w){for(var x=0;x<s.length;x++)s[x].addSelfToZr(w)}Dg(e,"addSelfToZr",{after:function(w){p(w)}}),Dg(e,"removeSelfFromZr",{after:function(w){for(var x=0;x<s.length;x++)s[x].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,gh(e,"addSelfToZr"),gh(e,"removeSelfFromZr")}var y=s.length;if(c)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},h=0;h<y;h++){var b=c?xe({delay:(t.delay||0)+c(h,y,n[h],s[h]),done:_},t):t;zw(n[h],s[h],b)}else e.__morphT=0,e.animateTo({__morphT:1},xe({during:function(w){for(var x=0;x<y;x++){var S=s[x];S.__morphT=e.__morphT,S.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<r.length;w++)gh(r[w],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function yle(r,e,t){var n=e.length,a=[],i=t.dividePath||gB;function o(v){for(var d=0;d<v.length;d++){var p=v[d];Tg(p)?o(p.childrenRef()):p instanceof $e&&a.push(p)}}if(Tg(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(J0(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Vw()}a=Ag(a),e=Ag(e);for(var f=t.individualDelay,u=0;u<n;u++){var h=f?xe({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;zw(a[u],e[u],h)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function yB(r){return Q(r[0])}function mB(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var mle={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=J0(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function Fw(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Gl("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;yB(r)&&(u=r,c=e),yB(e)&&(u=e,c=r);function f(y,m,_,b,w){var x=y.many,S=y.one;if(x.length===1&&!w){var T=m?x[0]:S,D=m?S:x[0];if(Tg(T))f({many:[T],one:D},!0,_,b,!0);else{var A=s?xe({delay:s(_,b)},l):l;zw(T,D,A),i(T,D,T,D,A)}}else for(var M=xe({dividePath:mle[t],individualDelay:s&&function(z,V,G,Z){return s(z+_,b)}},l),P=m?gle(x,S,M):yle(S,x,M),I=P.fromIndividuals,O=P.toIndividuals,E=I.length,R=0;R<E;R++){var A=s?xe({delay:s(R,E)},l):l;i(I[R],O[R],m?x[R]:y.one,m?y.one:x[R],A)}}for(var h=u?u===r:r.length>e.length,v=u?mB(c,u):mB(h?e:r,[h?r:e]),d=0,p=0;p<v.length;p++)d+=v[p].many.length;for(var g=0,p=0;p<v.length;p++)f(v[p],h,g,d),g+=v[p].many.length}function el(r){if(!r)return[];if(Q(r)){for(var e=[],t=0;t<r.length;t++)e.push(el(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof $e&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var _B=1e4,_le=Ke();function ble(r){for(var e=r.dimensions,t=0;t<e.length;t++){var n=r.getDimensionInfo(e[t]);if(n&&n.otherDims.itemGroupId===0)return e[t]}}function bB(r){var e=[];return L(r,function(t){var n=t.data;if(!(n.count()>_B))for(var a=n.getIndices(),i=ble(n),o=0;o<a.length;o++)e.push({dataGroupId:t.dataGroupId,data:n,dim:t.dim||i,divide:t.divide,dataIndex:o})}),e}function $w(r,e,t){r.traverse(function(n){n instanceof $e&&Ct(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function Hw(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function ku(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function xle(r,e,t){var n=Gl("update",t,e);n&&r.traverse(function(a){if(a instanceof Rn){var i=G8(a);i&&a.animateFrom({style:i},n)}})}function wle(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function xB(r,e,t){var n=bB(r),a=bB(e);function i(y,m,_,b,w){(_||y)&&m.animateFrom({style:_&&_!==y?K(K({},_.style),y.style):y.style},w)}function o(y){for(var m=0;m<y.length;m++)if(y[m].dim)return y[m].dim}var s=o(n),l=o(a),u=!1;function c(y,m){return function(_){var b=_.data,w=_.dataIndex;if(m)return b.getId(w);var x=_.dataGroupId,S=y?s||l:l||s,T=S&&b.getDimensionInfo(S),D=T&&T.ordinalMeta;if(T){var A=b.get(T.name,w);return D&&D.categories[A]||A+""}var M=b.getRawDataItem(w);return M&&M.groupId?M.groupId+"":x||b.getId(w)}}var f=wle(n,a),h={};if(!f)for(var v=0;v<a.length;v++){var d=a[v],p=d.data.getItemGraphicEl(d.dataIndex);p&&(h[p.id]=!0)}function g(y,m){var _=n[m],b=a[y],w=b.data.hostModel,x=_.data.getItemGraphicEl(_.dataIndex),S=b.data.getItemGraphicEl(b.dataIndex);if(x===S){S&&xle(S,b.dataIndex,w);return}x&&h[x.id]||S&&(ku(S),x?(ku(x),Hw(x),u=!0,Fw(el(x),el(S),b.divide,w,y,i)):$w(S,w,y))}new mi(n,a,c(!0,f),c(!1,f),null,"multiple").update(g).updateManyToOne(function(y,m){var _=a[y],b=_.data,w=b.hostModel,x=b.getItemGraphicEl(_.dataIndex),S=lt(ee(m,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==x&&!h[T.id]});x&&(ku(x),S.length?(L(S,function(T){ku(T),Hw(T)}),u=!0,Fw(el(S),el(x),_.divide,w,y,i)):$w(x,w,_.dataIndex))}).updateOneToMany(function(y,m){var _=n[m],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&h[b.id])){var w=lt(ee(y,function(S){return a[S].data.getItemGraphicEl(a[S].dataIndex)}),function(S){return S&&S!==b}),x=a[y[0]].data.hostModel;w.length&&(L(w,function(S){return ku(S)}),b?(ku(b),Hw(b),u=!0,Fw(el(b),el(w),_.divide,x,y[0],i)):L(w,function(S){return $w(S,x,y[0])}))}}).updateManyToMany(function(y,m){new mi(m,y,function(_){return n[_].data.getId(n[_].dataIndex)},function(_){return a[_].data.getId(a[_].dataIndex)}).update(function(_,b){g(y[_],m[b])}).execute()}).execute(),u&&L(e,function(y){var m=y.data,_=m.hostModel,b=_&&t.getViewOfSeriesModel(_),w=Gl("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(x){x instanceof $e&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function wB(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function SB(r){return Q(r)?r.sort().join(","):r}function Ao(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Sle(r,e){var t=_e(),n=_e(),a=_e();return L(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=wB(i),c=SB(u);n.set(c,{dataGroupId:s,data:l}),Q(u)&&L(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),L(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=wB(i),u=SB(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ao(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ao(s),data:s}]});else if(Q(l)){var f=[];L(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Ao(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ao(s)}]})}else{var h=a.get(l);if(h){var v=t.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ao(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ao(s)})}}}}),t}function CB(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function Cle(r,e,t,n){var a=[],i=[];L(vt(r.from),function(o){var s=CB(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ao(e.oldData[s]),dim:o.dimension})}),L(vt(r.to),function(o){var s=CB(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ao(l),dim:o.dimension})}}),a.length>0&&i.length>0&&xB(a,i,n)}function Tle(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){L(vt(n.seriesTransition),function(a){L(vt(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Wd]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=_le(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(vt(i),function(v){Cle(v,a,n,t)});else{var o=Sle(a,n);L(o.keys(),function(v){var d=o.get(v);xB(d.oldSeries,d.newSeries,t)})}L(n.updatedSeries,function(v){v[Wd]&&(v[Wd]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<_B&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}Ve([Hq]),Ve([kq]),Ve([hY,PY,GY,PZ,YZ,$j,mX,aK,OK,$K,QK,rJ,LJ,HJ,lee,pee,Eee,Gee,rte,cte,Ste,lre]),Ve(Ire),Ve(fne),Ve(SE),Ve(Mne),Ve(UR),Ve(kne),Ve(Wne),Ve(Uae),Ve(die),Ve(sh),Ve(Rie),Ve(Bie),Ve(Qie),Ve(loe),Ve(goe),Ve(Coe),Ve(zoe),Ve(ose),Ve(R5),Ve(z5),Ve(Ese),Ve(eB),Ve(rB),Ve(zse),Ve(Kse),Ve(ele),Ve(Tle),Ve(tq);var Dle=Object.freeze(Object.defineProperty({__proto__:null,registerLocale:v_,version:z9,dependencies:V9,PRIORITY:WL,init:rU,connect:nU,disConnect:iP,disconnect:aU,dispose:iU,getInstanceByDom:d1,getInstanceById:oU,registerTheme:p1,registerPreprocessor:g1,registerProcessor:y1,registerPostInit:oP,registerPostUpdate:sP,registerUpdateLifecycle:lp,registerAction:ya,registerCoordinateSystem:lP,getCoordinateSystemDimensions:sU,registerLayout:uP,registerVisual:ho,registerLoading:_1,setCanvasCreator:lU,registerMap:fP,getMap:uU,registerTransform:hP,dataTool:cU,throttle:Yd,use:Ve,setPlatformAPI:mT,parseGeoJSON:N1,parseGeoJson:N1,env:je,Model:dt,Axis:Hn,innerDrawElementOnCanvas:J_,zrender:OH,matrix:_$,vector:n$,zrUtil:XF,color:Y$,helper:y6,number:S6,time:C6,graphic:T6,format:D6,util:A6,List:Pr,ComponentModel:qe,ComponentView:Tt,SeriesModel:xt,ChartView:pt,extendComponentModel:z6,extendComponentView:V6,extendSeriesModel:F6,extendChartView:$6},Symbol.toStringTag,{value:"Module"})),tl={},Nu={},TB={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1,t=function(){return"".concat(e++)};r.default=t})(TB);var Mg={},Lg={},Gw={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var o=this,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];clearTimeout(i),i=setTimeout(function(){n.apply(o,l)},a)}};r.default=e})(Gw);var Ai={};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.SensorTabIndex=Ai.SensorClassName=Ai.SizeSensorId=void 0;var Ale="size-sensor-id";Ai.SizeSensorId=Ale;var Mle="size-sensor-object";Ai.SensorClassName=Mle;var Lle="-1";Ai.SensorTabIndex=Lle,Object.defineProperty(Lg,"__esModule",{value:!0}),Lg.createSensor=void 0;var Ple=Ile(Gw),DB=Ai;function Ile(r){return r&&r.__esModule?r:{default:r}}var Ole=function(e){var t=void 0,n=[],a=function(){getComputedStyle(e).position==="static"&&(e.style.position="relative");var c=document.createElement("object");return c.onload=function(){c.contentDocument.defaultView.addEventListener("resize",i),i()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("class",DB.SensorClassName),c.setAttribute("tabindex",DB.SensorTabIndex),c.type="text/html",e.appendChild(c),c.data="about:blank",c},i=(0,Ple.default)(function(){n.forEach(function(u){u(e)})}),o=function(c){t||(t=a()),n.indexOf(c)===-1&&n.push(c)},s=function(){t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",i),t.parentNode.removeChild(t),t=void 0,n=[])},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&t&&s()};return{element:e,bind:o,destroy:s,unbind:l}};Lg.createSensor=Ole;var Pg={};Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.createSensor=void 0;var Ele=Rle(Gw);function Rle(r){return r&&r.__esModule?r:{default:r}}var kle=function(e){var t=void 0,n=[],a=(0,Ele.default)(function(){n.forEach(function(u){u(e)})}),i=function(){var c=new ResizeObserver(a);return c.observe(e),a(),c},o=function(c){t||(t=i()),n.indexOf(c)===-1&&n.push(c)},s=function(){t.disconnect(),n=[],t=void 0},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&t&&s()};return{element:e,bind:o,destroy:s,unbind:l}};Pg.createSensor=kle,Object.defineProperty(Mg,"__esModule",{value:!0}),Mg.createSensor=void 0;var Nle=Lg,Ble=Pg,zle=typeof ResizeObserver!="undefined"?Ble.createSensor:Nle.createSensor;Mg.createSensor=zle,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.removeSensor=Nu.getSensor=void 0;var Vle=$le(TB),Fle=Mg,Ig=Ai;function $le(r){return r&&r.__esModule?r:{default:r}}var yh={},Hle=function(e){var t=e.getAttribute(Ig.SizeSensorId);if(t&&yh[t])return yh[t];var n=(0,Vle.default)();e.setAttribute(Ig.SizeSensorId,n);var a=(0,Fle.createSensor)(e);return yh[n]=a,a};Nu.getSensor=Hle;var Gle=function(e){var t=e.element.getAttribute(Ig.SizeSensorId);e.element.removeAttribute(Ig.SizeSensorId),e.destroy(),t&&yh[t]&&delete yh[t]};Nu.removeSensor=Gle,Object.defineProperty(tl,"__esModule",{value:!0}),tl.ver=MB=tl.clear=AB=tl.bind=void 0;var Ww=Nu,Wle=function(e,t){var n=(0,Ww.getSensor)(e);return n.bind(t),function(){n.unbind(t)}},AB=tl.bind=Wle,Ule=function(e){var t=(0,Ww.getSensor)(e);(0,Ww.removeSensor)(t)},MB=tl.clear=Ule,qle="1.0.1";tl.ver=qle;function LB(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function Uw(r){return typeof r=="function"}function Yle(r){return typeof r=="string"}var Bu=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t},Zle=function(r){gT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var n=this.props.shouldSetOption;if(!(Uw(n)&&!n(t,this.props))){if(!Bu(t.theme,this.props.theme)||!Bu(t.opts,this.props.opts)||!Bu(t.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var a=["option","notMerge","lazyUpdate","showLoading","loadingOption"];Bu(LB(this.props,a),LB(t,a))||this.updateEChartsOption(),(!Bu(t.style,this.props.style)||!Bu(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)||this.echarts.init(this.ele,this.props.theme,this.props.opts)},e.prototype.dispose=function(){if(this.ele){try{MB(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){var t=this,n=this.props,a=n.onEvents,i=n.onChartReady,o=this.updateEChartsOption();this.bindEvents(o,a||{}),Uw(i)&&i(o),this.ele&&AB(this.ele,function(){t.resize()})},e.prototype.bindEvents=function(t,n){function a(o,s){Yle(o)&&Uw(s)&&t.on(o,function(l){s(l,t)})}for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a(i,n[i])},e.prototype.updateEChartsOption=function(){var t=this.props,n=t.option,a=t.notMerge,i=a===void 0?!1:a,o=t.lazyUpdate,s=o===void 0?!1:o,l=t.showLoading,u=t.loadingOption,c=u===void 0?null:u,f=this.getEchartsInstance();return f.setOption(n,i,s),l?f.showLoading(c):f.hideLoading(),f},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize()}catch(n){console.warn(n)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,n=this.props,a=n.style,i=n.className,o=i===void 0?"":i,s=hm({height:300},a);return C("div",{ref:function(l){t.ele=l},style:s,className:"echarts-for-react "+o})},e}(k.PureComponent),ht=function(r){gT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=Dle,n}return e}(Zle);const jle=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var h;const f={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(v=>v.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}}],yAxis:[{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}}],series:(h=r.datasets)==null?void 0:h.map(v=>({data:v.data,type:"line",name:v.label,stack:"Total",areaStyle:{},emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:u==null?void 0:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},Xle=({data:r,colors:e,updateGroup:t,isEnableGroupBy:n,backGroundColor:a,legendSettings:i,labelSettings:o,axisSettings:s,margins:l,customSettings:u})=>{var f,h;const c={toolbox:{feature:{saveAsImage:{name:"databrain"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...e!=null&&e.length?{color:e}:{},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,axisTick:{alignWithLabel:!0},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none",interval:0,rotate:50,hideOverlap:!0,overflow:"truncate"},splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"}},yAxis:{type:"value",position:s.axis,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},legend:{data:(f=r.datasets)==null?void 0:f.map(v=>v.label),show:i.show,top:i.top,left:i.left,right:i.right,bottom:i.bottom,orient:i.position},series:(h=r.datasets)==null?void 0:h.map(v=>({data:v.data,type:"bar",name:v.label,barWidth:`${(u==null?void 0:u.barWidth)||0}%`,label:{show:o.show,position:o.position},showBackground:a==null?void 0:a.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:u==null?void 0:u.barRadius}}))};return F(Ie,{children:[!n&&C(ht,{style:{width:"100%",height:"90%"},option:c}),n&&t&&C(ht,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{t(v.name)}}})]})},Kle=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u})=>{var v;const c=["bar","line"];let f=1;const h={grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},...i!=null&&i.length?{color:i}:{},toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(d=>d.label)},xAxis:[{type:"category",data:r.labels,axisPointer:{type:"shadow"},splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}}],yAxis:[{type:"value",min:0,max:9e3,interval:3e3,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},{type:"value",min:0,max:25,interval:5,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}}],series:(v=r.datasets)==null?void 0:v.map(d=>(f===0?f=1:f=0,{name:d.label,type:c[f],tooltip:{valueFormatter(p){return`${p}`}},data:d.data,label:{show:n.show,position:n.position},showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:h}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{o(d.name)}}})]})},Qle=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,customSettings:u})=>{var f,h;const c={tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},xAxis:{type:"category",boundaryGap:!1,data:r.labels,splitLine:{show:u.hideSplitLines==="horizontal"||u.hideSplitLines==="none"},axisLine:{show:u.hideAxisLines==="y"||u.hideAxisLines==="none"},axisLabel:{show:u.axisLabels==="y"||u.axisLabels==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:u.hideSplitLines==="vertical"||u.hideSplitLines==="none"},axisLine:{show:u.hideAxisLines==="x"||u.hideAxisLines==="none"},axisLabel:{show:u.axisLabels==="x"||u.axisLabels==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:(f=r.datasets)==null?void 0:f.map(v=>v.label)},series:(h=r.datasets)==null?void 0:h.map(v=>({data:v.data,type:"line",name:v.label,label:{show:n.show,position:n.position},emphasis:{focus:"series"}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:c}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{s(v.name)}}})]})},Jle=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s})=>{var c,f,h;if(((f=(c=r==null?void 0:r.datasets[0])==null?void 0:c.data)==null?void 0:f.length)>1){const v=[];let d=100;(h=r==null?void 0:r.datasets)==null||h.map(g=>{const y=[];let m=0;g.data.map(_=>{const b={value:_,name:r.labels[m]};y.push(b),m+=1}),v.push([g.label,y])});const p={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},legend:{show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:v.map(g=>(d-=20,{name:g[0],type:"pie",radius:`${d}%`,data:g[1],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:n.show,position:n.position},labelLine:{show:!1}}))};return F(Ie,{children:[s&&C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:p,onEvents:{click:g=>{o(g.name)}}})}),!s&&C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:p})})]})}const l=r==null?void 0:r.datasets.map((v,d)=>({value:v.data,name:r==null?void 0:r.labels[d]})),u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{data:r==null?void 0:r.labels,show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},series:{type:"pie",radius:"80%",data:l,label:{show:!1},labelLine:{show:!1}}};return C(Ie,{children:F(Ie,{children:[s&&C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:u,onEvents:{click:v=>{o(v.name)}}})}),!s&&C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:u})})]})})},eue=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u})=>{var f;const c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(h=>h.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{type:"category",data:r.labels,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:(f=r.datasets)==null?void 0:f.map(h=>({data:h.data,type:"bar",name:h.label,barWidth:`${u==null?void 0:u.barWidth}%`,emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:u==null?void 0:u.barRadius}}))};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:c}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:h=>{o(h.name)}}})]})},tue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var h;const f={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:v=>`${v.map(d=>`${d.seriesName}: ${d.value}<br />`).join("")}`},xAxis:{type:"category",data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(v=>v.label)},series:(h=r.datasets)==null?void 0:h.map(v=>({symbolSize:10,data:v.data,type:"scatter",name:v.label,label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},rue=({data:r,margins:e,labelSettings:t,axisSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u})=>{var f,h;const c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter(v){const d=v[1];return`${d.name}<br/>${d.value}`}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{type:"value",position:n.axis,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:(f=r.datasets)==null?void 0:f[1],showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}},{name:"Life Cost",type:"bar",stack:"Total",label:{show:t.show,position:t.position},data:(h=r.datasets)==null?void 0:h[0]}]};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:c}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{o(v.name)}}})]})},nue=({funnelData:r,margins:e,legendSettings:t,labelSettings:n,colors:a})=>{const i={tooltip:{trigger:"item",formatter:"{b} : {c}k",backgroundColor:"black",textStyle:{color:"white"}},...a!=null&&a.length?{color:a}:{},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r==null?void 0:r.name},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:[{name:"Funnel",type:"funnel",left:"10%",top:60,bottom:60,width:"80%",height:"60%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:3,label:{show:n.show,position:n.position},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:r}]};return C(Ie,{children:C(ht,{style:{width:"100%",height:"90%"},option:i})})},aue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,customSettings:u})=>{var v;const c=[];let f=8;(v=r==null?void 0:r.datasets)==null||v.map(d=>{const p=[];let g=0;const y=d.label;d.data.map(m=>{p.push([r.labels[g],m,y]),g+=1}),c.push(p)});const h={tooltip:{backgroundColor:"black",textStyle:{color:"white"}},...o!=null&&o.length?{color:o}:{},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:c.map(d=>d[0][2])},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none",lineStyle:{type:"dashed"}},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{position:a.axis,scale:!0,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none",lineStyle:{type:"dashed"}},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:c.map(d=>{f+=3;const p="0123456789ABCDEF";let g="#";for(let y=0;y<6;y+=1)g+=p[Math.floor(Math.random()*16)];return{name:d[0][2],data:d.map(y=>({name:y[0],value:y[1]})),type:"scatter",symbolSize:f,emphasis:{focus:"series"},itemStyle:{shadowBlur:10,shadowColor:"rgba(120, 36, 50, 0.5)",shadowOffsetY:5,color:g},label:{show:n.show,position:n.position}}})};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:h}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{s(d.name)}}})]})},iue=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s})=>{var c,f;if(((c=r==null?void 0:r.labels)==null?void 0:c.length)>1){const h=[];let v=70,d=100;(f=r==null?void 0:r.datasets)==null||f.map(g=>{const y=[];let m=0;g.data.map(_=>{const b={value:_,name:r.labels[m]};y.push(b),m+=1}),h.push([g.label,y])});const p={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:h.map(g=>(v-=20,d-=20,{name:g[0],type:"pie",radius:[`${v}%`,`${d}%`],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:g[1],labelLine:{show:!1}}))};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:p}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:p,onEvents:{click:g=>{o(g.name)}}})]})}const l=r==null?void 0:r.datasets.map((h,v)=>({value:h.data,name:r==null?void 0:r.labels[v]})),u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:r==null?void 0:r.labels,orient:"vertical",left:"left",type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:l,labelLine:{show:!1}}};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:u}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:h=>{o(h.name)}}})]})},oue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var d;const f=["start","middle","end"];let h=2;const v={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(p=>p.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},series:(d=r.datasets)==null?void 0:d.map(p=>(h===0?h=1:h===1?h=2:h=0,{name:p.label,type:"line",step:f[h],data:p.data,areaStyle:{},label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:v}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{s(p.name)}}})]})},sue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var h,v;const f={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(d=>d.label)},xAxis:[{type:"category",data:r.labels,axisTick:{alignWithLabel:!0},splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}}],yAxis:[{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}}],series:[{name:(h=r.datasets[0])==null?void 0:h.label,type:"bar",barWidth:"100%",data:(v=r.datasets[0])==null?void 0:v.data,label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}]};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})},lue=({gaugeData:r,margins:e,legendSettings:t,enableSaveAs:n,colors:a})=>{let i=0;r==null||r.map(l=>{i+=l.value});const o=Math.floor(i/(r==null?void 0:r.length)),s={toolbox:{feature:{saveAsImage:n&&{name:"databrain"}}},...a!=null&&a.length?{color:a}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position},series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:o+100,splitNumber:12,itemStyle:{color:"blue"},progress:{show:!0,width:20},pointer:{show:!0},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-8,color:"black",fontSize:10},anchor:{show:!1},data:[{value:o}]}]};return C(ht,{style:{width:"100%",height:"113%"},option:s})},uue=({data:r,margins:e,enableSaveAs:t,colors:n,backGroundColor:a})=>{var l,u,c;const i=[],o=[];if((r==null?void 0:r.length)&&((l=r==null?void 0:r[0])==null?void 0:l[0])!==((u=r==null?void 0:r[1])==null?void 0:u[0])){const f=[r==null?void 0:r[0],r==null?void 0:r[1]];f==null||f.map(h=>{h.map(v=>{i.includes(v)||i.push(v)})});for(let h=0;h<((c=r==null?void 0:r[0])==null?void 0:c.length);h+=1)o.push({source:r[0][h],target:r[1][h],value:r[2][h]})}const s={toolbox:{feature:{saveAsImage:t&&{name:"databrain"}}},...n!=null&&n.length?{color:n}:{},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:i==null?void 0:i.map(f=>({name:f})),links:o,showBackground:a.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}};return C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:s})})},cue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var h,v;const f={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:d=>`${d.map(p=>`${p.seriesName}: ${p.value}<br />`).join("")}`},xAxis:{type:"category",data:r==null?void 0:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:(h=r==null?void 0:r.datasets)==null?void 0:h.map(d=>d.label)},series:(v=r==null?void 0:r.datasets)==null?void 0:v.map(d=>({data:d.data,type:"bar",name:d.label,stack:"x",barWidth:`${c==null?void 0:c.barWidth}%`,emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:c==null?void 0:c.barRadius}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})};var Og={container:"_container_m7ms4_1",label:"_label_m7ms4_7",value:"_value_m7ms4_13",sync:"_sync_m7ms4_19"};const fue=({data:r})=>{var e,t;return F("div",{className:Og.container,children:[C(me,{styleClass:"font-14c",variant:"h1",className:Og.label,children:(r==null?void 0:r.length)&&((e=r[0])==null?void 0:e.label)}),C(me,{styleClass:"font-14c",variant:"h1",className:Og.value,children:(r==null?void 0:r.length)&&((t=r[0])==null?void 0:t.value)}),C(me,{styleClass:"font-14",variant:"h1",className:Og.sync,children:"vs last sync"})]})},hue=({data:r,margins:e,legendSettings:t,axisSettings:n,enableSaveAs:a,colors:i,customSettings:o})=>{var c;const s=[],l=[];(c=r==null?void 0:r.datasets)==null||c.map(f=>{s.push(f.data),l.push(f.label)});const u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},title:[{text:"Box Plot",left:"center"}],legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(f=>f.label)},dataset:[{source:s},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:(o==null?void 0:o.hideSplitLines)==="horizontal"||(o==null?void 0:o.hideSplitLines)==="none"},axisLine:{show:(o==null?void 0:o.hideAxisLines)==="y"||(o==null?void 0:o.hideAxisLines)==="none"},axisLabel:{show:(o==null?void 0:o.axisLabels)==="y"||(o==null?void 0:o.axisLabels)==="none"}},yAxis:{type:"value",position:n.axis,splitArea:{show:!0},splitLine:{show:(o==null?void 0:o.hideSplitLines)==="vertical"||(o==null?void 0:o.hideSplitLines)==="none"},axisLine:{show:(o==null?void 0:o.hideAxisLines)==="x"||(o==null?void 0:o.hideAxisLines)==="none"},axisLabel:{show:(o==null?void 0:o.axisLabels)==="x"||(o==null?void 0:o.axisLabels)==="none"}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]};return C(Ie,{children:C(ht,{style:{width:"100%",height:"90%"},option:u})})};var xn={tableSection:"_tableSection_1irbj_1",tableContainer:"_tableContainer_1irbj_5",tableDiv:"_tableDiv_1irbj_9",table:"_table_1irbj_1",tableHead:"_tableHead_1irbj_17",tableHeadColHash:"_tableHeadColHash_1irbj_21",tableCol:"_tableCol_1irbj_25",tableColLabel:"_tableColLabel_1irbj_29",data:"_data_1irbj_33",tableBodyColHash:"_tableBodyColHash_1irbj_37",tableBodyColHashLabel:"_tableBodyColHashLabel_1irbj_41","table-loader-container":"_table-loader-container_1irbj_45","table-error-message":"_table-error-message_1irbj_49",noData:"_noData_1irbj_53"};const vue=({data:r})=>{var n,a,i;let e=0;const t=[];if(r)for(let o=0;o<((a=(n=r==null?void 0:r.datasets[0])==null?void 0:n.data)==null?void 0:a.length);o+=1){const s=[];for(let l=0;l<(r==null?void 0:r.datasets.length);l+=1){const u=(i=r==null?void 0:r.datasets[l])==null?void 0:i.data[e];s.push(u)}t.push(s),e+=1}return C("div",{className:xn.tableSection,children:C("div",{className:xn.tableContainer,children:C("div",{className:xn.tableDiv,children:F("table",{className:xn.table,children:[C("thead",{children:F("tr",{className:`${xn.tableHead}`,children:[C("th",{className:xn.tableHeadColHash,scope:"col",children:C(me,{styleClass:"font-14c",variant:"h1",children:"#"})},"num"),r==null?void 0:r.datasets.map((o,s)=>C("th",{className:xn.tableCol,scope:"col",children:C(me,{styleClass:"font-14c",variant:"h1",className:xn.tableColLabel,children:o.label})},o+s))]})}),C("tbody",{children:t.map((o,s)=>F("tr",{className:xn.data,children:[C("td",{className:xn.tableBodyColHash,children:C(me,{styleClass:"font-14",variant:"p",className:xn.tableBodyColHashLabel,children:s+1})},s),o.map((l,u)=>C(Ie,{children:C("td",{className:xn.tableCol,children:C(me,{styleClass:"font-14",variant:"p",className:xn.tableColLabel,children:l})},l+u)}))]},s))})]})})})})},qw=({labels:r,data:e,chartType:t,funnelData:n,sankeyData:a,singleValueData:i,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p})=>{var g,y,m,_;if(t===Et.line)return C(Qle,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,enableSaveAs:f,updateGroup:v,isEnableGroupBy:d});if(t===Et.stepped)return C(oue,{labels:r,data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.bar)return C(Xle,{data:e,updateGroup:v,isEnableGroupBy:d,colors:h,backGroundColor:p,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,margins:o});if(t===Et.stack)return C(cue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.histogram)return C(sue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.bubble)return C(aue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.scatter)return C(tue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.row)return C(eue,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.area)return(g=e.datasets)==null||g.map(b=>Object.assign(b,{fill:!0})),C(jle,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.combo){if((y=e.datasets)!=null&&y.length){const b=e.datasets[0];Object.assign(b,{type:"line"})}return C(Kle,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d})}if(t===Et.pie)return C(Jle,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.doughnut)return C(iue,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.waterfall){let b;if((m=e.datasets)!=null&&m.length){const w=(_=e.datasets[0])==null?void 0:_.data,x=[w==null?void 0:w[0]];if(w!=null&&w.length)for(let S=1;S<w.length-1;S++)x.push(x[S-1]-w[S]);x.push(w==null?void 0:w[w.length-1]),b={labels:e.labels,datasets:[w,x]}}return C(rue,{data:b||e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d})}return t===Et.funnel?C(nue,{funnelData:n,margins:o,legendSettings:s,labelSettings:l,colors:h}):t===Et.gauge?C(lue,{gaugeData:n,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h}):t===Et.sankey?C(uue,{data:a,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h}):t===Et.singleValue?C(fue,{data:i,margins:o,legendSettings:s,labelSettings:l}):t===Et.boxplot?C(hue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h}):t===Et.table?C(vue,{data:e,margins:o,legendSettings:s,labelSettings:l}):C("div",{className:hT.noChart,children:"No chart selected"})};var zu={modal:"_modal_ul4ir_1",popup:"_popup_ul4ir_9",header:"_header_ul4ir_17",headerTitle:"_headerTitle_ul4ir_25",content:"_content_ul4ir_33",footer:"_footer_ul4ir_41"},PB={"btn-primary":"_btn-primary_1h5ze_1","btn-secondary":"_btn-secondary_1h5ze_5","btn-reject":"_btn-reject_1h5ze_9","btn-outlined":"_btn-outlined_1h5ze_14","btn-tertiary":"_btn-tertiary_1h5ze_18","btn-default":"_btn-default_1h5ze_22","btn-large":"_btn-large_1h5ze_25","btn-small":"_btn-small_1h5ze_28","btn-xs":"_btn-xs_1h5ze_31","btn-medium":"_btn-medium_1h5ze_34","btn-11rem":"_btn-11rem_1h5ze_38"};const Be=({isDisabled:r=!1,type:e="button",className:t,children:n="",variant:a="primary",size:i="none",onClick:o,title:s})=>{const l=ii(t,PB[`btn-${a}`],i==="none"?null:PB[`btn-${i}`]);return C("button",{type:e,className:a==="custom"?t:l,onClick:o,disabled:r,title:s,children:n})},due=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M13.46 12L19 17.54V19h-1.46L12 13.46L6.46 19H5v-1.46L10.54 12L5 6.46V5h1.46L12 10.54L17.54 5H19v1.46L13.46 12Z"})}),pue=({children:r,isOpen:e,onClose:t,headerTitle:n,customHeader:a,icon:i})=>{const[o,s]=k.useState();return k.useEffect(()=>{const l=document.getElementById("databrain-root-portal")||document.createElement("div");l.setAttribute("id","databrain-root-portal"),document.body.appendChild(l),s(l)},[]),e?Ph.default.createPortal(C("div",{className:zu.modal,onClick:t,children:F("div",{className:zu.popup,onClick:l=>{l.stopPropagation()},children:[C("section",{className:zu.header,children:a||F(Ie,{children:[F("span",{className:zu.headerTitle,children:[i,n]}),C(Be,{variant:"custom",type:"button",onClick:t,children:C(due,{})})]})}),C("section",{className:zu.content,children:r})]})}),o):null};var Mo=le.default.memo(pue);const IB=({isShow:r,onCancel:e,chart:t})=>C(Mo,{isOpen:r,onClose:e,headerTitle:"Chart Preview",children:C("div",{className:PF.fullscreen,children:t&&C(qw,{labels:t.labels,data:t.data,chartType:t.chartType,funnelData:t.funnelData,sankeyData:t.sankeyData,singleValueData:t.singleValueData,margins:t.margins,legendSettings:t.legendSettings,labelSettings:t.labelSettings,axisSettings:t.axisSettings,backGroundColor:t.backGroundColor,enableSaveAs:!0,customSettings:t.customSettings})})}),Vu=r=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),C("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:C("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]});var Dt={cardContainer:"_cardContainer_grkp6_1",listHeader:"_listHeader_grkp6_9",metricName:"_metricName_grkp6_17",metricDescription:"_metricDescription_grkp6_25",popup:"_popup_grkp6_33",popupIcon:"_popupIcon_grkp6_41",popupMenu:"_popupMenu_grkp6_49",popupItem:"_popupItem_grkp6_57",csvBtn:"_csvBtn_grkp6_65",csvIcon:"_csvIcon_grkp6_73",metricData:"_metricData_grkp6_81",singleValueData:"_singleValueData_grkp6_89",singleValue:"_singleValue_grkp6_89",noData:"_noData_grkp6_105",loading:"_loading_grkp6_113",features:"_features_grkp6_121"};const xa=(r,e,t)=>async()=>{const a=await(await fetch("https://backend.usedatabrain.com/v1/graphql",{method:"POST",headers:{"Content-Type":"application/json","X-Hasura-Role":"anonymous",...t},body:JSON.stringify({query:r,variables:e})})).json();if(a.errors){const{message:i}=a.errors[0];throw new Error(i)}return a.data},gue=`
92
+ `||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),r==="allSelect"||r==="inverseSelect"?{selected:n}:{name:e.name,selected:n}}function Ioe(r){r.registerAction("legendToggleSelect","legendselectchanged",Le(vh,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Le(vh,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Le(vh,"inverseSelect")),r.registerAction("legendSelect","legendselected",Le(vh,"select")),r.registerAction("legendUnSelect","legendunselected",Le(vh,"unSelect"))}function L5(r){r.registerComponentModel(Cw),r.registerComponentView(M5),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Poe),r.registerSubTypeDefaulter("legend",function(){return"plain"}),Ioe(r)}var Ooe=function(r){U(e,r);function e(){var t=r!==null&&r.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,n,a){var i=Ql(t);r.prototype.init.call(this,t,n,a),P5(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),P5(this,this.option,t)},e.type="legend.scroll",e.defaultOption=oo(Cw.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:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(Cw);function P5(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,so(e,t,{type:"box",ignoreSize:!!a})}var Eoe=Ooe,I5=De,Mw=["width","height"],Lw=["x","y"],Roe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new I5),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new I5)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=Q(f)?f:[f,f];d("pagePrev",0);var v=n.getModel("pageTextStyle");c.add(new Ze({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=ql(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:ve(u._pageGo,u,y,n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=p,c.add(m)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=Mw[u],f=Lw[u],h=Mw[1-u],v=Lw[1-u];o&&Ss("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=Ce(a);o&&(y[c]=a[c]-p[c]-d);var m=this._layoutContentAndController(t,i,y,u,c,h,v,f);if(o){if(s==="end")g[u]+=m[c]+d;else{var _=p[c]+d;g[u]-=_,m[f]-=_}m[c]+=p[c]+d,g[1-u]+=m[v]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[v]=Math.min(m[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;Ss(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),Ss("horizontal",h,t.get("pageButtonItemGap",!0));var v=c.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>a[o],g=[-v.x,-v.y];n||(g[i]=c[u]);var y=[0,0],m=[-d.x,-d.y],_=Re(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var b=t.get("pageButtonPosition",!0);b==="end"?m[i]+=a[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,c.setPosition(g),f.setPosition(y),h.setPosition(m);var w={x:0,y:0};if(w[o]=p?a[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-i]),f.__rectSize=a[o],p){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=w[s],f.setClipPath(new Ye({shape:x})),f.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(t);return S.pageIndex!=null&&Qe(c,{x:S.contentPosition[0],y:S.contentPosition[1]},p?t:null),this._updatePageInfoView(t,S),w},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;L(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=a.childOfName(c);v&&(v.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",ue(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=Mw[o],l=Lw[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],h=c.length,v=h?1:0,d={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var p=b(f);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=h;++g)_=b(c[g]),(!_&&m.e>y.s+i||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!w(m,_.s))&&y.i<m.i&&(m=y,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=y.i),++d.pageCount,++d.pageIndex),y=_;return d;function b(x){if(x){var S=x.getBoundingRect(),T=S[l]+x[l];return{s:T,e:T+S[s],i:x.__legendDataIndex}}}function w(x,S){return x.e>=S&&x.s<=S+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n!=null?n:i},e.type="legend.scroll",e}(M5),koe=Roe;function Noe(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function Boe(r){Ve(L5),r.registerComponentModel(Eoe),r.registerComponentView(koe),Noe(r)}function zoe(r){Ve(L5),Ve(Boe)}var Voe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=oo(lh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(lh),Foe=Voe,Pw=Ke();function $oe(r,e,t){Pw(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Hoe(r,e){for(var t=Pw(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||O5(t,o))}}}function O5(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Goe(r,e){var t={model:e,containsPoint:Le(Uoe,e),dispatchAction:Le(Woe,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Uf(r.getZr());return L(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(!!i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!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 Woe(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Uoe(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function qoe(r){var e,t="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return r.each(function(i){var o=i.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[t+s]>n[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function Yoe(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Pw(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=_e());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=MN(i);L(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Goe(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=_e());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){O5(a,i);return}var c=qoe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),ou(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Zoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),$oe(a,t,{pan:ve(Iw.pan,this),zoom:ve(Iw.zoom,this),scrollMove:ve(Iw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Hoe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(nw),Iw={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(!!o){var s=Ow[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Zs(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:E5(function(r,e,t,n,a,i){var o=Ow[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:E5(function(r,e,t,n,a,i){var o=Ow[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function E5(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(!!s){var l=r(o,s,e,t,n,a);if(Zs(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Ow={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}},joe=Zoe;function R5(r){aw(r),r.registerComponentModel(Foe),r.registerComponentView(joe),Yoe(r)}var Xoe=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=oo(lh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(lh),Koe=Xoe,dh=Ye,k5=7,Qoe=1,Ew=30,Joe=7,ph="horizontal",N5="vertical",ese=5,tse=["line","bar","candlestick","scatter"],rse={easing:"cubicOut",duration:100,delay:0},nse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=ve(this._onBrush,this),this._onBrushEnd=ve(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),ou(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}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){gf(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 n=this._displayables.sliderGroup=new De;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?Joe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===ph?{right:s.width-o.x-o.width,top:s.height-Ew-k5-i,width:o.width,height:Ew}:{right:k5,top:o.y,width:Ew,height:o.height},u=Ql(t.option);L(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=Ht(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===N5&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===ph&&!o?{scaleY:l?1:-1,scaleX:1}:a===ph&&o?{scaleY:l?1:-1,scaleX:-1}:a===N5&&!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=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new dh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new dh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ve(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var v=[0,n[1]],d=[0,n[0]],p=[[n[0],0],[0,0]],g=[],y=d[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]),b;o.each([l],function(D,A){if(_>0&&A%_){m+=y;return}var M=D==null||isNaN(D)||D==="",P=M?0:ut(D,f,v,!0);M&&!b&&A?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&b&&(p.push([m,0]),g.push([m,0])),p.push([m,P]),g.push([m,P]),m+=y,b=M}),u=this._shadowPolygonPts=p,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function x(D){var A=w.getModel(D?"selectedDataBackground":"dataBackground"),M=new De,P=new Vr({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Fr({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(P),M.add(I),M}for(var S=0;S<3;S++){var T=x(S===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();L(l,function(u){if(!a&&!(n!==!0&&ze(tse,u.get("type"))<0)){var c=i.getComponent(Co(o),s).axis,f=ase(o),h,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),a={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new dh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new dh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Qoe,fill:"rgba(0,0,0,0)"}})),L([0,1],function(_){var b=l.get("handleIcon");!Kd[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var w=zt(b,-1,0,2,2,null,!0);w.attr({cursor:B5(this._orient),draggable:!0,drift:ve(this._onDragMove,this,_),ondragend:ve(this._onDragEnd,this),onmouseover:ve(this._showDataInfo,this,!0),onmouseout:ve(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),S=l.get("handleSize");this._handleHeight=oe(S,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ro(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(a[_]=w);var D=l.getModel("textStyle");t.add(i[_]=new Ze({silent:!0,invisible:!0,style:bt(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var v=h;if(f){var d=oe(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Ye({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=n.moveHandleIcon=zt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=n.moveZone=new Ye({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:B5(this._orient),drift:ve(this._onDragMove,this,"all"),ondragstart:ve(this._showDataInfo,this,!0),ondragend:ve(this._onDragEnd,this),onmouseover:ve(this._showDataInfo,this,!0),onmouseout:ve(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[ut(t[0],[0,100],n,!0),ut(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Zs(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?ut(s.minSpan,l,o,!0):null,s.maxSpan!=null?ut(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=gn([ut(i[0],o,l,!0),ut(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=gn(a.slice()),o=this._size;L([0,1],function(v){var d=n.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:a[v]+(v?-1:1),y:o[1]/2-p/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new Ye,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=gn(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=ao(a.handles[d].parent,this.group),g=Dd(d===0?"right":"left",p),y=this._handleWidth/2+ese,m=da([h[d]+(d===0?-y:y),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===ph?"middle":g,align:o===ph?g:"center",text:s[d]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return be(i)?i(t,s):ue(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){t=this._dragging||t;var n=this._displayables,a=n.handleLabels;a[0].attr("invisible",!t),a[1].attr("invisible",!t),n.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,ui(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=da([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new ke(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(!!this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=gn([ut(a.x,o,s,!0),ut(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ui(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new dh({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?rse:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=MN(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(nw);function ase(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function B5(r){return r==="vertical"?"ns-resize":"ew-resize"}var ise=nse;function z5(r){r.registerComponentModel(Koe),r.registerComponentView(ise),aw(r)}function ose(r){Ve(R5),Ve(z5)}var sse={get:function(r,e,t){var n=Ce((lse[r]||{})[e]);return t&&Q(n)?n[n.length-1]:n}},lse={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},V5=sse,F5=yr.mapVisual,use=yr.eachVisual,cse=Q,$5=L,fse=gn,hse=ut,vse=function(r){U(e,r);function e(){var t=r!==null&&r.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,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&a5(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=ve(t,this),this.controllerVisuals=vw(this.option.controller,n,t),this.targetVisuals=vw(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(a,i){n.push(i)}):n=vt(t),n},e.prototype.eachTargetSeries=function(t,n){L(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],Q(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(ue(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(be(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=fse([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],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,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Ee(i,a),Ee(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){cse(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,v){var d=f[h],p=f[v];d&&!p&&(p=f[v]={},$5(d,function(g,y){if(!!yr.isValidType(y)){var m=V5.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";$5(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&Ce(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&Ce(v)||(s?m[0]:[m[0],m[0]])),_.symbol=F5(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var w=-1/0;use(b,function(x){x>w&&(w=x)}),_.symbolSize=F5(b,function(x){return hse(x,[0,w],[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,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(qe),wg=vse,H5=[20,140],dse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=H5[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=H5[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):Q(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=gn((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent();return(n[0]<=a[0]||n[0]<=t)&&(n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=G5(this,"outOfRange",this.getExtent()),a=G5(this,"inRange",this.option.range.slice()),i=[];function o(v,d){i.push({value:v,color:t(v,d)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var f=1;l<c;l++)(!a.length||a[a.length-1]<n[l])&&(f&&(i.length&&o(i[i.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=oo(wg.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(wg);function G5(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var pse=dse,gse=function(r){U(e,r);function e(){var t=r!==null&&r.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,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=bs(n.get("padding")||0),i=t.getBoundingRect();t.add(new Ye({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function c(v,d){s[v]=d}var f=o.controllerVisuals[i||o.getValueState(t)],h=yr.prepareVisualTypes(f);return L(h,function(v){var d=f[v];a.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=f.__alphaForOpacity),yr.dependsOn(v,n)&&d&&d.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api;zd(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(Tt),W5=gse,U5=[["left","right","width"],["top","bottom","height"]];function q5(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=U5[o],l=[0,null,10],u={},c=0;c<3;c++)u[U5[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=Ht(u,i,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<i[f[1]]*.5?0:1]}function Sg(r,e){return L(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var ja=ut,yse=L,Y5=Math.min,Rw=Math.max,mse=12,_se=6,bse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.doRender=function(t,n,a,i){this._api=a,(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(!!n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new Ze({style:bt(v,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="horizontal"?f:"center",text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=q5(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new De;u.add(c),c.add(a.outOfRange=Z5()),c.add(a.inRange=Z5(null,s?X5(this._orient):null,ve(this._dragHandle,this,"all",!1),ve(this._dragHandle,this,"all",!0))),c.setClipPath(new Ye({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("\u56FD"),h=Rw(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,h,o),this._createHandle(n,u,1,i,h,o)),this._createIndicator(n,u,i,h,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=ve(this._dragHandle,this,a,!1),u=ve(this._dragHandle,this,a,!0),c=ua(t.get("handleSize"),i[0]),f=zt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=X5(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){ui(y.event)}}),f.x=i[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ps(f,!0),n.add(f);var v=this.visualMapModel.textStyleModel,d=new Ze({cursor:h,draggable:!0,drift:l,onmousemove:function(y){ui(y.event)},ondragend:u,style:bt(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[c,0],g=this._shapes;g.handleThumbs[a]=f,g.handleLabelPoints[a]=p,g.handleLabels[a]=d},e.prototype._createIndicator=function(t,n,a,i,o){var s=ua(t.get("indicatorSize"),a[0]),l=zt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ir){var c=l.style;l.useStyle(K({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new Ze({silent:!0,invisible:!0,style:bt(f,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:_se)+a[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=h,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(!!this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():j5(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[ja(n[0],a,i,!0),ja(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];Zs(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[ja(i[0],o,s,!0),ja(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new Hl(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new De(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(!!this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent();yse([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=t[c];var h=ja(t[c],[0,l[1]],u,!0),v=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=v/l[0],f.x=l[0]-v/2;var d=da(a.handleLabelPoints[c],ao(f,this.group));s[c].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(!!f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(t,"color",h),d=this.getControllerVisual(t,"symbolSize"),p=ja(t,s,u,!0),g=l[0]-d/2,y={x:f.x,y:f.y};f.y=p,f.x=g;var m=da(c.indicatorLabelPoint,ao(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),w=this._orient,x=w==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:x?b:"middle",align:x?"center":b});var S={x:g,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(S,D),_.animateTo(T,D)}else f.attr(S),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this._api.enterBlur(A[M])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=Y5(Rw(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(!!a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=Y5(Rw(o[0],t),o[1]);var l=xse(a,s,o),u=[t-l,t+l],c=ja(t,o,s,!0),f=[ja(u[0],o,s,!0),ja(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var h=this._hoverLinkDataIndices,v=[];(n||j5(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var d=XH(h,v);this._dispatchHighDown("downplay",Sg(d[0],a)),this._dispatchHighDown("highlight",Sg(d[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(As(t.target,function(l){var u=Me(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(!!i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.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 n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this._api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Sg(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,n,a,i){var o=ao(n,i?null:this.group);return Q(t)?da(t,o,a):Dd(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(W5);function Z5(r,e,t,n){return new Vr({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){ui(a.event)},ondragend:n})}function xse(r,e,t){var n=mse/2,a=r.get("hoverLinkDataSize");return a&&(n=ja(a,e,t,!0)/2),n}function j5(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function X5(r){return r==="vertical"?"ns-resize":"ew-resize"}var wse=bse,Sse={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Cse=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Tse=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(_ie(n.stateList,n.targetVisuals,ve(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(ve(Dse,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function Dse(r,e,t,n){for(var a=e.targetVisuals[n],i=yr.prepareVisualTypes(a),o={color:_f(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,h)}return o.color;function f(v){return o[v]}function h(v,d){o[v]=d}}var K5=L;function Ase(r){var e=r&&r.visualMap;Q(e)||(e=e?[e]:[]),K5(e,function(t){if(!!t){Ou(t,"splitList")&&!Ou(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&Q(n)&&K5(n,function(a){we(a)&&(Ou(a,"start")&&!Ou(a,"min")&&(a.min=a.start),Ou(a,"end")&&!Ou(a,"max")&&(a.max=a.end))})}})}function Ou(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var Q5=!1;function J5(r){Q5||(Q5=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Sse,Cse),L(Tse,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Ase))}function eB(r){r.registerComponentModel(pse),r.registerComponentView(wse),J5(r)}var Mse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],Lse[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=Ce(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=ee(this._pieceList,function(l){return l=Ce(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=yr.listVisualTypes(),i=this.isCategory();L(t.pieces,function(s){L(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),L(n,function(s,l){var u=!1;L(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&L(this.stateList,function(c){(t[c]||(t[c]={}))[l]=V5.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,L(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;L(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!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=Ce(t)},e.prototype.getValueState=function(t){var n=yr.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=yr.findPieceIndex(l,a);c===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(c,f){var h=i.getRepresentValue({interval:c});f||(f=i.getValueState(h));var v=t(h,f);c[0]===-1/0?a[0]=v:c[1]===1/0?a[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}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 L(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=oo(wg.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}(wg),Lse={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),m0(r),L(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;L(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),tB(e,r)},pieces:function(r){var e=this.option;L(e.pieces,function(t,n){we(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=t[h[v]],s[f]=l[v],c[f]=v===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=yr.retrieveVisuals(t),r.push(a)},this),tB(e,r),m0(r),L(r,function(t){var n=t.close,a=[["<","\u2264"][n[1]],[">","\u2265"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function tB(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Pse=Mse,Ise=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=Xt(n.get("showLabel",!0),!f);f&&this._renderEndsText(t,f[0],u,h,l),L(c.viewPieceList,function(v){var d=v.piece,p=new De;p.onclick=ve(this._onItemClick,this,d),this._enableHoverLink(p,v.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);p.add(new Ze({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(p)},this),f&&this._renderEndsText(t,f[1],u,h,l),Ss(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:Sg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return q5(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(!!n){var s=new De,l=this.visualMapModel.textStyleModel;s.add(new Ze({style:bt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=ee(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a){t.add(zt(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(!!i){var o=Ce(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,L(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}(W5),Ose=Ise;function rB(r){r.registerComponentModel(Pse),r.registerComponentView(Ose),J5(r)}function Ese(r){Ve(eB),Ve(rB)}var Rse={label:{enabled:!0},decal:{show:!1}},nB=Ke(),kse={};function Nse(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=Ce(Rse);Ee(n.label,r.getLocaleModel().get("aria"),!1),Ee(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=_e();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),nB(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(be(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var m=L_(h.ecModel,h.name,kse,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",b(_,m))}else{var d=h.getRawData(),p={},g=nB(h).scope;v.each(function(w){var x=v.getRawIndex(w);p[x]=w});var y=d.count();d.each(function(w){var x=p[w],S=d.getName(w)||w+"",T=L_(h.ecModel,S,g,y),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",b(D,T))})}function b(w,x){var S=w?K(K({},x),w):x;return S.dirty=!0,S}})}}function i(){var u=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=xe(c.option,u),!!c.get("enabled")){var f=e.getZr().dom;if(c.get("description")){f.setAttribute("aria-label",c.get("description"));return}var h=r.getSeriesCount(),v=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(h,d),g;if(!(h<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],b=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(b,{seriesCount:h}),r.eachSeries(function(T,D){if(D<p){var A=void 0,M=T.get("name"),P=M?"withName":"withoutName";A=h>1?c.get(["series","multiple",P]):c.get(["series","single",P]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var O=c.get(["data","partialData"]);A+=o(O,{displayCnt:v})}else A+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),z=[],V=0;V<I.count();V++)if(V<v){var G=I.getName(V),Z=I.getValues(V),te=c.get(["data",G?"withName":"withoutName"]);z.push(o(te,{name:G,value:Z.join(E)}))}A+=z.join(E)+R,_.push(A)}});var w=c.getModel(["series","multiple","separator"]),x=w.get("middle"),S=w.get("end");g+=_.join(x)+S,f.setAttribute("aria-label",g)}}}function o(u,c){if(!ue(u))return u;var f=u;return L(c,function(h,v){f=f.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),h)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){return r.getLocaleModel().get(["series","typeNames"])[u]||"\u81EA\u5B9A\u4E49\u56FE"}}function Bse(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},L(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function zse(r){r.registerPreprocessor(Bse),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Nse)}var aB={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Vse=function(){function r(e){var t=this._condVal=ue(e)?new RegExp(e):CT(e)?e:null;if(t==null){var n="";ot(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ue(t)?this._condVal.test(e):Xe(t)?this._condVal.test(e+""):!1},r}(),Fse=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),$se=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),Hse=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),Gse=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),Wse=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r}();function kw(r,e){if(r===!0||r===!1){var t=new Fse;return t.value=r,t}var n="";return oB(r)||ot(n),r.and?iB("and",r,e):r.or?iB("or",r,e):r.not?Use(r,e):qse(r,e)}function iB(r,e,t){var n=e[r],a="";Q(n)||ot(a),n.length||ot(a);var i=r==="and"?new $se:new Hse;return i.children=ee(n,function(o){return kw(o,t)}),i.children.length||ot(a),i}function Use(r,e){var t=r.not,n="";oB(t)||ot(n);var a=new Gse;return a.child=kw(t,e),a.child||ot(n),a}function qse(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Ge(r),o=r.parser,s=o?RM(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=ge(aB,u)?aB[u]:u,f=r[u],h=s?s(f):f,v=u7(c,h)||c==="reg"&&new Vse(h);v||ot(t),a.push(v)}}a.length||ot(t);var d=new Wse;return d.valueGetterParam=n,d.valueParser=s,d.getValue=e.getValue,d.subCondList=a,d}function oB(r){return we(r)&&!vr(r)}var Yse=function(){function r(e,t){this._cond=kw(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function Zse(r,e){return new Yse(r,e)}var jse={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=Zse(r.config,{valueGetterAttrMap:_e({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;ge(s,"dimension")||ot(l);var c=e.getDimensionInfo(u);return c||ot(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},Xse={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=vt(t);a.length||ot(n);var i=[];L(a,function(c){var f=c.dimension,h=c.order,v=c.parser,d=c.incomparable;if(f==null&&ot(n),h!=="asc"&&h!=="desc"&&ot(n),d&&d!=="min"&&d!=="max"){var p="";ot(p)}if(h!=="asc"&&h!=="desc"){var g="";ot(g)}var y=e.getDimensionInfo(f);y||ot(n);var m=v?RM(v):null;v&&!m&&ot(n),i.push({dimIdx:y.index,parser:m,comparator:new NM(h,d)})});var o=e.sourceFormat;o!==Ar&&o!==Vn&&ot(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<i.length;h++){var v=i[h],d=e.retrieveValueFromItem(c,v.dimIdx),p=e.retrieveValueFromItem(f,v.dimIdx);v.parser&&(d=v.parser(d),p=v.parser(p));var g=v.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function Kse(r){r.registerTransform(jse),r.registerTransform(Xse)}var Qse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new HM(this),GM(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),GM(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ha},e}(qe),Jse=function(r){U(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(Tt);function ele(r){r.registerComponentModel(Qse),r.registerComponentView(Jse)}var Xa=Va.CMD;function Eu(r,e){return Math.abs(r-e)<1e-5}function Nw(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(I,O){a&&a.length>2&&n.push(a),a=[I,O]}function c(I,O,E,R){Eu(I,E)&&Eu(O,R)||a.push(I,O,E,R,E,R)}function f(I,O,E,R,z,V){var G=Math.abs(O-I),Z=Math.tan(G/4)*4/3,te=O<I?-1:1,$=Math.cos(I),H=Math.sin(I),Y=Math.cos(O),q=Math.sin(O),re=$*z+E,J=H*V+R,ne=Y*z+E,fe=q*V+R,ce=z*Z*te,se=V*Z*te;a.push(re-ce*H,J+se*$,ne+ce*q,fe-se*Y,ne,fe)}for(var h,v,d,p,g=0;g<t;){var y=e[g++],m=g===1;switch(m&&(i=e[g],o=e[g+1],s=i,l=o,(y===Xa.L||y===Xa.C||y===Xa.Q)&&(a=[s,l])),y){case Xa.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Xa.L:h=e[g++],v=e[g++],c(i,o,h,v),i=h,o=v;break;case Xa.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Xa.Q:h=e[g++],v=e[g++],d=e[g++],p=e[g++],a.push(i+2/3*(h-i),o+2/3*(v-o),d+2/3*(h-d),p+2/3*(v-p),d,p),i=d,o=p;break;case Xa.A:var _=e[g++],b=e[g++],w=e[g++],x=e[g++],S=e[g++],T=e[g++]+S;g+=1;var D=!e[g++];h=Math.cos(S)*w+_,v=Math.sin(S)*x+b,m?(s=h,l=v,u(s,l)):c(i,o,h,v),i=Math.cos(T)*w+_,o=Math.sin(T)*x+b;for(var A=(D?-1:1)*Math.PI/2,M=S;D?M>T:M<T;M+=A){var P=D?Math.max(M+A,T):Math.min(M+A,T);f(M,P,_,b,w,x)}break;case Xa.R:s=i=e[g++],l=o=e[g++],h=s+e[g++],v=l+e[g++],u(h,l),c(h,l,h,v),c(h,v,s,v),c(s,v,s,l),c(s,l,h,l);break;case Xa.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function Bw(r,e,t,n,a,i,o,s,l,u){if(Eu(r,t)&&Eu(e,n)&&Eu(a,o)&&Eu(i,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,v=s-e,d=Math.sqrt(h*h+v*v);h/=d,v/=d;var p=t-r,g=n-e,y=a-o,m=i-s,_=p*p+g*g,b=y*y+m*m;if(_<f&&b<f){l.push(o,s);return}var w=h*p+v*g,x=-h*y-v*m,S=_-w*w,T=b-x*x;if(S<f&&w>=0&&T<f&&x>=0){l.push(o,s);return}var D=[],A=[];Zi(r,t,a,o,.5,D),Zi(e,n,i,s,.5,A),Bw(D[0],A[0],D[1],A[1],D[2],A[2],D[3],A[3],l,u),Bw(D[4],A[4],D[5],A[5],D[6],A[6],D[7],A[7],l,u)}function tle(r,e){var t=Nw(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],f=i[u++],h=i[u++],v=i[u++],d=i[u++],p=i[u++];Bw(s,l,c,f,h,v,d,p,o,e),s=d,l=p}n.push(o)}return n}function sB(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function lB(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,c=l>Math.abs(u),f=sB([l,u],c?0:1,e),h=(c?s:u)/f.length,v=0;v<f.length;v++)for(var d=(c?u:s)/f[v],p=0;p<f[v];p++){var g={};c?(g.startAngle=i+h*v,g.endAngle=i+h*(v+1),g.r0=n+d*p,g.r=n+d*(p+1)):(g.startAngle=i+d*p,g.endAngle=i+d*(p+1),g.r0=n+h*v,g.r=n+h*(v+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function rle(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=sB([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,h=0;h<o.length;h++)for(var v=r[l]/o[h],d=0;d<o[h];d++){var p={};p[u]=h*f,p[c]=d*v,p[s]=f,p[l]=v,p.x+=r.x,p.y+=r.y,t.push(p)}}function uB(r,e,t,n){return r*n-t*e}function nle(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=uB(c,f,l,u);if(Math.abs(h)<1e-6)return null;var v=r-a,d=e-i,p=uB(v,d,c,f)/h;return p<0||p>1?null:new ke(p*l+r,p*u+e)}function ale(r,e,t){var n=new ke;ke.sub(n,t,e),n.normalize();var a=new ke;ke.sub(a,r,e);var i=a.dot(n);return i}function Ru(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function ile(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=nle(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:ale(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(g,y){return g.projPt-y.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],v=[c.pt.x,c.pt.y],d=[h],p=[v],i=u.idx+1;i<=c.idx;i++)Ru(d,r[i].slice());Ru(d,v),Ru(d,h);for(var i=c.idx+1;i<=u.idx+n;i++)Ru(p,r[i%n].slice());return Ru(p,h),Ru(p,v),[{points:d},{points:p}]}function cB(r){var e=r.points,t=[],n=[];od(e,t,n);var a=new Ne(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new ke,c=new ke;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),ile(e,u,c)}function Cg(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Cg(r,i[0],a,n),Cg(r,i[1],t-a,n)}return n}function ole(r,e){for(var t=[],n=0;n<e;n++)t.push(J0(r));return t}function sle(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function lle(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function ule(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":rle(n,e,t),a=Ye;break;case"sector":lB(n,e,t),a=zr;break;case"circle":lB({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=zr;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=ee(tle(r.getUpdatedPathProxy(),o),function(y){return lle(y)}),l=s.length;if(l===0)Cg(cB,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=ee(s,function(y){var m=[],_=[];od(y,m,_);var b=(_[1]-m[1])*(_[0]-m[0]);return c+=b,{poly:y,area:b}});f.sort(function(y,m){return m.area-y.area});for(var h=e,u=0;u<l;u++){var v=f[u];if(h<=0)break;var d=u===l-1?h:Math.ceil(v.area/c*e);d<0||(Cg(cB,{points:v.poly},d,t),h-=d)}}a=Vr;break}if(!a)return ole(r,e);for(var p=[],u=0;u<t.length;u++){var g=new a;g.setShape(t[u]),sle(r,g),p.push(g)}return p}function cle(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,v=2;v<s;){var d=o[v-2],p=o[v-1],g=o[v++],y=o[v++],m=o[v++],_=o[v++],b=o[v++],w=o[v++];if(h<=0){f.push(g,y,m,_,b,w);continue}for(var x=Math.min(h,c-1)+1,S=1;S<=x;S++){var T=S/x;Zi(d,g,m,b,T,a),Zi(p,y,_,w,T,i),d=a[3],p=i[3],f.push(a[1],i[1],a[2],i[2],d,p),g=a[5],y=i[5],m=a[6],_=i[6]}h-=x-1}return o===r?[f,e]:[r,f]}function fB(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function fle(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,f=void 0;l?u?(t=cle(l,u),c=t[0],f=t[1],n=c,a=f):(f=fB(a||l,l),c=l):(c=fB(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function hB(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],c=r[i+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function hle(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var v=h===0?c:(c+h-2)%l+2,d=r[v]-t[0],p=r[v+1]-t[1],g=e[h]-n[0],y=e[h+1]-n[1],m=g-d,_=y-p;f+=m*m+_*_}f<i&&(i=f,o=u)}return o}function vle(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function dle(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=hB(s),c=hB(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],h=[],v=0,d=1/0,p=[],g=s.length;i&&(s=vle(s));for(var y=hle(s,l,u,c)*6,m=g-2,_=0;_<m;_+=2){var b=(y+_)%m+2;f[_+2]=s[b]-u[0],f[_+3]=s[b+1]-u[1]}if(f[0]=s[y]-u[0],f[1]=s[y+1]-u[1],t>0)for(var w=n/t,x=-n/2;x<=n/2;x+=w){for(var S=Math.sin(x),T=Math.cos(x),D=0,_=0;_<s.length;_+=2){var A=f[_],M=f[_+1],P=l[_]-c[0],I=l[_+1]-c[1],O=P*T-I*S,E=P*S+I*T;p[_]=O,p[_+1]=E;var R=O-A,z=E-M;D+=R*R+z*z}if(D<d){d=D,v=x;for(var V=0;V<p.length;V++)h[V]=p[V]}}else for(var G=0;G<g;G+=2)h[G]=l[G]-c[0],h[G+1]=l[G+1]-c[1];a.push({from:f,to:h,fromCp:u,toCp:c,rotation:-v})}return a}function Tg(r){return r.__isCombineMorphing}var vB="__mOriginal_";function Dg(r,e,t){var n=vB+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function gh(r,e){var t=vB+e;r[t]&&(r[e]=r[t],r[t]=null)}function dB(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function pB(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=fle(Nw(t),Nw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&dB(i,s),l&&dB(o,l),Dg(e,"updateTransform",{replace:u}),e.transform=null;var c=dle(i,o,10,Math.PI),f=[];Dg(e,"buildPath",{replace:function(h){for(var v=e.__morphT,d=1-v,p=[],g=0;g<c.length;g++){var y=c[g],m=y.from,_=y.to,b=y.rotation*v,w=y.fromCp,x=y.toCp,S=Math.sin(b),T=Math.cos(b);pc(p,w,x,v);for(var D=0;D<m.length;D+=2){var A=m[D],M=m[D+1],P=_[D],I=_[D+1],O=A*d+P*v,E=M*d+I*v;f[D]=O*T-E*S+p[0],f[D+1]=O*S+E*T+p[1]}var R=f[0],z=f[1];h.moveTo(R,z);for(var D=2;D<m.length;){var P=f[D++],I=f[D++],V=f[D++],G=f[D++],Z=f[D++],te=f[D++];R===P&&z===I&&V===Z&&G===te?h.lineTo(Z,te):h.bezierCurveTo(P,I,V,G,Z,te),R=Z,z=te}}}})}function zw(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;pB(r,e),e.__morphT=0;function i(){gh(e,"buildPath"),gh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},xe({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function ple(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Ag(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=ee(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),a=Math.max(f,a),[c,f]}),o=ee(i,function(s,l){return{cp:s,z:ple(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function gB(r){return ule(r.path,r.count)}function Vw(){return{fromIndividuals:[],toIndividuals:[],count:0}}function gle(r,e,t){var n=[];function a(w){for(var x=0;x<w.length;x++){var S=w[x];Tg(S)?a(S.childrenRef()):S instanceof $e&&n.push(S)}}a(r);var i=n.length;if(!i)return Vw();var o=t.dividePath||gB,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Vw();n=Ag(n),s=Ag(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new fi,h=0;h<i;h++){var v=n[h],d=s[h];d.parent=e,d.copyTransform(f),c||pB(v,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function p(w){for(var x=0;x<s.length;x++)s[x].addSelfToZr(w)}Dg(e,"addSelfToZr",{after:function(w){p(w)}}),Dg(e,"removeSelfFromZr",{after:function(w){for(var x=0;x<s.length;x++)s[x].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,gh(e,"addSelfToZr"),gh(e,"removeSelfFromZr")}var y=s.length;if(c)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},h=0;h<y;h++){var b=c?xe({delay:(t.delay||0)+c(h,y,n[h],s[h]),done:_},t):t;zw(n[h],s[h],b)}else e.__morphT=0,e.animateTo({__morphT:1},xe({during:function(w){for(var x=0;x<y;x++){var S=s[x];S.__morphT=e.__morphT,S.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<r.length;w++)gh(r[w],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function yle(r,e,t){var n=e.length,a=[],i=t.dividePath||gB;function o(v){for(var d=0;d<v.length;d++){var p=v[d];Tg(p)?o(p.childrenRef()):p instanceof $e&&a.push(p)}}if(Tg(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(J0(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Vw()}a=Ag(a),e=Ag(e);for(var f=t.individualDelay,u=0;u<n;u++){var h=f?xe({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;zw(a[u],e[u],h)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function yB(r){return Q(r[0])}function mB(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var mle={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=J0(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function Fw(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Gl("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;yB(r)&&(u=r,c=e),yB(e)&&(u=e,c=r);function f(y,m,_,b,w){var x=y.many,S=y.one;if(x.length===1&&!w){var T=m?x[0]:S,D=m?S:x[0];if(Tg(T))f({many:[T],one:D},!0,_,b,!0);else{var A=s?xe({delay:s(_,b)},l):l;zw(T,D,A),i(T,D,T,D,A)}}else for(var M=xe({dividePath:mle[t],individualDelay:s&&function(z,V,G,Z){return s(z+_,b)}},l),P=m?gle(x,S,M):yle(S,x,M),I=P.fromIndividuals,O=P.toIndividuals,E=I.length,R=0;R<E;R++){var A=s?xe({delay:s(R,E)},l):l;i(I[R],O[R],m?x[R]:y.one,m?y.one:x[R],A)}}for(var h=u?u===r:r.length>e.length,v=u?mB(c,u):mB(h?e:r,[h?r:e]),d=0,p=0;p<v.length;p++)d+=v[p].many.length;for(var g=0,p=0;p<v.length;p++)f(v[p],h,g,d),g+=v[p].many.length}function el(r){if(!r)return[];if(Q(r)){for(var e=[],t=0;t<r.length;t++)e.push(el(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof $e&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var _B=1e4,_le=Ke();function ble(r){for(var e=r.dimensions,t=0;t<e.length;t++){var n=r.getDimensionInfo(e[t]);if(n&&n.otherDims.itemGroupId===0)return e[t]}}function bB(r){var e=[];return L(r,function(t){var n=t.data;if(!(n.count()>_B))for(var a=n.getIndices(),i=ble(n),o=0;o<a.length;o++)e.push({dataGroupId:t.dataGroupId,data:n,dim:t.dim||i,divide:t.divide,dataIndex:o})}),e}function $w(r,e,t){r.traverse(function(n){n instanceof $e&&Ct(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function Hw(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function ku(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function xle(r,e,t){var n=Gl("update",t,e);n&&r.traverse(function(a){if(a instanceof Rn){var i=G8(a);i&&a.animateFrom({style:i},n)}})}function wle(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function xB(r,e,t){var n=bB(r),a=bB(e);function i(y,m,_,b,w){(_||y)&&m.animateFrom({style:_&&_!==y?K(K({},_.style),y.style):y.style},w)}function o(y){for(var m=0;m<y.length;m++)if(y[m].dim)return y[m].dim}var s=o(n),l=o(a),u=!1;function c(y,m){return function(_){var b=_.data,w=_.dataIndex;if(m)return b.getId(w);var x=_.dataGroupId,S=y?s||l:l||s,T=S&&b.getDimensionInfo(S),D=T&&T.ordinalMeta;if(T){var A=b.get(T.name,w);return D&&D.categories[A]||A+""}var M=b.getRawDataItem(w);return M&&M.groupId?M.groupId+"":x||b.getId(w)}}var f=wle(n,a),h={};if(!f)for(var v=0;v<a.length;v++){var d=a[v],p=d.data.getItemGraphicEl(d.dataIndex);p&&(h[p.id]=!0)}function g(y,m){var _=n[m],b=a[y],w=b.data.hostModel,x=_.data.getItemGraphicEl(_.dataIndex),S=b.data.getItemGraphicEl(b.dataIndex);if(x===S){S&&xle(S,b.dataIndex,w);return}x&&h[x.id]||S&&(ku(S),x?(ku(x),Hw(x),u=!0,Fw(el(x),el(S),b.divide,w,y,i)):$w(S,w,y))}new mi(n,a,c(!0,f),c(!1,f),null,"multiple").update(g).updateManyToOne(function(y,m){var _=a[y],b=_.data,w=b.hostModel,x=b.getItemGraphicEl(_.dataIndex),S=lt(ee(m,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==x&&!h[T.id]});x&&(ku(x),S.length?(L(S,function(T){ku(T),Hw(T)}),u=!0,Fw(el(S),el(x),_.divide,w,y,i)):$w(x,w,_.dataIndex))}).updateOneToMany(function(y,m){var _=n[m],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&h[b.id])){var w=lt(ee(y,function(S){return a[S].data.getItemGraphicEl(a[S].dataIndex)}),function(S){return S&&S!==b}),x=a[y[0]].data.hostModel;w.length&&(L(w,function(S){return ku(S)}),b?(ku(b),Hw(b),u=!0,Fw(el(b),el(w),_.divide,x,y[0],i)):L(w,function(S){return $w(S,x,y[0])}))}}).updateManyToMany(function(y,m){new mi(m,y,function(_){return n[_].data.getId(n[_].dataIndex)},function(_){return a[_].data.getId(a[_].dataIndex)}).update(function(_,b){g(y[_],m[b])}).execute()}).execute(),u&&L(e,function(y){var m=y.data,_=m.hostModel,b=_&&t.getViewOfSeriesModel(_),w=Gl("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(x){x instanceof $e&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function wB(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function SB(r){return Q(r)?r.sort().join(","):r}function Ao(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Sle(r,e){var t=_e(),n=_e(),a=_e();return L(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=wB(i),c=SB(u);n.set(c,{dataGroupId:s,data:l}),Q(u)&&L(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),L(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=wB(i),u=SB(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ao(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ao(s),data:s}]});else if(Q(l)){var f=[];L(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Ao(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ao(s)}]})}else{var h=a.get(l);if(h){var v=t.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ao(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ao(s)})}}}}),t}function CB(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function Cle(r,e,t,n){var a=[],i=[];L(vt(r.from),function(o){var s=CB(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ao(e.oldData[s]),dim:o.dimension})}),L(vt(r.to),function(o){var s=CB(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ao(l),dim:o.dimension})}}),a.length>0&&i.length>0&&xB(a,i,n)}function Tle(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){L(vt(n.seriesTransition),function(a){L(vt(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Wd]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=_le(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(vt(i),function(v){Cle(v,a,n,t)});else{var o=Sle(a,n);L(o.keys(),function(v){var d=o.get(v);xB(d.oldSeries,d.newSeries,t)})}L(n.updatedSeries,function(v){v[Wd]&&(v[Wd]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<_B&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}Ve([Hq]),Ve([kq]),Ve([hY,PY,GY,PZ,YZ,$j,mX,aK,OK,$K,QK,rJ,LJ,HJ,lee,pee,Eee,Gee,rte,cte,Ste,lre]),Ve(Ire),Ve(fne),Ve(SE),Ve(Mne),Ve(UR),Ve(kne),Ve(Wne),Ve(Uae),Ve(die),Ve(sh),Ve(Rie),Ve(Bie),Ve(Qie),Ve(loe),Ve(goe),Ve(Coe),Ve(zoe),Ve(ose),Ve(R5),Ve(z5),Ve(Ese),Ve(eB),Ve(rB),Ve(zse),Ve(Kse),Ve(ele),Ve(Tle),Ve(tq);var Dle=Object.freeze(Object.defineProperty({__proto__:null,registerLocale:v_,version:z9,dependencies:V9,PRIORITY:WL,init:rU,connect:nU,disConnect:iP,disconnect:aU,dispose:iU,getInstanceByDom:d1,getInstanceById:oU,registerTheme:p1,registerPreprocessor:g1,registerProcessor:y1,registerPostInit:oP,registerPostUpdate:sP,registerUpdateLifecycle:lp,registerAction:ya,registerCoordinateSystem:lP,getCoordinateSystemDimensions:sU,registerLayout:uP,registerVisual:ho,registerLoading:_1,setCanvasCreator:lU,registerMap:fP,getMap:uU,registerTransform:hP,dataTool:cU,throttle:Yd,use:Ve,setPlatformAPI:mT,parseGeoJSON:N1,parseGeoJson:N1,env:je,Model:dt,Axis:Hn,innerDrawElementOnCanvas:J_,zrender:OH,matrix:_$,vector:n$,zrUtil:XF,color:Y$,helper:y6,number:S6,time:C6,graphic:T6,format:D6,util:A6,List:Pr,ComponentModel:qe,ComponentView:Tt,SeriesModel:xt,ChartView:pt,extendComponentModel:z6,extendComponentView:V6,extendSeriesModel:F6,extendChartView:$6},Symbol.toStringTag,{value:"Module"})),tl={},Nu={},TB={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1,t=function(){return"".concat(e++)};r.default=t})(TB);var Mg={},Lg={},Gw={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var o=this,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];clearTimeout(i),i=setTimeout(function(){n.apply(o,l)},a)}};r.default=e})(Gw);var Ai={};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.SensorTabIndex=Ai.SensorClassName=Ai.SizeSensorId=void 0;var Ale="size-sensor-id";Ai.SizeSensorId=Ale;var Mle="size-sensor-object";Ai.SensorClassName=Mle;var Lle="-1";Ai.SensorTabIndex=Lle,Object.defineProperty(Lg,"__esModule",{value:!0}),Lg.createSensor=void 0;var Ple=Ile(Gw),DB=Ai;function Ile(r){return r&&r.__esModule?r:{default:r}}var Ole=function(e){var t=void 0,n=[],a=function(){getComputedStyle(e).position==="static"&&(e.style.position="relative");var c=document.createElement("object");return c.onload=function(){c.contentDocument.defaultView.addEventListener("resize",i),i()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("class",DB.SensorClassName),c.setAttribute("tabindex",DB.SensorTabIndex),c.type="text/html",e.appendChild(c),c.data="about:blank",c},i=(0,Ple.default)(function(){n.forEach(function(u){u(e)})}),o=function(c){t||(t=a()),n.indexOf(c)===-1&&n.push(c)},s=function(){t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",i),t.parentNode.removeChild(t),t=void 0,n=[])},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&t&&s()};return{element:e,bind:o,destroy:s,unbind:l}};Lg.createSensor=Ole;var Pg={};Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.createSensor=void 0;var Ele=Rle(Gw);function Rle(r){return r&&r.__esModule?r:{default:r}}var kle=function(e){var t=void 0,n=[],a=(0,Ele.default)(function(){n.forEach(function(u){u(e)})}),i=function(){var c=new ResizeObserver(a);return c.observe(e),a(),c},o=function(c){t||(t=i()),n.indexOf(c)===-1&&n.push(c)},s=function(){t.disconnect(),n=[],t=void 0},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&t&&s()};return{element:e,bind:o,destroy:s,unbind:l}};Pg.createSensor=kle,Object.defineProperty(Mg,"__esModule",{value:!0}),Mg.createSensor=void 0;var Nle=Lg,Ble=Pg,zle=typeof ResizeObserver!="undefined"?Ble.createSensor:Nle.createSensor;Mg.createSensor=zle,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.removeSensor=Nu.getSensor=void 0;var Vle=$le(TB),Fle=Mg,Ig=Ai;function $le(r){return r&&r.__esModule?r:{default:r}}var yh={},Hle=function(e){var t=e.getAttribute(Ig.SizeSensorId);if(t&&yh[t])return yh[t];var n=(0,Vle.default)();e.setAttribute(Ig.SizeSensorId,n);var a=(0,Fle.createSensor)(e);return yh[n]=a,a};Nu.getSensor=Hle;var Gle=function(e){var t=e.element.getAttribute(Ig.SizeSensorId);e.element.removeAttribute(Ig.SizeSensorId),e.destroy(),t&&yh[t]&&delete yh[t]};Nu.removeSensor=Gle,Object.defineProperty(tl,"__esModule",{value:!0}),tl.ver=MB=tl.clear=AB=tl.bind=void 0;var Ww=Nu,Wle=function(e,t){var n=(0,Ww.getSensor)(e);return n.bind(t),function(){n.unbind(t)}},AB=tl.bind=Wle,Ule=function(e){var t=(0,Ww.getSensor)(e);(0,Ww.removeSensor)(t)},MB=tl.clear=Ule,qle="1.0.1";tl.ver=qle;function LB(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function Uw(r){return typeof r=="function"}function Yle(r){return typeof r=="string"}var Bu=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t},Zle=function(r){gT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var n=this.props.shouldSetOption;if(!(Uw(n)&&!n(t,this.props))){if(!Bu(t.theme,this.props.theme)||!Bu(t.opts,this.props.opts)||!Bu(t.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var a=["option","notMerge","lazyUpdate","showLoading","loadingOption"];Bu(LB(this.props,a),LB(t,a))||this.updateEChartsOption(),(!Bu(t.style,this.props.style)||!Bu(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)||this.echarts.init(this.ele,this.props.theme,this.props.opts)},e.prototype.dispose=function(){if(this.ele){try{MB(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){var t=this,n=this.props,a=n.onEvents,i=n.onChartReady,o=this.updateEChartsOption();this.bindEvents(o,a||{}),Uw(i)&&i(o),this.ele&&AB(this.ele,function(){t.resize()})},e.prototype.bindEvents=function(t,n){function a(o,s){Yle(o)&&Uw(s)&&t.on(o,function(l){s(l,t)})}for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a(i,n[i])},e.prototype.updateEChartsOption=function(){var t=this.props,n=t.option,a=t.notMerge,i=a===void 0?!1:a,o=t.lazyUpdate,s=o===void 0?!1:o,l=t.showLoading,u=t.loadingOption,c=u===void 0?null:u,f=this.getEchartsInstance();return f.setOption(n,i,s),l?f.showLoading(c):f.hideLoading(),f},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize()}catch(n){console.warn(n)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,n=this.props,a=n.style,i=n.className,o=i===void 0?"":i,s=hm({height:300},a);return C("div",{ref:function(l){t.ele=l},style:s,className:"echarts-for-react "+o})},e}(k.PureComponent),ht=function(r){gT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=Dle,n}return e}(Zle);const jle=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var h;const f={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(v=>v.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}}],yAxis:[{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}}],series:(h=r.datasets)==null?void 0:h.map(v=>({data:v.data,type:"line",name:v.label,stack:"Total",areaStyle:{},emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:u==null?void 0:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},Xle=({data:r,colors:e,updateGroup:t,isEnableGroupBy:n,backGroundColor:a,legendSettings:i,labelSettings:o,axisSettings:s,margins:l,customSettings:u})=>{var f,h;const c={toolbox:{feature:{saveAsImage:{name:"databrain"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...e!=null&&e.length?{color:e}:{},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,axisTick:{alignWithLabel:!0},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none",interval:0,rotate:50,hideOverlap:!0,overflow:"truncate"},splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"}},yAxis:{type:"value",position:s.axis,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},legend:{data:(f=r.datasets)==null?void 0:f.map(v=>v.label),show:i.show,top:i.top,left:i.left,right:i.right,bottom:i.bottom,orient:i.position},series:(h=r.datasets)==null?void 0:h.map(v=>({data:v.data,type:"bar",name:v.label,barWidth:`${(u==null?void 0:u.barWidth)||0}%`,label:{show:o.show,position:o.position},showBackground:a==null?void 0:a.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:u==null?void 0:u.barRadius}}))};return F(Ie,{children:[!n&&C(ht,{style:{width:"100%",height:"90%"},option:c}),n&&t&&C(ht,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{t(v.name)}}})]})},Kle=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u})=>{var v;const c=["bar","line"];let f=1;const h={grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},...i!=null&&i.length?{color:i}:{},toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(d=>d.label)},xAxis:[{type:"category",data:r.labels,axisPointer:{type:"shadow"},splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}}],yAxis:[{type:"value",min:0,max:9e3,interval:3e3,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},{type:"value",min:0,max:25,interval:5,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}}],series:(v=r.datasets)==null?void 0:v.map(d=>(f===0?f=1:f=0,{name:d.label,type:c[f],tooltip:{valueFormatter(p){return`${p}`}},data:d.data,label:{show:n.show,position:n.position},showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:h}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{o(d.name)}}})]})},Qle=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,customSettings:u})=>{var f,h;const c={tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},xAxis:{type:"category",boundaryGap:!1,data:r.labels,splitLine:{show:u.hideSplitLines==="horizontal"||u.hideSplitLines==="none"},axisLine:{show:u.hideAxisLines==="y"||u.hideAxisLines==="none"},axisLabel:{show:u.axisLabels==="y"||u.axisLabels==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:u.hideSplitLines==="vertical"||u.hideSplitLines==="none"},axisLine:{show:u.hideAxisLines==="x"||u.hideAxisLines==="none"},axisLabel:{show:u.axisLabels==="x"||u.axisLabels==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:(f=r.datasets)==null?void 0:f.map(v=>v.label)},series:(h=r.datasets)==null?void 0:h.map(v=>({data:v.data,type:"line",name:v.label,label:{show:n.show,position:n.position},emphasis:{focus:"series"}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:c}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{s(v.name)}}})]})},Jle=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s})=>{var c,f,h;if(((f=(c=r==null?void 0:r.datasets[0])==null?void 0:c.data)==null?void 0:f.length)>1){const v=[];let d=100;(h=r==null?void 0:r.datasets)==null||h.map(g=>{const y=[];let m=0;g.data.map(_=>{const b={value:_,name:r.labels[m]};y.push(b),m+=1}),v.push([g.label,y])});const p={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},legend:{show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:v.map(g=>(d-=20,{name:g[0],type:"pie",radius:`${d}%`,data:g[1],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:n.show,position:n.position},labelLine:{show:!1}}))};return F(Ie,{children:[s&&C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:p,onEvents:{click:g=>{o(g.name)}}})}),!s&&C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:p})})]})}const l=r==null?void 0:r.datasets.map((v,d)=>({value:v.data,name:r==null?void 0:r.labels[d]})),u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{data:r==null?void 0:r.labels,show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},series:{type:"pie",radius:"80%",data:l,label:{show:!1},labelLine:{show:!1}}};return C(Ie,{children:F(Ie,{children:[s&&C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:u,onEvents:{click:v=>{o(v.name)}}})}),!s&&C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:u})})]})})},eue=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u})=>{var f;const c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(h=>h.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{type:"category",data:r.labels,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:(f=r.datasets)==null?void 0:f.map(h=>({data:h.data,type:"bar",name:h.label,barWidth:`${u==null?void 0:u.barWidth}%`,emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:u==null?void 0:u.barRadius}}))};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:c}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:h=>{o(h.name)}}})]})},tue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var h;const f={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:v=>`${v.map(d=>`${d.seriesName}: ${d.value}<br />`).join("")}`},xAxis:{type:"category",data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(v=>v.label)},series:(h=r.datasets)==null?void 0:h.map(v=>({symbolSize:10,data:v.data,type:"scatter",name:v.label,label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},rue=({data:r,margins:e,labelSettings:t,axisSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u})=>{var f,h;const c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter(v){const d=v[1];return`${d.name}<br/>${d.value}`}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{type:"value",position:n.axis,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:(f=r.datasets)==null?void 0:f[1],showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}},{name:"Life Cost",type:"bar",stack:"Total",label:{show:t.show,position:t.position},data:(h=r.datasets)==null?void 0:h[0]}]};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:c}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{o(v.name)}}})]})},nue=({funnelData:r,margins:e,legendSettings:t,labelSettings:n,colors:a})=>{const i={tooltip:{trigger:"item",formatter:"{b} : {c}k",backgroundColor:"black",textStyle:{color:"white"}},...a!=null&&a.length?{color:a}:{},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r==null?void 0:r.name},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:[{name:"Funnel",type:"funnel",left:"10%",top:60,bottom:60,width:"80%",height:"60%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:3,label:{show:n.show,position:n.position},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:r}]};return C(Ie,{children:C(ht,{style:{width:"100%",height:"90%"},option:i})})},aue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,customSettings:u})=>{var v;const c=[];let f=8;(v=r==null?void 0:r.datasets)==null||v.map(d=>{const p=[];let g=0;const y=d.label;d.data.map(m=>{p.push([r.labels[g],m,y]),g+=1}),c.push(p)});const h={tooltip:{backgroundColor:"black",textStyle:{color:"white"}},...o!=null&&o.length?{color:o}:{},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:c.map(d=>d[0][2])},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none",lineStyle:{type:"dashed"}},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{position:a.axis,scale:!0,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none",lineStyle:{type:"dashed"}},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:c.map(d=>{f+=3;const p="0123456789ABCDEF";let g="#";for(let y=0;y<6;y+=1)g+=p[Math.floor(Math.random()*16)];return{name:d[0][2],data:d.map(y=>({name:y[0],value:y[1]})),type:"scatter",symbolSize:f,emphasis:{focus:"series"},itemStyle:{shadowBlur:10,shadowColor:"rgba(120, 36, 50, 0.5)",shadowOffsetY:5,color:g},label:{show:n.show,position:n.position}}})};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:h}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{s(d.name)}}})]})},iue=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s})=>{var c,f;if(((c=r==null?void 0:r.labels)==null?void 0:c.length)>1){const h=[];let v=70,d=100;(f=r==null?void 0:r.datasets)==null||f.map(g=>{const y=[];let m=0;g.data.map(_=>{const b={value:_,name:r.labels[m]};y.push(b),m+=1}),h.push([g.label,y])});const p={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:h.map(g=>(v-=20,d-=20,{name:g[0],type:"pie",radius:[`${v}%`,`${d}%`],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:g[1],labelLine:{show:!1}}))};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:p}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:p,onEvents:{click:g=>{o(g.name)}}})]})}const l=r==null?void 0:r.datasets.map((h,v)=>({value:h.data,name:r==null?void 0:r.labels[v]})),u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:r==null?void 0:r.labels,orient:"vertical",left:"left",type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:l,labelLine:{show:!1}}};return F(Ie,{children:[!s&&C(ht,{style:{width:"100%",height:"90%"},option:u}),s&&o&&C(ht,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:h=>{o(h.name)}}})]})},oue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var d;const f=["start","middle","end"];let h=2;const v={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(p=>p.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},series:(d=r.datasets)==null?void 0:d.map(p=>(h===0?h=1:h===1?h=2:h=0,{name:p.label,type:"line",step:f[h],data:p.data,areaStyle:{},label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:v}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{s(p.name)}}})]})},sue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var h,v;const f={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(d=>d.label)},xAxis:[{type:"category",data:r.labels,axisTick:{alignWithLabel:!0},splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}}],yAxis:[{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}}],series:[{name:(h=r.datasets[0])==null?void 0:h.label,type:"bar",barWidth:"100%",data:(v=r.datasets[0])==null?void 0:v.data,label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}]};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})},lue=({gaugeData:r,margins:e,legendSettings:t,enableSaveAs:n,colors:a})=>{const i=Array.isArray(r)?r:[],o=i.reduce((u,c)=>u+c.value,0),s=Math.floor(o/i.length),l={toolbox:{feature:{saveAsImage:n&&{name:"databrain"}}},...a!=null&&a.length?{color:a}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position},series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:s+100,splitNumber:12,itemStyle:{color:"blue"},progress:{show:!0,width:20},pointer:{show:!0},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-8,color:"black",fontSize:10},anchor:{show:!1},data:[{value:s}]}]};return C(ht,{style:{width:"100%",height:"113%"},option:l})},uue=({data:r,margins:e,enableSaveAs:t,colors:n,backGroundColor:a})=>{var l,u,c;const i=[],o=[];if((r==null?void 0:r.length)&&((l=r==null?void 0:r[0])==null?void 0:l[0])!==((u=r==null?void 0:r[1])==null?void 0:u[0])){const f=[r==null?void 0:r[0],r==null?void 0:r[1]];f==null||f.map(h=>{h.map(v=>{i.includes(v)||i.push(v)})});for(let h=0;h<((c=r==null?void 0:r[0])==null?void 0:c.length);h+=1)o.push({source:r[0][h],target:r[1][h],value:r[2][h]})}const s={toolbox:{feature:{saveAsImage:t&&{name:"databrain"}}},...n!=null&&n.length?{color:n}:{},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:i==null?void 0:i.map(f=>({name:f})),links:o,showBackground:a.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}};return C(Ie,{children:C(ht,{style:{width:"100%",height:"100%"},option:s})})},cue=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c})=>{var h,v;const f={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:d=>`${d.map(p=>`${p.seriesName}: ${p.value}<br />`).join("")}`},xAxis:{type:"category",data:r==null?void 0:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:(h=r==null?void 0:r.datasets)==null?void 0:h.map(d=>d.label)},series:(v=r==null?void 0:r.datasets)==null?void 0:v.map(d=>({data:d.data,type:"bar",name:d.label,stack:"x",barWidth:`${c==null?void 0:c.barWidth}%`,emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:c==null?void 0:c.barRadius}}))};return F(Ie,{children:[!l&&C(ht,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ht,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})};var Og={container:"_container_m7ms4_1",label:"_label_m7ms4_7",value:"_value_m7ms4_13",sync:"_sync_m7ms4_19"};const fue=({data:r})=>{var e,t;return F("div",{className:Og.container,children:[C(me,{styleClass:"font-14c",variant:"h1",className:Og.label,children:(r==null?void 0:r.length)&&((e=r[0])==null?void 0:e.label)}),C(me,{styleClass:"font-14c",variant:"h1",className:Og.value,children:(r==null?void 0:r.length)&&((t=r[0])==null?void 0:t.value)}),C(me,{styleClass:"font-14",variant:"h1",className:Og.sync,children:"vs last sync"})]})},hue=({data:r,margins:e,legendSettings:t,axisSettings:n,enableSaveAs:a,colors:i,customSettings:o})=>{var c;const s=[],l=[];(c=r==null?void 0:r.datasets)==null||c.map(f=>{s.push(f.data),l.push(f.label)});const u={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}}},...i!=null&&i.length?{color:i}:{},title:[{text:"Box Plot",left:"center"}],legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(f=>f.label)},dataset:[{source:s},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:(o==null?void 0:o.hideSplitLines)==="horizontal"||(o==null?void 0:o.hideSplitLines)==="none"},axisLine:{show:(o==null?void 0:o.hideAxisLines)==="y"||(o==null?void 0:o.hideAxisLines)==="none"},axisLabel:{show:(o==null?void 0:o.axisLabels)==="y"||(o==null?void 0:o.axisLabels)==="none"}},yAxis:{type:"value",position:n.axis,splitArea:{show:!0},splitLine:{show:(o==null?void 0:o.hideSplitLines)==="vertical"||(o==null?void 0:o.hideSplitLines)==="none"},axisLine:{show:(o==null?void 0:o.hideAxisLines)==="x"||(o==null?void 0:o.hideAxisLines)==="none"},axisLabel:{show:(o==null?void 0:o.axisLabels)==="x"||(o==null?void 0:o.axisLabels)==="none"}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]};return C(Ie,{children:C(ht,{style:{width:"100%",height:"90%"},option:u})})};var xn={tableSection:"_tableSection_1irbj_1",tableContainer:"_tableContainer_1irbj_5",tableDiv:"_tableDiv_1irbj_9",table:"_table_1irbj_1",tableHead:"_tableHead_1irbj_17",tableHeadColHash:"_tableHeadColHash_1irbj_21",tableCol:"_tableCol_1irbj_25",tableColLabel:"_tableColLabel_1irbj_29",data:"_data_1irbj_33",tableBodyColHash:"_tableBodyColHash_1irbj_37",tableBodyColHashLabel:"_tableBodyColHashLabel_1irbj_41","table-loader-container":"_table-loader-container_1irbj_45","table-error-message":"_table-error-message_1irbj_49",noData:"_noData_1irbj_53"};const vue=({data:r})=>{var n,a,i;let e=0;const t=[];if(r)for(let o=0;o<((a=(n=r==null?void 0:r.datasets[0])==null?void 0:n.data)==null?void 0:a.length);o+=1){const s=[];for(let l=0;l<(r==null?void 0:r.datasets.length);l+=1){const u=(i=r==null?void 0:r.datasets[l])==null?void 0:i.data[e];s.push(u)}t.push(s),e+=1}return C("div",{className:xn.tableSection,children:C("div",{className:xn.tableContainer,children:C("div",{className:xn.tableDiv,children:F("table",{className:xn.table,children:[C("thead",{children:F("tr",{className:`${xn.tableHead}`,children:[C("th",{className:xn.tableHeadColHash,scope:"col",children:C(me,{styleClass:"font-14c",variant:"h1",children:"#"})},"num"),r==null?void 0:r.datasets.map((o,s)=>C("th",{className:xn.tableCol,scope:"col",children:C(me,{styleClass:"font-14c",variant:"h1",className:xn.tableColLabel,children:o.label})},o+s))]})}),C("tbody",{children:t.map((o,s)=>F("tr",{className:xn.data,children:[C("td",{className:xn.tableBodyColHash,children:C(me,{styleClass:"font-14",variant:"p",className:xn.tableBodyColHashLabel,children:s+1})},s),o.map((l,u)=>C(Ie,{children:C("td",{className:xn.tableCol,children:C(me,{styleClass:"font-14",variant:"p",className:xn.tableColLabel,children:l})},l+u)}))]},s))})]})})})})},qw=({labels:r,data:e,chartType:t,funnelData:n,sankeyData:a,singleValueData:i,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p})=>{var g,y,m,_;if(t===Et.line)return C(Qle,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,enableSaveAs:f,updateGroup:v,isEnableGroupBy:d});if(t===Et.stepped)return C(oue,{labels:r,data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p});if(t===Et.bar)return C(Xle,{data:e,updateGroup:v,isEnableGroupBy:d,colors:h,backGroundColor:p,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,margins:o});if(t===Et.stack)return C(cue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c});if(t===Et.histogram)return C(sue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c});if(t===Et.bubble)return C(aue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c});if(t===Et.scatter)return C(tue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c});if(t===Et.row)return C(eue,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c});if(t===Et.area)return(g=e.datasets)==null||g.map(b=>Object.assign(b,{fill:!0})),C(jle,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c});if(t===Et.combo){if((y=e.datasets)!=null&&y.length){const b=e.datasets[0];Object.assign(b,{type:"line"})}return C(Kle,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c})}if(t===Et.pie)return C(Jle,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.doughnut)return C(iue,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d});if(t===Et.waterfall){let b;if((m=e.datasets)!=null&&m.length){const w=(_=e.datasets[0])==null?void 0:_.data,x=[w==null?void 0:w[0]];if(w!=null&&w.length)for(let S=1;S<w.length-1;S++)x.push(x[S-1]-w[S]);x.push(w==null?void 0:w[w.length-1]),b={labels:e.labels,datasets:[w,x]}}return C(rue,{data:b||e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c})}return t===Et.funnel?C(nue,{funnelData:n,margins:o,legendSettings:s,labelSettings:l,colors:h}):t===Et.gauge?C(lue,{gaugeData:n,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h}):t===Et.sankey?C(uue,{data:a,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,backGroundColor:p}):t===Et.singleValue?C(fue,{data:i,margins:o,legendSettings:s,labelSettings:l}):t===Et.boxplot?C(hue,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,customSettings:c}):t===Et.table?C(vue,{data:e,margins:o,legendSettings:s,labelSettings:l}):C("div",{className:hT.noChart,children:"No chart selected"})};var zu={modal:"_modal_ul4ir_1",popup:"_popup_ul4ir_9",header:"_header_ul4ir_17",headerTitle:"_headerTitle_ul4ir_25",content:"_content_ul4ir_33",footer:"_footer_ul4ir_41"},PB={"btn-primary":"_btn-primary_1h5ze_1","btn-secondary":"_btn-secondary_1h5ze_5","btn-reject":"_btn-reject_1h5ze_9","btn-outlined":"_btn-outlined_1h5ze_14","btn-tertiary":"_btn-tertiary_1h5ze_18","btn-default":"_btn-default_1h5ze_22","btn-large":"_btn-large_1h5ze_25","btn-small":"_btn-small_1h5ze_28","btn-xs":"_btn-xs_1h5ze_31","btn-medium":"_btn-medium_1h5ze_34","btn-11rem":"_btn-11rem_1h5ze_38"};const Be=({isDisabled:r=!1,type:e="button",className:t,children:n="",variant:a="primary",size:i="none",onClick:o,title:s})=>{const l=ii(t,PB[`btn-${a}`],i==="none"?null:PB[`btn-${i}`]);return C("button",{type:e,className:a==="custom"?t:l,onClick:o,disabled:r,title:s,children:n})},due=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M13.46 12L19 17.54V19h-1.46L12 13.46L6.46 19H5v-1.46L10.54 12L5 6.46V5h1.46L12 10.54L17.54 5H19v1.46L13.46 12Z"})}),pue=({children:r,isOpen:e,onClose:t,headerTitle:n,customHeader:a,icon:i})=>{const[o,s]=k.useState();return k.useEffect(()=>{const l=document.getElementById("databrain-root-portal")||document.createElement("div");l.setAttribute("id","databrain-root-portal"),document.body.appendChild(l),s(l)},[]),e?Ph.default.createPortal(C("div",{className:zu.modal,onClick:t,children:F("div",{className:zu.popup,onClick:l=>{l.stopPropagation()},children:[C("section",{className:zu.header,children:a||F(Ie,{children:[F("span",{className:zu.headerTitle,children:[i,n]}),C(Be,{variant:"custom",type:"button",onClick:t,children:C(due,{})})]})}),C("section",{className:zu.content,children:r})]})}),o):null};var Mo=le.default.memo(pue);const IB=({isShow:r,onCancel:e,chart:t})=>C(Mo,{isOpen:r,onClose:e,headerTitle:"Chart Preview",children:C("div",{className:PF.fullscreen,children:t&&C(qw,{labels:t.labels,data:t.data,chartType:t.chartType,funnelData:t.funnelData,sankeyData:t.sankeyData,singleValueData:t.singleValueData,margins:t.margins,legendSettings:t.legendSettings,labelSettings:t.labelSettings,axisSettings:t.axisSettings,backGroundColor:t.backGroundColor,enableSaveAs:!0,customSettings:t.customSettings})})}),Vu=r=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),C("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:C("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]});var Dt={cardContainer:"_cardContainer_grkp6_1",listHeader:"_listHeader_grkp6_9",metricName:"_metricName_grkp6_17",metricDescription:"_metricDescription_grkp6_25",popup:"_popup_grkp6_33",popupIcon:"_popupIcon_grkp6_41",popupMenu:"_popupMenu_grkp6_49",popupItem:"_popupItem_grkp6_57",csvBtn:"_csvBtn_grkp6_65",csvIcon:"_csvIcon_grkp6_73",metricData:"_metricData_grkp6_81",singleValueData:"_singleValueData_grkp6_89",singleValue:"_singleValue_grkp6_89",noData:"_noData_grkp6_105",loading:"_loading_grkp6_113",features:"_features_grkp6_121"};const xa=(r,e,t)=>async()=>{const a=await(await fetch("https://backend.usedatabrain.com/v1/graphql",{method:"POST",headers:{"Content-Type":"application/json","X-Hasura-Role":"anonymous",...t},body:JSON.stringify({query:r,variables:e})})).json();if(a.errors){const{message:i}=a.errors[0];throw new Error(i)}return a.data},gue=`
93
93
  mutation CreateExternalMetric($chartOptions: jsonb = "", $companyId: uuid = "", $companyIntegrationId: uuid = "", $description: String = "", $inputFields: jsonb = "", $integrationName: String = "", $metricId: String = "", $metricQuery: String = "", $name: String = "", $outputColumns: String = "", $query: String = "", $isLive: Boolean, $clientId: String = "", $isCreatedByClient: Boolean = false, $createdBy: String = "", $timeGrain: String = "", $externalDashboardIds: [externalDashboardMetrics_insert_input!] = {}, $selectedGroupBy: jsonb = [], $isEnableGroupBy: Boolean = false, $groupBy: jsonb = {}) {
94
94
  insert_externalMetrics_one(
95
95
  object: {chartOptions: $chartOptions, companyId: $companyId, companyIntegrationId: $companyIntegrationId, description: $description, inputFields: $inputFields, integrationName: $integrationName, metricId: $metricId, metricQuery: $metricQuery, name: $name, outputColumns: $outputColumns, query: $query, isLive: $isLive, clientId: $clientId, isCreatedByClient: $isCreatedByClient, createdBy: $createdBy, timeGrain: $timeGrain, externalDashboardMetrics: {data: $externalDashboardIds}, selectedGroupBy: $selectedGroupBy, isEnableGroupBy: $isEnableGroupBy, groupBy: $groupBy}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databrainhq/plugin",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "description": "Databrain app dashboard ui plugin.",
5
5
  "author": "",
6
6
  "license": "MIT",