@databrainhq/plugin 0.7.3 → 0.7.5
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 +52 -61
- package/dist/index.umd.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -157,7 +157,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
157
157
|
timeTaken
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
`,TT=(r,e)=>pl(r===void 0?["QueryExternalMetric"]:["QueryExternalMetric",r],Ln(D$,r),e);var DT={csvlink:"_csvlink_azd6y_1",noChart:"_noChart_azd6y_7"};const MT=r=>{const e=document.documentElement;r.colors&&Object.entries(r.colors).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-color-${t}`,`${n}`)}),r.border&&Object.entries(r.border).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-border-${t}`,`${n}`)}),r.shadow&&Object.entries(r.shadow).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-shadow-${t}`,`${n}`)}),r.typography&&Object.entries(r.typography).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-typography-${t}`,`${n}`)}),r.breakpoint&&Object.entries(r.breakpoint).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-breakpoint-${t}`,`${n}`)})},AT=["rgb(56, 72, 211)","rgb(251, 208, 98)","rgb(234 88 12)","rgb(245 158 11)","rgb(234 179 8)","rgb(34 197 94)","rgb(4 120 87)","rgb(15 118 110)","rgb(8 145 178)","rgb(219 234 254)","rgb(30 58 138)","rgb(139 92 246)"],vm=({data:r,measure:e,sankeyValues:t,singleValue:n,step:a,xAxis:i,yAxisList:o})=>{const s=Array.isArray(r)?r.map(h=>i&&h[i]):[],l=o==null?void 0:o.map((h,v)=>({label:h,data:Array.isArray(r)?r.map(d=>d[o[v]]):[],borderColor:AT[v]})),u=Array.isArray(r)?r.map(h=>e&&a&&{value:h[e],name:h[a]}):[],c=t==null?void 0:t.map((h,v)=>Array.isArray(r)?r.map(d=>d[t[v]]):[]),f=Array.isArray(r)?r.map(h=>n&&{value:h[n],label:n}):[];return{labels:s,datasets:l,funnelData:u,sankeyData:c,singleValueData:f}},pv=[{value:"=",label:"Equal to (=)"},{value:"<>",label:"Not equal to (!=)"},{value:"<",label:"Less than (<)"},{value:"<=",label:"Less or equal (<=)"},{value:">",label:"Greater than (>)"},{value:">=",label:"Greater or equal (>=)"},{value:"IN",label:"In"},{value:"NOT IN",label:"Not in"},{value:"LIKE (case sensitive)",label:"Like (case sensitive)"},{value:"REGEX",label:"Regex"},{value:"IS NOT NULL",label:"Is not null"},{value:"IS NULL",label:"Is null"}],LT=[{value:"
|
|
160
|
+
`,TT=(r,e)=>pl(r===void 0?["QueryExternalMetric"]:["QueryExternalMetric",r],Ln(D$,r),e);var DT={csvlink:"_csvlink_azd6y_1",noChart:"_noChart_azd6y_7"};const MT=r=>{const e=document.documentElement;r.colors&&Object.entries(r.colors).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-color-${t}`,`${n}`)}),r.border&&Object.entries(r.border).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-border-${t}`,`${n}`)}),r.shadow&&Object.entries(r.shadow).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-shadow-${t}`,`${n}`)}),r.typography&&Object.entries(r.typography).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-typography-${t}`,`${n}`)}),r.breakpoint&&Object.entries(r.breakpoint).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-breakpoint-${t}`,`${n}`)})},AT=["rgb(56, 72, 211)","rgb(251, 208, 98)","rgb(234 88 12)","rgb(245 158 11)","rgb(234 179 8)","rgb(34 197 94)","rgb(4 120 87)","rgb(15 118 110)","rgb(8 145 178)","rgb(219 234 254)","rgb(30 58 138)","rgb(139 92 246)"],vm=({data:r,measure:e,sankeyValues:t,singleValue:n,step:a,xAxis:i,yAxisList:o})=>{const s=Array.isArray(r)?r.map(h=>i&&h[i]):[],l=o==null?void 0:o.map((h,v)=>({label:h,data:Array.isArray(r)?r.map(d=>d[o[v]]):[],borderColor:AT[v]})),u=Array.isArray(r)?r.map(h=>e&&a&&{value:h[e],name:h[a]}):[],c=t==null?void 0:t.map((h,v)=>Array.isArray(r)?r.map(d=>d[t[v]]):[]),f=Array.isArray(r)?r.map(h=>n&&{value:h[n],label:n}):[];return{labels:s,datasets:l,funnelData:u,sankeyData:c,singleValueData:f}},pv=[{value:"=",label:"Equal to (=)"},{value:"<>",label:"Not equal to (!=)"},{value:"<",label:"Less than (<)"},{value:"<=",label:"Less or equal (<=)"},{value:">",label:"Greater than (>)"},{value:">=",label:"Greater or equal (>=)"},{value:"IN",label:"In"},{value:"NOT IN",label:"Not in"},{value:"LIKE (case sensitive)",label:"Like (case sensitive)"},{value:"REGEX",label:"Regex"},{value:"IS NOT NULL",label:"Is not null"},{value:"IS NULL",label:"Is null"}],LT=[{value:"100",label:"100"},{value:"500",label:"500"},{value:"1000",label:"1000"},{value:"2000",label:"2000"},{value:"5000",label:"5000"}],dm=[{value:"AVG",label:"AVG"},{value:"SUM",label:"SUM"},{value:"COUNT",label:"COUNT"},{value:"COUNT_DISTINCT",label:"COUNT_DISTINCT"},{value:"MAX",label:"MAX"},{value:"MIN",label:"MIN"}],pm=["fixed","real","int","bigint","float","number","integer","int64","float64","double precision","smallint"],gm=["varchar","text","char","text","character(36)","string"],ym=["timestamp_ltz","date","timestamp","timestamp without time zone","timestamp with time zone","datetime"],IT=["array","text[]"],mm=["boolean","bool"],PT=r=>pm.includes(r.toLowerCase())?"number":gm.includes(r.toLowerCase())||r.toLowerCase().includes("char")?"text":mm.includes(r.toLowerCase())?"boolean":"text",OT=r=>{const e="data:text/csv;charset=utf-8,";if(!r.length)return e;const t=[],n=r[0],a=Object.keys(n);t.push(`S.NO,${a.join(",").toUpperCase()}`),r.forEach((s,l)=>{const u=Object.values(s).map(c=>{if(typeof c=="number")return c;try{if(c!=null&&c.includes(","))return`"${c}"`}catch{return c}return c});t.push(`${l+1},${u.join(",")}`)});const i=t.join(`
|
|
161
161
|
`);return encodeURI(e+i)};var M$=Object.freeze(Object.defineProperty({__proto__:null,applyTheme:MT,getChartAttributes:vm,colors:AT,getFormattedDataType:PT,objectArrayToCsvString:OT},Symbol.toStringTag,{value:"Module"})),gv={exports:{}},yv={};/**
|
|
162
162
|
* @license React
|
|
163
163
|
* react-jsx-runtime.production.min.js
|
|
@@ -239,7 +239,7 @@ yyyy`);var n=mn(e),a=t?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n
|
|
|
239
239
|
|
|
240
240
|
`:"<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=ch([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 r1;y.marker=m.makeTooltipMarker("item",bs(y.color),v);var _=JA(u.formatTooltip(c,!1,f)),b=p.get("order"),w=p.get("valueFormatter"),x=_.frag,S=x?gL(w?Q({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=ch(u,this._tooltipModel,f?{position:f}:null),v=h.get("content"),d=Math.random()+"",p=new r1;this._showOrMove(h,function(){var g=we(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=J(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,m&&(v=lf(y.axisValue,v,g)),v=N_(v,a,!0)}else if(ye(h)){var _=fe(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"||J(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!J(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),ye(n)&&(n=n([a,i],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),J(n))a=le(n[0],u),i=le(n[1],c);else if(_e(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=moe(n,d,f,t.get("borderWidth"));a=y[0],i=y[1]}else{var y=goe(a,i,o,u,c,h?null:20,v?null:20);a=y[0],i=y[1]}if(h&&(a-=w5(h)?f[0]/2:h==="right"?f[0]:0),v&&(i-=w5(v)?f[1]/2:v==="bottom"?f[1]:0),v5(t)){var y=yoe(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){Ue.node||!n.getDom()||(yf(this,"_updatePosition"),this._tooltipContent.dispose(),iw("itemTooltip",n))},e.type="tooltip",e}(St);function ch(r,e,t){var n=e.ecModel,a;t?(a=new lt(t,n,n),a=new lt(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof lt&&(o=o.get("tooltip",!0)),ue(o)&&(o={formatter:o}),o&&(a=new lt(o,a,n)))}return a}function x5(r,e){return r.dispatchAction||fe(e.dispatchAction,e)}function goe(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 yoe(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 moe(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 w5(r){return r==="center"||r==="middle"}function _oe(r,e,t){var n=E0(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Fc(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 boe=poe;function xoe(r){ke(lh),r.registerComponentModel(eoe),r.registerComponentView(boe),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Et),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Et)}var woe=["rect","polygon","keep","clear"];function Soe(r,e){var t=st(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;J(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),Coe(s),e&&!s.length&&s.push.apply(s,woe)}}function Coe(r){var e={};L(r,function(t){e[t]=1}),r.length=0,L(e,function(t,n){r.push(n)})}var S5=L;function C5(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Tw(r,e,t){var n={};return S5(e,function(i){var o=n[i]=a();S5(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=we(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 T5(r,e,t){var n;L(t,function(a){e.hasOwnProperty(a)&&C5(e[a])&&(n=!0)}),n&&L(t,function(a){e.hasOwnProperty(a)&&C5(e[a])?r[a]=we(e[a]):delete r[a]})}function Toe(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 s1(t,s,f)}function u(f,h){$L(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 Doe(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 s1(s,f,w)}function c(w,x){$L(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 Moe(r){var e=r.brushType,t={point:function(n){return D5[e].point(n,t,r)},rect:function(n){return D5[e].rect(n,t,r)}};return t}var D5={lineX:M5(0),lineY:M5(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])&&Os(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(Os(n,a,i)||Os(n,a+o,i)||Os(n,a,i+s)||Os(n,a+o,i+s)||Re.create(r).contain(l[0],l[1])||rf(a,i,a+o,i,n)||rf(a,i,a,i+s,n)||rf(a+o,i,a+o,i+s,n)||rf(a,i+s,a+o,i+s,n))return!0}}};function M5(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return fh(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(),fh(s[0],o)||fh(s[1],o)||fh(o[0],s)||fh(o[1],s)}}}}function fh(r,e){return e[0]<=r&&r<=e[1]}var A5=["inBrush","outOfBrush"],Dw="__ecBrushSelect",Mw="__ecInBrushSelectEvent";function L5(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new xw(e.option,r);t.setInputRanges(e.areas,r)})}function Aoe(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:we(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=Ooe[w.brushType],S=me({boundingRect:x?x(w):void 0},w);return S.selectors=Moe(S),S}),g=Tw(o.option,A5,function(w){w.mappingMethod="fixed"});J(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||Poe(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){I5(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(),M=y(x)?function(A){return h[A]?(S.dataIndex.push(D.getRawIndex(A)),"inBrush"):"outOfBrush"}:function(A){return I5(w,T,D,A)?(S.dataIndex.push(D.getRawIndex(A)),"inBrush"):"outOfBrush"};(y(x)?d:m(T))&&Toe(A5,g,D,M)})}),Loe(e,a,i,n,t)}function Loe(r,e,t,n,a){if(!!a){var i=r.getZr();if(!i[Mw]){i[Dw]||(i[Dw]=Ioe);var o=iu(i,Dw,t,e);o(r,n)}}}function Ioe(r,e){if(!r.isDisposed()){var t=r.getZr();t[Mw]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[Mw]=!1}}function I5(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 Poe(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(J(t)?Ne(t,e)<0:e!==t)}var Ooe={rect:function(r){return P5(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&&P5(e)}};function P5(r){return new Re(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Eoe=function(r){j(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 Lx(n.getZr())).on("brush",fe(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:we(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:we(a),$from:n})},e.type="brush",e}(St),Roe=Eoe,Noe="#ddd",koe=function(r){j(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&&T5(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:Noe},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=ee(t,function(n){return O5(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=O5(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}($e);function O5(r,e){return Pe({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new lt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Boe=koe,zoe=["rect","polygon","lineX","lineY","keep","clear"],Foe=function(r){j(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:zoe.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}(Xn),Voe=Foe;function $oe(r){r.registerComponentView(Roe),r.registerComponentModel(Boe),r.registerPreprocessor(Soe),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Aoe),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"},Et),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Et),Au("brush",Voe)}var Hoe=function(r){j(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}($e),Goe=function(r){j(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=Oe(t.get("textBaseline"),t.get("textVerticalAlign")),c=new We({style:mt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),v=new We({style:mt(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(){Fd(d,"_"+t.get("target"))}),p&&v.on("click",function(){Fd(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 Ge({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}(St);function Woe(r){r.registerComponentModel(Hoe),r.registerComponentView(Goe)}var Uoe=function(r){j(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=jt(Nl(u),""),h;_e(u)?(h=we(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 Ir([{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}($e),E5=Uoe,R5=function(r){j(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=io(E5.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}(E5);Ot(R5,X_.prototype);var joe=R5,Yoe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(St),qoe=Yoe,Zoe=function(r){j(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}(Wn),Xoe=Zoe,Aw=Math.PI,N5=Ye(),Qoe=function(r){j(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 tr("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=Joe(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:Aw/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*Aw/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,M=f;w==="left"||w==="bottom"?(x&&(m=[0,0],D+=g),S&&(_=[D,0],D+=g),T&&(b=[M-d,0],M-=g)):(x&&(m=[M-d,0],M-=g),S&&(_=[0,0],D+=g),T&&(b=[M-d,0],M-=g));var A=[D,M];return t.get("inverse")&&A.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:A,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=dn(),l=o.x,u=o.y+o.height;ia(s,s,[-l,-u]),Wi(s,s,-Aw/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=Koe(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 Xoe("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new Te;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 Jt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:Q({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Jt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:me({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:fe(o._changeTimeline,o,u.value)},g=k5(f,h,n,p);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),to(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 We({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:fe(o._changeTimeline,o,f),silent:!1,style:mt(v,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=mt(d),y.ensureState("progress").style=mt(p),n.add(y),to(y),N5(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",fe(this._changeTimeline,this,f?"-":"+")),h(t.prevBtnPosition,"prev",fe(this._changeTimeline,this,f?"+":"-")),h(t.playPosition,c?"stop":"play",fe(this._handlePlayClick,this,!c),!0);function h(v,d,p,g){if(!!v){var y=ua(Oe(i.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=ese(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(_),to(_)}}},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=fe(u._handlePointerDrag,u),f.ondragend=fe(u._handlePointerDragend,u),B5(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){B5(f,u._progressLine,s,a,i)}};this._currentPointer=k5(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=yn(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",N5(a[i]).dataIndex<=t)},e.type="timeline.slider",e}(qoe);function Koe(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new F1({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new iP({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new vo}}function Joe(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function ese(r,e,t,n){var a=n.style,i=Ul(r.get(["controlStyle",e]),n||{},new Re(t[0],t[1],t[2],t[3]));return a&&i.setStyle(a),i}function k5(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=kt(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=Pe({rectHover:!0,z2:100},n,!0);var u=xf(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=su(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 B5(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 tse=Qoe;function rse(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)}),me({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 nse(r){var e=r&&r.timeline;J(e)||(e=e?[e]:[]),L(e,function(t){!t||ase(t)})}function ase(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),z5(r),Ks(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});Ks(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!Ks(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}L(r.data||[],function(a){_e(a)&&!J(a)&&(!Ks(a,"value")&&Ks(a,"name")&&(a.value=a.name),z5(a))})}function z5(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]&&!Ks(a,s)&&(a[s]=o)}),t.label&&!Ks(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function Ks(r,e){return r.hasOwnProperty(e)}function ise(r){r.registerComponentModel(joe),r.registerComponentView(tse),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),rse(r),r.registerPreprocessor(nse)}function Lw(r,e){if(!r)return!1;for(var t=J(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function yg(r){es(r,"label",["show"])}var mg=Ye(),F5=function(r){j(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(Ue.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=mg(s)[o];if(!l||!l.data){mg(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&yg(l),L(l.data,function(c){c instanceof Array?(yg(c[0]),yg(c[1])):yg(c)}),u=this.createMarkerModelFromSeries(l,this,n),Q(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),mg(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return tr("section",{header:this.name,blocks:[tr("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 mg(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}($e);Ot(F5,X_.prototype);var To=F5,ose=function(r){j(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}(To),sse=ose;function Iw(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function lse(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function _g(r,e,t,n,a,i){var o=[],s=di(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=Ow(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 Pw={min:Ae(_g,"min"),max:Ae(_g,"max"),average:Ae(_g,"average"),median:Ae(_g,"median")};function hh(r,e){if(!!e){var t=r.getData(),n=r.coordinateSystem,a=n.dimensions;if(!lse(e)&&!J(e.coord)&&n){var i=V5(e,t,n,r);if(e=we(e),e.type&&Pw[e.type]&&i.baseAxis&&i.valueAxis){var o=Ne(a,i.baseAxis.dim),s=Ne(a,i.valueAxis.dim),l=Pw[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++)Pw[u[c]]&&(u[c]=Ow(t,t.mapDimension(a[c]),u[c]));return e}}function V5(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(use(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 use(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function vh(r,e){return r&&r.containData&&e.coord&&!Iw(e)?r.containData(e.coord):!0}function cse(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Iw(e)&&!Iw(t)?r.containZone(e.coord,t.coord):!0}function $5(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return lo(o,e[i])}:function(t,n,a,i){return lo(t.value,e[i])}}function Ow(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 Ew=Ye(),fse=function(r){j(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=ge()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){Ew(s).keep=!1}),n.eachSeries(function(s){var l=To.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!Ew(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){Ew(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;L(t,function(i){var o=To.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?aM(l):n_(l))})}})},e.type="marker",e}(St),Rw=fse;function H5(r,e,t){var n=e.coordinateSystem;r.each(function(a){var i=r.getItemModel(a),o,s=le(i.get("x"),t.getWidth()),l=le(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 hse=function(r){j(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=To.getMarkerModelFromSeries(i,"markPoint");o&&(H5(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=vse(o,t,n);n.setData(f),H5(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(ye(d)||ye(p)||ye(g)||ye(y)){var _=n.getRawValue(h),b=n.getDataParams(h);ye(d)&&(d=d(_,b)),ye(p)&&(p=p(_,b)),ye(g)&&(g=g(_,b)),ye(y)&&(y=y(_,b))}var w=v.getModel("itemStyle").getItemStyle(),x=bf(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}(Rw);function vse(r,e,t){var n;r?n=ee(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return Q(Q({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Ir(n,t),i=ee(t.get("data"),Ae(hh,e));r&&(i=rt(i,Ae(vh,r)));var o=$5(!!r,n);return a.initData(i,null,o),a}var dse=hse;function pse(r){r.registerComponentModel(sse),r.registerComponentView(dse),r.registerPreprocessor(function(e){Lw(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var gse=function(r){j(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}(To),yse=gse,bg=Ye(),mse=function(r,e,t,n){var a=r.getData(),i;if(J(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=Qt(n.yAxis,n.xAxis);else{var u=V5(n,a,e,r);s=u.valueAxis;var c=N1(a,u.valueDataDim);l=Ow(a,c,o)}var f=s.dim==="x"?0:1,h=1-f,v=we(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&&je(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=[hh(r,i[0]),hh(r,i[1]),Q({},i[2])];return g[2].type=g[2].type||null,Pe(g[2],g[0]),Pe(g[2],g[1]),g};function xg(r){return!isNaN(r)&&!isFinite(r)}function G5(r,e,t,n){var a=1-r,i=n.dimensions[r];return xg(e[a])&&xg(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function _se(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(G5(1,t,n,r)||G5(0,t,n,r)))return!0}return vh(r,e[0])&&vh(r,e[1])}function Nw(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=le(o.get("x"),a.getWidth()),u=le(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;xg(r.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[t?0:1]):xg(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 bse=function(r){j(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=To.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=bg(o).from,u=bg(o).to;l.each(function(c){Nw(l,c,!0,i,a),Nw(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 lx);this.group.add(c.group);var f=xse(o,t,n),h=f.from,v=f.to,d=f.line;bg(n).from=h,bg(n).to=v,n.setData(d);var p=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");J(p)||(p=[p,p]),J(g)||(g=[g,g]),J(y)||(y=[y,y]),J(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);Nw(b,w,x,t,i);var T=S.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=bf(l,"color")),b.setItemVisual(w,{symbolKeepAspect:S.get("symbolKeepAspect"),symbolOffset:Oe(S.get("symbolOffset",!0),m[x?0:1]),symbolRotate:Oe(S.get("symbolRotate",!0),y[x?0:1]),symbolSize:Oe(S.get("symbolSize"),g[x?0:1]),symbol:Oe(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}(Rw);function xse(r,e,t){var n;r?n=ee(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return Q(Q({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Ir(n,t),i=new Ir(n,t),o=new Ir([],t),s=ee(t.get("data"),Ae(mse,e,r,t));r&&(s=rt(s,Ae(_se,r)));var l=$5(!!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 wse=bse;function Sse(r){r.registerComponentModel(yse),r.registerComponentView(wse),r.registerPreprocessor(function(e){Lw(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Cse=function(r){j(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}(To),Tse=Cse,wg=Ye(),Dse=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=hh(r,a),s=hh(r,i),l=o.coord,u=s.coord;l[0]=Qt(l[0],-1/0),l[1]=Qt(l[1],-1/0),u[0]=Qt(u[0],1/0),u[1]=Qt(u[1],1/0);var c=Cv([{},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 Sg(r){return!isNaN(r)&&!isFinite(r)}function W5(r,e,t,n){var a=1-r;return Sg(e[a])&&Sg(t[a])}function Mse(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&&(W5(1,t,n)||W5(0,t,n))?!0:cse(r,a,i):vh(r,a)||vh(r,i)}function U5(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=le(o.get(t[0]),a.getWidth()),u=le(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);Sg(p)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Sg(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var j5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Ase=function(r){j(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=To.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=ee(j5,function(f){return U5(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 Te});this.group.add(c.group),this.markKeep(c);var f=Lse(o,t,n);n.setData(f),f.each(function(h){var v=ee(j5,function(T){return U5(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))];yn(m),yn(_);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=bf(l,"color");x.fill||(x.fill=S,ue(x.fill)&&(x.fill=Mc(x.fill,.4))),x.stroke||(x.stroke=S),f.setItemVisual(h,"style",x)}),f.diff(wg(c).data).add(function(h){var v=f.getItemLayout(h);if(!v.allClipped){var d=new $r({shape:{points:v.points}});f.setItemGraphicEl(h,d),c.group.add(d)}}).update(function(h,v){var d=wg(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 $r({shape:{points:p.points}}),f.setItemGraphicEl(h,d),c.group.add(d))}).remove(function(h){var v=wg(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,er(d),{labelFetcher:n,labelDataIndex:v,defaultText:f.getName(v)||"",inheritColor:ue(p.fill)?Mc(p.fill,1):"#000"}),dr(h,d),Lt(h,null,null,d.get(["emphasis","disabled"])),Me(h).dataModel=n}),wg(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}(Rw);function Lse(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 Q(Q({},f),{name:u,ordinalMeta:null})});a=ee(i,function(u,c){return{name:u,type:o[c%2].type}}),n=new Ir(a,t)}else a=[{name:"value",type:"float"}],n=new Ir(a,t);var s=ee(t.get("data"),Ae(Dse,e,r,t));r&&(s=rt(s,Ae(Mse,r)));var l=r?function(u,c,f,h){var v=u.coord[Math.floor(h/2)][h%2];return lo(v,a[h])}:function(u,c,f,h){return lo(u.value,a[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}var Ise=Ase;function Pse(r){r.registerComponentModel(Tse),r.registerComponentView(Ise),r.registerPreprocessor(function(e){Lw(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Ose=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"])}},Ese=function(r){j(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"]),J(n)&&L(n,function(i,o){ue(i)&&(i={type:i}),n[o]=Pe(i,Ose(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&&O0(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=ge(),s=ee(i,function(l){return(ue(l)||je(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new lt(l,this,this.ecModel))},this);this._data=rt(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])&&Ne(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}($e),kw=Ese,Iu=Ae,Bw=L,Cg=Te,Rse=function(r){j(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 Cg),this.group.add(this._selectorGroup=new Cg),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(me({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=t5(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=ge(),f=n.get("selectedMode"),h=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),Bw(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
|
|
241
241
|
`)){var g=new Cg;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(Y5,p,null,i,h)).on("mouseover",Iu(zw,y.name,null,i,h)).on("mouseout",Iu(Fw,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),M=T.getItemVisual(D,"style"),A=T.getItemVisual(D,"legendIcon"),I=Br(M.fill);I&&I[3]===0&&(I[3]=.2,M=Q(Q({},M),{fill:sa(I,"rgba")}));var P=this._createItem(S,p,d,v,n,t,{},M,A,f,i);P.on("click",Iu(Y5,null,p,i,h)).on("mouseover",Iu(zw,null,p,i,h)).on("mouseout",Iu(Fw,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();Bw(t,function(u){var c=u.type,f=new We({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}),to(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=Nse(c,i,l,u,v,g,h),w=new Cg,x=i.getModel("textStyle");if(ye(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(kse({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,M=o.get("formatter"),A=n;ue(M)&&M?A=M.replace("{name}",n!=null?n:""):ye(M)&&(A=M(n));var I=i.get("inactiveColor");w.add(new We({style:mt(x,{text:A,x:T,y:p/2,fill:g?x.getTextColor():I,align:D,verticalAlign:"middle"})}));var P=new Ge({shape:w.getBoundingRect(),invisible:!0}),O=i.getModel("tooltip");return O.get("show")&&jl({el:P,componentModel:o,itemName:n,itemTooltipOption:O.option}),w.add(P),w.eachChild(function(E){E.silent=!0}),P.silent=!f,this.getContentGroup().add(w),to(w),w.__legendDataIndex=a,w},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ws(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){ws("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}(St);function Nse(r,e,t,n,a,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Bw(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:uu(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 kse(r){var e=r.icon||"roundRect",t=kt(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 Y5(r,e,t,n){Fw(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),zw(r,e,t,n)}function q5(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 zw(r,e,t,n){q5(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function Fw(r,e,t,n){q5(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}var Z5=Rse;function Bse(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 dh(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===`
|
|
242
|
-
`||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 zse(r){r.registerAction("legendToggleSelect","legendselectchanged",Ae(dh,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ae(dh,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ae(dh,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ae(dh,"select")),r.registerAction("legendUnSelect","legendunselected",Ae(dh,"unSelect"))}function X5(r){r.registerComponentModel(kw),r.registerComponentView(Z5),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Bse),r.registerSubTypeDefaulter("legend",function(){return"plain"}),zse(r)}var Fse=function(r){j(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),Q5(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),Q5(this,this.option,t)},e.type="legend.scroll",e.defaultOption=io(kw.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}(kw);function Q5(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,oo(e,t,{type:"box",ignoreSize:!!a})}var Vse=Fse,K5=Te,Vw=["width","height"],$w=["x","y"],$se=function(r){j(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 K5),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new K5)},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=J(f)?f:[f,f];d("pagePrev",0);var v=n.getModel("pageTextStyle");c.add(new We({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=Ul(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:fe(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=Vw[u],f=$w[u],h=Vw[1-u],v=$w[1-u];o&&ws("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=we(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;ws(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),ws("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],_=Oe(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 Ge({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=Vw[o],l=$w[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}(Z5),Hse=$se;function Gse(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 Wse(r){ke(X5),r.registerComponentModel(Vse),r.registerComponentView(Hse),Gse(r)}function Use(r){ke(X5),ke(Wse)}var jse=function(r){j(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=io(uh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(uh),Yse=jse,Hw=Ye();function qse(r,e,t){Hw(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Zse(r,e){for(var t=Hw(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||J5(t,o))}}}function J5(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Xse(r,e){var t={model:e,containsPoint:Ae(Kse,e),dispatchAction:Ae(Qse,r),dataZoomInfoMap:null,controller:null},n=t.controller=new jf(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 Qse(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Kse(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function Jse(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 ele(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Hw(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=ge());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Zk(i);L(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Xse(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ge());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){J5(a,i);return}var c=Jse(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),iu(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var tle=function(r){j(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(),qse(a,t,{pan:fe(Gw.pan,this),zoom:fe(Gw.zoom,this),scrollMove:fe(Gw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Zse(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(pw),Gw={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(!!o){var s=Ww[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(Ys(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:eB(function(r,e,t,n,a,i){var o=Ww[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:eB(function(r,e,t,n,a,i){var o=Ww[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function eB(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(Ys(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Ww={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}},rle=tle;function tB(r){gw(r),r.registerComponentModel(Yse),r.registerComponentView(rle),ele(r)}var nle=function(r){j(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=io(uh.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}(uh),ale=nle,ph=Ge,rB=7,ile=1,Uw=30,ole=7,gh="horizontal",nB="vertical",sle=5,lle=["line","bar","candlestick","scatter"],ule={easing:"cubicOut",duration:100,delay:0},cle=function(r){j(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=fe(this._onBrush,this),this._onBrushEnd=fe(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),iu(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(){yf(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 Te;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?ole:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===gh?{right:s.width-o.x-o.width,top:s.height-Uw-rB-i,width:o.width,height:Uw}:{right:rB,top:o.y,width:Uw,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===nB&&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===gh&&!o?{scaleY:l?1:-1,scaleX:1}:a===gh&&o?{scaleY:l?1:-1,scaleX:-1}:a===nB&&!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 ph({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new ph({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:fe(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,M){if(_>0&&M%_){m+=y;return}var A=D==null||isNaN(D)||D==="",I=A?0:nt(D,f,v,!0);A&&!b&&M?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!A&&b&&(p.push([m,0]),g.push([m,0])),p.push([m,I]),g.push([m,I]),m+=y,b=A}),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 M=w.getModel(D?"selectedDataBackground":"dataBackground"),A=new Te,I=new $r({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),P=new Hr({shape:{points:c},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return A.add(I),A.add(P),A}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&&Ne(lle,u.get("type"))<0)){var c=i.getComponent(So(o),s).axis,f=fle(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 ph({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new ph({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:ile,fill:"rgba(0,0,0,0)"}})),L([0,1],function(_){var b=l.get("handleIcon");!ep[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var w=kt(b,-1,0,2,2,null,!0);w.attr({cursor:aB(this._orient),draggable:!0,drift:fe(this._onDragMove,this,_),ondragend:fe(this._onDragEnd,this),onmouseover:fe(this._showDataInfo,this,!0),onmouseout:fe(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),S=l.get("handleSize");this._handleHeight=le(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(),to(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 We({silent:!0,invisible:!0,style:mt(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=le(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Ge({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=kt(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 Ge({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:aB(this._orient),drift:fe(this._onDragMove,this,"all"),ondragstart:fe(this._showDataInfo,this,!0),ondragend:fe(this._onDragEnd,this),onmouseover:fe(this._showDataInfo,this,!0),onmouseout:fe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[nt(t[0],[0,100],n,!0),nt(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];Ys(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?nt(s.minSpan,l,o,!0):null,s.maxSpan!=null?nt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=yn([nt(i[0],o,l,!0),nt(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=yn(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 Ge,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=yn(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=no(a.handles[d].parent,this.group),g=Ld(d===0?"right":"left",p),y=this._handleWidth/2+sle,m=da([h[d]+(d===0?-y:y),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===gh?"middle":g,align:o===gh?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 ye(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,ai(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 Ee(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=yn([nt(a.x,o,s,!0),nt(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&&(ai(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 ph({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?ule:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=Zk(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}(pw);function fle(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function aB(r){return r==="vertical"?"ns-resize":"ew-resize"}var hle=cle;function iB(r){r.registerComponentModel(ale),r.registerComponentView(hle),gw(r)}function vle(r){ke(tB),ke(iB)}var dle={get:function(r,e,t){var n=we((ple[r]||{})[e]);return t&&J(n)?n[n.length-1]:n}},ple={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]}},oB=dle,sB=yr.mapVisual,gle=yr.eachVisual,yle=J,lB=L,mle=yn,_le=nt,ble=function(r){j(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&&T5(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=fe(t,this),this.controllerVisuals=Tw(this.option.controller,n,t),this.targetVisuals=Tw(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=st(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||["<",">"],J(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(ye(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=mle([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={});Pe(i,a),Pe(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){yle(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]={},lB(d,function(g,y){if(!!yr.isValidType(y)){var m=oB.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";lB(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&we(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&we(v)||(s?m[0]:[m[0],m[0]])),_.symbol=sB(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var w=-1/0;gle(b,function(x){x>w&&(w=x)}),_.symbolSize=sB(b,function(x){return _le(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}($e),Tg=ble,uB=[20,140],xle=function(r){j(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]=uB[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=uB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):J(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=yn((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=cB(this,"outOfRange",this.getExtent()),a=cB(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=io(Tg.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}(Tg);function cB(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 wle=xle,Sle=function(r){j(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=_s(n.get("padding")||0),i=t.getBoundingRect();t.add(new Ge({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;$d(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(St),fB=Sle,hB=[["left","right","width"],["top","bottom","height"]];function vB(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=hB[o],l=[0,null,10],u={},c=0;c<3;c++)u[hB[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 Dg(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 qa=nt,Cle=L,dB=Math.min,jw=Math.max,Tle=12,Dle=6,Mle=function(r){j(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 We({style:mt(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=vB(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new Te;u.add(c),c.add(a.outOfRange=pB()),c.add(a.inRange=pB(null,s?yB(this._orient):null,fe(this._dragHandle,this,"all",!1),fe(this._dragHandle,this,"all",!0))),c.setClipPath(new Ge({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("\u56FD"),h=jw(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=fe(this._dragHandle,this,a,!1),u=fe(this._dragHandle,this,a,!0),c=ua(t.get("handleSize"),i[0]),f=kt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=yB(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){ai(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(),ds(f,!0),n.add(f);var v=this.visualMapModel.textStyleModel,d=new We({cursor:h,draggable:!0,drift:l,onmousemove:function(y){ai(y.event)},ondragend:u,style:mt(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=kt(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 sr){var c=l.style;l.useStyle(Q({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 We({silent:!0,invisible:!0,style:mt(f,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:Dle)+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():gB(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=[qa(n[0],a,i,!0),qa(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]];Ys(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[qa(i[0],o,s,!0),qa(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 $l(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 Te(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();Cle([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=t[c];var h=qa(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],no(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=qa(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,no(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 M=this._shapes.handleLabels;if(M)for(var A=0;A<M.length;A++)this._api.enterBlur(M[A])}},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]=dB(jw(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=dB(jw(o[0],t),o[1]);var l=Ale(a,s,o),u=[t-l,t+l],c=qa(t,o,s,!0),f=[qa(u[0],o,s,!0),qa(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||gB(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var d=n8(h,v);this._dispatchHighDown("downplay",Dg(d[0],a)),this._dispatchHighDown("highlight",Dg(d[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Ds(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",Dg(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=no(n,i?null:this.group);return J(t)?da(t,o,a):Ld(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}(fB);function pB(r,e,t,n){return new $r({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){ai(a.event)},ondragend:n})}function Ale(r,e,t){var n=Tle/2,a=r.get("hoverLinkDataSize");return a&&(n=qa(a,e,t,!0)/2),n}function gB(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function yB(r){return r==="vertical"?"ns-resize":"ew-resize"}var Lle=Mle,Ile={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Ple=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Ole=[{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(Doe(n.stateList,n.targetVisuals,fe(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(fe(Ele,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function Ele(r,e,t,n){for(var a=e.targetVisuals[n],i=yr.prepareVisualTypes(a),o={color:bf(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 mB=L;function Rle(r){var e=r&&r.visualMap;J(e)||(e=e?[e]:[]),mB(e,function(t){if(!!t){Pu(t,"splitList")&&!Pu(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&J(n)&&mB(n,function(a){_e(a)&&(Pu(a,"start")&&!Pu(a,"min")&&(a.min=a.start),Pu(a,"end")&&!Pu(a,"max")&&(a.max=a.end))})}})}function Pu(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var _B=!1;function bB(r){_B||(_B=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Ile,Ple),L(Ole,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Rle))}function xB(r){r.registerComponentModel(wle),r.registerComponentView(Lle),bB(r)}var Nle=function(r){j(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=[],kle[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=we(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=ee(this._pieceList,function(l){return l=we(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]=oB.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=we(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=io(Tg.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}(Tg),kle={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]}),I0(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),wB(e,r)},pieces:function(r){var e=this.option;L(e.pieces,function(t,n){_e(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),wB(e,r),I0(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 wB(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Ble=Nle,zle=function(r){j(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=Qt(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 Te;p.onclick=fe(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 We({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),ws(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:Dg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return vB(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 Te,l=this.visualMapModel.textStyleModel;s.add(new We({style:mt(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(kt(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=we(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}(fB),Fle=zle;function SB(r){r.registerComponentModel(Ble),r.registerComponentView(Fle),bB(r)}function Vle(r){ke(xB),ke(SB)}var $le={label:{enabled:!0},decal:{show:!1}},CB=Ye(),Hle={};function Gle(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=we($le);Pe(n.label,r.getLocaleModel().get("aria"),!1),Pe(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=ge();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),CB(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(ye(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var m=$_(h.ecModel,h.name,Hle,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",b(_,m))}else{var d=h.getRawData(),p={},g=CB(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=$_(h.ecModel,S,g,y),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",b(D,T))})}function b(w,x){var S=w?Q(Q({},x),w):x;return S.dirty=!0,S}})}}function i(){var u=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=me(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 M=void 0,A=T.get("name"),I=A?"withName":"withoutName";M=h>1?c.get(["series","multiple",I]):c.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var P=T.getData();if(P.count()>v){var O=c.get(["data","partialData"]);M+=o(O,{displayCnt:v})}else M+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),V=[],$=0;$<P.count();$++)if($<v){var U=P.getName($),Y=P.getValues($),ae=c.get(["data",U?"withName":"withoutName"]);V.push(o(ae,{name:U,value:Y.join(E)}))}M+=V.join(E)+R,_.push(M)}});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 Wle(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 Ule(r){r.registerPreprocessor(Wle),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Gle)}var TB={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},jle=function(){function r(e){var t=this._condVal=ue(e)?new RegExp(e):UT(e)?e:null;if(t==null){var n="";tt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ue(t)?this._condVal.test(e):je(t)?this._condVal.test(e+""):!1},r}(),Yle=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),qle=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}(),Zle=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}(),Xle=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),Qle=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 Yw(r,e){if(r===!0||r===!1){var t=new Yle;return t.value=r,t}var n="";return MB(r)||tt(n),r.and?DB("and",r,e):r.or?DB("or",r,e):r.not?Kle(r,e):Jle(r,e)}function DB(r,e,t){var n=e[r],a="";J(n)||tt(a),n.length||tt(a);var i=r==="and"?new qle:new Zle;return i.children=ee(n,function(o){return Yw(o,t)}),i.children.length||tt(a),i}function Kle(r,e){var t=r.not,n="";MB(t)||tt(n);var a=new Xle;return a.child=Yw(t,e),a.child||tt(n),a}function Jle(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Fe(r),o=r.parser,s=o?tL(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=he(TB,u)?TB[u]:u,f=r[u],h=s?s(f):f,v=g9(c,h)||c==="reg"&&new jle(h);v||tt(t),a.push(v)}}a.length||tt(t);var d=new Qle;return d.valueGetterParam=n,d.valueParser=s,d.getValue=e.getValue,d.subCondList=a,d}function MB(r){return _e(r)&&!vr(r)}var eue=function(){function r(e,t){this._cond=Yw(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function tue(r,e){return new eue(r,e)}var rue={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=tue(r.config,{valueGetterAttrMap:ge({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;he(s,"dimension")||tt(l);var c=e.getDimensionInfo(u);return c||tt(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}}},nue={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=st(t);a.length||tt(n);var i=[];L(a,function(c){var f=c.dimension,h=c.order,v=c.parser,d=c.incomparable;if(f==null&&tt(n),h!=="asc"&&h!=="desc"&&tt(n),d&&d!=="min"&&d!=="max"){var p="";tt(p)}if(h!=="asc"&&h!=="desc"){var g="";tt(g)}var y=e.getDimensionInfo(f);y||tt(n);var m=v?tL(v):null;v&&!m&&tt(n),i.push({dimIdx:y.index,parser:m,comparator:new nL(h,d)})});var o=e.sourceFormat;o!==Mr&&o!==$n&&tt(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 aue(r){r.registerTransform(rue),r.registerTransform(nue)}var iue=function(r){j(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 uL(this),cL(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),cL(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:$a},e}($e),oue=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(St);function sue(r){r.registerComponentModel(iue),r.registerComponentView(oue)}var Za=za.CMD;function Ou(r,e){return Math.abs(r-e)<1e-5}function qw(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(P,O){a&&a.length>2&&n.push(a),a=[P,O]}function c(P,O,E,R){Ou(P,E)&&Ou(O,R)||a.push(P,O,E,R,E,R)}function f(P,O,E,R,V,$){var U=Math.abs(O-P),Y=Math.tan(U/4)*4/3,ae=O<P?-1:1,H=Math.cos(P),q=Math.sin(P),X=Math.cos(O),Z=Math.sin(O),ne=H*V+E,se=q*$+R,K=X*V+E,ve=Z*$+R,N=V*Y*ae,F=$*Y*ae;a.push(ne-N*q,se+F*H,K+N*Z,ve-F*X,K,ve)}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===Za.L||y===Za.C||y===Za.Q)&&(a=[s,l])),y){case Za.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Za.L:h=e[g++],v=e[g++],c(i,o,h,v),i=h,o=v;break;case Za.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Za.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 Za.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 M=(D?-1:1)*Math.PI/2,A=S;D?A>T:A<T;A+=M){var I=D?Math.max(A+M,T):Math.min(A+M,T);f(A,I,_,b,w,x)}break;case Za.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 Za.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function Zw(r,e,t,n,a,i,o,s,l,u){if(Ou(r,t)&&Ou(e,n)&&Ou(a,o)&&Ou(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=[],M=[];Yi(r,t,a,o,.5,D),Yi(e,n,i,s,.5,M),Zw(D[0],M[0],D[1],M[1],D[2],M[2],D[3],M[3],l,u),Zw(D[4],M[4],D[5],M[5],D[6],M[6],D[7],M[7],l,u)}function lue(r,e){var t=qw(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++];Zw(s,l,c,f,h,v,d,p,o,e),s=d,l=p}n.push(o)}return n}function AB(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=AB([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 uue(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=AB([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 IB(r,e,t,n){return r*n-t*e}function cue(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=IB(c,f,l,u);if(Math.abs(h)<1e-6)return null;var v=r-a,d=e-i,p=IB(v,d,c,f)/h;return p<0||p>1?null:new Ee(p*l+r,p*u+e)}function fue(r,e,t){var n=new Ee;Ee.sub(n,t,e),n.normalize();var a=new Ee;Ee.sub(a,r,e);var i=a.dot(n);return i}function Eu(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function hue(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=cue(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:fue(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++)Eu(d,r[i].slice());Eu(d,v),Eu(d,h);for(var i=c.idx+1;i<=u.idx+n;i++)Eu(p,r[i%n].slice());return Eu(p,h),Eu(p,v),[{points:d},{points:p}]}function PB(r){var e=r.points,t=[],n=[];ud(e,t,n);var a=new Re(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 Ee,c=new Ee;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),hue(e,u,c)}function Mg(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Mg(r,i[0],a,n),Mg(r,i[1],t-a,n)}return n}function vue(r,e){for(var t=[],n=0;n<e;n++)t.push(f_(r));return t}function due(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function pue(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function gue(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":uue(n,e,t),a=Ge;break;case"sector":LB(n,e,t),a=Vr;break;case"circle":LB({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Vr;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(lue(r.getUpdatedPathProxy(),o),function(y){return pue(y)}),l=s.length;if(l===0)Mg(PB,{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=[],_=[];ud(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||(Mg(PB,{points:v.poly},d,t),h-=d)}}a=$r;break}if(!a)return vue(r,e);for(var p=[],u=0;u<t.length;u++){var g=new a;g.setShape(t[u]),due(r,g),p.push(g)}return p}function yue(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;Yi(d,g,m,b,T,a),Yi(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 OB(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 mue(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=yue(l,u),c=t[0],f=t[1],n=c,a=f):(f=OB(a||l,l),c=l):(c=OB(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function EB(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 _ue(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 bue(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 xue(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=EB(s),c=EB(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],h=[],v=0,d=1/0,p=[],g=s.length;i&&(s=bue(s));for(var y=_ue(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 M=f[_],A=f[_+1],I=l[_]-c[0],P=l[_+1]-c[1],O=I*T-P*S,E=I*S+P*T;p[_]=O,p[_+1]=E;var R=O-M,V=E-A;D+=R*R+V*V}if(D<d){d=D,v=x;for(var $=0;$<p.length;$++)h[$]=p[$]}}else for(var U=0;U<g;U+=2)h[U]=l[U]-c[0],h[U+1]=l[U+1]-c[1];a.push({from:f,to:h,fromCp:u,toCp:c,rotation:-v})}return a}function Ag(r){return r.__isCombineMorphing}var RB="__mOriginal_";function Lg(r,e,t){var n=RB+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 yh(r,e){var t=RB+e;r[t]&&(r[e]=r[t],r[t]=null)}function NB(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 kB(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=mue(qw(t),qw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&NB(i,s),l&&NB(o,l),Lg(e,"updateTransform",{replace:u}),e.transform=null;var c=xue(i,o,10,Math.PI),f=[];Lg(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);gc(p,w,x,v);for(var D=0;D<m.length;D+=2){var M=m[D],A=m[D+1],I=_[D],P=_[D+1],O=M*d+I*v,E=A*d+P*v;f[D]=O*T-E*S+p[0],f[D+1]=O*S+E*T+p[1]}var R=f[0],V=f[1];h.moveTo(R,V);for(var D=2;D<m.length;){var I=f[D++],P=f[D++],$=f[D++],U=f[D++],Y=f[D++],ae=f[D++];R===I&&V===P&&$===Y&&U===ae?h.lineTo(Y,ae):h.bezierCurveTo(I,P,$,U,Y,ae),R=Y,V=ae}}}})}function Xw(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;kB(r,e),e.__morphT=0;function i(){yh(e,"buildPath"),yh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},me({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function wue(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 Ig(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:wue(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 BB(r){return gue(r.path,r.count)}function Qw(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Sue(r,e,t){var n=[];function a(w){for(var x=0;x<w.length;x++){var S=w[x];Ag(S)?a(S.childrenRef()):S instanceof Be&&n.push(S)}}a(r);var i=n.length;if(!i)return Qw();var o=t.dividePath||BB,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Qw();n=Ig(n),s=Ig(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new oi,h=0;h<i;h++){var v=n[h],d=s[h];d.parent=e,d.copyTransform(f),c||kB(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)}Lg(e,"addSelfToZr",{after:function(w){p(w)}}),Lg(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,yh(e,"addSelfToZr"),yh(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?me({delay:(t.delay||0)+c(h,y,n[h],s[h]),done:_},t):t;Xw(n[h],s[h],b)}else e.__morphT=0,e.animateTo({__morphT:1},me({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++)yh(r[w],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function Cue(r,e,t){var n=e.length,a=[],i=t.dividePath||BB;function o(v){for(var d=0;d<v.length;d++){var p=v[d];Ag(p)?o(p.childrenRef()):p instanceof Be&&a.push(p)}}if(Ag(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(f_(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"),Qw()}a=Ig(a),e=Ig(e);for(var f=t.individualDelay,u=0;u<n;u++){var h=f?me({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;Xw(a[u],e[u],h)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function zB(r){return J(r[0])}function FB(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 Tue={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=f_(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function Kw(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Hl("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;zB(r)&&(u=r,c=e),zB(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(Ag(T))f({many:[T],one:D},!0,_,b,!0);else{var M=s?me({delay:s(_,b)},l):l;Xw(T,D,M),i(T,D,T,D,M)}}else for(var A=me({dividePath:Tue[t],individualDelay:s&&function(V,$,U,Y){return s(V+_,b)}},l),I=m?Sue(x,S,A):Cue(S,x,A),P=I.fromIndividuals,O=I.toIndividuals,E=P.length,R=0;R<E;R++){var M=s?me({delay:s(R,E)},l):l;i(P[R],O[R],m?x[R]:y.one,m?y.one:x[R],M)}}for(var h=u?u===r:r.length>e.length,v=u?FB(c,u):FB(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 Js(r){if(!r)return[];if(J(r)){for(var e=[],t=0;t<r.length;t++)e.push(Js(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof Be&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var VB=1e4,Due=Ye();function Mue(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 $B(r){var e=[];return L(r,function(t){var n=t.data;if(!(n.count()>VB))for(var a=n.getIndices(),i=Mue(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 Jw(r,e,t){r.traverse(function(n){n instanceof Be&&wt(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function eS(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Ru(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Aue(r,e,t){var n=Hl("update",t,e);n&&r.traverse(function(a){if(a instanceof kn){var i=XW(a);i&&a.animateFrom({style:i},n)}})}function Lue(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 HB(r,e,t){var n=$B(r),a=$B(e);function i(y,m,_,b,w){(_||y)&&m.animateFrom({style:_&&_!==y?Q(Q({},_.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 M=b.get(T.name,w);return D&&D.categories[M]||M+""}var A=b.getRawDataItem(w);return A&&A.groupId?A.groupId+"":x||b.getId(w)}}var f=Lue(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&&Aue(S,b.dataIndex,w);return}x&&h[x.id]||S&&(Ru(S),x?(Ru(x),eS(x),u=!0,Kw(Js(x),Js(S),b.divide,w,y,i)):Jw(S,w,y))}new vi(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=rt(ee(m,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==x&&!h[T.id]});x&&(Ru(x),S.length?(L(S,function(T){Ru(T),eS(T)}),u=!0,Kw(Js(S),Js(x),_.divide,w,y,i)):Jw(x,w,_.dataIndex))}).updateOneToMany(function(y,m){var _=n[m],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&h[b.id])){var w=rt(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 Ru(S)}),b?(Ru(b),eS(b),u=!0,Kw(Js(b),Js(w),_.divide,x,y[0],i)):L(w,function(S){return Jw(S,x,y[0])}))}}).updateManyToMany(function(y,m){new vi(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=Hl("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(x){x instanceof Be&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function GB(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function WB(r){return J(r)?r.sort().join(","):r}function Do(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Iue(r,e){var t=ge(),n=ge(),a=ge();return L(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=GB(i),c=WB(u);n.set(c,{dataGroupId:s,data:l}),J(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=GB(i),u=WB(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Do(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Do(s),data:s}]});else if(J(l)){var f=[];L(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Do(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Do(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:Do(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Do(s)})}}}}),t}function UB(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 Pue(r,e,t,n){var a=[],i=[];L(st(r.from),function(o){var s=UB(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Do(e.oldData[s]),dim:o.dimension})}),L(st(r.to),function(o){var s=UB(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Do(l),dim:o.dimension})}}),a.length>0&&i.length>0&&HB(a,i,n)}function Oue(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){L(st(n.seriesTransition),function(a){L(st(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][Yd]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=Due(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(st(i),function(v){Pue(v,a,n,t)});else{var o=Iue(a,n);L(o.keys(),function(v){var d=o.get(v);HB(d.oldSeries,d.newSeries,t)})}L(n.updatedSeries,function(v){v[Yd]&&(v[Yd]=!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()<VB&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}ke([ZY]),ke([HY]),ke([_q,Bq,Xq,BZ,eX,qX,TQ,fK,FK,qK,iJ,uee,kee,Zee,pte,wte,Vte,Xte,ure,yre,Ire,pne]),ke(zne),ke(mae),ke(WE),ke(Nae),ke(hN),ke(Hae),ke(Qae),ke(Kie),ke(xoe),ke(lh),ke($oe),ke(Woe),ke(ise),ke(pse),ke(Sse),ke(Pse),ke(Use),ke(vle),ke(tB),ke(iB),ke(Vle),ke(xB),ke(SB),ke(Ule),ke(aue),ke(sue),ke(Oue),ke(lY);var Eue=Object.freeze(Object.defineProperty({__proto__:null,registerLocale:T_,version:U6,dependencies:j6,PRIORITY:fI,init:uU,connect:cU,disConnect:DI,disconnect:fU,dispose:hU,getInstanceByDom:D1,getInstanceById:vU,registerTheme:M1,registerPreprocessor:A1,registerProcessor:L1,registerPostInit:MI,registerPostUpdate:AI,registerUpdateLifecycle:fp,registerAction:ya,registerCoordinateSystem:LI,getCoordinateSystemDimensions:dU,registerLayout:II,registerVisual:fo,registerLoading:P1,setCanvasCreator:pU,registerMap:OI,getMap:gU,registerTransform:EI,dataTool:yU,throttle:Xd,use:ke,setPlatformAPI:FT,parseGeoJSON:q1,parseGeoJson:q1,env:Ue,Model:lt,Axis:Wn,innerDrawElementOnCanvas:f1,zrender:FG,matrix:DH,vector:cH,zrUtil:nH,color:eG,helper:Cj,number:Ij,time:Pj,graphic:Oj,format:Ej,util:Rj,List:Ir,ComponentModel:$e,ComponentView:St,SeriesModel:_t,ChartView:ut,extendComponentModel:Uj,extendComponentView:jj,extendSeriesModel:Yj,extendChartView:qj},Symbol.toStringTag,{value:"Module"})),el={},Nu={},jB={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1,t=function(){return"".concat(e++)};r.default=t})(jB);var Pg={},Og={},tS={};(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})(tS);var wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.SensorTabIndex=wi.SensorClassName=wi.SizeSensorId=void 0;var Rue="size-sensor-id";wi.SizeSensorId=Rue;var Nue="size-sensor-object";wi.SensorClassName=Nue;var kue="-1";wi.SensorTabIndex=kue,Object.defineProperty(Og,"__esModule",{value:!0}),Og.createSensor=void 0;var Bue=zue(tS),YB=wi;function zue(r){return r&&r.__esModule?r:{default:r}}var Fue=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",YB.SensorClassName),c.setAttribute("tabindex",YB.SensorTabIndex),c.type="text/html",e.appendChild(c),c.data="about:blank",c},i=(0,Bue.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}};Og.createSensor=Fue;var Eg={};Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.createSensor=void 0;var Vue=$ue(tS);function $ue(r){return r&&r.__esModule?r:{default:r}}var Hue=function(e){var t=void 0,n=[],a=(0,Vue.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}};Eg.createSensor=Hue,Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.createSensor=void 0;var Gue=Og,Wue=Eg,Uue=typeof ResizeObserver!="undefined"?Wue.createSensor:Gue.createSensor;Pg.createSensor=Uue,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.removeSensor=Nu.getSensor=void 0;var jue=que(jB),Yue=Pg,Rg=wi;function que(r){return r&&r.__esModule?r:{default:r}}var mh={},Zue=function(e){var t=e.getAttribute(Rg.SizeSensorId);if(t&&mh[t])return mh[t];var n=(0,jue.default)();e.setAttribute(Rg.SizeSensorId,n);var a=(0,Yue.createSensor)(e);return mh[n]=a,a};Nu.getSensor=Zue;var Xue=function(e){var t=e.element.getAttribute(Rg.SizeSensorId);e.element.removeAttribute(Rg.SizeSensorId),e.destroy(),t&&mh[t]&&delete mh[t]};Nu.removeSensor=Xue,Object.defineProperty(el,"__esModule",{value:!0}),el.ver=ZB=el.clear=qB=el.bind=void 0;var rS=Nu,Que=function(e,t){var n=(0,rS.getSensor)(e);return n.bind(t),function(){n.unbind(t)}},qB=el.bind=Que,Kue=function(e){var t=(0,rS.getSensor)(e);(0,rS.removeSensor)(t)},ZB=el.clear=Kue,Jue="1.0.1";el.ver=Jue;function XB(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function nS(r){return typeof r=="function"}function ece(r){return typeof r=="string"}var ku=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},tce=function(r){BT(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(!(nS(n)&&!n(t,this.props))){if(!ku(t.theme,this.props.theme)||!ku(t.opts,this.props.opts)||!ku(t.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var a=["option","notMerge","lazyUpdate","showLoading","loadingOption"];ku(XB(this.props,a),XB(t,a))||this.updateEChartsOption(),(!ku(t.style,this.props.style)||!ku(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{ZB(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||{}),nS(i)&&i(o),this.ele&&qB(this.ele,function(){t.resize()})},e.prototype.bindEvents=function(t,n){function a(o,s){ece(o)&&nS(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=Cm({height:300},a);return C("div",{ref:function(l){t.ele=l},style:s,className:"echarts-for-react "+o})},e}(B.PureComponent),ot=function(r){BT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=Eue,n}return e}(tce);const rce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},nce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!n&&C(ot,{style:{width:"100%",height:"90%"},option:c}),n&&t&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{t(v.name)}}})]})},ace=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:h}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{o(d.name)}}})]})},ice=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:c}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{s(v.name)}}})]})},oce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:p,onEvents:{click:g=>{o(g.name)}}})}),!s&&C(Ce,{children:C(ot,{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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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(Ce,{children:z(Ce,{children:[s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:u,onEvents:{click:v=>{o(v.name)}}})}),!s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:u})})]})})},sce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:c}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:h=>{o(h.name)}}})]})},lce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},uce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:c}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{o(v.name)}}})]})},cce=({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(Ce,{children:C(ot,{style:{width:"100%",height:"90%"},option:i})})},fce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{s(d.name)}}})]})},hce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:p}),s&&o&&C(ot,{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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:u}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:h=>{o(h.name)}}})]})},vce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:v}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{s(p.name)}}})]})},dce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})},pce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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(ot,{style:{width:"100%",height:"113%"},option:l})},gce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:s})})},yce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})};var mce={container:"_container_hxsc7_1",label:"_label_hxsc7_7",sync:"_sync_hxsc7_13"};const QB=({data:r,customSettings:e})=>{var l,u,c,f;const t={fontSize:`${e.subHeaderFontSize}px`||"14px"},n={fontSize:`${e.fontSize}px`||"30px"},a=new Intl.NumberFormat,i=(h,v)=>{let d="";if(v)switch(parseInt(h,10).toString().length){case 1:case 2:case 3:d=h;break;case 4:d=`${h.toString().slice(0,1)}.${h.toString().slice(1,3)}k`;break;case 5:d=`${h.toString().slice(0,2)}.${h.toString().slice(2,4)}k`;break;case 6:d=`${h.toString().slice(0,3)}.${h.toString().slice(3,5)}k`;break;case 7:d=`${h.toString().slice(0,1)}.${h.toString().slice(1,3)}M`;break;case 8:d=`${h.toString().slice(0,2)}.${h.toString().slice(2,4)}M`;break;case 9:d=`${h.toString().slice(0,3)}.${h.toString().slice(3,5)}M`;break;case 10:d=`${h.toString().slice(0,1)}.${h.toString().slice(1,3)}B`;break}else switch(parseInt(h,10).toString().length){case 1:case 2:case 3:d=h;break;case 4:d=`${h.toString().slice(0,1)}k`;break;case 5:d=`${h.toString().slice(0,2)}k`;break;case 6:d=`${h.toString().slice(0,3)}k`;break;case 7:d=`${h.toString().slice(0,1)}M`;break;case 8:d=`${h.toString().slice(0,2)}M`;break;case 9:d=`${h.toString().slice(0,3)}M`;break;case 10:d=`${h.toString().slice(0,1)}B`;break}return d},o=(h,v)=>{switch(v){case"original":return h;case"3s":case"adaptive":return i(h,!0);case"d":return parseInt(h,10).toLocaleString();case"1s":{let d=h.toString().slice(0,1);for(let g=1;g<h.toString().length;g+=1)d+=0;return i(d,!1)}case"1f":{const d=parseFloat(h.toFixed(1)),p=a.format(d);return h.toString().includes(".")?p:`${p}.${Array(2).join("0")}`}case"2f":{const d=parseFloat(h.toFixed(2)),p=a.format(d);return h.toString().includes(".")?h.toString().split(".")[1].length>1?p:`${p}.${Array(2).join("0")}`:`${p}.${Array(3).join("0")}`}case"3f":{const d=parseFloat(h.toFixed(3)),p=a.format(d);return h.toString().includes(".")?h.toString().split(".")[1].length>1?p:`${p}.${Array(3).join("0")}`:`${p}.${Array(4).join("0")}`}case"+":return`+${a.format(h)}`;case"$":{const d=parseFloat(h.toFixed(2)),p=a.format(d);return h.toString().includes(".")?h.toString().split(".")[1].length>1?`$${p}`:`$${p}.${Array(2).join("0")}`:`$${p}.${Array(3).join("0")}`}case"1%":{const d=h*100,p=a.format(d);return h.toString().includes(".")?`${p}%`:`${p}.${Array(2).join("0")}%`}case"2%":{const d=h*100,p=parseFloat(h.toFixed(2)),g=a.format(p);return d.toString().includes(".")?h.toString().split(".")[1].length>1?`${g}%`:`${g}.${Array(2).join("0")}`:`${g}.${Array(3).join("0")}%`}case"3%":{const d=h*100,p=parseFloat(h.toFixed(3)),g=a.format(p);return d.toString().includes(".")?h.toString().split(".")[1].length>1?`${g}%`:`${g}.${Array(3).join("0")}`:`${g}.${Array(4).join("0")}%`}case"ms1":{const d=Math.floor(h/1e3),p=h%1e3;return`${d}.${p.toString().slice(0,1)}s`}case"ms2":{const d=Math.floor(h/1e3),p=h%1e3,g=h-Math.floor(h),y=Math.floor(g*1e3),m=g*1e3-y,_=Math.floor(m*1e3);let b="";return d&&(b+=`${d}s `),p&&(b+=`${p}ms `),y&&(b+=`${y}\xB5s`),_&&(b+=`${_}ns`),b}default:return h}},s=(h,v)=>{const d=h.toString().slice(0,4),p=h.toString().slice(5,7),g=h.toString().slice(8,10),y=h.toString().slice(11,19);switch(v){case"dd-mm-yyyy":return`${g}-${p}-${d}`;case"mm-dd-yyyy":return`${p}-${g}-${d}`;case"yyyy-mm-dd":return`${d}-${p}-${g}`;case"dd/mm/yyyy":return`${g}/${p}/${d}`;case"mm/dd/yyyy":return`${p}/${g}/${d}`;case"yyyy/mm/dd":return`${d}/${p}/${g}`;case"hh:mm:ss":return y;default:return h}};return z("div",{className:mce.container,children:[C("div",{style:n,children:(r==null?void 0:r.length)&&C(Ce,{children:((l=r[0])==null?void 0:l.value)&&((u=r[0])==null?void 0:u.value.toString().length)>16?s((c=r[0])==null?void 0:c.value,e.dateFormatter):o((f=r[0])==null?void 0:f.value,e.numberFormatter)})}),C("div",{style:t,children:e.subHeaderShow&&e.displayText})]})},_ce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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(Ce,{children:C(ot,{style:{width:"100%",height:"90%"},option:u})})};var wn={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"},KB={exports:{}};/*!
|
|
242
|
+
`||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 zse(r){r.registerAction("legendToggleSelect","legendselectchanged",Ae(dh,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ae(dh,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ae(dh,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ae(dh,"select")),r.registerAction("legendUnSelect","legendunselected",Ae(dh,"unSelect"))}function X5(r){r.registerComponentModel(kw),r.registerComponentView(Z5),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Bse),r.registerSubTypeDefaulter("legend",function(){return"plain"}),zse(r)}var Fse=function(r){j(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),Q5(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),Q5(this,this.option,t)},e.type="legend.scroll",e.defaultOption=io(kw.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}(kw);function Q5(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,oo(e,t,{type:"box",ignoreSize:!!a})}var Vse=Fse,K5=Te,Vw=["width","height"],$w=["x","y"],$se=function(r){j(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 K5),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new K5)},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=J(f)?f:[f,f];d("pagePrev",0);var v=n.getModel("pageTextStyle");c.add(new We({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=Ul(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:fe(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=Vw[u],f=$w[u],h=Vw[1-u],v=$w[1-u];o&&ws("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=we(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;ws(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),ws("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],_=Oe(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 Ge({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=Vw[o],l=$w[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}(Z5),Hse=$se;function Gse(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 Wse(r){ke(X5),r.registerComponentModel(Vse),r.registerComponentView(Hse),Gse(r)}function Use(r){ke(X5),ke(Wse)}var jse=function(r){j(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=io(uh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(uh),Yse=jse,Hw=Ye();function qse(r,e,t){Hw(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Zse(r,e){for(var t=Hw(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||J5(t,o))}}}function J5(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Xse(r,e){var t={model:e,containsPoint:Ae(Kse,e),dispatchAction:Ae(Qse,r),dataZoomInfoMap:null,controller:null},n=t.controller=new jf(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 Qse(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Kse(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function Jse(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 ele(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Hw(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=ge());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Zk(i);L(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Xse(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ge());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){J5(a,i);return}var c=Jse(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),iu(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var tle=function(r){j(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(),qse(a,t,{pan:fe(Gw.pan,this),zoom:fe(Gw.zoom,this),scrollMove:fe(Gw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Zse(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(pw),Gw={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(!!o){var s=Ww[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(Ys(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:eB(function(r,e,t,n,a,i){var o=Ww[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:eB(function(r,e,t,n,a,i){var o=Ww[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function eB(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(Ys(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Ww={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}},rle=tle;function tB(r){gw(r),r.registerComponentModel(Yse),r.registerComponentView(rle),ele(r)}var nle=function(r){j(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=io(uh.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}(uh),ale=nle,ph=Ge,rB=7,ile=1,Uw=30,ole=7,gh="horizontal",nB="vertical",sle=5,lle=["line","bar","candlestick","scatter"],ule={easing:"cubicOut",duration:100,delay:0},cle=function(r){j(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=fe(this._onBrush,this),this._onBrushEnd=fe(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),iu(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(){yf(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 Te;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?ole:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===gh?{right:s.width-o.x-o.width,top:s.height-Uw-rB-i,width:o.width,height:Uw}:{right:rB,top:o.y,width:Uw,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===nB&&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===gh&&!o?{scaleY:l?1:-1,scaleX:1}:a===gh&&o?{scaleY:l?1:-1,scaleX:-1}:a===nB&&!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 ph({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new ph({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:fe(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,M){if(_>0&&M%_){m+=y;return}var A=D==null||isNaN(D)||D==="",I=A?0:nt(D,f,v,!0);A&&!b&&M?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!A&&b&&(p.push([m,0]),g.push([m,0])),p.push([m,I]),g.push([m,I]),m+=y,b=A}),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 M=w.getModel(D?"selectedDataBackground":"dataBackground"),A=new Te,I=new $r({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),P=new Hr({shape:{points:c},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return A.add(I),A.add(P),A}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&&Ne(lle,u.get("type"))<0)){var c=i.getComponent(So(o),s).axis,f=fle(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 ph({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new ph({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:ile,fill:"rgba(0,0,0,0)"}})),L([0,1],function(_){var b=l.get("handleIcon");!ep[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var w=kt(b,-1,0,2,2,null,!0);w.attr({cursor:aB(this._orient),draggable:!0,drift:fe(this._onDragMove,this,_),ondragend:fe(this._onDragEnd,this),onmouseover:fe(this._showDataInfo,this,!0),onmouseout:fe(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),S=l.get("handleSize");this._handleHeight=le(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(),to(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 We({silent:!0,invisible:!0,style:mt(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=le(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Ge({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=kt(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 Ge({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:aB(this._orient),drift:fe(this._onDragMove,this,"all"),ondragstart:fe(this._showDataInfo,this,!0),ondragend:fe(this._onDragEnd,this),onmouseover:fe(this._showDataInfo,this,!0),onmouseout:fe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[nt(t[0],[0,100],n,!0),nt(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];Ys(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?nt(s.minSpan,l,o,!0):null,s.maxSpan!=null?nt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=yn([nt(i[0],o,l,!0),nt(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=yn(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 Ge,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=yn(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=no(a.handles[d].parent,this.group),g=Ld(d===0?"right":"left",p),y=this._handleWidth/2+sle,m=da([h[d]+(d===0?-y:y),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===gh?"middle":g,align:o===gh?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 ye(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,ai(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 Ee(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=yn([nt(a.x,o,s,!0),nt(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&&(ai(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 ph({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?ule:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=Zk(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}(pw);function fle(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function aB(r){return r==="vertical"?"ns-resize":"ew-resize"}var hle=cle;function iB(r){r.registerComponentModel(ale),r.registerComponentView(hle),gw(r)}function vle(r){ke(tB),ke(iB)}var dle={get:function(r,e,t){var n=we((ple[r]||{})[e]);return t&&J(n)?n[n.length-1]:n}},ple={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]}},oB=dle,sB=yr.mapVisual,gle=yr.eachVisual,yle=J,lB=L,mle=yn,_le=nt,ble=function(r){j(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&&T5(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=fe(t,this),this.controllerVisuals=Tw(this.option.controller,n,t),this.targetVisuals=Tw(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=st(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||["<",">"],J(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(ye(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=mle([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={});Pe(i,a),Pe(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){yle(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]={},lB(d,function(g,y){if(!!yr.isValidType(y)){var m=oB.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";lB(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&we(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&we(v)||(s?m[0]:[m[0],m[0]])),_.symbol=sB(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var w=-1/0;gle(b,function(x){x>w&&(w=x)}),_.symbolSize=sB(b,function(x){return _le(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}($e),Tg=ble,uB=[20,140],xle=function(r){j(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]=uB[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=uB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):J(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=yn((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=cB(this,"outOfRange",this.getExtent()),a=cB(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=io(Tg.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}(Tg);function cB(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 wle=xle,Sle=function(r){j(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=_s(n.get("padding")||0),i=t.getBoundingRect();t.add(new Ge({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;$d(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(St),fB=Sle,hB=[["left","right","width"],["top","bottom","height"]];function vB(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=hB[o],l=[0,null,10],u={},c=0;c<3;c++)u[hB[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 Dg(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 qa=nt,Cle=L,dB=Math.min,jw=Math.max,Tle=12,Dle=6,Mle=function(r){j(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 We({style:mt(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=vB(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new Te;u.add(c),c.add(a.outOfRange=pB()),c.add(a.inRange=pB(null,s?yB(this._orient):null,fe(this._dragHandle,this,"all",!1),fe(this._dragHandle,this,"all",!0))),c.setClipPath(new Ge({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("\u56FD"),h=jw(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=fe(this._dragHandle,this,a,!1),u=fe(this._dragHandle,this,a,!0),c=ua(t.get("handleSize"),i[0]),f=kt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=yB(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){ai(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(),ds(f,!0),n.add(f);var v=this.visualMapModel.textStyleModel,d=new We({cursor:h,draggable:!0,drift:l,onmousemove:function(y){ai(y.event)},ondragend:u,style:mt(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=kt(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 sr){var c=l.style;l.useStyle(Q({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 We({silent:!0,invisible:!0,style:mt(f,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:Dle)+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():gB(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=[qa(n[0],a,i,!0),qa(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]];Ys(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[qa(i[0],o,s,!0),qa(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 $l(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 Te(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();Cle([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=t[c];var h=qa(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],no(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=qa(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,no(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 M=this._shapes.handleLabels;if(M)for(var A=0;A<M.length;A++)this._api.enterBlur(M[A])}},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]=dB(jw(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=dB(jw(o[0],t),o[1]);var l=Ale(a,s,o),u=[t-l,t+l],c=qa(t,o,s,!0),f=[qa(u[0],o,s,!0),qa(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||gB(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var d=n8(h,v);this._dispatchHighDown("downplay",Dg(d[0],a)),this._dispatchHighDown("highlight",Dg(d[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Ds(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",Dg(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=no(n,i?null:this.group);return J(t)?da(t,o,a):Ld(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}(fB);function pB(r,e,t,n){return new $r({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){ai(a.event)},ondragend:n})}function Ale(r,e,t){var n=Tle/2,a=r.get("hoverLinkDataSize");return a&&(n=qa(a,e,t,!0)/2),n}function gB(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function yB(r){return r==="vertical"?"ns-resize":"ew-resize"}var Lle=Mle,Ile={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Ple=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Ole=[{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(Doe(n.stateList,n.targetVisuals,fe(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(fe(Ele,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function Ele(r,e,t,n){for(var a=e.targetVisuals[n],i=yr.prepareVisualTypes(a),o={color:bf(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 mB=L;function Rle(r){var e=r&&r.visualMap;J(e)||(e=e?[e]:[]),mB(e,function(t){if(!!t){Pu(t,"splitList")&&!Pu(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&J(n)&&mB(n,function(a){_e(a)&&(Pu(a,"start")&&!Pu(a,"min")&&(a.min=a.start),Pu(a,"end")&&!Pu(a,"max")&&(a.max=a.end))})}})}function Pu(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var _B=!1;function bB(r){_B||(_B=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Ile,Ple),L(Ole,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Rle))}function xB(r){r.registerComponentModel(wle),r.registerComponentView(Lle),bB(r)}var Nle=function(r){j(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=[],kle[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=we(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=ee(this._pieceList,function(l){return l=we(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]=oB.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=we(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=io(Tg.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}(Tg),kle={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]}),I0(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),wB(e,r)},pieces:function(r){var e=this.option;L(e.pieces,function(t,n){_e(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),wB(e,r),I0(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 wB(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Ble=Nle,zle=function(r){j(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=Qt(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 Te;p.onclick=fe(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 We({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),ws(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:Dg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return vB(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 Te,l=this.visualMapModel.textStyleModel;s.add(new We({style:mt(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(kt(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=we(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}(fB),Fle=zle;function SB(r){r.registerComponentModel(Ble),r.registerComponentView(Fle),bB(r)}function Vle(r){ke(xB),ke(SB)}var $le={label:{enabled:!0},decal:{show:!1}},CB=Ye(),Hle={};function Gle(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=we($le);Pe(n.label,r.getLocaleModel().get("aria"),!1),Pe(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=ge();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),CB(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(ye(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var m=$_(h.ecModel,h.name,Hle,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",b(_,m))}else{var d=h.getRawData(),p={},g=CB(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=$_(h.ecModel,S,g,y),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",b(D,T))})}function b(w,x){var S=w?Q(Q({},x),w):x;return S.dirty=!0,S}})}}function i(){var u=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=me(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 M=void 0,A=T.get("name"),I=A?"withName":"withoutName";M=h>1?c.get(["series","multiple",I]):c.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var P=T.getData();if(P.count()>v){var O=c.get(["data","partialData"]);M+=o(O,{displayCnt:v})}else M+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),V=[],$=0;$<P.count();$++)if($<v){var U=P.getName($),Y=P.getValues($),ae=c.get(["data",U?"withName":"withoutName"]);V.push(o(ae,{name:U,value:Y.join(E)}))}M+=V.join(E)+R,_.push(M)}});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 Wle(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 Ule(r){r.registerPreprocessor(Wle),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Gle)}var TB={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},jle=function(){function r(e){var t=this._condVal=ue(e)?new RegExp(e):UT(e)?e:null;if(t==null){var n="";tt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ue(t)?this._condVal.test(e):je(t)?this._condVal.test(e+""):!1},r}(),Yle=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),qle=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}(),Zle=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}(),Xle=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),Qle=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 Yw(r,e){if(r===!0||r===!1){var t=new Yle;return t.value=r,t}var n="";return MB(r)||tt(n),r.and?DB("and",r,e):r.or?DB("or",r,e):r.not?Kle(r,e):Jle(r,e)}function DB(r,e,t){var n=e[r],a="";J(n)||tt(a),n.length||tt(a);var i=r==="and"?new qle:new Zle;return i.children=ee(n,function(o){return Yw(o,t)}),i.children.length||tt(a),i}function Kle(r,e){var t=r.not,n="";MB(t)||tt(n);var a=new Xle;return a.child=Yw(t,e),a.child||tt(n),a}function Jle(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Fe(r),o=r.parser,s=o?tL(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=he(TB,u)?TB[u]:u,f=r[u],h=s?s(f):f,v=g9(c,h)||c==="reg"&&new jle(h);v||tt(t),a.push(v)}}a.length||tt(t);var d=new Qle;return d.valueGetterParam=n,d.valueParser=s,d.getValue=e.getValue,d.subCondList=a,d}function MB(r){return _e(r)&&!vr(r)}var eue=function(){function r(e,t){this._cond=Yw(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function tue(r,e){return new eue(r,e)}var rue={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=tue(r.config,{valueGetterAttrMap:ge({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;he(s,"dimension")||tt(l);var c=e.getDimensionInfo(u);return c||tt(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}}},nue={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=st(t);a.length||tt(n);var i=[];L(a,function(c){var f=c.dimension,h=c.order,v=c.parser,d=c.incomparable;if(f==null&&tt(n),h!=="asc"&&h!=="desc"&&tt(n),d&&d!=="min"&&d!=="max"){var p="";tt(p)}if(h!=="asc"&&h!=="desc"){var g="";tt(g)}var y=e.getDimensionInfo(f);y||tt(n);var m=v?tL(v):null;v&&!m&&tt(n),i.push({dimIdx:y.index,parser:m,comparator:new nL(h,d)})});var o=e.sourceFormat;o!==Mr&&o!==$n&&tt(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 aue(r){r.registerTransform(rue),r.registerTransform(nue)}var iue=function(r){j(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 uL(this),cL(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),cL(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:$a},e}($e),oue=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(St);function sue(r){r.registerComponentModel(iue),r.registerComponentView(oue)}var Za=za.CMD;function Ou(r,e){return Math.abs(r-e)<1e-5}function qw(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(P,O){a&&a.length>2&&n.push(a),a=[P,O]}function c(P,O,E,R){Ou(P,E)&&Ou(O,R)||a.push(P,O,E,R,E,R)}function f(P,O,E,R,V,$){var U=Math.abs(O-P),Y=Math.tan(U/4)*4/3,ae=O<P?-1:1,H=Math.cos(P),q=Math.sin(P),X=Math.cos(O),Z=Math.sin(O),ne=H*V+E,se=q*$+R,K=X*V+E,ve=Z*$+R,N=V*Y*ae,F=$*Y*ae;a.push(ne-N*q,se+F*H,K+N*Z,ve-F*X,K,ve)}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===Za.L||y===Za.C||y===Za.Q)&&(a=[s,l])),y){case Za.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Za.L:h=e[g++],v=e[g++],c(i,o,h,v),i=h,o=v;break;case Za.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Za.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 Za.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 M=(D?-1:1)*Math.PI/2,A=S;D?A>T:A<T;A+=M){var I=D?Math.max(A+M,T):Math.min(A+M,T);f(A,I,_,b,w,x)}break;case Za.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 Za.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function Zw(r,e,t,n,a,i,o,s,l,u){if(Ou(r,t)&&Ou(e,n)&&Ou(a,o)&&Ou(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=[],M=[];Yi(r,t,a,o,.5,D),Yi(e,n,i,s,.5,M),Zw(D[0],M[0],D[1],M[1],D[2],M[2],D[3],M[3],l,u),Zw(D[4],M[4],D[5],M[5],D[6],M[6],D[7],M[7],l,u)}function lue(r,e){var t=qw(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++];Zw(s,l,c,f,h,v,d,p,o,e),s=d,l=p}n.push(o)}return n}function AB(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=AB([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 uue(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=AB([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 IB(r,e,t,n){return r*n-t*e}function cue(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=IB(c,f,l,u);if(Math.abs(h)<1e-6)return null;var v=r-a,d=e-i,p=IB(v,d,c,f)/h;return p<0||p>1?null:new Ee(p*l+r,p*u+e)}function fue(r,e,t){var n=new Ee;Ee.sub(n,t,e),n.normalize();var a=new Ee;Ee.sub(a,r,e);var i=a.dot(n);return i}function Eu(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function hue(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=cue(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:fue(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++)Eu(d,r[i].slice());Eu(d,v),Eu(d,h);for(var i=c.idx+1;i<=u.idx+n;i++)Eu(p,r[i%n].slice());return Eu(p,h),Eu(p,v),[{points:d},{points:p}]}function PB(r){var e=r.points,t=[],n=[];ud(e,t,n);var a=new Re(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 Ee,c=new Ee;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),hue(e,u,c)}function Mg(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Mg(r,i[0],a,n),Mg(r,i[1],t-a,n)}return n}function vue(r,e){for(var t=[],n=0;n<e;n++)t.push(f_(r));return t}function due(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function pue(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function gue(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":uue(n,e,t),a=Ge;break;case"sector":LB(n,e,t),a=Vr;break;case"circle":LB({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Vr;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(lue(r.getUpdatedPathProxy(),o),function(y){return pue(y)}),l=s.length;if(l===0)Mg(PB,{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=[],_=[];ud(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||(Mg(PB,{points:v.poly},d,t),h-=d)}}a=$r;break}if(!a)return vue(r,e);for(var p=[],u=0;u<t.length;u++){var g=new a;g.setShape(t[u]),due(r,g),p.push(g)}return p}function yue(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;Yi(d,g,m,b,T,a),Yi(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 OB(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 mue(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=yue(l,u),c=t[0],f=t[1],n=c,a=f):(f=OB(a||l,l),c=l):(c=OB(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function EB(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 _ue(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 bue(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 xue(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=EB(s),c=EB(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],h=[],v=0,d=1/0,p=[],g=s.length;i&&(s=bue(s));for(var y=_ue(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 M=f[_],A=f[_+1],I=l[_]-c[0],P=l[_+1]-c[1],O=I*T-P*S,E=I*S+P*T;p[_]=O,p[_+1]=E;var R=O-M,V=E-A;D+=R*R+V*V}if(D<d){d=D,v=x;for(var $=0;$<p.length;$++)h[$]=p[$]}}else for(var U=0;U<g;U+=2)h[U]=l[U]-c[0],h[U+1]=l[U+1]-c[1];a.push({from:f,to:h,fromCp:u,toCp:c,rotation:-v})}return a}function Ag(r){return r.__isCombineMorphing}var RB="__mOriginal_";function Lg(r,e,t){var n=RB+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 yh(r,e){var t=RB+e;r[t]&&(r[e]=r[t],r[t]=null)}function NB(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 kB(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=mue(qw(t),qw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&NB(i,s),l&&NB(o,l),Lg(e,"updateTransform",{replace:u}),e.transform=null;var c=xue(i,o,10,Math.PI),f=[];Lg(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);gc(p,w,x,v);for(var D=0;D<m.length;D+=2){var M=m[D],A=m[D+1],I=_[D],P=_[D+1],O=M*d+I*v,E=A*d+P*v;f[D]=O*T-E*S+p[0],f[D+1]=O*S+E*T+p[1]}var R=f[0],V=f[1];h.moveTo(R,V);for(var D=2;D<m.length;){var I=f[D++],P=f[D++],$=f[D++],U=f[D++],Y=f[D++],ae=f[D++];R===I&&V===P&&$===Y&&U===ae?h.lineTo(Y,ae):h.bezierCurveTo(I,P,$,U,Y,ae),R=Y,V=ae}}}})}function Xw(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;kB(r,e),e.__morphT=0;function i(){yh(e,"buildPath"),yh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},me({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function wue(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 Ig(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:wue(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 BB(r){return gue(r.path,r.count)}function Qw(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Sue(r,e,t){var n=[];function a(w){for(var x=0;x<w.length;x++){var S=w[x];Ag(S)?a(S.childrenRef()):S instanceof Be&&n.push(S)}}a(r);var i=n.length;if(!i)return Qw();var o=t.dividePath||BB,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Qw();n=Ig(n),s=Ig(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new oi,h=0;h<i;h++){var v=n[h],d=s[h];d.parent=e,d.copyTransform(f),c||kB(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)}Lg(e,"addSelfToZr",{after:function(w){p(w)}}),Lg(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,yh(e,"addSelfToZr"),yh(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?me({delay:(t.delay||0)+c(h,y,n[h],s[h]),done:_},t):t;Xw(n[h],s[h],b)}else e.__morphT=0,e.animateTo({__morphT:1},me({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++)yh(r[w],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function Cue(r,e,t){var n=e.length,a=[],i=t.dividePath||BB;function o(v){for(var d=0;d<v.length;d++){var p=v[d];Ag(p)?o(p.childrenRef()):p instanceof Be&&a.push(p)}}if(Ag(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(f_(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"),Qw()}a=Ig(a),e=Ig(e);for(var f=t.individualDelay,u=0;u<n;u++){var h=f?me({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;Xw(a[u],e[u],h)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function zB(r){return J(r[0])}function FB(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 Tue={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=f_(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function Kw(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Hl("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;zB(r)&&(u=r,c=e),zB(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(Ag(T))f({many:[T],one:D},!0,_,b,!0);else{var M=s?me({delay:s(_,b)},l):l;Xw(T,D,M),i(T,D,T,D,M)}}else for(var A=me({dividePath:Tue[t],individualDelay:s&&function(V,$,U,Y){return s(V+_,b)}},l),I=m?Sue(x,S,A):Cue(S,x,A),P=I.fromIndividuals,O=I.toIndividuals,E=P.length,R=0;R<E;R++){var M=s?me({delay:s(R,E)},l):l;i(P[R],O[R],m?x[R]:y.one,m?y.one:x[R],M)}}for(var h=u?u===r:r.length>e.length,v=u?FB(c,u):FB(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 Js(r){if(!r)return[];if(J(r)){for(var e=[],t=0;t<r.length;t++)e.push(Js(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof Be&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var VB=1e4,Due=Ye();function Mue(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 $B(r){var e=[];return L(r,function(t){var n=t.data;if(!(n.count()>VB))for(var a=n.getIndices(),i=Mue(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 Jw(r,e,t){r.traverse(function(n){n instanceof Be&&wt(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function eS(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Ru(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Aue(r,e,t){var n=Hl("update",t,e);n&&r.traverse(function(a){if(a instanceof kn){var i=XW(a);i&&a.animateFrom({style:i},n)}})}function Lue(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 HB(r,e,t){var n=$B(r),a=$B(e);function i(y,m,_,b,w){(_||y)&&m.animateFrom({style:_&&_!==y?Q(Q({},_.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 M=b.get(T.name,w);return D&&D.categories[M]||M+""}var A=b.getRawDataItem(w);return A&&A.groupId?A.groupId+"":x||b.getId(w)}}var f=Lue(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&&Aue(S,b.dataIndex,w);return}x&&h[x.id]||S&&(Ru(S),x?(Ru(x),eS(x),u=!0,Kw(Js(x),Js(S),b.divide,w,y,i)):Jw(S,w,y))}new vi(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=rt(ee(m,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==x&&!h[T.id]});x&&(Ru(x),S.length?(L(S,function(T){Ru(T),eS(T)}),u=!0,Kw(Js(S),Js(x),_.divide,w,y,i)):Jw(x,w,_.dataIndex))}).updateOneToMany(function(y,m){var _=n[m],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&h[b.id])){var w=rt(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 Ru(S)}),b?(Ru(b),eS(b),u=!0,Kw(Js(b),Js(w),_.divide,x,y[0],i)):L(w,function(S){return Jw(S,x,y[0])}))}}).updateManyToMany(function(y,m){new vi(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=Hl("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(x){x instanceof Be&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function GB(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function WB(r){return J(r)?r.sort().join(","):r}function Do(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Iue(r,e){var t=ge(),n=ge(),a=ge();return L(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=GB(i),c=WB(u);n.set(c,{dataGroupId:s,data:l}),J(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=GB(i),u=WB(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Do(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Do(s),data:s}]});else if(J(l)){var f=[];L(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Do(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Do(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:Do(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Do(s)})}}}}),t}function UB(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 Pue(r,e,t,n){var a=[],i=[];L(st(r.from),function(o){var s=UB(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Do(e.oldData[s]),dim:o.dimension})}),L(st(r.to),function(o){var s=UB(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Do(l),dim:o.dimension})}}),a.length>0&&i.length>0&&HB(a,i,n)}function Oue(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){L(st(n.seriesTransition),function(a){L(st(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][Yd]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=Due(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(st(i),function(v){Pue(v,a,n,t)});else{var o=Iue(a,n);L(o.keys(),function(v){var d=o.get(v);HB(d.oldSeries,d.newSeries,t)})}L(n.updatedSeries,function(v){v[Yd]&&(v[Yd]=!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()<VB&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}ke([ZY]),ke([HY]),ke([_q,Bq,Xq,BZ,eX,qX,TQ,fK,FK,qK,iJ,uee,kee,Zee,pte,wte,Vte,Xte,ure,yre,Ire,pne]),ke(zne),ke(mae),ke(WE),ke(Nae),ke(hN),ke(Hae),ke(Qae),ke(Kie),ke(xoe),ke(lh),ke($oe),ke(Woe),ke(ise),ke(pse),ke(Sse),ke(Pse),ke(Use),ke(vle),ke(tB),ke(iB),ke(Vle),ke(xB),ke(SB),ke(Ule),ke(aue),ke(sue),ke(Oue),ke(lY);var Eue=Object.freeze(Object.defineProperty({__proto__:null,registerLocale:T_,version:U6,dependencies:j6,PRIORITY:fI,init:uU,connect:cU,disConnect:DI,disconnect:fU,dispose:hU,getInstanceByDom:D1,getInstanceById:vU,registerTheme:M1,registerPreprocessor:A1,registerProcessor:L1,registerPostInit:MI,registerPostUpdate:AI,registerUpdateLifecycle:fp,registerAction:ya,registerCoordinateSystem:LI,getCoordinateSystemDimensions:dU,registerLayout:II,registerVisual:fo,registerLoading:P1,setCanvasCreator:pU,registerMap:OI,getMap:gU,registerTransform:EI,dataTool:yU,throttle:Xd,use:ke,setPlatformAPI:FT,parseGeoJSON:q1,parseGeoJson:q1,env:Ue,Model:lt,Axis:Wn,innerDrawElementOnCanvas:f1,zrender:FG,matrix:DH,vector:cH,zrUtil:nH,color:eG,helper:Cj,number:Ij,time:Pj,graphic:Oj,format:Ej,util:Rj,List:Ir,ComponentModel:$e,ComponentView:St,SeriesModel:_t,ChartView:ut,extendComponentModel:Uj,extendComponentView:jj,extendSeriesModel:Yj,extendChartView:qj},Symbol.toStringTag,{value:"Module"})),el={},Nu={},jB={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1,t=function(){return"".concat(e++)};r.default=t})(jB);var Pg={},Og={},tS={};(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})(tS);var wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.SensorTabIndex=wi.SensorClassName=wi.SizeSensorId=void 0;var Rue="size-sensor-id";wi.SizeSensorId=Rue;var Nue="size-sensor-object";wi.SensorClassName=Nue;var kue="-1";wi.SensorTabIndex=kue,Object.defineProperty(Og,"__esModule",{value:!0}),Og.createSensor=void 0;var Bue=zue(tS),YB=wi;function zue(r){return r&&r.__esModule?r:{default:r}}var Fue=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",YB.SensorClassName),c.setAttribute("tabindex",YB.SensorTabIndex),c.type="text/html",e.appendChild(c),c.data="about:blank",c},i=(0,Bue.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}};Og.createSensor=Fue;var Eg={};Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.createSensor=void 0;var Vue=$ue(tS);function $ue(r){return r&&r.__esModule?r:{default:r}}var Hue=function(e){var t=void 0,n=[],a=(0,Vue.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}};Eg.createSensor=Hue,Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.createSensor=void 0;var Gue=Og,Wue=Eg,Uue=typeof ResizeObserver!="undefined"?Wue.createSensor:Gue.createSensor;Pg.createSensor=Uue,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.removeSensor=Nu.getSensor=void 0;var jue=que(jB),Yue=Pg,Rg=wi;function que(r){return r&&r.__esModule?r:{default:r}}var mh={},Zue=function(e){var t=e.getAttribute(Rg.SizeSensorId);if(t&&mh[t])return mh[t];var n=(0,jue.default)();e.setAttribute(Rg.SizeSensorId,n);var a=(0,Yue.createSensor)(e);return mh[n]=a,a};Nu.getSensor=Zue;var Xue=function(e){var t=e.element.getAttribute(Rg.SizeSensorId);e.element.removeAttribute(Rg.SizeSensorId),e.destroy(),t&&mh[t]&&delete mh[t]};Nu.removeSensor=Xue,Object.defineProperty(el,"__esModule",{value:!0}),el.ver=ZB=el.clear=qB=el.bind=void 0;var rS=Nu,Que=function(e,t){var n=(0,rS.getSensor)(e);return n.bind(t),function(){n.unbind(t)}},qB=el.bind=Que,Kue=function(e){var t=(0,rS.getSensor)(e);(0,rS.removeSensor)(t)},ZB=el.clear=Kue,Jue="1.0.1";el.ver=Jue;function XB(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function nS(r){return typeof r=="function"}function ece(r){return typeof r=="string"}var ku=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},tce=function(r){BT(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(!(nS(n)&&!n(t,this.props))){if(!ku(t.theme,this.props.theme)||!ku(t.opts,this.props.opts)||!ku(t.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var a=["option","notMerge","lazyUpdate","showLoading","loadingOption"];ku(XB(this.props,a),XB(t,a))||this.updateEChartsOption(),(!ku(t.style,this.props.style)||!ku(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{ZB(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||{}),nS(i)&&i(o),this.ele&&qB(this.ele,function(){t.resize()})},e.prototype.bindEvents=function(t,n){function a(o,s){ece(o)&&nS(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=Cm({height:300},a);return C("div",{ref:function(l){t.ele=l},style:s,className:"echarts-for-react "+o})},e}(B.PureComponent),ot=function(r){BT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=Eue,n}return e}(tce);const rce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},nce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!n&&C(ot,{style:{width:"100%",height:"90%"},option:c}),n&&t&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{t(v.name)}}})]})},ace=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:h}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{o(d.name)}}})]})},ice=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:c}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{s(v.name)}}})]})},oce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:p,onEvents:{click:g=>{o(g.name)}}})}),!s&&C(Ce,{children:C(ot,{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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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(Ce,{children:z(Ce,{children:[s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:u,onEvents:{click:v=>{o(v.name)}}})}),!s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:u})})]})})},sce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:c}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:h=>{o(h.name)}}})]})},lce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{s(v.name)}}})]})},uce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:c}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{o(v.name)}}})]})},cce=({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(Ce,{children:C(ot,{style:{width:"100%",height:"90%"},option:i})})},fce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{s(d.name)}}})]})},hce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:p}),s&&o&&C(ot,{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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:u}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:u,onEvents:{click:h=>{o(h.name)}}})]})},vce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:v}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{s(p.name)}}})]})},dce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})},pce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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(ot,{style:{width:"100%",height:"113%"},option:l})},gce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:s})})},yce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},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 z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{s(d.name)}}})]})};var mce={container:"_container_hxsc7_1",label:"_label_hxsc7_7",sync:"_sync_hxsc7_13"};const QB=({data:r,customSettings:e})=>{var l,u,c,f;const t={fontSize:`${e.subHeaderFontSize}px`||"14px"},n={fontSize:`${e.fontSize}px`||"30px"},a=new Intl.NumberFormat,i=(h,v)=>{let d="";if(v)switch(parseInt(h,10).toString().length){case 1:case 2:case 3:d=h;break;case 4:d=`${h.toString().slice(0,1)}.${h.toString().slice(1,3)}k`;break;case 5:d=`${h.toString().slice(0,2)}.${h.toString().slice(2,4)}k`;break;case 6:d=`${h.toString().slice(0,3)}.${h.toString().slice(3,5)}k`;break;case 7:d=`${h.toString().slice(0,1)}.${h.toString().slice(1,3)}M`;break;case 8:d=`${h.toString().slice(0,2)}.${h.toString().slice(2,4)}M`;break;case 9:d=`${h.toString().slice(0,3)}.${h.toString().slice(3,5)}M`;break;case 10:d=`${h.toString().slice(0,1)}.${h.toString().slice(1,3)}B`;break}else switch(parseInt(h,10).toString().length){case 1:case 2:case 3:d=h;break;case 4:d=`${h.toString().slice(0,1)}k`;break;case 5:d=`${h.toString().slice(0,2)}k`;break;case 6:d=`${h.toString().slice(0,3)}k`;break;case 7:d=`${h.toString().slice(0,1)}M`;break;case 8:d=`${h.toString().slice(0,2)}M`;break;case 9:d=`${h.toString().slice(0,3)}M`;break;case 10:d=`${h.toString().slice(0,1)}B`;break}return d},o=(h,v)=>{switch(v){case"original":return h;case"3s":case"adaptive":return i(h,!0);case"d":return parseInt(h,10).toLocaleString();case"1s":{let d=h.toString().slice(0,1);for(let g=1;g<h.toString().length;g+=1)d+=0;return i(d,!1)}case"1f":{const d=parseFloat(h.toFixed(1)),p=a.format(d);return h.toString().includes(".")?p:`${p}.${Array(2).join("0")}`}case"2f":{const d=parseFloat(h.toFixed(2)),p=a.format(d);return h.toString().includes(".")?h.toString().split(".")[1].length>1?p:`${p}.${Array(2).join("0")}`:`${p}.${Array(3).join("0")}`}case"3f":{const d=parseFloat(h.toFixed(3)),p=a.format(d);return h.toString().includes(".")?h.toString().split(".")[1].length>1?p:`${p}.${Array(3).join("0")}`:`${p}.${Array(4).join("0")}`}case"+":return`+${a.format(h)}`;case"$":{const d=parseFloat(h.toFixed(2)),p=a.format(d);return h.toString().includes(".")?h.toString().split(".")[1].length>1?`$${p}`:`$${p}.${Array(2).join("0")}`:`$${p}.${Array(3).join("0")}`}case"1%":{const d=h*100,p=a.format(d);return h.toString().includes(".")?`${p}%`:`${p}.${Array(2).join("0")}%`}case"2%":{const d=h*100,p=parseFloat(h.toFixed(2)),g=a.format(p);return d.toString().includes(".")?h.toString().split(".")[1].length>1?`${g}%`:`${g}.${Array(2).join("0")}`:`${g}.${Array(3).join("0")}%`}case"3%":{const d=h*100,p=parseFloat(h.toFixed(3)),g=a.format(p);return d.toString().includes(".")?h.toString().split(".")[1].length>1?`${g}%`:`${g}.${Array(3).join("0")}`:`${g}.${Array(4).join("0")}%`}case"ms1":{const d=Math.floor(h/1e3),p=h%1e3;return`${d}.${p.toString().slice(0,1)}s`}case"ms2":{const d=Math.floor(h/1e3),p=h%1e3,g=h-Math.floor(h),y=Math.floor(g*1e3),m=g*1e3-y,_=Math.floor(m*1e3);let b="";return d&&(b+=`${d}s `),p&&(b+=`${p}ms `),y&&(b+=`${y}\xB5s`),_&&(b+=`${_}ns`),b}default:return h}},s=(h,v)=>{const d=h.toString().slice(0,4),p=h.toString().slice(5,7),g=h.toString().slice(8,10),y=h.toString().slice(11,19);switch(v){case"dd-mm-yyyy":return`${g}-${p}-${d}`;case"mm-dd-yyyy":return`${p}-${g}-${d}`;case"yyyy-mm-dd":return`${d}-${p}-${g}`;case"dd/mm/yyyy":return`${g}/${p}/${d}`;case"mm/dd/yyyy":return`${p}/${g}/${d}`;case"yyyy/mm/dd":return`${d}/${p}/${g}`;case"hh:mm:ss":return y;default:return h}};return z("div",{className:mce.container,children:[C("div",{style:n,children:(r==null?void 0:r.length)&&C(Ce,{children:((l=r[0])==null?void 0:l.value)&&((u=r[0])==null?void 0:u.value.toString().length)>16?s((c=r[0])==null?void 0:c.value,e.dateFormatter):o((f=r[0])==null?void 0:f.value,e.numberFormatter)})}),C("div",{style:t,children:e.subHeaderShow&&e.displayText})]})},_ce=({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"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...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(Ce,{children:C(ot,{style:{width:"100%",height:"90%"},option:u})})};var wn={tableSection:"_tableSection_20k3k_1",tableContainer:"_tableContainer_20k3k_5",tableDiv:"_tableDiv_20k3k_9",table:"_table_20k3k_1",tableHead:"_tableHead_20k3k_17",tableHeadColHash:"_tableHeadColHash_20k3k_21",tableCol:"_tableCol_20k3k_25",tableColLabel:"_tableColLabel_20k3k_29",data:"_data_20k3k_33",tableBodyColHash:"_tableBodyColHash_20k3k_37",tableBodyColHashLabel:"_tableBodyColHashLabel_20k3k_41","table-loader-container":"_table-loader-container_20k3k_45","table-error-message":"_table-error-message_20k3k_49",noData:"_noData_20k3k_53"},KB={exports:{}};/*!
|
|
243
243
|
Copyright (c) 2018 Jed Watson.
|
|
244
244
|
Licensed under the MIT License (MIT), see
|
|
245
245
|
http://jedwatson.github.io/classnames
|
|
@@ -320,7 +320,7 @@ YEAR(${t}) =
|
|
|
320
320
|
WHEN MONTH(NOW()) = 1 THEN YEAR(NOW())-1
|
|
321
321
|
ELSE YEAR(NOW())
|
|
322
322
|
END`;if(r==="This Month")return e?`MONTH(${t}) = MONTH(NOW()) AND YEAR(${t}) = YEAR(NOW())`:`MONTH(${t}) = MONTH(NOW()) AND YEAR(${t}) = YEAR(NOW())`;const a=r.split(" - ")[0],i=r.split(" - ")[1];return e?`${t} BETWEEN '${a} 00:00:00' AND '${i} 23:59:59'`:`${t} BETWEEN '${a}' AND '${i}'`};var Hfe=Object.freeze(Object.defineProperty({__proto__:null,getModifiedQuery:$fe,getTimeFilterValue:BS,groupArray:Y4,groupByMultipleKeys:e4,updateGroupData:xa,findKeys:aS},Symbol.toStringTag,{value:"Module"}));const q4=({columnName:r,dbName:e,onChangeFilterValue:t,name:n})=>{const[a,i]=B.useState(""),o=e.toLowerCase()==="bigquery",s=e.toLowerCase()==="mysql",l=e.toLowerCase()==="mongodb";return C(kS,{setTimeGrainValue:i,timeGrainValue:a,onChange:u=>{const c=BS({col:o||s?r:l?`\`${r}\``:`"${r}"`,timeGrainValue:u,database:e,isTimeStamp:!1});t(n,c)}})};var zS={filterButton:"_filterButton_rl2m8_1",container:"_container_rl2m8_5",dropdown:"_dropdown_rl2m8_9"},qt={container:"_container_170ju_1",wrapper:"_wrapper_170ju_5",label:"_label_170ju_9",floatingLabel:"_floatingLabel_170ju_13",dropdown:"_dropdown_170ju_17",options:"_options_170ju_21",checkedOption:"_checkedOption_170ju_25",option:"_option_170ju_21",icon:"_icon_170ju_33",text:"_text_170ju_37",floatingText:"_floatingText_170ju_41",search:"_search_170ju_45",loadMore:"_loadMore_170ju_49"};const Gfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m10.6 16.2l7.05-7.05l-1.4-1.4l-5.65 5.65l-2.85-2.85l-1.4 1.4ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Z"})}),FS=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Z"})}),Er=({label:r,labelVariant:e="floating",selectedOption:t,onChange:n,className:a,options:i,isDisabled:o,children:s,Icon:l,isSearchEnabled:u,closeControl:c})=>{const[f,h]=B.useState(!1),v=B.useRef(null),[d,p]=B.useState(""),[g,y]=B.useState(20);return Jg({wrapRef:v,onOutsideClick:()=>h(!1)}),B.useEffect(()=>{!(c!=null&&c.close)||h(!1)},[c==null?void 0:c.close]),z("div",{className:Qn(qt.container,a),ref:v,children:[r?C(de,{variant:"span",styleClass:e==="floating"?"custom":"font-14",className:`${qt.label} ${e==="floating"?qt.floatingLabel:""}`,children:r}):null,z(Ie,{type:"button",variant:"custom",isDisabled:o,className:qt.wrapper,onClick:()=>h(!f),children:[z(de,{variant:"p",styleClass:"font-14",className:`${qt.text} ${e==="floating"?qt.floatingText:""}`,children:[l&&C(l,{className:qt.icon}),t.label||"Select An Option"]}),C(ey,{})]}),f&&!o&&z("div",{className:qt.dropdown,children:[u&&C(Sh,{className:qt.search,setSearchKeyword:p}),z("div",{className:qt.options,children:[(d?i.filter(m=>m.label.toLowerCase().includes(d)):i.slice(0,g)).map(m=>{const _=m.value===t.value;return C(Ie,{type:"button",variant:"custom",className:_?qt.checkedOption:qt.option,onClick:()=>{n(m),h(!1)},children:m.label},m.key||m.value)}),g<=i.length&&C(Ie,{variant:"secondary",type:"button",onClick:()=>y(m=>m+20),className:qt.loadMore,children:"Load More"})]}),s]})]})},Z4=pe.default.memo(({label:r,labelVariant:e="floating",selectedOptions:t,onChange:n,className:a,options:i,isDisabled:o,children:s,isSearchEnabled:l})=>{const[u,c]=B.useState(!1),f=B.useRef(null),[h,v]=B.useState(""),[d,p]=B.useState(20);return Jg({wrapRef:f,onOutsideClick:()=>c(!1)}),z("div",{className:Qn(qt.container,a),ref:f,children:[r?C(de,{variant:"span",styleClass:e==="floating"?"custom":"font-14",className:`${qt.label} ${e==="floating"?"absolute left-2 top-1 text-xs":""}`,children:r}):null,z(Ie,{type:"button",variant:"custom",isDisabled:o,className:qt.wrapper,onClick:()=>c(!u),children:[C(de,{variant:"p",styleClass:"font-14",className:e==="floating"?"mt-2.5":"",children:"Select 1 or more option"}),C(ey,{})]}),u&&!o&&z("div",{className:qt.dropdown,children:[l&&C(Sh,{className:"p-2 mb-3",setSearchKeyword:v}),z("div",{className:qt.options,children:[(h?i.filter(g=>g.label.toLowerCase().includes(h)):i.slice(0,d)).map(g=>{const y=!!t.find(m=>m.value===g.value);return z(Ie,{type:"button",variant:"custom",className:y?qt.checkedOption:qt.option,onClick:()=>{const m=y?t.filter(_=>_.value!==g.value):[...t,g];n(m)},children:[y?C(Gfe,{}):C(FS,{}),g.label]},g.key||g.value)}),d<=i.length&&C(Ie,{variant:"secondary",type:"button",onClick:()=>p(g=>g+20),className:"w-full text-blue-700 text-center",children:"Load More"})]}),s]})]})}),VS=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 6h10l-5.01 6.3L7 6zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"})}),$S=({rlsConditions:r,onChangeFilterValue:e,dbName:t,iconClass:n="",...a})=>C(Th,{...a,buttonClass:a.buttonClass?a.buttonClass:zS.filterButton,button:C(VS,{className:n}),children:C("div",{className:zS.container,children:r.map(i=>C("div",{className:zS.dropdown,children:i.datatype!=="date"?C(Er,{label:i.name,selectedOption:{value:i.value||i.options[0],label:i.value||i.options[0]},options:i.options.map(o=>({value:o,label:o})),onChange:o=>{e(i.name,o.value)}}):C(q4,{columnName:i.columnName,dbName:t,name:i.name,onChangeFilterValue:e})}))})});var X4="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e2ZpbGw6I2RhZGVkZjt9LmNscy03e2ZpbGw6IzE4MmM2MDt9LmNscy0ye3N0cm9rZTojNTg2NWY2O3N0cm9rZS13aWR0aDo0cHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIxMC41LDIwMC44M2MuNC0uNjYuNjgtMS40LjgyLTIuMiwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguNDMtNC41Ni0yLjA5LTkuNjgtNi44Ni0xMC42Ni0uMDEsMC0uMDMsMC0uMDQsMC0yLjQtLjQ5LTUuMDItLjIyLTcuNDUtLjIyaC00NC4yMmMtLjUyLDAtMi4zMy0uMzEtMi43NywwbC0yNC4yOCwxNy4yMmgtNjEuNjFjLTMuOTcsMC02Ljk5LDMuNTYtNi4zNCw3LjQ3bDkuNzUsNTkuNDJjLjUxLDMuMTEsMy4yLDUuMzksNi4zNCw1LjM5aDExNy44NiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIwNywxMTQuNDN2LTguNTRjMC0zLjU1LTIuODgtNi40My02LjQzLTYuNDNoLTE3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTAzLjQ3LDk5LjQ2aC0xNS4xMmMtMy41NSwwLTYuNDMsMi44OC02LjQzLDYuNDN2MjUuNDgiLz48Zz48bGluZSBjbGFzcz0iY2xzLTIiIHgxPSIxMTQuMTIiIHkxPSI5NC4wOCIgeDI9IjE0NC44NCIgeTI9Ijk0LjA4Ii8+PGc+PHJlY3QgY2xhc3M9ImNscy02IiB4PSIxMTIuNjEiIHk9IjEwMi40MyIgd2lkdGg9IjE4Ljk3IiBoZWlnaHQ9IjMuMiIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMTM3LjYxIiB5PSIxMDIuNDMiIHdpZHRoPSI4LjkiIGhlaWdodD0iMy4yIi8+PC9nPjwvZz48cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Im0xNjQuOTgsODEuNDZsLS4wOCwxNi4yOHMuMTUsMy4yNC4zLDMuNjIuNiwxLjUxLDEuMTMsMS44OCwxLjAyLjc5LDEuNzcsMS4wNi45NC40OSwyLjExLjQ5LDE4LjE3LjA0LDE4LjE3LjA0bC0yMy40MS0yMy4zN1oiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xODguNTEsMTA0LjkxdjkuNTIiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xMDMuNTMsMTMxLjM3di00NC45NWMwLTIuODQsMi4zLTUuMTUsNS4xNS01LjE1LDE4Ljc3LDAsMzcuNTQsMCw1Ni4zMSwwIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTY1LjAxLDgxLjI3djE4LjM1YzAsMi44NCwyLjMxLDUuMTUsNS4xNSw1LjE1aDE4LjM1cy0yMy41LTIzLjYyLTIzLjUtMjMuNVoiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMjQuOTYiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMzEuMjUiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xOTIuNTcsMTgzLjMzYzkuNjIsOS42MiwzMC4yOCwzMC4yOCwzMC4yOCwzMC4yOCwxLjE3LDEuMTcsMS4xNywzLjA3LDAsNC4yNHMtMy4wNywxLjE3LTQuMjQsMGMwLDAtMjAuNTgtMjAuNTgtMzAuMjItMzAuMjIiLz48Zz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNjguNjYsMTcwLjkzYy0uNzQsMC0xLjM0LjI0LTEuODEuNzItLjQ3LjQ4LS43MSwxLjA5LS43MSwxLjgzcy4yNCwxLjMyLjcxLDEuODFjLjQ3LjQ5LDEuMDcuNzQsMS44MS43NHMxLjM0LS4yNSwxLjgxLS43NGMuNDctLjQ5LjcxLTEuMS43MS0xLjgxcy0uMjQtMS4zNC0uNzEtMS44M2MtLjQ3LS40OC0xLjA4LS43Mi0xLjgxLS43MloiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNzQuNjksMTUzLjc3Yy0uNjItMS4wMi0xLjQ5LTEuODItMi42LTIuNC0xLjEyLS41Ny0yLjQtLjg2LTMuODUtLjg2LTEuNjgsMC0zLjE3LjQtNC40NywxLjE5cy0yLjI5LDEuOTQtMi45OCwzLjQzbDIuNzYsMi4yOGMuNDYtMS4wNiwxLjA3LTEuODYsMS44NS0yLjQuNzctLjU0LDEuNjUtLjgxLDIuNjQtLjgxLjc2LDAsMS40MS4xNCwxLjk3LjQxLjU1LjI4Ljk4LjY3LDEuMjgsMS4xNy4zLjUxLjQ1LDEuMS40NSwxLjc5cy0uMTYsMS4yOS0uNDcsMS44MWMtLjMxLjUyLS43NS45Mi0xLjMxLDEuMjEtLjU2LjI5LTEuMjIuNDMtMS45OC40M2gtLjkzdjYuNjZoMy4yOGwuMjYtMy43M2MuNzEtLjI0LDEuMzctLjU1LDEuOTUtLjkzLjk5LS42NCwxLjc1LTEuNDUsMi4yOS0yLjQxLjU0LS45Ny44MS0yLjA3LjgxLTMuMzEsMC0xLjMzLS4zMS0yLjUxLS45My0zLjU0WiIvPjwvZz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im04NS41NSwyMDMuOTdjLjY4LDIuODksMy4yNiw0Ljk2LDYuMjYsNC45NmgxMTcuNzMiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0yMTUuMzcsMjA2LjA0Yy40Ny0uNzEuOC0xLjUyLjk1LTIuNCwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguMzktNC4xNi0xLjY4LTguNzktNS42Ny0xMC4zMSIvPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0ibTIyMy41MSwxMjAuMDhzLjQ5LDEuNjIuNTMsMS43My4zMiwyLjQ0LjMyLDIuNDRsLS4wNCwxLjkxLTEuMzgsNy4xMy0zLjM5LDE5LjMxLTIuODksMTUuOTItMi45NiwxNi43Ni0yLjQ0LDEzLjE2LS45MiwyLjY1LDQuOTgsNS4xNS44NS0yLjE1LjgxLTQuMDYsMS40OC04LjMzLDIuODItMTUuNzEsMi4xNS0xMi4xMSwxLjk0LTExLjM2LDIuNzUtMTQuNzUuODgtNC42OS4yOC0yLjU4LjA3LTIuMTItLjYtMi43NS0xLjI0LTIuMzYtMS4wOS0xLjU5LTIuMDEtMS4zMS0uOTItLjI4WiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSI4NS42OCAyMDMuOTMgMjA0LjU1IDIwMy44NCAyMDkuMzUgMjA4LjczIDE0OC40OCAyMDguODggOTAuOTUgMjA5LjAyIDg5LjUgMjA4LjY2IDg3Ljk4IDIwNy45MiA4Ni44MiAyMDYuNTggODYuMDEgMjA1LjAzIDg1LjY4IDIwMy45MyIvPjwvc3ZnPg==";const Q4=({globalFilters:r={tableName:"",filters:[]},metricItem:e,onMaximize:t,client:n,colors:a,param:i,companyTenancyType:o,renderHeaderName:s})=>{var Ct;const l={};if(i!=null&&i.values)for(const dt in i.values){const pt=`${dt}_variable`;l[pt]=i.values[dt]}const[u,c]=B.useState(""),[f,h]=B.useState(""),[v,d]=B.useState([]),[p,g]=B.useState(""),[y,m]=B.useState(""),[_,b]=B.useState([]),[w,x]=B.useState(""),[S,T]=B.useState([]),[D,M]=B.useState([]),{data:A,isLoading:I}=TT({id:e==null?void 0:e.id,clientId:n,tenancyLevel:o,rlsConditions:o==="DATABASE"?D.map(dt=>({...dt,tableName:`${n}.${dt.tableName.split(".").slice(1).join(".")}`})):D,globalFilters:o==="DATABASE"?{...r,tableName:`${n}.${r.tableName.split(".").slice(1).join(".")}`}:r,filterValues:l}),P=(Ct=A==null?void 0:A.externalMetricQuery)==null?void 0:Ct.data,[O,E]=B.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[R,V]=B.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[$,U]=B.useState({axis:"left",show:!1,position:"hidden"}),[Y,ae]=B.useState({axis:"left"}),[H,q]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[X,Z]=B.useState({show:!1}),[ne,se]=B.useState(!1),[K,ve]=B.useState([]),[N,F]=B.useState(),[G,re]=B.useState([]);B.useEffect(()=>{d(e==null?void 0:e.chartOptions.yAxisList),h(e==null?void 0:e.chartOptions.xAxis),g(e==null?void 0:e.chartOptions.step),m(e==null?void 0:e.chartOptions.measure),c(e==null?void 0:e.chartOptions.chartType),b(e==null?void 0:e.chartOptions.sankeyValues),x(e==null?void 0:e.chartOptions.singleValue),E(e==null?void 0:e.chartOptions.margins),V(e==null?void 0:e.chartOptions.legendSettings),U(e==null?void 0:e.chartOptions.labelSettings),ae(e!=null&&e.chartOptions.axisSettings?e==null?void 0:e.chartOptions.axisSettings:"left"),Z(e!=null&&e.chartOptions.backGroundColor?e==null?void 0:e.chartOptions.backGroundColor:"false"),q(e!=null&&e.chartOptions.customSettings?e==null?void 0:e.chartOptions.customSettings:{hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),se(e==null?void 0:e.isEnableGroupBy),ve(e==null?void 0:e.selectedGroupBy),F(e==null?void 0:e.groupBy),M((e==null?void 0:e.rlsConditions)||[])},[e]),B.useEffect(()=>{T(P!=null?P:[])},[P]);const{labels:ie,datasets:te,funnelData:ce,sankeyData:De,singleValueData:vt}=vm({data:ne?G:S,measure:y,sankeyValues:_,singleValue:w,step:p,xAxis:f,yAxisList:v});B.useEffect(()=>{if(G.length&&ne){const dt=aS(G[0]);h(dt.stringKeys[0]),d(dt.numberKeys)}},[G,ne]),B.useEffect(()=>{G.length===0&&ne&&K.length&&(S==null?void 0:S.length)&&(F({column:K[0]}),xa(S,[K[0]],K,re))},[G,ne,K]),B.useEffect(()=>{(S==null?void 0:S.length)&&K.length&&ne&&xa(S,[K[0]],K,re)},[S,K,ne]);const it=dt=>{if((N==null?void 0:N.column)&&dt&&dt!=="undefined"){if(K.lastIndexOf(N.column)!==K.length-1){const pt=K.indexOf(N.column),un=N.column;F({column:K[pt+1],parentColumn:{column:N.column,value:dt}}),xa(S==null?void 0:S.filter(ar=>ar[un]===dt),[K[pt+1]],K,re)}K.lastIndexOf(N.column)===K.length-1&&(F({column:K[0]}),xa(S,[K[0]],K,re))}else F({column:K[0]}),xa(S,[K[0]],K,re)},Zt=(dt,pt)=>M(un=>un.map(ar=>ar.name===dt?{...ar,value:pt}:ar));return C(Ce,{children:z("div",{className:gt.cardContainer,children:[z("div",{className:gt.listHeader,children:[z(de,{variant:"h3",styleClass:"primary",className:gt.metricName,children:[s?s(e.name):e.name,e.description&&C("span",{className:gt.metricDescription,children:e.description})]}),z("div",{className:gt.features,children:[!!D.length&&C($S,{rlsConditions:D.filter(dt=>dt.isAddOnMetrics),onChangeFilterValue:Zt,dbName:e==null?void 0:e.companyIntegration.name,buttonClass:gt.popup,iconClass:gt.popupIcon,position:"bottom-right"}),z(Th,{buttonClass:gt.popup,button:C(Sce,{className:gt.popupIcon}),menuClass:gt.popupMenu,position:"bottom-right",children:[z(Ie,{type:"button",variant:"custom",className:gt.popupItem,onClick:()=>t({labels:ie,data:{labels:ie,datasets:te},chartType:u,funnelData:ce,sankeyData:De,singleValueData:vt,margins:O,legendSettings:R,labelSettings:$,axisSettings:Y,customSettings:H,backGroundColor:X,enableSaveAs:!0}),children:[C(Cce,{})," Enter Fullscreen"]}),C(RT,{data:S,fileName:e.name,className:`${gt.popupItem} ${gt.csvBtn}`,text:"Save As CSV"})]})]})]}),u&&z("div",{className:gt.metricData,children:[!I&&!S.length?C("div",{className:gt.noData,children:z("div",{className:gt.noDataContent,children:[C("img",{src:X4,alt:"",width:"300px",height:"300px"}),C("div",{className:gt.noDataText,children:"No Data Available"})]})}):null,I&&C("div",{className:gt.loading,children:C(Bu,{style:{width:"50px",height:"50px",color:"blue"}})}),S!=null&&S.length?C(Ng,{labels:ie,data:{labels:ie,datasets:te},chartType:u,funnelData:ce,sankeyData:De,singleValueData:vt,margins:O,legendSettings:R,labelSettings:$,axisSettings:Y,enableSaveAs:!0,colors:a,updateGroup:it,isEnableGroupBy:ne,customSettings:H,backGroundColor:X}):null]})]})})},K4=({globalFilters:r={tableName:"",filters:[]},metricItem:e,client:t,param:n,companyTenancyType:a,renderHeaderName:i})=>{var T;const o={};if(n!=null&&n.values)for(const D in n.values){const M=`${D}_variable`;o[M]=n.values[D]}const[s,l]=B.useState(""),[u,c]=B.useState(""),[f,h]=B.useState([]),[v,d]=B.useState([]),[p,g]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),{data:y,isLoading:m}=TT({id:e==null?void 0:e.id,clientId:t,tenancyLevel:a,rlsConditions:a==="DATABASE"?v.map(D=>({...D,tableName:`${t}.${D.tableName.split(".").slice(1).join(".")}`})):v,globalFilters:a==="DATABASE"?{...r,tableName:`${t}.${r.tableName.split(".").slice(1).join(".")}`}:r,filterValues:o}),_=(T=y==null?void 0:y.externalMetricQuery)==null?void 0:T.data;B.useEffect(()=>{l(e==null?void 0:e.chartOptions.chartType),c(e==null?void 0:e.chartOptions.singleValue),d((e==null?void 0:e.rlsConditions)||[]),g(e!=null&&e.chartOptions.customSettings?e==null?void 0:e.chartOptions.customSettings:{hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"})},[e]),B.useEffect(()=>{h(_!=null?_:[])},[_]);const b=f,w=b!=null&&b.length?b==null?void 0:b.map(D=>D[u]):"",x=[{value:w[0]}],S=(D,M)=>d(A=>A.map(I=>I.name===D?{...I,value:M}:I));return C(Ce,{children:z("div",{className:gt.cardContainer,children:[z("div",{className:gt.listHeader,children:[z(de,{variant:"h3",styleClass:"primary",className:gt.metricName,children:[i?i(e.name):e.name,e.description&&C("span",{className:gt.metricDescription,children:e.description})]}),C("div",{className:gt.features,children:!!(v!=null&&v.length)&&C($S,{rlsConditions:v.filter(D=>D.isAddOnMetrics),onChangeFilterValue:S,dbName:e==null?void 0:e.companyIntegration.name,buttonClass:gt.popup,iconClass:gt.popupIcon,position:"bottom-right"})})]}),s&&C("div",{className:`${gt.metricData} ${gt.singleValueData}`,children:m?C(Bu,{style:{width:"50px",height:"50px",color:"blue"}}):C(Ce,{children:w.length?C(QB,{data:x,customSettings:p}):C("div",{className:gt.noData,children:z("div",{className:gt.noDataContent,children:[C("img",{src:X4,alt:"",width:"300px",height:"300px"}),C("div",{className:gt.noDataText,children:"No Data Available"})]})})})})]})})};var Wfe={fullscreen:"_fullscreen_1wo1t_1"},$u={modal:"_modal_ul4ir_1",popup:"_popup_ul4ir_9",header:"_header_ul4ir_17",headerTitle:"_headerTitle_ul4ir_25",content:"_content_ul4ir_33",footer:"_footer_ul4ir_41"};const Ufe=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"})}),Di=({children:r,isOpen:e,onClose:t,headerTitle:n,customHeader:a,icon:i})=>{const[o,s]=B.useState();return B.useEffect(()=>{const l=document.getElementById("databrain-root-portal")||document.createElement("div");l.setAttribute("id","databrain-root-portal"),document.body.appendChild(l),s(l)},[]),e?Oh.default.createPortal(C("div",{className:$u.modal,onClick:t,children:z("div",{className:$u.popup,onClick:l=>{l.stopPropagation()},children:[C("section",{className:$u.header,children:a||z(Ce,{children:[z("span",{className:$u.headerTitle,children:[i,n]}),C(Ie,{variant:"custom",type:"button",onClick:t,children:C(Ufe,{})})]})}),C("section",{className:$u.content,children:r})]})}),o):null},Hu=({children:r,className:e})=>C("section",{className:`${$u.footer} ${e}`,children:r}),HS=({isShow:r,onCancel:e,chart:t})=>C(Di,{isOpen:r,onClose:e,headerTitle:"Chart Preview",children:C("div",{className:Wfe.fullscreen,children:t&&C(Ng,{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})})}),J4=wy.exports.WidthProvider(wy.exports.Responsive),ez=({chartColors:r,globalFilters:e,client:t,isLiveMode:n,externalDashboardMetrics:a,isMetricListLoading:i,breakpoint:o,layoutCols:s,params:l,companyTenancyType:u="TABLE"})=>{const[c,f]=B.useState(!1),[h,v]=B.useState(),d=a==null?void 0:a.map(m=>m.externalMetric),p=d==null?void 0:d.filter(m=>!m.isCreatedByClient),g=d==null?void 0:d.filter(m=>m.isCreatedByClient&&m.clientId===t),y=[...p||[],...g||[]].filter(m=>n?m.isLive===n:!0);return C(Ce,{children:y.length?z(Ce,{children:[C("div",{className:ic["MetricList-container"],children:C(J4,{layouts:{lg:y.map(({resizeAttributes:m,id:_})=>({i:_,w:m.width,h:m.height,x:m.xAxis,y:m.yAxis,minW:3,minH:6,maxH:15}))},isResizable:!1,isDraggable:!1,isDroppable:!1,rowHeight:30,width:1200,breakpoints:o!=null?o:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:s!=null?s:{lg:12,md:10,sm:6,xs:4,xxs:2},children:y.map(m=>C("div",{className:ic["MetricList-wrapper"],children:m.chartOptions.chartType==="single value"?C(K4,{metricItem:m,client:t,globalFilters:e,param:l==null?void 0:l.find(_=>_.metricId===m.metricId),companyTenancyType:u}):C(Q4,{metricItem:m,onMaximize:_=>{v(_),f(!0)},client:t,colors:r,globalFilters:e,param:l==null?void 0:l.find(_=>_.metricId===m.metricId),companyTenancyType:u})},m.id))})}),C(HS,{onCancel:()=>f(!1),isShow:c,chart:h})]}):C(Ce,{children:i?C("div",{className:ic["alt-container"],children:C(Bu,{style:{width:"50px",height:"50px",color:"blue"}})}):C("div",{className:ic["noMetric-container"],children:C("div",{className:ic["noMetric-wrapper"],children:C(de,{variant:"h2",styleClass:"primary",children:"No metrics created yet"})})})})})};var Gu={"header-container":"_header-container_pimqu_1","btn-container":"_btn-container_pimqu_5","back-btn":"_back-btn_pimqu_9","sql-btn":"_sql-btn_pimqu_13","save-btn":"_save-btn_pimqu_17"};const jfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m11 5l-7 7l7 7m-7-7h16"})}),Yfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[C("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),C("path",{d:"M17 21v-8H7v8M7 3v5h8"})]})}),qfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6Z"})}),tz=({setShowMetricCreateModal:r,isDisableSaveBtn:e,Heading:t,isDisableSqlBtn:n,setShowSaveMetricModal:a,setShowSqlModal:i})=>z("div",{className:Gu["header-container"],children:[z("div",{className:Gu["btn-container"],children:[C(Ie,{type:"button",variant:"custom",size:"default",onClick:()=>r(!1),className:Gu["back-btn"],children:C(jfe,{})}),C(de,{variant:"h1",styleClass:"primary",children:t})]}),z("div",{className:Gu["btn-container"],children:[z(Ie,{type:"button",variant:"custom",className:Gu["sql-btn"],onClick:()=>i(!0),isDisabled:n,children:[C(qfe,{}),"SQL"]}),z(Ie,{type:"submit",variant:"primary",className:Gu["save-btn"],isDisabled:e,onClick:()=>a(!0),children:[C(Yfe,{}),"Save to Dashboard"]})]})]});var ty={"create-btn":"_create-btn_6ovk2_1","modal-container":"_modal-container_6ovk2_5","query-modal":"_query-modal_6ovk2_9",floatingCreateButton:"_floatingCreateButton_6ovk2_13",floatingCreateButtonIcon:"_floatingCreateButtonIcon_6ovk2_17"},Dh={container:"_container_32zer_1",header:"_header_32zer_5",wrapper:"_wrapper_32zer_9","col-container":"_col-container_32zer_13",column:"_column_32zer_17"};const Zfe=r=>C("svg",{viewBox:"0 0 21 21",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m13.5 5.5l-2 10m-2-10l-2 10m-1-7h9m-10 4h9"})}),Xfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8 2h8a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m0 8v4h8v-4H8m0 6v4h8v-4H8M8 4v4h8V4H8Z"})}),Qfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M9.62 12L12 5.67L14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2Z"})}),Kfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M15 20v-2h3V6h-3V4h5v16ZM4 20V4h5v2H6v12h3v2Z"})}),Jfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 22q-.825 0-1.413-.587Q3 20.825 3 20V6q0-.825.587-1.412Q4.175 4 5 4h1V2h2v2h8V2h2v2h1q.825 0 1.413.588Q21 5.175 21 6v14q0 .825-.587 1.413Q19.825 22 19 22Zm0-2h14V10H5v10ZM5 8h14V6H5Zm0 0V6v2Z"})}),ehe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M23 23a7 7 0 1 1 7-7a7.008 7.008 0 0 1-7 7Zm0-12a5 5 0 1 0 5 5a5.005 5.005 0 0 0-5-5Z"}),C("circle",{cx:9,cy:16,r:7,fill:"currentColor"})]}),GS=({datatype:r})=>pm.includes(r.toLowerCase())?C(Zfe,{}):gm.includes(r.toLowerCase())||r.toLowerCase().includes("char")?C(Qfe,{}):IT.includes(r.toLowerCase())?C(Kfe,{}):ym.includes(r.toLowerCase())?C(Jfe,{}):mm.includes(r.toLowerCase())?C(ehe,{}):C(Xfe,{}),the=r=>C("svg",{viewBox:"0 0 21 21",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m17.498 15.498l-.01-10a2 2 0 0 0-2-1.998h-10a2 2 0 0 0-1.995 1.85l-.006.152l.01 10a2 2 0 0 0 2 1.998h10a2 2 0 0 0 1.995-1.85zM7.5 3.5v13.817m10-9.817h-14"})}),rz=({setselectTable:r,selectTable:e,tableList:t,columnList:n})=>z("div",{className:Dh.container,children:[C("div",{className:Dh.header,children:C(Er,{onChange:r,selectedOption:e,options:t,Icon:the,labelVariant:"static"})}),z("div",{className:Dh.wrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Columns"}),C("div",{className:Dh["col-container"],children:n.map(({as:a,datatype:i})=>z("div",{className:Dh.column,children:[C(GS,{datatype:i}),C(de,{variant:"p",styleClass:"font-14",children:a})]},a))})]})]});var ze={container:"_container_3ro5s_1",header:"_header_3ro5s_7",headerText:"_headerText_3ro5s_13",tab:"_tab_3ro5s_19",tabText:"_tabText_3ro5s_25",tabHeading:"_tabHeading_3ro5s_31",form:"_form_3ro5s_37",inputWrapper:"_inputWrapper_3ro5s_43",input:"_input_3ro5s_43",selectWrapper:"_selectWrapper_3ro5s_55",select:"_select_3ro5s_55",label:"_label_3ro5s_67",series:"_series_3ro5s_73",legendWrapper:"_legendWrapper_3ro5s_79",seriesWrapper:"_seriesWrapper_3ro5s_85",valueLabelWrapper:"_valueLabelWrapper_3ro5s_91",singleCheckBox:"_singleCheckBox_3ro5s_97"},WS={tab:"_tab_ksqsk_1",button:"_button_ksqsk_7",activeTab:"_activeTab_ksqsk_15"};const US=({options:r,activeTab:e,setActiveTab:t,className:n="",tabText:a=""})=>C("div",{className:`${WS.tab} ${n}`,children:r.map(i=>C(Ie,{variant:"custom",type:"button",className:`${WS.button} ${e===i&&WS.activeTab} ${a}`,onClick:()=>t(i),children:i},i))});var nz={container:"_container_1v094_1",tooltip:"_tooltip_1v094_7"};const rhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeWidth:2,children:[C("circle",{cx:12,cy:12,r:10}),C("path",{strokeLinecap:"round",d:"M12 7h.01"}),C("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 11h2v5m-2 0h4"})]})}),az=({children:r,content:e,className:t=""})=>z("span",{className:`${nz.container} ${t}`,children:[e,C("span",{className:nz.tooltip,children:r})]}),Mi=({children:r,className:e})=>C(az,{className:e,content:C(rhe,{color:"#182C60"}),children:r}),nhe=({setMargins:r,margins:e,legendSettings:t,setLegendSettings:n,labelSettings:a,setLabelSettings:i,axisSettings:o,setAxisSettings:s,chartType:l,setChartType:u,customSettings:c,setCustomSettings:f,backGroundColor:h,setBackGroundColor:v})=>{const d=["Margins","Legend","Custom"],p=["Margins","Custom"],[g,y]=B.useState("Margins");return z("div",{className:ze.container,children:[C(US,{options:l!=="single value"?d:p,activeTab:g,setActiveTab:y,className:ze.tab,tabText:ze.tabText}),z("form",{className:ze.form,children:[g==="Margins"&&z("div",{className:ze.inputWrapper,children:[C("div",{className:ze.input,children:C(It,{type:"number",label:"Top",onChange:m=>r(_=>({..._,marginTop:parseInt(m.target.value,10)})),defaultValue:e.marginTop})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Bottom",onChange:m=>r(_=>({..._,marginBottom:parseInt(m.target.value,10)})),defaultValue:e.marginBottom})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Left",defaultValue:e.marginLeft,onChange:m=>r(_=>({..._,marginLeft:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Right",defaultValue:e.marginRight,onChange:m=>r(_=>({..._,marginRight:parseInt(m.target.value,10)}))})})]}),g==="Legend"&&z("div",{className:ze.legendWrapper,children:[C(It,{type:"checkbox",label:"Show Legend",checked:t.show,onChange:m=>n(_=>({..._,show:m.target.checked}))}),z("div",{children:[C(de,{variant:"h1",styleClass:"primary",children:"Position"}),z("div",{className:ze.inputWrapper,children:[C("div",{className:ze.input,children:C(It,{type:"number",label:"Top",defaultValue:t.top,onChange:m=>n(_=>({..._,top:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Bottom",defaultValue:t.bottom,onChange:m=>n(_=>({..._,bottom:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Left",defaultValue:t.left,onChange:m=>n(_=>({..._,left:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Right",defaultValue:t.right,onChange:m=>n(_=>({..._,right:parseInt(m.target.value,10)}))})})]})]}),z("div",{className:ze.selectWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Appearance"}),C("div",{className:ze.select,children:C(Yt,{value:t.position,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:m=>n(_=>({..._,position:m}))})})]})]}),g==="Custom"&&z("div",{className:ze.series,children:[C(de,{styleClass:"font-14c",variant:"p",className:ze.tabHeading,children:"Chart preferences"}),l!=="single value"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Value labels"}),C("div",{className:ze.valueLabelWrapper,children:C(Yt,{value:a.position,options:[{label:"Hidden",value:"hidden"},{label:"Top",value:"top"},{label:"Bottom",value:"bottom"},{label:"Right",value:"right"},{label:"Left",value:"left"},{label:"Inside",value:"inside"}],onChange:m=>i(m==="hidden"?_=>({..._,show:!1,position:m}):_=>({..._,show:!0,position:m}))})})]}),l!=="pie"&&l!=="doughnut"&&l!=="funnel"&&l!=="gauge"&&l!=="sankey"&&l!=="singleValue"&&l!=="table"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:"font-medium",children:"Axis"}),C("div",{className:ze.select,children:C(Yt,{value:o.axis,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:m=>s(_=>({..._,axis:m}))})})]}),l==="bar"||l==="row"||l==="stack"||l==="histogram"?C(It,{type:"checkbox",label:"Show Bar Background",checked:h.show,onChange:m=>v(_=>({..._,show:m.target.checked}))}):null,z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Axis labels",C(Mi,{children:"Axis labels represents the x and y axis values"})]}),C("div",{className:ze.select,children:C(Yt,{value:c.axisLabels,options:[{label:"Hide X-axis labels",value:"x"},{label:"Hide Y-axis labels",value:"y"},{label:"Hide both X and Y(axis) labels",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,axisLabels:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Splitlines",C(Mi,{children:"Splitline is the reference lines that run along the directional x and y axis which act as reference markers"})]}),C("div",{className:ze.select,children:C(Yt,{value:c.hideSplitLines,options:[{label:"Hide horizontal splitline",value:"horizontal"},{label:"Hide vertical splitline",value:"vertical"},{label:"Hide both splitline",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,hideSplitLines:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Axis Line",C(Mi,{children:"The x-axis and y-axis lines act as a graph base from which the chart starts"})]}),C("div",{className:ze.select,children:C(Yt,{value:c.hideAxisLines,options:[{label:"Hide X-axis line",value:"x"},{label:"Hide Y-axis line",value:"y"},{label:"Hide both X and Y(axis) lines",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,hideAxisLines:m}))})})]}),l==="bar"||l==="row"||l==="stack"?z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Modify Bar width",C(Mi,{children:"The width of each individual bar rectangle of the graph"})]}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,barWidth:parseInt(m.target.value,10)})),defaultValue:c.barWidth})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Modify Bar radius",C(Mi,{children:"The property that rounds the corners of the element's outer border edge"})]}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,barRadius:parseInt(m.target.value,10)})),defaultValue:c.barRadius})]})]}):null]})]}),l==="single value"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Single Value Chart Font Size"}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,fontSize:parseInt(m.target.value,10)})),defaultValue:c.fontSize})]}),z("div",{className:ze.singleCheckBox,children:[C(It,{type:"checkbox",label:"",checked:c.subHeaderShow,onChange:m=>f(_=>({..._,subHeaderShow:m.target.checked}))}),z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Single Value Sub-Header",C(Mi,{children:"Single Value Sub-Header"})]})]}),c.subHeaderShow&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Sub-Header Display Text"}),C(It,{type:"text",label:"",placeholder:"Enter the text to display",onChange:m=>f(_=>({..._,displayText:m.target.value})),defaultValue:c.displayText})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Sub-Header Font Size"}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,subHeaderFontSize:parseInt(m.target.value,10)})),defaultValue:c.subHeaderFontSize})]})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Date formatting"}),C("div",{className:ze.valueLabelWrapper,children:C(Yt,{value:c.dateFormatter,options:[{label:"None",value:"none"},{label:"dd-mm-yyyy",value:"dd-mm-yyyy"},{label:"mm-dd-yyyy",value:"mm-dd-yyyy"},{label:"yyyy-mm-dd",value:"yyyy-mm-dd"},{label:"dd/mm/yyyy",value:"dd/mm/yyyy"},{label:"mm/dd/yyyy",value:"mm/dd/yyyy"},{label:"yyyy/mm/dd",value:"yyyy/mm/dd"},{label:"hh:mm:ss",value:"hh:mm:ss"}],onChange:m=>f(_=>({..._,dateFormatter:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Number formatting"}),C("div",{className:ze.valueLabelWrapper,children:C(Yt,{value:c.numberFormatter,options:[{label:"Original value",value:"original"},{label:"Adaptive formatting",value:"adaptive"},{label:",d (12345.432 => 12,345)",value:"d"},{label:".1s (12345.432 => 10k)",value:"1s"},{label:".3s (12345.432 => 12.3k)",value:"3s"},{label:",.1% (12345.432 => 1,234,543.2%)",value:"1%"},{label:",.2% (12345.432 => 1234543.20%)",value:"2%"},{label:",.3% (12345.432 => 1234543.200%)",value:"3%"},{label:".4r (12345.432 => 12350)",value:"4r"},{label:",.1f (12345.432 => 12,345.4)",value:"1f"},{label:",.2f (12345.432 => 12,345.43)",value:"2f"},{label:",.3f (12345.432 => 12,345.432)",value:"3f"},{label:"+, (12345.432 => +12,345.432)",value:"+"},{label:"$,.2f (12345.432 => $12,345.43)",value:"$"},{label:"Duration in ms (66000 => 1m 6s)",value:"ms1"},{label:"Duration in ms (1.40008 => 1ms 400\u03BCs 80ns)",value:"ms2"}],onChange:m=>f(_=>({..._,numberFormatter:m}))})})]})]})]})]})]})};var Yr={"chartButton-header":"_chartButton-header_6600c_1","settingsTab-header-control":"_settingsTab-header-control_6600c_9",chartButtonContainer:"_chartButtonContainer_6600c_17",tabContainer:"_tabContainer_6600c_25",tab:"_tab_6600c_25",tabText:"_tabText_6600c_41",chartButtons:"_chartButtons_6600c_49",chartButton:"_chartButton_6600c_1",chartButtonSelected:"_chartButtonSelected_6600c_65",chartTypesButton:"_chartTypesButton_6600c_73",button:"_button_6600c_81",propertyButton:"_propertyButton_6600c_89",settings:"_settings_6600c_9",crossIcon:"_crossIcon_6600c_105"};const ry=({value:r,options:e,control:t})=>{const[n,a]=B.useState("");return C(G4,{control:t,label:"",options:e,onChange:a,name:n||r})};var at={chartOptions:"_chartOptions_jdb8o_1",chartOption:"_chartOption_jdb8o_1",chartOptionBtn:"_chartOptionBtn_jdb8o_13",chartOptionText:"_chartOptionText_jdb8o_19",container:"_container_jdb8o_25",field:"_field_jdb8o_31",fieldText:"_fieldText_jdb8o_37",doneBtn:"_doneBtn_jdb8o_43",measureText:"_measureText_jdb8o_49",singleValueMeasure:"_singleValueMeasure_jdb8o_55",plus:"_plus_jdb8o_61",plusIcon:"_plusIcon_jdb8o_67",form:"_form_jdb8o_73",chartType:"_chartType_jdb8o_79"};const jS=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeWidth:2,children:[C("path",{strokeLinecap:"round",d:"M12 8v4m0 0v4m0-4h4m-4 0H8"}),C("circle",{cx:12,cy:12,r:10})]})}),iz=({data:r,setXAxis:e,xAxis:t,setYAxisList:n,chartType:a,setStep:i,setMeasure:o,step:s,measure:l,setSankeyValues:u,setSettingsShow:c,singleValue:f,setSingleValue:h})=>{const v=r?Object.keys(r[0]).map(E=>({value:E,label:E})):[];v.push({value:"NONE",label:"NONE"});const[d,p]=B.useState([v==null?void 0:v[0]]),[g,y]=B.useState(""),[m,_]=B.useState(""),[b,w]=B.useState(""),[x,S]=B.useState(1),[T,D]=B.useState("show"),M=()=>{if(x<(v==null?void 0:v.length)){const E=[...d,v[x]];p(E),x===v.length-1&&D("hidden")}S(x+1)},{handleSubmit:A,control:I}=bS(),P=E=>{const R=Object.values(E);n(R.filter(V=>V!==void 0&&V!=="NONE")),c(!1)},O=()=>{u([g,m,b])};return a===NT?z("div",{className:at.container,children:[z("div",{className:at.field,children:[C(de,{styleClass:"font-14",className:at.fieldText,variant:"h4",children:"Source"}),C(Yt,{label:"",options:v,onChange:y,value:g})]}),z("div",{className:at.field,children:[C(de,{styleClass:"font-14",className:at.fieldText,variant:"h4",children:"Target"}),C(Yt,{label:"",options:v,onChange:_,value:m})]}),z("div",{children:[C(de,{styleClass:"font-14",className:at.fieldText,variant:"h4",children:"Value"}),C(Yt,{label:"",options:v,onChange:w,value:b})]}),C(Ie,{type:"submit",variant:"primary",size:"default",className:at.doneBtn,onClick:()=>{O(),c(!1)},children:"Done"})]}):a===bm?C(Ce,{children:!!(a===bm||xm)&&z("div",{className:at.container,children:[C(de,{styleClass:"font-14",className:at.field,variant:"h4",children:"Dimension"}),C(Yt,{label:"",options:v,onChange:e,value:t}),C(de,{styleClass:"font-14",className:at.measureText,variant:"h4",children:"Measure"}),C("div",{className:at.plus,children:C(jS,{className:`${at.plusIcon} ${T}`,onClick:()=>M()})}),z("form",{onSubmit:A(P),className:at.form,children:[d.map(E=>C(ry,{value:E.value,options:v,control:I},E.value)),C(Ie,{type:"submit",variant:"primary",size:"default",className:at.doneBtn,children:"Done"})]})]})}):a===xm?z(Ce,{children:["(",z("div",{className:at.container,children:[C(de,{styleClass:"font-14",className:at.field,variant:"h4",children:"Dimension"}),C(Yt,{label:"",options:v,onChange:e,value:t}),C(de,{styleClass:"font-14",className:at.measureText,variant:"h4",children:"Measure"}),C("div",{className:at.plus,children:C(jS,{className:`${at.plusIcon} ${T}`,onClick:()=>M()})}),z("form",{onSubmit:A(P),className:at.form,children:[d.map(E=>C(ry,{value:E.value,options:v,control:I},E.value)),C(Ie,{type:"submit",variant:"primary",size:"default",className:at.doneBtn,children:"Done"})]})]}),")"]}):a==="single value"?z(Ce,{children:[C(de,{styleClass:"font-14",className:`${at.singleValueMeasure}`,variant:"h4",children:"Measure"}),C(Yt,{label:"",options:v,onChange:h,value:f}),C(Ie,{type:"button",variant:"primary",size:"default",className:at.doneBtn,onClick:()=>c(!1),children:"Done"})]}):C(Ce,{children:z("div",{className:at.container,children:[a!=="gauge"&&a!==kT&&a!=="table"&&z(Ce,{children:[z(de,{styleClass:"font-14",className:at.field,variant:"h4",children:[a!=="funnel"&&a!=="row"&&"X-axis",a==="funnel"&&"Step",a==="row"&&"Y-axis"]}),a==="funnel"?C(Yt,{label:"",options:v,onChange:i,value:s}):C(Yt,{label:"",options:v,onChange:e,value:t})]}),z("div",{className:`${at.chartType}
|
|
323
|
-
${a!=="gauge"?at.measureText:""}`,children:[z(de,{styleClass:"font-14",variant:"h1",className:at.field,children:[a!=="funnel"&&a!=="gauge"&&a!=="row"&&a!=="boxplot"&&a!=="table"&&"Y-axis",(a==="funnel"||a==="gauge"||a==="boxplot"||a==="table")&&"Measure",a==="row"&&"X-axis"]}),a!=="funnel"&&a!=="gauge"&&C(jS,{className:`${at.plusIcon} ${T}`,onClick:()=>M()})]}),z("form",{onSubmit:A(P),className:at.form,children:[a==="funnel"||a==="gauge"?C(Yt,{label:"",options:v,onChange:o,value:l}):d.map(E=>C(ry,{value:E.value,options:v,control:I},E.value)),C(Ie,{type:"submit",variant:"primary",size:"default",className:at.doneBtn,children:"Done"})]})]})})},ahe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m3.5 18.5l6-6l4 4L22 6.92L20.59 5.5l-7.09 8l-4-4L2 17l1.5 1.5Z"})}),ihe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M3 22V8h4v14H3m7 0V2h4v20h-4m7 0v-8h4v8h-4Z"})}),ohe=r=>z("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M4 21h17v-2H5V3H3v17a1 1 0 0 0 1 1z"}),C("circle",{cx:10,cy:8,r:2,fill:"currentColor"}),C("circle",{cx:18,cy:12,r:2,fill:"currentColor"}),C("circle",{cx:11.5,cy:13.5,r:1.5,fill:"currentColor"}),C("circle",{cx:16.5,cy:6.5,r:1.5,fill:"currentColor"})]}),she=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M4 22H2V2h2v20Zm11-1H5v-3h10v3Zm3-5H5v-3h13v3Zm3-5H5V8h16v3Zm-8-5H5V3h8v3Z"})}),lhe=r=>C("svg",{viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-616-64h536c4.4 0 8-3.6 8-8V284c0-7.2-8.7-10.7-13.7-5.7L592 488.6l-125.4-124a8.03 8.03 0 0 0-11.3 0l-189 189.6a7.87 7.87 0 0 0-2.3 5.6V720c0 4.4 3.6 8 8 8z"})}),uhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M27 28V16h-8v12h-4V12H7v16H4V2H2v26a2 2 0 0 0 2 2h26v-2Zm-14 0H9V14h4Zm12 0h-4V18h4Z"}),C("path",{fill:"currentColor",d:"M22.786 14a1.988 1.988 0 0 1-1.18-.387L11.205 5.987L8.242 10L6.637 8.806l2.982-4a1.998 1.998 0 0 1 2.749-.446L22.789 12l3.604-4.86L28 8.33l-3.604 4.862a2.001 2.001 0 0 1-1.61.808Z"})]}),che=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7.5 1.018a7 7 0 0 0-4.79 11.566L7.5 7.793V1.018zm1 0V7.5h6.482A7.001 7.001 0 0 0 8.5 1.018zM14.982 8.5H8.207l-4.79 4.79A7 7 0 0 0 14.982 8.5zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8z"})}),fhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12.051 21.949a10 10 0 0 1-1-19.949v4.04a5.994 5.994 0 1 0 6.91 6.909H22a10.015 10.015 0 0 1-9.95 9Zm9.95-11h-4.04a5.993 5.993 0 0 0-4.91-4.909V2a10.022 10.022 0 0 1 8.95 8.948v.001Z"})}),hhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"})}),vhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M28 28V18h-2v10h-4V4h-2v24H10V14H8v14H4V2H2v26a2.002 2.002 0 0 0 2 2h26v-2Z"}),C("path",{fill:"currentColor",d:"M14 4h2v14h-2z"})]}),dhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"}),C("path",{fill:"currentColor",d:"M10 16a2 2 0 1 1-2 2a2 2 0 0 1 2-2m0-2a4 4 0 1 0 4 4a4 4 0 0 0-4-4zm11-8a4 4 0 1 1-4 4a4 4 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6zm3.5 17a1.5 1.5 0 1 1-1.5 1.5a1.5 1.5 0 0 1 1.5-1.5m0-2a3.5 3.5 0 1 0 3.5 3.5a3.5 3.5 0 0 0-3.5-3.5z"})]}),phe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M22 10V6H10v6H4V2H2v26a2.002 2.002 0 0 0 2 2h26V10Zm-10 4V8h8v4h8v10h-6v-6H12v6H4v-8ZM4 28v-4h10v-6h6v6h8v4Z"})}),ghe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M3 4h1v9h3V7h5v4h4v4h4v6H3V4m13 12v4h3v-4h-3m-4-4v8h3v-8h-3M8 8v12h3V8H8m-4 6v6h3v-6H4Z"})}),yhe=r=>C("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8.127 13.6c-.689 1.197-.225 2.18.732 2.732c.956.553 2.041.465 2.732-.732c.689-1.195 5.047-11.865 4.668-12.084c-.379-.219-7.442 8.888-8.132 10.084zM10 6c.438 0 .864.037 1.281.109c.438-.549.928-1.154 1.405-1.728A9.664 9.664 0 0 0 10 4C4.393 4 0 8.729 0 14.766c0 .371.016.742.049 1.103c.049.551.54.955 1.084.908c.551-.051.957-.535.908-1.086A10.462 10.462 0 0 1 2 14.766C2 9.85 5.514 6 10 6zm7.219 1.25c-.279.75-.574 1.514-.834 2.174C17.4 10.894 18 12.738 18 14.766c0 .316-.015.635-.043.943a1.001 1.001 0 0 0 1.992.182c.033-.37.051-.748.051-1.125c0-2.954-1.053-5.59-2.781-7.516z"})}),mhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M30 2H2v14h6.111a7.036 7.036 0 0 1 3.13.74L15.764 19l-4.522 2.26a7.036 7.036 0 0 1-3.13.74H2v8h7.223a9.045 9.045 0 0 0 4.025-.95l8.622-4.31A7.036 7.036 0 0 1 25 24h5V14h-5a7.036 7.036 0 0 1-3.13-.74L15.348 10H30ZM8 4h16v4H8ZM4 4h2v10H4Zm0 20h2v4H4Zm16.975-1.05l-8.622 4.31a7.036 7.036 0 0 1-3.13.74H8v-4h.111a9.045 9.045 0 0 0 4.025-.95L18 20.118l1.864.932a9.045 9.045 0 0 0 4.025.95H24v.058a9.052 9.052 0 0 0-3.025.892ZM28 22h-2v-6h2ZM12.354 10.74l8.621 4.31a9.052 9.052 0 0 0 3.025.89V20h-.111a7.036 7.036 0 0 1-3.13-.74l-8.622-4.31A9.045 9.045 0 0 0 8.11 14H8v-4h1.223a7.036 7.036 0 0 1 3.13.74ZM28 8h-2V4h2Z"})}),_he=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M22 21H2V3h2v16h2v-2h4v2h2v-3h4v3h2v-2h4v4m-4-7h4v2h-4v-2m-6-8h4v3h-4V6m4 9h-4v-5h4v5M6 10h4v2H6v-2m4 6H6v-3h4v3Z"})}),bhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M2.873 11.297V4.142H1.699L0 5.379v1.137l1.64-1.18h.06v5.961h1.174Zm3.213-5.09v-.063c0-.618.44-1.169 1.196-1.169c.676 0 1.174.44 1.174 1.106c0 .624-.42 1.101-.807 1.526L4.99 10.553v.744h4.78v-.99H6.643v-.069L8.41 8.252c.65-.724 1.237-1.332 1.237-2.27C9.646 4.849 8.723 4 7.308 4c-1.573 0-2.36 1.064-2.36 2.15v.057h1.138Zm6.559 1.883h.786c.823 0 1.374.481 1.379 1.179c.01.707-.55 1.216-1.421 1.21c-.77-.005-1.326-.419-1.379-.953h-1.095c.042 1.053.938 1.918 2.464 1.918c1.478 0 2.642-.839 2.62-2.144c-.02-1.143-.922-1.651-1.551-1.714v-.063c.535-.09 1.347-.66 1.326-1.678c-.026-1.053-.933-1.855-2.359-1.845c-1.5.005-2.317.88-2.348 1.898h1.116c.032-.498.498-.944 1.206-.944c.703 0 1.206.435 1.206 1.07c.005.64-.504 1.106-1.2 1.106h-.75v.96Z"})}),xhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M22 6V4H12v2h4v2h-4v12h4v2h-4v2h10v-2h-4v-2h4V8h-4V6Zm-8 12v-3h6v3Zm6-5h-6v-3h6Z"}),C("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"})]}),whe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8 16h5v-5H8v5Zm0-7h12V4H8Zm7 7h5v-5h-5Zm-7 2q-.825 0-1.412-.587Q6 16.825 6 16V4q0-.825.588-1.413Q7.175 2 8 2h12q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18Zm-4 4q-.825 0-1.412-.587Q2 20.825 2 20V6h2v14h14v2Z"})}),oz=({setChartType:r})=>{const e=[{name:"Line",icon:ahe},{name:"Bar",icon:ihe},{name:"Combo",icon:uhe},{name:"Scatter",icon:ohe},{name:"Row",icon:she},{name:"Area",icon:lhe},{name:"Pie",icon:che},{name:"Waterfall",icon:vhe},{name:"Funnel",icon:hhe},{name:"Bubble",icon:dhe},{name:"Doughnut",icon:fhe},{name:"Stepped",icon:phe},{name:"Histogram",icon:ghe},{name:"Gauge",icon:yhe},{name:"Sankey",icon:mhe},{name:"Stack",icon:_he},{name:"Single value",icon:bhe},{name:"BoxPlot",icon:xhe},{name:"Table",icon:whe}];return C("div",{className:at.chartOptions,children:e.map(t=>z("div",{className:at.chartOption,children:[C(Ie,{type:"button",variant:"custom",className:at.chartOptionBtn,onClick:()=>{r(t.name.toLowerCase())},children:C(t.icon,{style:{color:"blue",width:"20px",height:"20px"}})},t.name),C(de,{variant:"p",styleClass:"tertiary",className:at.chartOptionText,children:t.name})]},t.name))})},She=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 3H5v6h2V3m12 0h-2v10h2V3M3 13h2v8h2v-8h2v-2H3v2m12-6h-2V3h-2v4H9v2h6V7m-4 14h2V11h-2v10m4-6v2h2v4h2v-4h2v-2h-6Z"})}),Che=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"M20 20L4 4m16 0L4 20"})}),The=({chartType:r,setChartType:e,data:t,setXAxis:n,setYAxisList:a,xAxis:i,setMeasure:o,setStep:s,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:v,setMargins:d,margins:p,legendSettings:g,setLegendSettings:y,labelSettings:m,setLabelSettings:_,axisSettings:b,setAxisSettings:w,customSettings:x,setCustomSettings:S,backGroundColor:T,setBackGroundColor:D})=>{const[M,A]=B.useState(lc),I="Chart types",P="Chart properties",[O,E]=B.useState(I);return z("div",{className:Yr.chartButtonContainer,children:[z("div",{className:Yr["chartButton-header"],children:[z(de,{styleClass:"font-14c",variant:"h1",className:Yr.settings,children:[C(She,{}),"Chart Settings"]}),C("div",{className:Yr.crossIcon,children:C(Che,{onClick:()=>v(!1)})})]}),z("div",{className:Yr.chartButtons,children:[z("div",{className:Yr["settingsTab-header-control"],children:[C(Ie,{type:"button",variant:"custom",className:`${Yr.chartButton} ${M===lc&&Yr.chartButtonSelected}`,onClick:()=>A(lc),children:"General"}),C(Ie,{type:"button",variant:"custom",className:`${Yr.chartButton} ${M===bv&&Yr.chartButtonSelected}`,onClick:()=>A(bv),children:"Configuration"})]}),M===lc&&z(Ce,{children:[C("div",{className:Yr.tabContainer,children:C(US,{activeTab:O,options:[I,P],setActiveTab:E,className:Yr.tab,tabText:Yr.tabText})}),O===I&&C("div",{className:Yr.button,children:C(oz,{setChartType:e})}),O===P&&C(Ce,{children:r&&C("div",{className:Yr.button,children:C(iz,{data:t,setXAxis:n,xAxis:i,setYAxisList:a,chartType:r,setStep:s,setMeasure:o,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:v})})})]}),M===bv&&C(nhe,{setMargins:d,margins:p,legendSettings:g,setLegendSettings:y,labelSettings:m,setLabelSettings:_,axisSettings:b,setAxisSettings:w,customSettings:x,setCustomSettings:S,chartType:r,setChartType:e,backGroundColor:T,setBackGroundColor:D})]})]})};var Ut={"outputTab-header":"_outputTab-header_x9lw6_1",searchCommand:"_searchCommand_x9lw6_9","chartTab-container":"_chartTab-container_x9lw6_17",chartText:"_chartText_x9lw6_25",charts:"_charts_x9lw6_33",metricChart:"_metricChart_x9lw6_41",metricChartEmpty:"_metricChartEmpty_x9lw6_49","chartTab-wrapper":"_chartTab-wrapper_x9lw6_57","chartTab-wrapper-head":"_chartTab-wrapper-head_x9lw6_65",fullQuery:"_fullQuery_x9lw6_73",noQuery:"_noQuery_x9lw6_81","tableTab-header":"_tableTab-header_x9lw6_89","chartButton-header":"_chartButton-header_x9lw6_97",chartButtonContainer:"_chartButtonContainer_x9lw6_105",searchWrapper:"_searchWrapper_x9lw6_113",searchIcon:"_searchIcon_x9lw6_121",chartConfigure:"_chartConfigure_x9lw6_129",chartSettings:"_chartSettings_x9lw6_137",labels:"_labels_x9lw6_145",chartButtons:"_chartButtons_x9lw6_153",chartButton:"_chartButton_x9lw6_97"};const sz=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m21 21l-4.486-4.494M19 10.5a8.5 8.5 0 1 1-17 0a8.5 8.5 0 0 1 17 0Z"})}),Dhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M11.5 4a.5.5 0 0 0 .5.5h1.75a.75.75 0 0 1 0 1.5H12a2 2 0 0 1-2-2V2.25a.75.75 0 0 1 1.5 0V4Zm0 8a.5.5 0 0 1 .5-.5h1.75a.75.75 0 0 0 0-1.5H12a2 2 0 0 0-2 2v1.75a.75.75 0 0 0 1.5 0V12ZM4 11.5a.5.5 0 0 1 .5.5v1.75a.75.75 0 0 0 1.5 0V12a2 2 0 0 0-2-2H2.25a.75.75 0 0 0 0 1.5H4ZM4.5 4a.5.5 0 0 1-.5.5H2.25a.75.75 0 0 0 0 1.5H4a2 2 0 0 0 2-2V2.25a.75.75 0 0 0-1.5 0V4Z"})}),lz=({labels:r,datasets:e,funnelData:t,chartType:n,setChartType:a,data:i,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:v,sankeyData:d,singleValue:p,setSingleValue:g,singleValueData:y,setMargins:m,margins:_,legendSettings:b,setLegendSettings:w,labelSettings:x,setLabelSettings:S,customSettings:T,setCustomSettings:D,axisSettings:M,setAxisSettings:A,updateGroup:I,isLoading:P,isEnableGroupBy:O,backGroundColor:E,setBackGroundColor:R})=>{const[V,$]=B.useState(!1),[U,Y]=B.useState(!1);return z("div",{className:Ut["chartTab-container"],children:[!(i!=null&&i.length)&&P&&C("div",{className:Ut["loader-container"],children:C(Bu,{style:{width:"50px",height:"50px",color:"blue"}})}),!(i!=null&&i.length)&&!P&&z("div",{className:Ut.metricChartEmpty,children:[C("div",{className:Ut.searchWrapper,children:C(sz,{className:Ut.searchIcon})}),C("div",{className:Ut.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:Ut.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"No data found! Run a query to display charts"})})]}),!!(i!=null&&i.length)&&!P&&z("div",{className:Ut.metricChart,children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Preview"}),z("div",{className:Ut["chartTab-wrapper"],children:[z("div",{className:Ut["chartTab-wrapper-head"],children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Charts"}),z("div",{className:Ut.chartButtons,children:[C(Ie,{type:"button",variant:"custom",className:Ut.chartButton,onClick:()=>{$(!V)},children:"Chart Settings"}),C(Ie,{type:"button",variant:"custom",className:r!=null&&r.length?Ut.fullQuery:Ut.noQuery,onClick:r!=null&&r.length?()=>Y(!0):void 0,children:C(Dhe,{})})]})]}),V&&C("div",{className:Ut.chartSettings,children:C(The,{chartType:n,setChartType:a,data:i,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:v,singleValue:p,setSingleValue:g,setSettingsShow:$,setMargins:m,margins:_,legendSettings:b,setLegendSettings:w,labelSettings:x,setLabelSettings:S,axisSettings:M,setAxisSettings:A,customSettings:T,setCustomSettings:D,backGroundColor:E,setBackGroundColor:R})}),r!=null&&r.length?C("div",{className:Ut.labels,children:C(Ng,{labels:r,data:{labels:r,datasets:e},chartType:n,funnelData:t,sankeyData:d,singleValueData:y,margins:_,legendSettings:b,labelSettings:x,axisSettings:M,customSettings:T,backGroundColor:E,updateGroup:I,isEnableGroupBy:O,enableSaveAs:!0})}):z("div",{className:Ut.metricChartEmpty,children:[C("div",{className:Ut.searchWrapper,children:C(sz,{className:Ut.searchIcon})}),C("div",{className:Ut.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:Ut.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"Choose an appropriate chart type and start visulaizing your data"})})]})]})]}),C(HS,{isShow:U,onCancel:()=>Y(!1),chart:{labels:r,data:{labels:r,datasets:e},chartType:n,funnelData:t,sankeyData:d,singleValueData:y,margins:_,legendSettings:b,labelSettings:x,axisSettings:M,customSettings:T,backGroundColor:E,enableSaveAs:!0}})]})};var ny={container:"_container_1jc0r_1",wrapper:"_wrapper_1jc0r_5",text:"_text_1jc0r_9",table:"_table_1jc0r_12"},Po={container:"_container_1uho5_1",table:"_table_1uho5_9",tableHead:"_tableHead_1uho5_17",tableRow:"_tableRow_1uho5_25",tableHeadCol:"_tableHeadCol_1uho5_33",tableRowCol:"_tableRowCol_1uho5_41",empty:"_empty_1uho5_49",error:"_error_1uho5_57"};const uz=({data:r,isError:e})=>z("div",{className:Po.container,children:[!!(r!=null&&r.length)&&!e&&z("table",{className:Po.table,children:[C("thead",{className:Po.tableHead,children:C("tr",{className:Po.tableRow,children:Object.keys(r[0]).map(t=>C("th",{className:Po.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:t})},t))})}),C("tbody",{children:r==null?void 0:r.map((t,n)=>C("tr",{children:Object.keys(r[0]).map((a,i)=>C("td",{className:Po.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(t[a])})},i))},n))})]}),!(r!=null&&r.length)&&!e&&C("div",{className:Po.empty,children:"Table is empty"}),e&&C("div",{className:Po.error,children:r.message})]}),Mhe=({previewTableDataList:r})=>C("div",{className:ny.container,children:C("div",{className:ny.wrapper,children:r==null?void 0:r.map(e=>z("div",{className:ny.text,children:[C(de,{variant:"h1",styleClass:"primary",className:"",children:e.name}),C("div",{className:ny.table,children:C(uz,{data:e.data,isError:e.isError})})]},e.name))})});var Ai={container:"_container_12jmm_1",header:"_header_12jmm_5","text-container":"_text-container_12jmm_9","btn-container":"_btn-container_12jmm_13",tabButton:"_tabButton_12jmm_16",selectedTab:"_selectedTab_12jmm_19",table:"_table_12jmm_22"},qr={"table-loader-container":"_table-loader-container_1j4gc_1",tableData:"_tableData_1j4gc_7",tableHeadCol:"_tableHeadCol_1j4gc_13",tableRow:"_tableRow_1j4gc_19",tableRowCol:"_tableRowCol_1j4gc_25",row:"_row_1j4gc_31",container:"_container_1j4gc_37",table:"_table_1j4gc_1",previewTable:"_previewTable_1j4gc_49",preview:"_preview_1j4gc_49",previewText:"_previewText_1j4gc_61",noData:"_noData_1j4gc_67",error:"_error_1j4gc_73",errorMsg:"_errorMsg_1j4gc_79",tableIcon:"_tableIcon_1j4gc_85"};const Ahe=r=>C("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",d:"M.5 4.5h14m-10-4v14m-3-14h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-12a1 1 0 0 1-1-1v-12a1 1 0 0 1 1-1Z"})}),cz=({data:r,isLoading:e,error:t})=>C("div",{className:qr.container,children:z("div",{className:qr.previewTable,children:[C("div",{className:qr.preview,children:C(de,{styleClass:"font-14c",variant:"h1",className:qr.previewText,children:"Preview"})}),z("div",{className:qr.tableData,children:[e&&!(r!=null&&r.length)&&C("div",{className:qr["table-loader-container"],children:C(Bu,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(r!=null&&r.length)&&!e&&z("table",{className:qr.table,children:[C("thead",{children:C("tr",{className:qr.row,children:Object.keys(r[0]).map(n=>C("th",{className:qr.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:n})},n))})}),C("tbody",{children:r.map((n,a)=>C("tr",{className:qr.tableRow,children:Object.keys(r[0]).map((i,o)=>C("td",{className:qr.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(n[i])})},o))},a))})]}),!(r!=null&&r.length)&&!e&&!t.length&&z("div",{className:qr.noData,children:[C(Ahe,{className:qr.tableIcon,width:"60px",height:"60px"}),C(de,{styleClass:"font-14b",variant:"p",children:"No data available to preview"}),C(de,{styleClass:"font-14a",variant:"p",children:"Run your query to preview data"})]}),t&&C("div",{className:qr.error,children:C(de,{styleClass:"primary",className:qr.errorMsg,variant:"p",children:t})})]})]})}),fz=({outpuTableData:r,outputError:e,isOutputLoading:t,previewTableDataList:n})=>{const[a,i]=B.useState(sc);return z("div",{className:Ai.container,children:[z("div",{className:Ai.header,children:[z("div",{className:Ai["text-container"],children:[C(de,{styleClass:"font-14c",variant:"h1",children:"Tables"}),C(de,{styleClass:"font-14",variant:"p",children:"Preview your selected table & output table values"})]}),z("div",{className:Ai["btn-container"],children:[C(Ie,{type:"button",variant:"custom",className:`${Ai.tabButton} ${a===_v&&Ai.selectedTab}`,onClick:()=>i(_v),children:"Input Table"}),C(Ie,{type:"button",variant:"custom",className:`${Ai.tabButton} ${a===sc&&Ai.selectedTab}`,onClick:()=>i(sc),children:"Output Table"})]})]}),a===_v&&C(Mhe,{previewTableDataList:n}),a===sc&&C("div",{className:Ai.table,children:C(cz,{data:r,isLoading:t,error:e})})]})};var Li={"main-container":"_main-container_8x5tf_1","outputTab-header":"_outputTab-header_8x5tf_5",wrapper:"_wrapper_8x5tf_9",searchCommand:"_searchCommand_8x5tf_12",tabButton:"_tabButton_8x5tf_15",tabActive:"_tabActive_8x5tf_18"};const Lhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 21V7h14v14Zm2-10h10V9H9Zm4 4h2v-2h-2Zm0 4h2v-2h-2Zm-4-4h2v-2H9Zm8 0h2v-2h-2Zm-8 4h2v-2H9Zm8 0h2v-2h-2ZM3 17V3h14v3h-2V5H5v10h1v2Z"})}),Ihe=r=>C("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M232 208a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V48a8 8 0 0 1 16 0v108.7l50.3-50.4a8.1 8.1 0 0 1 11.4 0l26.3 26.4L188.7 72H168a8 8 0 0 1 0-16h40a8 8 0 0 1 8 8v40a8 8 0 0 1-16 0V83.3l-66.3 66.4a8.1 8.1 0 0 1-11.4 0L96 123.3l-56 56V200h184a8 8 0 0 1 8 8Z"})}),hz=({data:r,error:e,isLoading:t,labels:n,funnelData:a,chartType:i,datasets:o,setChartType:s,setXAxis:l,setYAxisList:u,xAxis:c,setMeasure:f,setStep:h,step:v,measure:d,setSankeyValues:p,sankeyData:g,previewTableDataList:y,singleValue:m,setSingleValue:_,singleValueData:b,setMargins:w,margins:x,legendSettings:S,setLegendSettings:T,labelSettings:D,setLabelSettings:M,axisSettings:A,setAxisSettings:I,customSettings:P,setCustomSettings:O,updateGroup:E,isEnableGroupBy:R,backGroundColor:V,setBackGroundColor:$,moreTabs:U})=>{var H;const[Y,ae]=B.useState(oc);return z("div",{className:Li["main-container"],children:[z("div",{className:Li["outputTab-header"],children:[z(Ie,{type:"button",variant:"custom",className:`${Li.tabButton} ${Y===oc&&Li.tabActive}`,onClick:()=>ae(oc),children:[C(Lhe,{})," Tables"]}),z(Ie,{type:"button",variant:"custom",className:`${Li.tabButton} ${Y===mv&&Li.tabActive}`,onClick:()=>ae(mv),children:[C(Ihe,{}),"Visualizations"]}),U==null?void 0:U.map(q=>C(Ie,{type:"button",variant:"custom",className:`${Li.tabButton} ${Y===q.name&&Li.tabActive}`,onClick:()=>ae(q.name),children:q.tab},q.name))]}),z("div",{className:Li.wrapper,children:[Y===oc&&C(fz,{outpuTableData:r,isOutputLoading:t,outputError:e,previewTableDataList:y}),Y===mv&&C(lz,{labels:n,funnelData:a,chartType:i,datasets:o,data:r,setChartType:s,setXAxis:l,setYAxisList:u,xAxis:c,setMeasure:f,setStep:h,step:v,measure:d,setSankeyValues:p,sankeyData:g,singleValue:m,setSingleValue:_,singleValueData:b,setMargins:w,margins:x,legendSettings:S,setLegendSettings:T,labelSettings:D,setLabelSettings:M,axisSettings:A,setAxisSettings:I,customSettings:P,setCustomSettings:O,updateGroup:E,isEnableGroupBy:R,isLoading:t,backGroundColor:V,setBackGroundColor:$}),(H=U==null?void 0:U.find(q=>q.name===Y))==null?void 0:H.tabContent]})]})};var He={"form-container":"_form-container_vmreb_1","field-container":"_field-container_vmreb_5","field-label":"_field-label_vmreb_9","field-wrapper":"_field-wrapper_vmreb_13","field-inner-container":"_field-inner-container_vmreb_17","field-value":"_field-value_vmreb_21","field-add-btn":"_field-add-btn_vmreb_25","field-value-container":"_field-value-container_vmreb_29","field-prompt":"_field-prompt_vmreb_33",group:"_group_vmreb_1",tooltipWrapper:"_tooltipWrapper_vmreb_37",tooltip:"_tooltip_vmreb_37",dropdown:"_dropdown_vmreb_49",filterDropdown:"_filterDropdown_vmreb_53",filterValues:"_filterValues_vmreb_57",columnText:"_columnText_vmreb_61",disabled:"_disabled_vmreb_65",checkIcon:"_checkIcon_vmreb_69",generateButton:"_generateButton_vmreb_73"};const Mh=r=>C("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.782 4.032a.575.575 0 1 0-.813-.814L7.5 6.687L4.032 3.218a.575.575 0 0 0-.814.814L6.687 7.5l-3.469 3.468a.575.575 0 0 0 .814.814L7.5 8.313l3.469 3.469a.575.575 0 0 0 .813-.814L8.313 7.5l3.469-3.468Z",clipRule:"evenodd"})}),ay=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[C("circle",{cx:12,cy:12,r:10}),C("path",{d:"M12 8v8m-4-4h8"})]})}),Phe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10h-2a8 8 0 0 1-8 8a8 8 0 0 1-8-8a8 8 0 0 1 8-8V2m6.78 1a.69.69 0 0 0-.48.2l-1.22 1.21l2.5 2.5L20.8 5.7c.26-.26.26-.7 0-.95L19.25 3.2c-.13-.13-.3-.2-.47-.2m-2.41 2.12L9 12.5V15h2.5l7.37-7.38l-2.5-2.5Z"})}),vz=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm5.6-5.225q.2 0 .375-.062q.175-.063.325-.213l5.675-5.675q.275-.275.275-.675t-.3-.7q-.275-.275-.7-.275q-.425 0-.7.275L10.6 13.4l-2.175-2.175q-.275-.275-.675-.275t-.7.3q-.275.275-.275.7q0 .425.275.7L9.9 15.5q.15.15.325.213q.175.062.375.062Z"})}),dz=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setSelectedGroupBy:c})=>{const[f,h]=B.useState([]),[v,d]=B.useState(""),[p,g]=B.useState({value:"",label:""}),[y,m]=B.useState([]),[_,b]=B.useState([]),[w,x]=B.useState(""),[S,T]=B.useState(""),[D,M]=B.useState([]),[A,I]=B.useState([]),[P,O]=B.useState(!1),[E,R]=B.useState(!1),[V,$]=B.useState(!1),[U,Y]=B.useState(!1),[ae,H]=B.useState(!1),[q,X]=B.useState(!1),[Z,ne]=B.useState([]),[se,K]=B.useState(""),[ve,N]=B.useState({value:"",label:""}),[F,G]=B.useState({value:"",label:""}),[re,ie]=B.useState({value:"",label:""}),[te,ce]=B.useState({value:"10",label:"10"}),[De,vt]=B.useState({value:"",label:""}),[it,Zt]=B.useState({value:"",label:""}),[Ct,dt]=B.useState({value:"",label:""}),[pt,un]=B.useState({value:"",label:""}),[ar,ol]=B.useState({value:"",label:""});B.useEffect(()=>{e.length&&(M([]),h([]),N(e[0]),m([]),G(e[0]),vt(e[0]),x(""),ie(e[0]),b([]),H(!1),X(!1),d(""),T(""))},[e]),B.useEffect(()=>{r.length?g({value:r[0].name,label:r[0].as}):g({value:"",label:""})},[r]);const{generateDatasetMetric:Sn,isGeneratingDataset:Ei,generateError:Wu,fetchColumnValues:Zr}=Kg();B.useEffect(()=>{De.value&&(I([]),ol({value:"",label:""}),Zr({companyId:n,tableName:a,columnName:De.value},{onSuccess(Le){var _r;const ft=(_r=Le.fetchColumnData)==null?void 0:_r.data;if(ft!=null&&ft.length){const Qe=ft.map(Pt=>({value:(Pt==null?void 0:Pt.value)||"",label:(Pt==null?void 0:Pt.label)||""}));ne(Qe)}}}))},[De]);const Uu=!f.length&&!y.length,sl=!r.length,Lh=!p.value,ll=!!f.length,Ri=!!y.length,Xr=t==="Bigquery",Cn=t==="MySql",Ca=t==="MongoDB",Tn=pt.value==="IS NULL"||pt.value==="IS NOT NULL",Qa=pt.value==="IN"||pt.value==="NOT IN",ct=Tn?!0:Qa?!!A.length:!!ar.value,cn=y.length?!1:!Ct.value;return B.useEffect(()=>{var Le;if(v&&p.value&&r.length){const ft=(Le=r.find(Xt=>Xt.name===p.value))==null?void 0:Le.datatype,_r=(ft==null?void 0:ft.toLowerCase())!=="date",Qe=p.value,Pt=BS({timeGrainValue:v,isTimeStamp:_r,col:Xr||Cn?Qe:Ca?`\`${Qe}\``:`"${Qe}"`,database:t});T(Pt)}},[v,p]),B.useEffect(()=>{y.length&&(H(!1),M([]),x(""))},[y]),B.useEffect(()=>{Tn&&ol({value:"",label:""})},[pt]),B.useEffect(()=>{u&&c(D)},[D,u]),z("div",{className:He["form-container"],children:[!sl&&z("div",{className:He["field-container"],children:[C(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:"Time Filter"}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(Er,{onChange:g,selectedOption:p,options:r.map(({name:Le,as:ft})=>({value:Le,label:ft})),isDisabled:sl,labelVariant:"static",label:"Time Column"}),C(kS,{setTimeGrainValue:d,timeGrainValue:v,isShowlabel:!0,isDisabled:Lh}),v&&z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>d(""),children:[v," ",C(Mh,{})]})]})})]}),!Ri&&z("div",{className:He["field-container"],children:[z(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Metric Creation",C(Mi,{children:"configure metric columns"})]}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Metric Fields"}),z(Ie,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{O(!0),K("")},isDisabled:Ri,children:[C(ay,{})," Add Aggregate Column"]}),C("div",{className:He["field-value-container"],children:f.map(Le=>z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>h(ft=>ft.filter(_r=>_r.as!==Le.as)),children:[Le.as," ",C(Mh,{})]},Le.as))}),z(Di,{headerTitle:ve.value&&it.value?`${it.value}(${ve.value})`:"Create metric",isOpen:P,onClose:()=>O(!1),children:[z("div",{className:He.dropdown,children:[C(Er,{onChange:N,selectedOption:ve,options:e,labelVariant:"static",label:"Columns"}),C(Er,{onChange:Zt,selectedOption:it,options:dm,labelVariant:"static",label:"Aggregate"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Le=>K(Le.target.value)})]}),C(Hu,{children:C(Ie,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!it.value||!ve.value,onClick:()=>{h(Le=>[...Le,{value:`${it.value}(${Xr||Cn?`${ve.value}`:Ca?`\`${ve.value}\``:`"${ve.value}"`})`,as:Xr?se||"_result":se||`${it.value}(${ve.label})`}]),O(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Group By"}),C(Ch,{options:e,onChange:M,value:D,name:"Dimensions",placeHolder:"Select Columns"})]})})]}),!ll&&z("div",{className:He["field-container"],children:[z(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Columns",C(Mi,{children:"select columns for raw records query"})]}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Select Columns"}),z(Ie,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{R(!0),K("")},isDisabled:ll,children:[C(ay,{})," Add Column"]}),C("div",{className:He["field-value-container"],children:y.map(Le=>z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>m(ft=>ft.filter(_r=>_r.as!==Le.as)),children:[Le.as," ",C(Mh,{})]},Le.as))}),z(Di,{headerTitle:F.value?`${F.value}`:"Select Column",isOpen:E,onClose:()=>R(!1),children:[z("div",{className:He.dropdown,children:[C(Er,{onChange:G,selectedOption:F,options:e,labelVariant:"static",label:"Columns"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Le=>K(Le.target.value)})]}),C(Hu,{children:C(Ie,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!F.value,onClick:()=>{y.find(Le=>Le.as===se)||m(Le=>[...Le,{value:`${F.value}`,as:se||`${F.label}`}]),R(!1)},children:"Save"})})]})]})})]}),z("div",{className:He["field-container"],children:[C(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:"category filters"}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter by"}),z(Ie,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>Y(!0),children:[C(ay,{})," Add Filter Category"]}),C("div",{className:He["field-value-container"],children:_.map(Le=>z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>b(ft=>ft.filter(_r=>_r!==Le)),children:[Le," ",C(Mh,{})]},Le))}),z(Di,{headerTitle:De.value&&pt.value?`${De.value} ${pt.value} ${Qa?`(${A.map(Le=>`'${Le}'`).join(", ")})`:`${ar.value?`'${ar.value}'`:""}`}`:"Add Filter",isOpen:U,onClose:()=>Y(!1),children:[z("div",{className:He.filterDropdown,children:[C(Er,{onChange:vt,selectedOption:De,options:e,labelVariant:"static",label:"Column"}),C(Er,{onChange:un,selectedOption:pt,options:pv,labelVariant:"static",label:"Operator"}),Qa?z("div",{className:He.filterValue,children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter Value"}),C(Ch,{options:Z,onChange:I,value:A,name:"Filters",placeHolder:"Select Multiple Filters"})]}):C(Er,{onChange:ol,selectedOption:ar,options:Z,isDisabled:Tn,labelVariant:"static",label:"Filter Value"})]}),C(Hu,{children:C(Ie,{type:"button",variant:"primary",size:"small",isDisabled:!De.value||!pt.value||!ct,className:He.disabled,onClick:()=>{b(Le=>[...Le,`${Xr||Cn?`${De.value}`:Ca?`\`${De.value}\``:`"${De.value}"`} ${pt.value} ${Qa?`(${A.map(ft=>`'${ft}'`).join(", ")})`:`${ar.value?`'${ar.value}'`:""}`}`]),Y(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Sort By"}),z(Ie,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>$(!0),children:[w?C(Phe,{}):C(ay,{})," ",w?"Edit":"Add"," Sort Category"]}),w&&z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>x(""),children:[w," ",C(Mh,{})]}),z(Di,{headerTitle:y.length?re.value?`${re.value}`:"Create sort":re.value&&Ct.value?`${Ct.value}(${re.value})`:"Create sort",isOpen:V,onClose:()=>$(!1),children:[z("div",{className:He.dropdown,children:[C(Er,{onChange:ie,selectedOption:re,options:e,labelVariant:"static",label:"Column"}),!y.length&&C(Er,{onChange:dt,selectedOption:Ct,options:dm,labelVariant:"static",label:"Aggregate"})]}),C(Hu,{children:C(Ie,{type:"button",variant:"primary",size:"small",isDisabled:!re.value||cn,className:He.disabled,onClick:()=>{y.length?x(`${Xr||Cn?`${re.value}`:`${re.value}`}`):x(`${Ct.value}(${Xr||Cn?`${re.value}`:Ca?`\`${re.value}\``:`"${re.value}"`})`),$(!1)},children:"Save"})})]})]})})]}),C(Er,{onChange:ce,options:LT,selectedOption:te,labelVariant:"static",label:"Row Limit"}),!y.length&&!!r.length&&z(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Ie,{type:"button",variant:"custom",onClick:()=>H(Le=>!Le),isDisabled:!p.value||!!y.length,children:ae?C(vz,{className:He.checkIcon}):C(FS,{})}),"Include Time"]}),z(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Ie,{type:"button",variant:"custom",onClick:()=>X(Le=>!Le),children:q?C(vz,{className:He.checkIcon}):C(FS,{})}),"Sort Descending"]}),C(Ie,{type:"button",variant:"primary",className:He.generateButton,isDisabled:Ei||Uu,onClick:()=>{var Le,ft,_r;o(""),s(!0),i([]),l(""),Ei&&s(!0),Sn({companyId:n,userInputs:{columns:y.map(Qe=>Xr||Cn?`${Qe.value} AS ${Qe.as} `:Ca?`\`${Qe.value}\` AS "${Qe.as}"`:`"${Qe.value}" AS "${Qe.as}"`),dimensions:Xr||Cn?D.map(Qe=>{var Pt,Xt;return{name:(Pt=e.find(Rr=>Rr.value===Qe))==null?void 0:Pt.value,as:(Xt=e.find(Rr=>Rr.value===Qe))==null?void 0:Xt.label}}):Ca?D.map(Qe=>{var Pt,Xt;return{name:`\`${(Pt=e.find(Rr=>Rr.value===Qe))==null?void 0:Pt.value}\``,as:(Xt=e.find(Rr=>Rr.value===Qe))==null?void 0:Xt.label}}):D.map(Qe=>{var Pt,Xt;return{name:`"${(Pt=e.find(Rr=>Rr.value===Qe))==null?void 0:Pt.value}"`,as:(Xt=e.find(Rr=>Rr.value===Qe))==null?void 0:Xt.label}}),metrics:f.map(Qe=>Xr?`${Qe.value} AS ${Qe.as}`:`${Qe.value} AS "${Qe.as}"`),sort:w,isSortDescending:q,filters:_,tableName:a,rowLimit:te.value,timeFilter:{filter:S,column:Xr||Cn?{name:p.value,as:(Le=e.find(Qe=>Qe.value===p.value))==null?void 0:Le.label}:Ca?{name:`\`${p.value}\``,as:(ft=e.find(Qe=>Qe.value===p.value))==null?void 0:ft.label}:{name:`"${p.value}"`,as:(_r=e.find(Qe=>Qe.value===p.value))==null?void 0:_r.label},isInclude:ae}}},{onSuccess(Qe){var oy,sy,ly;const Pt=(oy=Qe.generateDatasetMetrics)==null?void 0:oy.error,Xt=(sy=Qe.generateDatasetMetrics)==null?void 0:sy.result,Rr=(ly=Qe.generateDatasetMetrics)==null?void 0:ly.query;(Pt||Wu)&&(o(Pt.message||_m),s(!1),i([]),l("")),Xt&&Rr&&(o(""),s(!1),i(Array.isArray(Xt)?Xt:[]),l(Rr))}})},children:"Generate"})]})};var iy={container:"_container_7zhjn_1",header:"_header_7zhjn_5",enableGroupBy:"_enableGroupBy_7zhjn_8",enableGroupButton:"_enableGroupButton_7zhjn_11"};const pz=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setEnableGroupBy:c,setSelectedGroupBy:f})=>z("div",{className:iy.container,children:[z("div",{className:iy.header,children:["Data",c&&z(Ie,{type:"button",variant:"custom",onClick:()=>c(!u),className:`${u&&iy.enableGroupBy} ${iy.enableGroupButton}`,children:[u?"Disable":"Enable"," Drill down"]})]}),C(dz,{dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setQuery:l,setLoading:s,isEnableGroupBy:u,setSelectedGroupBy:f})]});var Ii={form:"_form_qtwuf_1",container:"_container_qtwuf_7",field:"_field_qtwuf_13",fieldLabel:"_fieldLabel_qtwuf_19",save:"_save_qtwuf_25",cancel:"_cancel_qtwuf_31",error:"_error_qtwuf_37"},YS={label:"_label_1vo1x_1",textarea:"_textarea_1vo1x_9",resizable:"_resizable_1vo1x_17"};const gz=({id:r,label:e,placeholder:t,rows:n,cols:a,resizable:i=!0,register:o,error:s,defaultValue:l,value:u,onFocus:c,onBlur:f,className:h})=>z("div",{className:h,children:[C("label",{htmlFor:r,className:YS.label,children:e}),C("textarea",{id:r,name:r,rows:n,cols:a,placeholder:t,className:Qn(YS.textarea,`${i?null:YS.resizable}`),defaultValue:l,...o,value:u,onFocus:c,onBlur:f}),s&&C(iS,{message:s.message})]});var Pi={group:"_group_13otg_1",button:"_button_13otg_9",checkbox:"_checkbox_13otg_17",switch:"_switch_13otg_25",enabled:"_enabled_13otg_43",notenabled:"_notenabled_13otg_59",label:"_label_13otg_75",labelActive:"_labelActive_13otg_83",labelInactive:"_labelInactive_13otg_91"};const yz=({enabled:r,onChange:e,label:t,className:n="",placeholder:a,labelClassName:i,defaultEnabled:o})=>z("div",{className:`${Pi.group} ${n}`,children:[t?C(de,{styleClass:"font-14",variant:"p",className:i,children:t}):null,C("input",{type:"checkbox",id:"toggle",checked:o,onChange:({target:s})=>e==null?void 0:e(s.checked),className:Pi.checkbox}),z("label",{htmlFor:"toggle",className:Pi.button,children:[C("span",{className:`${Pi.switch} ${r?Pi.enabled:Pi.notenabled}`}),a?C("span",{className:`
|
|
323
|
+
${a!=="gauge"?at.measureText:""}`,children:[z(de,{styleClass:"font-14",variant:"h1",className:at.field,children:[a!=="funnel"&&a!=="gauge"&&a!=="row"&&a!=="boxplot"&&a!=="table"&&"Y-axis",(a==="funnel"||a==="gauge"||a==="boxplot"||a==="table")&&"Measure",a==="row"&&"X-axis"]}),a!=="funnel"&&a!=="gauge"&&C(jS,{className:`${at.plusIcon} ${T}`,onClick:()=>M()})]}),z("form",{onSubmit:A(P),className:at.form,children:[a==="funnel"||a==="gauge"?C(Yt,{label:"",options:v,onChange:o,value:l}):d.map(E=>C(ry,{value:E.value,options:v,control:I},E.value)),C(Ie,{type:"submit",variant:"primary",size:"default",className:at.doneBtn,children:"Done"})]})]})})},ahe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m3.5 18.5l6-6l4 4L22 6.92L20.59 5.5l-7.09 8l-4-4L2 17l1.5 1.5Z"})}),ihe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M3 22V8h4v14H3m7 0V2h4v20h-4m7 0v-8h4v8h-4Z"})}),ohe=r=>z("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M4 21h17v-2H5V3H3v17a1 1 0 0 0 1 1z"}),C("circle",{cx:10,cy:8,r:2,fill:"currentColor"}),C("circle",{cx:18,cy:12,r:2,fill:"currentColor"}),C("circle",{cx:11.5,cy:13.5,r:1.5,fill:"currentColor"}),C("circle",{cx:16.5,cy:6.5,r:1.5,fill:"currentColor"})]}),she=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M4 22H2V2h2v20Zm11-1H5v-3h10v3Zm3-5H5v-3h13v3Zm3-5H5V8h16v3Zm-8-5H5V3h8v3Z"})}),lhe=r=>C("svg",{viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-616-64h536c4.4 0 8-3.6 8-8V284c0-7.2-8.7-10.7-13.7-5.7L592 488.6l-125.4-124a8.03 8.03 0 0 0-11.3 0l-189 189.6a7.87 7.87 0 0 0-2.3 5.6V720c0 4.4 3.6 8 8 8z"})}),uhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M27 28V16h-8v12h-4V12H7v16H4V2H2v26a2 2 0 0 0 2 2h26v-2Zm-14 0H9V14h4Zm12 0h-4V18h4Z"}),C("path",{fill:"currentColor",d:"M22.786 14a1.988 1.988 0 0 1-1.18-.387L11.205 5.987L8.242 10L6.637 8.806l2.982-4a1.998 1.998 0 0 1 2.749-.446L22.789 12l3.604-4.86L28 8.33l-3.604 4.862a2.001 2.001 0 0 1-1.61.808Z"})]}),che=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7.5 1.018a7 7 0 0 0-4.79 11.566L7.5 7.793V1.018zm1 0V7.5h6.482A7.001 7.001 0 0 0 8.5 1.018zM14.982 8.5H8.207l-4.79 4.79A7 7 0 0 0 14.982 8.5zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8z"})}),fhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12.051 21.949a10 10 0 0 1-1-19.949v4.04a5.994 5.994 0 1 0 6.91 6.909H22a10.015 10.015 0 0 1-9.95 9Zm9.95-11h-4.04a5.993 5.993 0 0 0-4.91-4.909V2a10.022 10.022 0 0 1 8.95 8.948v.001Z"})}),hhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"})}),vhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M28 28V18h-2v10h-4V4h-2v24H10V14H8v14H4V2H2v26a2.002 2.002 0 0 0 2 2h26v-2Z"}),C("path",{fill:"currentColor",d:"M14 4h2v14h-2z"})]}),dhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"}),C("path",{fill:"currentColor",d:"M10 16a2 2 0 1 1-2 2a2 2 0 0 1 2-2m0-2a4 4 0 1 0 4 4a4 4 0 0 0-4-4zm11-8a4 4 0 1 1-4 4a4 4 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6zm3.5 17a1.5 1.5 0 1 1-1.5 1.5a1.5 1.5 0 0 1 1.5-1.5m0-2a3.5 3.5 0 1 0 3.5 3.5a3.5 3.5 0 0 0-3.5-3.5z"})]}),phe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M22 10V6H10v6H4V2H2v26a2.002 2.002 0 0 0 2 2h26V10Zm-10 4V8h8v4h8v10h-6v-6H12v6H4v-8ZM4 28v-4h10v-6h6v6h8v4Z"})}),ghe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M3 4h1v9h3V7h5v4h4v4h4v6H3V4m13 12v4h3v-4h-3m-4-4v8h3v-8h-3M8 8v12h3V8H8m-4 6v6h3v-6H4Z"})}),yhe=r=>C("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8.127 13.6c-.689 1.197-.225 2.18.732 2.732c.956.553 2.041.465 2.732-.732c.689-1.195 5.047-11.865 4.668-12.084c-.379-.219-7.442 8.888-8.132 10.084zM10 6c.438 0 .864.037 1.281.109c.438-.549.928-1.154 1.405-1.728A9.664 9.664 0 0 0 10 4C4.393 4 0 8.729 0 14.766c0 .371.016.742.049 1.103c.049.551.54.955 1.084.908c.551-.051.957-.535.908-1.086A10.462 10.462 0 0 1 2 14.766C2 9.85 5.514 6 10 6zm7.219 1.25c-.279.75-.574 1.514-.834 2.174C17.4 10.894 18 12.738 18 14.766c0 .316-.015.635-.043.943a1.001 1.001 0 0 0 1.992.182c.033-.37.051-.748.051-1.125c0-2.954-1.053-5.59-2.781-7.516z"})}),mhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M30 2H2v14h6.111a7.036 7.036 0 0 1 3.13.74L15.764 19l-4.522 2.26a7.036 7.036 0 0 1-3.13.74H2v8h7.223a9.045 9.045 0 0 0 4.025-.95l8.622-4.31A7.036 7.036 0 0 1 25 24h5V14h-5a7.036 7.036 0 0 1-3.13-.74L15.348 10H30ZM8 4h16v4H8ZM4 4h2v10H4Zm0 20h2v4H4Zm16.975-1.05l-8.622 4.31a7.036 7.036 0 0 1-3.13.74H8v-4h.111a9.045 9.045 0 0 0 4.025-.95L18 20.118l1.864.932a9.045 9.045 0 0 0 4.025.95H24v.058a9.052 9.052 0 0 0-3.025.892ZM28 22h-2v-6h2ZM12.354 10.74l8.621 4.31a9.052 9.052 0 0 0 3.025.89V20h-.111a7.036 7.036 0 0 1-3.13-.74l-8.622-4.31A9.045 9.045 0 0 0 8.11 14H8v-4h1.223a7.036 7.036 0 0 1 3.13.74ZM28 8h-2V4h2Z"})}),_he=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M22 21H2V3h2v16h2v-2h4v2h2v-3h4v3h2v-2h4v4m-4-7h4v2h-4v-2m-6-8h4v3h-4V6m4 9h-4v-5h4v5M6 10h4v2H6v-2m4 6H6v-3h4v3Z"})}),bhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M2.873 11.297V4.142H1.699L0 5.379v1.137l1.64-1.18h.06v5.961h1.174Zm3.213-5.09v-.063c0-.618.44-1.169 1.196-1.169c.676 0 1.174.44 1.174 1.106c0 .624-.42 1.101-.807 1.526L4.99 10.553v.744h4.78v-.99H6.643v-.069L8.41 8.252c.65-.724 1.237-1.332 1.237-2.27C9.646 4.849 8.723 4 7.308 4c-1.573 0-2.36 1.064-2.36 2.15v.057h1.138Zm6.559 1.883h.786c.823 0 1.374.481 1.379 1.179c.01.707-.55 1.216-1.421 1.21c-.77-.005-1.326-.419-1.379-.953h-1.095c.042 1.053.938 1.918 2.464 1.918c1.478 0 2.642-.839 2.62-2.144c-.02-1.143-.922-1.651-1.551-1.714v-.063c.535-.09 1.347-.66 1.326-1.678c-.026-1.053-.933-1.855-2.359-1.845c-1.5.005-2.317.88-2.348 1.898h1.116c.032-.498.498-.944 1.206-.944c.703 0 1.206.435 1.206 1.07c.005.64-.504 1.106-1.2 1.106h-.75v.96Z"})}),xhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M22 6V4H12v2h4v2h-4v12h4v2h-4v2h10v-2h-4v-2h4V8h-4V6Zm-8 12v-3h6v3Zm6-5h-6v-3h6Z"}),C("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"})]}),whe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8 16h5v-5H8v5Zm0-7h12V4H8Zm7 7h5v-5h-5Zm-7 2q-.825 0-1.412-.587Q6 16.825 6 16V4q0-.825.588-1.413Q7.175 2 8 2h12q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18Zm-4 4q-.825 0-1.412-.587Q2 20.825 2 20V6h2v14h14v2Z"})}),oz=({setChartType:r})=>{const e=[{name:"Line",icon:ahe},{name:"Bar",icon:ihe},{name:"Combo",icon:uhe},{name:"Scatter",icon:ohe},{name:"Row",icon:she},{name:"Area",icon:lhe},{name:"Pie",icon:che},{name:"Waterfall",icon:vhe},{name:"Funnel",icon:hhe},{name:"Bubble",icon:dhe},{name:"Doughnut",icon:fhe},{name:"Stepped",icon:phe},{name:"Histogram",icon:ghe},{name:"Gauge",icon:yhe},{name:"Sankey",icon:mhe},{name:"Stack",icon:_he},{name:"Single value",icon:bhe},{name:"BoxPlot",icon:xhe},{name:"Table",icon:whe}];return C("div",{className:at.chartOptions,children:e.map(t=>z("div",{className:at.chartOption,children:[C(Ie,{type:"button",variant:"custom",className:at.chartOptionBtn,onClick:()=>{r(t.name.toLowerCase())},children:C(t.icon,{style:{color:"blue",width:"20px",height:"20px"}})},t.name),C(de,{variant:"p",styleClass:"tertiary",className:at.chartOptionText,children:t.name})]},t.name))})},She=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 3H5v6h2V3m12 0h-2v10h2V3M3 13h2v8h2v-8h2v-2H3v2m12-6h-2V3h-2v4H9v2h6V7m-4 14h2V11h-2v10m4-6v2h2v4h2v-4h2v-2h-6Z"})}),Che=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"M20 20L4 4m16 0L4 20"})}),The=({chartType:r,setChartType:e,data:t,setXAxis:n,setYAxisList:a,xAxis:i,setMeasure:o,setStep:s,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:v,setMargins:d,margins:p,legendSettings:g,setLegendSettings:y,labelSettings:m,setLabelSettings:_,axisSettings:b,setAxisSettings:w,customSettings:x,setCustomSettings:S,backGroundColor:T,setBackGroundColor:D})=>{const[M,A]=B.useState(lc),I="Chart types",P="Chart properties",[O,E]=B.useState(I);return z("div",{className:Yr.chartButtonContainer,children:[z("div",{className:Yr["chartButton-header"],children:[z(de,{styleClass:"font-14c",variant:"h1",className:Yr.settings,children:[C(She,{}),"Chart Settings"]}),C("div",{className:Yr.crossIcon,children:C(Che,{onClick:()=>v(!1)})})]}),z("div",{className:Yr.chartButtons,children:[z("div",{className:Yr["settingsTab-header-control"],children:[C(Ie,{type:"button",variant:"custom",className:`${Yr.chartButton} ${M===lc&&Yr.chartButtonSelected}`,onClick:()=>A(lc),children:"General"}),C(Ie,{type:"button",variant:"custom",className:`${Yr.chartButton} ${M===bv&&Yr.chartButtonSelected}`,onClick:()=>A(bv),children:"Configuration"})]}),M===lc&&z(Ce,{children:[C("div",{className:Yr.tabContainer,children:C(US,{activeTab:O,options:[I,P],setActiveTab:E,className:Yr.tab,tabText:Yr.tabText})}),O===I&&C("div",{className:Yr.button,children:C(oz,{setChartType:e})}),O===P&&C(Ce,{children:r&&C("div",{className:Yr.button,children:C(iz,{data:t,setXAxis:n,xAxis:i,setYAxisList:a,chartType:r,setStep:s,setMeasure:o,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:v})})})]}),M===bv&&C(nhe,{setMargins:d,margins:p,legendSettings:g,setLegendSettings:y,labelSettings:m,setLabelSettings:_,axisSettings:b,setAxisSettings:w,customSettings:x,setCustomSettings:S,chartType:r,setChartType:e,backGroundColor:T,setBackGroundColor:D})]})]})};var Ut={"outputTab-header":"_outputTab-header_1jfcs_1",searchCommand:"_searchCommand_1jfcs_9","chartTab-container":"_chartTab-container_1jfcs_17",chartText:"_chartText_1jfcs_25",charts:"_charts_1jfcs_33",metricChart:"_metricChart_1jfcs_41",metricChartEmpty:"_metricChartEmpty_1jfcs_49","chartTab-wrapper":"_chartTab-wrapper_1jfcs_57","chartTab-wrapper-head":"_chartTab-wrapper-head_1jfcs_65",fullQuery:"_fullQuery_1jfcs_73",noQuery:"_noQuery_1jfcs_81","tableTab-header":"_tableTab-header_1jfcs_89","chartButton-header":"_chartButton-header_1jfcs_97",chartButtonContainer:"_chartButtonContainer_1jfcs_105",searchWrapper:"_searchWrapper_1jfcs_113",searchIcon:"_searchIcon_1jfcs_121",chartConfigure:"_chartConfigure_1jfcs_129",chartSettings:"_chartSettings_1jfcs_137",labels:"_labels_1jfcs_145",chartButtons:"_chartButtons_1jfcs_153",chartButton:"_chartButton_1jfcs_97"};const sz=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m21 21l-4.486-4.494M19 10.5a8.5 8.5 0 1 1-17 0a8.5 8.5 0 0 1 17 0Z"})}),Dhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M11.5 4a.5.5 0 0 0 .5.5h1.75a.75.75 0 0 1 0 1.5H12a2 2 0 0 1-2-2V2.25a.75.75 0 0 1 1.5 0V4Zm0 8a.5.5 0 0 1 .5-.5h1.75a.75.75 0 0 0 0-1.5H12a2 2 0 0 0-2 2v1.75a.75.75 0 0 0 1.5 0V12ZM4 11.5a.5.5 0 0 1 .5.5v1.75a.75.75 0 0 0 1.5 0V12a2 2 0 0 0-2-2H2.25a.75.75 0 0 0 0 1.5H4ZM4.5 4a.5.5 0 0 1-.5.5H2.25a.75.75 0 0 0 0 1.5H4a2 2 0 0 0 2-2V2.25a.75.75 0 0 0-1.5 0V4Z"})}),lz=({labels:r,datasets:e,funnelData:t,chartType:n,setChartType:a,data:i,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:v,sankeyData:d,singleValue:p,setSingleValue:g,singleValueData:y,setMargins:m,margins:_,legendSettings:b,setLegendSettings:w,labelSettings:x,setLabelSettings:S,customSettings:T,setCustomSettings:D,axisSettings:M,setAxisSettings:A,updateGroup:I,isLoading:P,isEnableGroupBy:O,backGroundColor:E,setBackGroundColor:R})=>{const[V,$]=B.useState(!1),[U,Y]=B.useState(!1);return z("div",{className:Ut["chartTab-container"],children:[!(i!=null&&i.length)&&P&&C("div",{className:Ut["loader-container"],children:C(Bu,{style:{width:"50px",height:"50px",color:"blue"}})}),!(i!=null&&i.length)&&!P&&z("div",{className:Ut.metricChartEmpty,children:[C("div",{className:Ut.searchWrapper,children:C(sz,{className:Ut.searchIcon})}),C("div",{className:Ut.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:Ut.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"No data found! Run a query to display charts"})})]}),!!(i!=null&&i.length)&&!P&&z("div",{className:Ut.metricChart,children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Preview"}),z("div",{className:Ut["chartTab-wrapper"],children:[z("div",{className:Ut["chartTab-wrapper-head"],children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Charts"}),z("div",{className:Ut.chartButtons,children:[C(Ie,{type:"button",variant:"custom",className:Ut.chartButton,onClick:()=>{$(!V)},children:"Chart Settings"}),C(Ie,{type:"button",variant:"custom",className:r!=null&&r.length?Ut.fullQuery:Ut.noQuery,onClick:r!=null&&r.length?()=>Y(!0):void 0,children:C(Dhe,{})})]})]}),V&&C("div",{className:Ut.chartSettings,children:C(The,{chartType:n,setChartType:a,data:i,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:v,singleValue:p,setSingleValue:g,setSettingsShow:$,setMargins:m,margins:_,legendSettings:b,setLegendSettings:w,labelSettings:x,setLabelSettings:S,axisSettings:M,setAxisSettings:A,customSettings:T,setCustomSettings:D,backGroundColor:E,setBackGroundColor:R})}),r!=null&&r.length?C("div",{className:Ut.labels,children:C(Ng,{labels:r,data:{labels:r,datasets:e},chartType:n,funnelData:t,sankeyData:d,singleValueData:y,margins:_,legendSettings:b,labelSettings:x,axisSettings:M,customSettings:T,backGroundColor:E,updateGroup:I,isEnableGroupBy:O,enableSaveAs:!0})}):z("div",{className:Ut.metricChartEmpty,children:[C("div",{className:Ut.searchWrapper,children:C(sz,{className:Ut.searchIcon})}),C("div",{className:Ut.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:Ut.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"Choose an appropriate chart type and start visulaizing your data"})})]})]})]}),C(HS,{isShow:U,onCancel:()=>Y(!1),chart:{labels:r,data:{labels:r,datasets:e},chartType:n,funnelData:t,sankeyData:d,singleValueData:y,margins:_,legendSettings:b,labelSettings:x,axisSettings:M,customSettings:T,backGroundColor:E,enableSaveAs:!0}})]})};var ny={container:"_container_1jc0r_1",wrapper:"_wrapper_1jc0r_5",text:"_text_1jc0r_9",table:"_table_1jc0r_12"},Po={container:"_container_1uho5_1",table:"_table_1uho5_9",tableHead:"_tableHead_1uho5_17",tableRow:"_tableRow_1uho5_25",tableHeadCol:"_tableHeadCol_1uho5_33",tableRowCol:"_tableRowCol_1uho5_41",empty:"_empty_1uho5_49",error:"_error_1uho5_57"};const uz=({data:r,isError:e})=>z("div",{className:Po.container,children:[!!(r!=null&&r.length)&&!e&&z("table",{className:Po.table,children:[C("thead",{className:Po.tableHead,children:C("tr",{className:Po.tableRow,children:Object.keys(r[0]).map(t=>C("th",{className:Po.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:t})},t))})}),C("tbody",{children:r==null?void 0:r.map((t,n)=>C("tr",{children:Object.keys(r[0]).map((a,i)=>C("td",{className:Po.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(t[a])})},i))},n))})]}),!(r!=null&&r.length)&&!e&&C("div",{className:Po.empty,children:"Table is empty"}),e&&C("div",{className:Po.error,children:r.message})]}),Mhe=({previewTableDataList:r})=>C("div",{className:ny.container,children:C("div",{className:ny.wrapper,children:r==null?void 0:r.map(e=>z("div",{className:ny.text,children:[C(de,{variant:"h1",styleClass:"primary",className:"",children:e.name}),C("div",{className:ny.table,children:C(uz,{data:e.data,isError:e.isError})})]},e.name))})});var Ai={container:"_container_12jmm_1",header:"_header_12jmm_5","text-container":"_text-container_12jmm_9","btn-container":"_btn-container_12jmm_13",tabButton:"_tabButton_12jmm_16",selectedTab:"_selectedTab_12jmm_19",table:"_table_12jmm_22"},qr={"table-loader-container":"_table-loader-container_1j4gc_1",tableData:"_tableData_1j4gc_7",tableHeadCol:"_tableHeadCol_1j4gc_13",tableRow:"_tableRow_1j4gc_19",tableRowCol:"_tableRowCol_1j4gc_25",row:"_row_1j4gc_31",container:"_container_1j4gc_37",table:"_table_1j4gc_1",previewTable:"_previewTable_1j4gc_49",preview:"_preview_1j4gc_49",previewText:"_previewText_1j4gc_61",noData:"_noData_1j4gc_67",error:"_error_1j4gc_73",errorMsg:"_errorMsg_1j4gc_79",tableIcon:"_tableIcon_1j4gc_85"};const Ahe=r=>C("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",d:"M.5 4.5h14m-10-4v14m-3-14h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-12a1 1 0 0 1-1-1v-12a1 1 0 0 1 1-1Z"})}),cz=({data:r,isLoading:e,error:t})=>C("div",{className:qr.container,children:z("div",{className:qr.previewTable,children:[C("div",{className:qr.preview,children:C(de,{styleClass:"font-14c",variant:"h1",className:qr.previewText,children:"Preview"})}),z("div",{className:qr.tableData,children:[e&&!(r!=null&&r.length)&&C("div",{className:qr["table-loader-container"],children:C(Bu,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(r!=null&&r.length)&&!e&&z("table",{className:qr.table,children:[C("thead",{children:C("tr",{className:qr.row,children:Object.keys(r[0]).map(n=>C("th",{className:qr.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:n})},n))})}),C("tbody",{children:r.map((n,a)=>C("tr",{className:qr.tableRow,children:Object.keys(r[0]).map((i,o)=>C("td",{className:qr.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(n[i])})},o))},a))})]}),!(r!=null&&r.length)&&!e&&!t.length&&z("div",{className:qr.noData,children:[C(Ahe,{className:qr.tableIcon,width:"60px",height:"60px"}),C(de,{styleClass:"font-14b",variant:"p",children:"No data available to preview"}),C(de,{styleClass:"font-14a",variant:"p",children:"Run your query to preview data"})]}),t&&C("div",{className:qr.error,children:C(de,{styleClass:"primary",className:qr.errorMsg,variant:"p",children:t})})]})]})}),fz=({outpuTableData:r,outputError:e,isOutputLoading:t,previewTableDataList:n})=>{const[a,i]=B.useState(sc);return z("div",{className:Ai.container,children:[z("div",{className:Ai.header,children:[z("div",{className:Ai["text-container"],children:[C(de,{styleClass:"font-14c",variant:"h1",children:"Tables"}),C(de,{styleClass:"font-14",variant:"p",children:"Preview your selected table & output table values"})]}),z("div",{className:Ai["btn-container"],children:[C(Ie,{type:"button",variant:"custom",className:`${Ai.tabButton} ${a===_v&&Ai.selectedTab}`,onClick:()=>i(_v),children:"Input Table"}),C(Ie,{type:"button",variant:"custom",className:`${Ai.tabButton} ${a===sc&&Ai.selectedTab}`,onClick:()=>i(sc),children:"Output Table"})]})]}),a===_v&&C(Mhe,{previewTableDataList:n}),a===sc&&C("div",{className:Ai.table,children:C(cz,{data:r,isLoading:t,error:e})})]})};var Li={"main-container":"_main-container_wy97p_1","outputTab-header":"_outputTab-header_wy97p_5",wrapper:"_wrapper_wy97p_9",searchCommand:"_searchCommand_wy97p_12",tabButton:"_tabButton_wy97p_15",tabActive:"_tabActive_wy97p_18"};const Lhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 21V7h14v14Zm2-10h10V9H9Zm4 4h2v-2h-2Zm0 4h2v-2h-2Zm-4-4h2v-2H9Zm8 0h2v-2h-2Zm-8 4h2v-2H9Zm8 0h2v-2h-2ZM3 17V3h14v3h-2V5H5v10h1v2Z"})}),Ihe=r=>C("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M232 208a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V48a8 8 0 0 1 16 0v108.7l50.3-50.4a8.1 8.1 0 0 1 11.4 0l26.3 26.4L188.7 72H168a8 8 0 0 1 0-16h40a8 8 0 0 1 8 8v40a8 8 0 0 1-16 0V83.3l-66.3 66.4a8.1 8.1 0 0 1-11.4 0L96 123.3l-56 56V200h184a8 8 0 0 1 8 8Z"})}),hz=({data:r,error:e,isLoading:t,labels:n,funnelData:a,chartType:i,datasets:o,setChartType:s,setXAxis:l,setYAxisList:u,xAxis:c,setMeasure:f,setStep:h,step:v,measure:d,setSankeyValues:p,sankeyData:g,previewTableDataList:y,singleValue:m,setSingleValue:_,singleValueData:b,setMargins:w,margins:x,legendSettings:S,setLegendSettings:T,labelSettings:D,setLabelSettings:M,axisSettings:A,setAxisSettings:I,customSettings:P,setCustomSettings:O,updateGroup:E,isEnableGroupBy:R,backGroundColor:V,setBackGroundColor:$,moreTabs:U})=>{var H;const[Y,ae]=B.useState(oc);return z("div",{className:Li["main-container"],children:[z("div",{className:Li["outputTab-header"],children:[z(Ie,{type:"button",variant:"custom",className:`${Li.tabButton} ${Y===oc&&Li.tabActive}`,onClick:()=>ae(oc),children:[C(Lhe,{})," Tables"]}),z(Ie,{type:"button",variant:"custom",className:`${Li.tabButton} ${Y===mv&&Li.tabActive}`,onClick:()=>ae(mv),children:[C(Ihe,{}),"Visualizations"]}),U==null?void 0:U.map(q=>C(Ie,{type:"button",variant:"custom",className:`${Li.tabButton} ${Y===q.name&&Li.tabActive}`,onClick:()=>ae(q.name),children:q.tab},q.name))]}),z("div",{className:Li.wrapper,children:[Y===oc&&C(fz,{outpuTableData:r,isOutputLoading:t,outputError:e,previewTableDataList:y}),Y===mv&&C(lz,{labels:n,funnelData:a,chartType:i,datasets:o,data:r,setChartType:s,setXAxis:l,setYAxisList:u,xAxis:c,setMeasure:f,setStep:h,step:v,measure:d,setSankeyValues:p,sankeyData:g,singleValue:m,setSingleValue:_,singleValueData:b,setMargins:w,margins:x,legendSettings:S,setLegendSettings:T,labelSettings:D,setLabelSettings:M,axisSettings:A,setAxisSettings:I,customSettings:P,setCustomSettings:O,updateGroup:E,isEnableGroupBy:R,isLoading:t,backGroundColor:V,setBackGroundColor:$}),(H=U==null?void 0:U.find(q=>q.name===Y))==null?void 0:H.tabContent]})]})};var He={"form-container":"_form-container_vmreb_1","field-container":"_field-container_vmreb_5","field-label":"_field-label_vmreb_9","field-wrapper":"_field-wrapper_vmreb_13","field-inner-container":"_field-inner-container_vmreb_17","field-value":"_field-value_vmreb_21","field-add-btn":"_field-add-btn_vmreb_25","field-value-container":"_field-value-container_vmreb_29","field-prompt":"_field-prompt_vmreb_33",group:"_group_vmreb_1",tooltipWrapper:"_tooltipWrapper_vmreb_37",tooltip:"_tooltip_vmreb_37",dropdown:"_dropdown_vmreb_49",filterDropdown:"_filterDropdown_vmreb_53",filterValues:"_filterValues_vmreb_57",columnText:"_columnText_vmreb_61",disabled:"_disabled_vmreb_65",checkIcon:"_checkIcon_vmreb_69",generateButton:"_generateButton_vmreb_73"};const Mh=r=>C("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.782 4.032a.575.575 0 1 0-.813-.814L7.5 6.687L4.032 3.218a.575.575 0 0 0-.814.814L6.687 7.5l-3.469 3.468a.575.575 0 0 0 .814.814L7.5 8.313l3.469 3.469a.575.575 0 0 0 .813-.814L8.313 7.5l3.469-3.468Z",clipRule:"evenodd"})}),ay=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[C("circle",{cx:12,cy:12,r:10}),C("path",{d:"M12 8v8m-4-4h8"})]})}),Phe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10h-2a8 8 0 0 1-8 8a8 8 0 0 1-8-8a8 8 0 0 1 8-8V2m6.78 1a.69.69 0 0 0-.48.2l-1.22 1.21l2.5 2.5L20.8 5.7c.26-.26.26-.7 0-.95L19.25 3.2c-.13-.13-.3-.2-.47-.2m-2.41 2.12L9 12.5V15h2.5l7.37-7.38l-2.5-2.5Z"})}),vz=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm5.6-5.225q.2 0 .375-.062q.175-.063.325-.213l5.675-5.675q.275-.275.275-.675t-.3-.7q-.275-.275-.7-.275q-.425 0-.7.275L10.6 13.4l-2.175-2.175q-.275-.275-.675-.275t-.7.3q-.275.275-.275.7q0 .425.275.7L9.9 15.5q.15.15.325.213q.175.062.375.062Z"})}),dz=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setSelectedGroupBy:c})=>{const[f,h]=B.useState([]),[v,d]=B.useState(""),[p,g]=B.useState({value:"",label:""}),[y,m]=B.useState([]),[_,b]=B.useState([]),[w,x]=B.useState(""),[S,T]=B.useState(""),[D,M]=B.useState([]),[A,I]=B.useState([]),[P,O]=B.useState(!1),[E,R]=B.useState(!1),[V,$]=B.useState(!1),[U,Y]=B.useState(!1),[ae,H]=B.useState(!1),[q,X]=B.useState(!1),[Z,ne]=B.useState([]),[se,K]=B.useState(""),[ve,N]=B.useState({value:"",label:""}),[F,G]=B.useState({value:"",label:""}),[re,ie]=B.useState({value:"",label:""}),[te,ce]=B.useState({value:"10",label:"10"}),[De,vt]=B.useState({value:"",label:""}),[it,Zt]=B.useState({value:"",label:""}),[Ct,dt]=B.useState({value:"",label:""}),[pt,un]=B.useState({value:"",label:""}),[ar,ol]=B.useState({value:"",label:""});B.useEffect(()=>{e.length&&(M([]),h([]),N(e[0]),m([]),G(e[0]),vt(e[0]),x(""),ie(e[0]),b([]),H(!1),X(!1),d(""),T(""))},[e]),B.useEffect(()=>{r.length?g({value:r[0].name,label:r[0].as}):g({value:"",label:""})},[r]);const{generateDatasetMetric:Sn,isGeneratingDataset:Ei,generateError:Wu,fetchColumnValues:Zr}=Kg();B.useEffect(()=>{De.value&&(I([]),ol({value:"",label:""}),Zr({companyId:n,tableName:a,columnName:De.value},{onSuccess(Le){var _r;const ft=(_r=Le.fetchColumnData)==null?void 0:_r.data;if(ft!=null&&ft.length){const Qe=ft.map(Pt=>({value:(Pt==null?void 0:Pt.value)||"",label:(Pt==null?void 0:Pt.label)||""}));ne(Qe)}}}))},[De]);const Uu=!f.length&&!y.length,sl=!r.length,Lh=!p.value,ll=!!f.length,Ri=!!y.length,Xr=t==="Bigquery",Cn=t==="MySql",Ca=t==="MongoDB",Tn=pt.value==="IS NULL"||pt.value==="IS NOT NULL",Qa=pt.value==="IN"||pt.value==="NOT IN",ct=Tn?!0:Qa?!!A.length:!!ar.value,cn=y.length?!1:!Ct.value;return B.useEffect(()=>{var Le;if(v&&p.value&&r.length){const ft=(Le=r.find(Xt=>Xt.name===p.value))==null?void 0:Le.datatype,_r=(ft==null?void 0:ft.toLowerCase())!=="date",Qe=p.value,Pt=BS({timeGrainValue:v,isTimeStamp:_r,col:Xr||Cn?Qe:Ca?`\`${Qe}\``:`"${Qe}"`,database:t});T(Pt)}},[v,p]),B.useEffect(()=>{y.length&&(H(!1),M([]),x(""))},[y]),B.useEffect(()=>{Tn&&ol({value:"",label:""})},[pt]),B.useEffect(()=>{u&&c(D)},[D,u]),z("div",{className:He["form-container"],children:[!sl&&z("div",{className:He["field-container"],children:[C(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:"Time Filter"}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(Er,{onChange:g,selectedOption:p,options:r.map(({name:Le,as:ft})=>({value:Le,label:ft})),isDisabled:sl,labelVariant:"static",label:"Time Column"}),C(kS,{setTimeGrainValue:d,timeGrainValue:v,isShowlabel:!0,isDisabled:Lh}),v&&z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>d(""),children:[v," ",C(Mh,{})]})]})})]}),!Ri&&z("div",{className:He["field-container"],children:[z(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Metric Creation",C(Mi,{children:"configure metric columns"})]}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Metric Fields"}),z(Ie,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{O(!0),K("")},isDisabled:Ri,children:[C(ay,{})," Add Aggregate Column"]}),C("div",{className:He["field-value-container"],children:f.map(Le=>z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>h(ft=>ft.filter(_r=>_r.as!==Le.as)),children:[Le.as," ",C(Mh,{})]},Le.as))}),z(Di,{headerTitle:ve.value&&it.value?`${it.value}(${ve.value})`:"Create metric",isOpen:P,onClose:()=>O(!1),children:[z("div",{className:He.dropdown,children:[C(Er,{onChange:N,selectedOption:ve,options:e,labelVariant:"static",label:"Columns"}),C(Er,{onChange:Zt,selectedOption:it,options:dm,labelVariant:"static",label:"Aggregate"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Le=>K(Le.target.value)})]}),C(Hu,{children:C(Ie,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!it.value||!ve.value,onClick:()=>{h(Le=>[...Le,{value:`${it.value}(${Xr||Cn?`${ve.value}`:Ca?`\`${ve.value}\``:`"${ve.value}"`})`,as:Xr?se||"_result":se||`${it.value}(${ve.label})`}]),O(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Group By"}),C(Ch,{options:e,onChange:M,value:D,name:"Dimensions",placeHolder:"Select Columns"})]})})]}),!ll&&z("div",{className:He["field-container"],children:[z(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Columns",C(Mi,{children:"select columns for raw records query"})]}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Select Columns"}),z(Ie,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{R(!0),K("")},isDisabled:ll,children:[C(ay,{})," Add Column"]}),C("div",{className:He["field-value-container"],children:y.map(Le=>z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>m(ft=>ft.filter(_r=>_r.as!==Le.as)),children:[Le.as," ",C(Mh,{})]},Le.as))}),z(Di,{headerTitle:F.value?`${F.value}`:"Select Column",isOpen:E,onClose:()=>R(!1),children:[z("div",{className:He.dropdown,children:[C(Er,{onChange:G,selectedOption:F,options:e,labelVariant:"static",label:"Columns"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Le=>K(Le.target.value)})]}),C(Hu,{children:C(Ie,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!F.value,onClick:()=>{y.find(Le=>Le.as===se)||m(Le=>[...Le,{value:`${F.value}`,as:se||`${F.label}`}]),R(!1)},children:"Save"})})]})]})})]}),z("div",{className:He["field-container"],children:[C(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:"category filters"}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter by"}),z(Ie,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>Y(!0),children:[C(ay,{})," Add Filter Category"]}),C("div",{className:He["field-value-container"],children:_.map(Le=>z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>b(ft=>ft.filter(_r=>_r!==Le)),children:[Le," ",C(Mh,{})]},Le))}),z(Di,{headerTitle:De.value&&pt.value?`${De.value} ${pt.value} ${Qa?`(${A.map(Le=>`'${Le}'`).join(", ")})`:`${ar.value?`'${ar.value}'`:""}`}`:"Add Filter",isOpen:U,onClose:()=>Y(!1),children:[z("div",{className:He.filterDropdown,children:[C(Er,{onChange:vt,selectedOption:De,options:e,labelVariant:"static",label:"Column"}),C(Er,{onChange:un,selectedOption:pt,options:pv,labelVariant:"static",label:"Operator"}),Qa?z("div",{className:He.filterValue,children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter Value"}),C(Ch,{options:Z,onChange:I,value:A,name:"Filters",placeHolder:"Select Multiple Filters"})]}):C(Er,{onChange:ol,selectedOption:ar,options:Z,isDisabled:Tn,labelVariant:"static",label:"Filter Value"})]}),C(Hu,{children:C(Ie,{type:"button",variant:"primary",size:"small",isDisabled:!De.value||!pt.value||!ct,className:He.disabled,onClick:()=>{b(Le=>[...Le,`${Xr||Cn?`${De.value}`:Ca?`\`${De.value}\``:`"${De.value}"`} ${pt.value} ${Qa?`(${A.map(ft=>`'${ft}'`).join(", ")})`:`${ar.value?`'${ar.value}'`:""}`}`]),Y(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Sort By"}),z(Ie,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>$(!0),children:[w?C(Phe,{}):C(ay,{})," ",w?"Edit":"Add"," Sort Category"]}),w&&z(Ie,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>x(""),children:[w," ",C(Mh,{})]}),z(Di,{headerTitle:y.length?re.value?`${re.value}`:"Create sort":re.value&&Ct.value?`${Ct.value}(${re.value})`:"Create sort",isOpen:V,onClose:()=>$(!1),children:[z("div",{className:He.dropdown,children:[C(Er,{onChange:ie,selectedOption:re,options:e,labelVariant:"static",label:"Column"}),!y.length&&C(Er,{onChange:dt,selectedOption:Ct,options:dm,labelVariant:"static",label:"Aggregate"})]}),C(Hu,{children:C(Ie,{type:"button",variant:"primary",size:"small",isDisabled:!re.value||cn,className:He.disabled,onClick:()=>{y.length?x(`${Xr||Cn?`${re.value}`:`${re.value}`}`):x(`${Ct.value}(${Xr||Cn?`${re.value}`:Ca?`\`${re.value}\``:`"${re.value}"`})`),$(!1)},children:"Save"})})]})]})})]}),C(Er,{onChange:ce,options:LT,selectedOption:te,labelVariant:"static",label:"Row Limit"}),!y.length&&!!r.length&&z(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Ie,{type:"button",variant:"custom",onClick:()=>H(Le=>!Le),isDisabled:!p.value||!!y.length,children:ae?C(vz,{className:He.checkIcon}):C(FS,{})}),"Include Time"]}),z(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Ie,{type:"button",variant:"custom",onClick:()=>X(Le=>!Le),children:q?C(vz,{className:He.checkIcon}):C(FS,{})}),"Sort Descending"]}),C(Ie,{type:"button",variant:"primary",className:He.generateButton,isDisabled:Ei||Uu,onClick:()=>{var Le,ft,_r;o(""),s(!0),i([]),l(""),Ei&&s(!0),Sn({companyId:n,userInputs:{columns:y.map(Qe=>Xr||Cn?`${Qe.value} AS ${Qe.as} `:Ca?`\`${Qe.value}\` AS "${Qe.as}"`:`"${Qe.value}" AS "${Qe.as}"`),dimensions:Xr||Cn?D.map(Qe=>{var Pt,Xt;return{name:(Pt=e.find(Rr=>Rr.value===Qe))==null?void 0:Pt.value,as:(Xt=e.find(Rr=>Rr.value===Qe))==null?void 0:Xt.label}}):Ca?D.map(Qe=>{var Pt,Xt;return{name:`\`${(Pt=e.find(Rr=>Rr.value===Qe))==null?void 0:Pt.value}\``,as:(Xt=e.find(Rr=>Rr.value===Qe))==null?void 0:Xt.label}}):D.map(Qe=>{var Pt,Xt;return{name:`"${(Pt=e.find(Rr=>Rr.value===Qe))==null?void 0:Pt.value}"`,as:(Xt=e.find(Rr=>Rr.value===Qe))==null?void 0:Xt.label}}),metrics:f.map(Qe=>Xr?`${Qe.value} AS ${Qe.as}`:`${Qe.value} AS "${Qe.as}"`),sort:w,isSortDescending:q,filters:_,tableName:a,rowLimit:te.value,timeFilter:{filter:S,column:Xr||Cn?{name:p.value,as:(Le=e.find(Qe=>Qe.value===p.value))==null?void 0:Le.label}:Ca?{name:`\`${p.value}\``,as:(ft=e.find(Qe=>Qe.value===p.value))==null?void 0:ft.label}:{name:`"${p.value}"`,as:(_r=e.find(Qe=>Qe.value===p.value))==null?void 0:_r.label},isInclude:ae}}},{onSuccess(Qe){var oy,sy,ly;const Pt=(oy=Qe.generateDatasetMetrics)==null?void 0:oy.error,Xt=(sy=Qe.generateDatasetMetrics)==null?void 0:sy.result,Rr=(ly=Qe.generateDatasetMetrics)==null?void 0:ly.query;(Pt||Wu)&&(o(Pt.message||_m),s(!1),i([]),l("")),Xt&&Rr&&(o(""),s(!1),i(Array.isArray(Xt)?Xt:[]),l(Rr))}})},children:"Generate"})]})};var iy={container:"_container_7zhjn_1",header:"_header_7zhjn_5",enableGroupBy:"_enableGroupBy_7zhjn_8",enableGroupButton:"_enableGroupButton_7zhjn_11"};const pz=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setEnableGroupBy:c,setSelectedGroupBy:f})=>z("div",{className:iy.container,children:[z("div",{className:iy.header,children:["Data",c&&z(Ie,{type:"button",variant:"custom",onClick:()=>c(!u),className:`${u&&iy.enableGroupBy} ${iy.enableGroupButton}`,children:[u?"Disable":"Enable"," Drill down"]})]}),C(dz,{dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setQuery:l,setLoading:s,isEnableGroupBy:u,setSelectedGroupBy:f})]});var Ii={form:"_form_qtwuf_1",container:"_container_qtwuf_7",field:"_field_qtwuf_13",fieldLabel:"_fieldLabel_qtwuf_19",save:"_save_qtwuf_25",cancel:"_cancel_qtwuf_31",error:"_error_qtwuf_37"},YS={label:"_label_1vo1x_1",textarea:"_textarea_1vo1x_9",resizable:"_resizable_1vo1x_17"};const gz=({id:r,label:e,placeholder:t,rows:n,cols:a,resizable:i=!0,register:o,error:s,defaultValue:l,value:u,onFocus:c,onBlur:f,className:h})=>z("div",{className:h,children:[C("label",{htmlFor:r,className:YS.label,children:e}),C("textarea",{id:r,name:r,rows:n,cols:a,placeholder:t,className:Qn(YS.textarea,`${i?null:YS.resizable}`),defaultValue:l,...o,value:u,onFocus:c,onBlur:f}),s&&C(iS,{message:s.message})]});var Pi={group:"_group_13otg_1",button:"_button_13otg_9",checkbox:"_checkbox_13otg_17",switch:"_switch_13otg_25",enabled:"_enabled_13otg_43",notenabled:"_notenabled_13otg_59",label:"_label_13otg_75",labelActive:"_labelActive_13otg_83",labelInactive:"_labelInactive_13otg_91"};const yz=({enabled:r,onChange:e,label:t,className:n="",placeholder:a,labelClassName:i,defaultEnabled:o})=>z("div",{className:`${Pi.group} ${n}`,children:[t?C(de,{styleClass:"font-14",variant:"p",className:i,children:t}):null,C("input",{type:"checkbox",id:"toggle",checked:o,onChange:({target:s})=>e==null?void 0:e(s.checked),className:Pi.checkbox}),z("label",{htmlFor:"toggle",className:Pi.button,children:[C("span",{className:`${Pi.switch} ${r?Pi.enabled:Pi.notenabled}`}),a?C("span",{className:`
|
|
324
324
|
${Pi.label}
|
|
325
325
|
${r?Pi.labelActive:Pi.labelInactive}
|
|
326
|
-
`,children:a}):null]})]}),mz=({onSubmit:r,defaultValues:e,onCancel:t,isEmbedded:n,dashboardIds:a,onDashboardChange:i,companyId:o,error:s})=>{var g,y;const{register:l,handleSubmit:u}=bS(),[c,f]=B.useState((g=e==null?void 0:e.isLive)!=null?g:!1),h=u(m=>{r({...m,isLive:c})}),{data:v}=_$({companyId:o}),d=v==null?void 0:v.externalDashboards,p=(y=d==null?void 0:d.filter(m=>m.id===a[0]).map(m=>({value:m.id,label:m.name})))!=null?y:[];return z("form",{className:Ii.form,onSubmit:h,children:[z("div",{className:Ii.container,children:[C("div",{className:Ii.field,children:C(Ch,{label:"Dashboards",options:p,name:"dashboards",value:a,onChange:i})}),C(It,{name:"name",type:"text",placeholder:"What is the name of metric?",label:"Metric Name",register:l("name",{required:!0}),defaultValue:e==null?void 0:e.name}),C(It,{name:"name",type:"text",placeholder:"Unique Id to identify metric",label:"Metric ID",register:l("metricId",{required:!0,disabled:!!(e!=null&&e.metricId)}),defaultValue:e==null?void 0:e.metricId}),C(gz,{className:Ii.field,id:"desc",placeholder:"What is the name of metric?",label:"Description",rows:5,register:l("description"),defaultValue:e==null?void 0:e.description}),!n&&C(yz,{className:Ii.field,labelClassName:Ii.fieldLabel,enabled:c,onChange:f,label:"Publish Type",placeholder:c?"LIVE MODE":"TEST MODE",defaultEnabled:e==null?void 0:e.isLive})]}),!!s&&C(de,{variant:"p",styleClass:"font-14",className:Ii.error,children:s}),z(Hu,{children:[C(Ie,{type:"reset",variant:"secondary",className:Ii.cancel,onClick:t,size:"default",children:"Cancel"}),C(Ie,{type:"submit",variant:"primary",size:"small",className:Ii.save,isDisabled:!p.length||!a.length,children:"Save"})]})]})},Ohe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"})}),_z=({clientId:r,companyId:e,mode:t,externalDashboardId:n,variant:a="static"})=>{var Qa;const[i,o]=B.useState(!1),[s,l]=B.useState(""),[u,c]=B.useState(),[f,h]=B.useState([]),[v,d]=B.useState(""),[p,g]=B.useState(!1),[y,m]=B.useState([]),[_,b]=B.useState(),[w,x]=B.useState(!1),[S,T]=B.useState(!1),[D,M]=B.useState(!1),[A,I]=B.useState({value:"",label:""}),[P,O]=B.useState([]);B.useEffect(()=>{y.length&&b({column:y[0]})},[y]);const{mutate:E}=v$(),R=B.useMemo(()=>P.map(ct=>({value:ct.tableName,label:ct.tableName})),[P]),V=B.useMemo(()=>P.find(ct=>ct.tableName===A.value),[A.value,P]),$=B.useMemo(()=>(V==null?void 0:V.columns.map(({name:ct,as:cn})=>({value:ct,label:cn})))||[],[V]);B.useEffect(()=>{R.length&&I(R[0])},[R]);const U=B.useMemo(()=>(V==null?void 0:V.columns.filter(({datatype:ct})=>ym.includes(ct.toLowerCase())))||[],[V]),[Y,ae]=B.useState();B.useEffect(()=>{r&&e&&E({clientId:r,companyId:e},{onSuccess(ct){var ft;const cn=(ft=ct.companySubsetTableData)==null?void 0:ft.error,Le=ct.companySubsetTableData;cn?l(cn.message):(ae({id:Le==null?void 0:Le.companyIntegrationId,name:Le==null?void 0:Le.dbName}),O(Le==null?void 0:Le.tableList))}})},[r,e,E]);const[H,q]=B.useState("bar"),[X,Z]=B.useState(),[ne,se]=B.useState(),[K,ve]=B.useState(),[N,F]=B.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[G,re]=B.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[ie,te]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[ce,De]=B.useState({axis:"left",show:!1,position:"hidden"}),[vt,it]=B.useState({axis:"left"}),[Zt,Ct]=B.useState({show:!1}),[dt]=B.useState(),[pt,un]=B.useState(),[ar,ol]=B.useState(),[Sn,Ei]=B.useState(),[Wu,Zr]=B.useState(),{datasets:Uu,funnelData:sl,labels:Lh,sankeyData:ll,singleValueData:Ri}=vm({data:p?f:u,measure:Sn,sankeyValues:K,singleValue:ar,step:ne,xAxis:X,yAxisList:pt});B.useEffect(()=>{if(f.length&&p){const ct=aS(f[0]);Z(ct.stringKeys[0]),un(ct.numberKeys),se(ct.stringKeys[0]),Ei(ct.numberKeys[0])}},[f]),B.useEffect(()=>{if((u==null?void 0:u.length)&&!p){const ct=Object.keys(u[0]);Z(ct[0]),un(ct.slice(1))}},[u,p]);const{createExternalMetric:Xr,error:Cn}=j4({query:v,xAxis:X,backGroundColor:Zt,customSettings:ie,chartType:H,yAxisList:pt,step:ne,measure:Sn,sankeyValues:K,singleValue:ar,companyIntegrationId:Y==null?void 0:Y.id,integrationName:Y==null?void 0:Y.name,margins:N,legendSettings:G,labelSettings:ce,axisSettings:vt,metricQuery:dt,outputColumns:void 0,selectedColumns:void 0,clientId:r,isEmbedded:!0,companyId:e,mode:t,dashboardIds:[n],isEnableGroupBy:p,groupBy:_,selectedGroupBy:y}),{mutate:Ca}=T$();B.useEffect(()=>{A.value&&Ca({companyId:e,tableName:A.value,limit:10},{onSuccess(ct){var Le;const cn=(Le=ct.previewTable)==null?void 0:Le.data;Zr(cn?[cn]:void 0)}})},[A]),B.useEffect(()=>{(u==null?void 0:u.length)&&y.length&&xa(u,[y[0]],y,h)},[u]);const Tn=ct=>{if((_==null?void 0:_.column)&&ct&&ct!=="undefined"){if(y.lastIndexOf(_.column)!==y.length-1){const cn=y.indexOf(_.column),Le=_.column;b({column:y[cn+1],parentColumn:{column:_.column,value:ct}}),xa(u==null?void 0:u.filter(ft=>ft[Le]===ct),[y[cn+1]],y,h)}y.lastIndexOf(_.column)===y.length-1&&(b({column:y[0]}),xa(u,[y[0]],y,h))}else b({column:y[0]}),xa(u,[y[0]],y,h)};return B.useEffect(()=>{f.length===0&&p&&y.length&&(u==null?void 0:u.length)&&(b({column:y[0]}),xa(u,[y[0]],y,h))},[f,p,y]),z(Ce,{children:[C(Ie,{type:"button",variant:a==="floating"?"custom":"primary",size:"large",className:a==="floating"?ty.floatingCreateButton:"",onClick:()=>x(!0),children:a==="floating"?C(Ohe,{className:ty.floatingCreateButtonIcon}):"Create Metric"}),C(Di,{headerTitle:"Create Metric",isOpen:w,onClose:()=>x(!1),customHeader:C(tz,{Heading:"Create Metric",setShowMetricCreateModal:x,isDisableSqlBtn:!v,isDisableSaveBtn:!(Sn!=null&&Sn.length)&&!((Qa=pt==null?void 0:pt.filter(ct=>ct))!=null&&Qa.length)&&!ar,setShowSqlModal:T,setShowSaveMetricModal:M}),children:z("div",{className:ty["modal-container"],children:[C(rz,{setselectTable:I,selectTable:A,tableList:R,columnList:(V==null?void 0:V.columns)||[]}),C(pz,{dateTimeColumnList:U,columnList:$,database:(Y==null?void 0:Y.name)||"",companyId:e,tableName:A.value,setData:c,setError:l,setQuery:d,setLoading:o,isEnableGroupBy:p,setEnableGroupBy:g,setSelectedGroupBy:m}),C(hz,{data:p?f:u,error:s,isLoading:i,labels:Lh,funnelData:sl,chartType:H,datasets:Uu,setChartType:q,setXAxis:Z,setYAxisList:un,xAxis:X,setMeasure:Ei,setStep:se,step:ne,measure:Sn,setSankeyValues:ve,sankeyData:ll,previewTableDataList:Wu,singleValue:ar,setSingleValue:ol,singleValueData:Ri,setMargins:F,margins:N,legendSettings:G,setLegendSettings:re,labelSettings:ce,setLabelSettings:De,axisSettings:vt,setAxisSettings:it,updateGroup:Tn,isEnableGroupBy:p,backGroundColor:Zt,setBackGroundColor:Ct,customSettings:ie,setCustomSettings:te})]})}),C(Di,{headerTitle:"Generated Query",isOpen:S,onClose:()=>T(!1),children:C("div",{className:ty["query-modal"],children:v})}),C(Di,{isOpen:D,onClose:()=>M(!1),headerTitle:"Save To Dashboard",children:C(mz,{onCancel:()=>M(!1),onSubmit:Xr,dashboardIds:[n],onDashboardChange:()=>{},companyId:e,error:Cn,isEmbedded:!0})})]})};var ln={container:"_container_i4dx9_1",form:"_form_i4dx9_7",filterHeader:"_filterHeader_i4dx9_13",titleContent:"_titleContent_i4dx9_19",title:"_title_i4dx9_19",buttons:"_buttons_i4dx9_31",apply:"_apply_i4dx9_37",applyIcon:"_applyIcon_i4dx9_43",reset:"_reset_i4dx9_49",filterFields:"_filterFields_i4dx9_55",filters:"_filters_i4dx9_61",filterItem:"_filterItem_i4dx9_67",filterItemOperator:"_filterItemOperator_i4dx9_73",remove:"_remove_i4dx9_79"},Oi={button:"_button_6buzy_1",menu:"_menu_6buzy_7",menuContainer:"_menuContainer_6buzy_13",buttonText:"_buttonText_6buzy_19",buttonIcon:"_buttonIcon_6buzy_25",filterName:"_filterName_6buzy_31",filterDropdown:"_filterDropdown_6buzy_37"};const bz=({companyId:r,filter:e,onChange:t,selectedOption:n,autoSelected:a=!0,...i})=>{const[o,s]=B.useState([]),{fetchColumnValues:l}=Kg();return B.useEffect(()=>{l({companyId:r,tableName:e.tableName,columnName:e.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[e.tableName,e.columnName,r]),B.useEffect(()=>{o.length&&o[0]&&a&&t(o[0])},[o.length,o[0],a,e.columnName]),C(Er,{onChange:t,selectedOption:e.defaultValue?{label:e.defaultValue,value:e.defaultValue}:n,isDisabled:!!e.defaultValue,options:o,label:e.columnName,...i})},xz=pe.default.memo(({filter:r,companyId:e,autoSelected:t,onChange:n,selectedOptions:a,...i})=>{const[o,s]=B.useState([]),{fetchColumnValues:l}=Kg();return B.useEffect(()=>{l({companyId:e,tableName:r.tableName,columnName:r.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[r.tableName,r.columnName,e]),B.useEffect(()=>{o.length&&o[0]&&t&&n([o[0]])},[o.length,o[0],t,r.columnName]),C(Z4,{onChange:n,selectedOptions:r.defaultValue?[{label:r.defaultValue,value:r.defaultValue}]:a,isDisabled:!!r.defaultValue,options:o,label:r.columnName,...i})}),qS=r=>["IN","NOT IN"].includes(r),Ah=r=>["IS NULL","IS NOT NULL"].includes(r),wz=({filter:r,onChange:e,isResetted:t,companyId:n,tableName:a})=>{const[i,o]=B.useState({value:"",label:""}),[s,l]=B.useState({value:"",label:""}),[u,c]=B.useState([]),f=B.useMemo(()=>PT(r.dataType),[r.dataType]);return B.useEffect(()=>{!i.value||s.value!==""&&u.length||e({column:r.name,operator:i.value,value:Ah(i.value)?null:s.value||u.map(h=>h.value)})},[i,s.value,u]),B.useEffect(()=>{!t||(o({label:"",value:""}),l({label:"",value:""}),c([]))},[t]),C(Ce,{children:z(Th,{buttonClass:Oi.button,menuClass:Oi.menu,position:"bottom-left",menuContainerClass:Oi.menuContainer,button:z(Ce,{children:[z("span",{className:Oi.buttonText,children:[C(GS,{datatype:r.as||"unknown"}),r.name]}),C("span",{className:Oi.buttonIcon,children:C(ey,{})})]}),children:[C(de,{variant:"p",styleClass:"font-14",className:Oi.filterName,children:r.name}),C(Er,{label:"Operator",labelVariant:"static",selectedOption:i,onChange:h=>o(h),options:pv}),i.value&&!Ah(i.value)?C(Ce,{children:f==="boolean"?C(Er,{options:[{value:"true",label:"TRUE"},{value:"false",label:"FALSE"}],selectedOption:s,onChange:l,label:"Filter Value",labelVariant:"static",className:Oi.filterDropdown}):C(Ce,{children:qS(i.value)?C(xz,{selectedOptions:u,onChange:c,filter:{tableName:a,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:Oi.filterDropdown,autoSelected:!1}):C(bz,{selectedOption:s,onChange:l,filter:{tableName:a,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:Oi.filterDropdown,autoSelected:!1})})}):null]})})},Ehe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeWidth:2,d:"M20 8c-1.403-2.96-4.463-5-8-5a9 9 0 1 0 0 18a9 9 0 0 0 9-9m0-9v6h-6"})}),Rhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z"})}),Nhe=r=>qS(r.operator)?r.value.map(e=>["true","false"].includes(e)?e==="true":!Number.isNaN(e)&&Number(e)?Number(e):`'${e}'`):Ah(r.operator)?null:["true","false"].includes(r.value)?r.value==="true":!Number.isNaN(r.value)&&Number(r.value)?Number(r.value):`'${r.value}'`,Sz=({filters:r,onApply:e,companyId:t,renderAdditionalHeaderContent:n})=>{const[a,i]=B.useState([]),o=()=>{i([]),e({tableName:"",filters:[]})},s=l=>{l.preventDefault();const u=a.map(c=>{const f={column:c.column,operator:c.operator},h=Nhe({operator:c.operator,value:c.value});return h!=null&&Object.assign(f,{...f,value:h}),f});e({tableName:r[0].tableName,filters:u})};return C(Ce,{children:z("div",{className:ln.container,children:[z("form",{className:ln.form,onSubmit:s,onReset:o,children:[z("div",{className:ln.filterHeader,children:[z("div",{className:ln.titleContent,children:[C(de,{variant:"p",styleClass:"primary",className:ln.title,children:"Filters:"}),n?n():null]}),z("div",{className:ln.buttons,children:[z(Ie,{type:"submit",variant:"outlined",className:ln.apply,children:[C(VS,{className:ln.applyIcon})," Apply"]}),z(Ie,{type:"reset",variant:"secondary",className:ln.reset,children:[C(Ehe,{})," Reset Filters"]})]})]}),C("div",{className:ln.filterFields,children:r[0].columns.map(l=>C(wz,{tableName:r[0].tableName,filter:l,isResetted:!a.find(u=>u.column===l.name),onChange:u=>i(c=>{const f=c.findIndex(v=>v.column===u.column);if(f===-1)return[...c,u];const h=[...c];return h[f]=u,h}),companyId:t},l.name))})]}),a.length?C("ul",{className:ln.filters,children:a.map(l=>{var u;return z("li",{className:ln.filterItem,children:[l.column,C("span",{className:ln.filterItemOperator,children:((u=pv.find(c=>c.value===l.operator))==null?void 0:u.label)||""}),Ah(l.operator)?null:C(Ce,{children:Array.isArray(l.value)?`[${l.value.map(c=>c).join(",")}]`:l.value}),C(Ie,{type:"button",variant:"custom",className:ln.remove,onClick:()=>i(c=>c.filter(f=>f.column!==l.column)),children:C(Rhe,{})})]},l.column)})}):null]})})},khe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m16.95 6l-3.57 4.55l1.43 1.43c1.03-1.31 4.98-6.37 4.98-6.37A.998.998 0 0 0 19 4H6.83l2 2h8.12zM2.81 2.81L1.39 4.22L10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78l1.41-1.41L2.81 2.81z"})}),Bhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,children:[C("path",{d:"M3 5h4m14 0H11m-8 7h12m6 0h-2M3 19h2m16 0H9"}),C("circle",{cx:9,cy:5,r:2}),C("circle",{cx:17,cy:12,r:2}),C("circle",{cx:7,cy:19,r:2})]})}),Cz=pe.default.memo(({token:r,options:e,theme:t})=>{var u,c;const{data:n,isLoading:a}=U4(r),[i,o]=B.useState(!1),[s,l]=B.useState({tableName:"",filters:[]});return C(Ce,{children:z("div",{className:Qr["embedDashboard-container"],children:[((u=n.externalDashboard)==null?void 0:u.id)&&!a&&z(Ce,{children:[z("div",{className:(e==null?void 0:e.headerVariant)==="floating"?Qr["embedDashboard-header-floating"]:Qr["embedDashboard-header-static"],children:[(e==null?void 0:e.headerVariant)==="floating"&&C("span",{className:Qr.floatingButton,children:C(Bhe,{className:Qr.floatingButtonIcon})}),z("div",{className:(e==null?void 0:e.headerVariant)==="floating"?Qr.floatingContainer:Qr.staticContainer,children:[n.externalDashboard.filters.length?C(Ie,{type:"button",variant:"custom",size:"large",className:(e==null?void 0:e.headerVariant)==="floating"?Qr.floatingFilterButton:Qr.filter,onClick:()=>o(f=>!f),children:i?C(khe,{className:Qr.floatingFilterButtonIcon}):C(VS,{className:Qr.floatingFilterButtonIcon})}):null,!(e!=null&&e.disableMetricCreation)&&n.isAllowedToCreateMetrics&&C(_z,{clientId:n.clientId,companyId:n.companyId,mode:n.mode,externalDashboardId:n.externalDashboard.id,variant:e==null?void 0:e.headerVariant})]})]}),z("div",{className:Qr["embedDashboard-wrapper"],children:[n.externalDashboard.filters.length&&i?C(Sz,{companyId:n.companyId,filters:n.externalDashboard.filters,onApply:f=>l(f)}):null,C(ez,{client:n.clientId,isLiveMode:n.mode,externalDashboardMetrics:n.externalDashboardMetrics,isMetricListLoading:a,globalFilters:s,breakpoint:t==null?void 0:t.breakpoint,layoutCols:t==null?void 0:t.metricLayoutCols,chartColors:e==null?void 0:e.chartColors,params:Array.isArray(n.rlsSettings)?n.rlsSettings:[],companyTenancyType:n.companyTenancyType})]})]}),a&&C("div",{className:Qr["alt-container"],children:C(Bu,{style:{width:"50px",height:"50px",color:"blue"}})}),!a&&!((c=n.externalDashboard)!=null&&c.id)&&C("div",{className:Qr["alt-container"],children:"Invalid token or Dashboard id"})]})})});var Tz={container:"_container_7vfcn_1",windowIcon:"_windowIcon_7vfcn_7"};const zhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,children:[C("path",{d:"M15 21H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10"}),C("path",{strokeLinejoin:"round",d:"M2 7h20M5 5.01l.01-.011M8 5.01l.01-.011M11 5.01l.01-.011M18 22.243l2.121-2.122m0 0L22.243 18m-2.122 2.121L18 18m2.121 2.121l2.122 2.122"})]})}),Dz=()=>z("div",{role:"alert",className:Tz.container,children:[C(zhe,{className:Tz.windowIcon}),C(de,{variant:"p",styleClass:"font-20",children:"Something went wrong!"}),C(Ie,{variant:"primary",size:"large",type:"button",onClick:()=>location.reload(),children:"Try again"})]}),Fhe=new s3,Mz=({children:r})=>C(Hz,{FallbackComponent:Dz,children:C(v3,{client:Fhe,children:r})}),Vhe=pe.default.memo(({token:r,options:e,theme:t})=>(B.useEffect(()=>{!t||!Object.keys(t).length||MT(t)},[t]),C(Mz,{children:C(Cz,{token:r,options:e})})));var $he=Object.freeze(Object.defineProperty({__proto__:null,SOMETHING_WENT_WRONG:_m,CHART_TYPES:Mt,STATUS_TAB:N$,STREAM_TAB:k$,CLIENT_NAME_VAR:B$,RLS_CONDITIONS:z$,CHART_TAB:mv,TABLE_TAB:oc,QUERY_TAB:F$,INPUT_TABLE:_v,OUTPUT_TABLE:sc,DOUGHNUT:bm,PIE:xm,SANKEY:NT,BOXPLOT:kT,TABLE:V$,GENERAL:lc,CONFIG:bv,DESTINATIONS:wm,operatorList:pv,RowLimitList:LT,AggregateList:dm,NUMBER_TYPES:pm,STRING_TYPES:gm,DATE_TYPES:ym,ARRAY_TYPES:IT,BOOLEAN_TYPES:mm},Symbol.toStringTag,{value:"Module"})),Hhe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Ghe=Object.freeze(Object.defineProperty({__proto__:null,Button:Ie,ChartConfig:iz,ChartModalOptions:oz,SelectField:ry,DataType:GS,Error:iS,ErrorFallback:Dz,ExternalMetricForm:mz,FilterDropDown:bz,MultiFilterDropdown:xz,FloatingDropDown:Er,MultiFloatingDropDown:Z4,FullScreenChart:HS,isInFilterOperator:qS,isNullFilterOperator:Ah,FilterField:wz,GlobalFilters:Sz,Tooltip:az,InfoTooltip:Mi,InputField:It,CsvDownloadButton:RT,MetricChart:Ng,EmbeddedMetricCreation:_z,MetricForm:dz,ConstructMetric:pz,Dataset:rz,Header:tz,MetricOutput:hz,ChartTab:lz,TableTab:fz,MetricFilters:$S,MultipleTimeGrain:q4,GridLayout:J4,ExternalMetricList:ez,MetricCard:Q4,SingleValueCard:K4,MetricTable:uz,Modal:Di,ModalFooter:Hu,PopoverMenu:Th,SearchTab:Sh,Select:Yt,HookSelect:G4,SelectWithSubValue:W4,DropDown:Efe,MultiSelect:Ch,HookMultiSelect:Rfe,Tab:US,Table:cz,Text:de,TextAreaField:gz,TimeGrainField:kS,ToggleButton:yz},Symbol.toStringTag,{value:"Module"}));xr.Dashboard=Vhe,xr.EmbeddedDashboard=Cz,xr.PluginProvider=Mz,xr.Ui=Ghe,xr.consts=$he,xr.helpers=Hfe,xr.hooks=Bfe,xr.types=Hhe,xr.utils=M$,Object.defineProperties(xr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
326
|
+
`,children:a}):null]})]}),mz=({onSubmit:r,defaultValues:e,onCancel:t,isEmbedded:n=!0,dashboardIds:a,onDashboardChange:i,companyId:o,error:s})=>{var g,y,m;const{register:l,handleSubmit:u}=bS(),[c,f]=B.useState((g=e==null?void 0:e.isLive)!=null?g:!1),h=u(_=>{r({..._,isLive:c})}),{data:v}=_$({companyId:o}),d=v==null?void 0:v.externalDashboards,p=n?(y=d==null?void 0:d.filter(_=>_.id===a[0]).map(_=>({value:_.id,label:_.name})))!=null?y:[]:(m=d==null?void 0:d.map(_=>({value:_.id,label:_.name})))!=null?m:[];return z("form",{className:Ii.form,onSubmit:h,children:[z("div",{className:Ii.container,children:[C("div",{className:Ii.field,children:C(Ch,{label:"Dashboards",options:p,name:"dashboards",value:a,onChange:i})}),C(It,{name:"name",type:"text",placeholder:"What is the name of metric?",label:"Metric Name",register:l("name",{required:!0}),defaultValue:e==null?void 0:e.name}),C(It,{name:"name",type:"text",placeholder:"Unique Id to identify metric",label:"Metric ID",register:l("metricId",{required:!0,disabled:!!(e!=null&&e.metricId)}),defaultValue:e==null?void 0:e.metricId}),C(gz,{className:Ii.field,id:"desc",placeholder:"What is the name of metric?",label:"Description",rows:5,register:l("description"),defaultValue:e==null?void 0:e.description}),!n&&C(yz,{className:Ii.field,labelClassName:Ii.fieldLabel,enabled:c,onChange:f,label:"Publish Type",placeholder:c?"LIVE MODE":"TEST MODE",defaultEnabled:e==null?void 0:e.isLive})]}),!!s&&C(de,{variant:"p",styleClass:"font-14",className:Ii.error,children:s}),z(Hu,{children:[C(Ie,{type:"reset",variant:"secondary",className:Ii.cancel,onClick:t,size:"default",children:"Cancel"}),C(Ie,{type:"submit",variant:"primary",size:"small",className:Ii.save,isDisabled:!p.length||!a.length,children:"Save"})]})]})},Ohe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"})}),_z=({clientId:r,companyId:e,mode:t,externalDashboardId:n,variant:a="static"})=>{var Qa;const[i,o]=B.useState(!1),[s,l]=B.useState(""),[u,c]=B.useState(),[f,h]=B.useState([]),[v,d]=B.useState(""),[p,g]=B.useState(!1),[y,m]=B.useState([]),[_,b]=B.useState(),[w,x]=B.useState(!1),[S,T]=B.useState(!1),[D,M]=B.useState(!1),[A,I]=B.useState({value:"",label:""}),[P,O]=B.useState([]);B.useEffect(()=>{y.length&&b({column:y[0]})},[y]);const{mutate:E}=v$(),R=B.useMemo(()=>P.map(ct=>({value:ct.tableName,label:ct.tableName})),[P]),V=B.useMemo(()=>P.find(ct=>ct.tableName===A.value),[A.value,P]),$=B.useMemo(()=>(V==null?void 0:V.columns.map(({name:ct,as:cn})=>({value:ct,label:cn})))||[],[V]);B.useEffect(()=>{R.length&&I(R[0])},[R]);const U=B.useMemo(()=>(V==null?void 0:V.columns.filter(({datatype:ct})=>ym.includes(ct.toLowerCase())))||[],[V]),[Y,ae]=B.useState();B.useEffect(()=>{r&&e&&E({clientId:r,companyId:e},{onSuccess(ct){var ft;const cn=(ft=ct.companySubsetTableData)==null?void 0:ft.error,Le=ct.companySubsetTableData;cn?l(cn.message):(ae({id:Le==null?void 0:Le.companyIntegrationId,name:Le==null?void 0:Le.dbName}),O(Le==null?void 0:Le.tableList))}})},[r,e,E]);const[H,q]=B.useState("bar"),[X,Z]=B.useState(),[ne,se]=B.useState(),[K,ve]=B.useState(),[N,F]=B.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[G,re]=B.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[ie,te]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[ce,De]=B.useState({axis:"left",show:!1,position:"hidden"}),[vt,it]=B.useState({axis:"left"}),[Zt,Ct]=B.useState({show:!1}),[dt]=B.useState(),[pt,un]=B.useState(),[ar,ol]=B.useState(),[Sn,Ei]=B.useState(),[Wu,Zr]=B.useState(),{datasets:Uu,funnelData:sl,labels:Lh,sankeyData:ll,singleValueData:Ri}=vm({data:p?f:u,measure:Sn,sankeyValues:K,singleValue:ar,step:ne,xAxis:X,yAxisList:pt});B.useEffect(()=>{if(f.length&&p){const ct=aS(f[0]);Z(ct.stringKeys[0]),un(ct.numberKeys),se(ct.stringKeys[0]),Ei(ct.numberKeys[0])}},[f]),B.useEffect(()=>{if((u==null?void 0:u.length)&&!p){const ct=Object.keys(u[0]);Z(ct[0]),un(ct.slice(1))}},[u,p]);const{createExternalMetric:Xr,error:Cn}=j4({query:v,xAxis:X,backGroundColor:Zt,customSettings:ie,chartType:H,yAxisList:pt,step:ne,measure:Sn,sankeyValues:K,singleValue:ar,companyIntegrationId:Y==null?void 0:Y.id,integrationName:Y==null?void 0:Y.name,margins:N,legendSettings:G,labelSettings:ce,axisSettings:vt,metricQuery:dt,outputColumns:void 0,selectedColumns:void 0,clientId:r,isEmbedded:!0,companyId:e,mode:t,dashboardIds:[n],isEnableGroupBy:p,groupBy:_,selectedGroupBy:y}),{mutate:Ca}=T$();B.useEffect(()=>{A.value&&Ca({companyId:e,tableName:A.value,limit:10},{onSuccess(ct){var Le;const cn=(Le=ct.previewTable)==null?void 0:Le.data;Zr(cn?[cn]:void 0)}})},[A]),B.useEffect(()=>{(u==null?void 0:u.length)&&y.length&&xa(u,[y[0]],y,h)},[u]);const Tn=ct=>{if((_==null?void 0:_.column)&&ct&&ct!=="undefined"){if(y.lastIndexOf(_.column)!==y.length-1){const cn=y.indexOf(_.column),Le=_.column;b({column:y[cn+1],parentColumn:{column:_.column,value:ct}}),xa(u==null?void 0:u.filter(ft=>ft[Le]===ct),[y[cn+1]],y,h)}y.lastIndexOf(_.column)===y.length-1&&(b({column:y[0]}),xa(u,[y[0]],y,h))}else b({column:y[0]}),xa(u,[y[0]],y,h)};return B.useEffect(()=>{f.length===0&&p&&y.length&&(u==null?void 0:u.length)&&(b({column:y[0]}),xa(u,[y[0]],y,h))},[f,p,y]),z(Ce,{children:[C(Ie,{type:"button",variant:a==="floating"?"custom":"primary",size:"large",className:a==="floating"?ty.floatingCreateButton:"",onClick:()=>x(!0),children:a==="floating"?C(Ohe,{className:ty.floatingCreateButtonIcon}):"Create Metric"}),C(Di,{headerTitle:"Create Metric",isOpen:w,onClose:()=>x(!1),customHeader:C(tz,{Heading:"Create Metric",setShowMetricCreateModal:x,isDisableSqlBtn:!v,isDisableSaveBtn:!(Sn!=null&&Sn.length)&&!((Qa=pt==null?void 0:pt.filter(ct=>ct))!=null&&Qa.length)&&!ar,setShowSqlModal:T,setShowSaveMetricModal:M}),children:z("div",{className:ty["modal-container"],children:[C(rz,{setselectTable:I,selectTable:A,tableList:R,columnList:(V==null?void 0:V.columns)||[]}),C(pz,{dateTimeColumnList:U,columnList:$,database:(Y==null?void 0:Y.name)||"",companyId:e,tableName:A.value,setData:c,setError:l,setQuery:d,setLoading:o,isEnableGroupBy:p,setEnableGroupBy:g,setSelectedGroupBy:m}),C(hz,{data:p?f:u,error:s,isLoading:i,labels:Lh,funnelData:sl,chartType:H,datasets:Uu,setChartType:q,setXAxis:Z,setYAxisList:un,xAxis:X,setMeasure:Ei,setStep:se,step:ne,measure:Sn,setSankeyValues:ve,sankeyData:ll,previewTableDataList:Wu,singleValue:ar,setSingleValue:ol,singleValueData:Ri,setMargins:F,margins:N,legendSettings:G,setLegendSettings:re,labelSettings:ce,setLabelSettings:De,axisSettings:vt,setAxisSettings:it,updateGroup:Tn,isEnableGroupBy:p,backGroundColor:Zt,setBackGroundColor:Ct,customSettings:ie,setCustomSettings:te})]})}),C(Di,{headerTitle:"Generated Query",isOpen:S,onClose:()=>T(!1),children:C("div",{className:ty["query-modal"],children:v})}),C(Di,{isOpen:D,onClose:()=>M(!1),headerTitle:"Save To Dashboard",children:C(mz,{onCancel:()=>M(!1),onSubmit:Xr,dashboardIds:[n],onDashboardChange:()=>{},companyId:e,error:Cn,isEmbedded:!0})})]})};var ln={container:"_container_i4dx9_1",form:"_form_i4dx9_7",filterHeader:"_filterHeader_i4dx9_13",titleContent:"_titleContent_i4dx9_19",title:"_title_i4dx9_19",buttons:"_buttons_i4dx9_31",apply:"_apply_i4dx9_37",applyIcon:"_applyIcon_i4dx9_43",reset:"_reset_i4dx9_49",filterFields:"_filterFields_i4dx9_55",filters:"_filters_i4dx9_61",filterItem:"_filterItem_i4dx9_67",filterItemOperator:"_filterItemOperator_i4dx9_73",remove:"_remove_i4dx9_79"},Oi={button:"_button_6buzy_1",menu:"_menu_6buzy_7",menuContainer:"_menuContainer_6buzy_13",buttonText:"_buttonText_6buzy_19",buttonIcon:"_buttonIcon_6buzy_25",filterName:"_filterName_6buzy_31",filterDropdown:"_filterDropdown_6buzy_37"};const bz=({companyId:r,filter:e,onChange:t,selectedOption:n,autoSelected:a=!0,...i})=>{const[o,s]=B.useState([]),{fetchColumnValues:l}=Kg();return B.useEffect(()=>{l({companyId:r,tableName:e.tableName,columnName:e.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[e.tableName,e.columnName,r]),B.useEffect(()=>{o.length&&o[0]&&a&&t(o[0])},[o.length,o[0],a,e.columnName]),C(Er,{onChange:t,selectedOption:e.defaultValue?{label:e.defaultValue,value:e.defaultValue}:n,isDisabled:!!e.defaultValue,options:o,label:e.columnName,...i})},xz=pe.default.memo(({filter:r,companyId:e,autoSelected:t,onChange:n,selectedOptions:a,...i})=>{const[o,s]=B.useState([]),{fetchColumnValues:l}=Kg();return B.useEffect(()=>{l({companyId:e,tableName:r.tableName,columnName:r.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[r.tableName,r.columnName,e]),B.useEffect(()=>{o.length&&o[0]&&t&&n([o[0]])},[o.length,o[0],t,r.columnName]),C(Z4,{onChange:n,selectedOptions:r.defaultValue?[{label:r.defaultValue,value:r.defaultValue}]:a,isDisabled:!!r.defaultValue,options:o,label:r.columnName,...i})}),qS=r=>["IN","NOT IN"].includes(r),Ah=r=>["IS NULL","IS NOT NULL"].includes(r),wz=({filter:r,onChange:e,isResetted:t,companyId:n,tableName:a})=>{const[i,o]=B.useState({value:"",label:""}),[s,l]=B.useState({value:"",label:""}),[u,c]=B.useState([]),f=B.useMemo(()=>PT(r.dataType),[r.dataType]);return B.useEffect(()=>{!i.value||s.value!==""&&u.length||e({column:r.name,operator:i.value,value:Ah(i.value)?null:s.value||u.map(h=>h.value)})},[i,s.value,u]),B.useEffect(()=>{!t||(o({label:"",value:""}),l({label:"",value:""}),c([]))},[t]),C(Ce,{children:z(Th,{buttonClass:Oi.button,menuClass:Oi.menu,position:"bottom-left",menuContainerClass:Oi.menuContainer,button:z(Ce,{children:[z("span",{className:Oi.buttonText,children:[C(GS,{datatype:r.as||"unknown"}),r.name]}),C("span",{className:Oi.buttonIcon,children:C(ey,{})})]}),children:[C(de,{variant:"p",styleClass:"font-14",className:Oi.filterName,children:r.name}),C(Er,{label:"Operator",labelVariant:"static",selectedOption:i,onChange:h=>o(h),options:pv}),i.value&&!Ah(i.value)?C(Ce,{children:f==="boolean"?C(Er,{options:[{value:"true",label:"TRUE"},{value:"false",label:"FALSE"}],selectedOption:s,onChange:l,label:"Filter Value",labelVariant:"static",className:Oi.filterDropdown}):C(Ce,{children:qS(i.value)?C(xz,{selectedOptions:u,onChange:c,filter:{tableName:a,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:Oi.filterDropdown,autoSelected:!1}):C(bz,{selectedOption:s,onChange:l,filter:{tableName:a,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:Oi.filterDropdown,autoSelected:!1})})}):null]})})},Ehe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeWidth:2,d:"M20 8c-1.403-2.96-4.463-5-8-5a9 9 0 1 0 0 18a9 9 0 0 0 9-9m0-9v6h-6"})}),Rhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z"})}),Nhe=r=>qS(r.operator)?r.value.map(e=>["true","false"].includes(e)?e==="true":!Number.isNaN(e)&&Number(e)?Number(e):`'${e}'`):Ah(r.operator)?null:["true","false"].includes(r.value)?r.value==="true":!Number.isNaN(r.value)&&Number(r.value)?Number(r.value):`'${r.value}'`,Sz=({filters:r,onApply:e,companyId:t,renderAdditionalHeaderContent:n})=>{const[a,i]=B.useState([]),o=()=>{i([]),e({tableName:"",filters:[]})},s=l=>{l.preventDefault();const u=a.map(c=>{const f={column:c.column,operator:c.operator},h=Nhe({operator:c.operator,value:c.value});return h!=null&&Object.assign(f,{...f,value:h}),f});e({tableName:r[0].tableName,filters:u})};return C(Ce,{children:z("div",{className:ln.container,children:[z("form",{className:ln.form,onSubmit:s,onReset:o,children:[z("div",{className:ln.filterHeader,children:[z("div",{className:ln.titleContent,children:[C(de,{variant:"p",styleClass:"primary",className:ln.title,children:"Filters:"}),n?n():null]}),z("div",{className:ln.buttons,children:[z(Ie,{type:"submit",variant:"outlined",className:ln.apply,children:[C(VS,{className:ln.applyIcon})," Apply"]}),z(Ie,{type:"reset",variant:"secondary",className:ln.reset,children:[C(Ehe,{})," Reset Filters"]})]})]}),C("div",{className:ln.filterFields,children:r[0].columns.map(l=>C(wz,{tableName:r[0].tableName,filter:l,isResetted:!a.find(u=>u.column===l.name),onChange:u=>i(c=>{const f=c.findIndex(v=>v.column===u.column);if(f===-1)return[...c,u];const h=[...c];return h[f]=u,h}),companyId:t},l.name))})]}),a.length?C("ul",{className:ln.filters,children:a.map(l=>{var u;return z("li",{className:ln.filterItem,children:[l.column,C("span",{className:ln.filterItemOperator,children:((u=pv.find(c=>c.value===l.operator))==null?void 0:u.label)||""}),Ah(l.operator)?null:C(Ce,{children:Array.isArray(l.value)?`[${l.value.map(c=>c).join(",")}]`:l.value}),C(Ie,{type:"button",variant:"custom",className:ln.remove,onClick:()=>i(c=>c.filter(f=>f.column!==l.column)),children:C(Rhe,{})})]},l.column)})}):null]})})},khe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m16.95 6l-3.57 4.55l1.43 1.43c1.03-1.31 4.98-6.37 4.98-6.37A.998.998 0 0 0 19 4H6.83l2 2h8.12zM2.81 2.81L1.39 4.22L10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78l1.41-1.41L2.81 2.81z"})}),Bhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,children:[C("path",{d:"M3 5h4m14 0H11m-8 7h12m6 0h-2M3 19h2m16 0H9"}),C("circle",{cx:9,cy:5,r:2}),C("circle",{cx:17,cy:12,r:2}),C("circle",{cx:7,cy:19,r:2})]})}),Cz=pe.default.memo(({token:r,options:e,theme:t})=>{var u,c;const{data:n,isLoading:a}=U4(r),[i,o]=B.useState(!1),[s,l]=B.useState({tableName:"",filters:[]});return C(Ce,{children:z("div",{className:Qr["embedDashboard-container"],children:[((u=n.externalDashboard)==null?void 0:u.id)&&!a&&z(Ce,{children:[z("div",{className:(e==null?void 0:e.headerVariant)==="floating"?Qr["embedDashboard-header-floating"]:Qr["embedDashboard-header-static"],children:[(e==null?void 0:e.headerVariant)==="floating"&&C("span",{className:Qr.floatingButton,children:C(Bhe,{className:Qr.floatingButtonIcon})}),z("div",{className:(e==null?void 0:e.headerVariant)==="floating"?Qr.floatingContainer:Qr.staticContainer,children:[n.externalDashboard.filters.length?C(Ie,{type:"button",variant:"custom",size:"large",className:(e==null?void 0:e.headerVariant)==="floating"?Qr.floatingFilterButton:Qr.filter,onClick:()=>o(f=>!f),children:i?C(khe,{className:Qr.floatingFilterButtonIcon}):C(VS,{className:Qr.floatingFilterButtonIcon})}):null,!(e!=null&&e.disableMetricCreation)&&n.isAllowedToCreateMetrics&&C(_z,{clientId:n.clientId,companyId:n.companyId,mode:n.mode,externalDashboardId:n.externalDashboard.id,variant:e==null?void 0:e.headerVariant})]})]}),z("div",{className:Qr["embedDashboard-wrapper"],children:[n.externalDashboard.filters.length&&i?C(Sz,{companyId:n.companyId,filters:n.externalDashboard.filters,onApply:f=>l(f)}):null,C(ez,{client:n.clientId,isLiveMode:n.mode,externalDashboardMetrics:n.externalDashboardMetrics,isMetricListLoading:a,globalFilters:s,breakpoint:t==null?void 0:t.breakpoint,layoutCols:t==null?void 0:t.metricLayoutCols,chartColors:e==null?void 0:e.chartColors,params:Array.isArray(n.rlsSettings)?n.rlsSettings:[],companyTenancyType:n.companyTenancyType})]})]}),a&&C("div",{className:Qr["alt-container"],children:C(Bu,{style:{width:"50px",height:"50px",color:"blue"}})}),!a&&!((c=n.externalDashboard)!=null&&c.id)&&C("div",{className:Qr["alt-container"],children:"Invalid token or Dashboard id"})]})})});var Tz={container:"_container_7vfcn_1",windowIcon:"_windowIcon_7vfcn_7"};const zhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,children:[C("path",{d:"M15 21H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10"}),C("path",{strokeLinejoin:"round",d:"M2 7h20M5 5.01l.01-.011M8 5.01l.01-.011M11 5.01l.01-.011M18 22.243l2.121-2.122m0 0L22.243 18m-2.122 2.121L18 18m2.121 2.121l2.122 2.122"})]})}),Dz=()=>z("div",{role:"alert",className:Tz.container,children:[C(zhe,{className:Tz.windowIcon}),C(de,{variant:"p",styleClass:"font-20",children:"Something went wrong!"}),C(Ie,{variant:"primary",size:"large",type:"button",onClick:()=>location.reload(),children:"Try again"})]}),Fhe=new s3,Mz=({children:r})=>C(Hz,{FallbackComponent:Dz,children:C(v3,{client:Fhe,children:r})}),Vhe=pe.default.memo(({token:r,options:e,theme:t})=>(B.useEffect(()=>{!t||!Object.keys(t).length||MT(t)},[t]),C(Mz,{children:C(Cz,{token:r,options:e})})));var $he=Object.freeze(Object.defineProperty({__proto__:null,SOMETHING_WENT_WRONG:_m,CHART_TYPES:Mt,STATUS_TAB:N$,STREAM_TAB:k$,CLIENT_NAME_VAR:B$,RLS_CONDITIONS:z$,CHART_TAB:mv,TABLE_TAB:oc,QUERY_TAB:F$,INPUT_TABLE:_v,OUTPUT_TABLE:sc,DOUGHNUT:bm,PIE:xm,SANKEY:NT,BOXPLOT:kT,TABLE:V$,GENERAL:lc,CONFIG:bv,DESTINATIONS:wm,operatorList:pv,RowLimitList:LT,AggregateList:dm,NUMBER_TYPES:pm,STRING_TYPES:gm,DATE_TYPES:ym,ARRAY_TYPES:IT,BOOLEAN_TYPES:mm},Symbol.toStringTag,{value:"Module"})),Hhe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Ghe=Object.freeze(Object.defineProperty({__proto__:null,Button:Ie,ChartConfig:iz,ChartModalOptions:oz,SelectField:ry,DataType:GS,Error:iS,ErrorFallback:Dz,ExternalMetricForm:mz,FilterDropDown:bz,MultiFilterDropdown:xz,FloatingDropDown:Er,MultiFloatingDropDown:Z4,FullScreenChart:HS,isInFilterOperator:qS,isNullFilterOperator:Ah,FilterField:wz,GlobalFilters:Sz,Tooltip:az,InfoTooltip:Mi,InputField:It,CsvDownloadButton:RT,MetricChart:Ng,EmbeddedMetricCreation:_z,MetricForm:dz,ConstructMetric:pz,Dataset:rz,Header:tz,MetricOutput:hz,ChartTab:lz,TableTab:fz,MetricFilters:$S,MultipleTimeGrain:q4,GridLayout:J4,ExternalMetricList:ez,MetricCard:Q4,SingleValueCard:K4,MetricTable:uz,Modal:Di,ModalFooter:Hu,PopoverMenu:Th,SearchTab:Sh,Select:Yt,HookSelect:G4,SelectWithSubValue:W4,DropDown:Efe,MultiSelect:Ch,HookMultiSelect:Rfe,Tab:US,Table:cz,Text:de,TextAreaField:gz,TimeGrainField:kS,ToggleButton:yz},Symbol.toStringTag,{value:"Module"}));xr.Dashboard=Vhe,xr.EmbeddedDashboard=Cz,xr.PluginProvider=Mz,xr.Ui=Ghe,xr.consts=$he,xr.helpers=Hfe,xr.hooks=Bfe,xr.types=Hhe,xr.utils=M$,Object.defineProperties(xr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|