@sisense/sdk-ui-vue 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -666,7 +666,7 @@ ${i}`)})}destroy(){super.destroy(),this.onMessageCancel&&(this.onMessageCancel()
666
666
  `)}}),T7=(e,t,n,r,o,i,a)=>{var s,l;const c=[],d=[];r.seriesValues.forEach(I=>{d.push(I),c.push(I)}),r.rangeValues.forEach(([I,N])=>{d.push(N),c.push(I)});const h=st(We({},r),{y:d,seriesToColorMap:r.seriesToColorMap}),u=zS(st(We({},e),{type:"cartesian"}),t,n,h,o,i,a),w={};u.options.series.forEach(I=>{w[I.name]=I});const y=st(We({},r),{y:c,seriesToColorMap:r.seriesToColorMap}),p=zS(st(We({},e.seriesOther),{type:"cartesian"}),t,n,y,o,i,a),k={};p.options.series.forEach(I=>{k[I.name]=I});let j=1/0,F=-1/0,U=-1,H=0;if(u.options.series.forEach((I,N)=>{if(r.breakBy.length===0&&N<r.seriesValues.length)_m(I.name)&&(U=cqe(I,k,w)),I.zIndex=1,I.data.forEach(W=>{W.y&&W.y<j&&(j=W.y),W.y&&W.y>F&&(F=W.y)});else{const W=k[I.name].data;I.yAxis=0;let A=0;r.breakBy.length===0&&(A=N-r.seriesValues.length);const C=r.rangeValues[A],v=C[0].column.name.indexOf("_")+1,T=C[1].column.name.substring(v),S=C[0].column.name.substring(v);I.type="arearange",_m(I.name)&&uqe(I,k),H=Math.max(I.data.length,H),I.data=I.data.map((D,G)=>{const q=st(We({},D),{low:W[G].y,high:D.y,y:void 0,upperPointName:T,lowerPointName:S});return q.low&&q.low<j&&(j=q.low),q.high&&q.high>F&&(F=q.high),q}),_m(I.name)&&dqe(I,k)}}),u.options.xAxis||(u.options.xAxis=[]),U>0&&pqe(u.options.xAxis,U,H),t==="arearange"&&n.lineType==="smooth"){const I="areasplinerange";u.options.chart.type=I,(s=u.options.navigator)!=null&&s.series&&(u.options.navigator.series.type=I)}t==="arearange"&&(u.options.tooltip=pKe(!1,r,o));const[R]=(l=u.options.yAxis)!=null?l:[],z=st(We({},R),{min:j,max:F});return u.options.yAxis=[z],u},woe=(e,t)=>{const n=()=>st(We({},e),{y:[]}),r=n(),o=n(),i=1,a=0;e.seriesValues.forEach(c=>{r.y.push(c),o.y.push(c)}),e.rangeValues.forEach(c=>{const d=c[i],h=c[a];r.y.push(d),o.y.push(h)});const s=Xy(r,t),l=Xy(o,t);return st(We({},s),{type:"range",seriesOther:l})},_oe=e=>e.rangeValues?!1:e.y.some(t=>_m(Bo(t))),Soe=e=>{const t=e.y.filter(o=>_m(Bo(o))).map(o=>{const i=st(We({},o),{column:Qm(o.column,{title:o.column.title&&RS(o.column.title),name:`${o.column.name}_upper`})});return[st(We({},o),{column:Qm(o.column,{title:o.column.title&&RS(o.column.title),name:`${o.column.name}_lower`})}),i]}),n=t.concat(e.y).flat(),r=e.y;return st(We({},e),{rangeValues:t,seriesValues:r,y:n})},hKe=(e,t)=>{const n=Soe(e);return st(We({},woe(n,t)),{type:"cartesian"})},fKe=(e,t,n,r,o,i,a)=>{switch(e.type){case"range":return T7(e,t,n,r,o,i,a);case"cartesian":{const s=r,l=_oe(s)?T7(st(We({},e),{type:"range"}),t,n,Soe(s),o,i,a):zS(e,t,n,s,o,i,a);return fqe(l.options.series),l}case"categorical":return IZe(e,t,n,r,o,i);case"scatter":return oKe(e,t,n,r,i);case"boxplot":return dKe(e,n,r,o,i);default:throw new kt("errors.unexpectedChartType",{chartType:e.type})}},mKe={legend:{enabled:!0,position:"bottom"},navigator:{enabled:!0},markers:{enabled:!1,fill:"filled",size:"small"},seriesLabels:{enabled:!1,rotation:0},xAxis:{enabled:!0,gridLines:!1,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"X Axis title"}},yAxis:{enabled:!0,gridLines:!0,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"Y Axis title"}},y2Axis:{enabled:!0,gridLines:!0,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"Y2 Axis title"}},convolution:{enabled:!1,selectedConvolutionType:"byPercentage",minimalIndependentSlicePercentage:3,independentSlicesCount:7},labels:{categories:!0,enabled:!0,percent:!0,decimals:!1,value:!1}},Fg=()=>Ii(mKe);function Coe(e,t,n){var r,o,i,a;const s=Uh(t,FXe(n)),l=Hg(t??{},Fg()),c=T2(n,e,l);return st(We({},s),{designPerSeries:c,stackType:t.subtype?koe[t.subtype]:yoe,showTotal:(o=(r=t.totalLabels)==null?void 0:r.enabled)!=null?o:!1,totalLabelRotation:(a=(i=t.totalLabels)==null?void 0:i.rotation)!=null?a:0})}const koe={"bar/classic":"classic","bar/stacked":"stacked","bar/stacked100":"stack100","column/classic":"classic","column/stackedcolumn":"stacked","column/stackedcolumn100":"stack100"};function Toe(e){return"subtype"in e&&e.subtype?Object.keys(koe).includes(e.subtype):!0}var Moe=kS?function(e,t){return kS.set(e,t),e}:XC;function qy(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=UC(e.prototype),r=e.apply(n,t);return Oi(r)?r:n}}var gKe=1;function vKe(e,t,n){var r=t&gKe,o=qy(e);function i(){var a=this&&this!==Qi&&this instanceof i?o:e;return a.apply(r?n:this,arguments)}return i}var yKe=Math.max;function Eoe(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,c=yKe(i-a,0),d=Array(l+c),h=!r;++s<l;)d[s]=t[s];for(;++o<a;)(h||o<i)&&(d[n[o]]=e[o]);for(;c--;)d[s++]=e[o++];return d}var bKe=Math.max;function Aoe(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,c=t.length,d=bKe(i-s,0),h=Array(d+c),u=!r;++o<d;)h[o]=e[o];for(var w=o;++l<c;)h[w+l]=t[l];for(;++a<s;)(u||o<i)&&(h[w+n[a]]=e[o++]);return h}function xKe(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Ooe=zZ(Moe),wKe=/\{\n\/\* \[wrapped with (.+)\] \*/,_Ke=/,? & /;function SKe(e){var t=e.match(wKe);return t?t[1].split(_Ke):[]}var CKe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function kKe(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(CKe,`{
667
667
  /* [wrapped with `+t+`] */
668
668
  `)}function Poe(e,t){var n=e==null?0:e.length;return!!n&&KR(e,t,0)>-1}var TKe=1,MKe=2,EKe=8,AKe=16,OKe=32,PKe=64,DKe=128,LKe=256,NKe=512,IKe=[["ary",DKe],["bind",TKe],["bindKey",MKe],["curry",EKe],["curryRight",AKe],["flip",NKe],["partial",OKe],["partialRight",PKe],["rearg",LKe]];function RKe(e,t){return cZ(IKe,function(n){var r="_."+n[0];t&n[1]&&!Poe(e,r)&&e.push(r)}),e.sort()}function Doe(e,t,n){var r=t+"";return JI(e,kKe(r,RKe(SKe(r),n)))}var jKe=1,zKe=2,BKe=4,$Ke=8,M7=32,E7=64;function Loe(e,t,n,r,o,i,a,s,l,c){var d=t&$Ke,h=d?a:void 0,u=d?void 0:a,w=d?i:void 0,y=d?void 0:i;t|=d?M7:E7,t&=~(d?E7:M7),t&BKe||(t&=~(jKe|zKe));var p=[e,t,o,w,h,y,u,s,l,c],k=n.apply(void 0,p);return KL(e)&&Ooe(k,p),k.placeholder=r,Doe(k,e,t)}function Noe(e){var t=e;return t.placeholder}var FKe=Math.min;function HKe(e,t){for(var n=e.length,r=FKe(t.length,n),o=VC(e);r--;){var i=t[r];e[r]=Rb(i,n)?o[i]:void 0}return e}var A7="__lodash_placeholder__";function FS(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];(a===t||a===A7)&&(e[n]=A7,i[o++]=n)}return i}var WKe=1,VKe=2,UKe=8,GKe=16,YKe=128,XKe=512;function gj(e,t,n,r,o,i,a,s,l,c){var d=t&YKe,h=t&WKe,u=t&VKe,w=t&(UKe|GKe),y=t&XKe,p=u?void 0:qy(e);function k(){for(var j=arguments.length,F=Array(j),U=j;U--;)F[U]=arguments[U];if(w)var H=Noe(k),R=xKe(F,H);if(r&&(F=Eoe(F,r,o,w)),i&&(F=Aoe(F,i,a,w)),j-=R,w&&j<c){var z=FS(F,H);return Loe(e,t,gj,k.placeholder,n,F,z,s,l,c-j)}var I=h?n:this,N=u?I[e]:e;return j=F.length,s?F=HKe(F,s):y&&j>1&&F.reverse(),d&&l<j&&(F.length=l),this&&this!==Qi&&this instanceof k&&(N=p||qy(N)),N.apply(I,F)}return k}function qKe(e,t,n){var r=qy(e);function o(){for(var i=arguments.length,a=Array(i),s=i,l=Noe(o);s--;)a[s]=arguments[s];var c=i<3&&a[0]!==l&&a[i-1]!==l?[]:FS(a,l);if(i-=c.length,i<n)return Loe(e,t,gj,o.placeholder,void 0,a,c,void 0,void 0,n-i);var d=this&&this!==Qi&&this instanceof o?r:e;return qC(d,this,a)}return o}var ZKe=1;function KKe(e,t,n,r){var o=t&ZKe,i=qy(e);function a(){for(var s=-1,l=arguments.length,c=-1,d=r.length,h=Array(d+l),u=this&&this!==Qi&&this instanceof a?i:e;++c<d;)h[c]=r[c];for(;l--;)h[c++]=arguments[++s];return qC(u,o?n:this,h)}return a}var O7="__lodash_placeholder__",JA=1,QKe=2,JKe=4,P7=8,U0=128,D7=256,eQe=Math.min;function tQe(e,t){var n=e[1],r=t[1],o=n|r,i=o<(JA|QKe|U0),a=r==U0&&n==P7||r==U0&&n==D7&&e[7].length<=t[8]||r==(U0|D7)&&t[7].length<=t[8]&&n==P7;if(!(i||a))return e;r&JA&&(e[2]=t[2],o|=n&JA?0:JKe);var s=t[3];if(s){var l=e[3];e[3]=l?Eoe(l,s,t[4]):s,e[4]=l?FS(e[3],O7):t[4]}return s=t[5],s&&(l=e[5],e[5]=l?Aoe(l,s,t[6]):s,e[6]=l?FS(e[5],O7):t[6]),s=t[7],s&&(e[7]=s),r&U0&&(e[8]=e[8]==null?t[8]:eQe(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}var nQe="Expected a function",L7=1,rQe=2,eO=8,tO=16,nO=32,N7=64,I7=Math.max;function oQe(e,t,n,r,o,i,a,s){var l=t&rQe;if(!l&&typeof e!="function")throw new TypeError(nQe);var c=r?r.length:0;if(c||(t&=~(nO|N7),r=o=void 0),a=a===void 0?a:I7(QL(a),0),s=s===void 0?s:QL(s),c-=o?o.length:0,t&N7){var d=r,h=o;r=o=void 0}var u=l?void 0:BR(e),w=[e,t,n,r,o,d,h,i,a,s];if(u&&tQe(w,u),e=w[0],t=w[1],n=w[2],r=w[3],o=w[4],s=w[9]=w[9]===void 0?l?0:e.length:I7(w[9]-c,0),!s&&t&(eO|tO)&&(t&=~(eO|tO)),!t||t==L7)var y=vKe(e,t,n);else t==eO||t==tO?y=qKe(e,t,s):(t==nO||t==(L7|nO))&&!o.length?y=KKe(e,t,n,r):y=gj.apply(void 0,w);var p=u?Moe:Ooe;return Doe(p(y,w),e,t)}var iQe=8;function k2(e,t,n){t=n?void 0:t;var r=oQe(e,iQe,void 0,void 0,void 0,void 0,void 0,t);return r.placeholder=k2.placeholder,r}k2.placeholder={};const aQe=600,sQe=300,Ioe=(e,t,n)=>{const r={duration:t.chart.animation.init.duration==="auto"?aQe:t.chart.animation.init.duration},o={duration:t.chart.animation.redraw.duration==="auto"?sQe:t.chart.animation.redraw.duration};return lo(e,{accessibility:{enabled:n},chart:{animation:o},plotOptions:{series:{animation:r}},boost:{useGPUTranslations:!0,usePreAllocated:!0}})};function lQe(e,t){return n=>Ioe(n,e,t)}function c_(e){return e===null}const Roe=(e,t,{onDataPointClick:n,onDataPointContextMenu:r,onDataPointsSelected:o}={})=>{var i;const a={chart:{events:{}},plotOptions:{series:{point:{events:{click:()=>{}}}}}};return o&&(a.chart.zoomType="x",["scatter","bubble"].includes((i=e.chart)==null?void 0:i.type)&&(a.chart.zoomType="xy"),a.chart.events.selection=s=>{s.preventDefault();const{xAxis:l,yAxis:c,originalEvent:d}=s,h=uQe(l[0],c[0]);h.forEach(u=>{u.state=""}),o(h.map(u=>ZA(u,t)),d)}),n&&(a.plotOptions.series.point.events.click=s=>{s.point.state="hover",n(ZA(s.point,t),s)}),r&&(a.plotOptions.series.point.events.contextmenu=s=>{s.preventDefault(),r(ZA(s.point,t),s)}),Ms(e,a)};function cQe(e,{onDataPointClick:t,onDataPointContextMenu:n,onDataPointsSelected:r}={}){return o=>Roe(o,e,{onDataPointClick:t,onDataPointContextMenu:n,onDataPointsSelected:r})}const uQe=(e,t)=>{const n=e.axis.series.flatMap(o=>o.points).filter(({x:o,y:i})=>{const a=o>=e.min&&o<=e.max,s=!c_(i);return a&&s});if(!t)return n;const r=t.axis.series.flatMap(o=>o.points).filter(({y:o})=>o>=t.min&&o<=t.max);return n.filter(o=>r.includes(o))},joe=(e,t)=>{var n;if(!t)return e;const r={backgroundColor:t.chart.backgroundColor},o={style:{fontFamily:t.typography.fontFamily}},i={itemStyle:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}},a={series:{dataLabels:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}}},s={activeDataLabelStyle:{color:t.chart.textColor},breadcrumbs:{buttonTheme:{fill:t.general.brandColor,stroke:t.general.brandColor,style:{color:t.general.primaryButtonTextColor},states:{hover:{fill:t.general.primaryButtonHoverColor,stroke:t.general.primaryButtonHoverColor}}}}},l={chart:r,tooltip:o,legend:i,plotOptions:a,drilldown:s},c={labels:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}},title:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}},d={color:t==null?void 0:t.chart.backgroundColor,label:{style:{color:t.chart.textColor,fontFamily:t.typography.fontFamily}}},h=lo(e,l);return h.xAxis=(n=h.xAxis)==null?void 0:n.map(u=>{var w;return u.plotBands=(w=u.plotBands)==null?void 0:w.map(y=>lo(y,st(We({},d),{color:y.color||(t==null?void 0:t.chart.backgroundColor)}))),lo(u,c)}),h.yAxis&&(h.yAxis=h.yAxis.map(u=>{var w;return u.plotBands=(w=u.plotBands)==null?void 0:w.map(y=>lo(y,st(We({},d),{color:y.color||(t==null?void 0:t.chart.backgroundColor)}))),lo(u,c)})),h};function dQe(e){return t=>joe(t,e)}function pQe({highchartsOptionsBuilder:e,chartData:t,dataOptions:n,designOptions:r,extraConfig:o,dataPointsEventHandlers:i,onBeforeRender:a}){const s={chartData:t,dataOptions:n,designOptions:r,extraConfig:o};return Ed(lQe(o.themeSettings,o.accessibilityEnabled),cQe(n,i),dQe(o.themeSettings),hQe(a))(We(st(We({chart:e.getChart(s),series:e.getSeries(s)},e.getAxes(s)),{legend:e.getLegend(s),plotOptions:e.getPlotOptions(s),tooltip:e.getTooltip(s)}),e.getExtras(s)))}function hQe(e){return e||(t=>t)}function zoe(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?Fb(e,t,void 0,n):!!r}var Boe={exports:{}};(function(e,t){(function(n,r){e.exports=r(Be)})(typeof self<"u"?self:vo,function(n){return function(r){function o(a){if(i[a])return i[a].exports;var s=i[a]={i:a,l:!1,exports:{}};return r[a].call(s.exports,s,s.exports,o),s.l=!0,s.exports}var i={};return o.m=r,o.c=i,o.d=function(a,s,l){o.o(a,s)||Object.defineProperty(a,s,{configurable:!1,enumerable:!0,get:l})},o.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(s,"a",s),s},o.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},o.p="",o(o.s=0)}([function(r,o,i){function a(){return a=Object.assign?Object.assign.bind():function(F){for(var U=1;U<arguments.length;U++){var H=arguments[U];for(var R in H)Object.prototype.hasOwnProperty.call(H,R)&&(F[R]=H[R])}return F},a.apply(this,arguments)}function s(F){return h(F)||d(F)||c(F)||l()}function l(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
669
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(F,U){if(F){if(typeof F=="string")return u(F,U);var H=Object.prototype.toString.call(F).slice(8,-1);return H==="Object"&&F.constructor&&(H=F.constructor.name),H==="Map"||H==="Set"?Array.from(F):H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?u(F,U):void 0}}function d(F){if(typeof Symbol<"u"&&F[Symbol.iterator]!=null||F["@@iterator"]!=null)return Array.from(F)}function h(F){if(Array.isArray(F))return u(F)}function u(F,U){(U==null||U>F.length)&&(U=F.length);for(var H=0,R=new Array(U);H<U;H++)R[H]=F[H];return R}function w(F){"@babel/helpers - typeof";return(w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U})(F)}Object.defineProperty(o,"__esModule",{value:!0}),i.d(o,"HighchartsReact",function(){return j});var y=i(1),p=i.n(y),k=typeof window<"u"?y.useLayoutEffect:y.useEffect,j=Object(y.memo)(Object(y.forwardRef)(function(F,U){var H=Object(y.useRef)(),R=Object(y.useRef)(),z=Object(y.useRef)(F.constructorType),I=Object(y.useRef)(F.highcharts);return k(function(){function N(){var A=F.highcharts||(typeof window>"u"?"undefined":w(window))==="object"&&window.Highcharts,C=F.constructorType||"chart";A?A[C]?F.options?R.current=A[C](H.current,F.options,F.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(R.current){if(F.allowChartUpdate!==!1)if(F.constructorType!==z.current||F.highcharts!==I.current)z.current=F.constructorType,I.current=F.highcharts,N();else if(!F.immutable&&R.current){var W;(W=R.current).update.apply(W,[F.options].concat(s(F.updateArgs||[!0,!0])))}else N()}else N()},[F.options,F.allowChartUpdate,F.updateArgs,F.containerProps,F.highcharts,F.constructorType]),k(function(){return function(){R.current&&(R.current.destroy(),R.current=null)}},[]),Object(y.useImperativeHandle)(U,function(){return{get chart(){return R.current},container:H}},[]),p.a.createElement("div",a({},F.containerProps,{ref:H}))}));o.default=j},function(r,o){r.exports=n}])})})(Boe);var fQe=Boe.exports;const mQe=ya(fQe);function Hs(e){const t=Ye(void 0);return Je(()=>{t.current=e},[e]),t.current}var $oe={exports:{}};(function(e){(function(t){e.exports?e.exports=t:t(Highcharts)})(function(t){var n=t.relativeLength;t.wrap(t.seriesTypes.column.prototype,"translate",function(r){var o=this.options,i=o.topMargin||0,a=o.bottomMargin||0;r.call(this),this.points.forEach(function(s){var l=s.shapeArgs,c=l.width,d=l.height,h=l.x,u=l.y,w=n(o.borderRadiusTopLeft||0,c),y=n(o.borderRadiusTopRight||0,c),p=n(o.borderRadiusBottomRight||0,c),k=n(o.borderRadiusBottomLeft||0,c);if(w||y||p||k){var j=Math.min(c,d)/2;w>j&&(w=j),y>j&&(y=j),p>j&&(p=j),k>j&&(k=j),s.dlBox=s.shapeArgs,s.shapeType="path",s.shapeArgs={d:[["M",h+w,u+i],["L",h+c-y,u+i],["C",h+c-y/2,u,h+c,u+y/2,h+c,u+y],["L",h+c,u+d-p],["C",h+c,u+d-p/2,h+c-p/2,u+d,h+c-p,u+d+a],["L",h+k,u+d+a],["C",h+k/2,u+d,h,u+d-k/2,h,u+d-k],["L",h,u+w],["C",h,u+w/2,h+w/2,u,h+w,u],["Z"]]}}})})})})($oe);var gQe=$oe.exports;const vQe=ya(gQe),yQe=()=>{(function(e){e.seriesTypes.line.prototype.drawLegendSymbol=e.seriesTypes.area.prototype.drawLegendSymbol,Gc.wrap(Gc.Series.types.treemap.prototype,"pointAttribs",function(t,...n){var r;const o=t.call(this,...n),i=n[0];return(r=i.options.custom)!=null&&r.blur&&(o.fill=Gc.color(i.color).setOpacity(.2).get("rgba"),o.stroke=Gc.color(o.stroke).setOpacity(.2).get("rgba")),o})})(Gc),function(e){e.Point.prototype.importEvents=function(){const t=this;this.importedEvents&&this.importedEvents.forEach(function(o){o()}),this.importedEvents=[];const n=e.merge(t.series.options.point,t.options),r=n.events;t.events=r,e.objectEach(r,function(o,i){e.isFunction(o)&&t.importedEvents.push(e.addEvent(t,i,o))})}}(Gc),vQe(Gc)};yQe();const Foe=Kd(function({options:e}){var t,n,r,o,i,a;const s=Hs(e),l=He(p=>{var k,j,F,U,H,R,z,I;const N=e;!((U=(F=(j=(k=N==null?void 0:N.plotOptions)==null?void 0:k.series)==null?void 0:j.point)==null?void 0:F.events)!=null&&U.click)&&!((I=(z=(R=(H=N==null?void 0:N.plotOptions)==null?void 0:H.series)==null?void 0:R.point)==null?void 0:z.events)!=null&&I.contextmenu)&&(p.container.onclick=null)},[e]),c=p=>p==null?void 0:p.some(({data:k})=>k.some(j=>!!j.marker)),d=(s==null?void 0:s.xAxis)&&(e==null?void 0:e.xAxis)&&((t=s==null?void 0:s.xAxis[0])==null?void 0:t.type)!==((n=e==null?void 0:e.xAxis[0])==null?void 0:n.type),h=!!s&&((r=s==null?void 0:s.navigator)==null?void 0:r.enabled)!==((o=e==null?void 0:e.navigator)==null?void 0:o.enabled),u=c(s==null?void 0:s.series)&&!c(e==null?void 0:e.series),w=!!s&&((i=s==null?void 0:s.chart)==null?void 0:i.type)!==((a=e==null?void 0:e.chart)==null?void 0:a.type),y=d||h||w||u;return ge(mQe,{highcharts:Gc,options:Ii(e),containerProps:{style:{height:"100%",width:"100%"}},immutable:y,callback:l})},(e,t)=>zoe(e,t,(n,r)=>fu(n)&&fu(r)?n.toString()===r.toString():void 0)),bQe="_alert_box_10ttx_1",xQe="_content_10ttx_8",wQe="_alert_10ttx_1",rO={alert_box:bQe,content:xQe,alert:wQe},Hoe=({alerts:e=[]})=>ge("div",{className:rO.alert_box,children:ge("div",{className:rO.content,children:[...new Set(e)].map((t,n)=>ge("div",{className:rO.alert,children:t},`alert-${n}`))})}),_Qe=e=>["column","bar"].includes(e);function Woe({highchartsOptionsBuilder:e,getAlerts:t}){return function({chartData:n,dataOptions:r,designOptions:o,onDataPointClick:i,onDataPointContextMenu:a,onDataPointsSelected:s,onBeforeRender:l}){var c;const{app:d}=Ln(),{t:h}=Jt(),{themeSettings:u}=Lt(),w=He((j,F)=>np(j,F,d==null?void 0:d.settings.locale,d==null?void 0:d.settings.dateConfig),[d==null?void 0:d.settings.dateConfig,d==null?void 0:d.settings.locale]),y=Ke(()=>{var j;return{translate:h,themeSettings:u,dateFormatter:w,accessibilityEnabled:((j=d==null?void 0:d.settings.accessibilityConfig)==null?void 0:j.enabled)||!1}},[h,u,w,(c=d==null?void 0:d.settings.accessibilityConfig)==null?void 0:c.enabled]),p=Ke(()=>pQe({highchartsOptionsBuilder:e,chartData:n,dataOptions:r,designOptions:o,dataPointsEventHandlers:{onDataPointClick:i,onDataPointContextMenu:a,onDataPointsSelected:s},extraConfig:y,onBeforeRender:l}),[n,r,o,i,a,s,y,l]),k=t({chartData:n,dataOptions:r,designOptions:o,extraConfig:y});return p&&ot("div",{"aria-label":"chart-root",style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:[!!k.length&&ge(Hoe,{alerts:k}),ge(Foe,{options:p})]})}}function Voe(e){return!!e.chartData&&!!e.chartType&&_Qe(e.chartType)}var SQe="[object String]";function vj(e){return typeof e=="string"||!Ar(e)&&ga(e)&&kl(e)==SQe}const Uoe=e=>{const{chartData:t,designOptions:n}=e,{seriesCapacity:r,categoriesCapacity:o}=n.dataLimits,i=t.xValues.length>o?jS("x",t.xValues.length,o):null,a=t.series.length>r?hh(t.series.length,r):null;return[i,a].filter(vj)},Ma=(e,t)=>zS(e.chartData,t,e.designOptions,e.dataOptions,e.extraConfig.translate,e.extraConfig.themeSettings,e.extraConfig.dateFormatter).options,CQe={getChart:function(e){return Ma(e,"bar").chart},getSeries:function(e){return Ma(e,"bar").series},getAxes:function(e){const{xAxis:t,yAxis:n}=Ma(e,"bar");return{xAxis:t,yAxis:n}},getLegend:function(e){return Ma(e,"bar").legend},getPlotOptions:function(e){return Ma(e,"bar").plotOptions},getTooltip:function(e){return Ma(e,"bar").tooltip},getExtras:function(e){const t=Ma(e,"bar");return QC(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},kQe={dataOptions:{translateDataOptionsToInternal:dj,getAttributes:Fre,getMeasures:Hre,isCorrectDataOptions:Wre,isCorrectDataOptionsInternal:Vre},data:{loadData:tj,getChartData:Kre},designOptions:{translateStyleOptionsToDesignOptions:k2(Coe)("bar"),isCorrectStyleOptions:Toe},renderer:{ChartRendererComponent:Woe({highchartsOptionsBuilder:CQe,getAlerts:Uoe}),isCorrectRendererProps:Voe}},TQe={getChart:function(e){return Ma(e,"column").chart},getSeries:function(e){return Ma(e,"column").series},getAxes:function(e){const{xAxis:t,yAxis:n}=Ma(e,"column");return{xAxis:t,yAxis:n}},getLegend:function(e){return Ma(e,"column").legend},getPlotOptions:function(e){return Ma(e,"column").plotOptions},getTooltip:function(e){return Ma(e,"column").tooltip},getExtras:function(e){const t=Ma(e,"column");return QC(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},MQe={dataOptions:{translateDataOptionsToInternal:dj,getAttributes:Fre,getMeasures:Hre,isCorrectDataOptions:Wre,isCorrectDataOptionsInternal:Vre},data:{loadData:tj,getChartData:Kre},designOptions:{translateStyleOptionsToDesignOptions:k2(Coe)("column"),isCorrectStyleOptions:Toe},renderer:{ChartRendererComponent:Woe({highchartsOptionsBuilder:TQe,getAlerts:Uoe}),isCorrectRendererProps:Voe}},EQe={areamap:BXe,column:MQe,bar:kQe};function b1(e){const t=EQe[e];if(t)return t;throw new Error(`Unsupported chart type: ${e}`)}function x1(e){return["areamap","column","bar"].includes(e)}function Goe(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=YC(e,a);n(s,a)&&sre(i,Cg(a,e),s)}return i}function AQe(e,t){return Goe(e,t,function(n,r){return OZ(e,r)})}var OQe=KC(function(e,t){return e==null?{}:AQe(e,t)});const PQe=Object.freeze({"area/basic":{lineType:"straight",stackType:"classic"},"area/stacked":{lineType:"straight",stackType:"stacked"},"area/stacked100":{lineType:"straight",stackType:"stack100"},"area/spline":{lineType:"smooth",stackType:"classic"},"area/stackedspline":{lineType:"smooth",stackType:"stacked"},"area/stackedspline100":{lineType:"smooth",stackType:"stack100"},"arearange/basic":{lineType:"straight",stackType:"classic"},"arearange/spline":{lineType:"smooth",stackType:"classic"},"bar/classic":{stackType:"classic"},"bar/stacked":{stackType:"stacked"},"bar/stacked100":{stackType:"stack100"},"column/classic":{stackType:"classic"},"column/stackedcolumn":{stackType:"stacked"},"column/stackedcolumn100":{stackType:"stack100"},"line/basic":{lineType:"straight"},"line/spline":{lineType:"smooth"},"line/step":{lineType:"straight"},"pie/classic":{pieType:"classic"},"pie/donut":{pieType:"donut"},"pie/ring":{pieType:"ring"},"polar/column":{polarType:"column"},"polar/area":{polarType:"area"},"polar/line":{polarType:"line"},"indicator/numeric":{indicatorType:"numeric"},"indicator/gauge":{indicatorType:"gauge"},treemap:{},sunburst:{},"boxplot/full":{boxplotType:"full"},"boxplot/hollow":{boxplotType:"hollow"},scattermap:{},"areamap/world":{mapType:"world"},"areamap/usa":{mapType:"usa"}});function DQe(e){let t;switch(e.subtype){case"indicator/numeric":t=We({indicatorType:"numeric",numericSubtype:e.numericSubtype},e.numericSubtype==="numericSimple"?{skin:e.skin}:null);break;case"indicator/gauge":t=We({indicatorType:"gauge",skin:e.skin},e.tickerBarHeight?{tickerBarHeight:e.tickerBarHeight}:null);break}return st(We(We({},ll),t),{indicatorComponents:e.indicatorComponents||ll.indicatorComponents,forceTickerView:!!e.forceTickerView})}const LQe=(e,t,n)=>{const r="y"in n&&Array.isArray(n.y)?n.y.some(s=>s.showOnRightAxis):!1;let o;switch(e){case"area":o=vZe(t,n,r);break;case"arearange":case"line":o=gZe(t,n,r);break;case"pie":o=wZe(t);break;case"funnel":o=_Ze(t);break;case"treemap":o=SZe(t);break;case"sunburst":o=CZe(t);break;case"polar":o=TZe(t,n);break;case"indicator":o=DQe(t);break;case"scatter":o=EZe(t);break;case"boxplot":o=AZe(t);break;case"scattermap":o=PZe(t);break;default:throw new kt("errors.chartTypeNotSupported",{chartType:e})}const i="subtype"in t&&t.subtype?t.subtype:"line/basic",a=PQe[i];return We(We({},o),a)};function NQe(e,t,n){const r=Hg(n??{},Fg());if(x1(e)){const o=b1(e);if(!o.designOptions.isCorrectStyleOptions(r))throw new kt("errors.optionsTranslation.invalidStyleOptions",{chartType:e});if(!o.dataOptions.isCorrectDataOptionsInternal(t))throw new kt("errors.optionsTranslation.invalidInternalDataOptions",{chartType:e});return o.designOptions.translateStyleOptionsToDesignOptions(r,t)}else return LQe(e,r,t)}function Hg(e,t){return lo.withOptions({mergeArrays:!1},t,e)}function T2(e,t,n){return IQe(e).map(r=>{const o=r.seriesId,i=r.seriesStyleOptions,a=mZe(t,Hg(i,n));return{seriesId:o,designOptions:OQe(a,["lineWidth","marker"])}}).reduce((r,{seriesId:o,designOptions:i})=>st(We({},r),{[o]:i}),{})}function IQe(e){return e.y.filter(RQe).map(({column:{name:t},seriesStyleOptions:n})=>({seriesId:t,seriesStyleOptions:n}))}function RQe(e){return e.seriesStyleOptions!==void 0}const jQe=e=>El(e)?"cartesian":rp(e)?"categorical":vl(e)?"scatter":Wh(e)?"scattermap":Bg(e)?"indicator":XR(e)?"areamap":op(e)?"boxplot":"table";var zQe=Object.defineProperty,BQe=Object.defineProperties,$Qe=Object.getOwnPropertyDescriptors,HS=Object.getOwnPropertySymbols,Yoe=Object.prototype.hasOwnProperty,Xoe=Object.prototype.propertyIsEnumerable,Zc=Math.pow,xN=(e,t,n)=>t in e?zQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ne=(e,t)=>{for(var n in t||(t={}))Yoe.call(t,n)&&xN(e,n,t[n]);if(HS)for(var n of HS(t))Xoe.call(t,n)&&xN(e,n,t[n]);return e},tt=(e,t)=>BQe(e,$Qe(t)),wN=e=>typeof e=="symbol"?e:e+"",Ut=(e,t)=>{var n={};for(var r in e)Yoe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&HS)for(var r of HS(e))t.indexOf(r)<0&&Xoe.call(e,r)&&(n[r]=e[r]);return n},u_=(e,t,n)=>(xN(e,typeof t!="symbol"?t+"":t,n),n),Al=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((n=n.apply(e,t)).next())});function FQe(e){let{i18n:t,defaultNS:n,children:r}=e;const o=Ke(()=>({i18n:t,defaultNS:n}),[t,n]);return Qt(nZ.Provider,{value:o},r)}function Rd(e){return e===void 0||typeof e=="string"||"title"in e&&"type"in e}const ha={BOX_MIN_VALUE_NAME:"Box Min",BOX_MEDIAN_VALUE_NAME:"Box Median",BOX_MAX_VALUE_NAME:"Box Max",WHISKER_MIN_VALUE_NAME:"Whisker Min",WHISKER_MAX_VALUE_NAME:"Whisker Max",OUTLIER_COUNT_VALUE_NAME:"Outlier Count",OUTLIER_MIN_VALUE_NAME:"Outlier Min",OUTLIER_MAX_VALUE_NAME:"Outlier Max"};function yj(e){return[Zi(ha.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),Zi(ha.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),Zi(ha.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function HQe(e){return[...yj(e),Zi(ha.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),Zi(ha.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),Zi(ha.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function WQe(e){return[...yj(e),Zi(ha.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),Zi(ha.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function VQe(e){return[...yj(e),Zi(ha.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),Zi(ha.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),Zi(ha.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const UQe=WZ(e=>{const t=Ii(e),n=Zi(ha.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),r=Zi(ha.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_IQR([Attr]), all([Attr]))",{Attr:e});return t.name=`${t.name} (Outliers)`,t.jaql=o=>{const i=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:n.jaql(!0)},{toNotEqual:r.jaql(!0)}]}});return o?i:{jaql:i}},t},"boxWhiskerIqrOutliers"),GQe=WZ(e=>{const t=Ii(e),n=Zi(ha.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),r=Zi(ha.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_STDEVP([Attr]), all([Attr]))",{Attr:e});return t.jaql=o=>{const i=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:n.jaql(!0)},{toNotEqual:r.jaql(!0)}]}});return o?i:{jaql:i}},t},"boxWhiskerStdDevOutliers");function _u(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function d_(e=[],t=[]){if(!_u(e)&&!_u(t))return si(e,t);const{filters:n,relations:r}=yl(e),o=bj(t),i=si(n,o),a=dl(n,r,i);return Xa(i,a)}function yl(e){if(!e)return{filters:[],relations:null};if(Ar(e))return{filters:e,relations:null};const t=new Set;function n(o){if(qoe(o))return t.add(o),{instanceid:o.config.guid};if(_u(o)){const i=n(o.left),a=n(o.right);return{left:i,right:a,operator:o.operator}}throw new A2}const r=n(e);return{filters:Array.from(t),relations:r}}function bj(e){return e?yl(e).filters:[]}function Xa(e,t){if(!t||xj(t))return e;const n=r(t);return qoe(n)?[n]:n;function r(o){if(M2(o))return e.find(i=>i.config.guid===o.instanceid);if(E2(o))return(o.operator==="AND"?Fv.and:Fv.or)(r(o.left),r(o.right));throw new A2}}function xj(e){return!!e&&"instanceid"in e}function dl(e,t,n){if(t===null)return null;const r=XQe(e,n);return r.length===0?t:r.reduce((o,i)=>{switch(i.type){case"add":return qQe(i.payload,o);case"remove":return _N(i.payload,o)}},t)}function R7(e,t){return e.config.guid===t.config.guid}function YQe(e,t,n){if(!e)return null;return r(e);function r(o){if(M2(o))return o.instanceid===t.config.guid?{instanceid:n.config.guid}:o;if(E2(o))return{left:r(o.left),right:r(o.right),operator:o.operator};throw new A2}}function XQe(e,t){const n=[],r=[...e],o=[...t];return r.forEach(i=>{o.some(a=>R7(i,a))||n.push({type:"remove",payload:i})}),o.forEach(i=>{r.some(a=>R7(i,a))||n.push({type:"add",payload:i})}),n}function qQe(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function _N(e,t){if(!t)return null;if(xj(t))return t.instanceid===e.config.guid?null:t;const n=_N(e,t.left),r=_N(e,t.right);return n===null&&r?r:r===null&&n?n:n===null&&r===null?null:{left:n,right:r,operator:t.operator}}function ZQe(e,t){if(!e)return null;function n(r){if(KQe(r))return{instanceid:r.instanceId};if(QQe(r))return n(r.value);if(JQe(r))return{operator:r.operator,left:n(r.left),right:n(r.right)};if(eJe(r)){const o=t.find(i=>{if(!ui(i))return!1;const a=i.filters.map(s=>s.config.guid);return r.levels.every(s=>a.includes(s.instanceId))});if(o)return{instanceid:o.config.guid};throw new Error("Broken filter relations model. Cascading filter not found.")}throw new Error("Broken filter relations model. Unknown node type.")}return n(e)}function KQe(e){return"instanceId"in e}function QQe(e){return"value"in e}function JQe(e){return"operator"in e}function eJe(e){return"levels"in e&&Ar(e.levels)}function M2(e){return"instanceid"in e}function E2(e){return"operator"in e}function qoe(e){return"config"in e&&"guid"in e.config}function tJe(e,t){if(!e)return;function n(r){if(M2(r)){const o=t.find(i=>i.config.guid===r.instanceid);return o&&ui(o)?{type:"CascadingIdentifier",levels:o.filters.map(i=>({type:"Identifier",instanceId:i.config.guid}))}:{type:"Identifier",instanceId:r.instanceid}}else{if(E2(r))return{type:"LogicalExpression",operator:r.operator,left:n(r.left),right:n(r.right)};throw new Error("Unknown node type in filter relations rules.")}}return n(e)}function nJe(e,t){return e.find(n=>n.config.guid===t)}class A2 extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function SN(e){return e.nodeType==="openBracket"}function CN(e){return e.nodeType==="closeBracket"}function rJe(e){return e.nodeType==="attribute"}function oJe(e){return e.nodeType==="operator"}function Zy(e){if(ui(e))return e.filters.map(Zy).join("-");const{attribute:t}=e,n=e.jaql().jaql,r=t.expression||n.dim,o=t.granularity||((n==null?void 0:n.datatype)==="datetime"?oo.translateJaqlToGranularity(n):"");return`${r}${o}`}function si(e=[],t=[]){const n=[...e];return t.forEach(r=>{const o=n.findIndex(i=>Zy(r)===Zy(i));o!==-1?n[o]=r:n.push(r)}),n}function iJe(e){if(!e)return e;const t=Ii(e);function n(r){if("instanceId"in r)return{instanceid:r.instanceId};if("value"in r)return n(r.value);if("operator"in r){const o={operator:r.operator};return"left"in r&&(o.left=n(r.left)),"right"in r&&(o.right=n(r.right)),o}return r}return n(t)}function aJe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kN(e,t){return kN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},kN(e,t)}const ad={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function Zoe(e,t,n){const r={chart:{textColor:e.dashboards.widgetTextColor,backgroundColor:e.dashboards.widgetBackgroundColor,secondaryTextColor:e.dashboards.widgetSecondaryTextColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:e.typography.fontFamily,primaryTextColor:e.typography.primaryTextColor,secondaryTextColor:e.typography.secondaryTextColor,fontsLoader:{fonts:sJe(e.typography.fontFamily,n,e.typography.customFontSelected)}},palette:{variantColors:t.colors},general:{brandColor:e.general.brandColor,backgroundColor:e.general.backgroundColor,primaryButtonTextColor:e.general.primaryButtonTextColor,primaryButtonHoverColor:e.general.primaryButtonHoverColor,popover:$y().general.popover,buttons:{cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:ad[e.dashboards.widgetSpacing],cornerRadius:ad[e.dashboards.widgetCornerRadius],shadow:ad[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:ad[e.dashboards.widgetTitleAlignment],titleFontSize:RR,dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:NR,dividerLineColor:LR,borderWidth:qm,borderColor:IR,toolbar:{primaryTextColor:e.dashboards.toolbarTextColor,secondaryTextColor:e.dashboards.toolbarSecondaryTextColor,backgroundColor:e.dashboards.toolbarBackgroundColor}},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor,borderWidth:qm,borderColor:_ne}}};return lo.withOptions({mergeArrays:!1},$y(),r)}function Koe(e){return e.dashboards.colorPaletteName}function sJe(e,t,n){const r=n?"fonts/":"resources/base/fonts/";return[{fontFamily:e,fontWeight:"normal",fontStyle:"normal",src:[{url:`${t}${r}${e}-Regular.eot`},{local:`${e}-Regular`},{url:`${t}${r}${e}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-Regular.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:600,fontStyle:"normal",src:[{url:`${t}${r}${e}-SemiBold.eot`},{local:`${e}-SemiBold`},{url:`${t}${r}${e}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:"bold",fontStyle:"normal",src:[{url:`${t}${r}${e}-Bold.eot`},{local:`${e}-Bold`},{url:`${t}${r}${e}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-Bold.ttf`,format:"truetype"}]}]}function Qoe(e,t){return Al(this,null,function*(){const n=yield lJe(e,t);if(!n)throw new kt("errors.themeNotFound",{themeOid:e});const r=Koe(n),o=yield Joe(r,t);return Zoe(n,o,t.url)})}function lJe(e,t){return Al(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new kt("errors.themeNotFound",{themeOid:e})})})}function Joe(e,t){return Al(this,null,function*(){const n=yield t.get(`api/palettes/${e}`);if(n&&"status"in n&&n.status==="error")throw new kt("errors.paletteNotFound",{paletteName:e});return n})}const cJe={sdkComponentInit:{internal:!0,external:!0},sdkHookInit:{internal:!0,external:!0},sdkError:{internal:!0,external:!1},sdkCliExec:{internal:!0,external:!1},sdkAngularServiceMethodExecuted:{internal:!0,external:!0}},j7="composesdk",eie=(e,t,n,r=!1)=>{const o=Object.assign({action:e,cat:j7,eventType:"product",direct:!0},t);return r&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",o),Promise.resolve()):n.post("api/activities/",[o],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(i=>{console.error(`unable to log action=${e}, category=${j7}`,i)})},z7=(e,t,n,r,o)=>{const i=cJe[`${e}`];return i.internal&&eie(e,t,n,o),i.external&&r&&r(Ne({action:e},t)),Promise.resolve()},wj=()=>{var e,t;const{tracking:n,app:r}=Ln(),o=(t=(e=r==null?void 0:r.httpClient)==null?void 0:e.auth)==null?void 0:t.type,i=He((s,l={},c=!1)=>r?z7(s,tt(Ne({},l),{authType:o}),r.httpClient,n.onTrackingEvent,c):Promise.resolve(),[n,r,o]),a=He((s,l=!1)=>{if(!r)return Promise.resolve();const{packageName:c,packageVersion:d,component:h,error:u}=s;let w="";return typeof u=="string"?w=u:u instanceof Error&&(w=u.message||u.toString()),z7("sdkError",tt(Ne({},{packageName:c,packageVersion:d,component:h,error:w}),{authType:o}),r.httpClient,n.onTrackingEvent,l)},[n,r,o]);return{trackEvent:i,trackError:a}},uJe="sdkComponentInit",tie=pn(!1),dJe=({skipNested:e=!0,children:t})=>ge(tie.Provider,{value:e,children:t}),pJe=(e,t)=>{const{tracking:n,app:r}=Ln(),{trackEvent:o}=wj(),i=en(tie),a=Ye(!1);Je(()=>{if(!(!n||!r)&&!a.current&&!i){const s={packageName:n.packageName,packageVersion:"2.4.0",componentName:e,attributesUsed:Object.entries(t).filter(([,l])=>!!l).map(([l])=>l).join(", ")};o(uJe,s,!n.enabled).finally(()=>a.current=!0)}},[e,t,n,i,o,r])};var hJe="[object Boolean]";function nie(e){return e===!0||e===!1||ga(e)&&kl(e)==hJe}const rie=class extends Dn{constructor(e){super(e),this.postponedErrors=[],this.handler=e.handler,this.componentName=e.componentName}componentDidMount(){var e;this.context.isInitialized&&(this.httpClient=(e=this.context.app)==null?void 0:e.httpClient)}componentDidCatch(e){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(e):this.postponedErrors.push(e)),e}sendErrorTracking(e){try{this.handler({packageName:"sdk-ui",packageVersion:"2.4.0",component:this.componentName,error:e})}catch(t){console.log("Failed to send tracking error event: ",t)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(e=>this.sendErrorTracking(e)),this.postponedErrors=[],this.props.children}};rie.contextType=$R;let fJe=rie;const mJe=({componentName:e,config:t})=>{const{skip:n,transparent:r}=t||{};return o=>function(i){const{trackError:a}=wj();return nie(n)&&n||fu(n)&&n(i)?ge(o,Ne({},i)):(pJe(e,i),ge(dJe,{skipNested:!r,children:ge(fJe,{componentName:e,handler:a,children:ge(o,Ne({},i))})}))}},gJe="_container_1wquj_1",vJe="_card_1wquj_11",yJe="_text_1wquj_19",oO={container:gJe,card:vJe,text:yJe};function oie({color:e="#FFCB05"}){return ge("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:ge("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:ot("g",{children:[ge("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),ge("path",{d:"M24.5,39.054 L24.5,35.054 L28.5,35.054 L28.5,39.054 L24.5,39.054 Z M28.5,31.0536 L24.5,31.0536 L23.5,13.0536 L29.5,13.0536 L28.5,31.0536 Z",fill:"#FFFFFF"})]})})})}const iie=({error:e=new kt("errors.componentRenderError")})=>{var t,n,r,o,i,a;const{themeSettings:s}=Lt(),{app:l}=Ln(),{t:c}=Jt(),[d,h]=Ge(!1),u=()=>{h(!0)},w=()=>{h(!1)},y=ge("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:ge(oie,{color:(t=s==null?void 0:s.general)==null?void 0:t.brandColor})}),p=e instanceof Lb?c(e.key,Ne({},e.interpolationOptions)):c(e instanceof Error?e.message:e),k=c("errorBoxText",{errorMessage:p,interpolation:{escapeValue:!1}}),j=(r=(n=l==null?void 0:l.settings)==null?void 0:n.errorBoundaryConfig)==null?void 0:r.alwaysShowErrorText;return ge("div",{onMouseEnter:j?void 0:u,onMouseLeave:j?void 0:w,className:oO.container,"aria-label":"error-box",children:ot("div",{className:oO.card,style:{backgroundColor:((o=s==null?void 0:s.general)==null?void 0:o.backgroundColor)||"rgba(255,255,255,0.5)"},children:[y,(j||d)&&ge("div",{className:oO.text,style:{color:((i=s==null?void 0:s.typography)==null?void 0:i.primaryTextColor)||di,fontFamily:((a=s==null?void 0:s.typography)==null?void 0:a.fontFamily)||"inherit"},children:k})]})})};let TN=class extends Dn{constructor(e){super(e),this.showErrorBox=!0,this.onError=e.onError,this.isContainerComponent=e.isContainerComponent||!1,this.state={error:null,customErrorUI:null}}static getDerivedStateFromError(e){return{error:e,customErrorUI:null}}componentDidCatch(e){const t=e instanceof Error?e:new Error(e);if(this.onError){const n=this.onError(t);if(n!==void 0&&Tn(n)){this.setState({error:e,customErrorUI:n});return}}this.setState({error:e})}componentDidUpdate(e,t){if(t.error!==null&&bJe(e.resetKeys,this.props.resetKeys)&&this.setState({error:null,customErrorUI:null}),this.props.error&&!e.error&&!t.error&&!this.state.error&&this.onError){const n=this.props.error instanceof Error?this.props.error:new Error(String(this.props.error)),r=this.onError(n);r!==void 0&&Tn(r)&&this.setState({customErrorUI:r})}}render(){const{error:e,customErrorUI:t}=this.state,{shouldRenderChildrenWithProvidedError:n,showErrorBox:r,error:o,children:i}=this.props,a=e||o;return!a||o&&!e&&n?i:r?t||ge(iie,{error:a}):null}};function bJe(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Ra(n,t[r]))}const _j=({componentName:e})=>t=>function(n){const r=Ln(),o=i=>{var a,s;return(s=(a=r.errorBoundary).onError)==null?void 0:s.call(a,i,{componentName:e,componentProps:n})};return ge(TN,{resetKeys:Object.values(n),showErrorBox:r.errorBoundary.showErrorBox,onError:o,isContainerComponent:!!(n!=null&&n.children),children:ge(t,Ne({},n))})};function aie(){var e,t;return(t=(e=document.head.querySelector('meta[property="csp-nonce"]'))==null?void 0:e.getAttribute("content"))!=null?t:void 0}const B7=aie(),O2=({color:e})=>{const t={backgroundColor:e||"#333333",float:"left",width:"10px",height:"10px",marginRight:"7px",WebkitAnimation:"loading-dots-animation 1.8s infinite ease-in-out",animation:"loading-dots-animation 1.8s infinite ease-in-out",borderRadius:"50%",opacity:.75},n=tt(Ne({},t),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),r=tt(Ne({},t),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),o=tt(Ne({},t),{marginRight:"unset"}),i={"0%, 80%, 100%":{WebkitTransform:"scale(0) rotate(0deg)",transform:"scale(0) rotate(0deg)"},"40%":{WebkitTransform:"scale(1) rotate(0.02deg)",transform:"scale(1) rotate(0.02deg)"}};return ot("div",{children:[ge("style",tt(Ne({},B7&&{nonce:B7}),{children:`
669
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(F,U){if(F){if(typeof F=="string")return u(F,U);var H=Object.prototype.toString.call(F).slice(8,-1);return H==="Object"&&F.constructor&&(H=F.constructor.name),H==="Map"||H==="Set"?Array.from(F):H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?u(F,U):void 0}}function d(F){if(typeof Symbol<"u"&&F[Symbol.iterator]!=null||F["@@iterator"]!=null)return Array.from(F)}function h(F){if(Array.isArray(F))return u(F)}function u(F,U){(U==null||U>F.length)&&(U=F.length);for(var H=0,R=new Array(U);H<U;H++)R[H]=F[H];return R}function w(F){"@babel/helpers - typeof";return(w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U})(F)}Object.defineProperty(o,"__esModule",{value:!0}),i.d(o,"HighchartsReact",function(){return j});var y=i(1),p=i.n(y),k=typeof window<"u"?y.useLayoutEffect:y.useEffect,j=Object(y.memo)(Object(y.forwardRef)(function(F,U){var H=Object(y.useRef)(),R=Object(y.useRef)(),z=Object(y.useRef)(F.constructorType),I=Object(y.useRef)(F.highcharts);return k(function(){function N(){var A=F.highcharts||(typeof window>"u"?"undefined":w(window))==="object"&&window.Highcharts,C=F.constructorType||"chart";A?A[C]?F.options?R.current=A[C](H.current,F.options,F.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(R.current){if(F.allowChartUpdate!==!1)if(F.constructorType!==z.current||F.highcharts!==I.current)z.current=F.constructorType,I.current=F.highcharts,N();else if(!F.immutable&&R.current){var W;(W=R.current).update.apply(W,[F.options].concat(s(F.updateArgs||[!0,!0])))}else N()}else N()},[F.options,F.allowChartUpdate,F.updateArgs,F.containerProps,F.highcharts,F.constructorType]),k(function(){return function(){R.current&&(R.current.destroy(),R.current=null)}},[]),Object(y.useImperativeHandle)(U,function(){return{get chart(){return R.current},container:H}},[]),p.a.createElement("div",a({},F.containerProps,{ref:H}))}));o.default=j},function(r,o){r.exports=n}])})})(Boe);var fQe=Boe.exports;const mQe=ya(fQe);function Hs(e){const t=Ye(void 0);return Je(()=>{t.current=e},[e]),t.current}var $oe={exports:{}};(function(e){(function(t){e.exports?e.exports=t:t(Highcharts)})(function(t){var n=t.relativeLength;t.wrap(t.seriesTypes.column.prototype,"translate",function(r){var o=this.options,i=o.topMargin||0,a=o.bottomMargin||0;r.call(this),this.points.forEach(function(s){var l=s.shapeArgs,c=l.width,d=l.height,h=l.x,u=l.y,w=n(o.borderRadiusTopLeft||0,c),y=n(o.borderRadiusTopRight||0,c),p=n(o.borderRadiusBottomRight||0,c),k=n(o.borderRadiusBottomLeft||0,c);if(w||y||p||k){var j=Math.min(c,d)/2;w>j&&(w=j),y>j&&(y=j),p>j&&(p=j),k>j&&(k=j),s.dlBox=s.shapeArgs,s.shapeType="path",s.shapeArgs={d:[["M",h+w,u+i],["L",h+c-y,u+i],["C",h+c-y/2,u,h+c,u+y/2,h+c,u+y],["L",h+c,u+d-p],["C",h+c,u+d-p/2,h+c-p/2,u+d,h+c-p,u+d+a],["L",h+k,u+d+a],["C",h+k/2,u+d,h,u+d-k/2,h,u+d-k],["L",h,u+w],["C",h,u+w/2,h+w/2,u,h+w,u],["Z"]]}}})})})})($oe);var gQe=$oe.exports;const vQe=ya(gQe),yQe=()=>{(function(e){e.seriesTypes.line.prototype.drawLegendSymbol=e.seriesTypes.area.prototype.drawLegendSymbol,Gc.wrap(Gc.Series.types.treemap.prototype,"pointAttribs",function(t,...n){var r;const o=t.call(this,...n),i=n[0];return(r=i.options.custom)!=null&&r.blur&&(o.fill=Gc.color(i.color).setOpacity(.2).get("rgba"),o.stroke=Gc.color(o.stroke).setOpacity(.2).get("rgba")),o})})(Gc),function(e){e.Point.prototype.importEvents=function(){const t=this;this.importedEvents&&this.importedEvents.forEach(function(o){o()}),this.importedEvents=[];const n=e.merge(t.series.options.point,t.options),r=n.events;t.events=r,e.objectEach(r,function(o,i){e.isFunction(o)&&t.importedEvents.push(e.addEvent(t,i,o))})}}(Gc),vQe(Gc)};yQe();const Foe=Kd(function({options:e}){var t,n,r,o,i,a;const s=Hs(e),l=He(p=>{var k,j,F,U,H,R,z,I;const N=e;!((U=(F=(j=(k=N==null?void 0:N.plotOptions)==null?void 0:k.series)==null?void 0:j.point)==null?void 0:F.events)!=null&&U.click)&&!((I=(z=(R=(H=N==null?void 0:N.plotOptions)==null?void 0:H.series)==null?void 0:R.point)==null?void 0:z.events)!=null&&I.contextmenu)&&(p.container.onclick=null)},[e]),c=p=>p==null?void 0:p.some(({data:k})=>k.some(j=>!!j.marker)),d=(s==null?void 0:s.xAxis)&&(e==null?void 0:e.xAxis)&&((t=s==null?void 0:s.xAxis[0])==null?void 0:t.type)!==((n=e==null?void 0:e.xAxis[0])==null?void 0:n.type),h=!!s&&((r=s==null?void 0:s.navigator)==null?void 0:r.enabled)!==((o=e==null?void 0:e.navigator)==null?void 0:o.enabled),u=c(s==null?void 0:s.series)&&!c(e==null?void 0:e.series),w=!!s&&((i=s==null?void 0:s.chart)==null?void 0:i.type)!==((a=e==null?void 0:e.chart)==null?void 0:a.type),y=d||h||w||u;return ge(mQe,{highcharts:Gc,options:Ii(e),containerProps:{style:{height:"100%",width:"100%"}},immutable:y,callback:l})},(e,t)=>zoe(e,t,(n,r)=>fu(n)&&fu(r)?n.toString()===r.toString():void 0)),bQe="_alert_box_10ttx_1",xQe="_content_10ttx_8",wQe="_alert_10ttx_1",rO={alert_box:bQe,content:xQe,alert:wQe},Hoe=({alerts:e=[]})=>ge("div",{className:rO.alert_box,children:ge("div",{className:rO.content,children:[...new Set(e)].map((t,n)=>ge("div",{className:rO.alert,children:t},`alert-${n}`))})}),_Qe=e=>["column","bar"].includes(e);function Woe({highchartsOptionsBuilder:e,getAlerts:t}){return function({chartData:n,dataOptions:r,designOptions:o,onDataPointClick:i,onDataPointContextMenu:a,onDataPointsSelected:s,onBeforeRender:l}){var c;const{app:d}=Ln(),{t:h}=Jt(),{themeSettings:u}=Lt(),w=He((j,F)=>np(j,F,d==null?void 0:d.settings.locale,d==null?void 0:d.settings.dateConfig),[d==null?void 0:d.settings.dateConfig,d==null?void 0:d.settings.locale]),y=Ke(()=>{var j;return{translate:h,themeSettings:u,dateFormatter:w,accessibilityEnabled:((j=d==null?void 0:d.settings.accessibilityConfig)==null?void 0:j.enabled)||!1}},[h,u,w,(c=d==null?void 0:d.settings.accessibilityConfig)==null?void 0:c.enabled]),p=Ke(()=>pQe({highchartsOptionsBuilder:e,chartData:n,dataOptions:r,designOptions:o,dataPointsEventHandlers:{onDataPointClick:i,onDataPointContextMenu:a,onDataPointsSelected:s},extraConfig:y,onBeforeRender:l}),[n,r,o,i,a,s,y,l]),k=t({chartData:n,dataOptions:r,designOptions:o,extraConfig:y});return p&&ot("div",{"aria-label":"chart-root",style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:[!!k.length&&ge(Hoe,{alerts:k}),ge(Foe,{options:p})]})}}function Voe(e){return!!e.chartData&&!!e.chartType&&_Qe(e.chartType)}var SQe="[object String]";function vj(e){return typeof e=="string"||!Ar(e)&&ga(e)&&kl(e)==SQe}const Uoe=e=>{const{chartData:t,designOptions:n}=e,{seriesCapacity:r,categoriesCapacity:o}=n.dataLimits,i=t.xValues.length>o?jS("x",t.xValues.length,o):null,a=t.series.length>r?hh(t.series.length,r):null;return[i,a].filter(vj)},Ma=(e,t)=>zS(e.chartData,t,e.designOptions,e.dataOptions,e.extraConfig.translate,e.extraConfig.themeSettings,e.extraConfig.dateFormatter).options,CQe={getChart:function(e){return Ma(e,"bar").chart},getSeries:function(e){return Ma(e,"bar").series},getAxes:function(e){const{xAxis:t,yAxis:n}=Ma(e,"bar");return{xAxis:t,yAxis:n}},getLegend:function(e){return Ma(e,"bar").legend},getPlotOptions:function(e){return Ma(e,"bar").plotOptions},getTooltip:function(e){return Ma(e,"bar").tooltip},getExtras:function(e){const t=Ma(e,"bar");return QC(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},kQe={dataOptions:{translateDataOptionsToInternal:dj,getAttributes:Fre,getMeasures:Hre,isCorrectDataOptions:Wre,isCorrectDataOptionsInternal:Vre},data:{loadData:tj,getChartData:Kre},designOptions:{translateStyleOptionsToDesignOptions:k2(Coe)("bar"),isCorrectStyleOptions:Toe},renderer:{ChartRendererComponent:Woe({highchartsOptionsBuilder:CQe,getAlerts:Uoe}),isCorrectRendererProps:Voe}},TQe={getChart:function(e){return Ma(e,"column").chart},getSeries:function(e){return Ma(e,"column").series},getAxes:function(e){const{xAxis:t,yAxis:n}=Ma(e,"column");return{xAxis:t,yAxis:n}},getLegend:function(e){return Ma(e,"column").legend},getPlotOptions:function(e){return Ma(e,"column").plotOptions},getTooltip:function(e){return Ma(e,"column").tooltip},getExtras:function(e){const t=Ma(e,"column");return QC(t,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},MQe={dataOptions:{translateDataOptionsToInternal:dj,getAttributes:Fre,getMeasures:Hre,isCorrectDataOptions:Wre,isCorrectDataOptionsInternal:Vre},data:{loadData:tj,getChartData:Kre},designOptions:{translateStyleOptionsToDesignOptions:k2(Coe)("column"),isCorrectStyleOptions:Toe},renderer:{ChartRendererComponent:Woe({highchartsOptionsBuilder:TQe,getAlerts:Uoe}),isCorrectRendererProps:Voe}},EQe={areamap:BXe,column:MQe,bar:kQe};function b1(e){const t=EQe[e];if(t)return t;throw new Error(`Unsupported chart type: ${e}`)}function x1(e){return["areamap","column","bar"].includes(e)}function Goe(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=YC(e,a);n(s,a)&&sre(i,Cg(a,e),s)}return i}function AQe(e,t){return Goe(e,t,function(n,r){return OZ(e,r)})}var OQe=KC(function(e,t){return e==null?{}:AQe(e,t)});const PQe=Object.freeze({"area/basic":{lineType:"straight",stackType:"classic"},"area/stacked":{lineType:"straight",stackType:"stacked"},"area/stacked100":{lineType:"straight",stackType:"stack100"},"area/spline":{lineType:"smooth",stackType:"classic"},"area/stackedspline":{lineType:"smooth",stackType:"stacked"},"area/stackedspline100":{lineType:"smooth",stackType:"stack100"},"arearange/basic":{lineType:"straight",stackType:"classic"},"arearange/spline":{lineType:"smooth",stackType:"classic"},"bar/classic":{stackType:"classic"},"bar/stacked":{stackType:"stacked"},"bar/stacked100":{stackType:"stack100"},"column/classic":{stackType:"classic"},"column/stackedcolumn":{stackType:"stacked"},"column/stackedcolumn100":{stackType:"stack100"},"line/basic":{lineType:"straight"},"line/spline":{lineType:"smooth"},"line/step":{lineType:"straight"},"pie/classic":{pieType:"classic"},"pie/donut":{pieType:"donut"},"pie/ring":{pieType:"ring"},"polar/column":{polarType:"column"},"polar/area":{polarType:"area"},"polar/line":{polarType:"line"},"indicator/numeric":{indicatorType:"numeric"},"indicator/gauge":{indicatorType:"gauge"},treemap:{},sunburst:{},"boxplot/full":{boxplotType:"full"},"boxplot/hollow":{boxplotType:"hollow"},scattermap:{},"areamap/world":{mapType:"world"},"areamap/usa":{mapType:"usa"}});function DQe(e){let t;switch(e.subtype){case"indicator/numeric":t=We({indicatorType:"numeric",numericSubtype:e.numericSubtype},e.numericSubtype==="numericSimple"?{skin:e.skin}:null);break;case"indicator/gauge":t=We({indicatorType:"gauge",skin:e.skin},e.tickerBarHeight?{tickerBarHeight:e.tickerBarHeight}:null);break}return st(We(We({},ll),t),{indicatorComponents:e.indicatorComponents||ll.indicatorComponents,forceTickerView:!!e.forceTickerView})}const LQe=(e,t,n)=>{const r="y"in n&&Array.isArray(n.y)?n.y.some(s=>s.showOnRightAxis):!1;let o;switch(e){case"area":o=vZe(t,n,r);break;case"arearange":case"line":o=gZe(t,n,r);break;case"pie":o=wZe(t);break;case"funnel":o=_Ze(t);break;case"treemap":o=SZe(t);break;case"sunburst":o=CZe(t);break;case"polar":o=TZe(t,n);break;case"indicator":o=DQe(t);break;case"scatter":o=EZe(t);break;case"boxplot":o=AZe(t);break;case"scattermap":o=PZe(t);break;default:throw new kt("errors.chartTypeNotSupported",{chartType:e})}const i="subtype"in t&&t.subtype?t.subtype:"line/basic",a=PQe[i];return We(We({},o),a)};function NQe(e,t,n){const r=Hg(n??{},Fg());if(x1(e)){const o=b1(e);if(!o.designOptions.isCorrectStyleOptions(r))throw new kt("errors.optionsTranslation.invalidStyleOptions",{chartType:e});if(!o.dataOptions.isCorrectDataOptionsInternal(t))throw new kt("errors.optionsTranslation.invalidInternalDataOptions",{chartType:e});return o.designOptions.translateStyleOptionsToDesignOptions(r,t)}else return LQe(e,r,t)}function Hg(e,t){return lo.withOptions({mergeArrays:!1},t,e)}function T2(e,t,n){return IQe(e).map(r=>{const o=r.seriesId,i=r.seriesStyleOptions,a=mZe(t,Hg(i,n));return{seriesId:o,designOptions:OQe(a,["lineWidth","marker"])}}).reduce((r,{seriesId:o,designOptions:i})=>st(We({},r),{[o]:i}),{})}function IQe(e){return e.y.filter(RQe).map(({column:{name:t},seriesStyleOptions:n})=>({seriesId:t,seriesStyleOptions:n}))}function RQe(e){return e.seriesStyleOptions!==void 0}const jQe=e=>El(e)?"cartesian":rp(e)?"categorical":vl(e)?"scatter":Wh(e)?"scattermap":Bg(e)?"indicator":XR(e)?"areamap":op(e)?"boxplot":"table";var zQe=Object.defineProperty,BQe=Object.defineProperties,$Qe=Object.getOwnPropertyDescriptors,HS=Object.getOwnPropertySymbols,Yoe=Object.prototype.hasOwnProperty,Xoe=Object.prototype.propertyIsEnumerable,Zc=Math.pow,xN=(e,t,n)=>t in e?zQe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ne=(e,t)=>{for(var n in t||(t={}))Yoe.call(t,n)&&xN(e,n,t[n]);if(HS)for(var n of HS(t))Xoe.call(t,n)&&xN(e,n,t[n]);return e},tt=(e,t)=>BQe(e,$Qe(t)),wN=e=>typeof e=="symbol"?e:e+"",Ut=(e,t)=>{var n={};for(var r in e)Yoe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&HS)for(var r of HS(e))t.indexOf(r)<0&&Xoe.call(e,r)&&(n[r]=e[r]);return n},u_=(e,t,n)=>(xN(e,typeof t!="symbol"?t+"":t,n),n),Al=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((n=n.apply(e,t)).next())});function FQe(e){let{i18n:t,defaultNS:n,children:r}=e;const o=Ke(()=>({i18n:t,defaultNS:n}),[t,n]);return Qt(nZ.Provider,{value:o},r)}function Rd(e){return e===void 0||typeof e=="string"||"title"in e&&"type"in e}const ha={BOX_MIN_VALUE_NAME:"Box Min",BOX_MEDIAN_VALUE_NAME:"Box Median",BOX_MAX_VALUE_NAME:"Box Max",WHISKER_MIN_VALUE_NAME:"Whisker Min",WHISKER_MAX_VALUE_NAME:"Whisker Max",OUTLIER_COUNT_VALUE_NAME:"Outlier Count",OUTLIER_MIN_VALUE_NAME:"Outlier Min",OUTLIER_MAX_VALUE_NAME:"Outlier Max"};function yj(e){return[Zi(ha.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:e}),Zi(ha.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:e}),Zi(ha.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:e})]}function HQe(e){return[...yj(e),Zi(ha.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:e}),Zi(ha.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:e}),Zi(ha.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:e})]}function WQe(e){return[...yj(e),Zi(ha.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:e}),Zi(ha.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:e})]}function VQe(e){return[...yj(e),Zi(ha.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:e}),Zi(ha.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:e}),Zi(ha.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:e})]}const UQe=WZ(e=>{const t=Ii(e),n=Zi(ha.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:e}),r=Zi(ha.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_IQR([Attr]), all([Attr]))",{Attr:e});return t.name=`${t.name} (Outliers)`,t.jaql=o=>{const i=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:n.jaql(!0)},{toNotEqual:r.jaql(!0)}]}});return o?i:{jaql:i}},t},"boxWhiskerIqrOutliers"),GQe=WZ(e=>{const t=Ii(e),n=Zi(ha.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:e}),r=Zi(ha.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_STDEVP([Attr]), all([Attr]))",{Attr:e});return t.jaql=o=>{const i=Object.assign(Object.assign({},e.jaql(!0)),{filter:{or:[{fromNotEqual:n.jaql(!0)},{toNotEqual:r.jaql(!0)}]}});return o?i:{jaql:i}},t},"boxWhiskerStdDevOutliers");function _u(e){return!!e&&"operator"in e&&(e.operator==="AND"||e.operator==="OR")&&!!e.right&&!!e.left}function d_(e=[],t=[]){if(!_u(e)&&!_u(t))return si(e,t);const{filters:n,relations:r}=yl(e),o=bj(t),i=si(n,o),a=dl(n,r,i);return Xa(i,a)}function yl(e){if(!e)return{filters:[],relations:null};if(Ar(e))return{filters:e,relations:null};const t=new Set;function n(o){if(qoe(o))return t.add(o),{instanceid:o.config.guid};if(_u(o)){const i=n(o.left),a=n(o.right);return{left:i,right:a,operator:o.operator}}throw new A2}const r=n(e);return{filters:Array.from(t),relations:r}}function bj(e){return e?yl(e).filters:[]}function Xa(e,t){if(!t||xj(t))return e;const n=r(t);return qoe(n)?[n]:n;function r(o){if(M2(o))return e.find(i=>i.config.guid===o.instanceid);if(E2(o))return(o.operator==="AND"?Fv.and:Fv.or)(r(o.left),r(o.right));throw new A2}}function xj(e){return!!e&&"instanceid"in e}function dl(e,t,n){if(t===null)return null;const r=XQe(e,n);return r.length===0?t:r.reduce((o,i)=>{switch(i.type){case"add":return qQe(i.payload,o);case"remove":return _N(i.payload,o)}},t)}function R7(e,t){return e.config.guid===t.config.guid}function YQe(e,t,n){if(!e)return null;return r(e);function r(o){if(M2(o))return o.instanceid===t.config.guid?{instanceid:n.config.guid}:o;if(E2(o))return{left:r(o.left),right:r(o.right),operator:o.operator};throw new A2}}function XQe(e,t){const n=[],r=[...e],o=[...t];return r.forEach(i=>{o.some(a=>R7(i,a))||n.push({type:"remove",payload:i})}),o.forEach(i=>{r.some(a=>R7(i,a))||n.push({type:"add",payload:i})}),n}function qQe(e,t){return t?{left:t,right:{instanceid:e.config.guid},operator:"AND"}:{instanceid:e.config.guid}}function _N(e,t){if(!t)return null;if(xj(t))return t.instanceid===e.config.guid?null:t;const n=_N(e,t.left),r=_N(e,t.right);return n===null&&r?r:r===null&&n?n:n===null&&r===null?null:{left:n,right:r,operator:t.operator}}function ZQe(e,t){if(!e)return null;function n(r){if(KQe(r))return{instanceid:r.instanceId};if(QQe(r))return n(r.value);if(JQe(r))return{operator:r.operator,left:n(r.left),right:n(r.right)};if(eJe(r)){const o=t.find(i=>{if(!ui(i))return!1;const a=i.filters.map(s=>s.config.guid);return r.levels.every(s=>a.includes(s.instanceId))});if(o)return{instanceid:o.config.guid};throw new Error("Broken filter relations model. Cascading filter not found.")}throw new Error("Broken filter relations model. Unknown node type.")}return n(e)}function KQe(e){return"instanceId"in e}function QQe(e){return"value"in e}function JQe(e){return"operator"in e}function eJe(e){return"levels"in e&&Ar(e.levels)}function M2(e){return"instanceid"in e}function E2(e){return"operator"in e}function qoe(e){return"config"in e&&"guid"in e.config}function tJe(e,t){if(!e)return;function n(r){if(M2(r)){const o=t.find(i=>i.config.guid===r.instanceid);return o&&ui(o)?{type:"CascadingIdentifier",levels:o.filters.map(i=>({type:"Identifier",instanceId:i.config.guid}))}:{type:"Identifier",instanceId:r.instanceid}}else{if(E2(r))return{type:"LogicalExpression",operator:r.operator,left:n(r.left),right:n(r.right)};throw new Error("Unknown node type in filter relations rules.")}}return n(e)}function nJe(e,t){return e.find(n=>n.config.guid===t)}class A2 extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function SN(e){return e.nodeType==="openBracket"}function CN(e){return e.nodeType==="closeBracket"}function rJe(e){return e.nodeType==="attribute"}function oJe(e){return e.nodeType==="operator"}function Zy(e){if(ui(e))return e.filters.map(Zy).join("-");const{attribute:t}=e,n=e.jaql().jaql,r=t.expression||n.dim,o=t.granularity||((n==null?void 0:n.datatype)==="datetime"?oo.translateJaqlToGranularity(n):"");return`${r}${o}`}function si(e=[],t=[]){const n=[...e];return t.forEach(r=>{const o=n.findIndex(i=>Zy(r)===Zy(i));o!==-1?n[o]=r:n.push(r)}),n}function iJe(e){if(!e)return e;const t=Ii(e);function n(r){if("instanceId"in r)return{instanceid:r.instanceId};if("value"in r)return n(r.value);if("operator"in r){const o={operator:r.operator};return"left"in r&&(o.left=n(r.left)),"right"in r&&(o.right=n(r.right)),o}return r}return n(t)}function aJe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kN(e,t){return kN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},kN(e,t)}const ad={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function Zoe(e,t,n){const r={chart:{textColor:e.dashboards.widgetTextColor,backgroundColor:e.dashboards.widgetBackgroundColor,secondaryTextColor:e.dashboards.widgetSecondaryTextColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:e.typography.fontFamily,primaryTextColor:e.typography.primaryTextColor,secondaryTextColor:e.typography.secondaryTextColor,fontsLoader:{fonts:sJe(e.typography.fontFamily,n,e.typography.customFontSelected)}},palette:{variantColors:t.colors},general:{brandColor:e.general.brandColor,backgroundColor:e.general.backgroundColor,primaryButtonTextColor:e.general.primaryButtonTextColor,primaryButtonHoverColor:e.general.primaryButtonHoverColor,popover:$y().general.popover,buttons:{cancel:{backgroundColor:{default:e.general.secondaryButtonBaseColor,hover:e.general.secondaryButtonHoverColor,focus:e.general.secondaryButtonHoverColor},textColor:e.general.secondaryButtonTextColor}}},widget:{spaceAround:ad[e.dashboards.widgetSpacing],cornerRadius:ad[e.dashboards.widgetCornerRadius],shadow:ad[e.dashboards.widgetShadow],border:e.dashboards.widgetBorderEnabled,borderColor:e.dashboards.widgetBorderColor,header:{titleTextColor:e.dashboards.widgetTitleColor,titleAlignment:ad[e.dashboards.widgetTitleAlignment],titleFontSize:RR,dividerLine:e.dashboards.widgetTitleDividerEnabled,dividerLineColor:e.dashboards.widgetTitleDividerColor,backgroundColor:e.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:e.dashboards.layoutBackgroundColor,dividerLineWidth:NR,dividerLineColor:LR,borderWidth:qm,borderColor:IR,toolbar:{primaryTextColor:e.dashboards.toolbarTextColor,secondaryTextColor:e.dashboards.toolbarSecondaryTextColor,backgroundColor:e.dashboards.toolbarBackgroundColor}},filter:{panel:{titleColor:e.dashboards.panelTitleTextColor,backgroundColor:e.dashboards.panelBackgroundColor,borderWidth:qm,borderColor:_ne}}};return lo.withOptions({mergeArrays:!1},$y(),r)}function Koe(e){return e.dashboards.colorPaletteName}function sJe(e,t,n){const r=n?"fonts/":"resources/base/fonts/";return[{fontFamily:e,fontWeight:"normal",fontStyle:"normal",src:[{url:`${t}${r}${e}-Regular.eot`},{local:`${e}-Regular`},{url:`${t}${r}${e}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-Regular.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:600,fontStyle:"normal",src:[{url:`${t}${r}${e}-SemiBold.eot`},{local:`${e}-SemiBold`},{url:`${t}${r}${e}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:e,fontWeight:"bold",fontStyle:"normal",src:[{url:`${t}${r}${e}-Bold.eot`},{local:`${e}-Bold`},{url:`${t}${r}${e}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${t}${r}${e}-Bold.ttf`,format:"truetype"}]}]}function Qoe(e,t){return Al(this,null,function*(){const n=yield lJe(e,t);if(!n)throw new kt("errors.themeNotFound",{themeOid:e});const r=Koe(n),o=yield Joe(r,t);return Zoe(n,o,t.url)})}function lJe(e,t){return Al(this,null,function*(){return t.get(`api/v1/themes/${e}`).catch(()=>{throw new kt("errors.themeNotFound",{themeOid:e})})})}function Joe(e,t){return Al(this,null,function*(){const n=yield t.get(`api/palettes/${e}`);if(n&&"status"in n&&n.status==="error")throw new kt("errors.paletteNotFound",{paletteName:e});return n})}const cJe={sdkComponentInit:{internal:!0,external:!0},sdkHookInit:{internal:!0,external:!0},sdkError:{internal:!0,external:!1},sdkCliExec:{internal:!0,external:!1},sdkAngularServiceMethodExecuted:{internal:!0,external:!0}},j7="composesdk",eie=(e,t,n,r=!1)=>{const o=Object.assign({action:e,cat:j7,eventType:"product",direct:!0},t);return r&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",o),Promise.resolve()):n.post("api/activities/",[o],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(i=>{console.error(`unable to log action=${e}, category=${j7}`,i)})},z7=(e,t,n,r,o)=>{const i=cJe[`${e}`];return i.internal&&eie(e,t,n,o),i.external&&r&&r(Ne({action:e},t)),Promise.resolve()},wj=()=>{var e,t;const{tracking:n,app:r}=Ln(),o=(t=(e=r==null?void 0:r.httpClient)==null?void 0:e.auth)==null?void 0:t.type,i=He((s,l={},c=!1)=>r?z7(s,tt(Ne({},l),{authType:o}),r.httpClient,n.onTrackingEvent,c):Promise.resolve(),[n,r,o]),a=He((s,l=!1)=>{if(!r)return Promise.resolve();const{packageName:c,packageVersion:d,component:h,error:u}=s;let w="";return typeof u=="string"?w=u:u instanceof Error&&(w=u.message||u.toString()),z7("sdkError",tt(Ne({},{packageName:c,packageVersion:d,component:h,error:w}),{authType:o}),r.httpClient,n.onTrackingEvent,l)},[n,r,o]);return{trackEvent:i,trackError:a}},uJe="sdkComponentInit",tie=pn(!1),dJe=({skipNested:e=!0,children:t})=>ge(tie.Provider,{value:e,children:t}),pJe=(e,t)=>{const{tracking:n,app:r}=Ln(),{trackEvent:o}=wj(),i=en(tie),a=Ye(!1);Je(()=>{if(!(!n||!r)&&!a.current&&!i){const s={packageName:n.packageName,packageVersion:"2.4.1",componentName:e,attributesUsed:Object.entries(t).filter(([,l])=>!!l).map(([l])=>l).join(", ")};o(uJe,s,!n.enabled).finally(()=>a.current=!0)}},[e,t,n,i,o,r])};var hJe="[object Boolean]";function nie(e){return e===!0||e===!1||ga(e)&&kl(e)==hJe}const rie=class extends Dn{constructor(e){super(e),this.postponedErrors=[],this.handler=e.handler,this.componentName=e.componentName}componentDidMount(){var e;this.context.isInitialized&&(this.httpClient=(e=this.context.app)==null?void 0:e.httpClient)}componentDidCatch(e){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(e):this.postponedErrors.push(e)),e}sendErrorTracking(e){try{this.handler({packageName:"sdk-ui",packageVersion:"2.4.1",component:this.componentName,error:e})}catch(t){console.log("Failed to send tracking error event: ",t)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(e=>this.sendErrorTracking(e)),this.postponedErrors=[],this.props.children}};rie.contextType=$R;let fJe=rie;const mJe=({componentName:e,config:t})=>{const{skip:n,transparent:r}=t||{};return o=>function(i){const{trackError:a}=wj();return nie(n)&&n||fu(n)&&n(i)?ge(o,Ne({},i)):(pJe(e,i),ge(dJe,{skipNested:!r,children:ge(fJe,{componentName:e,handler:a,children:ge(o,Ne({},i))})}))}},gJe="_container_1wquj_1",vJe="_card_1wquj_11",yJe="_text_1wquj_19",oO={container:gJe,card:vJe,text:yJe};function oie({color:e="#FFCB05"}){return ge("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:ge("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:ot("g",{children:[ge("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:e}),ge("path",{d:"M24.5,39.054 L24.5,35.054 L28.5,35.054 L28.5,39.054 L24.5,39.054 Z M28.5,31.0536 L24.5,31.0536 L23.5,13.0536 L29.5,13.0536 L28.5,31.0536 Z",fill:"#FFFFFF"})]})})})}const iie=({error:e=new kt("errors.componentRenderError")})=>{var t,n,r,o,i,a;const{themeSettings:s}=Lt(),{app:l}=Ln(),{t:c}=Jt(),[d,h]=Ge(!1),u=()=>{h(!0)},w=()=>{h(!1)},y=ge("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:ge(oie,{color:(t=s==null?void 0:s.general)==null?void 0:t.brandColor})}),p=e instanceof Lb?c(e.key,Ne({},e.interpolationOptions)):c(e instanceof Error?e.message:e),k=c("errorBoxText",{errorMessage:p,interpolation:{escapeValue:!1}}),j=(r=(n=l==null?void 0:l.settings)==null?void 0:n.errorBoundaryConfig)==null?void 0:r.alwaysShowErrorText;return ge("div",{onMouseEnter:j?void 0:u,onMouseLeave:j?void 0:w,className:oO.container,"aria-label":"error-box",children:ot("div",{className:oO.card,style:{backgroundColor:((o=s==null?void 0:s.general)==null?void 0:o.backgroundColor)||"rgba(255,255,255,0.5)"},children:[y,(j||d)&&ge("div",{className:oO.text,style:{color:((i=s==null?void 0:s.typography)==null?void 0:i.primaryTextColor)||di,fontFamily:((a=s==null?void 0:s.typography)==null?void 0:a.fontFamily)||"inherit"},children:k})]})})};let TN=class extends Dn{constructor(e){super(e),this.showErrorBox=!0,this.onError=e.onError,this.isContainerComponent=e.isContainerComponent||!1,this.state={error:null,customErrorUI:null}}static getDerivedStateFromError(e){return{error:e,customErrorUI:null}}componentDidCatch(e){const t=e instanceof Error?e:new Error(e);if(this.onError){const n=this.onError(t);if(n!==void 0&&Tn(n)){this.setState({error:e,customErrorUI:n});return}}this.setState({error:e})}componentDidUpdate(e,t){if(t.error!==null&&bJe(e.resetKeys,this.props.resetKeys)&&this.setState({error:null,customErrorUI:null}),this.props.error&&!e.error&&!t.error&&!this.state.error&&this.onError){const n=this.props.error instanceof Error?this.props.error:new Error(String(this.props.error)),r=this.onError(n);r!==void 0&&Tn(r)&&this.setState({customErrorUI:r})}}render(){const{error:e,customErrorUI:t}=this.state,{shouldRenderChildrenWithProvidedError:n,showErrorBox:r,error:o,children:i}=this.props,a=e||o;return!a||o&&!e&&n?i:r?t||ge(iie,{error:a}):null}};function bJe(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Ra(n,t[r]))}const _j=({componentName:e})=>t=>function(n){const r=Ln(),o=i=>{var a,s;return(s=(a=r.errorBoundary).onError)==null?void 0:s.call(a,i,{componentName:e,componentProps:n})};return ge(TN,{resetKeys:Object.values(n),showErrorBox:r.errorBoundary.showErrorBox,onError:o,isContainerComponent:!!(n!=null&&n.children),children:ge(t,Ne({},n))})};function aie(){var e,t;return(t=(e=document.head.querySelector('meta[property="csp-nonce"]'))==null?void 0:e.getAttribute("content"))!=null?t:void 0}const B7=aie(),O2=({color:e})=>{const t={backgroundColor:e||"#333333",float:"left",width:"10px",height:"10px",marginRight:"7px",WebkitAnimation:"loading-dots-animation 1.8s infinite ease-in-out",animation:"loading-dots-animation 1.8s infinite ease-in-out",borderRadius:"50%",opacity:.75},n=tt(Ne({},t),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),r=tt(Ne({},t),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),o=tt(Ne({},t),{marginRight:"unset"}),i={"0%, 80%, 100%":{WebkitTransform:"scale(0) rotate(0deg)",transform:"scale(0) rotate(0deg)"},"40%":{WebkitTransform:"scale(1) rotate(0.02deg)",transform:"scale(1) rotate(0.02deg)"}};return ot("div",{children:[ge("style",tt(Ne({},B7&&{nonce:B7}),{children:`
670
670
  @keyframes loading-dots-animation {
671
671
  ${Object.entries(i).map(([a,s])=>`${a} { ${Object.entries(s).map(([l,c])=>`${l}: ${c};`).join("")} }`).join("")}
672
672
  }
@@ -997,7 +997,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
997
997
  `:null,VCt=typeof I3!="string"?ca`
998
998
  animation: ${I3} 1.4s ease-in-out infinite;
999
999
  `:null,UCt=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${nn(r)}`],svg:["svg"],circle:["circle",`circle${nn(n)}`,o&&"circleDisableShrink"]};return lr(i,HCt,t)},GCt=Gt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${nn(n.color)}`]]}})(xr(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:WCt||{animation:`${N3} 1.4s linear infinite`}},...Object.entries(e.palette).filter(_c()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),YCt=Gt("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),XCt=Gt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${nn(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(xr(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:VCt||{animation:`${I3} 1.4s ease-in-out infinite`}}]}))),N4=Tt(function(e,t){const n=cr({props:e,name:"MuiCircularProgress"}),r=n,{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:d=0,variant:h="indeterminate"}=r,u=Ut(r,["className","color","disableShrink","size","style","thickness","value","variant"]),w=tt(Ne({},n),{color:i,disableShrink:a,size:s,thickness:c,value:d,variant:h}),y=UCt(w),p={},k={},j={};if(h==="determinate"){const F=2*Math.PI*((qu-c)/2);p.strokeDasharray=F.toFixed(3),j["aria-valuenow"]=Math.round(d),p.strokeDashoffset=`${((100-d)/100*F).toFixed(3)}px`,k.transform="rotate(-90deg)"}return Me(GCt,tt(Ne(Ne({className:Wt(y.root,o),style:Ne(Ne({width:s,height:s},k),l),ownerState:w,ref:t,role:"progressbar"},j),u),{children:Me(YCt,{className:y.svg,ownerState:w,viewBox:`${qu/2} ${qu/2} ${qu} ${qu}`,children:Me(XCt,{className:y.circle,style:p,ownerState:w,cx:qu,cy:qu,r:(qu-c)/2,fill:"none",strokeWidth:c})})}))});process.env.NODE_ENV!=="production"&&(N4.propTypes={classes:ue.object,className:ue.string,color:ue.oneOfType([ue.oneOf(["inherit","primary","secondary","error","info","success","warning"]),ue.string]),disableShrink:ju(ue.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:ue.oneOfType([ue.number,ue.string]),style:ue.object,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),thickness:ue.number,value:ue.number,variant:ue.oneOf(["determinate","indeterminate"])});function qCt(e){return Vn("MuiIconButton",e)}const $G=er("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),ZCt=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e,s={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${nn(r)}`,o&&`edge${nn(o)}`,`size${nn(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return lr(s,qCt,t)},KCt=Gt(lp,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${nn(n.color)}`],n.edge&&t[`edge${nn(n.edge)}`],t[`size${nn(n.size)}`]]}})(xr(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:qn(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),xr(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(_c()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(_c()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:qn((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${$G.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${$G.loading}`]:{color:"transparent"}}))),QCt=Gt("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Ls=Tt(function(e,t){const n=cr({props:e,name:"MuiIconButton"}),r=n,{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:d="medium",id:h,loading:u=null,loadingIndicator:w}=r,y=Ut(r,["edge","children","className","color","disabled","disableFocusRipple","size","id","loading","loadingIndicator"]),p=Y2(h),k=w??Me(N4,{"aria-labelledby":p,color:"inherit",size:16}),j=tt(Ne({},n),{edge:o,color:s,disabled:l,disableFocusRipple:c,loading:u,loadingIndicator:k,size:d}),F=ZCt(j);return Me(KCt,tt(Ne({id:u?p:h,className:Wt(F.root,a),centerRipple:!0,focusRipple:!c,disabled:l||u,ref:t},y),{ownerState:j,children:[typeof u=="boolean"&&Me("span",{className:F.loadingWrapper,style:{display:"contents"},children:Me(QCt,{className:F.loadingIndicator,ownerState:j,children:u&&k})}),i]}))});process.env.NODE_ENV!=="production"&&(Ls.propTypes={children:ju(ue.node,e=>Ai.toArray(e.children).some(t=>Tn(t)&&t.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
1000
- `)):null),classes:ue.object,className:ue.string,color:ue.oneOfType([ue.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),ue.string]),disabled:ue.bool,disableFocusRipple:ue.bool,disableRipple:ue.bool,edge:ue.oneOf(["end","start",!1]),id:ue.string,loading:ue.bool,loadingIndicator:ue.node,size:ue.oneOfType([ue.oneOf(["small","medium","large"]),ue.string]),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});function JCt({fill:e="rgba(38, 46, 61, 0.67)"}){return ge("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:ge("path",{fill:e,d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function ekt({title:e,description:t,errorMessages:n=[],styleOptions:r,onRefresh:o}){var i,a,s;const[l,c]=Ge(null),{themeSettings:d}=Lt(),{typography:{primaryTextColor:h,secondaryTextColor:u,fontFamily:w}}=d,{t:y}=Jt(),p=H=>{c(H.currentTarget)},k=()=>{c(null)},j=Ke(()=>e?ge(Yi,{variant:"body2",style:{color:h,fontFamily:w,fontSize:13},children:e}):null,[e,h,w]),F=Ke(()=>n.length===0?null:n.map(H=>ot(bn,{children:[ge(qp,{sx:{my:1,borderColor:u,opacity:.3,marginY:"8px"}}),ot("div",{className:"csdk-flex",children:[ge("div",{className:"csdk-shrink-0 csdk-grow-0",children:ge(JCt,{fill:"#fa5656"})}),ge(Yi,{variant:"body2",className:"csdk-grow-1",style:{color:u,fontFamily:w,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:H})]})]})),[n,u,w]),U=Ke(()=>t?ot(bn,{children:[ge(qp,{sx:{my:"8px",borderColor:u,opacity:.3}}),ge(Yi,{variant:"body2",style:{color:u,fontFamily:w,fontSize:13},children:t})]}):null,[t,u,w]);return ot(bn,{children:[ge(Mu,{title:y("widgetHeader.info.tooltip"),style:{color:(i=d.chart)==null?void 0:i.textColor,fontFamily:(a=d.typography)==null?void 0:a.fontFamily},children:ge(Ls,{onClick:p,sx:{p:0},children:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ge("path",{fill:(r==null?void 0:r.titleTextColor)||d.widget.header.titleTextColor,d:"M11.5 20a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm0-1a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zm-.5-8h1v5h-1v-5zm0-1v-.998h1V10h-1z"})})})}),ge(qh,{open:!!l,position:l?{anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:k,children:ot(Ele,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[ot("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:fi(d.general.backgroundColor)},children:[ge(Yi,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:d.typography.primaryTextColor,fontFamily:d.typography.fontFamily},children:y("widgetHeader.info.details")}),ge(Ls,{onClick:o,sx:{p:0},children:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ge("path",{fill:(s=d.chart)==null?void 0:s.textColor,d:"M20 12a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm0 0a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm-8-7a7 7 0 0 1 6.267 3.877l1.003-.22A8.001 8.001 0 0 0 4 12l1.003-.22A7 7 0 0 1 12 5zm6.998 3.12A8 8 0 0 0 4 12l1.003-.22a7 7 0 0 1 13.264-2.903l.73-.16v.28l-2.98.016-.017.971h3.985V6h-.987v2.12zm-14.01 9.864H4V14h3.985l-.016.971-2.981.017v2.996z"})})})]}),ge(qp,{sx:{borderColor:d.typography.secondaryTextColor,opacity:.3}}),ot(Ale,{style:{backgroundColor:d.general.backgroundColor,padding:12},children:[j,F,U]})]})})]})}const tkt=({title:e,description:t,errorMessages:n=[],warningMessages:r=[],dataSetName:o,styleOptions:i,onRefresh:a})=>{var s,l,c;const{themeSettings:d}=Lt(),h=()=>{var u;const w=ge(bn,{children:ge(ekt,{title:o,description:t,styleOptions:i,errorMessages:n,warningMessages:r,onRefresh:a})});return i!=null&&i.renderToolbar?(u=i==null?void 0:i.renderToolbar)==null?void 0:u.call(i,a,w):w};return ot(bn,{children:[ot("div",{className:"csdk-flex csdk-flex-row csdk-items-center csdk-px-2 csdk-min-h-[32px]",style:{backgroundColor:(i==null?void 0:i.backgroundColor)||d.widget.header.backgroundColor},children:[ge("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:nkt((i==null?void 0:i.titleAlignment)||d.widget.header.titleAlignment),color:(i==null?void 0:i.titleTextColor)||d.widget.header.titleTextColor,fontFamily:(s=d.typography)==null?void 0:s.fontFamily,fontSize:d.widget.header.titleFontSize},children:(c=(l=i==null?void 0:i.renderTitle)==null?void 0:l.call(i,e))!=null?c:e}),ge("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:h()})]}),Sd(i,"dividerLine",d.widget.header.dividerLine)&&ge(qp,{style:{backgroundColor:(i==null?void 0:i.dividerLineColor)||d.widget.header.dividerLineColor||"#e6e6e6"}})]})};function nkt(e){return e.toLowerCase()}const MT=e=>ge(OCt,{children:ge(rkt,Ne({},e))}),rkt=({dataSetName:e,styleOptions:t,title:n,description:r,topSlot:o,bottomSlot:i,children:a,onRefresh:s=()=>{}})=>{var l,c,d;const{errors:h,warnings:u}=kle(),{themeSettings:w}=Lt();return ge("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:ge("div",{className:"csdk-h-full",style:{padding:Mle[Sd(t,"spaceAround",w.widget.spaceAround)]||"0px"},children:ot("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:Sd(t,"border",w.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||w.widget.borderColor,borderRadius:NCt[(t==null?void 0:t.cornerRadius)||w.widget.cornerRadius]||0,boxShadow:ICt(t,w),display:"flex",flexDirection:"column"},children:[!((l=t==null?void 0:t.header)!=null&&l.hidden)&&ge(tkt,{title:n,description:r,dataSetName:e,errorMessages:h,warningMessages:u,styleOptions:t==null?void 0:t.header,onRefresh:s}),o,ge(tb,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((c=w.chart)==null?void 0:c.backgroundColor)}},children:ge("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((d=w.chart)==null?void 0:d.backgroundColor)},children:a})}),i]})})})},ET=e=>{const t=okt(e);return t.config.disabled=!e.config.disabled,t},okt=e=>{const t=Ii(e);return Object.setPrototypeOf(t,e),t};function ikt(e,t,n){return ti(e,[],{guid:t,excludeMembers:!1,backgroundFilter:n})}function AT(e){if(!Pi(e))throw new kt("errors.notAMembersFilter");const{attribute:t,config:{guid:n,backgroundFilter:r}}=e;return ikt(t,n,r)}function I4(e){return"members"in e&&e.members.length===0}function Ia(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function xh(e,t){return e===void 0&&t===void 0?!1:[e,t].some(n=>n===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.some((n,r)=>!zoe(n,t[r],Ole))}function R4(e,t){return Ia(e.attribute,t.attribute)}function Ole(e,t){const n=Ed(akt,skt);return Ra(n(e),n(t))}function akt(e){return tt(Ne({},e),{name:""})}function skt(e){return tt(Ne({},e),{config:tt(Ne({},e.config),{guid:""})})}function lkt(e,t,n,r){if(n===void 0&&r===void 0)return!1;if([n,r].some(i=>i===void 0))return!0;function o(i,a){const s=i,l=i,c=a,d=a;return i===void 0&&a===void 0?!0:[i,a].some(h=>h===void 0)||s.operator!==c.operator?!1:l.instanceid&&d.instanceid?!xh(e==null?void 0:e.filter(h=>h.config.guid===l.instanceid),t==null?void 0:t.filter(h=>h.config.guid===d.instanceid)):o(s.left,c.left)&&o(s.right,c.right)||o(s.left,c.right)&&o(s.right,c.left)}return!o(n,r)}const Ple="sdkHookInit",ckt=(e,t,n,r)=>{n&&eie(Ple,{packageName:t,packageVersion:"2.4.0",hookName:e},n.httpClient).finally(r)};function ukt(e){const{tracking:t,app:n}=Ln(),{trackEvent:r}=wj(),o=Ye(!1);Je(()=>{if(!(!t||!n)&&!o.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"2.4.0",hookName:e};r(Ple,i,!t.enabled).finally(()=>o.current=!0)}},[t,e,r,n])}const j4=e=>t=>(...n)=>(ukt(e),t(...n));function Hd(e,t){switch(t.type){case"loading":return dkt(e);case"success":return pkt(t.data);case"error":return hkt(t.error)}}function dkt(e){return e.status==="loading"?e:tt(Ne({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function pkt(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function hkt(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}function Qg({enabled:e},t){const n=Ye(!1);return He((r,o=!1)=>{const i=e===!1||!r,a=n.current;return n.current=i,!i&&(a||t||o)},[e,t])}var HO=function(){return Qi.Date.now()},fkt="Expected a function",mkt=Math.max,gkt=Math.min;function D1(e,t,n){var r,o,i,a,s,l,c=0,d=!1,h=!1,u=!0;if(typeof e!="function")throw new TypeError(fkt);t=By(t)||0,Oi(n)&&(d=!!n.leading,h="maxWait"in n,i=h?mkt(By(n.maxWait)||0,t):i,u="trailing"in n?!!n.trailing:u);function w(z){var I=r,N=o;return r=o=void 0,c=z,a=e.apply(N,I),a}function y(z){return c=z,s=setTimeout(j,t),d?w(z):a}function p(z){var I=z-l,N=z-c,W=t-I;return h?gkt(W,i-N):W}function k(z){var I=z-l,N=z-c;return l===void 0||I>=t||I<0||h&&N>=i}function j(){var z=HO();if(k(z))return F(z);s=setTimeout(j,p(z))}function F(z){return s=void 0,u&&r?w(z):(r=o=void 0,a)}function U(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function H(){return s===void 0?a:F(HO())}function R(){var z=HO(),I=k(z);if(r=arguments,o=this,l=z,I){if(s===void 0)return y(l);if(h)return clearTimeout(s),s=setTimeout(j,t),w(l)}return s===void 0&&(s=setTimeout(j,t)),a}return R.cancel=U,R.flush=H,R}function Cc(e,{onLocalStateChange:t,syncCompareFn:n=Ra}={}){const[r,o]=Ge(e),i=Ye(e);Je(()=>{n(i.current,e)||o(e),i.current=e},[e,n]);const a=He(s=>{o(l=>{const c=fu(s)?s(l):s;return t==null||t(c),c})},[t]);return[r,a]}function vkt({chartType:e,dataOptions:t,enabled:n}){const[r,o]=Ge([]),i=Ke(()=>{var h;const u=El(e)&&((h=t.category)==null?void 0:h.length)===1||vl(e);return n&&u},[n,e,t]),a=Ke(()=>{if(r.length===0)return h=>tt(Ne({},h),{series:h.series.map(u=>tt(Ne({},u),{data:u.data.map(w=>tt(Ne({},w),{selected:!1}))}))});if(vl(e))return h=>tt(Ne({},h),{series:h.series.map(u=>tt(Ne({},u),{data:u.data.map(w=>tt(Ne({},w),{selected:!r.some(y=>{var p,k;return y.x===w.x&&y.y===w.y&&y.size===w.z&&y.breakByPoint===((p=w.custom)==null?void 0:p.maskedBreakByPoint)&&y.breakByColor===((k=w.custom)==null?void 0:k.maskedBreakByColor)})}))}))});{const h=r.reduce((u,{categoryValue:w})=>(w&&(u[`${w}`]=!0),u),{});return u=>tt(Ne({},u),{series:u.series.map(w=>tt(Ne({},w),{data:w.data.map(y=>{var p,k;return h[(k=(p=y.custom)==null?void 0:p.xValue)==null?void 0:k[0]]?y:tt(Ne({},y),{selected:!0})})}))})}},[r,e]),s=Ke(()=>h=>{var u;return tt(Ne({},h),{chart:tt(Ne({},h.chart),{events:tt(Ne({},(u=h.chart)==null?void 0:u.events),{click:()=>{o([])}})})})},[]),l=He(h=>(i&&(h=a(h),h=s(h)),h),[a,s,i]),c=He(h=>{i&&o(h)},[i]),d=He(h=>{i&&o([h])},[i]);return{onBeforeRender:l,onDataPointsSelected:c,onDataPointClick:d}}const L1=()=>{const e=P2();if(!e)throw new kt("errors.missingMenuRoot");const{openMenu:t,closeMenu:n}=e;return{openMenu:t,closeMenu:n}};function R3(e){return e&&e.length?Yj(e):[]}function ykt(e,t,n,r){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bkt(e,t){return function(n,r){if(n==null)return n;if(!zb(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var xkt=bkt(GI);function wkt(e,t,n,r){return xkt(e,function(o,i,a){t(r,o,n(o),a)}),r}function Dle(e,t){return function(n,r){var o=Ar(n)?ykt:wkt,i=t?t():{};return o(n,e,Dh(r),i)}}var N1=Dle(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});const _kt=Xh(Me("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Skt=Gt(lp)(xr(({theme:e})=>tt(Ne({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]}),{borderRadius:2,"&:hover, &:focus":Ne({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":Ne({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:DN(e.palette.grey[200],.12)}:{backgroundColor:DN(e.palette.grey[600],.12)})}))),Ckt=Gt(_kt)({width:24,height:16});function Lle(e){const t=e,{slots:n={},slotProps:r={}}=t,o=Ut(t,["slots","slotProps"]),i=e;return Me("li",{children:Me(Skt,tt(Ne({focusRipple:!0},o),{ownerState:i,children:Me(Ckt,Ne({as:n.CollapsedIcon,ownerState:i},r.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(Lle.propTypes={slotProps:ue.shape({collapsedIcon:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({CollapsedIcon:ue.elementType}),sx:ue.object});function kkt(e){return Vn("MuiBreadcrumbs",e)}const Tkt=er("MuiBreadcrumbs",["root","ol","li","separator"]),Mkt=e=>{const{classes:t}=e;return lr({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},kkt,t)},Ekt=Gt(Yi,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Tkt.li}`]:t.li},t.root]})({}),Akt=Gt("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Okt=Gt("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Pkt(e,t,n,r){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,Me(Okt,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${a}`)):o.push(i),o),[])}const Nle=Tt(function(e,t){const n=cr({props:e,name:"MuiBreadcrumbs"}),r=n,{children:o,className:i,component:a="nav",slots:s={},slotProps:l={},expandText:c="Show path",itemsAfterCollapse:d=1,itemsBeforeCollapse:h=1,maxItems:u=8,separator:w="/"}=r,y=Ut(r,["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),[p,k]=Ge(!1),j=tt(Ne({},n),{component:a,expanded:p,expandText:c,itemsAfterCollapse:d,itemsBeforeCollapse:h,maxItems:u,separator:w}),F=Mkt(j),U=Mj({elementType:s.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:j}),H=Ye(null),R=I=>{const N=()=>{k(!0);const W=H.current.querySelector("a[href],button,[tabindex]");W&&W.focus()};return h+d>=I.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${d}} + itemsBeforeCollapse={${h}} >= maxItems={${u}}`].join(`
1000
+ `)):null),classes:ue.object,className:ue.string,color:ue.oneOfType([ue.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),ue.string]),disabled:ue.bool,disableFocusRipple:ue.bool,disableRipple:ue.bool,edge:ue.oneOf(["end","start",!1]),id:ue.string,loading:ue.bool,loadingIndicator:ue.node,size:ue.oneOfType([ue.oneOf(["small","medium","large"]),ue.string]),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});function JCt({fill:e="rgba(38, 46, 61, 0.67)"}){return ge("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:ge("path",{fill:e,d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function ekt({title:e,description:t,errorMessages:n=[],styleOptions:r,onRefresh:o}){var i,a,s;const[l,c]=Ge(null),{themeSettings:d}=Lt(),{typography:{primaryTextColor:h,secondaryTextColor:u,fontFamily:w}}=d,{t:y}=Jt(),p=H=>{c(H.currentTarget)},k=()=>{c(null)},j=Ke(()=>e?ge(Yi,{variant:"body2",style:{color:h,fontFamily:w,fontSize:13},children:e}):null,[e,h,w]),F=Ke(()=>n.length===0?null:n.map(H=>ot(bn,{children:[ge(qp,{sx:{my:1,borderColor:u,opacity:.3,marginY:"8px"}}),ot("div",{className:"csdk-flex",children:[ge("div",{className:"csdk-shrink-0 csdk-grow-0",children:ge(JCt,{fill:"#fa5656"})}),ge(Yi,{variant:"body2",className:"csdk-grow-1",style:{color:u,fontFamily:w,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:H})]})]})),[n,u,w]),U=Ke(()=>t?ot(bn,{children:[ge(qp,{sx:{my:"8px",borderColor:u,opacity:.3}}),ge(Yi,{variant:"body2",style:{color:u,fontFamily:w,fontSize:13},children:t})]}):null,[t,u,w]);return ot(bn,{children:[ge(Mu,{title:y("widgetHeader.info.tooltip"),style:{color:(i=d.chart)==null?void 0:i.textColor,fontFamily:(a=d.typography)==null?void 0:a.fontFamily},children:ge(Ls,{onClick:p,sx:{p:0},children:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ge("path",{fill:(r==null?void 0:r.titleTextColor)||d.widget.header.titleTextColor,d:"M11.5 20a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm0-1a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zm-.5-8h1v5h-1v-5zm0-1v-.998h1V10h-1z"})})})}),ge(qh,{open:!!l,position:l?{anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:k,children:ot(Ele,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[ot("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:fi(d.general.backgroundColor)},children:[ge(Yi,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:d.typography.primaryTextColor,fontFamily:d.typography.fontFamily},children:y("widgetHeader.info.details")}),ge(Ls,{onClick:o,sx:{p:0},children:ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ge("path",{fill:(s=d.chart)==null?void 0:s.textColor,d:"M20 12a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm0 0a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm-8-7a7 7 0 0 1 6.267 3.877l1.003-.22A8.001 8.001 0 0 0 4 12l1.003-.22A7 7 0 0 1 12 5zm6.998 3.12A8 8 0 0 0 4 12l1.003-.22a7 7 0 0 1 13.264-2.903l.73-.16v.28l-2.98.016-.017.971h3.985V6h-.987v2.12zm-14.01 9.864H4V14h3.985l-.016.971-2.981.017v2.996z"})})})]}),ge(qp,{sx:{borderColor:d.typography.secondaryTextColor,opacity:.3}}),ot(Ale,{style:{backgroundColor:d.general.backgroundColor,padding:12},children:[j,F,U]})]})})]})}const tkt=({title:e,description:t,errorMessages:n=[],warningMessages:r=[],dataSetName:o,styleOptions:i,onRefresh:a})=>{var s,l,c;const{themeSettings:d}=Lt(),h=()=>{var u;const w=ge(bn,{children:ge(ekt,{title:o,description:t,styleOptions:i,errorMessages:n,warningMessages:r,onRefresh:a})});return i!=null&&i.renderToolbar?(u=i==null?void 0:i.renderToolbar)==null?void 0:u.call(i,a,w):w};return ot(bn,{children:[ot("div",{className:"csdk-flex csdk-flex-row csdk-items-center csdk-px-2 csdk-min-h-[32px]",style:{backgroundColor:(i==null?void 0:i.backgroundColor)||d.widget.header.backgroundColor},children:[ge("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:nkt((i==null?void 0:i.titleAlignment)||d.widget.header.titleAlignment),color:(i==null?void 0:i.titleTextColor)||d.widget.header.titleTextColor,fontFamily:(s=d.typography)==null?void 0:s.fontFamily,fontSize:d.widget.header.titleFontSize},children:(c=(l=i==null?void 0:i.renderTitle)==null?void 0:l.call(i,e))!=null?c:e}),ge("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:h()})]}),Sd(i,"dividerLine",d.widget.header.dividerLine)&&ge(qp,{style:{backgroundColor:(i==null?void 0:i.dividerLineColor)||d.widget.header.dividerLineColor||"#e6e6e6"}})]})};function nkt(e){return e.toLowerCase()}const MT=e=>ge(OCt,{children:ge(rkt,Ne({},e))}),rkt=({dataSetName:e,styleOptions:t,title:n,description:r,topSlot:o,bottomSlot:i,children:a,onRefresh:s=()=>{}})=>{var l,c,d;const{errors:h,warnings:u}=kle(),{themeSettings:w}=Lt();return ge("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:ge("div",{className:"csdk-h-full",style:{padding:Mle[Sd(t,"spaceAround",w.widget.spaceAround)]||"0px"},children:ot("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(t==null?void 0:t.backgroundColor)||"unset",borderWidth:Sd(t,"border",w.widget.border)?"1px":0,borderColor:(t==null?void 0:t.borderColor)||w.widget.borderColor,borderRadius:NCt[(t==null?void 0:t.cornerRadius)||w.widget.cornerRadius]||0,boxShadow:ICt(t,w),display:"flex",flexDirection:"column"},children:[!((l=t==null?void 0:t.header)!=null&&l.hidden)&&ge(tkt,{title:n,description:r,dataSetName:e,errorMessages:h,warningMessages:u,styleOptions:t==null?void 0:t.header,onRefresh:s}),o,ge(tb,{theme:{chart:{backgroundColor:(t==null?void 0:t.backgroundColor)||((c=w.chart)==null?void 0:c.backgroundColor)}},children:ge("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(t==null?void 0:t.backgroundColor)||((d=w.chart)==null?void 0:d.backgroundColor)},children:a})}),i]})})})},ET=e=>{const t=okt(e);return t.config.disabled=!e.config.disabled,t},okt=e=>{const t=Ii(e);return Object.setPrototypeOf(t,e),t};function ikt(e,t,n){return ti(e,[],{guid:t,excludeMembers:!1,backgroundFilter:n})}function AT(e){if(!Pi(e))throw new kt("errors.notAMembersFilter");const{attribute:t,config:{guid:n,backgroundFilter:r}}=e;return ikt(t,n,r)}function I4(e){return"members"in e&&e.members.length===0}function Ia(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function xh(e,t){return e===void 0&&t===void 0?!1:[e,t].some(n=>n===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.some((n,r)=>!zoe(n,t[r],Ole))}function R4(e,t){return Ia(e.attribute,t.attribute)}function Ole(e,t){const n=Ed(akt,skt);return Ra(n(e),n(t))}function akt(e){return tt(Ne({},e),{name:""})}function skt(e){return tt(Ne({},e),{config:tt(Ne({},e.config),{guid:""})})}function lkt(e,t,n,r){if(n===void 0&&r===void 0)return!1;if([n,r].some(i=>i===void 0))return!0;function o(i,a){const s=i,l=i,c=a,d=a;return i===void 0&&a===void 0?!0:[i,a].some(h=>h===void 0)||s.operator!==c.operator?!1:l.instanceid&&d.instanceid?!xh(e==null?void 0:e.filter(h=>h.config.guid===l.instanceid),t==null?void 0:t.filter(h=>h.config.guid===d.instanceid)):o(s.left,c.left)&&o(s.right,c.right)||o(s.left,c.right)&&o(s.right,c.left)}return!o(n,r)}const Ple="sdkHookInit",ckt=(e,t,n,r)=>{n&&eie(Ple,{packageName:t,packageVersion:"2.4.1",hookName:e},n.httpClient).finally(r)};function ukt(e){const{tracking:t,app:n}=Ln(),{trackEvent:r}=wj(),o=Ye(!1);Je(()=>{if(!(!t||!n)&&!o.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"2.4.1",hookName:e};r(Ple,i,!t.enabled).finally(()=>o.current=!0)}},[t,e,r,n])}const j4=e=>t=>(...n)=>(ukt(e),t(...n));function Hd(e,t){switch(t.type){case"loading":return dkt(e);case"success":return pkt(t.data);case"error":return hkt(t.error)}}function dkt(e){return e.status==="loading"?e:tt(Ne({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function pkt(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function hkt(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}function Qg({enabled:e},t){const n=Ye(!1);return He((r,o=!1)=>{const i=e===!1||!r,a=n.current;return n.current=i,!i&&(a||t||o)},[e,t])}var HO=function(){return Qi.Date.now()},fkt="Expected a function",mkt=Math.max,gkt=Math.min;function D1(e,t,n){var r,o,i,a,s,l,c=0,d=!1,h=!1,u=!0;if(typeof e!="function")throw new TypeError(fkt);t=By(t)||0,Oi(n)&&(d=!!n.leading,h="maxWait"in n,i=h?mkt(By(n.maxWait)||0,t):i,u="trailing"in n?!!n.trailing:u);function w(z){var I=r,N=o;return r=o=void 0,c=z,a=e.apply(N,I),a}function y(z){return c=z,s=setTimeout(j,t),d?w(z):a}function p(z){var I=z-l,N=z-c,W=t-I;return h?gkt(W,i-N):W}function k(z){var I=z-l,N=z-c;return l===void 0||I>=t||I<0||h&&N>=i}function j(){var z=HO();if(k(z))return F(z);s=setTimeout(j,p(z))}function F(z){return s=void 0,u&&r?w(z):(r=o=void 0,a)}function U(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function H(){return s===void 0?a:F(HO())}function R(){var z=HO(),I=k(z);if(r=arguments,o=this,l=z,I){if(s===void 0)return y(l);if(h)return clearTimeout(s),s=setTimeout(j,t),w(l)}return s===void 0&&(s=setTimeout(j,t)),a}return R.cancel=U,R.flush=H,R}function Cc(e,{onLocalStateChange:t,syncCompareFn:n=Ra}={}){const[r,o]=Ge(e),i=Ye(e);Je(()=>{n(i.current,e)||o(e),i.current=e},[e,n]);const a=He(s=>{o(l=>{const c=fu(s)?s(l):s;return t==null||t(c),c})},[t]);return[r,a]}function vkt({chartType:e,dataOptions:t,enabled:n}){const[r,o]=Ge([]),i=Ke(()=>{var h;const u=El(e)&&((h=t.category)==null?void 0:h.length)===1||vl(e);return n&&u},[n,e,t]),a=Ke(()=>{if(r.length===0)return h=>tt(Ne({},h),{series:h.series.map(u=>tt(Ne({},u),{data:u.data.map(w=>tt(Ne({},w),{selected:!1}))}))});if(vl(e))return h=>tt(Ne({},h),{series:h.series.map(u=>tt(Ne({},u),{data:u.data.map(w=>tt(Ne({},w),{selected:!r.some(y=>{var p,k;return y.x===w.x&&y.y===w.y&&y.size===w.z&&y.breakByPoint===((p=w.custom)==null?void 0:p.maskedBreakByPoint)&&y.breakByColor===((k=w.custom)==null?void 0:k.maskedBreakByColor)})}))}))});{const h=r.reduce((u,{categoryValue:w})=>(w&&(u[`${w}`]=!0),u),{});return u=>tt(Ne({},u),{series:u.series.map(w=>tt(Ne({},w),{data:w.data.map(y=>{var p,k;return h[(k=(p=y.custom)==null?void 0:p.xValue)==null?void 0:k[0]]?y:tt(Ne({},y),{selected:!0})})}))})}},[r,e]),s=Ke(()=>h=>{var u;return tt(Ne({},h),{chart:tt(Ne({},h.chart),{events:tt(Ne({},(u=h.chart)==null?void 0:u.events),{click:()=>{o([])}})})})},[]),l=He(h=>(i&&(h=a(h),h=s(h)),h),[a,s,i]),c=He(h=>{i&&o(h)},[i]),d=He(h=>{i&&o([h])},[i]);return{onBeforeRender:l,onDataPointsSelected:c,onDataPointClick:d}}const L1=()=>{const e=P2();if(!e)throw new kt("errors.missingMenuRoot");const{openMenu:t,closeMenu:n}=e;return{openMenu:t,closeMenu:n}};function R3(e){return e&&e.length?Yj(e):[]}function ykt(e,t,n,r){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bkt(e,t){return function(n,r){if(n==null)return n;if(!zb(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var xkt=bkt(GI);function wkt(e,t,n,r){return xkt(e,function(o,i,a){t(r,o,n(o),a)}),r}function Dle(e,t){return function(n,r){var o=Ar(n)?ykt:wkt,i=t?t():{};return o(n,e,Dh(r),i)}}var N1=Dle(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});const _kt=Xh(Me("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Skt=Gt(lp)(xr(({theme:e})=>tt(Ne({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]}),{borderRadius:2,"&:hover, &:focus":Ne({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":Ne({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:DN(e.palette.grey[200],.12)}:{backgroundColor:DN(e.palette.grey[600],.12)})}))),Ckt=Gt(_kt)({width:24,height:16});function Lle(e){const t=e,{slots:n={},slotProps:r={}}=t,o=Ut(t,["slots","slotProps"]),i=e;return Me("li",{children:Me(Skt,tt(Ne({focusRipple:!0},o),{ownerState:i,children:Me(Ckt,Ne({as:n.CollapsedIcon,ownerState:i},r.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(Lle.propTypes={slotProps:ue.shape({collapsedIcon:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({CollapsedIcon:ue.elementType}),sx:ue.object});function kkt(e){return Vn("MuiBreadcrumbs",e)}const Tkt=er("MuiBreadcrumbs",["root","ol","li","separator"]),Mkt=e=>{const{classes:t}=e;return lr({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},kkt,t)},Ekt=Gt(Yi,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Tkt.li}`]:t.li},t.root]})({}),Akt=Gt("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Okt=Gt("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Pkt(e,t,n,r){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,Me(Okt,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${a}`)):o.push(i),o),[])}const Nle=Tt(function(e,t){const n=cr({props:e,name:"MuiBreadcrumbs"}),r=n,{children:o,className:i,component:a="nav",slots:s={},slotProps:l={},expandText:c="Show path",itemsAfterCollapse:d=1,itemsBeforeCollapse:h=1,maxItems:u=8,separator:w="/"}=r,y=Ut(r,["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),[p,k]=Ge(!1),j=tt(Ne({},n),{component:a,expanded:p,expandText:c,itemsAfterCollapse:d,itemsBeforeCollapse:h,maxItems:u,separator:w}),F=Mkt(j),U=Mj({elementType:s.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:j}),H=Ye(null),R=I=>{const N=()=>{k(!0);const W=H.current.querySelector("a[href],button,[tabindex]");W&&W.focus()};return h+d>=I.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${d}} + itemsBeforeCollapse={${h}} >= maxItems={${u}}`].join(`
1001
1001
  `)),I):[...I.slice(0,h),Me(Lle,{"aria-label":c,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:U},onClick:N},"ellipsis"),...I.slice(I.length-d,I.length)]},z=Ai.toArray(o).filter(I=>(process.env.NODE_ENV!=="production"&&kj.isFragment(I)&&console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
1002
1002
  `)),Tn(I))).map((I,N)=>Me("li",{className:F.li,children:I},`child-${N}`));return Me(Ekt,tt(Ne({ref:t,component:a,color:"textSecondary",className:Wt(F.root,i),ownerState:j},y),{children:Me(Akt,{className:F.ol,ref:H,ownerState:j,children:Pkt(p||u&&z.length<=u?z:R(z),F.separator,w,j)})}))});process.env.NODE_ENV!=="production"&&(Nle.propTypes={children:ue.node,classes:ue.object,className:ue.string,component:ue.elementType,expandText:ue.string,itemsAfterCollapse:tc,itemsBeforeCollapse:tc,maxItems:tc,separator:ue.node,slotProps:ue.shape({collapsedIcon:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({CollapsedIcon:ue.elementType}),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});function Dkt(e){return Vn("MuiButton",e)}const _p=er("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Ile=pn({});process.env.NODE_ENV!=="production"&&(Ile.displayName="ButtonGroupContext");const Rle=pn(void 0);process.env.NODE_ENV!=="production"&&(Rle.displayName="ButtonGroupButtonContext");const Lkt=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c={root:["root",a&&"loading",i,`${i}${nn(t)}`,`size${nn(o)}`,`${i}Size${nn(o)}`,`color${nn(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${nn(s)}`],startIcon:["icon","startIcon",`iconSize${nn(o)}`],endIcon:["icon","endIcon",`iconSize${nn(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=lr(c,Dkt,l);return Ne(Ne({},l),d)},jle=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Nkt=Gt(lp,{shouldForwardProp:e=>sp(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${nn(n.color)}`],t[`size${nn(n.size)}`],t[`${n.variant}Size${nn(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(xr(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return tt(Ne({},e.typography.button),{minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${_p.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${_p.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${_p.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${_p.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(_c()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:qn(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:qn(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:qn(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:qn(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:qn(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${_p.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${_p.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${_p.loading}`]:{color:"transparent"}}}]})})),Ikt=Gt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${nn(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...jle]})),Rkt=Gt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${nn(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...jle]})),jkt=Gt("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),FG=Gt("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),Wd=Tt(function(e,t){const n=en(Ile),r=en(Rle),o=Ky(n,e),i=cr({props:o,name:"MuiButton"}),a=i,{children:s,color:l="primary",component:c="button",className:d,disabled:h=!1,disableElevation:u=!1,disableFocusRipple:w=!1,endIcon:y,focusVisibleClassName:p,fullWidth:k=!1,id:j,loading:F=null,loadingIndicator:U,loadingPosition:H="center",size:R="medium",startIcon:z,type:I,variant:N="text"}=a,W=Ut(a,["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","id","loading","loadingIndicator","loadingPosition","size","startIcon","type","variant"]),A=Y2(j),C=U??Me(N4,{"aria-labelledby":A,color:"inherit",size:16}),v=tt(Ne({},i),{color:l,component:c,disabled:h,disableElevation:u,disableFocusRipple:w,fullWidth:k,loading:F,loadingIndicator:C,loadingPosition:H,size:R,type:I,variant:N}),T=Lkt(v),S=(z||F&&H==="start")&&Me(Ikt,{className:T.startIcon,ownerState:v,children:z||Me(FG,{className:T.loadingIconPlaceholder,ownerState:v})}),D=(y||F&&H==="end")&&Me(Rkt,{className:T.endIcon,ownerState:v,children:y||Me(FG,{className:T.loadingIconPlaceholder,ownerState:v})}),G=r||"",q=typeof F=="boolean"?Me("span",{className:T.loadingWrapper,style:{display:"contents"},children:F&&Me(jkt,{className:T.loadingIndicator,ownerState:v,children:C})}):null;return Me(Nkt,tt(Ne({ownerState:v,className:Wt(n.className,T.root,d,G),component:c,disabled:h||F,focusRipple:!w,focusVisibleClassName:Wt(T.focusVisible,p),ref:t,type:I,id:F?A:j},W),{classes:T,children:[S,H!=="end"&&q,s,H==="end"&&q,D]}))});process.env.NODE_ENV!=="production"&&(Wd.propTypes={children:ue.node,classes:ue.object,className:ue.string,color:ue.oneOfType([ue.oneOf(["inherit","primary","secondary","success","error","info","warning"]),ue.string]),component:ue.elementType,disabled:ue.bool,disableElevation:ue.bool,disableFocusRipple:ue.bool,disableRipple:ue.bool,endIcon:ue.node,focusVisibleClassName:ue.string,fullWidth:ue.bool,href:ue.string,id:ue.string,loading:ue.bool,loadingIndicator:ue.node,loadingPosition:ue.oneOf(["center","end","start"]),size:ue.oneOfType([ue.oneOf(["small","medium","large"]),ue.string]),startIcon:ue.node,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),type:ue.oneOfType([ue.oneOf(["button","reset","submit"]),ue.string]),variant:ue.oneOfType([ue.oneOf(["contained","outlined","text"]),ue.string])});const zkt=({clearDrilldownSelections:e,currentDimension:t,setIsHovered:n,themeProps:r})=>{const{t:o}=Jt(),i=t.name,a=at(Wd,{target:"e1olvz1k0",label:"StyledCancelButton"})("&&{background-color:",r.activeDrillBackgroundColor,";color:",r.primaryButtonTextColor,";border-radius:100%;border:2px solid white;min-width:39px;width:39px;height:39px;z-index:10;padding:7px;cursor:pointer;text-transform:none;margin-right:-5px;&:hover{background-color:",r.activeDrillHoverBackgroundColor,";color:",r.primaryTextColor,";}}"),s=at("svg",{target:"e1olvz1k1",label:"Icon"})("width:22px;height:22px;fill:#9ea2ab;"),l=()=>ge(a,{theme:r,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:e,children:ge(s,{width:22,height:22,viewBox:"0 0 24 24",children:ge("path",{fill:"#9EA2AB",d:"M12 12.293L6.854 7.146a.5.5 0 1 0-.708.708L11.293 13l-5.147 5.146a.5.5 0 0 0 .708.708L12 13.707l5.146 5.147a.5.5 0 0 0 .708-.708L12.707 13l5.147-5.146a.5.5 0 0 0-.708-.708L12 12.293z"})})}),c=at(Wd,{target:"e1olvz1k2",label:"StyledCurrentDrillButton"})("&&{position:relative;font-family:",d=>d.theme.fontFamily,";border-radius:0;border:1px solid ",cc,";background-color:",d=>d.theme.chartBackgroundColor,";border-right:none;border-left:none;color:",d=>d.theme.secondaryTextColor,";padding-right:1.25rem;padding-left:1.875rem;height:1.64rem;font-size:13px;transition:background-color 0.2s,border-color 0.2s,color 0.2s;text-transform:none;cursor:auto;pointer-events:none;white-space:nowrap;&:hover{background-color:",d=>d.theme.chartBackgroundColor,";border:1px solid ",cc,";border-right:none;border-left:none;}}");return{CancelButton:l,CurrentDrillButton:()=>ot(c,{theme:r,children:[i," (",o("drilldown.breadcrumbsAllSuffix"),")",ge("span",{className:"flex items-center justify-between",children:ge("span",{className:"csdk-absolute csdk-right-[0px] csdk-top-[3px] csdk-h-[18px] csdk-w-[18px] csdk-transform csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:"transparent",borderTop:`1px solid ${cc}`,borderRight:`1px solid ${cc}`}})})]})}},Bkt={modifiers:[{name:"offset",options:{offset:[0,12]}}]},$kt=({themeProps:e,filterDisplayValues:t,currentTable:n,currentColumn:r})=>{const{t:o}=Jt();return ot("div",{className:"csdk-w-50 csdk-px-[12px] csdk-shadow-md csdk-shadow-gray-500 csdk-rounded-md csdk-bg-white",style:{backgroundColor:e.chartBackgroundColor,color:e.primaryTextColor},children:[ot("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[ge(Yi,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.members")}),ge(Yi,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:t.join(", ")})]}),ot("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[ge(Yi,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.table")}),ge(Yi,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:n})]}),ot("div",{className:"csdk-p-3 csdk-pl-1",children:[ge(Yi,{variant:"body2",fontFamily:e.fontFamily,fontSize:11,children:o("drilldown.popover.column")}),ge(Yi,{variant:"body2",fontFamily:e.fontFamily,fontSize:13,children:r})]})]})},Fkt=({popperParams:e,currentDimension:t,themeProps:n})=>{const r=t.expression.match(/\[(.*?)]/),[o,i]=r?r[1].split("."):["",""];return ge(ef,{open:!!e,anchorEl:e==null?void 0:e.anchorEl,placement:"bottom",popperOptions:Bkt,children:e&&ge($kt,{themeProps:n,filterDisplayValues:e.filterDisplayValues,currentTable:o,currentColumn:i})})},Hkt=()=>{const{themeSettings:{typography:{primaryTextColor:e,secondaryTextColor:t,fontFamily:n},general:{backgroundColor:r,brandColor:o,primaryButtonTextColor:i},chart:{backgroundColor:a}}}=Lt(),s=$s(a,-.02),l=$s(s,-.05);return{primaryTextColor:e,secondaryTextColor:t,fontFamily:n,backgroundColor:r,brandColor:o,primaryButtonTextColor:i,chartBackgroundColor:a,activeDrillBackgroundColor:s,activeDrillHoverBackgroundColor:l}},Wkt=at(Ls,{target:"egcu0nk0",label:"StyledPrevButton"})("&&{position:absolute;left:0;right:auto;margin:auto;bottom:0;top:0;z-index:10;background:linear-gradient(to right,white 30%,rgba(255,255,255,0) 100%);display:inline-flex;span[aria-label='prev-item']{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:5px solid #000;color:transparent;opacity:0.3;&:hover{opacity:0.8;}}}"),Vkt=at(Ls,{target:"egcu0nk1",label:"StyledNextButton"})("&&{position:absolute;left:auto;right:0;margin:auto;bottom:0;top:0;z-index:10;background:linear-gradient(to right,rgba(255,255,255,0) 0,white 70%);display:inline-flex;span[aria-label='next-item']{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:5px solid #000;color:transparent;opacity:0.3;&:hover{opacity:0.8;}}}"),Ukt=({currentDimension:e,children:t})=>{const{t:n}=Jt(),r=Ye(null),[o,i]=Ge(0),[a,s]=Ge(0),[l,c]=Ge(0),d=()=>{var y;return(y=r.current)==null?void 0:y.querySelector("ol")};Je(()=>{const y=d();if(y){const p=y.clientWidth,k=y.scrollWidth,j=y.scrollLeft;i(p),s(k),c(j)}},[e]),Je(()=>{const y=d();function p(){if(y){const F=y.clientWidth;i(F)}}function k(){if(y){const F=y.scrollLeft;c(F)}}const j=new ResizeObserver(p);return y?(j.observe(y),y.addEventListener("scroll",k),()=>{j.disconnect(),y.removeEventListener("scroll",k)}):()=>{}},[]);const h=y=>{const p="smooth",k=d();k&&k.scrollBy({left:y==="right"?200:-200,behavior:p})},u=l!=0,w=Math.floor(a-l)>o;return ot("div",{style:{position:"relative"},children:[u&&ge(Wkt,{onClick:()=>h("left"),children:ge("span",{"aria-label":"prev-item",children:n("drilldown.breadcrumbsPrev")})}),w&&ge(Vkt,{onClick:()=>h("right"),children:ge("span",{"aria-label":"next-item",children:n("drilldown.breadcrumbsNext")})}),ge("div",{ref:r,children:t})]})},cc="#F2F2F2",Gkt=at(Wd,{target:"ex0ybhj0",label:"StyledDrillButton"})("&&{font-family:",({theme:e})=>e.fontFamily,";position:relative;border-radius:0;border:1px solid ",cc,";border-right:none;color:",({active:e,theme:t})=>e==="true"?t.primaryTextColor:t.secondaryTextColor,";background-color:",({active:e,theme:t})=>e==="true"?t.activeDrillBackgroundColor:t.chartBackgroundColor,";padding-right:1.25rem;padding-left:1.875rem;height:1.64rem;font-size:13px;text-transform:none;transition:background-color 0.2s,border-color 0.2s,color 0.2s;white-space:nowrap;cursor:",({active:e})=>e==="true"?"pointer":"auto",";margin-right:",({active:e})=>e==="true"?"5px":"0px",";&:hover{background-color:",({active:e,theme:t})=>e==="true"?t.activeDrillHoverBackgroundColor:t.chartBackgroundColor,";border:1px solid ",cc,";border-right:none;}.MuiTouchRipple-root{display:none;}}"),Ykt=at(Nle,{target:"ex0ybhj1",label:"StyledBreadcrumbs"})(".MuiBreadcrumbs-ol{flex-wrap:nowrap;overflow:hidden;}.MuiBreadcrumbs-separator{display:none;}"),Xkt=({isActive:e,filterDisplayValue:t,handleMouseEnter:n,handleMouseLeave:r,handleClick:o,themeProps:i,popperParams:a,index:s})=>ge(Gkt,{theme:i,active:e.toString(),index:s,onMouseEnter:n,onMouseLeave:r,onClick:o,children:ot("span",{className:"flex items-center justify-between",children:[ot("span",{className:"mr-2",children:[t.slice(0,2).join(", "),t.length>2&&", ..."]}),e?ge("span",{className:"csdk-absolute csdk-right-0 csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:t===(a==null?void 0:a.filterDisplayValues)?i.activeDrillHoverBackgroundColor:i.activeDrillBackgroundColor,borderTop:`1px solid ${cc}`,borderRight:`1px solid ${cc}`,transition:"background-color 0.2s, border-color 0.2s, color 0.2s",zIndex:8}}):void 0,ge("span",{className:`csdk-absolute ${e?"csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-right-[-15px]":"csdk-h-[10px] csdk-w-[10px] csdk-top-[7px] csdk-right-[-5px]"} csdk-transform translate-x-1/2 csdk-rotate-45`,style:{backgroundColor:i.chartBackgroundColor,borderTop:`1px solid ${cc}`,borderRight:`1px solid ${cc}`,zIndex:7,transition:"background-color 0.2s, border-color 0.2s, color 0.2s"}})]})}),z4=Sn({componentName:"DrilldownBreadcrumbs",shouldSkipSisenseContextWaiting:!0})(({filtersDisplayValues:e,currentDimension:t,clearDrilldownSelections:n,sliceDrilldownSelections:r})=>{const[o,i]=Ge(null),[a,s]=Ge(!1),l=Hkt(),{CancelButton:c,CurrentDrillButton:d}=zkt({clearDrilldownSelections:n,currentDimension:t,isHovered:a,setIsHovered:s,themeProps:l}),h=p=>k=>{s(!0),i({filterDisplayValues:p,anchorEl:k.currentTarget})},u=()=>{s(!1),i(null)},w=p=>p<e.length-1,y=p=>p===e.length-2;return e.length?ge("div",{"aria-label":"drilldown-breadcrumbs",children:ge(Ukt,{currentDimension:t,children:ot(Ykt,{separator:null,sx:{backgroundColor:l.chartBackgroundColor,padding:"4px"},children:[ge(c,{}),e.map((p,k)=>{const j=w(k),F=y(k);return ge("div",{children:ge(Xkt,{isActive:j,isLastActive:F,filterDisplayValue:p,handleMouseEnter:h(p),handleMouseLeave:u,handleClick:()=>r(k+1),themeProps:l,popperParams:o,index:k})},k)}),ge(d,{}),ge(Fkt,{popperParams:o,currentDimension:t,themeProps:l})]})})}):null}),zle=e=>{const{initialDimension:t,onDrilldownSelectionsChange:n}=e,r=Ke(()=>e.drilldownPaths||[],[e.drilldownPaths]),o=Ke(()=>e.drilldownSelections||[],[e.drilldownSelections]),{t:i}=Jt();if(!t)throw new kt("errors.drilldownNoInitialDimension");const[a,s]=Cc(o,{onLocalStateChange:n}),l=Ke(()=>[Fs(t),...a.map(({nextDimension:k})=>k)],[t,a]),c=Ke(()=>r.filter(k=>{if(zt.isAttribute(k)){const F=k;return l.every(U=>!Ia(U,F))}const j=k;return l.every((F,U)=>Ia(F,j.levels[U]))}),[r,l]),d=He((k,j,F)=>{s(U=>Ble(U,k,j,F))},[s]),h=He(k=>{s(j=>j.slice(0,k))},[s]),u=He(()=>{s([])},[s]),{drilldownFilters:w,drilldownFiltersDisplayValues:y,drilldownDimension:p}=Ke(()=>$le(a,t,i),[a,t,i]);return{drilldownSelections:a,availableDrilldownPaths:c,drilldownFilters:w,drilldownFiltersDisplayValues:y,drilldownDimension:p,selectDrilldown:d,sliceDrilldownSelections:h,clearDrilldownSelections:u}},Ble=(e,t,n,r)=>{var o,i;if(!(r!=null&&r.levels))return[...e,{points:t,nextDimension:n}];if(Ia(r.levels[0],n))return[];const a=(o=e==null?void 0:e.findIndex(h=>Ia(h.nextDimension,n)))!=null?o:-1;if(a!==-1)return e.slice(0,a+1);const s=(i=t5(e))==null?void 0:i.nextDimension,l=e.length?r.levels.findIndex(h=>s&&Ia(h,s)):0,c=r.levels.indexOf(n),d=r.levels.slice(l+1,c+1).map((h,u)=>({points:u===0?t:[],nextDimension:h}));return[...e,...d]},$le=(e,t,n)=>{let r=t&&Fs(t);const o=[],i=[];return e.forEach(({points:a,nextDimension:s})=>{o.push(ti(r,a.map(qkt)));const l=a.length?a.map(Fle):[`${r.name} (${n("drilldown.breadcrumbsAllSuffix")})`];i.push(l),r=s}),{drilldownFilters:o,drilldownFiltersDisplayValues:i,drilldownDimension:r}};function Fle(e){return"categoryDisplayValue"in e?`${e.categoryDisplayValue}`:"categoryValue"in e?`${e.categoryValue}`:""}function qkt(e){return"categoryValue"in e?`${e.categoryValue}`:""}var Zkt=Object.prototype,Kkt=Zkt.hasOwnProperty,Qkt=Dle(function(e,t,n){Kkt.call(e,n)?e[n].push(t):Ib(e,n,[t])});function Jkt(e,t){return t.all?[]:e.filter(n=>{var r;return!((r=t.ids)!=null&&r.includes(n.config.guid))})}function Hle(e,t){return e.find(n=>Ia(n.attribute,t))}function Wle(e,t,n){const r=Hle(n,e);return ti(e,t.map(o=>`${o}`),{guid:r==null?void 0:r.config.guid,backgroundFilter:r==null?void 0:r.config.backgroundFilter})}function Vle(e,t){return R4(e,t)&&"members"in e&&"members"in t&&Ra(e.members,t.members)}var pb=function(e){return e.WIDGET_POINTS_DRILLDOWN="widget-points-drilldown",e.WIDGET_POINTS_CROSSFILTERING="widget-points-crossfiltering",e}({}),pg=function(e){return e.DRILLDOWN_CHART_POINTS_SELECTION="drilldown-chart-points-selection",e.DRILLDOWN_DRILL_DIRECTIONS="drilldown-drill-directions",e.CROSSFILTERING_CHART_POINTS_SELECTION="crossfiltering-chart-points-selection",e}({});const Ule=2;function Jg(e,t){const n=e.flatMap(({entries:o={}})=>t.flatMap(i=>{const a=o[i];return a?(Array.isArray(a)?a:[a]).filter(({attribute:s})=>!!s):[]})),r=Qkt(n,({id:o})=>o);return Object.values(r).map(o=>({attribute:o[0].attribute,values:R3(o.map(({value:i})=>i)),displayValues:R3(o.map(({displayValue:i})=>i))}))}function e2t(e){return Jg(e,["category"])}function t2t(e){return Jg(e,["category"])}function n2t(e,t){const n=Jg(e,["category"]),r=n.length-1;return t.category.map((o,i)=>r===i?n[i]:{attribute:Fs(o),values:[],displayValues:[]})}function r2t(e){return Jg(e,["x","y","breakByPoint","breakByColor"])}function o2t(e){return Jg(e,["geo"])}function i2t(e){return Jg(e,["geo"])}function x_(e,t,n){return e==="custom"?[]:e==="text"?[]:e==="pivot"?[]:e==="treemap"||e==="sunburst"?n2t(n,t):El(e)||e==="pie"||e==="funnel"?e2t(n):op(e)?t2t(n):vl(e)?r2t(n):Wh(e)?o2t(n):XR(e)?i2t(n):[]}function B4(e,t){let n=[];return e==="custom"?n=[]:e==="text"?n=[]:e==="pivot"?n=[...t.rows||[],...t.columns||[]]:El(e)||rp(e)||op(e)||$g(e)?n=[...t.category]:vl(e)?n=[t.x,t.y,t.breakByPoint,t.breakByColor].filter(r=>!!(r&&!Kn(r))):(Wh(e)||XR(e))&&(n=[...t.geo]),n.map(Fs)}function a2t(e,t,n){const r=Hle(t,e.attribute);if(!r||I4(r))return null;if(Vle(e,r))return AT(e);if(Pi(r)&&n){const[o,i]=N1(r.members,a=>e.members.includes(a));if(o.length===e.members.length&&i.length)return Wle(e.attribute,i,[r])}return null}function s2t(e,t,n){const r=t.filter(a=>!a.config.disabled),o=e.map(a=>a2t(a,r,n)).filter(a=>!!a),i=e.length!==o.length;return{filters:i?e:o,isSelection:i}}function WO(e,t,n=!1){const r=e.map(({attribute:i,values:a})=>Wle(i,a,t)),o=l2t(t,r);return s2t(o,t,n)}function l2t(e,t){const n=e.filter(r=>r.config.locked);return n.length?t.filter(r=>!n.some(o=>R4(o,r))):t}function c2t(e,t,n){const r=x_(e,t,n).filter(({displayValues:s})=>s.length);if(r.length===0)return"";const[o]=r,i=n.length===1,a=o.displayValues.length>Ule;return r.length>1?i?r.map(s=>s.displayValues[0]).join(", "):a?"":o.displayValues.join(", "):a?o.attribute.name:o.displayValues.join(", ")}function HG(e,t,n){const r=c2t(e,t,n);return r?{id:pg.CROSSFILTERING_CHART_POINTS_SELECTION,sectionTitle:r}:null}function WG(e,t){return{items:[{caption:e,onClick:t}]}}const u2t=({initialDimension:e,drilldownPaths:t,drilldownSelections:n,openMenu:r,onDrilldownSelectionsChange:o})=>{const{t:i}=Jt(),{availableDrilldownPaths:a,drilldownFilters:s,drilldownFiltersDisplayValues:l,drilldownDimension:c,selectDrilldown:d,sliceDrilldownSelections:h,clearDrilldownSelections:u}=zle({initialDimension:e,drilldownPaths:t,drilldownSelections:n,onDrilldownSelectionsChange:o}),w=He((p,k)=>{const j=[$4(k,c),F4(a,c,(F,U)=>{d(k,F,U)},i)];r({id:pb.WIDGET_POINTS_DRILLDOWN,position:p,itemSections:j})},[c,a,i,d,r]),y=Ke(()=>c&&ge(z4,{filtersDisplayValues:l,currentDimension:c,clearDrilldownSelections:u,sliceDrilldownSelections:h}),[u,c,l,h]);return{drilldownDimension:c,drilldownFilters:s,breadcrumbs:y,openDrilldownMenu:w}};function $4(e,t){const n=R3(e.map(Fle).filter(r=>!!r));return n.length>Ule?{id:pg.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:t.name}:{id:pg.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:n.join(", ")}}function d2t(e){return 30+12*e}function F4(e,t,n,r){const[o,i]=N1(e,zt.isAttribute.bind(zt)),a=o.map(l=>({caption:l.name,onClick:()=>n(l)})),s=i.map(l=>({caption:l.title,subItems:[{items:l.levels.map((c,d)=>({caption:c.name,class:d===0?"":"csdk-drilldown-hierarchy-nested-menu-item",style:{paddingLeft:`${d2t(d)}px`},disabled:Ia(c,t),onClick:()=>n(c,l)}))}]}));return{id:pg.DRILLDOWN_DRILL_DIRECTIONS,sectionTitle:r("drilldown.drillMenuItem"),items:[...s,...a]}}var hb=function(e){return e.HIGHLIGHT="highlight",e.FILTER="filter",e}({});function Gle(e){return function(t){t=_d(t);var n=tae(t)?VN(t):void 0,r=n?n[0]:t.charAt(0),o=n?eae(n,1).join(""):t.slice(1);return r[e]()+o}}var p2t=Gle("toUpperCase");function h2t(e){return p2t(_d(e).toLowerCase())}function f2t(e,t,n,r){for(var o=-1,i=e==null?0:e.length;++o<i;)n=t(n,e[o],o,e);return n}function m2t(e){return function(t){return e==null?void 0:e[t]}}var g2t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},v2t=m2t(g2t),y2t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,b2t="\\u0300-\\u036f",x2t="\\ufe20-\\ufe2f",w2t="\\u20d0-\\u20ff",_2t=b2t+x2t+w2t,S2t="["+_2t+"]",C2t=RegExp(S2t,"g");function k2t(e){return e=_d(e),e&&e.replace(y2t,v2t).replace(C2t,"")}var T2t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function M2t(e){return e.match(T2t)||[]}var E2t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function A2t(e){return E2t.test(e)}var Yle="\\ud800-\\udfff",O2t="\\u0300-\\u036f",P2t="\\ufe20-\\ufe2f",D2t="\\u20d0-\\u20ff",L2t=O2t+P2t+D2t,Xle="\\u2700-\\u27bf",qle="a-z\\xdf-\\xf6\\xf8-\\xff",N2t="\\xac\\xb1\\xd7\\xf7",I2t="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",R2t="\\u2000-\\u206f",j2t=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Zle="A-Z\\xc0-\\xd6\\xd8-\\xde",z2t="\\ufe0e\\ufe0f",Kle=N2t+I2t+R2t+j2t,Qle="['’]",VG="["+Kle+"]",B2t="["+L2t+"]",Jle="\\d+",$2t="["+Xle+"]",ece="["+qle+"]",tce="[^"+Yle+Kle+Jle+Xle+qle+Zle+"]",F2t="\\ud83c[\\udffb-\\udfff]",H2t="(?:"+B2t+"|"+F2t+")",W2t="[^"+Yle+"]",nce="(?:\\ud83c[\\udde6-\\uddff]){2}",rce="[\\ud800-\\udbff][\\udc00-\\udfff]",qf="["+Zle+"]",V2t="\\u200d",UG="(?:"+ece+"|"+tce+")",U2t="(?:"+qf+"|"+tce+")",GG="(?:"+Qle+"(?:d|ll|m|re|s|t|ve))?",YG="(?:"+Qle+"(?:D|LL|M|RE|S|T|VE))?",oce=H2t+"?",ice="["+z2t+"]?",G2t="(?:"+V2t+"(?:"+[W2t,nce,rce].join("|")+")"+ice+oce+")*",Y2t="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",X2t="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",q2t=ice+oce+G2t,Z2t="(?:"+[$2t,nce,rce].join("|")+")"+q2t,K2t=RegExp([qf+"?"+ece+"+"+GG+"(?="+[VG,qf,"$"].join("|")+")",U2t+"+"+YG+"(?="+[VG,qf+UG,"$"].join("|")+")",qf+"?"+UG+"+"+GG,qf+"+"+YG,X2t,Y2t,Jle,Z2t].join("|"),"g");function Q2t(e){return e.match(K2t)||[]}function J2t(e,t,n){return e=_d(e),t=t,t===void 0?A2t(e)?Q2t(e):M2t(e):e.match(t)||[]}var eTt="['’]",tTt=RegExp(eTt,"g");function nTt(e){return function(t){return f2t(J2t(k2t(t).replace(tTt,"")),e,"")}}var ace=nTt(function(e,t,n){return t=t.toLowerCase(),e+(n?h2t(t):t)});function rTt(e){const{_id:t,title:n,levels:r}=e;return{id:t,title:n,levels:r.map(o=>qb(o))}}function sce(e,t,n){return Al(this,null,function*(){const r=yield new Vh(e,n).getHierarchies(t);return r==null?void 0:r.map(o=>rTt(o))})}function oTt(e){const t=xl(e,["dataSource","dimension","ids","alwaysIncluded"]),n=Qg(e,t),[r,o]=ls(Hd,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Ln();return Je(()=>{i||o({type:"error",error:new kt("errors.sisenseContextNotFound")}),n(a)&&(o({type:"loading"}),sce(a.httpClient,e,a.defaultDataSource).then(s=>{o({type:"success",data:s})}).catch(s=>{o({type:"error",error:s})}))},[a,i,e,n]),r.data&&t?XG(Hd(r,{type:"loading"})):XG(r)}function XG(e){const t=e,{data:n}=t,r=Ut(t,["data"]);return tt(Ne({},r),{hierarchies:n})}function iTt({attribute:e,dataSource:t,drilldownPaths:n=[],enabled:r}){const[o,i]=Ke(()=>N1(n,vj),[n]),{hierarchies:a=[]}=oTt({enabled:r,dataSource:t,dimension:e,ids:o,alwaysIncluded:!0});return Ke(()=>a.length?[...a,...i]:i,[a,i])}function aTt(e,t){return B4(e,t)[0]}function sTt(e){return[...s2,...l2,...c2,...u2,...d2].includes(e)}function lTt(e,t){return B4(e,t).length===1}function cTt(e,t){return lTt(e,t)&&sTt(e)}function lce(e,t,n){const r=o=>!!o&&!Ia(n,Fs(o));if(El(e)||rp(e)||op(e)||$g(e)){const o=t.category[0];if(r(o))return tt(Ne({},t),{category:[n]})}else if(vl(e)){const o=t,i=["x","y","breakByPoint","breakByColor"];for(const a of i){const s=o[a];if(s&&!Kn(s)&&r(s))return tt(Ne({},o),{[a]:n})}}return t}function qG(e,t,n){return e.map(r=>{const o=["x","y","breakByPoint","breakByColor"],i=[...o,"size"].some(s=>s in r),a=o.find(s=>n[s]&&!Kn(n[s]));if(i){const s=t,l=s.type==="mouseup";l&&console.warn("No drilldown support for multi-selection in scatter chart");const c=l?r[a]:s.point.options.custom[ace(`{masked ${a}`)];return{categoryValue:c,categoryDisplayValue:c}}return r})}const uTt=({propsToExtend:e,onDrilldownSelectionsChange:t})=>{const{chartType:n,dataOptions:r,dataSource:o,drilldownOptions:i}=e,{drilldownSelections:a}=i||{},{openMenu:s}=L1(),l=Ke(()=>cTt(n,r),[n,r]),c=Ke(()=>(i==null?void 0:i.drilldownPaths)||[],[i==null?void 0:i.drilldownPaths]),d=Ke(()=>{const I=fK({name:"dummy drilldown initial attribute"});return aTt(n,r)||I},[n,r]),h=iTt({attribute:d,dataSource:o,drilldownPaths:c,enabled:l}),u=Ke(()=>{var I;return(((I=i==null?void 0:i.drilldownSelections)==null?void 0:I.length)||(h==null?void 0:h.length))&&l},[i,l,h]),{drilldownDimension:w,drilldownFilters:y,breadcrumbs:p,openDrilldownMenu:k}=u2t({initialDimension:d,drilldownSelections:a,drilldownPaths:h,openMenu:s,onDrilldownSelectionsChange:t}),j=He((I,N)=>{const W=qG(I,N,r);k({left:N.clientX,top:N.clientY},W)},[r,k]),F=He((I,N)=>{const W=qG([I],N,r);k({left:N.clientX,top:N.clientY},W)},[r,k]),U=Ke(()=>lce(n,r,w),[n,r,w]),H=Ke(()=>y.length?d_(e.filters||[],y):e.filters,[e.filters,y]),R=Ke(()=>ul([j,e.onDataPointsSelected]),[j,e.onDataPointsSelected]),z=Ke(()=>ul([F,e.onDataPointContextMenu]),[F,e.onDataPointContextMenu]);return{propsWithDrilldown:Ne(Ne({},e),u&&{dataOptions:U,filters:H,onDataPointsSelected:R,onDataPointContextMenu:z}),isDrilldownEnabled:u,breadcrumbs:p}},cce=Sn({componentName:"ChartWidget"})(e=>{var t,n;const{app:r}=Ln(),{chartType:o,dataSource:i=r==null?void 0:r.defaultDataSource,dataOptions:a,styleOptions:s,highlightSelectionDisabled:l=!1,highlights:c,description:d,onChange:h}=e,{width:u,height:w}=s||{},y=K2(o,{hasHeader:!((t=s==null?void 0:s.header)!=null&&t.hidden)}),[p,k]=Ge(0),j=Ke(()=>QC(s,["width","height"]),[s]),F=He(A=>{h==null||h({drilldownOptions:{drilldownSelections:A}})},[h]),{propsWithDrilldown:U,isDrilldownEnabled:H,breadcrumbs:R}=uTt({propsToExtend:e,onDrilldownSelectionsChange:F}),z=vkt({chartType:o,dataOptions:a,enabled:!l&&!H&&!(c!=null&&c.length)}),I=(n=r==null?void 0:r.settings.accessibilityConfig)==null?void 0:n.enabled,N=He(A=>{var C;return I?tt(Ne({},A),{accessibility:tt(Ne({},A.accessibility),{description:d??((C=A.accessibility)==null?void 0:C.description)})}):A},[d,I]);if(!o||!a)return null;const W=tt(Ne({},U),{dataSet:i,styleOptions:j,refreshCounter:p,onDataPointClick:Ke(()=>ul([z.onDataPointClick,e.onDataPointClick]),[z.onDataPointClick,e.onDataPointClick]),onDataPointContextMenu:U.onDataPointContextMenu,onDataPointsSelected:Ke(()=>ul([z.onDataPointsSelected,U.onDataPointsSelected]),[z.onDataPointsSelected,U.onDataPointsSelected]),onBeforeRender:Ke(()=>ul([N,z.onBeforeRender,e.onBeforeRender],!0),[N,z.onBeforeRender,e.onBeforeRender])});return ge(Zh,{defaultSize:y,size:{width:u,height:w},children:ge(MT,tt(Ne({},e),{topSlot:ot(bn,{children:[e.topSlot,R]}),dataSetName:i&&Mc(i),onRefresh:()=>k(p+1),children:ge(ji,Ne({},W))}))})});let e0=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};const fb=typeof window>"u"||"Deno"in window;function ys(){}function dTt(e,t){return typeof e=="function"?e(t):e}function j3(e){return typeof e=="number"&&e>=0&&e!==1/0}function uce(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nv(e,t,n){return I1(e)?typeof t=="function"?tt(Ne({},n),{queryKey:e,queryFn:t}):tt(Ne({},t),{queryKey:e}):e}function pTt(e,t,n){return I1(e)?tt(Ne({},t),{mutationKey:e}):typeof e=="function"?tt(Ne({},t),{mutationFn:e}):Ne({},e)}function Ju(e,t,n){return I1(e)?[tt(Ne({},t),{queryKey:e}),n]:[e||{},t]}function ZG(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(I1(a)){if(r){if(t.queryHash!==H4(a,t.options))return!1}else if(!lm(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function KG(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(I1(i)){if(!t.options.mutationKey)return!1;if(n){if(Gp(t.options.mutationKey)!==Gp(i))return!1}else if(!lm(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function H4(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gp)(e)}function Gp(e){return JSON.stringify(e,(t,n)=>z3(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function lm(e,t){return dce(e,t)}function dce(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!dce(e[n],t[n])):!1}function pce(e,t){if(e===t)return e;const n=QG(e)&&QG(t);if(n||z3(e)&&z3(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let s=0;for(let l=0;l<i;l++){const c=n?l:o[l];a[c]=pce(e[c],t[c]),a[c]===e[c]&&s++}return r===i&&s===r?e:a}return t}function sC(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function QG(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function z3(e){if(!JG(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!JG(n)||!n.hasOwnProperty("isPrototypeOf"))}function JG(e){return Object.prototype.toString.call(e)==="[object Object]"}function I1(e){return Array.isArray(e)}function hce(e){return new Promise(t=>{setTimeout(t,e)})}function eY(e){hce(0).then(e)}function hTt(){if(typeof AbortController=="function")return new AbortController}function B3(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?pce(e,t):t}class fTt extends e0{constructor(){super(),this.setup=t=>{if(!fb&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const lC=new fTt,tY=["online","offline"];class mTt extends e0{constructor(){super(),this.setup=t=>{if(!fb&&window.addEventListener){const n=()=>t();return tY.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{tY.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const cC=new mTt;function gTt(e){return Math.min(1e3*Zc(2,e),3e4)}function OT(e){return(e??"online")==="online"?cC.isOnline():!0}class fce{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function w_(e){return e instanceof fce}function mce(e){let t=!1,n=0,r=!1,o,i,a;const s=new Promise((k,j)=>{i=k,a=j}),l=k=>{r||(w(new fce(k)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},h=()=>!lC.isFocused()||e.networkMode!=="always"&&!cC.isOnline(),u=k=>{r||(r=!0,e.onSuccess==null||e.onSuccess(k),o==null||o(),i(k))},w=k=>{r||(r=!0,e.onError==null||e.onError(k),o==null||o(),a(k))},y=()=>new Promise(k=>{o=j=>{const F=r||!h();return F&&k(j),F},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),p=()=>{if(r)return;let k;try{k=e.fn()}catch(j){k=Promise.reject(j)}Promise.resolve(k).then(u).catch(j=>{var F,U;if(r)return;const H=(F=e.retry)!=null?F:3,R=(U=e.retryDelay)!=null?U:gTt,z=typeof R=="function"?R(n,j):R,I=H===!0||typeof H=="number"&&n<H||typeof H=="function"&&H(n,j);if(t||!I){w(j);return}n++,e.onFail==null||e.onFail(n,j),hce(z).then(()=>{if(h())return y()}).then(()=>{t?w(j):p()})})};return OT(e.networkMode)?p():y().then(p),{promise:s,cancel:l,continue:()=>o!=null&&o()?s:Promise.resolve(),cancelRetry:c,continueRetry:d}}const W4=console;function vTt(){let e=[],t=0,n=l=>{l()},r=l=>{l()};const o=l=>{let c;t++;try{c=l()}finally{t--,t||s()}return c},i=l=>{t?e.push(l):eY(()=>{n(l)})},a=l=>(...c)=>{i(()=>{l(...c)})},s=()=>{const l=e;e=[],l.length&&eY(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l}}}const zo=vTt();class gce{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),j3(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(fb?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class yTt extends gce{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||W4,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||bTt(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options=Ne(Ne({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=B3(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(ys).catch(ys):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!uce(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(y=>y.options.queryFn);w&&this.setOptions(w.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const a=hTt(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(s);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(d),(r=this.options.behavior)==null||r.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=d.fetchOptions)==null?void 0:o.meta)){var h;this.dispatch({type:"fetch",meta:(h=d.fetchOptions)==null?void 0:h.meta})}const u=w=>{if(w_(w)&&w.silent||this.dispatch({type:"error",error:w}),!w_(w)){var y,p,k,j;(y=(p=this.cache.config).onError)==null||y.call(p,w,this),(k=(j=this.cache.config).onSettled)==null||k.call(j,this.state.data,w,this),process.env.NODE_ENV!=="production"&&this.logger.error(w)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=mce({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:w=>{var y,p,k,j;if(typeof w>"u"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),u(new Error(this.queryHash+" data is undefined"));return}this.setData(w),(y=(p=this.cache.config).onSuccess)==null||y.call(p,w,this),(k=(j=this.cache.config).onSettled)==null||k.call(j,w,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:u,onFail:(w,y)=>{this.dispatch({type:"failed",failureCount:w,error:y})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;switch(t.type){case"failed":return tt(Ne({},r),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return tt(Ne({},r),{fetchStatus:"paused"});case"continue":return tt(Ne({},r),{fetchStatus:"fetching"});case"fetch":return Ne(tt(Ne({},r),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:OT(this.options.networkMode)?"fetching":"paused"}),!r.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Ne(tt(Ne({},r),{data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success"}),!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const a=t.error;return w_(a)&&a.revert&&this.revertState?tt(Ne({},this.revertState),{fetchStatus:"idle"}):tt(Ne({},r),{error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return tt(Ne({},r),{isInvalidated:!0});case"setState":return Ne(Ne({},r),t.state)}};this.state=n(this.state),zo.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function bTt(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class xTt extends e0{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,a=(o=n.queryHash)!=null?o:H4(i,n);let s=this.get(a);return s||(s=new yTt({cache:this,logger:t.getLogger(),queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){zo.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Ju(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>ZG(r,o))}findAll(t,n){const[r]=Ju(t,n);return Object.keys(r).length>0?this.queries.filter(o=>ZG(r,o)):this.queries}notify(t){zo.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){zo.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){zo.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class wTt extends gce{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||W4,this.observers=[],this.state=t.state||vce(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=Ne(Ne({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}execute(){return Al(this,null,function*(){const t=()=>{var I;return this.retryer=mce({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,W)=>{this.dispatch({type:"failed",failureCount:N,error:W})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(I=this.options.retry)!=null?I:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,a,s,l,c,d;if(!n){var h,u,w,y;this.dispatch({type:"loading",variables:this.options.variables}),yield(h=(u=this.mutationCache.config).onMutate)==null?void 0:h.call(u,this.state.variables,this);const N=yield(w=(y=this.options).onMutate)==null?void 0:w.call(y,this.state.variables);N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const I=yield t();return yield(r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,I,this.state.variables,this.state.context,this),yield(i=(a=this.options).onSuccess)==null?void 0:i.call(a,I,this.state.variables,this.state.context),yield(s=(l=this.mutationCache.config).onSettled)==null?void 0:s.call(l,I,null,this.state.variables,this.state.context,this),yield(c=(d=this.options).onSettled)==null?void 0:c.call(d,I,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:I}),I}catch(I){try{var p,k,j,F,U,H,R,z;throw yield(p=(k=this.mutationCache.config).onError)==null?void 0:p.call(k,I,this.state.variables,this.state.context,this),process.env.NODE_ENV!=="production"&&this.logger.error(I),yield(j=(F=this.options).onError)==null?void 0:j.call(F,I,this.state.variables,this.state.context),yield(U=(H=this.mutationCache.config).onSettled)==null?void 0:U.call(H,void 0,I,this.state.variables,this.state.context,this),yield(R=(z=this.options).onSettled)==null?void 0:R.call(z,void 0,I,this.state.variables,this.state.context),I}finally{this.dispatch({type:"error",error:I})}}})}dispatch(t){const n=r=>{switch(t.type){case"failed":return tt(Ne({},r),{failureCount:t.failureCount,failureReason:t.error});case"pause":return tt(Ne({},r),{isPaused:!0});case"continue":return tt(Ne({},r),{isPaused:!1});case"loading":return tt(Ne({},r),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!OT(this.options.networkMode),status:"loading",variables:t.variables});case"success":return tt(Ne({},r),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return tt(Ne({},r),{data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return Ne(Ne({},r),t.state)}};this.state=n(this.state),zo.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function vce(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class _Tt extends e0{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new wTt({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){zo.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>KG(t,n))}findAll(t){return this.mutations.filter(n=>KG(t,n))}notify(t){zo.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return zo.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(ys)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function STt(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,a;const s=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,c=l==null?void 0:l.pageParam,d=(l==null?void 0:l.direction)==="forward",h=(l==null?void 0:l.direction)==="backward",u=((i=e.state.data)==null?void 0:i.pages)||[],w=((a=e.state.data)==null?void 0:a.pageParams)||[];let y=w,p=!1;const k=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>{var z;if((z=e.signal)!=null&&z.aborted)p=!0;else{var I;(I=e.signal)==null||I.addEventListener("abort",()=>{p=!0})}return e.signal}})},j=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),F=(R,z,I,N)=>(y=N?[z,...y]:[...y,z],N?[I,...R]:[...R,I]),U=(R,z,I,N)=>{if(p)return Promise.reject("Cancelled");if(typeof I>"u"&&!z&&R.length)return Promise.resolve(R);const W={queryKey:e.queryKey,pageParam:I,meta:e.options.meta};k(W);const A=j(W);return Promise.resolve(A).then(C=>F(R,I,C,N))};let H;if(!u.length)H=U([]);else if(d){const R=typeof c<"u",z=R?c:nY(e.options,u);H=U(u,R,z)}else if(h){const R=typeof c<"u",z=R?c:CTt(e.options,u);H=U(u,R,z,!0)}else{y=[];const R=typeof e.options.getNextPageParam>"u";H=!(s&&u[0])||s(u[0],0,u)?U([],R,w[0]):Promise.resolve(F([],w[0],u[0]));for(let z=1;z<u.length;z++)H=H.then(I=>{if(!(s&&u[z])||s(u[z],z,u)){const N=R?w[z]:nY(e.options,I);return U(I,R,N)}return Promise.resolve(F(I,w[z],u[z]))})}return H.then(R=>({pages:R,pageParams:y}))}}}}function nY(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function CTt(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class yce{constructor(t={}){this.queryCache=t.queryCache||new xTt,this.mutationCache=t.mutationCache||new _Tt,this.logger=t.logger||W4,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&t.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=lC.subscribe(()=>{lC.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=cC.subscribe(()=>{cC.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Ju(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll(tt(Ne({},t),{fetching:!0})).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=Nv(t,n,r),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,a=dTt(n,i);if(typeof a>"u")return;const s=Nv(t),l=this.defaultQueryOptions(s);return this.queryCache.build(this,l).setData(a,tt(Ne({},r),{manual:!0}))}setQueriesData(t,n,r){return zo.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Ju(t,n),o=this.queryCache;zo.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=Ju(t,n,r),a=this.queryCache,s=Ne({type:"active"},o);return zo.batch(()=>(a.findAll(o).forEach(l=>{l.reset()}),this.refetchQueries(s,i)))}cancelQueries(t,n,r){const[o,i={}]=Ju(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const a=zo.batch(()=>this.queryCache.findAll(o).map(s=>s.cancel(i)));return Promise.all(a).then(ys).catch(ys)}invalidateQueries(t,n,r){const[o,i]=Ju(t,n,r);return zo.batch(()=>{var a,s;if(this.queryCache.findAll(o).forEach(c=>{c.invalidate()}),o.refetchType==="none")return Promise.resolve();const l=tt(Ne({},o),{type:(a=(s=o.refetchType)!=null?s:o.type)!=null?a:"active"});return this.refetchQueries(l,i)})}refetchQueries(t,n,r){const[o,i]=Ju(t,n,r),a=zo.batch(()=>this.queryCache.findAll(o).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,tt(Ne({},i),{cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:o.refetchPage}}))}));let s=Promise.all(a).then(ys);return i!=null&&i.throwOnError||(s=s.catch(ys)),s}fetchQuery(t,n,r){const o=Nv(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(ys).catch(ys)}fetchInfiniteQuery(t,n,r){const o=Nv(t,n,r);return o.behavior=STt(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(ys).catch(ys)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>Gp(t)===Gp(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>lm(t,r.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(r=>lm(t,r.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(t)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>Gp(t)===Gp(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>lm(t,r.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(r=>lm(t,r.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(t)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n=tt(Ne(Ne(Ne({},this.defaultOptions.queries),this.getQueryDefaults(t==null?void 0:t.queryKey)),t),{_defaulted:!0});return!n.queryHash&&n.queryKey&&(n.queryHash=H4(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:tt(Ne(Ne(Ne({},this.defaultOptions.mutations),this.getMutationDefaults(t==null?void 0:t.mutationKey)),t),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class kTt extends e0{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),rY(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $3(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $3(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),process.env.NODE_ENV!=="production"&&typeof(t==null?void 0:t.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),sC(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&oY(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return MTt(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(t={}){var n=t,{refetchPage:r}=n,o=Ut(n,["refetchPage"]);return this.fetch(tt(Ne({},o),{meta:{refetchPage:r}}))}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch(tt(Ne({},t),{cancelRefetch:(n=t.cancelRefetch)!=null?n:!0})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ys)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),fb||this.currentResult.isStale||!j3(this.options.staleTime))return;const t=uce(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(fb||this.options.enabled===!1||!j3(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||lC.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=t!==r,c=l?t.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:h}=t;let{dataUpdatedAt:u,error:w,errorUpdatedAt:y,fetchStatus:p,status:k}=h,j=!1,F=!1,U;if(n._optimisticResults){const I=this.hasListeners(),N=!I&&rY(t,n),W=I&&oY(t,r,n,o);(N||W)&&(p=OT(t.options.networkMode)?"fetching":"paused",u||(k="loading")),n._optimisticResults==="isRestoring"&&(p="idle")}if(n.keepPreviousData&&!h.dataUpdatedAt&&d!=null&&d.isSuccess&&k!=="error")U=d.data,u=d.dataUpdatedAt,k=d.status,j=!0;else if(n.select&&typeof h.data<"u")if(i&&h.data===(a==null?void 0:a.data)&&n.select===this.selectFn)U=this.selectResult;else try{this.selectFn=n.select,U=n.select(h.data),U=B3(i==null?void 0:i.data,U,n),this.selectResult=U,this.selectError=null}catch(I){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(I),this.selectError=I}else U=h.data;if(typeof n.placeholderData<"u"&&typeof U>"u"&&k==="loading"){let I;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))I=i.data;else if(I=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof I<"u")try{I=n.select(I),this.selectError=null}catch(N){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(N),this.selectError=N}typeof I<"u"&&(k="success",U=B3(i==null?void 0:i.data,I,n),F=!0)}this.selectError&&(w=this.selectError,U=this.selectResult,y=Date.now(),k="error");const H=p==="fetching",R=k==="loading",z=k==="error";return{status:k,fetchStatus:p,isLoading:R,isSuccess:k==="success",isError:z,isInitialLoading:R&&H,data:U,dataUpdatedAt:u,error:w,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:H,isRefetching:H&&!R,isLoadingError:z&&h.dataUpdatedAt===0,isPaused:p==="paused",isPlaceholderData:F,isPreviousData:j,isRefetchError:z&&h.dataUpdatedAt!==0,isStale:V4(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,sC(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.trackedProps.size)return!0;const l=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const d=c;return this.currentResult[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify(Ne(Ne({},o),t))}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!w_(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){zo.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var a,s,l,c;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function TTt(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function rY(e,t){return TTt(e,t)||e.state.dataUpdatedAt>0&&$3(e,t,t.refetchOnMount)}function $3(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&V4(e,t)}return!1}function oY(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&V4(e,n)}function V4(e,t){return e.isStaleByTime(t.staleTime)}function MTt(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!sC(e.getCurrentResult(),t)}var F3={exports:{}},VO={};/**
1003
1003
  * @license React
@@ -1015,13 +1015,13 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
1015
1015
  *
1016
1016
  * This source code is licensed under the MIT license found in the
1017
1017
  * LICENSE file in the root directory of this source tree.
1018
- */var sY;function ATt(){return sY||(sY=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=Be,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(U){{for(var H=arguments.length,R=new Array(H>1?H-1:0),z=1;z<H;z++)R[z-1]=arguments[z];r("error",U,R)}}function r(U,H,R){{var z=t.ReactDebugCurrentFrame,I=z.getStackAddendum();I!==""&&(H+="%s",R=R.concat([I]));var N=R.map(function(W){return String(W)});N.unshift("Warning: "+H),Function.prototype.apply.call(console[U],console,N)}}function o(U,H){return U===H&&(U!==0||1/U===1/H)||U!==U&&H!==H}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,d=!1,h=!1;function u(U,H,R){d||e.startTransition!==void 0&&(d=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var z=H();if(!h){var I=H();i(z,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}var N=a({inst:{value:z,getSnapshot:H}}),W=N[0].inst,A=N[1];return l(function(){W.value=z,W.getSnapshot=H,w(W)&&A({inst:W})},[U,z,H]),s(function(){w(W)&&A({inst:W});var C=function(){w(W)&&A({inst:W})};return U(C)},[U]),c(z),z}function w(U){var H=U.getSnapshot,R=U.value;try{var z=H();return!i(R,z)}catch{return!0}}function y(U,H,R){return H()}var p=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",k=!p,j=k?y:u,F=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:j;aY.useSyncExternalStore=F,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),aY}process.env.NODE_ENV==="production"?F3.exports=ETt():F3.exports=ATt();var OTt=F3.exports;const bce=OTt.useSyncExternalStore,lY=pn(void 0),xce=pn(!1);function wce(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=lY),window.ReactQueryClientContext):lY)}const _ce=({context:e}={})=>{const t=en(wce(e,en(xce)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Sce=({client:e,children:t,context:n,contextSharing:r=!1})=>{Je(()=>(e.mount(),()=>{e.unmount()}),[e]),process.env.NODE_ENV!=="production"&&r&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const o=wce(n,r);return Qt(xce.Provider,{value:!n&&r},Qt(o.Provider,{value:e},t))},PTt=pn(!1),DTt=()=>en(PTt);function LTt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const NTt=pn(LTt()),ITt=()=>en(NTt);function Cce(e,t){return typeof e=="function"?e(...t):!!e}const RTt=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},jTt=e=>{Je(()=>{e.clearReset()},[e])},zTt=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Cce(n,[e.error,r]),BTt=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},$Tt=(e,t)=>e.isLoading&&e.isFetching&&!t,FTt=(e,t,n)=>(e==null?void 0:e.suspense)&&$Tt(t,n),HTt=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function WTt(e,t){const n=_ce({context:e.context}),r=DTt(),o=ITt(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=zo.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=zo.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=zo.batchCalls(i.onSettled)),BTt(i),RTt(i,o),jTt(o);const[a]=Ge(()=>new t(n,i)),s=a.getOptimisticResult(i);if(bce(He(l=>{const c=r?()=>{}:a.subscribe(zo.batchCalls(l));return a.updateResult(),c},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),Je(()=>{a.setOptions(i,{listeners:!1})},[i,a]),FTt(i,s,r))throw HTt(i,a,o);if(zTt({result:s,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:a.trackResult(s)}function kce(e,t,n){const r=Nv(e,t,n);return WTt(r,kTt)}function Tce({fill:e="rgba(38, 46, 61, 0.67)"}){return ge("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:ge("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 7C11 6.44772 11.4477 6 12 6C12.5523 6 13 6.44772 13 7C13 7.55228 12.5523 8 12 8C11.4477 8 11 7.55228 11 7ZM11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12ZM12 16C11.4477 16 11 16.4477 11 17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17C13 16.4477 12.5523 16 12 16Z",fill:e})})}const VTt=at("button",{target:"e14rhw2k0",label:"ClearSelectionButton"})("color:",({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor},";background:none;font-size:13px;border:none;height:26px;padding:0 6px 0 2px;margin:0 4px 0 4px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:hover{background-color:rgba(247,247,247,1);}"),UTt=at("span",{target:"e14rhw2k1",label:"ClearSelectionText"})("color:",({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor},";display:inline-block;padding-top:3px;white-space:nowrap;"),GTt=({onClick:e})=>{var t;const{themeSettings:n}=Lt(),{t:r}=Jt();return ot(VTt,{onClick:e,theme:n,children:[ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ge("path",{fill:(t=n.chart)==null?void 0:t.textColor,d:"M7.187 7l9.774 10.279A1 1 0 0 0 17 17V8a1 1 0 0 0-1-1H7.187zm9.018 10.979L6.206 7.463l.487-.415A1 1 0 0 0 6 8v9a1 1 0 0 0 1 1h9c.07 0 .139-.007.205-.021zM7 6h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z"})}),ge(UTt,{theme:n,children:r("commonFilter.clearSelectionButton")})]})};function YTt(e){const t={};return{flatFilters:e.reduce((n,r)=>(ui(r)?(t[r.config.guid]||(t[r.config.guid]=[]),r.filters.forEach(o=>{t[r.config.guid].push(o),n.push(o)})):n.push(r),n),[]),cascadingToPureFiltersMap:t}}function Mce(e,t,n){const r=t.filter(ui);return qTt(e,r).map(o=>{if(XTt(o)){const i=r.find(s=>s.config.guid===o.groupId);if(!i)throw new kt("errors.cascadingFilterOriginalNotFound");const a=n==null?void 0:n.shouldResetFiltersDeeperThanModified;return ZTt(o,i,{shouldResetFiltersDeeperThanModified:a})}return o})}function XTt(e){return"groupId"in e}function qTt(e,t){const n=[];return e.forEach(r=>{const o=t.find(i=>i.filters.some(a=>Zy(a)===Zy(r)));if(o){const i=o.config.guid,a=n.find(s=>"groupId"in s&&s.groupId===i);a?a.filters.push(r):n.push({groupId:i,filters:[r],previousFilters:o.filters})}else n.push(r)}),n}function ZTt(e,t,n){const r=n!=null&&n.shouldResetFiltersDeeperThanModified?JTt(e.filters,e.previousFilters):e.filters,o=KTt(r,t.config.disabled);return m5(r,{guid:t.config.guid,disabled:o})}function KTt(e,t){return e.some(n=>n.config.disabled!==t)?!t:t}function QTt(e,t,n){const{flatFilters:r,cascadingToPureFiltersMap:o}=YTt(e);return{pureFilters:r,updateFilters:i=>{const a=Mce(i,e,{shouldResetFiltersDeeperThanModified:!0});t(a)},pureFiltersIgnoringRules:eMt(n,o)}}function JTt(e,t){const n=e.reduce((r,o,i)=>{const a=t.find(s=>R4(s,o));return a&&!Vle(o,a)?i:r},-1);return n===-1?e:e.map((r,o)=>o>n?AT(r):r)}function eMt(e,t){var n;return{all:e.all,ids:((n=e.ids)==null?void 0:n.reduce((r,o)=>{const i=t[o];return i?r.concat(i.map(a=>a.config.guid)):r.concat(o)},[]))||[]}}const cY={applyMode:hb.HIGHLIGHT,shouldAffectFilters:!0,ignoreFilters:{all:!1,ids:[]},forceApplyBackgroundFilters:!0};function tMt(e,t){return e==="table"?{applyMode:hb.FILTER,shouldAffectFilters:!1,ignoreFilters:lo(cY.ignoreFilters,t.ignoreFilters||{})}:lo(cY,t)}function nMt(e,t,n,r,o,i,a){const s={},l=tMt(n,o),{pureFilters:c,updateFilters:d,pureFiltersIgnoringRules:h}=QTt(e,t,l.ignoreFilters||{}),u=c.filter(U=>!U.config.disabled),w=Jkt(u,h),y=B4(n,r),p=l.shouldAffectFilters&&y.length,[k,j]=oMt(w,y,l.applyMode),F=l.forceApplyBackgroundFilters?si(rMt(c),k):k;if(s.filters=F,s.highlights=j,s.onDataPointsSelected=(U,H)=>{const R=[];if(p){const z=HG(n,r,U);z&&R.push(z);const I=x_(n,r,U),{filters:N,isSelection:W}=WO(I,c,!0),A=i(W?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),C=WG(A,()=>{d(si(c,N))});R.push(C)}R.length&&(a==null||a({id:pb.WIDGET_POINTS_CROSSFILTERING,position:{left:H.clientX,top:H.clientY},itemSections:R}))},s.onDataPointContextMenu=(U,H)=>{const R=[];if(p){const z=HG(n,r,[U]);z&&R.push(z);const I=x_(n,r,[U]),{filters:N,isSelection:W}=WO(I,c,!0),A=i(W?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),C=WG(A,()=>{d(si(c,N))});R.push(C)}R.length&&(a==null||a({id:pb.WIDGET_POINTS_CROSSFILTERING,position:{left:H.clientX,top:H.clientY},itemSections:R}))},p){s.onDataPointClick=z=>{const I=x_(n,r,[z]),{filters:N}=WO(I,c);d(si(c,N))};const U=u.filter(z=>y==null?void 0:y.some(I=>Pi(z)&&Ia(z.attribute,I)&&!I4(z)&&!z.config.locked)),H=!!U.length,R=()=>{const z=U.map(AT);d(si(c,z))};H&&(s.renderToolbar=(z,I)=>{const N=y.map(({expression:W})=>W).join(";");return ot("div",{style:{display:"flex"},children:[ge(GTt,{onClick:R}),I]},N)})}return s}function rMt(e){return e.map(t=>{var n;return(n=t.config)==null?void 0:n.backgroundFilter}).filter(t=>!!t)}function oMt(e,t,n){if(n===hb.HIGHLIGHT){const[r,o]=N1(e,a=>t.every(s=>!Ia(s,a.attribute))),i=o.filter(a=>!I4(a));return[r,i]}return[e,[]]}function iMt(e,t){const[n,r]=Cc(Ke(()=>yl(e),[e]),{onLocalStateChange:He(u=>{const{filters:w,relations:y}=u;t&&t(Xa(w,y))},[t])}),{filters:o,relations:i}=n,a=Ke(()=>Xa(o,i),[o,i]),s=He(u=>{if(_u(u)){const{filters:w,relations:y}=yl(u);r({filters:w||[],relations:y||null})}else r({filters:u,relations:null})},[r]),l=He(u=>{const w=si(o,[u]);r({filters:w,relations:dl(o,i,w)})},[o,i,r]),c=He(u=>{r({filters:u,relations:dl(o,i,u)})},[o,i,r]),d=Ke(()=>o.some(u=>ui(u)),[o]),h=He(u=>{if(!i)return u;const w=d?Mce(u,o):u,y=dl(o,i,w);return Xa(w,y)},[d,o,i]);return{regularFilters:o,addFilter:l,filtersOrFilterRelations:a,setFiltersOrFilterRelations:s,setFilters:c,applyRelationsToOtherFilters:h}}const aMt=({initialFilters:e=[],openMenu:t,onBeforeMenuOpen:n,onFiltersChange:r}={})=>{const{t:o}=Jt(),{filtersOrFilterRelations:i,regularFilters:a,addFilter:s,setFiltersOrFilterRelations:l,setFilters:c,applyRelationsToOtherFilters:d}=iMt(e,r),h=He((u,w={})=>{var y,p;if(v2(u))return u;const k=OYe(u),j=u,F=Ii(u),U="drilldownOptions"in u&&(p=(y=u.drilldownOptions)==null?void 0:y.drilldownSelections)!=null&&p.length?lce(u.chartType,u.dataOptions,t5(u.drilldownOptions.drilldownSelections).nextDimension):u.dataOptions,H=nMt(a,c,k,U,w,o,t);return F.highlights=si(H.highlights,j.highlights),F.onBeforeMenuOpen=n,H.onDataPointClick&&s7(F,H.onDataPointClick),F.filters=d(si(H.filters,bj(j.filters))),H.onDataPointClick&&s7(F,H.onDataPointClick),H.onDataPointsSelected&&PYe(F,H.onDataPointsSelected),H.onDataPointContextMenu&&Tre(F,H.onDataPointContextMenu),H.renderToolbar&&DYe(F,H.renderToolbar),F},[a,c,o,t,n,d]);return{filters:i,setFilters:l,addFilter:s,connectToWidgetProps:h}};class U4{constructor(t,n=[]){this.component=t,this.contextConnectors=n,this.contexts=[],this.subscriptions=[],this.prepareContexts()}prepareContexts(){this.contextConnectors.forEach(({propsObserver:t},n)=>{const r={isReady:!1,data:null};this.contexts[n]=r;const o=t.subscribe(i=>{r.data=i,r.isReady=!0,this.rootElement&&this.renderComponentWithContext(this.rootElement,this.props)});this.subscriptions.push(o)})}renderComponentWithContext(t,n){if(!this.contexts.every(({isReady:i})=>i)||!t)return;const r=Qt(this.component,n,n==null?void 0:n.children),o=this.contextConnectors.reduceRight((i,{providerComponent:a},s)=>Qt(a,this.contexts[s].data,i),r);rh(o,t)}render(t,n){this.rootElement=t,this.props=n,this.renderComponentWithContext(t,n)}destroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions.length=0,this.contexts.length=0,this.rootElement&&rh(null,this.rootElement)}}const sMt=({nativeElement:e,onDestroy:t})=>{const n=Ye(null);return Do(()=>{n.current&&n.current.appendChild(e)},[e]),Do(()=>()=>{t&&t()},[t]),Me("div",{ref:n,style:"width: 100%; height: 100%"})};function lMt({hook:e,params:t,onResult:n}){const r=Ye(null),o=e(...t);return Je(()=>{r.current!==o&&n(o),r.current=o},[o,n]),null}function cMt(e,t,n=!1){return function(...r){let o=!0,i;const a=new Promise(s=>{let l;i=e.subscribe(c=>{o?(l=c[t](...r),o=!1):s(l)})});if(a.finally(()=>{i==null||i.unsubscribe()}),n)return a}}class uMt{constructor(){this.listeners=new Set}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>this.listeners.delete(t)}}notify(t){this.listeners.forEach(n=>n(t))}destroy(){this.listeners.clear()}}class R1{constructor(t){this.observable=new uMt,this.data=t}subscribe(t,n=!0){const r=this.observable.subscribe(t);return n&&this.data!==void 0&&t(this.data),r}setValue(t){this.data!==t&&(this.data=t,this.observable.notify(t))}getValue(){return this.data}destroy(){this.observable.destroy()}}class dMt{constructor(t,n=[]){this.hook=t,this.rootElement=document.createElement("div"),this.resultObserver=new R1,this.componentAdapter=new U4(lMt,n)}handleHookResult(t){this.resultObserver.setValue(t)}run(...t){this.params=t,this.componentAdapter.render(this.rootElement,{hook:this.hook,params:this.params,onResult:this.handleHookResult.bind(this)})}subscribe(t){return this.resultObserver.subscribe(t)}destroy(){this.componentAdapter.destroy(),this.resultObserver.destroy(),this.rootElement.remove()}}const pMt=(e,t,n=[])=>{const r=Array.isArray(n)?n:[n];return Qt(e,t,...r)},Ece=(e,t)=>pMt(sMt,{nativeElement:e,onDestroy:t});class mb extends Vb{constructor(t,n,r,o,i,a,s,l,c,d){if(super(t,i||zt.Dimension,a,l,c),this._dimensions=[],this._attributes=[],this._sort=Zn.None,!c&&n){const{table:h,column:u}=Nh(n);this.composeCode=ak(h,u,"",n5)}this._sort=s||Zn.None,this._expression=n,this.setDimensions(o||[]),this.setAttributes(r),d&&(this.defaultAttribute=d)}static parseType(t){switch(t){case"datetime":case zt.DateDimension:return zt.DateDimension;case"text":case zt.TextDimension:return zt.TextDimension;case"numeric":case zt.NumericDimension:return zt.NumericDimension}return zt.TextDimension}getAttachedName(t,n){let r=t;const o=sc(t);return(o==="id"||o==="name"||Object.getOwnPropertyDescriptor(this,o)!==void 0||this[o]!==void 0)&&(r=n),r}setDimensions(t){this._dimensions=t;for(let n=0;n<t.length;n++){const r=this.getAttachedName(t[n].name,t[n].attributes[0].expression);this[sc(r)]=t[n],r!=t[n].name&&(t[n].name=r)}}setAttributes(t){this._attributes=t||[];for(let n=0;n<t.length;n++){const r=this.getAttachedName(t[n].name,t[n].expression);this[sc(r)]=t[n],t[n].name!=r&&(t[n].name=r)}}get id(){return this._expression}get attributes(){return this._attributes}get dimensions(){return this._dimensions}get expression(){return this._expression}getSort(){return this._sort}sort(t){return new mb(this.name,this.expression,this.attributes,this.dimensions,this.type,this.description,t,this.dataSource,this.composeCode,this.defaultAttribute)}serialize(){const t=super.serialize();return t.__serializable="DimensionalDimension",t.expression=this.expression,this.getSort()!==void 0&&(t.sort=this.getSort()),t.attributes=this._attributes.map(n=>n.serialize()),t.dimensions=this._dimensions.map(n=>n.serialize()),this.defaultAttribute&&(t.defaultAttribute=this.defaultAttribute.serialize()),t}jaql(t){if(this.defaultAttribute)return this.defaultAttribute.jaql(t);if(this.dimensions.length>0)return this.dimensions[0].jaql(t);const n={jaql:{title:this.name,dim:this.expression,datatype:x5(this.type)}};return this._sort!=Zn.None&&(n.jaql.sort=this._sort==Zn.Ascending?"asc":"desc"),t===!0?n.jaql:n}}class PT extends mb{constructor(t,n,r,o,i,a){super(t,n,[],[],zt.DateDimension,r,o,i,a),this.defaultLevel=nt.Years,this.Years=new oo(nt.Years,n,nt.Years,"yyyy",r,o,i),this.Quarters=new oo(nt.Quarters,n,nt.Quarters,"Q yyyy",r,o,i),this.Months=new oo(nt.Months,n,nt.Months,"yyyy-MM",r,o,i),this.Weeks=new oo(nt.Weeks,n,nt.Weeks,"ww yyyy",r,o,i),this.Days=new oo(nt.Days,n,nt.Days,"yyyy-MM-dd",r,o,i),this.Hours=new oo(nt.Hours,n,nt.Hours,"yyyy-MM-dd HH:mm",r,o,i),this.MinutesRoundTo30=new oo(nt.MinutesRoundTo30,n,nt.MinutesRoundTo30,"yyyy-MM-dd HH:mm",r,o,i),this.MinutesRoundTo15=new oo(nt.MinutesRoundTo15,n,nt.MinutesRoundTo15,"yyyy-MM-dd HH:mm",r,o,i),this.Minutes=new oo(nt.Minutes,n,nt.Minutes,"yyyy-MM-dd HH:mm",r,o,i),this.Seconds=new oo(nt.Seconds,n,nt.Seconds,"yyyy-MM-dd HH:mm:ss",r,o,i),this.AggHours=new oo(nt.AggHours,n,nt.AggHours,"HH:mm",r,o,i),this.AggMinutesRoundTo30=new oo(nt.AggMinutesRoundTo30,n,nt.AggMinutesRoundTo30,"HH:mm",r,o,i),this.AggMinutesRoundTo15=new oo(nt.AggMinutesRoundTo15,n,nt.AggMinutesRoundTo15,"HH:mm",r,o,i),this.AggMinutesRoundTo1=new oo(nt.AggMinutesRoundTo1,n,nt.AggMinutesRoundTo1,"HH:mm",r,o,i),this.setAttributes([this.Years,this.Quarters,this.Months,this.Weeks,this.Days,this.Hours,this.MinutesRoundTo30,this.MinutesRoundTo15,this.Minutes,this.Seconds,this.AggHours,this.AggMinutesRoundTo30,this.AggMinutesRoundTo15,this.AggMinutesRoundTo1])}get id(){return this.expression}setDimensions(){}setAttributes(t){this._attributes=t}getSort(){return this._sort}sort(t){return new PT(this.name,this.expression,this.description,t,this.dataSource,this.composeCode)}serialize(){const t=super.serialize();return t.__serializable="DimensionalDateDimension",t}jaql(t){const n=this[this.defaultLevel].jaql();return n.jaql.title=this.name,t?n.jaql:n}}function Ace(e){const t=e.name||e.title,n=e.desc||e.description,r=e.expression||e.dim,o=mb.parseType(e.dimtype||e.type),i=e.sort,a=e.dataSource;if(o==zt.DateDimension)return new PT(t,r,n,i,a);const s=Object.getOwnPropertyNames(e).map(d=>e[d]).filter(d=>zt.isAttribute(d==null?void 0:d.type));if(s.length==0)if(e.attributes){let d;for(let h=0;h<e.attributes.length;h++)d=e.attributes[h],s.push(new xy(d.name,d.expression,d.type,d.description,d.sort,d.dataSource))}else r&&s.push(new xy(t,r,o,n,i,a));const l=Object.getOwnPropertyNames(e).map(d=>e[d]).filter(d=>zt.isDimension(d==null?void 0:d.type));if(l.length==0&&e.dimensions)for(let d=0;d<e.dimensions.length;d++)l.push(Ace(e.dimensions[d]));const c=new mb(t,r,s,l,o,n,i,a);return e.defaultAttribute&&(c.defaultAttribute=s.find(d=>d.name===e.defaultAttribute)),c}function hMt(e){const t=e.name||e.title,n=e.expression||e.dim,r=e.desc||e.description,o=e.sort,i=e.dataSource;return new PT(t,n,r,o,i)}var fMt=Object.defineProperty,mMt=Object.defineProperties,gMt=Object.getOwnPropertyDescriptors,uC=Object.getOwnPropertySymbols,Oce=Object.prototype.hasOwnProperty,Pce=Object.prototype.propertyIsEnumerable,uY=Math.pow,H3=(e,t,n)=>t in e?fMt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pe=(e,t)=>{for(var n in t||(t={}))Oce.call(t,n)&&H3(e,n,t[n]);if(uC)for(var n of uC(t))Pce.call(t,n)&&H3(e,n,t[n]);return e},je=(e,t)=>mMt(e,gMt(t)),_n=(e,t)=>{var n={};for(var r in e)Oce.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&uC)for(var r of uC(e))t.indexOf(r)<0&&Pce.call(e,r)&&(n[r]=e[r]);return n},Bt=(e,t,n)=>(H3(e,typeof t!="symbol"?t+"":t,n),n),Co=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((n=n.apply(e,t)).next())});function Eu(e,t){if(!e||typeof e!="string")return e;const n=new URL(e);return n.origin+(n.pathname.endsWith("/")?n.pathname:n.pathname+"/")+(t&&n.search?n.search:"")}const vMt={errorPrefix:"[request-error]",errors:{networkError:"Network error. Check browser console for further details.",authFailed:"Failed to authenticate.",ssoNotEnabled:"SSO is not enabled on target instance, please choose another authentication method.",ssoNoLoginUrl:"Can not fetch login URL on target instance. Check SSO settings.",passwordAuthFailed:"$t(errorPrefix) Username and password authentication was not successful. Check credentials.",tokenAuthFailed:"$t(errorPrefix) Token authentication was not successful. Check credentials.",responseError_onlyStatus:"$t(errorPrefix) Status: {{status}}",responseError_withStatusText:"$t(errorPrefix) Status: {{status}} - {{statusText}}"}},yMt={errorPrefix:"[request-error]",errors:{networkError:"Помилка мережі. Можливо ви забули додати свій домен до «CORS Allowed Origins» в панелі адміністратора Sisense -> Security Settings.",authFailed:"Автентифікація не вдалася.",ssoNotEnabled:"SSO не ввімкнено на цьому сервері, будь ласка, виберіть інший метод аутентифікації",ssoNoLoginUrl:"Неможливо отримати loginUrl з сервера. Перевірте налаштування SSO.",passwordAuthFailed:"$t(errorPrefix) Помилка автентифікації за допомогою імені користувача та пароля. Перевірте дані для входу.",tokenAuthFailed:"$t(errorPrefix) Помилка автентифікації за допомогою токена. Перевірте дані для входу.",responseError_onlyStatus:"$t(errorPrefix) Статус: {{status}}",responseError_withStatusText:"$t(errorPrefix) Статус: {{status}} - {{statusText}}"}},Dce="sdkRestClient",bMt={en:vMt,uk:yMt};function xMt(){return FC({resource:bMt,language:"en",namespace:Dce})}const{i18nextInstance:wMt}=xMt();class j1{constructor(t){this._valid=!0,this._authenticating=!1,this._tried=!1,this._result=new Promise(n=>{this._resolve=n}),this.type=t}isValid(){return this._valid}invalidate(){this._valid=!1}authenticate(){return this._result}isAuthenticating(){return this._authenticating}authenticated(){return this._result}applyHeader(t){}}const DT=(e,t)=>{for(const[n,r]of Object.entries(t))Array.isArray(e)?e.push([n,r]):typeof e.set=="function"?e.set(n,r):e[n]=r},Lce=(e,t)=>{if(!e||typeof e!="string")return e;const n=new URL(e);for(const[r,o]of Object.entries(t))n.searchParams.append(r,o);return n.toString()},dY=(e,t)=>{if(!e||typeof e!="string")return e;const n=new URL(e),r=t.startsWith("/")?t.slice(1):t;return n.pathname+=r,n.toString()};class _Mt extends j1{constructor(t,n){super("bearer"),this.bearer=n,this._resolve(!0)}applyHeader(t){const n="Bearer "+this.bearer;DT(t,{Authorization:n})}authenticate(){return this._result}authenticated(){return this._result}}function SMt(e){return e.type==="bearer"}class CMt extends j1{constructor(){super("fusion")}authenticate(){var t,n,r,o,i;const a=!!(!((n=(t=window.prism)===null||t===void 0?void 0:t.user)===null||n===void 0)&&n._id);this._resolve(a);const s=(i=(o=(r=window.document)===null||r===void 0?void 0:r.cookie)===null||o===void 0?void 0:o.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/))===null||i===void 0?void 0:i[1];return s&&(this.antiCsrfToken=s),this._result}applyHeader(t){this.antiCsrfToken&&DT(t,{"X-Xsrf-Token":this.antiCsrfToken})}}let vd=class extends Lb{constructor(e,t){super(Dce,{key:e,interpolationOptions:t},wMt.t)}get status(){return this.interpolationOptions.status}};var UO=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class kMt extends j1{constructor(t,n=!1){super("sso"),this.url=Eu(t,!0),this._enableSilentPreAuth=n}authenticate(t=!0){var n;return UO(this,void 0,void 0,function*(){try{this._authenticating=!0;const{isAuthenticated:r,loginUrl:o}=yield this.checkAuthentication();if(r)return this._resolve(!0),yield this._result;const i=Lce(o,{return_to:window.location.href});if(this._enableSilentPreAuth&&t){yield this.authenticateSilent(i);const{isAuthenticated:a}=yield this.checkAuthentication();if(a)return this._resolve(!0),yield this._result}(n=window==null?void 0:window.location)===null||n===void 0||n.replace(i)}finally{this._resolve(!1),this._authenticating=!1}return this._result})}authenticateSilent(t){return UO(this,void 0,void 0,function*(){const n=document.createElement("iframe");n.style.display="none",document.body.appendChild(n),n.src=t,yield new Promise(r=>{n.onload=()=>{r(!0)}}),document.body.removeChild(n)})}checkAuthentication(){var t,n,r;return UO(this,void 0,void 0,function*(){const o=dY(Eu(this.url),"api/auth/isauth"),i=yield fetch(o,{headers:{Internal:"true"},credentials:"include"}).catch(LT);if(i.status===200&&!(!((n=(t=i.headers)===null||t===void 0?void 0:t.get("Content-Type"))===null||n===void 0)&&n.includes("application/json")))throw new vd("errors.authFailed");const a=yield i.json();if(!a.isAuthenticated){if(!a.ssoEnabled)throw new vd("errors.ssoNotEnabled");if(!a.loginUrl)throw new vd("errors.ssoNoLoginUrl")}const s=a.loginUrl&&((r=a.loginUrl)===null||r===void 0?void 0:r.search(/^\/api\/v\d+\/[^/]+\/login$/))!==-1?dY(this.url,a.loginUrl):a.loginUrl||"";return{isAuthenticated:a.isAuthenticated,loginUrl:s}})}}function Nce(e){return e.type==="sso"}var TMt=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class MMt extends j1{constructor(t,n){super("wat"),this.url=`${Eu(t)}api/v1/wat/sessionToken`,this.body=`{"webAccessToken": "${n}"}`}authenticate(){return TMt(this,void 0,void 0,function*(){if(this._tried)return this._result;this._tried=!0;try{this._authenticating=!0;const t=yield fetch(this.url,{method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:this.body}).catch(LT);if(t.ok){const n=yield t.json();this._initialiser=n.initialiser,this._webSessionToken=n.webSessionToken,this._resolve(!0)}}catch{throw new vd("errors.tokenAuthFailed")}finally{this._resolve(!1),this._authenticating=!1}return this._result})}applyHeader(t){if(this._webSessionToken&&this._initialiser){const n=this._webSessionToken,r=this._initialiser;DT(t,{Authorization:n,Initialiser:r})}}}function Ice(e){return e.type==="wat"}var Rce=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};function EMt(e){var t,n,r;return Rce(this,void 0,void 0,function*(){if(!e.ok){const o=(t=e.headers)===null||t===void 0?void 0:t.get("Content-Type"),i=o&&o.includes("application/json")?yield e.json().catch(()=>({})):{};throw new vd("errors.responseError",{status:e.status.toString(),statusText:e.statusText,errorCode:(n=i.error)===null||n===void 0?void 0:n.code,errorMessage:(r=i.error)===null||r===void 0?void 0:r.message,context:e.statusText?"withStatusText":"onlyStatus"})}return e})}function AMt(e,t){if(t.invalidate(),IMt(t))throw new vd("errors.passwordAuthFailed");if(SMt(t)||Ice(t))throw new vd("errors.tokenAuthFailed");return Nce(t)&&!t.isAuthenticating()&&t.authenticate(),e}function OMt(e){return e.message==="Failed to fetch"&&e.name==="TypeError"}function PMt(){return console.warn("Network error. Verify server is accessible and your domain is added to 'CORS Allowed Origins' in Sisense Admin Panel -> Security Settings."),Promise.reject(new vd("errors.networkError"))}const DMt=e=>t=>Rce(void 0,void 0,void 0,function*(){return t.status===401?AMt(t,e):t.ok?t:EMt(t)}),LT=e=>OMt(e)?PMt():Promise.reject(e);var LMt=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class NMt extends j1{constructor(t,n,r){super("password"),this._authheader="",this.url=`${Eu(t)}api/v1/authentication/login`;const o=encodeURIComponent(n),i=encodeURIComponent(r);this.body=`username=${o}&password=${i}`}authenticate(){return LMt(this,void 0,void 0,function*(){if(this._tried)return this._result;this._tried=!0;try{this._authenticating=!0;const t=yield fetch(this.url,{method:"POST",headers:{accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:this.body}).catch(LT);if(t.ok){const n=yield t.json();this._authheader=n.access_token}}finally{this._resolve(!!this._authheader),this._authenticating=!1}return this._result})}applyHeader(t){const n="Bearer "+this._authheader;DT(t,{Authorization:n})}}function IMt(e){return e.type==="password"}function RMt({url:e,username:t,password:n,token:r,wat:o,ssoEnabled:i=!1,enableSilentPreAuth:a=!1,useFusionAuth:s=!1}){const l=Eu(e);return i?new kMt(Eu(e,!0),a):t&&n?new NMt(l,t,n):r?new _Mt(l,r):o?new MMt(l,o):s?new CMt:null}var jMt=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class zMt{constructor(t,n,r){this.url=Eu(t),this.auth=n,this.env=r}login(){return this.auth.authenticate()}call(t,n,r){return jMt(this,void 0,void 0,function*(){this.auth.isAuthenticating()&&(yield this.auth.authenticated()),n.headers=n.headers||{},Nce(this.auth)&&(n.credentials="include"),this.auth.applyHeader(n.headers);const o=r!=null&&r.skipTrackingParam?t:Lce(t,{trc:this.env}),i=yield fetch(o,n).then(DMt(this.auth)).catch(LT);if(!(i.status===204||i.status===304))return r!=null&&r.returnBlob?i.blob():i.json().catch(a=>{var s,l;if(!(!((l=(s=a==null?void 0:a.message)===null||s===void 0?void 0:s.includes)===null||l===void 0)&&l.call(s,"Unexpected end of JSON input")))throw a})})}post(t,n,r={},o,i){const a=Object.assign({method:"POST",body:i!=null&&i.nonJSONBody?n:JSON.stringify(n),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json;charset=UTF-8"},signal:o},r);return this.call(this.url+t,a,i)}patch(t,n,r={},o,i){const a=Object.assign({method:"PATCH",body:i!=null&&i.nonJSONBody?n:JSON.stringify(n),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json;charset=UTF-8"},signal:o},r);return this.call(this.url+t,a,i)}get(t,n={},r){return this.call(this.url+t,Object.assign(Object.assign({},n),{method:"GET"}),r)}delete(t,n={},r){return this.call(this.url+t,Object.assign(Object.assign({},n),{method:"DELETE"}),r)}}const BMt={errors:{invalidAttribute:"Invalid attribute {{attributeName}}. Hint: attributes for query should be extracted from the data model generated by the CLI tool.",noDimensionsOrMeasures:"Neither dimensions nor measures found. Query should have at least one dimension or measure.",invalidMeasure:'Invalid measure "{{measureName}}". Hint: measures for the query can be constructed using the "measureFactory" functions.',invalidFilter:'Invalid filter "{{filterName}}". Hint: filters for the query can be constructed using the "filterFactory" functions.',invalidHighlight:'Invalid highlight "{{highlightName}}". Hint: highlights for the query can be constructed using the "filterFactory" functions.',invalidCountNegative:'Invalid count "{{count}}". Count should be non-negative.',invalidOffset:'Invalid offset "{{offset}}". Offset should be non-negative.',missingHttpClient:"Query requires httpClient to work properly.",missingPostMethod:'httpClient must provide "post" method.',noJaqlResponse:"No jaql response received from the server",dataSourceNotFound:'Failed to get fields for data source "{{dataSource}}". Please make sure the data source exists and is accessible.'}},$Mt={errors:{invalidAttribute:"Недійсний атрибут {{attributeName}}. Підказка: атрибути для запиту повинні бути витягнуті з моделі даних, створеної за допомогою CLI-інструменту.",noDimensionsOrMeasures:"Не знайдено ні вимірів, ні показників. Запит повинен мати щонайменше один вимір або показник.",invalidMeasure:'Недійсний показник "{{measureName}}". Підказка: показники для запиту можна створити за допомогою функцій "measureFactory".',invalidFilter:'Недійсний фільтр "{{filterName}}". Підказка: фільтри для запиту можна створити за допомогою функцій "filterFactory".',invalidHighlight:'Недійсне виділення "{{highlightName}}". Підказка: виділення для запиту можна створити за допомогою функцій "filterFactory".',invalidCountNegative:`Недійсний count "{{count}}". Count повинен бути не від'ємним.`,invalidOffset:`Недійсний offset "{{offset}}". Offset повинен бути не від'ємним.`,missingHttpClient:"Для запиту потрібен httpClient, щоб працювати належним чином.",missingPostMethod:'httpClient повинен мати метод "post".',noJaqlResponse:"Відповіді, що містить jaql, від сервера не отримано",dataSourceNotFound:'Не вдалося отримати поля для джерела даних "{{dataSource}}". Переконайтесь що джерело існує і доступне.'}},jce="sdkQueryClient",FMt={en:BMt,uk:$Mt};function HMt(){return FC({resource:FMt,language:"en",namespace:jce})}const{i18nextInstance:WMt}=HMt();function VMt(e,t){const n=e.map(o=>UMt(o,t)),r=GMt(n);return Object.values(r).map(o=>Ace(o))}const UMt=(e,t)=>{const n=e.table,r=e.tableTitle||n,o=e.id,i=e.title||o,a=Eg(t)?t:{title:t,live:!1},s=e.dimtype==="datetime"?hMt({name:i,expression:o,dataSource:a,description:e.description}):fK({name:i,type:e.dimtype==="text"?"text-attribute":"numeric-attribute",expression:o,dataSource:a,description:e.description});return{dimension:{id:n,name:r,description:e.tableDescription},attribute:s}},GMt=e=>e.reduce((t,{dimension:n,attribute:r})=>{const o=t[n.name]||{name:n.name,expression:n.id,description:n.description};return Object.assign(Object.assign({},t),{[n.name]:Object.assign(Object.assign({},o),{[r.name]:r})})},{}),zce=e=>{if(e!==void 0)return`${e}`},Bce=e=>{if(e!==void 0)return new Date(e).toISOString()},G4=()=>!1;function pY(e,t){const n=t.filter;return"or"in n?r=>n.or.map(o=>e(Object.assign(Object.assign({},t),{filter:o}))).reduce((o,i)=>o||i(r),!1):"and"in n?r=>n.and.map(o=>e(Object.assign(Object.assign({},t),{filter:o}))).reduce((o,i)=>o&&i(r),!0):e(t)}function YMt(e){const{datatype:t}=e,n=e.filter,r=t==="datetime"?Bce:zce;return o=>{const i=n.members.map(r),a=r(o);return i.includes(a)}}function XMt(e){const{datatype:t}=e,n=e.filter,r=t==="datetime"?Bce:zce;return o=>{var i,a;const s=((a=(i=n.exclude)===null||i===void 0?void 0:i.members)===null||a===void 0?void 0:a.map(r))||[],l=r(o);return!s.includes(l)}}function qMt(e){const t=e.filter,n=Mg(t);return n===At.STARTS_WITH?r=>new RegExp(`^${t.startsWith}`,"i").test(r):n===At.ENDS_WITH?r=>new RegExp(`${t.endsWith}$`,"i").test(r):n===At.CONTAINS?r=>new RegExp(t.contains,"i").test(r):n===At.EQUALS?r=>r.localeCompare(t.equals,void 0,{sensitivity:"base"})===0:n===At.DOESNT_START_WITH?r=>!new RegExp(`^${t.doesntStartWith}`,"i").test(r):n===At.DOESNT_END_WITH?r=>!new RegExp(`${t.doesntEndWith}$`,"i").test(r):n===At.DOESNT_CONTAIN?r=>!new RegExp(t.doesntContain,"i").test(r):n===At.DOESNT_EQUAL?r=>r.localeCompare(t.doesntEqual,void 0,{sensitivity:"base"})!==0:G4}function ZMt(e){const t=e.filter,n=Mg(t);return n===At.EQUALS?r=>Number(t.equals)===Number(r):n===At.DOESNT_EQUAL?r=>Number(t.doesntEqual)!==Number(r):n===At.LESS_THAN?r=>Number(r)<Number(t.toNotEqual):n===At.GREATER_THAN?r=>Number(r)>Number(t.fromNotEqual):n===At.BETWEEN?r=>Number(t.to)>=Number(r)&&Number(r)>=Number(t.from):n===At.GREATER_THAN_OR_EQUAL?r=>Number(r)>=Number(t.from):n===At.LESS_THAN_OR_EQUAL?r=>Number(t.to)>=Number(r):G4}function KMt(e){const t=e,{datatype:n}=t,r=t.filter;return cK(r)?YMt(t):uK(r)&&Mg(r)===At.IS_NOT?XMt(t):n==="text"?pY(qMt,t):n==="numeric"?pY(ZMt,t):G4}function QMt(e){return t=>{if(_u(t)){const{filters:n,relations:r}=yl(t),o=[...n,e],i=dl(n,r,o);return Xa(o,i)}return[...t||[],e]}}function JMt(e){return t=>{if(_u(t)){const{filters:n,relations:r}=yl(t),o=[...n,...e],i=dl(n,r,o);return Xa(o,i)}return[...t||[],...e]}}function eEt(e){return t=>{if(_u(t)){const{filters:n,relations:r}=yl(t),o=n.filter(a=>a.config.guid!==e.config.guid),i=dl(n,r,o);return Xa(o,i)}return(t||[]).filter(n=>n.config.guid!==e.config.guid)}}function tEt(e){return t=>{if(_u(t)){const{filters:n,relations:r}=yl(t),o=n.filter(a=>!e.some(s=>a.config.guid===s.config.guid)),i=dl(n,r,o);return Xa(o,i)}return(t||[]).filter(n=>!e.some(r=>n.config.guid===r.config.guid))}}function nEt(e,t){return n=>{if(_u(n)){const{filters:r,relations:o}=yl(n),i=r.map(s=>s.config.guid===e.config.guid?t:s),a=YQe(o,e,t);return Xa(i,a)}return(n||[]).map(r=>r.config.guid===e.config.guid?t:r)}}var Fa={},$ce={},NT={},Y4={};(function(e){var t=vo&&vo.__awaiter||function(o,i,a,s){function l(c){return c instanceof a?c:new a(function(d){d(c)})}return new(a||(a=Promise))(function(c,d){function h(y){try{w(s.next(y))}catch(p){d(p)}}function u(y){try{w(s.throw(y))}catch(p){d(p)}}function w(y){y.done?c(y.value):l(y.value).then(h,u)}w((s=s.apply(o,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.Task=e.ExecutionResultStatus=void 0;var n;(function(o){o.SUCCESS="SUCCESS",o.ERROR="ERROR"})(n=e.ExecutionResultStatus||(e.ExecutionResultStatus={}));class r{constructor(i,a,s){this.steps=i,this.passport=a,this.addons=s,this.statistics={startTime:new Date,steps:[],runtimeInfo:{}},this.currentStep=void 0}run(i){return t(this,void 0,void 0,function*(){let a=i,s;for(let c=0;c<this.steps.length;c+=1){this.currentStep=this.steps[c];const{resultValue:d,info:h}=yield this.currentStep.run(this,a);if(this.statistics.steps.push(h),h.success)a=d;else{s=h.error;break}}const l=this.statistics.steps.length===this.steps.length&&this.statistics.steps.every(c=>c.success);return this.statistics.endTime=new Date,{status:l?n.SUCCESS:n.ERROR,error:s,result:l?a:void 0,statistics:this.statistics}})}cancel(i){var a;return t(this,void 0,void 0,function*(){yield(a=this.currentStep)===null||a===void 0?void 0:a.cancel(this,i)})}addRuntimeInfo(i,a){this.statistics.runtimeInfo[i]=a}emitAddonEvent(i,...a){var s;const l=i.split("."),c=l[0],d=l[1],h=(s=this.addons)===null||s===void 0?void 0:s.find(w=>w.addonName===c),u=(h==null?void 0:h.events)[d];u(...a)}}e.Task=r})(Y4);var GO=vo&&vo.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(NT,"__esModule",{value:!0});NT.AbstractTaskManager=void 0;const rEt=Y4;class oEt{constructor(t){this.runningTasks=new Map,this.addons=t||[]}runTask(t){return GO(this,void 0,void 0,function*(){const{taskId:n}=t.passport;this.runningTasks.set(n,t);const r=yield t.run();return this.runningTasks.delete(n),r})}createFlow(t){return n=>GO(this,void 0,void 0,function*(){const r=new rEt.Task(t,n,this.addons);return this.runTask(r)})}cancel(t,n){return GO(this,void 0,void 0,function*(){const r=this.runningTasks.get(t);r&&(yield r.cancel(n))})}}NT.AbstractTaskManager=oEt;var IT={},z1={};Object.defineProperty(z1,"__esModule",{value:!0});z1.TaskCanceledError=void 0;class iEt extends Error{constructor(t){const n=`Task was canceled due to: "${t}"`;super(n)}}z1.TaskCanceledError=iEt;var hY=vo&&vo.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(IT,"__esModule",{value:!0});IT.Step=void 0;const aEt=z1;class sEt{constructor(t,n,r){this.taskSelfResolvers=new Map,this.taskStepInfos=new Map,this.name=t,this.runLogic=n,this.cancelLogic=r}run(t,n){return hY(this,void 0,void 0,function*(){return this.addStepInfo(t,{name:this.name}),new Promise(r=>{const o=new Date,i=(a,s)=>{const l=new Date,c=l.getTime()-o.getTime();this.addStepInfo(t,{startTime:o,endTime:l,duration:c}),this.addStepInfo(t,s?{success:!1,error:s}:{success:!0}),r({resultValue:a,info:this.getStepInfo(t)})};this.taskSelfResolvers.set(t,i),this.runLogic(t,n).then(a=>i(a)).finally(()=>{this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t)}).catch(a=>i(void 0,a))})})}cancel(t,n){return hY(this,void 0,void 0,function*(){this.addStepInfo(t,{wasCanceled:!0,cancelingReason:n});const r=this.taskSelfResolvers.get(t);r==null||r(void 0,new aEt.TaskCanceledError(n)),this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t),yield this.cancelLogic(t,n)})}addStepInfo(t,n){const r=this.taskStepInfos.get(t)||{},o=Object.assign(Object.assign({},r),n);this.taskStepInfos.set(t,o)}getStepInfo(t){return this.taskStepInfos.get(t)}}IT.Step=sEt;var RT={};Object.defineProperty(RT,"__esModule",{value:!0});RT.Addon=void 0;class lEt{constructor(){this.events={}}}RT.Addon=lEt;var jT={},Mw,cEt=new Uint8Array(16);function Fce(){if(!Mw&&(Mw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Mw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mw(cEt)}const uEt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function zT(e){return typeof e=="string"&&uEt.test(e)}var wi=[];for(var YO=0;YO<256;++YO)wi.push((YO+256).toString(16).substr(1));function BT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(wi[e[t+0]]+wi[e[t+1]]+wi[e[t+2]]+wi[e[t+3]]+"-"+wi[e[t+4]]+wi[e[t+5]]+"-"+wi[e[t+6]]+wi[e[t+7]]+"-"+wi[e[t+8]]+wi[e[t+9]]+"-"+wi[e[t+10]]+wi[e[t+11]]+wi[e[t+12]]+wi[e[t+13]]+wi[e[t+14]]+wi[e[t+15]]).toLowerCase();if(!zT(n))throw TypeError("Stringified UUID is invalid");return n}var fY,XO,qO=0,ZO=0;function dEt(e,t,n){var r=t&&n||0,o=t||new Array(16);e=e||{};var i=e.node||fY,a=e.clockseq!==void 0?e.clockseq:XO;if(i==null||a==null){var s=e.random||(e.rng||Fce)();i==null&&(i=fY=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),a==null&&(a=XO=(s[6]<<8|s[7])&16383)}var l=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:ZO+1,d=l-qO+(c-ZO)/1e4;if(d<0&&e.clockseq===void 0&&(a=a+1&16383),(d<0||l>qO)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");qO=l,ZO=c,XO=a,l+=122192928e5;var h=((l&268435455)*1e4+c)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=h&255;var u=l/4294967296*1e4&268435455;o[r++]=u>>>8&255,o[r++]=u&255,o[r++]=u>>>24&15|16,o[r++]=u>>>16&255,o[r++]=a>>>8|128,o[r++]=a&255;for(var w=0;w<6;++w)o[r+w]=i[w];return t||BT(o)}function Hce(e){if(!zT(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}function pEt(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var hEt="6ba7b810-9dad-11d1-80b4-00c04fd430c8",fEt="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Wce(e,t,n){function r(o,i,a,s){if(typeof o=="string"&&(o=pEt(o)),typeof i=="string"&&(i=Hce(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var l=new Uint8Array(16+o.length);if(l.set(i),l.set(o,i.length),l=n(l),l[6]=l[6]&15|t,l[8]=l[8]&63|128,a){s=s||0;for(var c=0;c<16;++c)a[s+c]=l[c];return a}return BT(l)}try{r.name=e}catch{}return r.DNS=hEt,r.URL=fEt,r}function mEt(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return gEt(vEt(yEt(e),e.length*8))}function gEt(e){for(var t=[],n=e.length*32,r="0123456789abcdef",o=0;o<n;o+=8){var i=e[o>>5]>>>o%32&255,a=parseInt(r.charAt(i>>>4&15)+r.charAt(i&15),16);t.push(a)}return t}function Vce(e){return(e+64>>>9<<4)+14+1}function vEt(e,t){e[t>>5]|=128<<t%32,e[Vce(t)-1]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,a=0;a<e.length;a+=16){var s=n,l=r,c=o,d=i;n=Bi(n,r,o,i,e[a],7,-680876936),i=Bi(i,n,r,o,e[a+1],12,-389564586),o=Bi(o,i,n,r,e[a+2],17,606105819),r=Bi(r,o,i,n,e[a+3],22,-1044525330),n=Bi(n,r,o,i,e[a+4],7,-176418897),i=Bi(i,n,r,o,e[a+5],12,1200080426),o=Bi(o,i,n,r,e[a+6],17,-1473231341),r=Bi(r,o,i,n,e[a+7],22,-45705983),n=Bi(n,r,o,i,e[a+8],7,1770035416),i=Bi(i,n,r,o,e[a+9],12,-1958414417),o=Bi(o,i,n,r,e[a+10],17,-42063),r=Bi(r,o,i,n,e[a+11],22,-1990404162),n=Bi(n,r,o,i,e[a+12],7,1804603682),i=Bi(i,n,r,o,e[a+13],12,-40341101),o=Bi(o,i,n,r,e[a+14],17,-1502002290),r=Bi(r,o,i,n,e[a+15],22,1236535329),n=$i(n,r,o,i,e[a+1],5,-165796510),i=$i(i,n,r,o,e[a+6],9,-1069501632),o=$i(o,i,n,r,e[a+11],14,643717713),r=$i(r,o,i,n,e[a],20,-373897302),n=$i(n,r,o,i,e[a+5],5,-701558691),i=$i(i,n,r,o,e[a+10],9,38016083),o=$i(o,i,n,r,e[a+15],14,-660478335),r=$i(r,o,i,n,e[a+4],20,-405537848),n=$i(n,r,o,i,e[a+9],5,568446438),i=$i(i,n,r,o,e[a+14],9,-1019803690),o=$i(o,i,n,r,e[a+3],14,-187363961),r=$i(r,o,i,n,e[a+8],20,1163531501),n=$i(n,r,o,i,e[a+13],5,-1444681467),i=$i(i,n,r,o,e[a+2],9,-51403784),o=$i(o,i,n,r,e[a+7],14,1735328473),r=$i(r,o,i,n,e[a+12],20,-1926607734),n=Fi(n,r,o,i,e[a+5],4,-378558),i=Fi(i,n,r,o,e[a+8],11,-2022574463),o=Fi(o,i,n,r,e[a+11],16,1839030562),r=Fi(r,o,i,n,e[a+14],23,-35309556),n=Fi(n,r,o,i,e[a+1],4,-1530992060),i=Fi(i,n,r,o,e[a+4],11,1272893353),o=Fi(o,i,n,r,e[a+7],16,-155497632),r=Fi(r,o,i,n,e[a+10],23,-1094730640),n=Fi(n,r,o,i,e[a+13],4,681279174),i=Fi(i,n,r,o,e[a],11,-358537222),o=Fi(o,i,n,r,e[a+3],16,-722521979),r=Fi(r,o,i,n,e[a+6],23,76029189),n=Fi(n,r,o,i,e[a+9],4,-640364487),i=Fi(i,n,r,o,e[a+12],11,-421815835),o=Fi(o,i,n,r,e[a+15],16,530742520),r=Fi(r,o,i,n,e[a+2],23,-995338651),n=Hi(n,r,o,i,e[a],6,-198630844),i=Hi(i,n,r,o,e[a+7],10,1126891415),o=Hi(o,i,n,r,e[a+14],15,-1416354905),r=Hi(r,o,i,n,e[a+5],21,-57434055),n=Hi(n,r,o,i,e[a+12],6,1700485571),i=Hi(i,n,r,o,e[a+3],10,-1894986606),o=Hi(o,i,n,r,e[a+10],15,-1051523),r=Hi(r,o,i,n,e[a+1],21,-2054922799),n=Hi(n,r,o,i,e[a+8],6,1873313359),i=Hi(i,n,r,o,e[a+15],10,-30611744),o=Hi(o,i,n,r,e[a+6],15,-1560198380),r=Hi(r,o,i,n,e[a+13],21,1309151649),n=Hi(n,r,o,i,e[a+4],6,-145523070),i=Hi(i,n,r,o,e[a+11],10,-1120210379),o=Hi(o,i,n,r,e[a+2],15,718787259),r=Hi(r,o,i,n,e[a+9],21,-343485551),n=cd(n,s),r=cd(r,l),o=cd(o,c),i=cd(i,d)}return[n,r,o,i]}function yEt(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(Vce(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function cd(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function bEt(e,t){return e<<t|e>>>32-t}function $T(e,t,n,r,o,i){return cd(bEt(cd(cd(t,e),cd(r,i)),o),n)}function Bi(e,t,n,r,o,i,a){return $T(t&n|~t&r,e,t,o,i,a)}function $i(e,t,n,r,o,i,a){return $T(t&r|n&~r,e,t,o,i,a)}function Fi(e,t,n,r,o,i,a){return $T(t^n^r,e,t,o,i,a)}function Hi(e,t,n,r,o,i,a){return $T(n^(t|~r),e,t,o,i,a)}var xEt=Wce("v3",48,mEt);const wEt=xEt;function _Et(e,t,n){e=e||{};var r=e.random||(e.rng||Fce)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return BT(r)}function SEt(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function KO(e,t){return e<<t|e>>>32-t}function CEt(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o<r.length;++o)e.push(r.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,a=Math.ceil(i/16),s=new Array(a),l=0;l<a;++l){for(var c=new Uint32Array(16),d=0;d<16;++d)c[d]=e[l*64+d*4]<<24|e[l*64+d*4+1]<<16|e[l*64+d*4+2]<<8|e[l*64+d*4+3];s[l]=c}s[a-1][14]=(e.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(e.length-1)*8&4294967295;for(var h=0;h<a;++h){for(var u=new Uint32Array(80),w=0;w<16;++w)u[w]=s[h][w];for(var y=16;y<80;++y)u[y]=KO(u[y-3]^u[y-8]^u[y-14]^u[y-16],1);for(var p=n[0],k=n[1],j=n[2],F=n[3],U=n[4],H=0;H<80;++H){var R=Math.floor(H/20),z=KO(p,5)+SEt(R,k,j,F)+U+t[R]+u[H]>>>0;U=F,F=j,j=KO(k,30)>>>0,k=p,p=z}n[0]=n[0]+p>>>0,n[1]=n[1]+k>>>0,n[2]=n[2]+j>>>0,n[3]=n[3]+F>>>0,n[4]=n[4]+U>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}var kEt=Wce("v5",80,CEt);const TEt=kEt,MEt="00000000-0000-0000-0000-000000000000";function EEt(e){if(!zT(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const AEt=Object.freeze(Object.defineProperty({__proto__:null,NIL:MEt,parse:Hce,stringify:BT,v1:dEt,v3:wEt,v4:_Et,v5:TEt,validate:zT,version:EEt},Symbol.toStringTag,{value:"Module"})),OEt=_me(AEt);Object.defineProperty(jT,"__esModule",{value:!0});jT.TaskPassport=void 0;const PEt=OEt;class DEt{constructor(){this.taskId=(0,PEt.v4)()}}jT.TaskPassport=DEt;(function(e){var t=vo&&vo.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(r,a,s)}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=vo&&vo.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(NT,e),n(IT,e),n(Y4,e),n(RT,e),n(jT,e),n(z1,e)})($ce);(function(e){var t=vo&&vo.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(r,a,s)}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=vo&&vo.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n($ce,e)})(Fa);class Ui extends Lb{constructor(t,n){super(jce,{key:t,interpolationOptions:n},WMt.t)}get status(){return this.interpolationOptions.status}}var LEt=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const gb="api/datasources",NEt="api/v2/datamodels";class IEt{constructor(t){this.httpClient=t}getDataSourceFields(t,n=9999,r=0){const o=Mc(t),i=`${gb}/${encodeURI(o)}/fields/search`;return this.httpClient.post(i,{offset:r,count:n}).catch(()=>{throw new Ui("errors.dataSourceNotFound",{dataSource:typeof t=="string"?t:t.title})})}getDataSourceList(){const t=`${gb}/?sharedWith=r,w`;return this.httpClient.get(t)}getDataSourceSchema(t){const n=`${NEt}/schema?title=${encodeURIComponent(t)}`;return this.httpClient.get(n)}sendJaqlRequest(t,n){const r=Uce(t),o=new AbortController;return{responsePromise:this.httpClient.post(r,n,void 0,o.signal).then(i=>Array.isArray(i)?{values:[],metadata:[]}:i),abortHttpRequest:i=>o.abort(i)}}sendDownloadCsvRequest(t,n){const r=zEt(t),o=new AbortController,i=new URLSearchParams;return i.append("data",encodeURIComponent(JSON.stringify(n))),{responsePromise:this.httpClient.post(r,i,{headers:{"Content-Type":"application/x-www-form-urlencoded"}},o.signal,{nonJSONBody:!0,returnBlob:!0}),abortHttpRequest:a=>o.abort(a)}}sendCancelJaqlQueryRequest(t,n){return this.sendCancelMultipleJaqlQueriesRequest([t],n)}sendCancelMultipleJaqlQueriesRequest(t,n){return LEt(this,void 0,void 0,function*(){const r={queries:t.join(";")},o=REt(n);try{yield this.httpClient.post(o,r)}catch(i){if(i.status==="404"){const a=jEt(n);yield this.httpClient.post(a,r)}else throw i}})}}function REt(e){const t=encodeURIComponent(Mc(e));return`${gb}/localhost/${t}/cancel_queries`}function jEt(e){const t=encodeURIComponent(Mc(e));return`${gb}/live/${t}/cancel_queries`}function Uce(e){const t=encodeURIComponent(Mc(e));return`${gb}/${t}/jaql`}function zEt(e){return`${Uce(e)}/csv`}var Gce={exports:{}};/*! @preserve
1018
+ */var sY;function ATt(){return sY||(sY=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=Be,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(U){{for(var H=arguments.length,R=new Array(H>1?H-1:0),z=1;z<H;z++)R[z-1]=arguments[z];r("error",U,R)}}function r(U,H,R){{var z=t.ReactDebugCurrentFrame,I=z.getStackAddendum();I!==""&&(H+="%s",R=R.concat([I]));var N=R.map(function(W){return String(W)});N.unshift("Warning: "+H),Function.prototype.apply.call(console[U],console,N)}}function o(U,H){return U===H&&(U!==0||1/U===1/H)||U!==U&&H!==H}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,d=!1,h=!1;function u(U,H,R){d||e.startTransition!==void 0&&(d=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var z=H();if(!h){var I=H();i(z,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}var N=a({inst:{value:z,getSnapshot:H}}),W=N[0].inst,A=N[1];return l(function(){W.value=z,W.getSnapshot=H,w(W)&&A({inst:W})},[U,z,H]),s(function(){w(W)&&A({inst:W});var C=function(){w(W)&&A({inst:W})};return U(C)},[U]),c(z),z}function w(U){var H=U.getSnapshot,R=U.value;try{var z=H();return!i(R,z)}catch{return!0}}function y(U,H,R){return H()}var p=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",k=!p,j=k?y:u,F=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:j;aY.useSyncExternalStore=F,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),aY}process.env.NODE_ENV==="production"?F3.exports=ETt():F3.exports=ATt();var OTt=F3.exports;const bce=OTt.useSyncExternalStore,lY=pn(void 0),xce=pn(!1);function wce(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=lY),window.ReactQueryClientContext):lY)}const _ce=({context:e}={})=>{const t=en(wce(e,en(xce)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Sce=({client:e,children:t,context:n,contextSharing:r=!1})=>{Je(()=>(e.mount(),()=>{e.unmount()}),[e]),process.env.NODE_ENV!=="production"&&r&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const o=wce(n,r);return Qt(xce.Provider,{value:!n&&r},Qt(o.Provider,{value:e},t))},PTt=pn(!1),DTt=()=>en(PTt);function LTt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const NTt=pn(LTt()),ITt=()=>en(NTt);function Cce(e,t){return typeof e=="function"?e(...t):!!e}const RTt=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},jTt=e=>{Je(()=>{e.clearReset()},[e])},zTt=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Cce(n,[e.error,r]),BTt=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},$Tt=(e,t)=>e.isLoading&&e.isFetching&&!t,FTt=(e,t,n)=>(e==null?void 0:e.suspense)&&$Tt(t,n),HTt=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function WTt(e,t){const n=_ce({context:e.context}),r=DTt(),o=ITt(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=zo.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=zo.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=zo.batchCalls(i.onSettled)),BTt(i),RTt(i,o),jTt(o);const[a]=Ge(()=>new t(n,i)),s=a.getOptimisticResult(i);if(bce(He(l=>{const c=r?()=>{}:a.subscribe(zo.batchCalls(l));return a.updateResult(),c},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),Je(()=>{a.setOptions(i,{listeners:!1})},[i,a]),FTt(i,s,r))throw HTt(i,a,o);if(zTt({result:s,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:a.trackResult(s)}function kce(e,t,n){const r=Nv(e,t,n);return WTt(r,kTt)}function Tce({fill:e="rgba(38, 46, 61, 0.67)"}){return ge("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:ge("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 7C11 6.44772 11.4477 6 12 6C12.5523 6 13 6.44772 13 7C13 7.55228 12.5523 8 12 8C11.4477 8 11 7.55228 11 7ZM11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12ZM12 16C11.4477 16 11 16.4477 11 17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17C13 16.4477 12.5523 16 12 16Z",fill:e})})}const VTt=at("button",{target:"e14rhw2k0",label:"ClearSelectionButton"})("color:",({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor},";background:none;font-size:13px;border:none;height:26px;padding:0 6px 0 2px;margin:0 4px 0 4px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:hover{background-color:rgba(247,247,247,1);}"),UTt=at("span",{target:"e14rhw2k1",label:"ClearSelectionText"})("color:",({theme:e})=>{var t;return(t=e.chart)==null?void 0:t.textColor},";display:inline-block;padding-top:3px;white-space:nowrap;"),GTt=({onClick:e})=>{var t;const{themeSettings:n}=Lt(),{t:r}=Jt();return ot(VTt,{onClick:e,theme:n,children:[ge("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:ge("path",{fill:(t=n.chart)==null?void 0:t.textColor,d:"M7.187 7l9.774 10.279A1 1 0 0 0 17 17V8a1 1 0 0 0-1-1H7.187zm9.018 10.979L6.206 7.463l.487-.415A1 1 0 0 0 6 8v9a1 1 0 0 0 1 1h9c.07 0 .139-.007.205-.021zM7 6h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z"})}),ge(UTt,{theme:n,children:r("commonFilter.clearSelectionButton")})]})};function YTt(e){const t={};return{flatFilters:e.reduce((n,r)=>(ui(r)?(t[r.config.guid]||(t[r.config.guid]=[]),r.filters.forEach(o=>{t[r.config.guid].push(o),n.push(o)})):n.push(r),n),[]),cascadingToPureFiltersMap:t}}function Mce(e,t,n){const r=t.filter(ui);return qTt(e,r).map(o=>{if(XTt(o)){const i=r.find(s=>s.config.guid===o.groupId);if(!i)throw new kt("errors.cascadingFilterOriginalNotFound");const a=n==null?void 0:n.shouldResetFiltersDeeperThanModified;return ZTt(o,i,{shouldResetFiltersDeeperThanModified:a})}return o})}function XTt(e){return"groupId"in e}function qTt(e,t){const n=[];return e.forEach(r=>{const o=t.find(i=>i.filters.some(a=>Zy(a)===Zy(r)));if(o){const i=o.config.guid,a=n.find(s=>"groupId"in s&&s.groupId===i);a?a.filters.push(r):n.push({groupId:i,filters:[r],previousFilters:o.filters})}else n.push(r)}),n}function ZTt(e,t,n){const r=n!=null&&n.shouldResetFiltersDeeperThanModified?JTt(e.filters,e.previousFilters):e.filters,o=KTt(r,t.config.disabled);return m5(r,{guid:t.config.guid,disabled:o})}function KTt(e,t){return e.some(n=>n.config.disabled!==t)?!t:t}function QTt(e,t,n){const{flatFilters:r,cascadingToPureFiltersMap:o}=YTt(e);return{pureFilters:r,updateFilters:i=>{const a=Mce(i,e,{shouldResetFiltersDeeperThanModified:!0});t(a)},pureFiltersIgnoringRules:eMt(n,o)}}function JTt(e,t){const n=e.reduce((r,o,i)=>{const a=t.find(s=>R4(s,o));return a&&!Vle(o,a)?i:r},-1);return n===-1?e:e.map((r,o)=>o>n?AT(r):r)}function eMt(e,t){var n;return{all:e.all,ids:((n=e.ids)==null?void 0:n.reduce((r,o)=>{const i=t[o];return i?r.concat(i.map(a=>a.config.guid)):r.concat(o)},[]))||[]}}const cY={applyMode:hb.HIGHLIGHT,shouldAffectFilters:!0,ignoreFilters:{all:!1,ids:[]},forceApplyBackgroundFilters:!0};function tMt(e,t){return e==="table"?{applyMode:hb.FILTER,shouldAffectFilters:!1,ignoreFilters:lo(cY.ignoreFilters,t.ignoreFilters||{})}:lo(cY,t)}function nMt(e,t,n,r,o,i,a){const s={},l=tMt(n,o),{pureFilters:c,updateFilters:d,pureFiltersIgnoringRules:h}=QTt(e,t,l.ignoreFilters||{}),u=c.filter(U=>!U.config.disabled),w=Jkt(u,h),y=B4(n,r),p=l.shouldAffectFilters&&y.length,[k,j]=oMt(w,y,l.applyMode),F=l.forceApplyBackgroundFilters?si(rMt(c),k):k;if(s.filters=F,s.highlights=j,s.onDataPointsSelected=(U,H)=>{const R=[];if(p){const z=HG(n,r,U);z&&R.push(z);const I=x_(n,r,U),{filters:N,isSelection:W}=WO(I,c,!0),A=i(W?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),C=WG(A,()=>{d(si(c,N))});R.push(C)}R.length&&(a==null||a({id:pb.WIDGET_POINTS_CROSSFILTERING,position:{left:H.clientX,top:H.clientY},itemSections:R}))},s.onDataPointContextMenu=(U,H)=>{const R=[];if(p){const z=HG(n,r,[U]);z&&R.push(z);const I=x_(n,r,[U]),{filters:N,isSelection:W}=WO(I,c,!0),A=i(W?"commonFilter.selectMenuItem":"commonFilter.unselectMenuItem"),C=WG(A,()=>{d(si(c,N))});R.push(C)}R.length&&(a==null||a({id:pb.WIDGET_POINTS_CROSSFILTERING,position:{left:H.clientX,top:H.clientY},itemSections:R}))},p){s.onDataPointClick=z=>{const I=x_(n,r,[z]),{filters:N}=WO(I,c);d(si(c,N))};const U=u.filter(z=>y==null?void 0:y.some(I=>Pi(z)&&Ia(z.attribute,I)&&!I4(z)&&!z.config.locked)),H=!!U.length,R=()=>{const z=U.map(AT);d(si(c,z))};H&&(s.renderToolbar=(z,I)=>{const N=y.map(({expression:W})=>W).join(";");return ot("div",{style:{display:"flex"},children:[ge(GTt,{onClick:R}),I]},N)})}return s}function rMt(e){return e.map(t=>{var n;return(n=t.config)==null?void 0:n.backgroundFilter}).filter(t=>!!t)}function oMt(e,t,n){if(n===hb.HIGHLIGHT){const[r,o]=N1(e,a=>t.every(s=>!Ia(s,a.attribute))),i=o.filter(a=>!I4(a));return[r,i]}return[e,[]]}function iMt(e,t){const[n,r]=Cc(Ke(()=>yl(e),[e]),{onLocalStateChange:He(u=>{const{filters:w,relations:y}=u;t&&t(Xa(w,y))},[t])}),{filters:o,relations:i}=n,a=Ke(()=>Xa(o,i),[o,i]),s=He(u=>{if(_u(u)){const{filters:w,relations:y}=yl(u);r({filters:w||[],relations:y||null})}else r({filters:u,relations:null})},[r]),l=He(u=>{const w=si(o,[u]);r({filters:w,relations:dl(o,i,w)})},[o,i,r]),c=He(u=>{r({filters:u,relations:dl(o,i,u)})},[o,i,r]),d=Ke(()=>o.some(u=>ui(u)),[o]),h=He(u=>{if(!i)return u;const w=d?Mce(u,o):u,y=dl(o,i,w);return Xa(w,y)},[d,o,i]);return{regularFilters:o,addFilter:l,filtersOrFilterRelations:a,setFiltersOrFilterRelations:s,setFilters:c,applyRelationsToOtherFilters:h}}const aMt=({initialFilters:e=[],openMenu:t,onBeforeMenuOpen:n,onFiltersChange:r}={})=>{const{t:o}=Jt(),{filtersOrFilterRelations:i,regularFilters:a,addFilter:s,setFiltersOrFilterRelations:l,setFilters:c,applyRelationsToOtherFilters:d}=iMt(e,r),h=He((u,w={})=>{var y,p;if(v2(u))return u;const k=OYe(u),j=u,F=Ii(u),U="drilldownOptions"in u&&(p=(y=u.drilldownOptions)==null?void 0:y.drilldownSelections)!=null&&p.length?lce(u.chartType,u.dataOptions,t5(u.drilldownOptions.drilldownSelections).nextDimension):u.dataOptions,H=nMt(a,c,k,U,w,o,t);return F.highlights=si(H.highlights,j.highlights),F.onBeforeMenuOpen=n,H.onDataPointClick&&s7(F,H.onDataPointClick),F.filters=d(si(H.filters,bj(j.filters))),H.onDataPointClick&&s7(F,H.onDataPointClick),H.onDataPointsSelected&&PYe(F,H.onDataPointsSelected),H.onDataPointContextMenu&&Tre(F,H.onDataPointContextMenu),H.renderToolbar&&DYe(F,H.renderToolbar),F},[a,c,o,t,n,d]);return{filters:i,setFilters:l,addFilter:s,connectToWidgetProps:h}};class U4{constructor(t,n=[]){this.component=t,this.contextConnectors=n,this.contexts=[],this.subscriptions=[],this.prepareContexts()}prepareContexts(){this.contextConnectors.forEach(({propsObserver:t},n)=>{const r={isReady:!1,data:null};this.contexts[n]=r;const o=t.subscribe(i=>{r.data=i,r.isReady=!0,this.rootElement&&this.renderComponentWithContext(this.rootElement,this.props)});this.subscriptions.push(o)})}renderComponentWithContext(t,n){if(!this.contexts.every(({isReady:i})=>i)||!t)return;const r=Qt(this.component,n,n==null?void 0:n.children),o=this.contextConnectors.reduceRight((i,{providerComponent:a},s)=>Qt(a,this.contexts[s].data,i),r);rh(o,t)}render(t,n){this.rootElement=t,this.props=n,this.renderComponentWithContext(t,n)}destroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions.length=0,this.contexts.length=0,this.rootElement&&rh(null,this.rootElement)}}const sMt=({nativeElement:e,onDestroy:t})=>{const n=Ye(null);return Do(()=>{n.current&&n.current.appendChild(e)},[e]),Do(()=>()=>{t&&t()},[t]),Me("div",{ref:n,style:"width: 100%; height: 100%"})};function lMt({hook:e,params:t,onResult:n}){const r=Ye(null),o=e(...t);return Je(()=>{r.current!==o&&n(o),r.current=o},[o,n]),null}function cMt(e,t,n=!1){return function(...r){let o=!0,i;const a=new Promise(s=>{let l;i=e.subscribe(c=>{o?(l=c[t](...r),o=!1):s(l)})});if(a.finally(()=>{i==null||i.unsubscribe()}),n)return a}}class uMt{constructor(){this.listeners=new Set}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>this.listeners.delete(t)}}notify(t){this.listeners.forEach(n=>n(t))}destroy(){this.listeners.clear()}}class R1{constructor(t){this.observable=new uMt,this.data=t}subscribe(t,n=!0){const r=this.observable.subscribe(t);return n&&this.data!==void 0&&t(this.data),r}setValue(t){this.data!==t&&(this.data=t,this.observable.notify(t))}getValue(){return this.data}destroy(){this.observable.destroy()}}class dMt{constructor(t,n=[]){this.hook=t,this.rootElement=document.createElement("div"),this.resultObserver=new R1,this.componentAdapter=new U4(lMt,n)}handleHookResult(t){this.resultObserver.setValue(t)}run(...t){this.params=t,this.componentAdapter.render(this.rootElement,{hook:this.hook,params:this.params,onResult:this.handleHookResult.bind(this)})}subscribe(t){return this.resultObserver.subscribe(t)}destroy(){this.componentAdapter.destroy(),this.resultObserver.destroy(),this.rootElement.remove()}}const pMt=(e,t,n=[])=>{const r=Array.isArray(n)?n:[n];return Qt(e,t,...r)},Ece=(e,t)=>pMt(sMt,{nativeElement:e,onDestroy:t});class mb extends Vb{constructor(t,n,r,o,i,a,s,l,c,d){if(super(t,i||zt.Dimension,a,l,c),this._dimensions=[],this._attributes=[],this._sort=Zn.None,!c&&n){const{table:h,column:u}=Nh(n);this.composeCode=ak(h,u,"",n5)}this._sort=s||Zn.None,this._expression=n,this.setDimensions(o||[]),this.setAttributes(r),d&&(this.defaultAttribute=d)}static parseType(t){switch(t){case"datetime":case zt.DateDimension:return zt.DateDimension;case"text":case zt.TextDimension:return zt.TextDimension;case"numeric":case zt.NumericDimension:return zt.NumericDimension}return zt.TextDimension}getAttachedName(t,n){let r=t;const o=sc(t);return(o==="id"||o==="name"||Object.getOwnPropertyDescriptor(this,o)!==void 0||this[o]!==void 0)&&(r=n),r}setDimensions(t){this._dimensions=t;for(let n=0;n<t.length;n++){const r=this.getAttachedName(t[n].name,t[n].attributes[0].expression);this[sc(r)]=t[n],r!=t[n].name&&(t[n].name=r)}}setAttributes(t){this._attributes=t||[];for(let n=0;n<t.length;n++){const r=this.getAttachedName(t[n].name,t[n].expression);this[sc(r)]=t[n],t[n].name!=r&&(t[n].name=r)}}get id(){return this._expression}get attributes(){return this._attributes}get dimensions(){return this._dimensions}get expression(){return this._expression}getSort(){return this._sort}sort(t){return new mb(this.name,this.expression,this.attributes,this.dimensions,this.type,this.description,t,this.dataSource,this.composeCode,this.defaultAttribute)}serialize(){const t=super.serialize();return t.__serializable="DimensionalDimension",t.expression=this.expression,this.getSort()!==void 0&&(t.sort=this.getSort()),t.attributes=this._attributes.map(n=>n.serialize()),t.dimensions=this._dimensions.map(n=>n.serialize()),this.defaultAttribute&&(t.defaultAttribute=this.defaultAttribute.serialize()),t}jaql(t){if(this.defaultAttribute)return this.defaultAttribute.jaql(t);if(this.dimensions.length>0)return this.dimensions[0].jaql(t);const n={jaql:{title:this.name,dim:this.expression,datatype:x5(this.type)}};return this._sort!=Zn.None&&(n.jaql.sort=this._sort==Zn.Ascending?"asc":"desc"),t===!0?n.jaql:n}}class PT extends mb{constructor(t,n,r,o,i,a){super(t,n,[],[],zt.DateDimension,r,o,i,a),this.defaultLevel=nt.Years,this.Years=new oo(nt.Years,n,nt.Years,"yyyy",r,o,i),this.Quarters=new oo(nt.Quarters,n,nt.Quarters,"Q yyyy",r,o,i),this.Months=new oo(nt.Months,n,nt.Months,"yyyy-MM",r,o,i),this.Weeks=new oo(nt.Weeks,n,nt.Weeks,"ww yyyy",r,o,i),this.Days=new oo(nt.Days,n,nt.Days,"yyyy-MM-dd",r,o,i),this.Hours=new oo(nt.Hours,n,nt.Hours,"yyyy-MM-dd HH:mm",r,o,i),this.MinutesRoundTo30=new oo(nt.MinutesRoundTo30,n,nt.MinutesRoundTo30,"yyyy-MM-dd HH:mm",r,o,i),this.MinutesRoundTo15=new oo(nt.MinutesRoundTo15,n,nt.MinutesRoundTo15,"yyyy-MM-dd HH:mm",r,o,i),this.Minutes=new oo(nt.Minutes,n,nt.Minutes,"yyyy-MM-dd HH:mm",r,o,i),this.Seconds=new oo(nt.Seconds,n,nt.Seconds,"yyyy-MM-dd HH:mm:ss",r,o,i),this.AggHours=new oo(nt.AggHours,n,nt.AggHours,"HH:mm",r,o,i),this.AggMinutesRoundTo30=new oo(nt.AggMinutesRoundTo30,n,nt.AggMinutesRoundTo30,"HH:mm",r,o,i),this.AggMinutesRoundTo15=new oo(nt.AggMinutesRoundTo15,n,nt.AggMinutesRoundTo15,"HH:mm",r,o,i),this.AggMinutesRoundTo1=new oo(nt.AggMinutesRoundTo1,n,nt.AggMinutesRoundTo1,"HH:mm",r,o,i),this.setAttributes([this.Years,this.Quarters,this.Months,this.Weeks,this.Days,this.Hours,this.MinutesRoundTo30,this.MinutesRoundTo15,this.Minutes,this.Seconds,this.AggHours,this.AggMinutesRoundTo30,this.AggMinutesRoundTo15,this.AggMinutesRoundTo1])}get id(){return this.expression}setDimensions(){}setAttributes(t){this._attributes=t}getSort(){return this._sort}sort(t){return new PT(this.name,this.expression,this.description,t,this.dataSource,this.composeCode)}serialize(){const t=super.serialize();return t.__serializable="DimensionalDateDimension",t}jaql(t){const n=this[this.defaultLevel].jaql();return n.jaql.title=this.name,t?n.jaql:n}}function Ace(e){const t=e.name||e.title,n=e.desc||e.description,r=e.expression||e.dim,o=mb.parseType(e.dimtype||e.type),i=e.sort,a=e.dataSource;if(o==zt.DateDimension)return new PT(t,r,n,i,a);const s=Object.getOwnPropertyNames(e).map(d=>e[d]).filter(d=>zt.isAttribute(d==null?void 0:d.type));if(s.length==0)if(e.attributes){let d;for(let h=0;h<e.attributes.length;h++)d=e.attributes[h],s.push(new xy(d.name,d.expression,d.type,d.description,d.sort,d.dataSource))}else r&&s.push(new xy(t,r,o,n,i,a));const l=Object.getOwnPropertyNames(e).map(d=>e[d]).filter(d=>zt.isDimension(d==null?void 0:d.type));if(l.length==0&&e.dimensions)for(let d=0;d<e.dimensions.length;d++)l.push(Ace(e.dimensions[d]));const c=new mb(t,r,s,l,o,n,i,a);return e.defaultAttribute&&(c.defaultAttribute=s.find(d=>d.name===e.defaultAttribute)),c}function hMt(e){const t=e.name||e.title,n=e.expression||e.dim,r=e.desc||e.description,o=e.sort,i=e.dataSource;return new PT(t,n,r,o,i)}var fMt=Object.defineProperty,mMt=Object.defineProperties,gMt=Object.getOwnPropertyDescriptors,uC=Object.getOwnPropertySymbols,Oce=Object.prototype.hasOwnProperty,Pce=Object.prototype.propertyIsEnumerable,uY=Math.pow,H3=(e,t,n)=>t in e?fMt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pe=(e,t)=>{for(var n in t||(t={}))Oce.call(t,n)&&H3(e,n,t[n]);if(uC)for(var n of uC(t))Pce.call(t,n)&&H3(e,n,t[n]);return e},je=(e,t)=>mMt(e,gMt(t)),_n=(e,t)=>{var n={};for(var r in e)Oce.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&uC)for(var r of uC(e))t.indexOf(r)<0&&Pce.call(e,r)&&(n[r]=e[r]);return n},Bt=(e,t,n)=>(H3(e,typeof t!="symbol"?t+"":t,n),n),Co=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((n=n.apply(e,t)).next())});function Eu(e,t){if(!e||typeof e!="string")return e;const n=new URL(e);return n.origin+(n.pathname.endsWith("/")?n.pathname:n.pathname+"/")+(t&&n.search?n.search:"")}const vMt={errorPrefix:"[request-error]",errors:{networkError:"Network error. Check browser console for further details.",authFailed:"Failed to authenticate.",ssoNotEnabled:"SSO is not enabled on target instance, please choose another authentication method.",ssoNoLoginUrl:"Can not fetch login URL on target instance. Check SSO settings.",passwordAuthFailed:"$t(errorPrefix) Username and password authentication was not successful. Check credentials.",tokenAuthFailed:"$t(errorPrefix) Token authentication was not successful. Check credentials.",responseError_onlyStatus:"$t(errorPrefix) Status: {{status}}",responseError_withStatusText:"$t(errorPrefix) Status: {{status}} - {{statusText}}"}},yMt={errorPrefix:"[request-error]",errors:{networkError:"Помилка мережі. Можливо ви забули додати свій домен до «CORS Allowed Origins» в панелі адміністратора Sisense -> Security Settings.",authFailed:"Автентифікація не вдалася.",ssoNotEnabled:"SSO не ввімкнено на цьому сервері, будь ласка, виберіть інший метод аутентифікації",ssoNoLoginUrl:"Неможливо отримати loginUrl з сервера. Перевірте налаштування SSO.",passwordAuthFailed:"$t(errorPrefix) Помилка автентифікації за допомогою імені користувача та пароля. Перевірте дані для входу.",tokenAuthFailed:"$t(errorPrefix) Помилка автентифікації за допомогою токена. Перевірте дані для входу.",responseError_onlyStatus:"$t(errorPrefix) Статус: {{status}}",responseError_withStatusText:"$t(errorPrefix) Статус: {{status}} - {{statusText}}"}},Dce="sdkRestClient",bMt={en:vMt,uk:yMt};function xMt(){return FC({resource:bMt,language:"en",namespace:Dce})}const{i18nextInstance:wMt}=xMt();class j1{constructor(t){this._valid=!0,this._authenticating=!1,this._tried=!1,this._result=new Promise(n=>{this._resolve=n}),this.type=t}isValid(){return this._valid}invalidate(){this._valid=!1}authenticate(){return this._result}isAuthenticating(){return this._authenticating}authenticated(){return this._result}applyHeader(t){}}const DT=(e,t)=>{for(const[n,r]of Object.entries(t))Array.isArray(e)?e.push([n,r]):typeof e.set=="function"?e.set(n,r):e[n]=r},Lce=(e,t)=>{if(!e||typeof e!="string")return e;const n=new URL(e);for(const[r,o]of Object.entries(t))n.searchParams.append(r,o);return n.toString()},dY=(e,t)=>{if(!e||typeof e!="string")return e;const n=new URL(e),r=t.startsWith("/")?t.slice(1):t;return n.pathname+=r,n.toString()};class _Mt extends j1{constructor(t,n){super("bearer"),this.bearer=n,this._resolve(!0)}applyHeader(t){const n="Bearer "+this.bearer;DT(t,{Authorization:n})}authenticate(){return this._result}authenticated(){return this._result}}function SMt(e){return e.type==="bearer"}class CMt extends j1{constructor(){super("fusion")}authenticate(){var t,n,r,o,i;const a=!!(!((n=(t=window.prism)===null||t===void 0?void 0:t.user)===null||n===void 0)&&n._id);this._resolve(a);const s=(i=(o=(r=window.document)===null||r===void 0?void 0:r.cookie)===null||o===void 0?void 0:o.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/))===null||i===void 0?void 0:i[1];return s&&(this.antiCsrfToken=s),this._result}applyHeader(t){this.antiCsrfToken&&DT(t,{"X-Xsrf-Token":this.antiCsrfToken})}}let vd=class extends Lb{constructor(e,t){super(Dce,{key:e,interpolationOptions:t},wMt.t)}get status(){return this.interpolationOptions.status}};var UO=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class kMt extends j1{constructor(t,n=!1){super("sso"),this.url=Eu(t,!0),this._enableSilentPreAuth=n}authenticate(t=!0){var n;return UO(this,void 0,void 0,function*(){try{this._authenticating=!0;const{isAuthenticated:r,loginUrl:o}=yield this.checkAuthentication();if(r)return this._resolve(!0),yield this._result;const i=Lce(o,{return_to:window.location.href});if(this._enableSilentPreAuth&&t){yield this.authenticateSilent(i);const{isAuthenticated:a}=yield this.checkAuthentication();if(a)return this._resolve(!0),yield this._result}(n=window==null?void 0:window.location)===null||n===void 0||n.replace(i)}finally{this._resolve(!1),this._authenticating=!1}return this._result})}authenticateSilent(t){return UO(this,void 0,void 0,function*(){const n=document.createElement("iframe");n.style.display="none",document.body.appendChild(n),n.src=t,yield new Promise(r=>{n.onload=()=>{r(!0)}}),document.body.removeChild(n)})}checkAuthentication(){var t,n,r;return UO(this,void 0,void 0,function*(){const o=dY(Eu(this.url),"api/auth/isauth"),i=yield fetch(o,{headers:{Internal:"true"},credentials:"include"}).catch(LT);if(i.status===200&&!(!((n=(t=i.headers)===null||t===void 0?void 0:t.get("Content-Type"))===null||n===void 0)&&n.includes("application/json")))throw new vd("errors.authFailed");const a=yield i.json();if(!a.isAuthenticated){if(!a.ssoEnabled)throw new vd("errors.ssoNotEnabled");if(!a.loginUrl)throw new vd("errors.ssoNoLoginUrl")}const s=a.loginUrl&&((r=a.loginUrl)===null||r===void 0?void 0:r.search(/^(\/[^/]+)*?\/api\/v\d+\/\w+\/login[/]?$/))!==-1?dY(this.url,a.loginUrl):a.loginUrl||"";return{isAuthenticated:a.isAuthenticated,loginUrl:s}})}}function Nce(e){return e.type==="sso"}var TMt=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class MMt extends j1{constructor(t,n){super("wat"),this.url=`${Eu(t)}api/v1/wat/sessionToken`,this.body=`{"webAccessToken": "${n}"}`}authenticate(){return TMt(this,void 0,void 0,function*(){if(this._tried)return this._result;this._tried=!0;try{this._authenticating=!0;const t=yield fetch(this.url,{method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:this.body}).catch(LT);if(t.ok){const n=yield t.json();this._initialiser=n.initialiser,this._webSessionToken=n.webSessionToken,this._resolve(!0)}}catch{throw new vd("errors.tokenAuthFailed")}finally{this._resolve(!1),this._authenticating=!1}return this._result})}applyHeader(t){if(this._webSessionToken&&this._initialiser){const n=this._webSessionToken,r=this._initialiser;DT(t,{Authorization:n,Initialiser:r})}}}function Ice(e){return e.type==="wat"}var Rce=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};function EMt(e){var t,n,r;return Rce(this,void 0,void 0,function*(){if(!e.ok){const o=(t=e.headers)===null||t===void 0?void 0:t.get("Content-Type"),i=o&&o.includes("application/json")?yield e.json().catch(()=>({})):{};throw new vd("errors.responseError",{status:e.status.toString(),statusText:e.statusText,errorCode:(n=i.error)===null||n===void 0?void 0:n.code,errorMessage:(r=i.error)===null||r===void 0?void 0:r.message,context:e.statusText?"withStatusText":"onlyStatus"})}return e})}function AMt(e,t){if(t.invalidate(),IMt(t))throw new vd("errors.passwordAuthFailed");if(SMt(t)||Ice(t))throw new vd("errors.tokenAuthFailed");return Nce(t)&&!t.isAuthenticating()&&t.authenticate(),e}function OMt(e){return e.message==="Failed to fetch"&&e.name==="TypeError"}function PMt(){return console.warn("Network error. Verify server is accessible and your domain is added to 'CORS Allowed Origins' in Sisense Admin Panel -> Security Settings."),Promise.reject(new vd("errors.networkError"))}const DMt=e=>t=>Rce(void 0,void 0,void 0,function*(){return t.status===401?AMt(t,e):t.ok?t:EMt(t)}),LT=e=>OMt(e)?PMt():Promise.reject(e);var LMt=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class NMt extends j1{constructor(t,n,r){super("password"),this._authheader="",this.url=`${Eu(t)}api/v1/authentication/login`;const o=encodeURIComponent(n),i=encodeURIComponent(r);this.body=`username=${o}&password=${i}`}authenticate(){return LMt(this,void 0,void 0,function*(){if(this._tried)return this._result;this._tried=!0;try{this._authenticating=!0;const t=yield fetch(this.url,{method:"POST",headers:{accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:this.body}).catch(LT);if(t.ok){const n=yield t.json();this._authheader=n.access_token}}finally{this._resolve(!!this._authheader),this._authenticating=!1}return this._result})}applyHeader(t){const n="Bearer "+this._authheader;DT(t,{Authorization:n})}}function IMt(e){return e.type==="password"}function RMt({url:e,username:t,password:n,token:r,wat:o,ssoEnabled:i=!1,enableSilentPreAuth:a=!1,useFusionAuth:s=!1}){const l=Eu(e);return i?new kMt(Eu(e,!0),a):t&&n?new NMt(l,t,n):r?new _Mt(l,r):o?new MMt(l,o):s?new CMt:null}var jMt=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class zMt{constructor(t,n,r){this.url=Eu(t),this.auth=n,this.env=r}login(){return this.auth.authenticate()}call(t,n,r){return jMt(this,void 0,void 0,function*(){this.auth.isAuthenticating()&&(yield this.auth.authenticated()),n.headers=n.headers||{},Nce(this.auth)&&(n.credentials="include"),this.auth.applyHeader(n.headers);const o=r!=null&&r.skipTrackingParam?t:Lce(t,{trc:this.env}),i=yield fetch(o,n).then(DMt(this.auth)).catch(LT);if(!(i.status===204||i.status===304))return r!=null&&r.returnBlob?i.blob():i.json().catch(a=>{var s,l;if(!(!((l=(s=a==null?void 0:a.message)===null||s===void 0?void 0:s.includes)===null||l===void 0)&&l.call(s,"Unexpected end of JSON input")))throw a})})}post(t,n,r={},o,i){const a=Object.assign({method:"POST",body:i!=null&&i.nonJSONBody?n:JSON.stringify(n),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json;charset=UTF-8"},signal:o},r);return this.call(this.url+t,a,i)}patch(t,n,r={},o,i){const a=Object.assign({method:"PATCH",body:i!=null&&i.nonJSONBody?n:JSON.stringify(n),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json;charset=UTF-8"},signal:o},r);return this.call(this.url+t,a,i)}get(t,n={},r){return this.call(this.url+t,Object.assign(Object.assign({},n),{method:"GET"}),r)}delete(t,n={},r){return this.call(this.url+t,Object.assign(Object.assign({},n),{method:"DELETE"}),r)}}const BMt={errors:{invalidAttribute:"Invalid attribute {{attributeName}}. Hint: attributes for query should be extracted from the data model generated by the CLI tool.",noDimensionsOrMeasures:"Neither dimensions nor measures found. Query should have at least one dimension or measure.",invalidMeasure:'Invalid measure "{{measureName}}". Hint: measures for the query can be constructed using the "measureFactory" functions.',invalidFilter:'Invalid filter "{{filterName}}". Hint: filters for the query can be constructed using the "filterFactory" functions.',invalidHighlight:'Invalid highlight "{{highlightName}}". Hint: highlights for the query can be constructed using the "filterFactory" functions.',invalidCountNegative:'Invalid count "{{count}}". Count should be non-negative.',invalidOffset:'Invalid offset "{{offset}}". Offset should be non-negative.',missingHttpClient:"Query requires httpClient to work properly.",missingPostMethod:'httpClient must provide "post" method.',noJaqlResponse:"No jaql response received from the server",dataSourceNotFound:'Failed to get fields for data source "{{dataSource}}". Please make sure the data source exists and is accessible.'}},$Mt={errors:{invalidAttribute:"Недійсний атрибут {{attributeName}}. Підказка: атрибути для запиту повинні бути витягнуті з моделі даних, створеної за допомогою CLI-інструменту.",noDimensionsOrMeasures:"Не знайдено ні вимірів, ні показників. Запит повинен мати щонайменше один вимір або показник.",invalidMeasure:'Недійсний показник "{{measureName}}". Підказка: показники для запиту можна створити за допомогою функцій "measureFactory".',invalidFilter:'Недійсний фільтр "{{filterName}}". Підказка: фільтри для запиту можна створити за допомогою функцій "filterFactory".',invalidHighlight:'Недійсне виділення "{{highlightName}}". Підказка: виділення для запиту можна створити за допомогою функцій "filterFactory".',invalidCountNegative:`Недійсний count "{{count}}". Count повинен бути не від'ємним.`,invalidOffset:`Недійсний offset "{{offset}}". Offset повинен бути не від'ємним.`,missingHttpClient:"Для запиту потрібен httpClient, щоб працювати належним чином.",missingPostMethod:'httpClient повинен мати метод "post".',noJaqlResponse:"Відповіді, що містить jaql, від сервера не отримано",dataSourceNotFound:'Не вдалося отримати поля для джерела даних "{{dataSource}}". Переконайтесь що джерело існує і доступне.'}},jce="sdkQueryClient",FMt={en:BMt,uk:$Mt};function HMt(){return FC({resource:FMt,language:"en",namespace:jce})}const{i18nextInstance:WMt}=HMt();function VMt(e,t){const n=e.map(o=>UMt(o,t)),r=GMt(n);return Object.values(r).map(o=>Ace(o))}const UMt=(e,t)=>{const n=e.table,r=e.tableTitle||n,o=e.id,i=e.title||o,a=Eg(t)?t:{title:t,live:!1},s=e.dimtype==="datetime"?hMt({name:i,expression:o,dataSource:a,description:e.description}):fK({name:i,type:e.dimtype==="text"?"text-attribute":"numeric-attribute",expression:o,dataSource:a,description:e.description});return{dimension:{id:n,name:r,description:e.tableDescription},attribute:s}},GMt=e=>e.reduce((t,{dimension:n,attribute:r})=>{const o=t[n.name]||{name:n.name,expression:n.id,description:n.description};return Object.assign(Object.assign({},t),{[n.name]:Object.assign(Object.assign({},o),{[r.name]:r})})},{}),zce=e=>{if(e!==void 0)return`${e}`},Bce=e=>{if(e!==void 0)return new Date(e).toISOString()},G4=()=>!1;function pY(e,t){const n=t.filter;return"or"in n?r=>n.or.map(o=>e(Object.assign(Object.assign({},t),{filter:o}))).reduce((o,i)=>o||i(r),!1):"and"in n?r=>n.and.map(o=>e(Object.assign(Object.assign({},t),{filter:o}))).reduce((o,i)=>o&&i(r),!0):e(t)}function YMt(e){const{datatype:t}=e,n=e.filter,r=t==="datetime"?Bce:zce;return o=>{const i=n.members.map(r),a=r(o);return i.includes(a)}}function XMt(e){const{datatype:t}=e,n=e.filter,r=t==="datetime"?Bce:zce;return o=>{var i,a;const s=((a=(i=n.exclude)===null||i===void 0?void 0:i.members)===null||a===void 0?void 0:a.map(r))||[],l=r(o);return!s.includes(l)}}function qMt(e){const t=e.filter,n=Mg(t);return n===At.STARTS_WITH?r=>new RegExp(`^${t.startsWith}`,"i").test(r):n===At.ENDS_WITH?r=>new RegExp(`${t.endsWith}$`,"i").test(r):n===At.CONTAINS?r=>new RegExp(t.contains,"i").test(r):n===At.EQUALS?r=>r.localeCompare(t.equals,void 0,{sensitivity:"base"})===0:n===At.DOESNT_START_WITH?r=>!new RegExp(`^${t.doesntStartWith}`,"i").test(r):n===At.DOESNT_END_WITH?r=>!new RegExp(`${t.doesntEndWith}$`,"i").test(r):n===At.DOESNT_CONTAIN?r=>!new RegExp(t.doesntContain,"i").test(r):n===At.DOESNT_EQUAL?r=>r.localeCompare(t.doesntEqual,void 0,{sensitivity:"base"})!==0:G4}function ZMt(e){const t=e.filter,n=Mg(t);return n===At.EQUALS?r=>Number(t.equals)===Number(r):n===At.DOESNT_EQUAL?r=>Number(t.doesntEqual)!==Number(r):n===At.LESS_THAN?r=>Number(r)<Number(t.toNotEqual):n===At.GREATER_THAN?r=>Number(r)>Number(t.fromNotEqual):n===At.BETWEEN?r=>Number(t.to)>=Number(r)&&Number(r)>=Number(t.from):n===At.GREATER_THAN_OR_EQUAL?r=>Number(r)>=Number(t.from):n===At.LESS_THAN_OR_EQUAL?r=>Number(t.to)>=Number(r):G4}function KMt(e){const t=e,{datatype:n}=t,r=t.filter;return cK(r)?YMt(t):uK(r)&&Mg(r)===At.IS_NOT?XMt(t):n==="text"?pY(qMt,t):n==="numeric"?pY(ZMt,t):G4}function QMt(e){return t=>{if(_u(t)){const{filters:n,relations:r}=yl(t),o=[...n,e],i=dl(n,r,o);return Xa(o,i)}return[...t||[],e]}}function JMt(e){return t=>{if(_u(t)){const{filters:n,relations:r}=yl(t),o=[...n,...e],i=dl(n,r,o);return Xa(o,i)}return[...t||[],...e]}}function eEt(e){return t=>{if(_u(t)){const{filters:n,relations:r}=yl(t),o=n.filter(a=>a.config.guid!==e.config.guid),i=dl(n,r,o);return Xa(o,i)}return(t||[]).filter(n=>n.config.guid!==e.config.guid)}}function tEt(e){return t=>{if(_u(t)){const{filters:n,relations:r}=yl(t),o=n.filter(a=>!e.some(s=>a.config.guid===s.config.guid)),i=dl(n,r,o);return Xa(o,i)}return(t||[]).filter(n=>!e.some(r=>n.config.guid===r.config.guid))}}function nEt(e,t){return n=>{if(_u(n)){const{filters:r,relations:o}=yl(n),i=r.map(s=>s.config.guid===e.config.guid?t:s),a=YQe(o,e,t);return Xa(i,a)}return(n||[]).map(r=>r.config.guid===e.config.guid?t:r)}}var Fa={},$ce={},NT={},Y4={};(function(e){var t=vo&&vo.__awaiter||function(o,i,a,s){function l(c){return c instanceof a?c:new a(function(d){d(c)})}return new(a||(a=Promise))(function(c,d){function h(y){try{w(s.next(y))}catch(p){d(p)}}function u(y){try{w(s.throw(y))}catch(p){d(p)}}function w(y){y.done?c(y.value):l(y.value).then(h,u)}w((s=s.apply(o,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.Task=e.ExecutionResultStatus=void 0;var n;(function(o){o.SUCCESS="SUCCESS",o.ERROR="ERROR"})(n=e.ExecutionResultStatus||(e.ExecutionResultStatus={}));class r{constructor(i,a,s){this.steps=i,this.passport=a,this.addons=s,this.statistics={startTime:new Date,steps:[],runtimeInfo:{}},this.currentStep=void 0}run(i){return t(this,void 0,void 0,function*(){let a=i,s;for(let c=0;c<this.steps.length;c+=1){this.currentStep=this.steps[c];const{resultValue:d,info:h}=yield this.currentStep.run(this,a);if(this.statistics.steps.push(h),h.success)a=d;else{s=h.error;break}}const l=this.statistics.steps.length===this.steps.length&&this.statistics.steps.every(c=>c.success);return this.statistics.endTime=new Date,{status:l?n.SUCCESS:n.ERROR,error:s,result:l?a:void 0,statistics:this.statistics}})}cancel(i){var a;return t(this,void 0,void 0,function*(){yield(a=this.currentStep)===null||a===void 0?void 0:a.cancel(this,i)})}addRuntimeInfo(i,a){this.statistics.runtimeInfo[i]=a}emitAddonEvent(i,...a){var s;const l=i.split("."),c=l[0],d=l[1],h=(s=this.addons)===null||s===void 0?void 0:s.find(w=>w.addonName===c),u=(h==null?void 0:h.events)[d];u(...a)}}e.Task=r})(Y4);var GO=vo&&vo.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(NT,"__esModule",{value:!0});NT.AbstractTaskManager=void 0;const rEt=Y4;class oEt{constructor(t){this.runningTasks=new Map,this.addons=t||[]}runTask(t){return GO(this,void 0,void 0,function*(){const{taskId:n}=t.passport;this.runningTasks.set(n,t);const r=yield t.run();return this.runningTasks.delete(n),r})}createFlow(t){return n=>GO(this,void 0,void 0,function*(){const r=new rEt.Task(t,n,this.addons);return this.runTask(r)})}cancel(t,n){return GO(this,void 0,void 0,function*(){const r=this.runningTasks.get(t);r&&(yield r.cancel(n))})}}NT.AbstractTaskManager=oEt;var IT={},z1={};Object.defineProperty(z1,"__esModule",{value:!0});z1.TaskCanceledError=void 0;class iEt extends Error{constructor(t){const n=`Task was canceled due to: "${t}"`;super(n)}}z1.TaskCanceledError=iEt;var hY=vo&&vo.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(IT,"__esModule",{value:!0});IT.Step=void 0;const aEt=z1;class sEt{constructor(t,n,r){this.taskSelfResolvers=new Map,this.taskStepInfos=new Map,this.name=t,this.runLogic=n,this.cancelLogic=r}run(t,n){return hY(this,void 0,void 0,function*(){return this.addStepInfo(t,{name:this.name}),new Promise(r=>{const o=new Date,i=(a,s)=>{const l=new Date,c=l.getTime()-o.getTime();this.addStepInfo(t,{startTime:o,endTime:l,duration:c}),this.addStepInfo(t,s?{success:!1,error:s}:{success:!0}),r({resultValue:a,info:this.getStepInfo(t)})};this.taskSelfResolvers.set(t,i),this.runLogic(t,n).then(a=>i(a)).finally(()=>{this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t)}).catch(a=>i(void 0,a))})})}cancel(t,n){return hY(this,void 0,void 0,function*(){this.addStepInfo(t,{wasCanceled:!0,cancelingReason:n});const r=this.taskSelfResolvers.get(t);r==null||r(void 0,new aEt.TaskCanceledError(n)),this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t),yield this.cancelLogic(t,n)})}addStepInfo(t,n){const r=this.taskStepInfos.get(t)||{},o=Object.assign(Object.assign({},r),n);this.taskStepInfos.set(t,o)}getStepInfo(t){return this.taskStepInfos.get(t)}}IT.Step=sEt;var RT={};Object.defineProperty(RT,"__esModule",{value:!0});RT.Addon=void 0;class lEt{constructor(){this.events={}}}RT.Addon=lEt;var jT={},Mw,cEt=new Uint8Array(16);function Fce(){if(!Mw&&(Mw=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Mw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mw(cEt)}const uEt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function zT(e){return typeof e=="string"&&uEt.test(e)}var wi=[];for(var YO=0;YO<256;++YO)wi.push((YO+256).toString(16).substr(1));function BT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(wi[e[t+0]]+wi[e[t+1]]+wi[e[t+2]]+wi[e[t+3]]+"-"+wi[e[t+4]]+wi[e[t+5]]+"-"+wi[e[t+6]]+wi[e[t+7]]+"-"+wi[e[t+8]]+wi[e[t+9]]+"-"+wi[e[t+10]]+wi[e[t+11]]+wi[e[t+12]]+wi[e[t+13]]+wi[e[t+14]]+wi[e[t+15]]).toLowerCase();if(!zT(n))throw TypeError("Stringified UUID is invalid");return n}var fY,XO,qO=0,ZO=0;function dEt(e,t,n){var r=t&&n||0,o=t||new Array(16);e=e||{};var i=e.node||fY,a=e.clockseq!==void 0?e.clockseq:XO;if(i==null||a==null){var s=e.random||(e.rng||Fce)();i==null&&(i=fY=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),a==null&&(a=XO=(s[6]<<8|s[7])&16383)}var l=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:ZO+1,d=l-qO+(c-ZO)/1e4;if(d<0&&e.clockseq===void 0&&(a=a+1&16383),(d<0||l>qO)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");qO=l,ZO=c,XO=a,l+=122192928e5;var h=((l&268435455)*1e4+c)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=h&255;var u=l/4294967296*1e4&268435455;o[r++]=u>>>8&255,o[r++]=u&255,o[r++]=u>>>24&15|16,o[r++]=u>>>16&255,o[r++]=a>>>8|128,o[r++]=a&255;for(var w=0;w<6;++w)o[r+w]=i[w];return t||BT(o)}function Hce(e){if(!zT(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}function pEt(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var hEt="6ba7b810-9dad-11d1-80b4-00c04fd430c8",fEt="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Wce(e,t,n){function r(o,i,a,s){if(typeof o=="string"&&(o=pEt(o)),typeof i=="string"&&(i=Hce(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var l=new Uint8Array(16+o.length);if(l.set(i),l.set(o,i.length),l=n(l),l[6]=l[6]&15|t,l[8]=l[8]&63|128,a){s=s||0;for(var c=0;c<16;++c)a[s+c]=l[c];return a}return BT(l)}try{r.name=e}catch{}return r.DNS=hEt,r.URL=fEt,r}function mEt(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return gEt(vEt(yEt(e),e.length*8))}function gEt(e){for(var t=[],n=e.length*32,r="0123456789abcdef",o=0;o<n;o+=8){var i=e[o>>5]>>>o%32&255,a=parseInt(r.charAt(i>>>4&15)+r.charAt(i&15),16);t.push(a)}return t}function Vce(e){return(e+64>>>9<<4)+14+1}function vEt(e,t){e[t>>5]|=128<<t%32,e[Vce(t)-1]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,a=0;a<e.length;a+=16){var s=n,l=r,c=o,d=i;n=Bi(n,r,o,i,e[a],7,-680876936),i=Bi(i,n,r,o,e[a+1],12,-389564586),o=Bi(o,i,n,r,e[a+2],17,606105819),r=Bi(r,o,i,n,e[a+3],22,-1044525330),n=Bi(n,r,o,i,e[a+4],7,-176418897),i=Bi(i,n,r,o,e[a+5],12,1200080426),o=Bi(o,i,n,r,e[a+6],17,-1473231341),r=Bi(r,o,i,n,e[a+7],22,-45705983),n=Bi(n,r,o,i,e[a+8],7,1770035416),i=Bi(i,n,r,o,e[a+9],12,-1958414417),o=Bi(o,i,n,r,e[a+10],17,-42063),r=Bi(r,o,i,n,e[a+11],22,-1990404162),n=Bi(n,r,o,i,e[a+12],7,1804603682),i=Bi(i,n,r,o,e[a+13],12,-40341101),o=Bi(o,i,n,r,e[a+14],17,-1502002290),r=Bi(r,o,i,n,e[a+15],22,1236535329),n=$i(n,r,o,i,e[a+1],5,-165796510),i=$i(i,n,r,o,e[a+6],9,-1069501632),o=$i(o,i,n,r,e[a+11],14,643717713),r=$i(r,o,i,n,e[a],20,-373897302),n=$i(n,r,o,i,e[a+5],5,-701558691),i=$i(i,n,r,o,e[a+10],9,38016083),o=$i(o,i,n,r,e[a+15],14,-660478335),r=$i(r,o,i,n,e[a+4],20,-405537848),n=$i(n,r,o,i,e[a+9],5,568446438),i=$i(i,n,r,o,e[a+14],9,-1019803690),o=$i(o,i,n,r,e[a+3],14,-187363961),r=$i(r,o,i,n,e[a+8],20,1163531501),n=$i(n,r,o,i,e[a+13],5,-1444681467),i=$i(i,n,r,o,e[a+2],9,-51403784),o=$i(o,i,n,r,e[a+7],14,1735328473),r=$i(r,o,i,n,e[a+12],20,-1926607734),n=Fi(n,r,o,i,e[a+5],4,-378558),i=Fi(i,n,r,o,e[a+8],11,-2022574463),o=Fi(o,i,n,r,e[a+11],16,1839030562),r=Fi(r,o,i,n,e[a+14],23,-35309556),n=Fi(n,r,o,i,e[a+1],4,-1530992060),i=Fi(i,n,r,o,e[a+4],11,1272893353),o=Fi(o,i,n,r,e[a+7],16,-155497632),r=Fi(r,o,i,n,e[a+10],23,-1094730640),n=Fi(n,r,o,i,e[a+13],4,681279174),i=Fi(i,n,r,o,e[a],11,-358537222),o=Fi(o,i,n,r,e[a+3],16,-722521979),r=Fi(r,o,i,n,e[a+6],23,76029189),n=Fi(n,r,o,i,e[a+9],4,-640364487),i=Fi(i,n,r,o,e[a+12],11,-421815835),o=Fi(o,i,n,r,e[a+15],16,530742520),r=Fi(r,o,i,n,e[a+2],23,-995338651),n=Hi(n,r,o,i,e[a],6,-198630844),i=Hi(i,n,r,o,e[a+7],10,1126891415),o=Hi(o,i,n,r,e[a+14],15,-1416354905),r=Hi(r,o,i,n,e[a+5],21,-57434055),n=Hi(n,r,o,i,e[a+12],6,1700485571),i=Hi(i,n,r,o,e[a+3],10,-1894986606),o=Hi(o,i,n,r,e[a+10],15,-1051523),r=Hi(r,o,i,n,e[a+1],21,-2054922799),n=Hi(n,r,o,i,e[a+8],6,1873313359),i=Hi(i,n,r,o,e[a+15],10,-30611744),o=Hi(o,i,n,r,e[a+6],15,-1560198380),r=Hi(r,o,i,n,e[a+13],21,1309151649),n=Hi(n,r,o,i,e[a+4],6,-145523070),i=Hi(i,n,r,o,e[a+11],10,-1120210379),o=Hi(o,i,n,r,e[a+2],15,718787259),r=Hi(r,o,i,n,e[a+9],21,-343485551),n=cd(n,s),r=cd(r,l),o=cd(o,c),i=cd(i,d)}return[n,r,o,i]}function yEt(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(Vce(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function cd(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function bEt(e,t){return e<<t|e>>>32-t}function $T(e,t,n,r,o,i){return cd(bEt(cd(cd(t,e),cd(r,i)),o),n)}function Bi(e,t,n,r,o,i,a){return $T(t&n|~t&r,e,t,o,i,a)}function $i(e,t,n,r,o,i,a){return $T(t&r|n&~r,e,t,o,i,a)}function Fi(e,t,n,r,o,i,a){return $T(t^n^r,e,t,o,i,a)}function Hi(e,t,n,r,o,i,a){return $T(n^(t|~r),e,t,o,i,a)}var xEt=Wce("v3",48,mEt);const wEt=xEt;function _Et(e,t,n){e=e||{};var r=e.random||(e.rng||Fce)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return BT(r)}function SEt(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function KO(e,t){return e<<t|e>>>32-t}function CEt(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o<r.length;++o)e.push(r.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,a=Math.ceil(i/16),s=new Array(a),l=0;l<a;++l){for(var c=new Uint32Array(16),d=0;d<16;++d)c[d]=e[l*64+d*4]<<24|e[l*64+d*4+1]<<16|e[l*64+d*4+2]<<8|e[l*64+d*4+3];s[l]=c}s[a-1][14]=(e.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(e.length-1)*8&4294967295;for(var h=0;h<a;++h){for(var u=new Uint32Array(80),w=0;w<16;++w)u[w]=s[h][w];for(var y=16;y<80;++y)u[y]=KO(u[y-3]^u[y-8]^u[y-14]^u[y-16],1);for(var p=n[0],k=n[1],j=n[2],F=n[3],U=n[4],H=0;H<80;++H){var R=Math.floor(H/20),z=KO(p,5)+SEt(R,k,j,F)+U+t[R]+u[H]>>>0;U=F,F=j,j=KO(k,30)>>>0,k=p,p=z}n[0]=n[0]+p>>>0,n[1]=n[1]+k>>>0,n[2]=n[2]+j>>>0,n[3]=n[3]+F>>>0,n[4]=n[4]+U>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}var kEt=Wce("v5",80,CEt);const TEt=kEt,MEt="00000000-0000-0000-0000-000000000000";function EEt(e){if(!zT(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const AEt=Object.freeze(Object.defineProperty({__proto__:null,NIL:MEt,parse:Hce,stringify:BT,v1:dEt,v3:wEt,v4:_Et,v5:TEt,validate:zT,version:EEt},Symbol.toStringTag,{value:"Module"})),OEt=_me(AEt);Object.defineProperty(jT,"__esModule",{value:!0});jT.TaskPassport=void 0;const PEt=OEt;class DEt{constructor(){this.taskId=(0,PEt.v4)()}}jT.TaskPassport=DEt;(function(e){var t=vo&&vo.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(r,a,s)}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=vo&&vo.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(NT,e),n(IT,e),n(Y4,e),n(RT,e),n(jT,e),n(z1,e)})($ce);(function(e){var t=vo&&vo.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(r,a,s)}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=vo&&vo.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n($ce,e)})(Fa);class Ui extends Lb{constructor(t,n){super(jce,{key:t,interpolationOptions:n},WMt.t)}get status(){return this.interpolationOptions.status}}var LEt=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const gb="api/datasources",NEt="api/v2/datamodels";class IEt{constructor(t){this.httpClient=t}getDataSourceFields(t,n=9999,r=0){const o=Mc(t),i=`${gb}/${encodeURI(o)}/fields/search`;return this.httpClient.post(i,{offset:r,count:n}).catch(()=>{throw new Ui("errors.dataSourceNotFound",{dataSource:typeof t=="string"?t:t.title})})}getDataSourceList(){const t=`${gb}/?sharedWith=r,w`;return this.httpClient.get(t)}getDataSourceSchema(t){const n=`${NEt}/schema?title=${encodeURIComponent(t)}`;return this.httpClient.get(n)}sendJaqlRequest(t,n){const r=Uce(t),o=new AbortController;return{responsePromise:this.httpClient.post(r,n,void 0,o.signal).then(i=>Array.isArray(i)?{values:[],metadata:[]}:i),abortHttpRequest:i=>o.abort(i)}}sendDownloadCsvRequest(t,n){const r=zEt(t),o=new AbortController,i=new URLSearchParams;return i.append("data",encodeURIComponent(JSON.stringify(n))),{responsePromise:this.httpClient.post(r,i,{headers:{"Content-Type":"application/x-www-form-urlencoded"}},o.signal,{nonJSONBody:!0,returnBlob:!0}),abortHttpRequest:a=>o.abort(a)}}sendCancelJaqlQueryRequest(t,n){return this.sendCancelMultipleJaqlQueriesRequest([t],n)}sendCancelMultipleJaqlQueriesRequest(t,n){return LEt(this,void 0,void 0,function*(){const r={queries:t.join(";")},o=REt(n);try{yield this.httpClient.post(o,r)}catch(i){if(i.status==="404"){const a=jEt(n);yield this.httpClient.post(a,r)}else throw i}})}}function REt(e){const t=encodeURIComponent(Mc(e));return`${gb}/localhost/${t}/cancel_queries`}function jEt(e){const t=encodeURIComponent(Mc(e));return`${gb}/live/${t}/cancel_queries`}function Uce(e){const t=encodeURIComponent(Mc(e));return`${gb}/${t}/jaql`}function zEt(e){return`${Uce(e)}/csv`}var Gce={exports:{}};/*! @preserve
1019
1019
  * numeral.js
1020
1020
  * version : 2.0.6
1021
1021
  * author : Adam Draper
1022
1022
  * license : MIT
1023
1023
  * http://adamwdraper.github.com/Numeral-js/
1024
- */(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(vo,function(){var t,n,r="2.0.6",o={},i={},a={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:a.currentLocale,zeroFormat:a.zeroFormat,nullFormat:a.nullFormat,defaultFormat:a.defaultFormat,scalePercentBy100:a.scalePercentBy100};function l(c,d){this._input=c,this._value=d}return t=function(c){var d,h,u,w;if(t.isNumeral(c))d=c.value();else if(c===0||typeof c>"u")d=0;else if(c===null||n.isNaN(c))d=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)d=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)d=null;else{for(h in o)if(w=typeof o[h].regexps.unformat=="function"?o[h].regexps.unformat():o[h].regexps.unformat,w&&c.match(w)){u=o[h].unformat;break}u=u||t._.stringToNumber,d=u(c)}else d=Number(c)||null;return new l(c,d)},t.version=r,t.isNumeral=function(c){return c instanceof l},t._=n={numberToFormat:function(c,d,h){var u=i[t.options.currentLocale],w=!1,y=!1,p=0,k="",j=1e12,F=1e9,U=1e6,H=1e3,R="",z=!1,I,N,W,A,C,v,T;if(c=c||0,N=Math.abs(c),t._.includes(d,"(")?(w=!0,d=d.replace(/[\(|\)]/g,"")):(t._.includes(d,"+")||t._.includes(d,"-"))&&(C=t._.includes(d,"+")?d.indexOf("+"):c<0?d.indexOf("-"):-1,d=d.replace(/[\+|\-]/g,"")),t._.includes(d,"a")&&(I=d.match(/a(k|m|b|t)?/),I=I?I[1]:!1,t._.includes(d," a")&&(k=" "),d=d.replace(new RegExp(k+"a[kmbt]?"),""),N>=j&&!I||I==="t"?(k+=u.abbreviations.trillion,c=c/j):N<j&&N>=F&&!I||I==="b"?(k+=u.abbreviations.billion,c=c/F):N<F&&N>=U&&!I||I==="m"?(k+=u.abbreviations.million,c=c/U):(N<U&&N>=H&&!I||I==="k")&&(k+=u.abbreviations.thousand,c=c/H)),t._.includes(d,"[.]")&&(y=!0,d=d.replace("[.]",".")),W=c.toString().split(".")[0],A=d.split(".")[1],v=d.indexOf(","),p=(d.split(".")[0].split(",")[0].match(/0/g)||[]).length,A?(t._.includes(A,"[")?(A=A.replace("]",""),A=A.split("["),R=t._.toFixed(c,A[0].length+A[1].length,h,A[1].length)):R=t._.toFixed(c,A.length,h),W=R.split(".")[0],t._.includes(R,".")?R=u.delimiters.decimal+R.split(".")[1]:R="",y&&Number(R.slice(1))===0&&(R="")):W=t._.toFixed(c,0,h),k&&!I&&Number(W)>=1e3&&k!==u.abbreviations.trillion)switch(W=String(Number(W)/1e3),k){case u.abbreviations.thousand:k=u.abbreviations.million;break;case u.abbreviations.million:k=u.abbreviations.billion;break;case u.abbreviations.billion:k=u.abbreviations.trillion;break}if(t._.includes(W,"-")&&(W=W.slice(1),z=!0),W.length<p)for(var S=p-W.length;S>0;S--)W="0"+W;return v>-1&&(W=W.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+u.delimiters.thousands)),d.indexOf(".")===0&&(W=""),T=W+R+(k||""),w?T=(w&&z?"(":"")+T+(w&&z?")":""):C>=0?T=C===0?(z?"-":"+")+T:T+(z?"-":"+"):z&&(T="-"+T),T},stringToNumber:function(c){var d=i[s.currentLocale],h=c,u={thousand:3,million:6,billion:9,trillion:12},w,y,p;if(s.zeroFormat&&c===s.zeroFormat)y=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)y=null;else{y=1,d.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(d.delimiters.decimal,"."));for(w in u)if(p=new RegExp("[^a-zA-Z]"+d.abbreviations[w]+"(?:\\)|(\\"+d.currency.symbol+")?(?:\\))?)?$"),h.match(p)){y*=Math.pow(10,u[w]);break}y*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),y*=Number(c)}return y},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,d){return c.indexOf(d)!==-1},insert:function(c,d,h){return c.slice(0,h)+d+c.slice(h)},reduce:function(c,d){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof d!="function")throw new TypeError(d+" is not a function");var h=Object(c),u=h.length>>>0,w=0,y;if(arguments.length===3)y=arguments[2];else{for(;w<u&&!(w in h);)w++;if(w>=u)throw new TypeError("Reduce of empty array with no initial value");y=h[w++]}for(;w<u;w++)w in h&&(y=d(y,h[w],w,h));return y},multiplier:function(c){var d=c.toString().split(".");return d.length<2?1:Math.pow(10,d[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(d,h){var u=n.multiplier(h);return d>u?d:u},1)},toFixed:function(c,d,h,u){var w=c.toString().split("."),y=d-(u||0),p,k,j,F;return w.length===2?p=Math.min(Math.max(w[1].length,y),d):p=y,j=Math.pow(10,p),F=(h(c+"e+"+p)/j).toFixed(p),u>d-p&&(k=new RegExp("\\.?0{1,"+(u-(d-p))+"}$"),F=F.replace(k,"")),F}},t.options=s,t.formats=o,t.locales=i,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return i[s.currentLocale];if(c=c.toLowerCase(),!i[c])throw new Error("Unknown locale : "+c);return i[c]},t.reset=function(){for(var c in a)s[c]=a[c]},t.zeroFormat=function(c){s.zeroFormat=typeof c=="string"?c:null},t.nullFormat=function(c){s.nullFormat=typeof c=="string"?c:null},t.defaultFormat=function(c){s.defaultFormat=typeof c=="string"?c:"0.0"},t.register=function(c,d,h){if(d=d.toLowerCase(),this[c+"s"][d])throw new TypeError(d+" "+c+" already registered.");return this[c+"s"][d]=h,h},t.validate=function(c,d){var h,u,w,y,p,k,j,F;if(typeof c!="string"&&(c+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",c)),c=c.trim(),c.match(/^\d+$/))return!0;if(c==="")return!1;try{j=t.localeData(d)}catch{j=t.localeData(t.locale())}return w=j.currency.symbol,p=j.abbreviations,h=j.delimiters.decimal,j.delimiters.thousands==="."?u="\\.":u=j.delimiters.thousands,F=c.match(/^[^\d]+/),F!==null&&(c=c.substr(1),F[0]!==w)||(F=c.match(/[^\d]+$/),F!==null&&(c=c.slice(0,-1),F[0]!==p.thousand&&F[0]!==p.million&&F[0]!==p.billion&&F[0]!==p.trillion))?!1:(k=new RegExp(u+"{2}"),c.match(/[^\d.,]/g)?!1:(y=c.split(h),y.length>2?!1:y.length<2?!!y[0].match(/^\d+.*\d$/)&&!y[0].match(k):y[0].length===1?!!y[0].match(/^\d+$/)&&!y[0].match(k)&&!!y[1].match(/^\d+$/):!!y[0].match(/^\d+.*\d$/)&&!y[0].match(k)&&!!y[1].match(/^\d+$/)))},t.fn=l.prototype={clone:function(){return t(this)},format:function(c,d){var h=this._value,u=c||s.defaultFormat,w,y,p;if(d=d||Math.round,h===0&&s.zeroFormat!==null)y=s.zeroFormat;else if(h===null&&s.nullFormat!==null)y=s.nullFormat;else{for(w in o)if(u.match(o[w].regexps.format)){p=o[w].format;break}p=p||t._.numberToFormat,y=p(h,u,d)}return y},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var d=n.correctionFactor.call(null,this._value,c);function h(u,w,y,p){return u+Math.round(d*w)}return this._value=n.reduce([this._value,c],h,0)/d,this},subtract:function(c){var d=n.correctionFactor.call(null,this._value,c);function h(u,w,y,p){return u-Math.round(d*w)}return this._value=n.reduce([c],h,Math.round(this._value*d))/d,this},multiply:function(c){function d(h,u,w,y){var p=n.correctionFactor(h,u);return Math.round(h*p)*Math.round(u*p)/Math.round(p*p)}return this._value=n.reduce([this._value,c],d,1),this},divide:function(c){function d(h,u,w,y){var p=n.correctionFactor(h,u);return Math.round(h*p)/Math.round(u*p)}return this._value=n.reduce([this._value,c],d),this},difference:function(c){return Math.abs(t(this._value).subtract(c).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(c){var d=c%10;return~~(c%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,d,h){var u=t._.includes(d," BPS")?" ":"",w;return c=c*1e4,d=d.replace(/\s?BPS/,""),w=t._.numberToFormat(c,d,h),t._.includes(w,")")?(w=w.split(""),w.splice(-1,0,u+"BPS"),w=w.join("")):w=w+u+"BPS",w},unformat:function(c){return+(t._.stringToNumber(c)*1e-4).toFixed(15)}})}(),function(){var c={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},d={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=c.suffixes.concat(d.suffixes.filter(function(w){return c.suffixes.indexOf(w)<0})),u=h.join("|");u="("+u.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(u)},format:function(w,y,p){var k,j=t._.includes(y,"ib")?d:c,F=t._.includes(y," b")||t._.includes(y," ib")?" ":"",U,H,R;for(y=y.replace(/\s?i?b/,""),U=0;U<=j.suffixes.length;U++)if(H=Math.pow(j.base,U),R=Math.pow(j.base,U+1),w===null||w===0||w>=H&&w<R){F+=j.suffixes[U],H>0&&(w=w/H);break}return k=t._.numberToFormat(w,y,p),k+F},unformat:function(w){var y=t._.stringToNumber(w),p,k;if(y){for(p=c.suffixes.length-1;p>=0;p--){if(t._.includes(w,c.suffixes[p])){k=Math.pow(c.base,p);break}if(t._.includes(w,d.suffixes[p])){k=Math.pow(d.base,p);break}}y*=k||1}return y}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,d,h){var u=t.locales[t.options.currentLocale],w={before:d.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:d.match(/([\+|\-|\)|\s|\$]*)$/)[0]},y,p,k;for(d=d.replace(/\s?\$\s?/,""),y=t._.numberToFormat(c,d,h),c>=0?(w.before=w.before.replace(/[\-\(]/,""),w.after=w.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(w.before,"-")&&!t._.includes(w.before,"(")&&(w.before="-"+w.before),k=0;k<w.before.length;k++)switch(p=w.before[k],p){case"$":y=t._.insert(y,u.currency.symbol,k);break;case" ":y=t._.insert(y," ",k+u.currency.symbol.length-1);break}for(k=w.after.length-1;k>=0;k--)switch(p=w.after[k],p){case"$":y=k===w.after.length-1?y+u.currency.symbol:t._.insert(y,u.currency.symbol,-(w.after.length-(1+k)));break;case" ":y=k===w.after.length-1?y+" ":t._.insert(y," ",-(w.after.length-(1+k)+u.currency.symbol.length-1));break}return y}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,d,h){var u,w=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",y=w.split("e");return d=d.replace(/e[\+|\-]{1}0/,""),u=t._.numberToFormat(Number(y[0]),d,h),u+"e"+y[1]},unformat:function(c){var d=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),h=Number(d[0]),u=Number(d[1]);u=t._.includes(c,"e-")?u*=-1:u;function w(y,p,k,j){var F=t._.correctionFactor(y,p),U=y*F*(p*F)/(F*F);return U}return t._.reduce([h,Math.pow(10,u)],w,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,d,h){var u=t.locales[t.options.currentLocale],w,y=t._.includes(d," o")?" ":"";return d=d.replace(/\s?o/,""),y+=u.ordinal(c),w=t._.numberToFormat(c,d,h),w+y}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,d,h){var u=t._.includes(d," %")?" ":"",w;return t.options.scalePercentBy100&&(c=c*100),d=d.replace(/\s?\%/,""),w=t._.numberToFormat(c,d,h),t._.includes(w,")")?(w=w.split(""),w.splice(-1,0,u+"%"),w=w.join("")):w=w+u+"%",w},unformat:function(c){var d=t._.stringToNumber(c);return t.options.scalePercentBy100?d*.01:d}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,d,h){var u=Math.floor(c/60/60),w=Math.floor((c-u*60*60)/60),y=Math.round(c-u*60*60-w*60);return u+":"+(w<10?"0"+w:w)+":"+(y<10?"0"+y:y)},unformat:function(c){var d=c.split(":"),h=0;return d.length===3?(h=h+Number(d[0])*60*60,h=h+Number(d[1])*60,h=h+Number(d[2])):d.length===2&&(h=h+Number(d[0])*60,h=h+Number(d[1])),Number(h)}})}(),t})})(Gce);var BEt=Gce.exports;const $Et=ya(BEt),FEt=(e,t)=>{const n=VEt(e);return HEt(n,t)};function HEt(e,t){return{columns:t==null?void 0:t.map(n=>({name:n.name,type:g5(n.type)})),rows:WEt(e)}}function WEt(e){var t;let n=!1;const r=(t=e[0])===null||t===void 0?void 0:t.map((o,i)=>{const a=e.some(s=>"selected"in s[i]);return a&&(n=!0),a});return e.map(o=>{const i=n?r.some((a,s)=>a&&!o[s].selected):void 0;return o.map(a=>i!==void 0?{data:a.data,text:a.text,blur:i}:{data:a.data,text:a.text})})}function VEt({values:e=[],metadata:t=[]}){var n,r,o,i;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let a=0;a<e.length;a++){const s=e[a];for(let l=0;l<s.length;l++)t[l].format&&!((r=(n=t[l])===null||n===void 0?void 0:n.format)===null||r===void 0)&&r.number&&(s[l].text=$Et(s[l].data).format((i=(o=t[l])===null||o===void 0?void 0:o.format)===null||i===void 0?void 0:i.number))}return e}var Sp=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class UEt extends Fa.AbstractTaskManager{constructor(t,n){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new Fa.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Sp(this,void 0,void 0,function*(){})),new Fa.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new Fa.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Sp(this,void 0,void 0,function*(){})),new Fa.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new Fa.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>Sp(this,void 0,void 0,function*(){})),new Fa.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotClient=n}prepareJaqlPayload(t){return Sp(this,void 0,void 0,function*(){const{queryDescription:n,executionConfig:r}=t.passport,o=w5(n,r.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(o):o})}sendJaqlQuery(t,n){return Sp(this,void 0,void 0,function*(){const{queryDescription:r,taskId:o}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,n);this.sentRequestsAbortersMap.set(o,a);const s=yield i.finally(()=>{this.sentRequestsAbortersMap.delete(o)});GEt(s);const l=[...r.attributes,...r.measures],c=(s.headers||[]).slice(l.length).map(d=>({name:d,type:"number"}));return FEt(s,[...l,...c])})}sendCsvQuery(t,n){return Sp(this,void 0,void 0,function*(){const{taskId:r}=t.passport,{responsePromise:o,abortHttpRequest:i}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,n);return this.sentRequestsAbortersMap.set(r,i),o.finally(()=>{this.sentRequestsAbortersMap.delete(r)})})}cancelDataRetrievalQuery(t){const n=t.passport.taskId,r=this.sentRequestsAbortersMap.get(n);return r&&(r(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.queryDescription.dataSource)}preparePivotJaqlPayload(t){return Sp(this,void 0,void 0,function*(){const{pivotQueryDescription:n,executionConfig:r}=t.passport,o=Nxe(n,r.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(o):o})}sendPivotJaqlQuery(t,n){var r;const{pivotQueryDescription:o}=t.passport;return this.pivotClient.queryData(n,!0,(r=o.count)!==null&&r!==void 0?r:XEt,!1)}cancelPivotJaqlQuery(t){const n=t.passport.taskId,r=this.sentRequestsAbortersMap.get(n);return r&&(r(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.pivotQueryDescription.dataSource)}}function GEt(e){var t;if(!e)throw new Ui("errors.noJaqlResponse");if(e.error)throw new Error(`${e.details} ${(t=e.database)!==null&&t!==void 0?t:""} ${e.extraDetails?JSON.stringify(e.extraDetails):""}`)}class mY extends Fa.TaskPassport{constructor(t,n,r){super(),this.queryDescription=n,this.type=t,this.executionConfig=r}}class YEt extends Fa.TaskPassport{constructor(t,n,r){super(),this.pivotQueryDescription=n,this.type=t,this.executionConfig=r}}var gY=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const XEt=2e4,QO="Unspecified reason";class qEt{constructor(t,n=new Zte(t.url,t.auth),r){KEt(t),this.queryApi=new IEt(t),this.taskManager=new UEt(this.queryApi,n),this.shouldSkipHighlightsWithoutAttributes=r??!1}executeQuery(t,n){const r=new mY("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{vY(t),this.taskManager.executeQuerySending(r).then(a=>{a.status===Fa.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||QO)}}executeCsvQuery(t,n){const r=new mY("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{vY(t),this.taskManager.executeDownloadCsvSending(r).then(a=>{a.status===Fa.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||QO)}}executePivotQuery(t,n){const r=new YEt("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{ZEt(t),this.taskManager.executePivotQuerySending(r).then(a=>{a.status===Fa.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||QO)}}getDataSourceFields(t,n=9999,r=0){return gY(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceFields(t,n,r))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return gY(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function vY(e){const{attributes:t,measures:n,filters:r,highlights:o,count:i,offset:a}=e;if(i&&i<0)throw new Ui("errors.invalidCountNegative",{count:i.toString()});if(a&&a<0)throw new Ui("errors.invalidOffset",{offset:a.toString()});if(t.length+n.length===0)throw new Ui("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!zt.isAttribute(s)){const{name:l}=s;throw new Ui("errors.invalidAttribute",{attributeName:l})}}),n.forEach(s=>{if(!s.skipValidation&&!zt.isMeasure(s))throw new Ui("errors.invalidMeasure",{measureName:s.name})}),r.forEach(s=>{if(!s.skipValidation&&!zt.isFilter(s))throw new Ui("errors.invalidFilter",{filterName:s.name})}),o.forEach(s=>{if(!s.skipValidation&&!zt.isFilter(s))throw new Ui("errors.invalidHighlight",{highlightName:s.name})})}function ZEt(e){const{rowsAttributes:t,columnsAttributes:n,measures:r,filters:o,highlights:i,count:a,offset:s}=e;if(a&&a<0)throw new Ui("errors.invalidCountNegative",{count:a.toString()});if(s&&s<0)throw new Ui("errors.invalidOffset",{offset:s.toString()});if(t.length+n.length+r.length===0)throw new Ui("errors.noDimensionsOrMeasures");o.forEach(l=>{if(!l.skipValidation&&!zt.isFilter(l))throw new Ui("errors.invalidFilter",{filterName:l.name})}),i.forEach(l=>{if(!l.skipValidation&&!zt.isFilter(l))throw new Ui("errors.invalidHighlight",{highlightName:l.name})})}function KEt(e){if(!e)throw new Ui("errors.missingHttpClient");if(!e.post)throw new Ui("errors.missingPostMethod")}const QEt={enabled:!0,delay:500},JEt={locale:t2(),dateConfig:DR,loadingIndicatorConfig:QEt,translationConfig:{language:"en",customTranslations:[]},queryCacheConfig:{enabled:!1},queryLimit:nVe,tabberConfig:{enabled:!0},accessibilityConfig:{enabled:!1},errorBoundaryConfig:{alwaysShowErrorText:!1},trackingConfig:{enabled:!0},jumpToDashboardConfig:{enabled:!1}};function eAt(e,t,n){return Co(this,null,function*(){var r;const o=yield nAt(t,n);return lo.withOptions({mergeArrays:!1},JEt,{locale:t2((r=e==null?void 0:e.translationConfig)==null?void 0:r.language)},o,e)})}function tAt(e){const t={};return e.forEach(n=>{t[n.key]=n}),t}function nAt(e,t=!1){return Co(this,null,function*(){var n,r;const o=yield e.get("api/globals");if(!o)throw new kt("errors.serverSettingsNotLoaded");const i=t?{colors:$y().palette.variantColors}:yield Joe(Koe(o.designSettings),e);return{serverThemeSettings:Zoe(o.designSettings,i,e.url),serverLanguage:o.language,serverVersion:o.version,serverFeatures:tAt(o.features),user:{tenant:{name:((r=(n=o.user)==null?void 0:n.tenant)==null?void 0:r.name)||Sne}}}})}function rAt(e,t){return t===Sne?e:e.replace(`/${t}`,"")}function oAt(){window.addEventListener("unhandledrejection",e=>{e.reason instanceof Error?console.error(e.reason.message):console.error(e.reason)})}const iAt=e=>Co(void 0,[e],function*({defaultDataSource:t,url:n,token:r,wat:o,ssoEnabled:i,appConfig:a,enableSilentPreAuth:s,useFusionAuth:l}){if(n===void 0)throw new kt("errors.sisenseContextNoAuthentication");const c=Eu(n),d=Eu(n,!0),h=RMt({url:d,token:r,wat:o,ssoEnabled:i,enableSilentPreAuth:s,useFusionAuth:l});if(!h)throw new kt("errors.sisenseContextNoAuthentication");oAt();const u=new zMt(c,h,"sdk-ui-2.4.0"),w=yield u.login(),y=Ice(h)||!w,p=yield eAt(a||{},u,y),k=new Zte(rAt(c,p.user.tenant.name),h),j=new qEt(u,k);return{httpClient:u,pivotClient:k,queryClient:j,settings:p,defaultDataSource:t,queryCache:{clear:Mne}}}),aAt=()=>{const e=aie();return e?uk({key:"css",nonce:e}):null},yY=({children:e})=>{const t=Ke(()=>aAt(),[]);return t?ge(M5,{value:t,children:e}):ge(bn,{children:e})},sAt=Cie();function lAt(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Ky(t.components[n].defaultProps,r)}function cAt({props:e,name:t,defaultTheme:n,themeId:r}){let o=xie(n);return r&&(o=o[r]||o),lAt({theme:o,name:t,props:e})}const uAt=W2(),dAt=sAt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function pAt(e){return cAt({props:e,name:"MuiStack",defaultTheme:uAt})}function hAt(e,t){const n=Ai.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(wn(t,{key:`separator-${i}`})),r),[])}const fAt=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],mAt=({ownerState:e,theme:t})=>{let n=Pe({display:"flex",flexDirection:"column"},bl({theme:t},dO({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=j2(t),o=Object.keys(t.breakpoints.values).reduce((s,l)=>((typeof e.spacing=="object"&&e.spacing[l]!=null||typeof e.direction=="object"&&e.direction[l]!=null)&&(s[l]=!0),s),{}),i=dO({values:e.direction,base:o}),a=dO({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((s,l,c)=>{if(!i[s]){const d=l>0?i[c[l-1]]:"column";i[s]=d}}),n=ma(n,bl({theme:t},a,(s,l)=>e.useFlexGap?{gap:fh(r,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${fAt(l?i[l]:e.direction)}`]:fh(r,s)}}))}return n=VJe(t.breakpoints,n),n};function gAt(e={}){const{createStyledComponent:t=dAt,useThemeProps:n=pAt,componentName:r="MuiStack"}=e,o=()=>lr({root:["root"]},s=>Vn(r,s),{}),i=t(mAt),a=Tt(function(s,l){const c=n(s),d=yie(c),{component:h="div",direction:u="column",spacing:w=0,divider:y,children:p,className:k,useFlexGap:j=!1}=d,F=_n(d,["component","direction","spacing","divider","children","className","useFlexGap"]),U={direction:u,spacing:w,useFlexGap:j},H=o();return Me(i,je(Pe({as:h,ownerState:U,ref:l,className:Wt(H.root,k)},F),{children:y?hAt(p,y):p}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:ue.node,direction:ue.oneOfType([ue.oneOf(["column-reverse","column","row-reverse","row"]),ue.arrayOf(ue.oneOf(["column-reverse","column","row-reverse","row"])),ue.object]),divider:ue.node,spacing:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.number,ue.string])),ue.number,ue.object,ue.string]),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])}),a}const vAt=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return lr({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Crt,t)},yAt=Gt("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${im.primary}`]:t.primary},{[`& .${im.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${OV.root}:where(& .${im.primary})`]:{display:"block"},[`.${OV.root}:where(& .${im.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Yce=Tt(function(e,t){const n=cr({props:e,name:"MuiListItemText"}),r=n,{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:d,secondaryTypographyProps:h,slots:u={},slotProps:w={}}=r,y=_n(r,["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps","slots","slotProps"]),{dense:p}=en(gh);let k=l??o,j=d;const F=je(Pe({},n),{disableTypography:a,inset:s,primary:!!k,secondary:!!j,dense:p}),U=vAt(F),H={slots:u,slotProps:Pe({primary:c,secondary:h},w)},[R,z]=Vr("root",{className:Wt(U.root,i),elementType:yAt,externalForwardedProps:Pe(Pe({},H),y),ownerState:F,ref:t}),[I,N]=Vr("primary",{className:U.primary,elementType:Yi,externalForwardedProps:H,ownerState:F}),[W,A]=Vr("secondary",{className:U.secondary,elementType:Yi,externalForwardedProps:H,ownerState:F});return k!=null&&k.type!==Yi&&!a&&(k=Me(I,je(Pe({variant:p?"body2":"body1",component:N!=null&&N.variant?void 0:"span"},N),{children:k}))),j!=null&&j.type!==Yi&&!a&&(j=Me(W,je(Pe({variant:"body2",color:"textSecondary"},A),{children:j}))),Me(R,je(Pe({},z),{children:[k,j]}))});process.env.NODE_ENV!=="production"&&(Yce.propTypes={children:ue.node,classes:ue.object,className:ue.string,disableTypography:ue.bool,inset:ue.bool,primary:ue.node,primaryTypographyProps:ue.object,secondary:ue.node,secondaryTypographyProps:ue.object,slotProps:ue.shape({primary:ue.oneOfType([ue.func,ue.object]),root:ue.oneOfType([ue.func,ue.object]),secondary:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({primary:ue.elementType,root:ue.elementType,secondary:ue.elementType}),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});const yd=(e,t)=>`${t}px solid ${e}`,Xce=e=>({columns:[{widthPercentage:100,rows:e.map(t=>({cells:[{widthPercentage:100,widgetId:t.id}]}))}]});function qce(e){return vj(e)?{direction:e}:e}function bY(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function bAt({type:e,settings:t,sortDetails:n},r){return e==="simple"?n.field>=(r.rows||[]).length?[{rowIndex:0,sort:{direction:gm(t[0].direction),by:bY(n,r)}}]:[{rowIndex:n.field,sort:{direction:gm(t[0].direction)}}]:t.reduce((o,i,a)=>{var s;const l=(s=r.rows)==null?void 0:s[a],c=(l==null?void 0:l.sortType)&&qce(l==null?void 0:l.sortType),d={direction:gm(i.direction),by:bY(n,r)};return!i.selected&&Ra(c==null?void 0:c.by,d.by)&&o.push({rowIndex:a,sort:null}),i.selected&&o.push({rowIndex:a,sort:d}),o},[])}function xAt(e){const{jaql:t,pivotBuilder:n,isForceReload:r}=e,[o,i]=Ge({isLoading:!1,isNoResults:!1}),a=xl(t);Je(()=>{t&&(a||r)&&n.updateJaql(t)},[r,a,t,n]);const s=He(()=>{i({isLoading:!0,isNoResults:!1})},[]),l=He(c=>{i({isLoading:!1,isNoResults:!c.cellsMetadata})},[]);return Je(()=>{const c=[{event:uL,handler:s},{event:dL,handler:l}];return c.forEach(({event:d,handler:h})=>{n.on(d,h)}),()=>{c.forEach(({event:d,handler:h})=>{n.off(d,h)})}},[n,s,l]),o}function wAt(e){const{pivotClient:t,pivotBuilder:n,shouldBeRecreated:r}=e,[o,i]=Ge(()=>t.prepareDataService());return Je(()=>{if(r){const a=t.prepareDataService();i(a),n.updateDataService(a)}},[t,n,r]),Je(()=>()=>{o.destroy()},[o]),o}const _At=({dataOptions:e})=>{const[t,n]=Ge(vae(e));return{dataOptionsInternal:t,updateSort(r){var o;n(je(Pe({},t),{rows:(o=t.rows)==null?void 0:o.map((i,a)=>{const s=r.rows.find(({rowIndex:l})=>l===a);return s?s.sort===null?r7(i,{sortType:void 0}):r7(i,{sortType:s.sort}):i})}))}}},SAt=e=>(t,n,r,o)=>{var i;const a=qR(e,(i=o==null?void 0:o.field)==null?void 0:i.index),s=bre(a),l=t.value===null||typeof t.value>"u";t.content=l?"":Zr(s,t.value)},CAt=()=>(e,t,n)=>{var r,o;const i=e.userType===Pn.CORNER,a=e.userType===Pn.SUB_TOTAL;if(!t||i||a)return;const s=n.metadata.find(({panel:c,jaql:d})=>{var h;const u=["rows","columns"].includes(c),w=d.dim===t.jaql.dim,y=t.jaql.datatype===d.datatype&&t.jaql.level===d.level,p=(h=d.in)==null?void 0:h.selected;return u&&w&&y&&p}),l=(o=(r=s==null?void 0:s.jaql)==null?void 0:r.in)==null?void 0:o.selected;l&&KMt(l.jaql)(e.value)&&(e.state={isSelected:!0})};function kAt(e,t){return n=>{var r,o,i,a;if(n.userType===Pn.SUB_TOTAL&&(n.content=t("pivotTable.subTotal",{value:(r=n.content)!=null?r:""})),n.userType===Pn.GRAND_TOTAL){if(n.metadataType===un.ROWS&&(n.content=t("pivotTable.grandTotal"),((o=e.values)==null?void 0:o.length)===1&&!((i=e.columns)!=null&&i.length))){const[s]=e.values,l="column"in s?s.column:s;n.content=(a=l.name)!=null?a:n.content}n.metadataType===un.COLUMNS&&n.parent&&(n.content=t("pivotTable.grandTotal"))}}}const TAt="#000000",MAt="#ffffff";function EAt(e,t){return(n,r,o,i)=>{var a;const s={};if(r.userType===Pn.SUB_TOTAL||r.userType===Pn.GRAND_TOTAL||o.userType===Pn.SUB_TOTAL||o.userType===Pn.GRAND_TOTAL||o.parent&&o.parent.userType===Pn.SUB_TOTAL||o.parent&&o.parent.userType===Pn.GRAND_TOTAL)return;const l=qR(e,(a=i==null?void 0:i.field)==null?void 0:a.index),c=l==null?void 0:l.color,d=l==null?void 0:l.dataBarsColor;if(c){const h=Gy(c);if(h.type==="Static"||h.type==="Absolute"){const u=h.getColor(n.value);u&&(s.backgroundColor=u)}else if(h.type==="Relative"){const u=c,[w]=t.palette.variantColors,y=w?$s(w,.2):TAt,p=w?$s(w,-.2):MAt,k={steps:u.steps,min:u.minColor,max:u.maxColor,minDef:y,maxDef:p,minGray:NS(y),maxGray:NS(p)};n.store=n.store||{},n.store.compileRange=({min:j,max:F,minvalue:U,midvalue:H,maxvalue:R})=>are(j??"#000000",F??"#ffffff",U??0,H??0,R??0),n.store.compileRangeContext={},n.store.compileRangeArgs=k}}if(d){const h=Gy(d);if(h.type==="Static"||h.type==="Absolute"){const u=h.getColor(n.value);u&&(s.databarColor=u)}}Object.keys(s).length>0&&(n.style=n.style||{},Object.assign(n.style,s))}}const AAt=({dataService:e,dataOptions:t})=>{const{app:n}=Ln(),{t:r}=Jt(),{themeSettings:o}=Lt(),i=He(pN([SAt(t),EAt(t,o)]),[t]),a=He((l,c)=>np(l,c,n==null?void 0:n.settings.locale,n==null?void 0:n.settings.dateConfig),[n]),s=He(pN([iYe(t,a),kAt(t,r),CAt()]),[t,r]);Je(()=>(e.on(vD,i),e.on(nS,s),()=>{e.off(vD,i),e.off(nS,s)}),[e,i])};function xY(e,t){return Hd(e,t)}function OAt(e){const t=DAt(e),n=Qg(e,t),[r,o]=ls(xY,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Ln();return Je(()=>{if(i||o({type:"error",error:new kt("errors.executeQueryNoSisenseContext")}),n(a)){o({type:"loading"});const{dataSource:s,rows:l,columns:c,values:d,grandTotals:h,filters:u,highlights:w,count:y,offset:p,onBeforeQuery:k}=e,{filters:j,relations:F}=Qa(u);kne({dataSource:s,rows:l,columns:c,values:d,grandTotals:h,filters:j,filterRelations:F,highlights:w,count:y,offset:p},a,{onBeforeQuery:k}).then(U=>{o({type:"success",data:U})}).catch(U=>{o({type:"error",error:U})})}},[a,i,e,n]),r.data&&t?xY(r,{type:"loading"}):r}const PAt=["dataSource","rows","columns","values","grandTotals","count","offset","onBeforeQuery"];function DAt(e){return xl(e,PAt,(t,n)=>{const{filters:r}=Qa(n.filters),{filters:o}=Qa(t.filters);return xh(r,o)||xh(n.highlights,t.highlights)})}function Zce(e,t){const[n,r]=Ge(e),o=Ke(()=>D1(i=>{r(i)},t),[t]);return Je(()=>{o(e)},[e,o]),n}const LAt=200,wY=e=>Pe({attribute:Fs(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:qce(e.sortType)}),NAt=e=>{var t;return{measure:g1(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},Kce=e=>{const{rows:t=[],columns:n=[],values:r=[],grandTotals:o}=e,i=t.flatMap(wY),a=n.flatMap(wY),s=r.flatMap(NAt);return{rows:i,columns:a,values:s,grandTotals:o}},IAt=({dataSet:e,dataOptionsInternal:t,filters:n,highlights:r})=>{const[o,i]=Ge(),{rows:a,columns:s,values:l,grandTotals:c}=Ke(()=>Kce(t),[t]),d=He(w=>{i(y=>Ra(y,w)?y:w)},[i]),h=Zce(Ke(()=>({dataSource:e,rows:a,columns:s,values:l,grandTotals:c,filters:n,highlights:r,onBeforeQuery:d}),[e,a,s,l,c,n,r,d]),LAt),{error:u}=OAt(h);return{jaql:o,error:u}},RAt="#cbced7",jAt="#ffff9c";function zAt(e,t){var n,r,o,i,a,s,l,c,d,h,u;let w,y;if((n=t==null?void 0:t.chart)!=null&&n.backgroundColor){const p=zg(Bs((r=t==null?void 0:t.chart)==null?void 0:r.backgroundColor))<.5?.07:-.07;w=fi((o=t==null?void 0:t.chart)==null?void 0:o.backgroundColor,p),y=fi((i=t==null?void 0:t.chart)==null?void 0:i.backgroundColor,p*1.5)}return{fontFamily:(a=t==null?void 0:t.typography)==null?void 0:a.fontFamily,textColor:(s=t==null?void 0:t.chart)==null?void 0:s.textColor,backgroundColor:(l=t==null?void 0:t.chart)==null?void 0:l.backgroundColor,borderColor:RAt,fillColor:w,additionalFillColor:y,fillOptions:{alternatingRows:e==null?void 0:e.alternatingRowsColor,alternatingColumns:e==null?void 0:e.alternatingColumnsColor,columnsHeaders:e==null?void 0:e.headersColor,rowMembers:e==null?void 0:e.membersColor,totals:e==null?void 0:e.totalsColor},rowHeight:e==null?void 0:e.rowHeight,isAutoHeight:(c=e==null?void 0:e.isAutoHeight)!=null?c:!1,navigationPrimaryColor:(d=t==null?void 0:t.typography)==null?void 0:d.primaryTextColor,navigationSecondaryColor:(h=t==null?void 0:t.typography)==null?void 0:h.secondaryTextColor,selectionColor:(u=e==null?void 0:e.highlightColor)!=null?u:jAt}}const BAt=25;function $At({pivotBuilder:e,dataOptions:t,styleOptions:n,themeSettings:r,size:o,onTotalHeightChange:i}){const[a,s]=Ge(null),[l,c]=Cc((n==null?void 0:n.rowsPerPage)||BAt),d=He((y,p)=>{const k=[...t.rows?t.rows:[],...t.columns?t.columns:[],...t.values?t.values:[]].map(F=>F==null?void 0:F.width);if(p){const[F,U]=p,H=y[F];H&&typeof H.jaqlIndex<"u"&&(k[H.jaqlIndex]=U)}const j=[];return y.forEach((F,U)=>{typeof F.jaqlIndex<"u"&&typeof k[F.jaqlIndex]<"u"&&j.push([U,k[F.jaqlIndex]])}),j},[t]),h=He(y=>{c(y)},[c]),u=Ke(()=>zAt(n,r),[n,r]),w=Ke(()=>o?Pe({width:o.width,height:o.height,isPaginated:!0,itemsPerPage:l,isSelectedMode:!0,onUpdatePredefinedColumnWidth:d,onItemsPerPageChange:h,onTotalHeightChange:i},u):null,[o,l,d,u,i,h]);return Je(()=>(e.on(SS,s),()=>{e.off(SS,s)}),[e]),Je(()=>{w&&e.render(w)},[e,w]),{pivotElement:a}}function FAt(e){const{pivotClient:t}=e,n=Ke(()=>t.preparePivotBuilder(),[t]);return Je(()=>()=>{n.destroy()},[n]),n}const Qce=Sn({componentName:"PivotTable"})(e=>{const{dataSet:t,dataOptions:n,filters:r,highlights:o,refreshCounter:i=0,onHeightChange:a}=e,s=Ke(()=>{var T;return(T=e.styleOptions)!=null?T:{}},[e.styleOptions]),[l,c]=Ge(null),[d,h]=Ge(null),{app:u}=Ln(),{themeSettings:w}=Lt(),y=u==null?void 0:u.pivotClient;if(!y)throw new kt("errors.noPivotClient");const{dataOptionsInternal:p,updateSort:k}=_At({dataOptions:n}),{error:j,jaql:F}=IAt({dataSet:t,dataOptionsInternal:p,filters:r,highlights:o});if(j)throw j;const U=FAt({pivotClient:y}),H=xl(F),R=i>0&&xl(i),z=wAt({pivotClient:y,pivotBuilder:U,shouldBeRecreated:H||R});AAt({dataService:z,dataOptions:n});const I=He(T=>{a==null||a(T),h(T)},[a]),{pivotElement:N}=$At({pivotBuilder:U,dataOptions:n,styleOptions:s,themeSettings:w,size:l,onTotalHeightChange:I}),{isLoading:W,isNoResults:A}=xAt({jaql:F,pivotBuilder:U,isForceReload:R}),C=He(T=>{const S=bAt(T,p);k({rows:S})},[p,k]);Je(()=>(U.on(_S,C),()=>{U.off(_S,C)}),[U,C]);const v=He(T=>{(T.width!==(l==null?void 0:l.width)||T.height!==(l==null?void 0:l.height))&&c(T)},[l,c]);return ge(Zh,{defaultSize:pae,size:{width:s==null?void 0:s.width,height:s!=null&&s.isAutoHeight&&!A&&d!=null?d:s==null?void 0:s.height},onSizeChange:v,children:ge(sd,{isVisible:W,children:ot(bn,{children:[A&&ge(Wj,{iconType:"table"}),ge("div",{"aria-label":"pivot-table-root",children:N})]})})})}),HAt=32;function WAt(e){return e?e+HAt:void 0}const VAt=Sn({componentName:"PivotTableWidget"})(e=>{var t;const[n,r]=Ge(0),[o,i]=Ge(),{app:a}=Ln(),{styleOptions:s,dataSource:l=a==null?void 0:a.defaultDataSource,dataOptions:c}=e,d=K2("pivot",{hasHeader:!((t=s==null?void 0:s.header)!=null&&t.hidden)}),h=e.styleOptions||{},{width:u,height:w}=h,y=_n(h,["width","height"]);return c?ge(Zh,{defaultSize:d,size:{width:u,height:s!=null&&s.isAutoHeight?WAt(o):w},children:ge(MT,je(Pe({},e),{dataSetName:l&&Mc(l),onRefresh:()=>r(n+1),children:ge(Qce,{dataSet:e.dataSource,dataOptions:e.dataOptions,styleOptions:y,filters:e.filters,highlights:e.highlights,refreshCounter:n,onHeightChange:i})}))}):null}),UAt=e=>{const t=[],n=r=>{Array.isArray(r)?r.forEach(n):typeof r=="object"&&r!==null&&(r.widgetid&&t.push(r.widgetid),Object.values(r).forEach(n))};return n(e.layout),t},GAt=e=>"levels"in e&&e.isCascading===!0;function YAt(e,t){if(!e)return[];return n(e);function n(r){var o,i;if(M2(r))return[{nodeType:"attribute",attribute:((i=(o=nJe(t,r.instanceid))==null?void 0:o.attribute)==null?void 0:i.name)||r.instanceid}];if(E2(r))return[{nodeType:"openBracket"},...n(r.left),{nodeType:"operator",operator:r.operator},...n(r.right),{nodeType:"closeBracket"}];throw new A2}}function dC(e=[],t=[],n){switch(n){case"widgetFirst":return d_(t,e);case"codeFirst":return d_(e,t);case"codeOnly":return t;default:return d_(e,t)}}var XAt=function(e){return e.FILTER="filter",e.SELECT="select",e}({});function _Y(e){return!!e&&e.min!==null&&e.max!==null}var qAt=function(e){return e.PRE="pre",e.POST="post",e}({});function Jce(e){return"formula"in e}function eue(e){return"formulaRef"in e}var jp=function(e){return e.CLICK="click",e.RIGHT_CLICK="rightclick",e.PIVOT_LINK="pivotlink",e.BLOX="blox",e}({});const ZAt=e=>({columns:(e.columns||[]).map(t=>({widthPercentage:t.width,rows:(t.cells||[]).map(n=>{const r=n.subcells.reduce((o,i)=>o+i.width,0);return{cells:n.subcells.map(o=>({widthPercentage:r<100?o.width/(r/100):o.width,height:o.elements[0].height,widgetId:o.elements[0].widgetid}))}})}))}),KAt=e=>ih(e.jaql,e.instanceid,e.disabled,e.locked),QAt=e=>{const{levels:t,instanceid:n,disabled:r,locked:o}=e,i=t.map(a=>ih(a,a.instanceid));return new i5(i,{guid:n,disabled:r,locked:o})};function JAt(e,t){const n=e.map(o=>GAt(o)?QAt(o):KAt(o));if(!t)return n;const r=ZQe(t,n);return!r||xj(r)?n:Xa(n,r)}const eOt=e=>e.subtype==="WidgetsTabber",tOt=e=>{switch(e){case 1:return jp.RIGHT_CLICK;case 2:return jp.PIVOT_LINK;case 3:return jp.CLICK;case 4:return jp.BLOX}return console.warn(`Unknown navigate type: ${e}, using CLICK instead`),jp.CLICK},nOt=e=>{const t=e.modalWindowMeasurement||yO.PERCENT;return je(Pe({},e),{modalWindowHeight:e.modalWindowHeight||(t===yO.PERCENT?85:800),modalWindowWidth:e.modalWindowWidth||(t===yO.PERCENT?85:1200),enabled:typeof e.enabled=="boolean"?e.enabled:!0,modalWindowMeasurement:t,navigateType:tOt(e.drillToDashboardNavigateType),drillTargets:e.dashboardIds.map(n=>({caption:n.caption,id:n.id||n.oid}))})};function rOt(e=[]){const t={};return e.forEach(n=>{var r,o,i,a;t[n.oid]=Pe({filtersOptions:{applyMode:((r=n.options)==null?void 0:r.dashboardFiltersMode)==="filter"?hb.FILTER:hb.HIGHLIGHT,shouldAffectFilters:(o=n.options)==null?void 0:o.selector,ignoreFilters:{all:(i=n.metadata.ignore)==null?void 0:i.all,ids:(a=n.metadata.ignore)==null?void 0:a.ids},forceApplyBackgroundFilters:!0}},(n==null?void 0:n.drillToDashboardConfig)&&{jtdConfig:nOt(n.drillToDashboardConfig)})}),t}function oOt(e=[]){const t={};return e.forEach(n=>{eOt(n)&&(t[n.oid]={tabs:n.style.tabs||[],activeTab:parseInt(n.style.activeTab||"1",10)})}),t}function iOt(e,t){return Co(this,null,function*(){var n;const r=aOt(e.widgets||[]);if(r.length===0)return e;const o=yield t.getSharedFormulas(r);return je(Pe({},e),{widgets:(n=e.widgets)==null?void 0:n.map(i=>sOt(i,o))})})}function aOt(e){const t=e.flatMap(n=>n.metadata.panels.flatMap(r=>r.items.flatMap(o=>!Jce(o.jaql)||!o.jaql.context?[]:Object.values(o.jaql.context).filter(eue).map(i=>i.formulaRef))));return Array.from(new Set(t))}function sOt(e,t){const n=e.metadata.panels.map(r=>{const o=r.items.map(i=>{const{jaql:a}=i;if(!Jce(a)||!a.context)return i;const s=Object.fromEntries(Object.entries(a.context).map(([l,c])=>eue(c)?[l,t[c.formulaRef]]:[l,c]));return je(Pe({},i),{jaql:je(Pe({},a),{context:s})})});return je(Pe({},r),{items:o})});return je(Pe({},e),{metadata:je(Pe({},e.metadata),{panels:n})})}function tue(e,t){return Co(this,arguments,function*(n,r,o={},i,a){var s,l;const{includeWidgets:c,includeFilters:d,sharedMode:h}=o,u=new Vh(n),w=["oid","title","datasource","style","settings"],y=((s=n.auth)==null?void 0:s.type)==="wat";c&&w.push("layout"),d&&(w.push("filters"),w.push("filterRelations"));const p=yield u.getDashboard(r,{fields:w,sharedMode:h});if(!p)throw new kt("errors.dashboardWithOidNotFound",{dashboardOid:r});if(c){let j;if(y){const F=UAt(p);j=(yield Promise.all(F.map(U=>u.getWidget(U,p.oid)))).filter(U=>U!==void 0)}else j=(yield u.getDashboardWidgets(r,h))||[];p.widgets=j}if((l=p.style)!=null&&l.paletteId&&!p.style.palette){const j=yield u.getPalettes(),F=j==null?void 0:j.find(({_id:U})=>{var H;return U===((H=p.style)==null?void 0:H.paletteId)});F&&(p.style.palette={name:F.name,colors:F.colors})}const k=yield iOt(p,u);return Z4(k,i,a)})}const lOt=(e,t)=>{const n={};for(const r of e){const o=t(r);o in n||(n[o]=r)}return Object.values(n)};function cOt(e){return Co(this,arguments,function*(t,n={}){const{includeWidgets:r,searchByTitle:o}=n,i=new Vh(t),a=[];let s=["oid","title","datasource"];r&&(s=[],a.push("widgets"));const l=yield i.getDashboards({fields:s,expand:a,searchByTitle:o});if(!l)return[];const c=lOt(l,d=>d.oid);return c.length!==l.length&&console.warn("Removing detected duplicate dashboard(s)"),c.map(d=>Z4(d))})}function nue(e){const t=xl(e,["dashboardOid"]),n=Qg(e,t),[r,o]=ls(Hd,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Ln(),{themeSettings:s}=Lt();return Je(()=>{if(i||o({type:"error",error:new kt("errors.sisenseContextNotFound")}),n(a)){o({type:"loading"});const{dashboardOid:l,includeWidgets:c,includeFilters:d,sharedMode:h}=e;tue(a.httpClient,l,{includeWidgets:c,includeFilters:d,sharedMode:h},s,a.settings).then(u=>{o({type:"success",data:u})}).catch(u=>{o({type:"error",error:u})})}},[a,i,e,n,s]),r.data&&t?W3(Hd(r,{type:"loading"})):W3(r)}function W3(e){const t=e,{data:n}=t,r=_n(t,["data"]);return je(Pe({},r),{dashboard:n})}function uOt(e){const t=e,{data:n}=t,r=_n(t,["data"]);return je(Pe({},r),{dashboards:n})}const rue=e=>Co(void 0,[e],function*({widgetOid:t,dashboardOid:n,includeDashboard:r,api:o}){const[i,a]=yield Promise.all([o.getWidget(t,n),r?o.getDashboard(n):void 0]);return{widget:i,dashboard:a}});function dOt(e,t,n,r,o){return Co(this,null,function*(){const i=new Vh(e),{widget:a}=yield rue({widgetOid:n,dashboardOid:t,api:i});if(!a)throw new kt("errors.widgetWithOidNotFound",{widgetOid:n});return B1(a,r,o)})}function pOt(e,t,n){var r;return n(e,function(o,i,a){if(t(o,i,a))return r=i,!1}),r}function hOt(e,t){return pOt(e,Dh(t),GI)}function fOt(e){return e.percent||e.type==="percent"?"Percent":e.currency?"Currency":"Numbers"}function mOt(e){return e.decimals!==void 0&&e.decimals!=="auto"?typeof e.decimals=="string"?Number.parseFloat(e.decimals):e.decimals:"auto"}function gOt(e){var t,n,r,o,i,a,s,l,c;const d=e.jaql.datatype==="numeric"||e.jaql.agg==="count"||"context"in e.jaql,h=(t=e.format)==null?void 0:t.mask;return d&&h?{decimalScale:mOt(h),kilo:(n=h.abbreviations)==null?void 0:n.k,million:(r=h.abbreviations)==null?void 0:r.m,billion:(o=h.abbreviations)==null?void 0:o.b,trillion:(i=h.abbreviations)==null?void 0:i.t,thousandSeparator:(s=(a=h.number)==null?void 0:a.separated)!=null?s:h.separated,prefix:((l=h.currency)==null?void 0:l.position)===qAt.PRE,symbol:(c=h.currency)==null?void 0:c.symbol,name:fOt(h)}:null}const vOt=!0;function yOt(e,t){if(!t||!vOt)return e;const{forecast:n,trend:r}=t;let o=Pe({},e);return n&&!n.isViewerDisabled&&n.isEnabled&&(o=je(Pe({},o),{forecast:{confidenceInterval:n.confidence/100,forecastHorizon:n.forecastPeriod,modelType:"auto"}})),r&&!r.isViewerDisabled&&r.isEnabled&&(o=je(Pe({},o),{trend:{modelType:r.trendType}})),o}const bOt=e=>{var t,n,r,o,i,a,s;return e.jaql&&"level"in e.jaql?(i=(n=(t=e.format)==null?void 0:t.mask)==null?void 0:n[e.jaql.level])!=null?i:(o=(r=e.format)==null?void 0:r.mask)==null?void 0:o.dateAndTime:(s=(a=e.format)==null?void 0:a.mask)==null?void 0:s.dateAndTime};function wh(e,t){var n,r,o,i,a,s,l,c;const d=qb(e.jaql,bOt(e),e.panel),h=gm((n=e.jaql.sort)!=null?n:e.categoriesSorting),u=gOt(e),w=(r=e.format)==null?void 0:r.subtotal,y=(o=e.format)==null?void 0:o.width;let p=s_((i=e.format)==null?void 0:i.color,t);const k=s_((a=e.format)==null?void 0:a.colorSecond,t),j=e.panel==="columns"&&e.panel;if(!p&&!((s=e.format)!=null&&s.color)&&e.format&&"colorIndex"in e.format&&(p=s_({type:"color",colorIndex:e.format.colorIndex},t)),zt.isMeasure(d)){const F=e.y2,U=e.singleSeriesType,H="subtotalAgg"in e.jaql&&e.jaql.subtotalAgg,R=(l=e.format)==null?void 0:l.databars,z=Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe({column:d},p&&{color:p}),k&&{dataBarsColor:k}),F&&{showOnRightAxis:F}),h&&{sortType:h}),U&&{chartType:U}),u&&{numberFormatConfig:u}),H&&{totalsCalculation:H}),R&&{dataBars:R}),y&&{width:y}),j&&{panel:j});return yOt(z,e.statisticalModels)}return Pe(Pe(Pe(Pe(Pe(Pe({column:d,isColored:(c=e.isColored)!=null?c:!1},h&&{sortType:h}),u&&{numberFormatConfig:u}),w&&{includeSubTotals:w}),y&&{width:y}),p&&{color:p}),j&&{panel:j})}function Vc(e){const t=e.column;let n;if(zt.isAttribute(t))n=t.jaql(!0);else if(zt.isMeasure(t))n=t.jaql(!0);else throw new kt("errors.unsupportedDimensionalElement");return n.jaql?n:{jaql:n}}const xOt=(e,t)=>{const n={};return e.forEach(r=>{r.name!=="filters"&&(n[ace(r.name)]=co(e,r.name,t))}),n};function V3(e,t,n){return ei(e,t).map(y2).map(n)}function co(e,t,n){return V3(e,t,r=>wh(r,n))}function wOt(e,t,n){var r,o;const i=["chart/line","chart/area"].includes(t)?"x-axis":"categories",a=co(e,i,n),s=co(e,"values",n),l=co(e,"break by",n),c=(o=(r=ei(e,"break by")[0])==null?void 0:r.format)==null?void 0:o.members,d=c&&b2(c);return Pe({category:a,value:s,breakBy:l},d&&{seriesToColorMap:d})}function _Ot(e,t,n){var r,o,i,a;const s=co(t,"categories",n),l=co(t,"values",n),c=co(t,"size",n);let d,h;return e==="sunburst"?h=lXe(ei(t,"categories")):(d=(o=(r=ei(t,"categories")[0])==null?void 0:r.format)==null?void 0:o.members,ei(t,"color").length&&(d=(a=(i=ei(t,"color")[0])==null?void 0:i.format)==null?void 0:a.members),h=d&&b2(d)),Pe({category:s,value:[...l,...c]},h&&{seriesToColorMap:h})}function SOt(e,t){var n,r;const[o]=co(e,"x-axis",t),[i]=co(e,"y-axis",t),[a]=co(e,"point",t),[s]=co(e,"Break By / Color",t),[l]=co(e,"size",t),c=(r=(n=ei(e,"Break By / Color")[0])==null?void 0:n.format)==null?void 0:r.members,d=c&&b2(c);return Pe({x:o,y:i,breakByPoint:a,breakByColor:s,size:l},d&&{seriesToColorMap:d})}function COt(e,t){const n=co(e,"value",t),r=co(e,"secondary",t),o=co(e,"min",t),i=co(e,"max",t);return{value:n,secondary:r,min:o,max:i}}function kOt(e,t){return{columns:co(e,"columns",t)}}function TOt(e,t,n){let r;const o={},i=co(e,"columns",n),a=V3(e,"values",(s,l)=>{var c,d,h,u,w;const{field:y,jaql:p}=s,{sortDetails:k}=p;k&&(r=k),y&&(o[y.index]=l),((d=(c=s.format)==null?void 0:c.color)==null?void 0:d.type)==="color"&&!((u=(h=s.format)==null?void 0:h.color)!=null&&u.color)&&delete s.format.color;const j=wh(s,n);return typeof j.color!="string"&&((w=j.color)==null?void 0:w.type)==="conditional"&&delete j.color.defaultColor,j});return{rows:V3(e,"rows",(s,l,c)=>{var d;const h=l===c.length-1;let{sortDetails:u}=s==null?void 0:s.jaql;const w=wh(s,n);w.column&&zt.isAttribute(w.column)&&(w.column=w.column.sort(Zn.None)),h&&r&&(u=r);const y=(u==null?void 0:u.field)!==((d=s.field)==null?void 0:d.index);return u&&(w.sortType=Pe({direction:gm(u.dir)},y&&{by:{valuesIndex:o[u.field],columnsMembersPath:Object.values(u.measurePath||{})}})),w}),columns:i,values:a,grandTotals:{rows:t.rowsGrandTotal,columns:t.columnsGrandTotal}}}function MOt(e){const t={"whisker/iqr":"iqr","whisker/extremums":"extremums","whisker/deviation":"standardDeviation"},n=hOt(e.whisker,r=>r);return t[n]}function EOt(e,t,n){const r=co(e,"category",n),o=co(e,"value",n),i=MOt(t),a=t.outliers.enabled;return{category:r,value:o,boxType:i,outliersEnabled:a}}function AOt(e,t){return ei(e,"geo").map(y2).map(n=>{const r=wh(n,t);return"geoLevel"in n?je(Pe({},r),{level:n.geoLevel}):r})}function OOt(e,t){const n=AOt(e,t),r=co(e,"size",t)[0],o=co(e,"color",t)[0],i=co(e,"details",t)[0];return{geo:n,size:r,colorBy:o,details:i}}function POt(e,t){const n=[co(e,"geo",t)[0]],r=co(e,"color",t)[0];return Pe({geo:n},r&&{color:[r]})}function U3(e,t){const n="dim"in e.jaql?je(Pe({},e),{jaql:je(Pe({},e.jaql),{datasource:t})}):e,r=e.parent?U3(e.parent,t):void 0,o=e.through?U3(e.through,t):void 0;return je(Pe({},n),{parent:r,through:o})}function DOt(e,t){return e.map(n=>je(Pe({},n),{items:n.items.map(r=>U3(r,t))}))}function LOt(e,t,n,r){if(NOt(e))return wOt(t,e,r);if(IOt(e))return _Ot(e,t,r);if(e==="chart/scatter")return SOt(t,r);if(e==="indicator")return COt(t,r);if(MYe(e))return kOt(t,r);if(QR(e))return TOt(t,n,r);if(e==="chart/boxplot")return EOt(t,n,r);if(e==="map/scatter")return OOt(t,r);if(e==="map/area")return POt(t,r);if(e==="richtexteditor")return{};throw new kt("errors.unsupportedWidgetType",{widgetType:e})}function NOt(e){return["chart/line","chart/area","chart/bar","chart/column","chart/polar"].includes(e)}function IOt(e){return["chart/pie","chart/funnel","treemap","sunburst"].includes(e)}function tf(e,t){const n=_re(e);return Pe(Pe({},t),n&&{subtype:n})}function iu(e){const{min:t,max:n}=e||{};return je(Pe({},e),{min:typeof t=="number"?t:null,max:typeof n=="number"?n:null})}function ROt(e,t,n){var r,o,i,a,s,l,c,d,h,u;const w={xAxis:iu(t.xAxis),yAxis:iu(t.yAxis),y2Axis:iu(t.y2Axis)},y=["chart/line","chart/area"].includes(e)?"x-axis":"categories",p=ei(n,y),k=ei(n,"values"),j=p.length===2;j&&(w.xAxis=je(Pe({},w.xAxis),{title:(r=w.xAxis)==null?void 0:r.x2Title,x2Title:(o=w.xAxis)==null?void 0:o.title}));const F=!!((i=w.xAxis)!=null&&i.title&&"text"in w.xAxis.title),U=p[p.length-1];!F&&U&&(w.xAxis=je(Pe({},w.xAxis),{title:je(Pe({},(a=w.xAxis)==null?void 0:a.title),{text:U.jaql.title})}));const H=!!((s=w.xAxis)!=null&&s.x2Title&&"text"in w.xAxis.x2Title),R=p[0];!H&&j&&(w.xAxis=je(Pe({},w.xAxis),{x2Title:je(Pe({},(l=w.xAxis)==null?void 0:l.x2Title),{text:R.jaql.title})}));const z=!!((c=w.yAxis)!=null&&c.title&&"text"in w.yAxis.title),I=k.filter(A=>!A.y2);!z&&I.length===1&&(w.yAxis=je(Pe({},w.yAxis),{title:je(Pe({},(d=w.yAxis)==null?void 0:d.title),{text:I[0].jaql.title})}));const N=!!((h=w.y2Axis)!=null&&h.title&&"text"in w.y2Axis.title),W=k.filter(A=>A.y2);return!N&&W.length===1&&(w.y2Axis=je(Pe({},w.y2Axis),{title:je(Pe({},(u=w.y2Axis)==null?void 0:u.title),{text:W[0].jaql.title})})),w}function jOt(e,t){var n,r;const o={xAxis:iu(e.categories),yAxis:iu(e.axis)},i=ei(t,"categories")[0];return!((n=o.xAxis)!=null&&n.title&&"text"in o.xAxis.title)&&i&&(o.xAxis=je(Pe({},o.xAxis),{title:je(Pe({},(r=o.xAxis)==null?void 0:r.title),{text:i.jaql.title})})),o.yAxis=je(Pe({},o.yAxis),{title:{enabled:!1}}),o}function zOt(e,t){var n,r,o,i;const a={xAxis:iu(e.xAxis),yAxis:iu(e.yAxis)},s=ei(t,"x-axis")[0],l=ei(t,"y-axis")[0];return!((n=a.xAxis)!=null&&n.title&&"text"in a.xAxis.title)&&s&&(a.xAxis=je(Pe({},a.xAxis),{title:je(Pe({},(r=a.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((o=a.yAxis)!=null&&o.title&&"text"in a.yAxis.title)&&l&&(a.yAxis=je(Pe({},a.yAxis),{title:je(Pe({},(i=a.yAxis)==null?void 0:i.title),{text:l.jaql.title})})),a}function BOt(e,t){var n,r,o,i;const a={xAxis:iu(e.xAxis),yAxis:iu(e.yAxis)},s=ei(t,"category")[0],l=ei(t,"value")[0];return!((n=a.xAxis)!=null&&n.title&&"text"in a.xAxis.title)&&s&&(a.xAxis=je(Pe({},a.xAxis),{title:je(Pe({},(r=a.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((o=a.yAxis)!=null&&o.title&&"text"in a.yAxis.title)&&l&&(a.yAxis=je(Pe({},a.yAxis),{title:je(Pe({},(i=a.yAxis)==null?void 0:i.title),{text:l.jaql.title})})),a}function $Ot(e,t){var n,r,o,i,a,s,l,c,d,h,u,w,y,p,k,j,F,U,H,R,z;const I=((n=t.seriesLabels)==null?void 0:n.enabled)&&((i=(o=(r=t.seriesLabels)==null?void 0:r.labels)==null?void 0:o.types)==null?void 0:i.totals),N=e==="area/stacked"||e==="area/stackedspline"||e==="column/stackedcolumn"||e==="bar/stacked",W=e==="area/stacked100"||e==="area/stackedspline100"||e==="column/stackedcolumn100"||e==="bar/stacked100";let A=(s=(a=t.seriesLabels)==null?void 0:a.enabled)!=null?s:!1;return(N||W)&&(A=!!(N&&(d=(c=(l=t.seriesLabels)==null?void 0:l.labels)==null?void 0:c.types)!=null&&d.relative||W&&(w=(u=(h=t.seriesLabels)==null?void 0:h.labels)==null?void 0:u.types)!=null&&w.count)),je(Pe({},I&&{totalLabels:{enabled:I,rotation:(p=(y=t.seriesLabels)==null?void 0:y.rotation)!=null?p:0}}),{seriesLabels:{enabled:(j=(k=t.seriesLabels)==null?void 0:k.enabled)!=null?j:!1,rotation:(U=(F=t.seriesLabels)==null?void 0:F.rotation)!=null?U:0,showValue:A,showPercentage:!!(W&&(z=(R=(H=t.seriesLabels)==null?void 0:H.labels)==null?void 0:R.types)!=null&&z.percentage)}})}function FOt(e,t,n,r){return je(Pe(Pe(Pe({},tf(t,n)),ROt(e,n,r)),$Ot(t,n)),{lineWidth:n.lineWidth,markers:n.markers})}function HOt(e,t,n){return Pe(Pe({},tf(e,t)),jOt(t,n))}function WOt(e,t,n){var r,o,i;return je(Pe(Pe({},tf(e,t)),zOt(t,n)),{markerSize:{scatterDefaultSize:(r=t.markerSize)==null?void 0:r.defaultSize,scatterBubbleMinSize:(o=t.markerSize)==null?void 0:o.min,scatterBubbleMaxSize:(i=t.markerSize)==null?void 0:i.max}})}function VOt(e){return{header:{color:{enabled:e["colors/headers"]}},rows:{alternatingColor:{enabled:e["colors/rows"]}},columns:{alternatingColor:{enabled:e["colors/columns"]}}}}function UOt(e,t){return je(Pe({},tf(e,t)),{funnelSize:t.size,funnelType:t.type,funnelDirection:t.direction,labels:t.labels,legend:t.legend})}const GOt=(e,t)=>{const n=_re(e);return n==="indicator/gauge"?{subtype:n,skin:+t.skin}:t.subtype==="bar"?{subtype:n,numericSubtype:"numericBar"}:{subtype:n,numericSubtype:"numericSimple",skin:t.skin}};function YOt(e,t,n){var r,o,i,a,s,l,c,d;const h=GOt(e,t),u=(r=ei(n,"value")[0])==null?void 0:r.jaql.title,w=(o=ei(n,"secondary")[0])==null?void 0:o.jaql.title;return je(Pe({},h),{indicatorComponents:{title:{shouldBeShown:((a=(i=t.components)==null?void 0:i.title)==null?void 0:a.enabled)||!1,text:u},secondaryTitle:{text:w||""},ticks:{shouldBeShown:((l=(s=t.components)==null?void 0:s.ticks)==null?void 0:l.enabled)||!1},labels:{shouldBeShown:((d=(c=t.components)==null?void 0:c.labels)==null?void 0:d.enabled)||!1}}})}function XOt(e){var t,n,r,o;return{labels:{category:[{enabled:(t=e["title/1"])!=null?t:!0},{enabled:(n=e["title/2"])!=null?n:!0},{enabled:(r=e["title/3"])!=null?r:!0}]},tooltip:{mode:(o=e["tooltip/value"])==null||o?"value":"contribution"}}}function qOt(e){var t;return{legend:{enabled:e["legend/enabled"],position:e["legend/position"]},tooltip:{mode:(t=e["tooltip/value"])==null||t?"value":"contribution"}}}function ZOt(e,t,n){return Pe(Pe({},tf(e,t)),BOt(t,n))}function KOt(e,t){return je(Pe({},tf(e,t)),{markers:{fill:t.markers.fill,size:{defaultSize:t.markers.size.defaultSize,minSize:t.markers.size.min,maxSize:t.markers.size.max}}})}function QOt(e){let t;switch(e){case"areamap/world":t="world";break;case"areamap/usa":t="usa";break;default:throw new kt("errors.unsupportedWidgetType",{widgetSubtype:e})}return{mapType:t}}function JOt(e){var t,n,r,o,i;return{rowsPerPage:parseInt(`${e.pageSize}`),isAutoHeight:e.automaticHeight,rowHeight:e.rowHeight,alternatingRowsColor:(t=e.colors)==null?void 0:t.rows,alternatingColumnsColor:(n=e.colors)==null?void 0:n.columns,headersColor:(r=e.colors)==null?void 0:r.headers,membersColor:(o=e.colors)==null?void 0:o.members,totalsColor:(i=e.colors)==null?void 0:i.totals}}function ePt(e,t){var n,r,o;const{subtype:i,style:a,metadata:{panels:s}}=t;switch(e){case"chart/line":case"chart/area":case"chart/bar":case"chart/column":{const l=FOt(e,i,a,s);if(l.navigator){const c=(n=t.options)==null?void 0:n.previousScrollerLocation;l.navigator.scrollerLocation=_Y(c)?c:void 0}return l}case"chart/polar":return HOt(i,a,s);case"chart/scatter":return WOt(i,a,s);case"chart/funnel":return UOt(i,a);case"treemap":return XOt(a);case"sunburst":return qOt(a);case"chart/pie":return tf(i,a);case"tablewidget":case"tablewidgetagg":return VOt(a);case"pivot":case"pivot2":return JOt(a);case"indicator":return YOt(i,a,s);case"chart/boxplot":{const l=ZOt(i,a,s);return l.navigator&&(l.navigator.scrollerLocation=_Y((r=t.options)==null?void 0:r.previousScrollerLocation)?(o=t.options)==null?void 0:o.previousScrollerLocation:void 0),l}case"map/scatter":return KOt(i,a);case"map/area":return QOt(i);case"richtexteditor":return a.content;default:throw new kt("errors.unsupportedWidgetType",{widgetType:e})}}const oue=e=>({backgroundColor:e.widgetBackgroundColor,spaceAround:ad[e.widgetSpacing],cornerRadius:ad[e.widgetCornerRadius],shadow:ad[e.widgetShadow],border:e.widgetBorderEnabled,borderColor:e.widgetBorderColor,header:{titleTextColor:e.widgetTitleColor,titleAlignment:ad[e.widgetTitleAlignment],dividerLine:e.widgetTitleDividerEnabled,dividerLineColor:e.widgetTitleDividerColor,backgroundColor:e.widgetTitleBackgroundColor}});function tPt(e,t,n){if(!t||!n)return e;const r=oue(t);return Pe(Pe({},e),r)}function nPt(e,t){return e&&e.length?Yj(e,Dh(t)):[]}function rPt(e,t){var n;const r=(n=e==null?void 0:e.findIndex(o=>o===t))!=null?n:-1;return r===-1?[]:e.slice(r)}const iue=e=>e!=null&&e.parent?[...iue(e.parent),wh(e).column]:[],aue=e=>{var t,n,r;if(e!=null&&e.parent&&e.through&&"filter"in e.through.jaql){const o=wh(e).column,{jaql:i,format:{mask:a}={}}=e.parent,s="level"in i&&i.level&&a&&a[i.level],l=(r=(n=(t=e.through.jaql.filter)==null?void 0:t.members)==null?void 0:n.map(s?c=>({categoryValue:c,categoryDisplayValue:np(c1(c),s)}):c=>({categoryValue:c})))!=null?r:[];return[...aue(e.parent),{nextDimension:o,points:l}]}return[]};function oPt(e){switch(e){case"chart/line":case"chart/area":return["x-axis"];case"chart/boxplot":return["category"];case"chart/scatter":return["x-axis","y-axis","point","Break By / Color"];default:return["categories"]}}const iPt=(e,t)=>{const n=oPt(e).map(r=>ei(t,r)).flat().filter(r=>{const o="agg"in r.jaql&&r.jaql.agg,i="formula"in r.jaql&&r.jaql.formula;return!o&&!i});return n.length===1?n[0]:void 0},sue="calendar",lue="calendar - weeks",aPt=[nt.Years,nt.Quarters,nt.Months,nt.Days],sPt=[nt.Years,nt.Weeks,nt.Days],lPt=[nt.Years,nt.Quarters,nt.Months,nt.Weeks,nt.Days],cPt=e=>e.length===2?lPt:e[0]===sue?aPt:e[0]===lue?sPt:[],uPt=(e,t)=>{const[n=[],r]=N1(e,i=>[sue,lue].includes(i)),o=rPt(cPt(n),t.granularity);return o.length?[{title:"Calendar Hierarchy",levels:o.map(i=>new oo(`${i} in ${t.name}`,t.expression,i,oo.getDefaultFormatForGranularity(i)))},...r]:r},dPt=e=>{const t=e&&wh(e),n=(e==null?void 0:e.hierarchies)||[];return t&&Di(t.column.type)?(t.column.name=(e==null?void 0:e.jaql).column,uPt(n,t.column)):n},pPt=(e,t,n=[],r)=>{const o=iPt(e,t),i=o&&y2(o),a=aue(o),s=dPt(i);return{drilldownPaths:[...nPt([...o?iue(o):[]],({expression:l})=>l),...s],drilldownSelections:a}};function X4(e){const t=e.filter,{filter:n}=t,r=_n(t,["filter"]),o=n&&"turnedOff"in n&&n.turnedOff;let i,a;return o?a=n:i=n,r.members&&r.members.length===0&&(r.all=!0),{filter:r,backgroundFilter:i,turnOffMembersFilter:a}}function hPt(e){const{filter:t,backgroundFilter:n,turnOffMembersFilter:r}=X4(e.jaql),o=[je(Pe({},e),{jaql:je(Pe({},e.jaql),{filter:Pe(Pe({},t),r&&{filter:r})})})];return n&&o.push(je(Pe({},e),{jaql:je(Pe({},e.jaql),{filter:n}),disabled:!1})),o}function fPt(e){const t=e.find(r=>r.name==="filters"),n=[];return t==null||t.items.forEach(r=>{n.push(...hPt(r).filter(({disabled:o})=>!o))}),n}function mPt(e){return fPt(e).map(t=>ih(t.jaql,t.instanceid))}function cue(e){if(ip(e.widgetType))throw new q4("toExecuteQueryParams");let t,n,r,o;if(m2(e)){const{attributes:i,measures:a}=Xj(gae(e.dataOptions));t=i,n=a,r=xle*wle+1,o=!0}else{const{attributes:i,measures:a}=yae(e.dataOptions,e.chartType);t=i,n=a}return{dataSource:e.dataSource,dimensions:t,measures:n,filters:e.filters,highlights:e.highlights,count:r,ungroup:o}}function uue(e){if(!ip(e.widgetType))throw new kt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toExecutePivotQueryParams"});const{rows:t,columns:n,values:r,grandTotals:o}=Kce(vae(e.dataOptions));return{dataSource:e.dataSource,rows:t,columns:n,values:r,grandTotals:o,filters:e.filters,highlights:e.highlights}}function gPt(e){if(ip(e.widgetType))throw new q4("toChartProps");if(g2(e.widgetType))throw new wue("toChartProps");return m2(e)?Pe({chartType:e.chartType},due(e)):{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function due(e){if(!m2(e))throw new kt("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters}}function vPt(e){if(!ip(e.widgetType))throw new kt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function pue(e){if(ip(e.widgetType))throw new q4("toChartWidgetProps");if(g2(e.widgetType))throw new wue("toChartWidgetProps");return{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||"",drilldownOptions:e.drilldownOptions}}function yPt(e){if(!m2(e))throw new kt("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,title:e.title,description:e.description||""}}function hue(e){if(!ip(e.widgetType))throw new kt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function fue(e){if(!g2(e.widgetType))throw new kt("errors.widgetModel.onlyTextWidgetSupported",{methodName:"toTextWidgetProps"});return{styleOptions:e.styleOptions}}function mue(e){if(!Cre(e.widgetType))throw new kt("errors.widgetModel.onlyCustomWidgetSupported",{methodName:"toCustomWidgetProps"});return{customWidgetType:e.customWidgetType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function gue(e){const{widgetType:t}=e;return ip(t)?Pe({widgetType:"pivot"},hue(e)):g2(t)?Pe({widgetType:"text"},fue(e)):Cre(t)?Pe({widgetType:"custom"},mue(e)):Pe({widgetType:"chart"},pue(e))}function vue(e){const{oid:t}=e;return je(Pe({},gue(e)),{id:t})}const yue={oid:"",title:"",dataSource:"",description:"",widgetType:"custom",customWidgetType:"",dataOptions:{},styleOptions:{},drilldownOptions:{},filters:[],highlights:[],chartType:void 0};function B1(e,t,n){var r,o,i,a;let s,l,c,d;const h=DOt(e.metadata.panels,e.datasource);if(s=e.type,TYe(s)){c=LOt(s,h,e.style,t==null?void 0:t.palette.variantColors),d=ePt(s,e);const p=(a=(i=(o=n==null?void 0:n.serverFeatures)==null?void 0:o.widgetDesignStyle)==null?void 0:i.active)!=null?a:!0;d=tPt(d,e.style.widgetDesign,p)}else{l=s,s="custom",c=xOt(h,(r=t==null?void 0:t.palette.variantColors)!=null?r:[]);const p=e.style,{widgetDesign:k}=p,j=_n(p,["widgetDesign"]);d=Pe(Pe({},j),k?oue(k):{})}const u=pPt(s,h),w=mPt(h),y=kre(s)?_Ye(s):void 0;return je(Pe({},yue),{oid:e.oid,title:e.title,dataSource:Xb(e.datasource),description:e.desc||"",widgetType:kYe(s),chartType:y,customWidgetType:l||"",dataOptions:c||{},styleOptions:d||{},drilldownOptions:u,filters:w})}function bue(e){return je(Pe(Pe({},yue),e),{filters:e.filters||[],widgetType:"chart"})}function bPt(e){if(wu(e))return bue(e);throw new kt("errors.otherWidgetTypesNotSupported")}function xue(e,t){const n=t||e.dataSource;if(typeof n=="string")throw new SY("dataSource");if(!n.id||!n.live&&!n.address)throw new SY("dataSource");const r=e.chartType;let o=CYe(e.widgetType,r),i={},a=e.styleOptions.subtype||"";if(!r)throw new Error("Chart type is required");const s=[];if(El(r)){const c=["chart/line","chart/area"].includes(o)?"x-axis":"categories",d=e.dataOptions.category.map(y=>Vc(pi(y))),h={name:c,items:d};s.push(h);const u=e.dataOptions.value.map(y=>Vc(mo(y)));s.push({name:"values",items:u});const w=e.dataOptions.breakBy.map(y=>Vc(pi(y)));s.push({name:"break by",items:w}),r==="polar"?a="column/polar":r==="bar"?a=a||"bar/classic":r==="column"?a=a||"column/classic":r==="area"?a=a||"area/basic":r==="line"&&(a=a||"line/basic")}else if(YR(r)){const{attributes:c,measures:d}=Xj(e.dataOptions),h=[...c.map(u=>Vc(pi(u))),...d.map(u=>Vc(mo(u)))];s.push({name:"columns",items:h}),o="tablewidget"}else if(Bg(r))["value","min","max","secondary"].forEach(c=>{const d=(e.dataOptions[c]||[]).map(h=>Vc(mo(h)));s.push({name:c,items:d})}),a=a||"indicator/numeric",i=je(Pe({},a==="indicator/gauge"?{subtype:"round",skin:"1"}:{subtype:"simple",skin:"vertical"}),{components:{ticks:{inactive:!1,enabled:!0},labels:{inactive:!1,enabled:!0},title:{inactive:!1,enabled:!0},secondaryTitle:{inactive:!0,enabled:!0}}});else if(rp(r)){const c=e.dataOptions.category.map(u=>Vc(nu(u)));s.push({name:"categories",items:c});const d=e.dataOptions.value.map(u=>Vc(nu(u))),h=r==="treemap";s.push({name:h?"size":"values",items:d}),h&&["color","values"].forEach(u=>{s.push({name:u,items:[]})}),r==="pie"?(a=a||"pie/basic",i={convolution:{enabled:!0,selectedConvolutionType:"bySlicesCount",minimalIndependentSlicePercentage:3,independentSlicesCount:7}}):r==="treemap"||r==="sunburst"?a=a||r:r==="funnel"&&(a=a||"chart/funnel")}else if(vl(r))["x","y","size","breakByColor","breakByPoint"].forEach(c=>{if(e.dataOptions[c]){const d={breakByColor:"Break By / Color",breakByPoint:"point",x:"x-axis",y:"y-axis"},h=[Vc(nu(e.dataOptions[c]))];s.push({name:d[c]||c,items:h})}}),a=a||"bubble/scatter";else throw new xPt(r);const l=(e.filters||[]).map(c=>c.jaql());return s.push({name:"filters",items:l}),{oid:e.oid||"",title:e.title,desc:e.description,datasource:n,type:o,metadata:{panels:s},style:i,subtype:a}}class SY extends kt{constructor(t){super("errors.widgetModel.incomleteWidget",{prop:t})}}class xPt extends kt{constructor(t){super("errors.widgetModel.unsupportedWidgetTypeDto",{chartType:t})}}class q4 extends kt{constructor(t){super("errors.widgetModel.pivotWidgetNotSupported",{methodName:t})}}class wue extends kt{constructor(t){super("errors.widgetModel.textWidgetNotSupported",{methodName:t})}}const wPt=Object.freeze(Object.defineProperty({__proto__:null,fromChartWidgetProps:bue,fromWidgetDto:B1,fromWidgetProps:bPt,toChartProps:gPt,toChartWidgetProps:pue,toCommonWidgetProps:gue,toCustomWidgetProps:mue,toExecutePivotQueryParams:uue,toExecuteQueryParams:cue,toPivotTableProps:vPt,toPivotTableWidgetProps:hue,toTableProps:due,toTableWidgetProps:yPt,toTextWidgetProps:fue,toWidgetDto:xue,toWidgetProps:vue},Symbol.toStringTag,{value:"Module"}));function FT(e){const{title:t,dataSource:n,widgets:r,layoutOptions:o,filters:i,widgetsOptions:a,tabbersOptions:s,styleOptions:l}=e;return{title:t,defaultDataSource:n,widgets:r.map(vue),layoutOptions:o,config:{},filters:i,widgetsOptions:a,styleOptions:l,tabbersOptions:s}}function Z4(e,t,n){var r;const{oid:o,title:i,datasource:a,widgets:s,layout:l,filters:c,filterRelations:d,style:h,settings:u}=e,w=Xb(a),y=Pe({},h!=null&&h.palette?{palette:{variantColors:h==null?void 0:h.palette.colors}}:null),p=t&&Pe(Pe({},t),y.palette?{palette:y.palette}:null),k=(s==null?void 0:s.map(z=>B1(z,p,n)))||[],j=l?ZAt(l):{columns:[]},F=(r=d==null?void 0:d[0])==null?void 0:r.filterRelations,U=JAt(c||[],F),H=rOt(s),R=oOt(s);return{oid:o,title:i,dataSource:w,styleOptions:y,widgets:k,layoutOptions:{widgetsPanel:j},filters:U,widgetsOptions:H,tabbersOptions:R,settings:u}}const _Pt=Object.freeze(Object.defineProperty({__proto__:null,fromDashboardDto:Z4,toDashboardProps:FT},Symbol.toStringTag,{value:"Module"}));function SPt(e){return ui(e)?CPt(e):K4(e)}function K4(e){return Pi(e)?kPt(e):Gb(e)?TPt(e):Q4(e)}function CPt(e){return{isCascading:!0,instanceid:e.config.guid,disabled:e.config.disabled,levels:e.filters.map(t=>{const n=K4(t);return je(Pe({},n.jaql),{instanceid:n.instanceid})})}}function Q4(e){const{config:{disabled:t}}=e,n=Object.assign(Object.create(e),{config:je(Pe({},e.config),{disabled:!1})}).jaql(!0);return{jaql:je(Pe({},n),{table:y5(e.attribute),column:rk(e.attribute)}),disabled:t,instanceid:e.config.guid,isCascading:!1}}function kPt(e){const t=Q4(e);return t.jaql.filter.multiSelection=e.config.enableMultiSelection,e.config.deactivatedMembers.length>0&&(e.config.excludeMembers?t.jaql.filter.exclude.members=[...e.members,...e.config.deactivatedMembers]:t.jaql.filter.members=[...e.members,...e.config.deactivatedMembers]),e.config.backgroundFilter&&G3(t.jaql,K4(e.config.backgroundFilter).jaql.filter),e.config.deactivatedMembers.length>0&&G3(t.jaql,{exclude:{members:e.config.deactivatedMembers},turnedOff:!0}),t}function TPt(e){const t=Q4(e);if(e.measure instanceof Ub){const n=t.jaql.filter;n.by.table=y5(e.measure.attribute),n.by.column=rk(e.measure.attribute),n.rankingMessage=e.measure.name}return t}function G3(e,t){if(e.filter)return G3(e.filter,t);e.filter=t}function CY(e){const t="500px";return{columns:e.columns.map(n=>({width:n.widthPercentage,cells:n.rows.map(r=>({subcells:r.cells.map(o=>{var i;return{width:o.widthPercentage,elements:[{widgetid:o.widgetId,height:(i=o.height)!=null?i:t}]}})}))}))}}var JO=function(e){return e.DASHBOARD_INIT="DASHBOARD.INIT",e.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE="UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE",e}({}),pC=function(e){return e.FILTERS_UPDATE="FILTERS.UPDATE",e.ADD_WIDGET="WIDGETS.ADD",e.WIDGETS_PANEL_LAYOUT_UPDATE="WIDGETS_PANEL_LAYOUT.UPDATE",e.WIDGETS_DELETE="WIDGETS.DELETE",e}({});function MPt(e,t){var n,r;switch(t.type){case"DASHBOARD.INIT":return Pe(Pe({},e),t.payload);case"FILTERS.UPDATE":return je(Pe({},e),{filters:t.payload});case"WIDGETS_PANEL_LAYOUT.UPDATE":return je(Pe({},e),{layoutOptions:je(Pe({},e.layoutOptions),{widgetsPanel:t.payload})});case"WIDGETS.DELETE":return je(Pe({},e),{widgets:e.widgets.filter(o=>!t.payload.includes(o.oid))});case"UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE":return je(Pe({},e),{layoutOptions:je(Pe({},e.layoutOptions),{widgetsPanel:t.payload.widgetsPanel}),widgets:e.widgets.filter(o=>!t.payload.widgets.includes(o.oid))});case"WIDGETS.ADD":{const o=[...e.widgets,t.payload],i=[...((r=(n=e==null?void 0:e.layoutOptions)==null?void 0:n.widgetsPanel)==null?void 0:r.columns)||[]];return i[0]&&(i[0].rows.length||i[0].rows.push({cells:[]}),i[0].rows[0].cells.push({widgetId:t.payload.oid,widthPercentage:100})),je(Pe(Pe({},e),e!=null&&e.layoutOptions.widgetsPanel?{layoutOptions:je(Pe({},e==null?void 0:e.layoutOptions),{widgetsPanel:je(Pe({},e==null?void 0:e.layoutOptions.widgetsPanel),{columns:i})})}:null),{widgets:o})}default:return e}}function EPt(e){const{filters:t,relations:n}=yl(e),r=t.map(SPt),o=tJe(n,t),i=OPt(t);return{filters:r,filterRelations:o?[{datasource:i,filterRelations:o}]:void 0}}function APt(e,t,n,r){return Co(this,null,function*(){if(!e)throw new Error("Dashboard model is not initialized");switch(t.type){case"FILTERS.UPDATE":yield n.patchDashboard(e,EPt(t.payload));break;case"WIDGETS.ADD":{const o=yield n.addWidgetToDashboard(e,xue(t.payload),r);if(!o)throw new Error("Failed to add widget to dashboard");return{type:"WIDGETS.ADD",payload:B1(o)}}case"WIDGETS_PANEL_LAYOUT.UPDATE":yield n.patchDashboard(e,{layout:CY(t.payload)},r);break;case"WIDGETS.DELETE":yield Promise.all(t.payload.map(o=>n.deleteWidgetFromDashboard(e,o,r)));break;case"UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE":yield n.patchDashboard(e,{layout:CY(t.payload.widgetsPanel)},r),yield Promise.all(t.payload.widgets.map(o=>n.deleteWidgetFromDashboard(e,o,r)));break}return t})}function OPt(e){const t=new Set(e.map(n=>{var r;return(r=n.dataSource)==null?void 0:r.title}));if(t.size>1)throw new Error("Persisting filters from multiple datasources is not supported now");return t.values().next().value}function PPt(e){return e.type===pm.FILTERS_UPDATE?{type:pC.FILTERS_UPDATE,payload:e.payload}:e.type===pm.WIDGETS_PANEL_LAYOUT_UPDATE?{type:pC.WIDGETS_PANEL_LAYOUT_UPDATE,payload:e.payload}:null}function DPt(e,t){return e==="wat"?(t&&console.warn('WAT authentication does not support persistence. The changes will not be saved. Set "persist" flag to false to avoid this warning.'),!1):!0}var Wa=function(e){return e.PLACE_LEFT="PLACE_LEFT",e.PLACE_RIGHT="PLACE_RIGHT",e.SWAP="SWAP",e.NEW_ROW="NEW_ROW",e}({});function LPt(e,t,n,r){return je(Pe({},e),{columns:e.columns.map((o,i)=>i===n?je(Pe({},o),{rows:o.rows.map((a,s)=>s===r?je(Pe({},a),{cells:a.cells.map(l=>je(Pe({},l),{height:t}))}):a)}):o)})}function kY(e,t,n,r){return!Id(n)&&!Id(r)?e.columns[n].rows[r].cells.length!==t.length?e:je(Pe({},e),{columns:e.columns.map((o,i)=>i===n?je(Pe({},o),{rows:o.rows.map((a,s)=>s===r?je(Pe({},a),{cells:a.cells.map((l,c)=>je(Pe({},l),{widthPercentage:t[c]}))}):a)}):o)}):e.columns.length!==t.length?e:je(Pe({},e),{columns:e.columns.map((o,i)=>je(Pe({},o),{widthPercentage:t[i]}))})}function NPt(e,t,n){let r=!1,o=!1;const i=je(Pe({},e),{columns:e.columns.map(a=>je(Pe({},a),{rows:a.rows.map(s=>je(Pe({},s),{cells:s.cells.map(l=>l.widgetId===t?(r=!0,je(Pe({},l),{widgetId:n})):l.widgetId===n?(o=!0,je(Pe({},l),{widgetId:t})):l)}))}))});return r&&o?i:e}function IPt(e,t,n){const r={cells:[je(Pe({},e),{widthPercentage:100})]};return je(Pe({},t),{rows:Id(n)?[...t.rows,r]:t.rows.reduce((o,i,a)=>(a===n&&o.push(r),o.push(i),o),[])})}function _ue(e,t,n){return je(Pe({},e),{rows:e.rows.map((r,o)=>o===n?J4(r,[t]):r)})}function RPt(e,t,n,r,o,i){const a=e.columns[n].rows[r].cells.find(s=>s.widgetId===t);return a?je(Pe({},e),{columns:e.columns.map((s,l)=>{let c=s;return l===n&&(c=_ue(s,t,r)),l===o&&(c=IPt(a,c,i)),l===n&&(c=HT(c)),c})}):e}function J4(e,t){const n=e.cells.filter(i=>t.includes(i.widgetId)),r=n.reduce((i,a)=>i+a.widthPercentage,0),o=e.cells.length-n.length;return je(Pe({},e),{cells:e.cells.filter(i=>!t.includes(i.widgetId)).map(i=>je(Pe({},i),{widthPercentage:i.widthPercentage+r/o}))})}function HT(e){return je(Pe({},e),{rows:e.rows.filter(t=>t.cells.length>0)})}function jPt(e,t,n,r,o,i,a,s){const l=e.columns[r].rows[o].cells.find(c=>c.widgetId===n);return l?je(Pe({},e),{columns:e.columns.map((c,d)=>{let h=c;return d===r&&(h=_ue(c,n,o)),d===a&&(h=je(Pe({},h),{rows:h.rows.map((u,w)=>w===s?je(Pe({},u),{cells:u.cells.reduce((y,p)=>{if(p.widgetId===i){const k=je(Pe({},l),{widthPercentage:p.widthPercentage/2,height:p.height});t==="left"&&y.push(k),y.push(je(Pe({},p),{widthPercentage:p.widthPercentage/2})),t==="right"&&y.push(k)}else y.push(p);return y},[])}):u)})),d===r&&(h=HT(h)),h})}):e}function zPt(e,t,n,r){return je(Pe({},e),{columns:e.columns.map((o,i)=>i===t?HT(je(Pe({},o),{rows:o.rows.map((a,s)=>s===n?J4(a,[r]):a)})):o)})}function BPt(e,t){return je(Pe({},e),{columns:e.columns.map(n=>HT(je(Pe({},n),{rows:n.rows.map(r=>J4(r,t))})))})}function Sue(e,t){const n=e.columns.flatMap(o=>o.rows.flatMap(i=>i.cells.map(a=>a.widgetId))),r=t.columns.flatMap(o=>o.rows.flatMap(i=>i.cells.map(a=>a.widgetId)));return n.filter(o=>!r.includes(o))}function $Pt(e){return je(Pe({},e),{cells:e.cells.map(t=>je(Pe({},t),{widthPercentage:100/e.cells.length}))})}const FPt=(e,t,n)=>je(Pe({},e),{columns:e.columns.map((r,o)=>o===t?je(Pe({},r),{rows:r.rows.map((i,a)=>a===n?$Pt(i):i)}):r)});function HPt(e,t,n){switch(n.type){case Wa.SWAP:return NPt(e,t.widgetId,n.widgetId);case Wa.NEW_ROW:return RPt(e,t.widgetId,t.columnIndex,t.rowIndex,n.columnIndex,n.rowIndex);case Wa.PLACE_LEFT:case Wa.PLACE_RIGHT:return jPt(e,n.type===Wa.PLACE_LEFT?"left":"right",t.widgetId,t.columnIndex,t.rowIndex,n.widgetId,n.columnIndex,n.rowIndex);default:return e}}function WPt({dashboard:e,persist:t=!0,sharedMode:n=!1}){const{restApi:r,isReady:o}=Ere(),{app:i}=Ln(),a=Hs(e),s=Ke(()=>!!(i!=null&&i.httpClient.auth)&&DPt(i.httpClient.auth.type,t),[i==null?void 0:i.httpClient.auth,t]),l=t&&s,[c,d]=ls(MPt,e),h=He(u=>Co(this,null,function*(){if(!o||!r)throw new YYe;if(c&&u.type===pC.WIDGETS_DELETE&&c.layoutOptions.widgetsPanel){const w=BPt(c.layoutOptions.widgetsPanel,u.payload);u={type:JO.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE,payload:{widgetsPanel:w,widgets:u.payload}}}if(c&&u.type===pC.WIDGETS_PANEL_LAYOUT_UPDATE&&c.layoutOptions.widgetsPanel){const w=Sue(c.layoutOptions.widgetsPanel,u.payload);w.length>0&&(u={type:JO.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE,payload:{widgetsPanel:u.payload,widgets:w}})}if(l){const w=yield APt(c==null?void 0:c.oid,u,r,n);d(w)}else d(u)}),[l,c,r,o,d,n]);return Je(()=>{e&&e!==a&&d({type:JO.DASHBOARD_INIT,payload:e})},[e,a]),{dashboard:c,dispatchChanges:h}}const VPt=j4("useDashboardModel")(Cue);function Cue({dashboardOid:e,includeWidgets:t,includeFilters:n,persist:r=!0,sharedMode:o=!1}){const{dashboard:i,isLoading:a,isError:s,error:l}=nue({dashboardOid:e,includeWidgets:t,includeFilters:n,sharedMode:o}),{dashboard:c,dispatchChanges:d}=WPt({dashboard:i??null,persist:r,sharedMode:o});return{dashboard:c,isLoading:a,isError:s,error:l,dispatchChanges:d}}/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:kue,setPrototypeOf:TY,isFrozen:UPt,getPrototypeOf:GPt,getOwnPropertyDescriptor:YPt}=Object;let{freeze:va,seal:Us,create:Tue}=Object,{apply:Y3,construct:X3}=typeof Reflect<"u"&&Reflect;va||(va=function(e){return e});Us||(Us=function(e){return e});Y3||(Y3=function(e,t,n){return e.apply(t,n)});X3||(X3=function(e,t){return new e(...t)});const Ew=is(Array.prototype.forEach),MY=is(Array.prototype.pop),nv=is(Array.prototype.push),__=is(String.prototype.toLowerCase),eP=is(String.prototype.toString),EY=is(String.prototype.match),rv=is(String.prototype.replace),XPt=is(String.prototype.indexOf),qPt=is(String.prototype.trim),ol=is(Object.prototype.hasOwnProperty),ra=is(RegExp.prototype.test),ov=ZPt(TypeError);function is(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Y3(e,t,r)}}function ZPt(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return X3(e,n)}}function An(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:__;TY&&TY(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(UPt(t)||(t[r]=i),o=i)}e[o]=!0}return e}function KPt(e){for(let t=0;t<e.length;t++)ol(e,t)||(e[t]=null);return e}function Dp(e){const t=Tue(null);for(const[n,r]of kue(e))ol(e,n)&&(Array.isArray(r)?t[n]=KPt(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Dp(r):t[n]=r);return t}function iv(e,t){for(;e!==null;){const r=YPt(e,t);if(r){if(r.get)return is(r.get);if(typeof r.value=="function")return is(r.value)}e=GPt(e)}function n(){return null}return n}const AY=va(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),tP=va(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),nP=va(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),QPt=va(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),rP=va(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),JPt=va(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),OY=va(["#text"]),PY=va(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),oP=va(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),DY=va(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Aw=va(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),eDt=Us(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tDt=Us(/<%[\w\W]*|[\w\W]*%>/gm),nDt=Us(/\${[\w\W]*}/gm),rDt=Us(/^data-[\-\w.\u00B7-\uFFFF]/),oDt=Us(/^aria-[\-\w]+$/),Mue=Us(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),iDt=Us(/^(?:\w+script|data):/i),aDt=Us(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Eue=Us(/^html$/i),sDt=Us(/^[a-z][.\w]*(-[.\w]+)+$/i);var LY=Object.freeze({__proto__:null,MUSTACHE_EXPR:eDt,ERB_EXPR:tDt,TMPLIT_EXPR:nDt,DATA_ATTR:rDt,ARIA_ATTR:oDt,IS_ALLOWED_URI:Mue,IS_SCRIPT_OR_DATA:iDt,ATTR_WHITESPACE:aDt,DOCTYPE_NAME:Eue,CUSTOM_ELEMENT:sDt});const av={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lDt=function(){return typeof window>"u"?null:window},cDt=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Aue(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lDt();const t=Ue=>Aue(Ue);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==av.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:u,trustedTypes:w}=e,y=l.prototype,p=iv(y,"cloneNode"),k=iv(y,"remove"),j=iv(y,"nextSibling"),F=iv(y,"childNodes"),U=iv(y,"parentNode");if(typeof a=="function"){const Ue=n.createElement("template");Ue.content&&Ue.content.ownerDocument&&(n=Ue.content.ownerDocument)}let H,R="";const{implementation:z,createNodeIterator:I,createDocumentFragment:N,getElementsByTagName:W}=n,{importNode:A}=r;let C={};t.isSupported=typeof kue=="function"&&typeof U=="function"&&z&&z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:v,ERB_EXPR:T,TMPLIT_EXPR:S,DATA_ATTR:D,ARIA_ATTR:G,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:O}=LY;let{IS_ALLOWED_URI:E}=LY,_=null;const x=An({},[...AY,...tP,...nP,...rP,...OY]);let f=null;const b=An({},[...PY,...oP,...DY,...Aw]);let m=Object.seal(Tue(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),g=null,M=null,P=!0,B=!0,X=!1,J=!0,K=!1,V=!0,Z=!1,Q=!1,re=!1,oe=!1,ee=!1,te=!1,ne=!0,le=!1;const ae="user-content-";let se=!0,de=!1,fe={},he=null;const ve=An({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let xe=null;const ke=An({},["audio","video","img","source","image","track"]);let Ce=null;const Oe=An({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Te="http://www.w3.org/1998/Math/MathML",_e="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let be=me,we=!1,Ee=null;const Le=An({},[Te,_e,me],eP);let De=null;const $e=["application/xhtml+xml","text/html"],Ve="text/html";let Fe=null,Ze=null;const rt=n.createElement("form"),et=function(Ue){return Ue instanceof RegExp||Ue instanceof Function},ct=function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ze&&Ze===Ue)){if((!Ue||typeof Ue!="object")&&(Ue={}),Ue=Dp(Ue),De=$e.indexOf(Ue.PARSER_MEDIA_TYPE)===-1?Ve:Ue.PARSER_MEDIA_TYPE,Fe=De==="application/xhtml+xml"?eP:__,_=ol(Ue,"ALLOWED_TAGS")?An({},Ue.ALLOWED_TAGS,Fe):x,f=ol(Ue,"ALLOWED_ATTR")?An({},Ue.ALLOWED_ATTR,Fe):b,Ee=ol(Ue,"ALLOWED_NAMESPACES")?An({},Ue.ALLOWED_NAMESPACES,eP):Le,Ce=ol(Ue,"ADD_URI_SAFE_ATTR")?An(Dp(Oe),Ue.ADD_URI_SAFE_ATTR,Fe):Oe,xe=ol(Ue,"ADD_DATA_URI_TAGS")?An(Dp(ke),Ue.ADD_DATA_URI_TAGS,Fe):ke,he=ol(Ue,"FORBID_CONTENTS")?An({},Ue.FORBID_CONTENTS,Fe):ve,g=ol(Ue,"FORBID_TAGS")?An({},Ue.FORBID_TAGS,Fe):{},M=ol(Ue,"FORBID_ATTR")?An({},Ue.FORBID_ATTR,Fe):{},fe=ol(Ue,"USE_PROFILES")?Ue.USE_PROFILES:!1,P=Ue.ALLOW_ARIA_ATTR!==!1,B=Ue.ALLOW_DATA_ATTR!==!1,X=Ue.ALLOW_UNKNOWN_PROTOCOLS||!1,J=Ue.ALLOW_SELF_CLOSE_IN_ATTR!==!1,K=Ue.SAFE_FOR_TEMPLATES||!1,V=Ue.SAFE_FOR_XML!==!1,Z=Ue.WHOLE_DOCUMENT||!1,oe=Ue.RETURN_DOM||!1,ee=Ue.RETURN_DOM_FRAGMENT||!1,te=Ue.RETURN_TRUSTED_TYPE||!1,re=Ue.FORCE_BODY||!1,ne=Ue.SANITIZE_DOM!==!1,le=Ue.SANITIZE_NAMED_PROPS||!1,se=Ue.KEEP_CONTENT!==!1,de=Ue.IN_PLACE||!1,E=Ue.ALLOWED_URI_REGEXP||Mue,be=Ue.NAMESPACE||me,m=Ue.CUSTOM_ELEMENT_HANDLING||{},Ue.CUSTOM_ELEMENT_HANDLING&&et(Ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=Ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ue.CUSTOM_ELEMENT_HANDLING&&et(Ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=Ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ue.CUSTOM_ELEMENT_HANDLING&&typeof Ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=Ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(B=!1),ee&&(oe=!0),fe&&(_=An({},OY),f=[],fe.html===!0&&(An(_,AY),An(f,PY)),fe.svg===!0&&(An(_,tP),An(f,oP),An(f,Aw)),fe.svgFilters===!0&&(An(_,nP),An(f,oP),An(f,Aw)),fe.mathMl===!0&&(An(_,rP),An(f,DY),An(f,Aw))),Ue.ADD_TAGS&&(_===x&&(_=Dp(_)),An(_,Ue.ADD_TAGS,Fe)),Ue.ADD_ATTR&&(f===b&&(f=Dp(f)),An(f,Ue.ADD_ATTR,Fe)),Ue.ADD_URI_SAFE_ATTR&&An(Ce,Ue.ADD_URI_SAFE_ATTR,Fe),Ue.FORBID_CONTENTS&&(he===ve&&(he=Dp(he)),An(he,Ue.FORBID_CONTENTS,Fe)),se&&(_["#text"]=!0),Z&&An(_,["html","head","body"]),_.table&&(An(_,["tbody"]),delete g.tbody),Ue.TRUSTED_TYPES_POLICY){if(typeof Ue.TRUSTED_TYPES_POLICY.createHTML!="function")throw ov('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ue.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ov('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=Ue.TRUSTED_TYPES_POLICY,R=H.createHTML("")}else H===void 0&&(H=cDt(w,o)),H!==null&&typeof R=="string"&&(R=H.createHTML(""));va&&va(Ue),Ze=Ue}},dt=An({},["mi","mo","mn","ms","mtext"]),lt=An({},["foreignobject","annotation-xml"]),gt=An({},["title","style","font","a","script"]),Qe=An({},[...tP,...nP,...QPt]),Et=An({},[...rP,...JPt]),vt=function(Ue){let xt=U(Ue);(!xt||!xt.tagName)&&(xt={namespaceURI:be,tagName:"template"});const St=__(Ue.tagName),Kt=__(xt.tagName);return Ee[Ue.namespaceURI]?Ue.namespaceURI===_e?xt.namespaceURI===me?St==="svg":xt.namespaceURI===Te?St==="svg"&&(Kt==="annotation-xml"||dt[Kt]):!!Qe[St]:Ue.namespaceURI===Te?xt.namespaceURI===me?St==="math":xt.namespaceURI===_e?St==="math"&&lt[Kt]:!!Et[St]:Ue.namespaceURI===me?xt.namespaceURI===_e&&!lt[Kt]||xt.namespaceURI===Te&&!dt[Kt]?!1:!Et[St]&&(gt[St]||!Qe[St]):!!(De==="application/xhtml+xml"&&Ee[Ue.namespaceURI]):!1},Pt=function(Ue){nv(t.removed,{element:Ue});try{U(Ue).removeChild(Ue)}catch{k(Ue)}},It=function(Ue,xt){try{nv(t.removed,{attribute:xt.getAttributeNode(Ue),from:xt})}catch{nv(t.removed,{attribute:null,from:xt})}if(xt.removeAttribute(Ue),Ue==="is"&&!f[Ue])if(oe||ee)try{Pt(xt)}catch{}else try{xt.setAttribute(Ue,"")}catch{}},wt=function(Ue){let xt=null,St=null;if(re)Ue="<remove></remove>"+Ue;else{const Rn=EY(Ue,/^[\r\n\t ]+/);St=Rn&&Rn[0]}De==="application/xhtml+xml"&&be===me&&(Ue='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ue+"</body></html>");const Kt=H?H.createHTML(Ue):Ue;if(be===me)try{xt=new u().parseFromString(Kt,De)}catch{}if(!xt||!xt.documentElement){xt=z.createDocument(be,"template",null);try{xt.documentElement.innerHTML=we?R:Kt}catch{}}const pr=xt.body||xt.documentElement;return Ue&&St&&pr.insertBefore(n.createTextNode(St),pr.childNodes[0]||null),be===me?W.call(xt,Z?"html":"body")[0]:Z?xt.documentElement:pr},$t=function(Ue){return I.call(Ue.ownerDocument||Ue,Ue,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},rn=function(Ue){return Ue instanceof h&&(typeof Ue.nodeName!="string"||typeof Ue.textContent!="string"||typeof Ue.removeChild!="function"||!(Ue.attributes instanceof d)||typeof Ue.removeAttribute!="function"||typeof Ue.setAttribute!="function"||typeof Ue.namespaceURI!="string"||typeof Ue.insertBefore!="function"||typeof Ue.hasChildNodes!="function")},Ur=function(Ue){return typeof s=="function"&&Ue instanceof s},pt=function(Ue,xt,St){C[Ue]&&Ew(C[Ue],Kt=>{Kt.call(t,xt,St,Ze)})},_t=function(Ue){let xt=null;if(pt("beforeSanitizeElements",Ue,null),rn(Ue))return Pt(Ue),!0;const St=Fe(Ue.nodeName);if(pt("uponSanitizeElement",Ue,{tagName:St,allowedTags:_}),Ue.hasChildNodes()&&!Ur(Ue.firstElementChild)&&ra(/<[/\w]/g,Ue.innerHTML)&&ra(/<[/\w]/g,Ue.textContent)||Ue.nodeType===av.progressingInstruction||V&&Ue.nodeType===av.comment&&ra(/<[/\w]/g,Ue.data))return Pt(Ue),!0;if(!_[St]||g[St]){if(!g[St]&&Zt(St)&&(m.tagNameCheck instanceof RegExp&&ra(m.tagNameCheck,St)||m.tagNameCheck instanceof Function&&m.tagNameCheck(St)))return!1;if(se&&!he[St]){const Kt=U(Ue)||Ue.parentNode,pr=F(Ue)||Ue.childNodes;if(pr&&Kt){const Rn=pr.length;for(let po=Rn-1;po>=0;--po){const an=p(pr[po],!0);an.__removalCount=(Ue.__removalCount||0)+1,Kt.insertBefore(an,j(Ue))}}}return Pt(Ue),!0}return Ue instanceof l&&!vt(Ue)||(St==="noscript"||St==="noembed"||St==="noframes")&&ra(/<\/no(script|embed|frames)/i,Ue.innerHTML)?(Pt(Ue),!0):(K&&Ue.nodeType===av.text&&(xt=Ue.textContent,Ew([v,T,S],Kt=>{xt=rv(xt,Kt," ")}),Ue.textContent!==xt&&(nv(t.removed,{element:Ue.cloneNode()}),Ue.textContent=xt)),pt("afterSanitizeElements",Ue,null),!1)},Yt=function(Ue,xt,St){if(ne&&(xt==="id"||xt==="name")&&(St in n||St in rt))return!1;if(!(B&&!M[xt]&&ra(D,xt))&&!(P&&ra(G,xt))){if(!f[xt]||M[xt]){if(!(Zt(Ue)&&(m.tagNameCheck instanceof RegExp&&ra(m.tagNameCheck,Ue)||m.tagNameCheck instanceof Function&&m.tagNameCheck(Ue))&&(m.attributeNameCheck instanceof RegExp&&ra(m.attributeNameCheck,xt)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(xt))||xt==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&ra(m.tagNameCheck,St)||m.tagNameCheck instanceof Function&&m.tagNameCheck(St))))return!1}else if(!Ce[xt]&&!ra(E,rv(St,$,""))&&!((xt==="src"||xt==="xlink:href"||xt==="href")&&Ue!=="script"&&XPt(St,"data:")===0&&xe[Ue])&&!(X&&!ra(q,rv(St,$,"")))&&St)return!1}return!0},Zt=function(Ue){return Ue!=="annotation-xml"&&EY(Ue,O)},ur=function(Ue){pt("beforeSanitizeAttributes",Ue,null);const{attributes:xt}=Ue;if(!xt)return;const St={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let Kt=xt.length;for(;Kt--;){const pr=xt[Kt],{name:Rn,namespaceURI:po,value:an}=pr,Un=Fe(Rn);let Gn=Rn==="value"?an:qPt(an);if(St.attrName=Un,St.attrValue=Gn,St.keepAttr=!0,St.forceKeepAttr=void 0,pt("uponSanitizeAttribute",Ue,St),Gn=St.attrValue,V&&ra(/((--!?|])>)|<\/(style|title)/i,Gn)){It(Rn,Ue);continue}if(St.forceKeepAttr||(It(Rn,Ue),!St.keepAttr))continue;if(!J&&ra(/\/>/i,Gn)){It(Rn,Ue);continue}K&&Ew([v,T,S],Ks=>{Gn=rv(Gn,Ks," ")});const Zs=Fe(Ue.nodeName);if(Yt(Zs,Un,Gn)){if(le&&(Un==="id"||Un==="name")&&(It(Rn,Ue),Gn=ae+Gn),H&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!po)switch(w.getAttributeType(Zs,Un)){case"TrustedHTML":{Gn=H.createHTML(Gn);break}case"TrustedScriptURL":{Gn=H.createScriptURL(Gn);break}}try{po?Ue.setAttributeNS(po,Rn,Gn):Ue.setAttribute(Rn,Gn),rn(Ue)?Pt(Ue):MY(t.removed)}catch{}}}pt("afterSanitizeAttributes",Ue,null)},dr=function Ue(xt){let St=null;const Kt=$t(xt);for(pt("beforeSanitizeShadowDOM",xt,null);St=Kt.nextNode();)pt("uponSanitizeShadowNode",St,null),!_t(St)&&(St.content instanceof i&&Ue(St.content),ur(St));pt("afterSanitizeShadowDOM",xt,null)};return t.sanitize=function(Ue){let xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},St=null,Kt=null,pr=null,Rn=null;if(we=!Ue,we&&(Ue="<!-->"),typeof Ue!="string"&&!Ur(Ue))if(typeof Ue.toString=="function"){if(Ue=Ue.toString(),typeof Ue!="string")throw ov("dirty is not a string, aborting")}else throw ov("toString is not a function");if(!t.isSupported)return Ue;if(Q||ct(xt),t.removed=[],typeof Ue=="string"&&(de=!1),de){if(Ue.nodeName){const Un=Fe(Ue.nodeName);if(!_[Un]||g[Un])throw ov("root node is forbidden and cannot be sanitized in-place")}}else if(Ue instanceof s)St=wt("<!---->"),Kt=St.ownerDocument.importNode(Ue,!0),Kt.nodeType===av.element&&Kt.nodeName==="BODY"||Kt.nodeName==="HTML"?St=Kt:St.appendChild(Kt);else{if(!oe&&!K&&!Z&&Ue.indexOf("<")===-1)return H&&te?H.createHTML(Ue):Ue;if(St=wt(Ue),!St)return oe?null:te?R:""}St&&re&&Pt(St.firstChild);const po=$t(de?Ue:St);for(;pr=po.nextNode();)_t(pr)||(pr.content instanceof i&&dr(pr.content),ur(pr));if(de)return Ue;if(oe){if(ee)for(Rn=N.call(St.ownerDocument);St.firstChild;)Rn.appendChild(St.firstChild);else Rn=St;return(f.shadowroot||f.shadowrootmode)&&(Rn=A.call(r,Rn,!0)),Rn}let an=Z?St.outerHTML:St.innerHTML;return Z&&_["!doctype"]&&St.ownerDocument&&St.ownerDocument.doctype&&St.ownerDocument.doctype.name&&ra(Eue,St.ownerDocument.doctype.name)&&(an="<!DOCTYPE "+St.ownerDocument.doctype.name+`>
1024
+ */(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(vo,function(){var t,n,r="2.0.6",o={},i={},a={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:a.currentLocale,zeroFormat:a.zeroFormat,nullFormat:a.nullFormat,defaultFormat:a.defaultFormat,scalePercentBy100:a.scalePercentBy100};function l(c,d){this._input=c,this._value=d}return t=function(c){var d,h,u,w;if(t.isNumeral(c))d=c.value();else if(c===0||typeof c>"u")d=0;else if(c===null||n.isNaN(c))d=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)d=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)d=null;else{for(h in o)if(w=typeof o[h].regexps.unformat=="function"?o[h].regexps.unformat():o[h].regexps.unformat,w&&c.match(w)){u=o[h].unformat;break}u=u||t._.stringToNumber,d=u(c)}else d=Number(c)||null;return new l(c,d)},t.version=r,t.isNumeral=function(c){return c instanceof l},t._=n={numberToFormat:function(c,d,h){var u=i[t.options.currentLocale],w=!1,y=!1,p=0,k="",j=1e12,F=1e9,U=1e6,H=1e3,R="",z=!1,I,N,W,A,C,v,T;if(c=c||0,N=Math.abs(c),t._.includes(d,"(")?(w=!0,d=d.replace(/[\(|\)]/g,"")):(t._.includes(d,"+")||t._.includes(d,"-"))&&(C=t._.includes(d,"+")?d.indexOf("+"):c<0?d.indexOf("-"):-1,d=d.replace(/[\+|\-]/g,"")),t._.includes(d,"a")&&(I=d.match(/a(k|m|b|t)?/),I=I?I[1]:!1,t._.includes(d," a")&&(k=" "),d=d.replace(new RegExp(k+"a[kmbt]?"),""),N>=j&&!I||I==="t"?(k+=u.abbreviations.trillion,c=c/j):N<j&&N>=F&&!I||I==="b"?(k+=u.abbreviations.billion,c=c/F):N<F&&N>=U&&!I||I==="m"?(k+=u.abbreviations.million,c=c/U):(N<U&&N>=H&&!I||I==="k")&&(k+=u.abbreviations.thousand,c=c/H)),t._.includes(d,"[.]")&&(y=!0,d=d.replace("[.]",".")),W=c.toString().split(".")[0],A=d.split(".")[1],v=d.indexOf(","),p=(d.split(".")[0].split(",")[0].match(/0/g)||[]).length,A?(t._.includes(A,"[")?(A=A.replace("]",""),A=A.split("["),R=t._.toFixed(c,A[0].length+A[1].length,h,A[1].length)):R=t._.toFixed(c,A.length,h),W=R.split(".")[0],t._.includes(R,".")?R=u.delimiters.decimal+R.split(".")[1]:R="",y&&Number(R.slice(1))===0&&(R="")):W=t._.toFixed(c,0,h),k&&!I&&Number(W)>=1e3&&k!==u.abbreviations.trillion)switch(W=String(Number(W)/1e3),k){case u.abbreviations.thousand:k=u.abbreviations.million;break;case u.abbreviations.million:k=u.abbreviations.billion;break;case u.abbreviations.billion:k=u.abbreviations.trillion;break}if(t._.includes(W,"-")&&(W=W.slice(1),z=!0),W.length<p)for(var S=p-W.length;S>0;S--)W="0"+W;return v>-1&&(W=W.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+u.delimiters.thousands)),d.indexOf(".")===0&&(W=""),T=W+R+(k||""),w?T=(w&&z?"(":"")+T+(w&&z?")":""):C>=0?T=C===0?(z?"-":"+")+T:T+(z?"-":"+"):z&&(T="-"+T),T},stringToNumber:function(c){var d=i[s.currentLocale],h=c,u={thousand:3,million:6,billion:9,trillion:12},w,y,p;if(s.zeroFormat&&c===s.zeroFormat)y=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)y=null;else{y=1,d.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(d.delimiters.decimal,"."));for(w in u)if(p=new RegExp("[^a-zA-Z]"+d.abbreviations[w]+"(?:\\)|(\\"+d.currency.symbol+")?(?:\\))?)?$"),h.match(p)){y*=Math.pow(10,u[w]);break}y*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),y*=Number(c)}return y},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,d){return c.indexOf(d)!==-1},insert:function(c,d,h){return c.slice(0,h)+d+c.slice(h)},reduce:function(c,d){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof d!="function")throw new TypeError(d+" is not a function");var h=Object(c),u=h.length>>>0,w=0,y;if(arguments.length===3)y=arguments[2];else{for(;w<u&&!(w in h);)w++;if(w>=u)throw new TypeError("Reduce of empty array with no initial value");y=h[w++]}for(;w<u;w++)w in h&&(y=d(y,h[w],w,h));return y},multiplier:function(c){var d=c.toString().split(".");return d.length<2?1:Math.pow(10,d[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(d,h){var u=n.multiplier(h);return d>u?d:u},1)},toFixed:function(c,d,h,u){var w=c.toString().split("."),y=d-(u||0),p,k,j,F;return w.length===2?p=Math.min(Math.max(w[1].length,y),d):p=y,j=Math.pow(10,p),F=(h(c+"e+"+p)/j).toFixed(p),u>d-p&&(k=new RegExp("\\.?0{1,"+(u-(d-p))+"}$"),F=F.replace(k,"")),F}},t.options=s,t.formats=o,t.locales=i,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return i[s.currentLocale];if(c=c.toLowerCase(),!i[c])throw new Error("Unknown locale : "+c);return i[c]},t.reset=function(){for(var c in a)s[c]=a[c]},t.zeroFormat=function(c){s.zeroFormat=typeof c=="string"?c:null},t.nullFormat=function(c){s.nullFormat=typeof c=="string"?c:null},t.defaultFormat=function(c){s.defaultFormat=typeof c=="string"?c:"0.0"},t.register=function(c,d,h){if(d=d.toLowerCase(),this[c+"s"][d])throw new TypeError(d+" "+c+" already registered.");return this[c+"s"][d]=h,h},t.validate=function(c,d){var h,u,w,y,p,k,j,F;if(typeof c!="string"&&(c+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",c)),c=c.trim(),c.match(/^\d+$/))return!0;if(c==="")return!1;try{j=t.localeData(d)}catch{j=t.localeData(t.locale())}return w=j.currency.symbol,p=j.abbreviations,h=j.delimiters.decimal,j.delimiters.thousands==="."?u="\\.":u=j.delimiters.thousands,F=c.match(/^[^\d]+/),F!==null&&(c=c.substr(1),F[0]!==w)||(F=c.match(/[^\d]+$/),F!==null&&(c=c.slice(0,-1),F[0]!==p.thousand&&F[0]!==p.million&&F[0]!==p.billion&&F[0]!==p.trillion))?!1:(k=new RegExp(u+"{2}"),c.match(/[^\d.,]/g)?!1:(y=c.split(h),y.length>2?!1:y.length<2?!!y[0].match(/^\d+.*\d$/)&&!y[0].match(k):y[0].length===1?!!y[0].match(/^\d+$/)&&!y[0].match(k)&&!!y[1].match(/^\d+$/):!!y[0].match(/^\d+.*\d$/)&&!y[0].match(k)&&!!y[1].match(/^\d+$/)))},t.fn=l.prototype={clone:function(){return t(this)},format:function(c,d){var h=this._value,u=c||s.defaultFormat,w,y,p;if(d=d||Math.round,h===0&&s.zeroFormat!==null)y=s.zeroFormat;else if(h===null&&s.nullFormat!==null)y=s.nullFormat;else{for(w in o)if(u.match(o[w].regexps.format)){p=o[w].format;break}p=p||t._.numberToFormat,y=p(h,u,d)}return y},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var d=n.correctionFactor.call(null,this._value,c);function h(u,w,y,p){return u+Math.round(d*w)}return this._value=n.reduce([this._value,c],h,0)/d,this},subtract:function(c){var d=n.correctionFactor.call(null,this._value,c);function h(u,w,y,p){return u-Math.round(d*w)}return this._value=n.reduce([c],h,Math.round(this._value*d))/d,this},multiply:function(c){function d(h,u,w,y){var p=n.correctionFactor(h,u);return Math.round(h*p)*Math.round(u*p)/Math.round(p*p)}return this._value=n.reduce([this._value,c],d,1),this},divide:function(c){function d(h,u,w,y){var p=n.correctionFactor(h,u);return Math.round(h*p)/Math.round(u*p)}return this._value=n.reduce([this._value,c],d),this},difference:function(c){return Math.abs(t(this._value).subtract(c).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(c){var d=c%10;return~~(c%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,d,h){var u=t._.includes(d," BPS")?" ":"",w;return c=c*1e4,d=d.replace(/\s?BPS/,""),w=t._.numberToFormat(c,d,h),t._.includes(w,")")?(w=w.split(""),w.splice(-1,0,u+"BPS"),w=w.join("")):w=w+u+"BPS",w},unformat:function(c){return+(t._.stringToNumber(c)*1e-4).toFixed(15)}})}(),function(){var c={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},d={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=c.suffixes.concat(d.suffixes.filter(function(w){return c.suffixes.indexOf(w)<0})),u=h.join("|");u="("+u.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(u)},format:function(w,y,p){var k,j=t._.includes(y,"ib")?d:c,F=t._.includes(y," b")||t._.includes(y," ib")?" ":"",U,H,R;for(y=y.replace(/\s?i?b/,""),U=0;U<=j.suffixes.length;U++)if(H=Math.pow(j.base,U),R=Math.pow(j.base,U+1),w===null||w===0||w>=H&&w<R){F+=j.suffixes[U],H>0&&(w=w/H);break}return k=t._.numberToFormat(w,y,p),k+F},unformat:function(w){var y=t._.stringToNumber(w),p,k;if(y){for(p=c.suffixes.length-1;p>=0;p--){if(t._.includes(w,c.suffixes[p])){k=Math.pow(c.base,p);break}if(t._.includes(w,d.suffixes[p])){k=Math.pow(d.base,p);break}}y*=k||1}return y}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,d,h){var u=t.locales[t.options.currentLocale],w={before:d.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:d.match(/([\+|\-|\)|\s|\$]*)$/)[0]},y,p,k;for(d=d.replace(/\s?\$\s?/,""),y=t._.numberToFormat(c,d,h),c>=0?(w.before=w.before.replace(/[\-\(]/,""),w.after=w.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(w.before,"-")&&!t._.includes(w.before,"(")&&(w.before="-"+w.before),k=0;k<w.before.length;k++)switch(p=w.before[k],p){case"$":y=t._.insert(y,u.currency.symbol,k);break;case" ":y=t._.insert(y," ",k+u.currency.symbol.length-1);break}for(k=w.after.length-1;k>=0;k--)switch(p=w.after[k],p){case"$":y=k===w.after.length-1?y+u.currency.symbol:t._.insert(y,u.currency.symbol,-(w.after.length-(1+k)));break;case" ":y=k===w.after.length-1?y+" ":t._.insert(y," ",-(w.after.length-(1+k)+u.currency.symbol.length-1));break}return y}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,d,h){var u,w=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",y=w.split("e");return d=d.replace(/e[\+|\-]{1}0/,""),u=t._.numberToFormat(Number(y[0]),d,h),u+"e"+y[1]},unformat:function(c){var d=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),h=Number(d[0]),u=Number(d[1]);u=t._.includes(c,"e-")?u*=-1:u;function w(y,p,k,j){var F=t._.correctionFactor(y,p),U=y*F*(p*F)/(F*F);return U}return t._.reduce([h,Math.pow(10,u)],w,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,d,h){var u=t.locales[t.options.currentLocale],w,y=t._.includes(d," o")?" ":"";return d=d.replace(/\s?o/,""),y+=u.ordinal(c),w=t._.numberToFormat(c,d,h),w+y}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,d,h){var u=t._.includes(d," %")?" ":"",w;return t.options.scalePercentBy100&&(c=c*100),d=d.replace(/\s?\%/,""),w=t._.numberToFormat(c,d,h),t._.includes(w,")")?(w=w.split(""),w.splice(-1,0,u+"%"),w=w.join("")):w=w+u+"%",w},unformat:function(c){var d=t._.stringToNumber(c);return t.options.scalePercentBy100?d*.01:d}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,d,h){var u=Math.floor(c/60/60),w=Math.floor((c-u*60*60)/60),y=Math.round(c-u*60*60-w*60);return u+":"+(w<10?"0"+w:w)+":"+(y<10?"0"+y:y)},unformat:function(c){var d=c.split(":"),h=0;return d.length===3?(h=h+Number(d[0])*60*60,h=h+Number(d[1])*60,h=h+Number(d[2])):d.length===2&&(h=h+Number(d[0])*60,h=h+Number(d[1])),Number(h)}})}(),t})})(Gce);var BEt=Gce.exports;const $Et=ya(BEt),FEt=(e,t)=>{const n=VEt(e);return HEt(n,t)};function HEt(e,t){return{columns:t==null?void 0:t.map(n=>({name:n.name,type:g5(n.type)})),rows:WEt(e)}}function WEt(e){var t;let n=!1;const r=(t=e[0])===null||t===void 0?void 0:t.map((o,i)=>{const a=e.some(s=>"selected"in s[i]);return a&&(n=!0),a});return e.map(o=>{const i=n?r.some((a,s)=>a&&!o[s].selected):void 0;return o.map(a=>i!==void 0?{data:a.data,text:a.text,blur:i}:{data:a.data,text:a.text})})}function VEt({values:e=[],metadata:t=[]}){var n,r,o,i;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let a=0;a<e.length;a++){const s=e[a];for(let l=0;l<s.length;l++)t[l].format&&!((r=(n=t[l])===null||n===void 0?void 0:n.format)===null||r===void 0)&&r.number&&(s[l].text=$Et(s[l].data).format((i=(o=t[l])===null||o===void 0?void 0:o.format)===null||i===void 0?void 0:i.number))}return e}var Sp=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};class UEt extends Fa.AbstractTaskManager{constructor(t,n){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new Fa.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Sp(this,void 0,void 0,function*(){})),new Fa.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new Fa.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Sp(this,void 0,void 0,function*(){})),new Fa.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new Fa.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>Sp(this,void 0,void 0,function*(){})),new Fa.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotClient=n}prepareJaqlPayload(t){return Sp(this,void 0,void 0,function*(){const{queryDescription:n,executionConfig:r}=t.passport,o=w5(n,r.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(o):o})}sendJaqlQuery(t,n){return Sp(this,void 0,void 0,function*(){const{queryDescription:r,taskId:o}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,n);this.sentRequestsAbortersMap.set(o,a);const s=yield i.finally(()=>{this.sentRequestsAbortersMap.delete(o)});GEt(s);const l=[...r.attributes,...r.measures],c=(s.headers||[]).slice(l.length).map(d=>({name:d,type:"number"}));return FEt(s,[...l,...c])})}sendCsvQuery(t,n){return Sp(this,void 0,void 0,function*(){const{taskId:r}=t.passport,{responsePromise:o,abortHttpRequest:i}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,n);return this.sentRequestsAbortersMap.set(r,i),o.finally(()=>{this.sentRequestsAbortersMap.delete(r)})})}cancelDataRetrievalQuery(t){const n=t.passport.taskId,r=this.sentRequestsAbortersMap.get(n);return r&&(r(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.queryDescription.dataSource)}preparePivotJaqlPayload(t){return Sp(this,void 0,void 0,function*(){const{pivotQueryDescription:n,executionConfig:r}=t.passport,o=Nxe(n,r.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(o):o})}sendPivotJaqlQuery(t,n){var r;const{pivotQueryDescription:o}=t.passport;return this.pivotClient.queryData(n,!0,(r=o.count)!==null&&r!==void 0?r:XEt,!1)}cancelPivotJaqlQuery(t){const n=t.passport.taskId,r=this.sentRequestsAbortersMap.get(n);return r&&(r(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.pivotQueryDescription.dataSource)}}function GEt(e){var t;if(!e)throw new Ui("errors.noJaqlResponse");if(e.error)throw new Error(`${e.details} ${(t=e.database)!==null&&t!==void 0?t:""} ${e.extraDetails?JSON.stringify(e.extraDetails):""}`)}class mY extends Fa.TaskPassport{constructor(t,n,r){super(),this.queryDescription=n,this.type=t,this.executionConfig=r}}class YEt extends Fa.TaskPassport{constructor(t,n,r){super(),this.pivotQueryDescription=n,this.type=t,this.executionConfig=r}}var gY=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(h){a(h)}}function l(d){try{c(r.throw(d))}catch(h){a(h)}}function c(d){d.done?i(d.value):o(d.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const XEt=2e4,QO="Unspecified reason";class qEt{constructor(t,n=new Zte(t.url,t.auth),r){KEt(t),this.queryApi=new IEt(t),this.taskManager=new UEt(this.queryApi,n),this.shouldSkipHighlightsWithoutAttributes=r??!1}executeQuery(t,n){const r=new mY("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{vY(t),this.taskManager.executeQuerySending(r).then(a=>{a.status===Fa.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||QO)}}executeCsvQuery(t,n){const r=new mY("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{vY(t),this.taskManager.executeDownloadCsvSending(r).then(a=>{a.status===Fa.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||QO)}}executePivotQuery(t,n){const r=new YEt("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((o,i)=>{ZEt(t),this.taskManager.executePivotQuerySending(r).then(a=>{a.status===Fa.ExecutionResultStatus.SUCCESS?o(a.result):i(a.error)})}),cancel:o=>this.taskManager.cancel(r.taskId,o||QO)}}getDataSourceFields(t,n=9999,r=0){return gY(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceFields(t,n,r))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return gY(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function vY(e){const{attributes:t,measures:n,filters:r,highlights:o,count:i,offset:a}=e;if(i&&i<0)throw new Ui("errors.invalidCountNegative",{count:i.toString()});if(a&&a<0)throw new Ui("errors.invalidOffset",{offset:a.toString()});if(t.length+n.length===0)throw new Ui("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!zt.isAttribute(s)){const{name:l}=s;throw new Ui("errors.invalidAttribute",{attributeName:l})}}),n.forEach(s=>{if(!s.skipValidation&&!zt.isMeasure(s))throw new Ui("errors.invalidMeasure",{measureName:s.name})}),r.forEach(s=>{if(!s.skipValidation&&!zt.isFilter(s))throw new Ui("errors.invalidFilter",{filterName:s.name})}),o.forEach(s=>{if(!s.skipValidation&&!zt.isFilter(s))throw new Ui("errors.invalidHighlight",{highlightName:s.name})})}function ZEt(e){const{rowsAttributes:t,columnsAttributes:n,measures:r,filters:o,highlights:i,count:a,offset:s}=e;if(a&&a<0)throw new Ui("errors.invalidCountNegative",{count:a.toString()});if(s&&s<0)throw new Ui("errors.invalidOffset",{offset:s.toString()});if(t.length+n.length+r.length===0)throw new Ui("errors.noDimensionsOrMeasures");o.forEach(l=>{if(!l.skipValidation&&!zt.isFilter(l))throw new Ui("errors.invalidFilter",{filterName:l.name})}),i.forEach(l=>{if(!l.skipValidation&&!zt.isFilter(l))throw new Ui("errors.invalidHighlight",{highlightName:l.name})})}function KEt(e){if(!e)throw new Ui("errors.missingHttpClient");if(!e.post)throw new Ui("errors.missingPostMethod")}const QEt={enabled:!0,delay:500},JEt={locale:t2(),dateConfig:DR,loadingIndicatorConfig:QEt,translationConfig:{language:"en",customTranslations:[]},queryCacheConfig:{enabled:!1},queryLimit:nVe,tabberConfig:{enabled:!0},accessibilityConfig:{enabled:!1},errorBoundaryConfig:{alwaysShowErrorText:!1},trackingConfig:{enabled:!0},jumpToDashboardConfig:{enabled:!1}};function eAt(e,t,n){return Co(this,null,function*(){var r;const o=yield nAt(t,n);return lo.withOptions({mergeArrays:!1},JEt,{locale:t2((r=e==null?void 0:e.translationConfig)==null?void 0:r.language)},o,e)})}function tAt(e){const t={};return e.forEach(n=>{t[n.key]=n}),t}function nAt(e,t=!1){return Co(this,null,function*(){var n,r;const o=yield e.get("api/globals");if(!o)throw new kt("errors.serverSettingsNotLoaded");const i=t?{colors:$y().palette.variantColors}:yield Joe(Koe(o.designSettings),e);return{serverThemeSettings:Zoe(o.designSettings,i,e.url),serverLanguage:o.language,serverVersion:o.version,serverFeatures:tAt(o.features),user:{tenant:{name:((r=(n=o.user)==null?void 0:n.tenant)==null?void 0:r.name)||Sne}}}})}function rAt(e,t){return t===Sne?e:e.replace(`/${t}`,"")}function oAt(){window.addEventListener("unhandledrejection",e=>{e.reason instanceof Error?console.error(e.reason.message):console.error(e.reason)})}const iAt=e=>Co(void 0,[e],function*({defaultDataSource:t,url:n,token:r,wat:o,ssoEnabled:i,appConfig:a,enableSilentPreAuth:s,useFusionAuth:l}){if(n===void 0)throw new kt("errors.sisenseContextNoAuthentication");const c=Eu(n),d=Eu(n,!0),h=RMt({url:d,token:r,wat:o,ssoEnabled:i,enableSilentPreAuth:s,useFusionAuth:l});if(!h)throw new kt("errors.sisenseContextNoAuthentication");oAt();const u=new zMt(c,h,"sdk-ui-2.4.1"),w=yield u.login(),y=Ice(h)||!w,p=yield eAt(a||{},u,y),k=new Zte(rAt(c,p.user.tenant.name),h),j=new qEt(u,k);return{httpClient:u,pivotClient:k,queryClient:j,settings:p,defaultDataSource:t,queryCache:{clear:Mne}}}),aAt=()=>{const e=aie();return e?uk({key:"css",nonce:e}):null},yY=({children:e})=>{const t=Ke(()=>aAt(),[]);return t?ge(M5,{value:t,children:e}):ge(bn,{children:e})},sAt=Cie();function lAt(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Ky(t.components[n].defaultProps,r)}function cAt({props:e,name:t,defaultTheme:n,themeId:r}){let o=xie(n);return r&&(o=o[r]||o),lAt({theme:o,name:t,props:e})}const uAt=W2(),dAt=sAt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function pAt(e){return cAt({props:e,name:"MuiStack",defaultTheme:uAt})}function hAt(e,t){const n=Ai.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i<n.length-1&&r.push(wn(t,{key:`separator-${i}`})),r),[])}const fAt=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],mAt=({ownerState:e,theme:t})=>{let n=Pe({display:"flex",flexDirection:"column"},bl({theme:t},dO({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=j2(t),o=Object.keys(t.breakpoints.values).reduce((s,l)=>((typeof e.spacing=="object"&&e.spacing[l]!=null||typeof e.direction=="object"&&e.direction[l]!=null)&&(s[l]=!0),s),{}),i=dO({values:e.direction,base:o}),a=dO({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((s,l,c)=>{if(!i[s]){const d=l>0?i[c[l-1]]:"column";i[s]=d}}),n=ma(n,bl({theme:t},a,(s,l)=>e.useFlexGap?{gap:fh(r,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${fAt(l?i[l]:e.direction)}`]:fh(r,s)}}))}return n=VJe(t.breakpoints,n),n};function gAt(e={}){const{createStyledComponent:t=dAt,useThemeProps:n=pAt,componentName:r="MuiStack"}=e,o=()=>lr({root:["root"]},s=>Vn(r,s),{}),i=t(mAt),a=Tt(function(s,l){const c=n(s),d=yie(c),{component:h="div",direction:u="column",spacing:w=0,divider:y,children:p,className:k,useFlexGap:j=!1}=d,F=_n(d,["component","direction","spacing","divider","children","className","useFlexGap"]),U={direction:u,spacing:w,useFlexGap:j},H=o();return Me(i,je(Pe({as:h,ownerState:U,ref:l,className:Wt(H.root,k)},F),{children:y?hAt(p,y):p}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:ue.node,direction:ue.oneOfType([ue.oneOf(["column-reverse","column","row-reverse","row"]),ue.arrayOf(ue.oneOf(["column-reverse","column","row-reverse","row"])),ue.object]),divider:ue.node,spacing:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.number,ue.string])),ue.number,ue.object,ue.string]),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])}),a}const vAt=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return lr({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Crt,t)},yAt=Gt("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${im.primary}`]:t.primary},{[`& .${im.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${OV.root}:where(& .${im.primary})`]:{display:"block"},[`.${OV.root}:where(& .${im.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Yce=Tt(function(e,t){const n=cr({props:e,name:"MuiListItemText"}),r=n,{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:d,secondaryTypographyProps:h,slots:u={},slotProps:w={}}=r,y=_n(r,["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps","slots","slotProps"]),{dense:p}=en(gh);let k=l??o,j=d;const F=je(Pe({},n),{disableTypography:a,inset:s,primary:!!k,secondary:!!j,dense:p}),U=vAt(F),H={slots:u,slotProps:Pe({primary:c,secondary:h},w)},[R,z]=Vr("root",{className:Wt(U.root,i),elementType:yAt,externalForwardedProps:Pe(Pe({},H),y),ownerState:F,ref:t}),[I,N]=Vr("primary",{className:U.primary,elementType:Yi,externalForwardedProps:H,ownerState:F}),[W,A]=Vr("secondary",{className:U.secondary,elementType:Yi,externalForwardedProps:H,ownerState:F});return k!=null&&k.type!==Yi&&!a&&(k=Me(I,je(Pe({variant:p?"body2":"body1",component:N!=null&&N.variant?void 0:"span"},N),{children:k}))),j!=null&&j.type!==Yi&&!a&&(j=Me(W,je(Pe({variant:"body2",color:"textSecondary"},A),{children:j}))),Me(R,je(Pe({},z),{children:[k,j]}))});process.env.NODE_ENV!=="production"&&(Yce.propTypes={children:ue.node,classes:ue.object,className:ue.string,disableTypography:ue.bool,inset:ue.bool,primary:ue.node,primaryTypographyProps:ue.object,secondary:ue.node,secondaryTypographyProps:ue.object,slotProps:ue.shape({primary:ue.oneOfType([ue.func,ue.object]),root:ue.oneOfType([ue.func,ue.object]),secondary:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({primary:ue.elementType,root:ue.elementType,secondary:ue.elementType}),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});const yd=(e,t)=>`${t}px solid ${e}`,Xce=e=>({columns:[{widthPercentage:100,rows:e.map(t=>({cells:[{widthPercentage:100,widgetId:t.id}]}))}]});function qce(e){return vj(e)?{direction:e}:e}function bY(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function bAt({type:e,settings:t,sortDetails:n},r){return e==="simple"?n.field>=(r.rows||[]).length?[{rowIndex:0,sort:{direction:gm(t[0].direction),by:bY(n,r)}}]:[{rowIndex:n.field,sort:{direction:gm(t[0].direction)}}]:t.reduce((o,i,a)=>{var s;const l=(s=r.rows)==null?void 0:s[a],c=(l==null?void 0:l.sortType)&&qce(l==null?void 0:l.sortType),d={direction:gm(i.direction),by:bY(n,r)};return!i.selected&&Ra(c==null?void 0:c.by,d.by)&&o.push({rowIndex:a,sort:null}),i.selected&&o.push({rowIndex:a,sort:d}),o},[])}function xAt(e){const{jaql:t,pivotBuilder:n,isForceReload:r}=e,[o,i]=Ge({isLoading:!1,isNoResults:!1}),a=xl(t);Je(()=>{t&&(a||r)&&n.updateJaql(t)},[r,a,t,n]);const s=He(()=>{i({isLoading:!0,isNoResults:!1})},[]),l=He(c=>{i({isLoading:!1,isNoResults:!c.cellsMetadata})},[]);return Je(()=>{const c=[{event:uL,handler:s},{event:dL,handler:l}];return c.forEach(({event:d,handler:h})=>{n.on(d,h)}),()=>{c.forEach(({event:d,handler:h})=>{n.off(d,h)})}},[n,s,l]),o}function wAt(e){const{pivotClient:t,pivotBuilder:n,shouldBeRecreated:r}=e,[o,i]=Ge(()=>t.prepareDataService());return Je(()=>{if(r){const a=t.prepareDataService();i(a),n.updateDataService(a)}},[t,n,r]),Je(()=>()=>{o.destroy()},[o]),o}const _At=({dataOptions:e})=>{const[t,n]=Ge(vae(e));return{dataOptionsInternal:t,updateSort(r){var o;n(je(Pe({},t),{rows:(o=t.rows)==null?void 0:o.map((i,a)=>{const s=r.rows.find(({rowIndex:l})=>l===a);return s?s.sort===null?r7(i,{sortType:void 0}):r7(i,{sortType:s.sort}):i})}))}}},SAt=e=>(t,n,r,o)=>{var i;const a=qR(e,(i=o==null?void 0:o.field)==null?void 0:i.index),s=bre(a),l=t.value===null||typeof t.value>"u";t.content=l?"":Zr(s,t.value)},CAt=()=>(e,t,n)=>{var r,o;const i=e.userType===Pn.CORNER,a=e.userType===Pn.SUB_TOTAL;if(!t||i||a)return;const s=n.metadata.find(({panel:c,jaql:d})=>{var h;const u=["rows","columns"].includes(c),w=d.dim===t.jaql.dim,y=t.jaql.datatype===d.datatype&&t.jaql.level===d.level,p=(h=d.in)==null?void 0:h.selected;return u&&w&&y&&p}),l=(o=(r=s==null?void 0:s.jaql)==null?void 0:r.in)==null?void 0:o.selected;l&&KMt(l.jaql)(e.value)&&(e.state={isSelected:!0})};function kAt(e,t){return n=>{var r,o,i,a;if(n.userType===Pn.SUB_TOTAL&&(n.content=t("pivotTable.subTotal",{value:(r=n.content)!=null?r:""})),n.userType===Pn.GRAND_TOTAL){if(n.metadataType===un.ROWS&&(n.content=t("pivotTable.grandTotal"),((o=e.values)==null?void 0:o.length)===1&&!((i=e.columns)!=null&&i.length))){const[s]=e.values,l="column"in s?s.column:s;n.content=(a=l.name)!=null?a:n.content}n.metadataType===un.COLUMNS&&n.parent&&(n.content=t("pivotTable.grandTotal"))}}}const TAt="#000000",MAt="#ffffff";function EAt(e,t){return(n,r,o,i)=>{var a;const s={};if(r.userType===Pn.SUB_TOTAL||r.userType===Pn.GRAND_TOTAL||o.userType===Pn.SUB_TOTAL||o.userType===Pn.GRAND_TOTAL||o.parent&&o.parent.userType===Pn.SUB_TOTAL||o.parent&&o.parent.userType===Pn.GRAND_TOTAL)return;const l=qR(e,(a=i==null?void 0:i.field)==null?void 0:a.index),c=l==null?void 0:l.color,d=l==null?void 0:l.dataBarsColor;if(c){const h=Gy(c);if(h.type==="Static"||h.type==="Absolute"){const u=h.getColor(n.value);u&&(s.backgroundColor=u)}else if(h.type==="Relative"){const u=c,[w]=t.palette.variantColors,y=w?$s(w,.2):TAt,p=w?$s(w,-.2):MAt,k={steps:u.steps,min:u.minColor,max:u.maxColor,minDef:y,maxDef:p,minGray:NS(y),maxGray:NS(p)};n.store=n.store||{},n.store.compileRange=({min:j,max:F,minvalue:U,midvalue:H,maxvalue:R})=>are(j??"#000000",F??"#ffffff",U??0,H??0,R??0),n.store.compileRangeContext={},n.store.compileRangeArgs=k}}if(d){const h=Gy(d);if(h.type==="Static"||h.type==="Absolute"){const u=h.getColor(n.value);u&&(s.databarColor=u)}}Object.keys(s).length>0&&(n.style=n.style||{},Object.assign(n.style,s))}}const AAt=({dataService:e,dataOptions:t})=>{const{app:n}=Ln(),{t:r}=Jt(),{themeSettings:o}=Lt(),i=He(pN([SAt(t),EAt(t,o)]),[t]),a=He((l,c)=>np(l,c,n==null?void 0:n.settings.locale,n==null?void 0:n.settings.dateConfig),[n]),s=He(pN([iYe(t,a),kAt(t,r),CAt()]),[t,r]);Je(()=>(e.on(vD,i),e.on(nS,s),()=>{e.off(vD,i),e.off(nS,s)}),[e,i])};function xY(e,t){return Hd(e,t)}function OAt(e){const t=DAt(e),n=Qg(e,t),[r,o]=ls(xY,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Ln();return Je(()=>{if(i||o({type:"error",error:new kt("errors.executeQueryNoSisenseContext")}),n(a)){o({type:"loading"});const{dataSource:s,rows:l,columns:c,values:d,grandTotals:h,filters:u,highlights:w,count:y,offset:p,onBeforeQuery:k}=e,{filters:j,relations:F}=Qa(u);kne({dataSource:s,rows:l,columns:c,values:d,grandTotals:h,filters:j,filterRelations:F,highlights:w,count:y,offset:p},a,{onBeforeQuery:k}).then(U=>{o({type:"success",data:U})}).catch(U=>{o({type:"error",error:U})})}},[a,i,e,n]),r.data&&t?xY(r,{type:"loading"}):r}const PAt=["dataSource","rows","columns","values","grandTotals","count","offset","onBeforeQuery"];function DAt(e){return xl(e,PAt,(t,n)=>{const{filters:r}=Qa(n.filters),{filters:o}=Qa(t.filters);return xh(r,o)||xh(n.highlights,t.highlights)})}function Zce(e,t){const[n,r]=Ge(e),o=Ke(()=>D1(i=>{r(i)},t),[t]);return Je(()=>{o(e)},[e,o]),n}const LAt=200,wY=e=>Pe({attribute:Fs(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:qce(e.sortType)}),NAt=e=>{var t;return{measure:g1(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},Kce=e=>{const{rows:t=[],columns:n=[],values:r=[],grandTotals:o}=e,i=t.flatMap(wY),a=n.flatMap(wY),s=r.flatMap(NAt);return{rows:i,columns:a,values:s,grandTotals:o}},IAt=({dataSet:e,dataOptionsInternal:t,filters:n,highlights:r})=>{const[o,i]=Ge(),{rows:a,columns:s,values:l,grandTotals:c}=Ke(()=>Kce(t),[t]),d=He(w=>{i(y=>Ra(y,w)?y:w)},[i]),h=Zce(Ke(()=>({dataSource:e,rows:a,columns:s,values:l,grandTotals:c,filters:n,highlights:r,onBeforeQuery:d}),[e,a,s,l,c,n,r,d]),LAt),{error:u}=OAt(h);return{jaql:o,error:u}},RAt="#cbced7",jAt="#ffff9c";function zAt(e,t){var n,r,o,i,a,s,l,c,d,h,u;let w,y;if((n=t==null?void 0:t.chart)!=null&&n.backgroundColor){const p=zg(Bs((r=t==null?void 0:t.chart)==null?void 0:r.backgroundColor))<.5?.07:-.07;w=fi((o=t==null?void 0:t.chart)==null?void 0:o.backgroundColor,p),y=fi((i=t==null?void 0:t.chart)==null?void 0:i.backgroundColor,p*1.5)}return{fontFamily:(a=t==null?void 0:t.typography)==null?void 0:a.fontFamily,textColor:(s=t==null?void 0:t.chart)==null?void 0:s.textColor,backgroundColor:(l=t==null?void 0:t.chart)==null?void 0:l.backgroundColor,borderColor:RAt,fillColor:w,additionalFillColor:y,fillOptions:{alternatingRows:e==null?void 0:e.alternatingRowsColor,alternatingColumns:e==null?void 0:e.alternatingColumnsColor,columnsHeaders:e==null?void 0:e.headersColor,rowMembers:e==null?void 0:e.membersColor,totals:e==null?void 0:e.totalsColor},rowHeight:e==null?void 0:e.rowHeight,isAutoHeight:(c=e==null?void 0:e.isAutoHeight)!=null?c:!1,navigationPrimaryColor:(d=t==null?void 0:t.typography)==null?void 0:d.primaryTextColor,navigationSecondaryColor:(h=t==null?void 0:t.typography)==null?void 0:h.secondaryTextColor,selectionColor:(u=e==null?void 0:e.highlightColor)!=null?u:jAt}}const BAt=25;function $At({pivotBuilder:e,dataOptions:t,styleOptions:n,themeSettings:r,size:o,onTotalHeightChange:i}){const[a,s]=Ge(null),[l,c]=Cc((n==null?void 0:n.rowsPerPage)||BAt),d=He((y,p)=>{const k=[...t.rows?t.rows:[],...t.columns?t.columns:[],...t.values?t.values:[]].map(F=>F==null?void 0:F.width);if(p){const[F,U]=p,H=y[F];H&&typeof H.jaqlIndex<"u"&&(k[H.jaqlIndex]=U)}const j=[];return y.forEach((F,U)=>{typeof F.jaqlIndex<"u"&&typeof k[F.jaqlIndex]<"u"&&j.push([U,k[F.jaqlIndex]])}),j},[t]),h=He(y=>{c(y)},[c]),u=Ke(()=>zAt(n,r),[n,r]),w=Ke(()=>o?Pe({width:o.width,height:o.height,isPaginated:!0,itemsPerPage:l,isSelectedMode:!0,onUpdatePredefinedColumnWidth:d,onItemsPerPageChange:h,onTotalHeightChange:i},u):null,[o,l,d,u,i,h]);return Je(()=>(e.on(SS,s),()=>{e.off(SS,s)}),[e]),Je(()=>{w&&e.render(w)},[e,w]),{pivotElement:a}}function FAt(e){const{pivotClient:t}=e,n=Ke(()=>t.preparePivotBuilder(),[t]);return Je(()=>()=>{n.destroy()},[n]),n}const Qce=Sn({componentName:"PivotTable"})(e=>{const{dataSet:t,dataOptions:n,filters:r,highlights:o,refreshCounter:i=0,onHeightChange:a}=e,s=Ke(()=>{var T;return(T=e.styleOptions)!=null?T:{}},[e.styleOptions]),[l,c]=Ge(null),[d,h]=Ge(null),{app:u}=Ln(),{themeSettings:w}=Lt(),y=u==null?void 0:u.pivotClient;if(!y)throw new kt("errors.noPivotClient");const{dataOptionsInternal:p,updateSort:k}=_At({dataOptions:n}),{error:j,jaql:F}=IAt({dataSet:t,dataOptionsInternal:p,filters:r,highlights:o});if(j)throw j;const U=FAt({pivotClient:y}),H=xl(F),R=i>0&&xl(i),z=wAt({pivotClient:y,pivotBuilder:U,shouldBeRecreated:H||R});AAt({dataService:z,dataOptions:n});const I=He(T=>{a==null||a(T),h(T)},[a]),{pivotElement:N}=$At({pivotBuilder:U,dataOptions:n,styleOptions:s,themeSettings:w,size:l,onTotalHeightChange:I}),{isLoading:W,isNoResults:A}=xAt({jaql:F,pivotBuilder:U,isForceReload:R}),C=He(T=>{const S=bAt(T,p);k({rows:S})},[p,k]);Je(()=>(U.on(_S,C),()=>{U.off(_S,C)}),[U,C]);const v=He(T=>{(T.width!==(l==null?void 0:l.width)||T.height!==(l==null?void 0:l.height))&&c(T)},[l,c]);return ge(Zh,{defaultSize:pae,size:{width:s==null?void 0:s.width,height:s!=null&&s.isAutoHeight&&!A&&d!=null?d:s==null?void 0:s.height},onSizeChange:v,children:ge(sd,{isVisible:W,children:ot(bn,{children:[A&&ge(Wj,{iconType:"table"}),ge("div",{"aria-label":"pivot-table-root",children:N})]})})})}),HAt=32;function WAt(e){return e?e+HAt:void 0}const VAt=Sn({componentName:"PivotTableWidget"})(e=>{var t;const[n,r]=Ge(0),[o,i]=Ge(),{app:a}=Ln(),{styleOptions:s,dataSource:l=a==null?void 0:a.defaultDataSource,dataOptions:c}=e,d=K2("pivot",{hasHeader:!((t=s==null?void 0:s.header)!=null&&t.hidden)}),h=e.styleOptions||{},{width:u,height:w}=h,y=_n(h,["width","height"]);return c?ge(Zh,{defaultSize:d,size:{width:u,height:s!=null&&s.isAutoHeight?WAt(o):w},children:ge(MT,je(Pe({},e),{dataSetName:l&&Mc(l),onRefresh:()=>r(n+1),children:ge(Qce,{dataSet:e.dataSource,dataOptions:e.dataOptions,styleOptions:y,filters:e.filters,highlights:e.highlights,refreshCounter:n,onHeightChange:i})}))}):null}),UAt=e=>{const t=[],n=r=>{Array.isArray(r)?r.forEach(n):typeof r=="object"&&r!==null&&(r.widgetid&&t.push(r.widgetid),Object.values(r).forEach(n))};return n(e.layout),t},GAt=e=>"levels"in e&&e.isCascading===!0;function YAt(e,t){if(!e)return[];return n(e);function n(r){var o,i;if(M2(r))return[{nodeType:"attribute",attribute:((i=(o=nJe(t,r.instanceid))==null?void 0:o.attribute)==null?void 0:i.name)||r.instanceid}];if(E2(r))return[{nodeType:"openBracket"},...n(r.left),{nodeType:"operator",operator:r.operator},...n(r.right),{nodeType:"closeBracket"}];throw new A2}}function dC(e=[],t=[],n){switch(n){case"widgetFirst":return d_(t,e);case"codeFirst":return d_(e,t);case"codeOnly":return t;default:return d_(e,t)}}var XAt=function(e){return e.FILTER="filter",e.SELECT="select",e}({});function _Y(e){return!!e&&e.min!==null&&e.max!==null}var qAt=function(e){return e.PRE="pre",e.POST="post",e}({});function Jce(e){return"formula"in e}function eue(e){return"formulaRef"in e}var jp=function(e){return e.CLICK="click",e.RIGHT_CLICK="rightclick",e.PIVOT_LINK="pivotlink",e.BLOX="blox",e}({});const ZAt=e=>({columns:(e.columns||[]).map(t=>({widthPercentage:t.width,rows:(t.cells||[]).map(n=>{const r=n.subcells.reduce((o,i)=>o+i.width,0);return{cells:n.subcells.map(o=>({widthPercentage:r<100?o.width/(r/100):o.width,height:o.elements[0].height,widgetId:o.elements[0].widgetid}))}})}))}),KAt=e=>ih(e.jaql,e.instanceid,e.disabled,e.locked),QAt=e=>{const{levels:t,instanceid:n,disabled:r,locked:o}=e,i=t.map(a=>ih(a,a.instanceid));return new i5(i,{guid:n,disabled:r,locked:o})};function JAt(e,t){const n=e.map(o=>GAt(o)?QAt(o):KAt(o));if(!t)return n;const r=ZQe(t,n);return!r||xj(r)?n:Xa(n,r)}const eOt=e=>e.subtype==="WidgetsTabber",tOt=e=>{switch(e){case 1:return jp.RIGHT_CLICK;case 2:return jp.PIVOT_LINK;case 3:return jp.CLICK;case 4:return jp.BLOX}return console.warn(`Unknown navigate type: ${e}, using CLICK instead`),jp.CLICK},nOt=e=>{const t=e.modalWindowMeasurement||yO.PERCENT;return je(Pe({},e),{modalWindowHeight:e.modalWindowHeight||(t===yO.PERCENT?85:800),modalWindowWidth:e.modalWindowWidth||(t===yO.PERCENT?85:1200),enabled:typeof e.enabled=="boolean"?e.enabled:!0,modalWindowMeasurement:t,navigateType:tOt(e.drillToDashboardNavigateType),drillTargets:e.dashboardIds.map(n=>({caption:n.caption,id:n.id||n.oid}))})};function rOt(e=[]){const t={};return e.forEach(n=>{var r,o,i,a;t[n.oid]=Pe({filtersOptions:{applyMode:((r=n.options)==null?void 0:r.dashboardFiltersMode)==="filter"?hb.FILTER:hb.HIGHLIGHT,shouldAffectFilters:(o=n.options)==null?void 0:o.selector,ignoreFilters:{all:(i=n.metadata.ignore)==null?void 0:i.all,ids:(a=n.metadata.ignore)==null?void 0:a.ids},forceApplyBackgroundFilters:!0}},(n==null?void 0:n.drillToDashboardConfig)&&{jtdConfig:nOt(n.drillToDashboardConfig)})}),t}function oOt(e=[]){const t={};return e.forEach(n=>{eOt(n)&&(t[n.oid]={tabs:n.style.tabs||[],activeTab:parseInt(n.style.activeTab||"1",10)})}),t}function iOt(e,t){return Co(this,null,function*(){var n;const r=aOt(e.widgets||[]);if(r.length===0)return e;const o=yield t.getSharedFormulas(r);return je(Pe({},e),{widgets:(n=e.widgets)==null?void 0:n.map(i=>sOt(i,o))})})}function aOt(e){const t=e.flatMap(n=>n.metadata.panels.flatMap(r=>r.items.flatMap(o=>!Jce(o.jaql)||!o.jaql.context?[]:Object.values(o.jaql.context).filter(eue).map(i=>i.formulaRef))));return Array.from(new Set(t))}function sOt(e,t){const n=e.metadata.panels.map(r=>{const o=r.items.map(i=>{const{jaql:a}=i;if(!Jce(a)||!a.context)return i;const s=Object.fromEntries(Object.entries(a.context).map(([l,c])=>eue(c)?[l,t[c.formulaRef]]:[l,c]));return je(Pe({},i),{jaql:je(Pe({},a),{context:s})})});return je(Pe({},r),{items:o})});return je(Pe({},e),{metadata:je(Pe({},e.metadata),{panels:n})})}function tue(e,t){return Co(this,arguments,function*(n,r,o={},i,a){var s,l;const{includeWidgets:c,includeFilters:d,sharedMode:h}=o,u=new Vh(n),w=["oid","title","datasource","style","settings"],y=((s=n.auth)==null?void 0:s.type)==="wat";c&&w.push("layout"),d&&(w.push("filters"),w.push("filterRelations"));const p=yield u.getDashboard(r,{fields:w,sharedMode:h});if(!p)throw new kt("errors.dashboardWithOidNotFound",{dashboardOid:r});if(c){let j;if(y){const F=UAt(p);j=(yield Promise.all(F.map(U=>u.getWidget(U,p.oid)))).filter(U=>U!==void 0)}else j=(yield u.getDashboardWidgets(r,h))||[];p.widgets=j}if((l=p.style)!=null&&l.paletteId&&!p.style.palette){const j=yield u.getPalettes(),F=j==null?void 0:j.find(({_id:U})=>{var H;return U===((H=p.style)==null?void 0:H.paletteId)});F&&(p.style.palette={name:F.name,colors:F.colors})}const k=yield iOt(p,u);return Z4(k,i,a)})}const lOt=(e,t)=>{const n={};for(const r of e){const o=t(r);o in n||(n[o]=r)}return Object.values(n)};function cOt(e){return Co(this,arguments,function*(t,n={}){const{includeWidgets:r,searchByTitle:o}=n,i=new Vh(t),a=[];let s=["oid","title","datasource"];r&&(s=[],a.push("widgets"));const l=yield i.getDashboards({fields:s,expand:a,searchByTitle:o});if(!l)return[];const c=lOt(l,d=>d.oid);return c.length!==l.length&&console.warn("Removing detected duplicate dashboard(s)"),c.map(d=>Z4(d))})}function nue(e){const t=xl(e,["dashboardOid"]),n=Qg(e,t),[r,o]=ls(Hd,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Ln(),{themeSettings:s}=Lt();return Je(()=>{if(i||o({type:"error",error:new kt("errors.sisenseContextNotFound")}),n(a)){o({type:"loading"});const{dashboardOid:l,includeWidgets:c,includeFilters:d,sharedMode:h}=e;tue(a.httpClient,l,{includeWidgets:c,includeFilters:d,sharedMode:h},s,a.settings).then(u=>{o({type:"success",data:u})}).catch(u=>{o({type:"error",error:u})})}},[a,i,e,n,s]),r.data&&t?W3(Hd(r,{type:"loading"})):W3(r)}function W3(e){const t=e,{data:n}=t,r=_n(t,["data"]);return je(Pe({},r),{dashboard:n})}function uOt(e){const t=e,{data:n}=t,r=_n(t,["data"]);return je(Pe({},r),{dashboards:n})}const rue=e=>Co(void 0,[e],function*({widgetOid:t,dashboardOid:n,includeDashboard:r,api:o}){const[i,a]=yield Promise.all([o.getWidget(t,n),r?o.getDashboard(n):void 0]);return{widget:i,dashboard:a}});function dOt(e,t,n,r,o){return Co(this,null,function*(){const i=new Vh(e),{widget:a}=yield rue({widgetOid:n,dashboardOid:t,api:i});if(!a)throw new kt("errors.widgetWithOidNotFound",{widgetOid:n});return B1(a,r,o)})}function pOt(e,t,n){var r;return n(e,function(o,i,a){if(t(o,i,a))return r=i,!1}),r}function hOt(e,t){return pOt(e,Dh(t),GI)}function fOt(e){return e.percent||e.type==="percent"?"Percent":e.currency?"Currency":"Numbers"}function mOt(e){return e.decimals!==void 0&&e.decimals!=="auto"?typeof e.decimals=="string"?Number.parseFloat(e.decimals):e.decimals:"auto"}function gOt(e){var t,n,r,o,i,a,s,l,c;const d=e.jaql.datatype==="numeric"||e.jaql.agg==="count"||"context"in e.jaql,h=(t=e.format)==null?void 0:t.mask;return d&&h?{decimalScale:mOt(h),kilo:(n=h.abbreviations)==null?void 0:n.k,million:(r=h.abbreviations)==null?void 0:r.m,billion:(o=h.abbreviations)==null?void 0:o.b,trillion:(i=h.abbreviations)==null?void 0:i.t,thousandSeparator:(s=(a=h.number)==null?void 0:a.separated)!=null?s:h.separated,prefix:((l=h.currency)==null?void 0:l.position)===qAt.PRE,symbol:(c=h.currency)==null?void 0:c.symbol,name:fOt(h)}:null}const vOt=!0;function yOt(e,t){if(!t||!vOt)return e;const{forecast:n,trend:r}=t;let o=Pe({},e);return n&&!n.isViewerDisabled&&n.isEnabled&&(o=je(Pe({},o),{forecast:{confidenceInterval:n.confidence/100,forecastHorizon:n.forecastPeriod,modelType:"auto"}})),r&&!r.isViewerDisabled&&r.isEnabled&&(o=je(Pe({},o),{trend:{modelType:r.trendType}})),o}const bOt=e=>{var t,n,r,o,i,a,s;return e.jaql&&"level"in e.jaql?(i=(n=(t=e.format)==null?void 0:t.mask)==null?void 0:n[e.jaql.level])!=null?i:(o=(r=e.format)==null?void 0:r.mask)==null?void 0:o.dateAndTime:(s=(a=e.format)==null?void 0:a.mask)==null?void 0:s.dateAndTime};function wh(e,t){var n,r,o,i,a,s,l,c;const d=qb(e.jaql,bOt(e),e.panel),h=gm((n=e.jaql.sort)!=null?n:e.categoriesSorting),u=gOt(e),w=(r=e.format)==null?void 0:r.subtotal,y=(o=e.format)==null?void 0:o.width;let p=s_((i=e.format)==null?void 0:i.color,t);const k=s_((a=e.format)==null?void 0:a.colorSecond,t),j=e.panel==="columns"&&e.panel;if(!p&&!((s=e.format)!=null&&s.color)&&e.format&&"colorIndex"in e.format&&(p=s_({type:"color",colorIndex:e.format.colorIndex},t)),zt.isMeasure(d)){const F=e.y2,U=e.singleSeriesType,H="subtotalAgg"in e.jaql&&e.jaql.subtotalAgg,R=(l=e.format)==null?void 0:l.databars,z=Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe({column:d},p&&{color:p}),k&&{dataBarsColor:k}),F&&{showOnRightAxis:F}),h&&{sortType:h}),U&&{chartType:U}),u&&{numberFormatConfig:u}),H&&{totalsCalculation:H}),R&&{dataBars:R}),y&&{width:y}),j&&{panel:j});return yOt(z,e.statisticalModels)}return Pe(Pe(Pe(Pe(Pe(Pe({column:d,isColored:(c=e.isColored)!=null?c:!1},h&&{sortType:h}),u&&{numberFormatConfig:u}),w&&{includeSubTotals:w}),y&&{width:y}),p&&{color:p}),j&&{panel:j})}function Vc(e){const t=e.column;let n;if(zt.isAttribute(t))n=t.jaql(!0);else if(zt.isMeasure(t))n=t.jaql(!0);else throw new kt("errors.unsupportedDimensionalElement");return n.jaql?n:{jaql:n}}const xOt=(e,t)=>{const n={};return e.forEach(r=>{r.name!=="filters"&&(n[ace(r.name)]=co(e,r.name,t))}),n};function V3(e,t,n){return ei(e,t).map(y2).map(n)}function co(e,t,n){return V3(e,t,r=>wh(r,n))}function wOt(e,t,n){var r,o;const i=["chart/line","chart/area"].includes(t)?"x-axis":"categories",a=co(e,i,n),s=co(e,"values",n),l=co(e,"break by",n),c=(o=(r=ei(e,"break by")[0])==null?void 0:r.format)==null?void 0:o.members,d=c&&b2(c);return Pe({category:a,value:s,breakBy:l},d&&{seriesToColorMap:d})}function _Ot(e,t,n){var r,o,i,a;const s=co(t,"categories",n),l=co(t,"values",n),c=co(t,"size",n);let d,h;return e==="sunburst"?h=lXe(ei(t,"categories")):(d=(o=(r=ei(t,"categories")[0])==null?void 0:r.format)==null?void 0:o.members,ei(t,"color").length&&(d=(a=(i=ei(t,"color")[0])==null?void 0:i.format)==null?void 0:a.members),h=d&&b2(d)),Pe({category:s,value:[...l,...c]},h&&{seriesToColorMap:h})}function SOt(e,t){var n,r;const[o]=co(e,"x-axis",t),[i]=co(e,"y-axis",t),[a]=co(e,"point",t),[s]=co(e,"Break By / Color",t),[l]=co(e,"size",t),c=(r=(n=ei(e,"Break By / Color")[0])==null?void 0:n.format)==null?void 0:r.members,d=c&&b2(c);return Pe({x:o,y:i,breakByPoint:a,breakByColor:s,size:l},d&&{seriesToColorMap:d})}function COt(e,t){const n=co(e,"value",t),r=co(e,"secondary",t),o=co(e,"min",t),i=co(e,"max",t);return{value:n,secondary:r,min:o,max:i}}function kOt(e,t){return{columns:co(e,"columns",t)}}function TOt(e,t,n){let r;const o={},i=co(e,"columns",n),a=V3(e,"values",(s,l)=>{var c,d,h,u,w;const{field:y,jaql:p}=s,{sortDetails:k}=p;k&&(r=k),y&&(o[y.index]=l),((d=(c=s.format)==null?void 0:c.color)==null?void 0:d.type)==="color"&&!((u=(h=s.format)==null?void 0:h.color)!=null&&u.color)&&delete s.format.color;const j=wh(s,n);return typeof j.color!="string"&&((w=j.color)==null?void 0:w.type)==="conditional"&&delete j.color.defaultColor,j});return{rows:V3(e,"rows",(s,l,c)=>{var d;const h=l===c.length-1;let{sortDetails:u}=s==null?void 0:s.jaql;const w=wh(s,n);w.column&&zt.isAttribute(w.column)&&(w.column=w.column.sort(Zn.None)),h&&r&&(u=r);const y=(u==null?void 0:u.field)!==((d=s.field)==null?void 0:d.index);return u&&(w.sortType=Pe({direction:gm(u.dir)},y&&{by:{valuesIndex:o[u.field],columnsMembersPath:Object.values(u.measurePath||{})}})),w}),columns:i,values:a,grandTotals:{rows:t.rowsGrandTotal,columns:t.columnsGrandTotal}}}function MOt(e){const t={"whisker/iqr":"iqr","whisker/extremums":"extremums","whisker/deviation":"standardDeviation"},n=hOt(e.whisker,r=>r);return t[n]}function EOt(e,t,n){const r=co(e,"category",n),o=co(e,"value",n),i=MOt(t),a=t.outliers.enabled;return{category:r,value:o,boxType:i,outliersEnabled:a}}function AOt(e,t){return ei(e,"geo").map(y2).map(n=>{const r=wh(n,t);return"geoLevel"in n?je(Pe({},r),{level:n.geoLevel}):r})}function OOt(e,t){const n=AOt(e,t),r=co(e,"size",t)[0],o=co(e,"color",t)[0],i=co(e,"details",t)[0];return{geo:n,size:r,colorBy:o,details:i}}function POt(e,t){const n=[co(e,"geo",t)[0]],r=co(e,"color",t)[0];return Pe({geo:n},r&&{color:[r]})}function U3(e,t){const n="dim"in e.jaql?je(Pe({},e),{jaql:je(Pe({},e.jaql),{datasource:t})}):e,r=e.parent?U3(e.parent,t):void 0,o=e.through?U3(e.through,t):void 0;return je(Pe({},n),{parent:r,through:o})}function DOt(e,t){return e.map(n=>je(Pe({},n),{items:n.items.map(r=>U3(r,t))}))}function LOt(e,t,n,r){if(NOt(e))return wOt(t,e,r);if(IOt(e))return _Ot(e,t,r);if(e==="chart/scatter")return SOt(t,r);if(e==="indicator")return COt(t,r);if(MYe(e))return kOt(t,r);if(QR(e))return TOt(t,n,r);if(e==="chart/boxplot")return EOt(t,n,r);if(e==="map/scatter")return OOt(t,r);if(e==="map/area")return POt(t,r);if(e==="richtexteditor")return{};throw new kt("errors.unsupportedWidgetType",{widgetType:e})}function NOt(e){return["chart/line","chart/area","chart/bar","chart/column","chart/polar"].includes(e)}function IOt(e){return["chart/pie","chart/funnel","treemap","sunburst"].includes(e)}function tf(e,t){const n=_re(e);return Pe(Pe({},t),n&&{subtype:n})}function iu(e){const{min:t,max:n}=e||{};return je(Pe({},e),{min:typeof t=="number"?t:null,max:typeof n=="number"?n:null})}function ROt(e,t,n){var r,o,i,a,s,l,c,d,h,u;const w={xAxis:iu(t.xAxis),yAxis:iu(t.yAxis),y2Axis:iu(t.y2Axis)},y=["chart/line","chart/area"].includes(e)?"x-axis":"categories",p=ei(n,y),k=ei(n,"values"),j=p.length===2;j&&(w.xAxis=je(Pe({},w.xAxis),{title:(r=w.xAxis)==null?void 0:r.x2Title,x2Title:(o=w.xAxis)==null?void 0:o.title}));const F=!!((i=w.xAxis)!=null&&i.title&&"text"in w.xAxis.title),U=p[p.length-1];!F&&U&&(w.xAxis=je(Pe({},w.xAxis),{title:je(Pe({},(a=w.xAxis)==null?void 0:a.title),{text:U.jaql.title})}));const H=!!((s=w.xAxis)!=null&&s.x2Title&&"text"in w.xAxis.x2Title),R=p[0];!H&&j&&(w.xAxis=je(Pe({},w.xAxis),{x2Title:je(Pe({},(l=w.xAxis)==null?void 0:l.x2Title),{text:R.jaql.title})}));const z=!!((c=w.yAxis)!=null&&c.title&&"text"in w.yAxis.title),I=k.filter(A=>!A.y2);!z&&I.length===1&&(w.yAxis=je(Pe({},w.yAxis),{title:je(Pe({},(d=w.yAxis)==null?void 0:d.title),{text:I[0].jaql.title})}));const N=!!((h=w.y2Axis)!=null&&h.title&&"text"in w.y2Axis.title),W=k.filter(A=>A.y2);return!N&&W.length===1&&(w.y2Axis=je(Pe({},w.y2Axis),{title:je(Pe({},(u=w.y2Axis)==null?void 0:u.title),{text:W[0].jaql.title})})),w}function jOt(e,t){var n,r;const o={xAxis:iu(e.categories),yAxis:iu(e.axis)},i=ei(t,"categories")[0];return!((n=o.xAxis)!=null&&n.title&&"text"in o.xAxis.title)&&i&&(o.xAxis=je(Pe({},o.xAxis),{title:je(Pe({},(r=o.xAxis)==null?void 0:r.title),{text:i.jaql.title})})),o.yAxis=je(Pe({},o.yAxis),{title:{enabled:!1}}),o}function zOt(e,t){var n,r,o,i;const a={xAxis:iu(e.xAxis),yAxis:iu(e.yAxis)},s=ei(t,"x-axis")[0],l=ei(t,"y-axis")[0];return!((n=a.xAxis)!=null&&n.title&&"text"in a.xAxis.title)&&s&&(a.xAxis=je(Pe({},a.xAxis),{title:je(Pe({},(r=a.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((o=a.yAxis)!=null&&o.title&&"text"in a.yAxis.title)&&l&&(a.yAxis=je(Pe({},a.yAxis),{title:je(Pe({},(i=a.yAxis)==null?void 0:i.title),{text:l.jaql.title})})),a}function BOt(e,t){var n,r,o,i;const a={xAxis:iu(e.xAxis),yAxis:iu(e.yAxis)},s=ei(t,"category")[0],l=ei(t,"value")[0];return!((n=a.xAxis)!=null&&n.title&&"text"in a.xAxis.title)&&s&&(a.xAxis=je(Pe({},a.xAxis),{title:je(Pe({},(r=a.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((o=a.yAxis)!=null&&o.title&&"text"in a.yAxis.title)&&l&&(a.yAxis=je(Pe({},a.yAxis),{title:je(Pe({},(i=a.yAxis)==null?void 0:i.title),{text:l.jaql.title})})),a}function $Ot(e,t){var n,r,o,i,a,s,l,c,d,h,u,w,y,p,k,j,F,U,H,R,z;const I=((n=t.seriesLabels)==null?void 0:n.enabled)&&((i=(o=(r=t.seriesLabels)==null?void 0:r.labels)==null?void 0:o.types)==null?void 0:i.totals),N=e==="area/stacked"||e==="area/stackedspline"||e==="column/stackedcolumn"||e==="bar/stacked",W=e==="area/stacked100"||e==="area/stackedspline100"||e==="column/stackedcolumn100"||e==="bar/stacked100";let A=(s=(a=t.seriesLabels)==null?void 0:a.enabled)!=null?s:!1;return(N||W)&&(A=!!(N&&(d=(c=(l=t.seriesLabels)==null?void 0:l.labels)==null?void 0:c.types)!=null&&d.relative||W&&(w=(u=(h=t.seriesLabels)==null?void 0:h.labels)==null?void 0:u.types)!=null&&w.count)),je(Pe({},I&&{totalLabels:{enabled:I,rotation:(p=(y=t.seriesLabels)==null?void 0:y.rotation)!=null?p:0}}),{seriesLabels:{enabled:(j=(k=t.seriesLabels)==null?void 0:k.enabled)!=null?j:!1,rotation:(U=(F=t.seriesLabels)==null?void 0:F.rotation)!=null?U:0,showValue:A,showPercentage:!!(W&&(z=(R=(H=t.seriesLabels)==null?void 0:H.labels)==null?void 0:R.types)!=null&&z.percentage)}})}function FOt(e,t,n,r){return je(Pe(Pe(Pe({},tf(t,n)),ROt(e,n,r)),$Ot(t,n)),{lineWidth:n.lineWidth,markers:n.markers})}function HOt(e,t,n){return Pe(Pe({},tf(e,t)),jOt(t,n))}function WOt(e,t,n){var r,o,i;return je(Pe(Pe({},tf(e,t)),zOt(t,n)),{markerSize:{scatterDefaultSize:(r=t.markerSize)==null?void 0:r.defaultSize,scatterBubbleMinSize:(o=t.markerSize)==null?void 0:o.min,scatterBubbleMaxSize:(i=t.markerSize)==null?void 0:i.max}})}function VOt(e){return{header:{color:{enabled:e["colors/headers"]}},rows:{alternatingColor:{enabled:e["colors/rows"]}},columns:{alternatingColor:{enabled:e["colors/columns"]}}}}function UOt(e,t){return je(Pe({},tf(e,t)),{funnelSize:t.size,funnelType:t.type,funnelDirection:t.direction,labels:t.labels,legend:t.legend})}const GOt=(e,t)=>{const n=_re(e);return n==="indicator/gauge"?{subtype:n,skin:+t.skin}:t.subtype==="bar"?{subtype:n,numericSubtype:"numericBar"}:{subtype:n,numericSubtype:"numericSimple",skin:t.skin}};function YOt(e,t,n){var r,o,i,a,s,l,c,d;const h=GOt(e,t),u=(r=ei(n,"value")[0])==null?void 0:r.jaql.title,w=(o=ei(n,"secondary")[0])==null?void 0:o.jaql.title;return je(Pe({},h),{indicatorComponents:{title:{shouldBeShown:((a=(i=t.components)==null?void 0:i.title)==null?void 0:a.enabled)||!1,text:u},secondaryTitle:{text:w||""},ticks:{shouldBeShown:((l=(s=t.components)==null?void 0:s.ticks)==null?void 0:l.enabled)||!1},labels:{shouldBeShown:((d=(c=t.components)==null?void 0:c.labels)==null?void 0:d.enabled)||!1}}})}function XOt(e){var t,n,r,o;return{labels:{category:[{enabled:(t=e["title/1"])!=null?t:!0},{enabled:(n=e["title/2"])!=null?n:!0},{enabled:(r=e["title/3"])!=null?r:!0}]},tooltip:{mode:(o=e["tooltip/value"])==null||o?"value":"contribution"}}}function qOt(e){var t;return{legend:{enabled:e["legend/enabled"],position:e["legend/position"]},tooltip:{mode:(t=e["tooltip/value"])==null||t?"value":"contribution"}}}function ZOt(e,t,n){return Pe(Pe({},tf(e,t)),BOt(t,n))}function KOt(e,t){return je(Pe({},tf(e,t)),{markers:{fill:t.markers.fill,size:{defaultSize:t.markers.size.defaultSize,minSize:t.markers.size.min,maxSize:t.markers.size.max}}})}function QOt(e){let t;switch(e){case"areamap/world":t="world";break;case"areamap/usa":t="usa";break;default:throw new kt("errors.unsupportedWidgetType",{widgetSubtype:e})}return{mapType:t}}function JOt(e){var t,n,r,o,i;return{rowsPerPage:parseInt(`${e.pageSize}`),isAutoHeight:e.automaticHeight,rowHeight:e.rowHeight,alternatingRowsColor:(t=e.colors)==null?void 0:t.rows,alternatingColumnsColor:(n=e.colors)==null?void 0:n.columns,headersColor:(r=e.colors)==null?void 0:r.headers,membersColor:(o=e.colors)==null?void 0:o.members,totalsColor:(i=e.colors)==null?void 0:i.totals}}function ePt(e,t){var n,r,o;const{subtype:i,style:a,metadata:{panels:s}}=t;switch(e){case"chart/line":case"chart/area":case"chart/bar":case"chart/column":{const l=FOt(e,i,a,s);if(l.navigator){const c=(n=t.options)==null?void 0:n.previousScrollerLocation;l.navigator.scrollerLocation=_Y(c)?c:void 0}return l}case"chart/polar":return HOt(i,a,s);case"chart/scatter":return WOt(i,a,s);case"chart/funnel":return UOt(i,a);case"treemap":return XOt(a);case"sunburst":return qOt(a);case"chart/pie":return tf(i,a);case"tablewidget":case"tablewidgetagg":return VOt(a);case"pivot":case"pivot2":return JOt(a);case"indicator":return YOt(i,a,s);case"chart/boxplot":{const l=ZOt(i,a,s);return l.navigator&&(l.navigator.scrollerLocation=_Y((r=t.options)==null?void 0:r.previousScrollerLocation)?(o=t.options)==null?void 0:o.previousScrollerLocation:void 0),l}case"map/scatter":return KOt(i,a);case"map/area":return QOt(i);case"richtexteditor":return a.content;default:throw new kt("errors.unsupportedWidgetType",{widgetType:e})}}const oue=e=>({backgroundColor:e.widgetBackgroundColor,spaceAround:ad[e.widgetSpacing],cornerRadius:ad[e.widgetCornerRadius],shadow:ad[e.widgetShadow],border:e.widgetBorderEnabled,borderColor:e.widgetBorderColor,header:{titleTextColor:e.widgetTitleColor,titleAlignment:ad[e.widgetTitleAlignment],dividerLine:e.widgetTitleDividerEnabled,dividerLineColor:e.widgetTitleDividerColor,backgroundColor:e.widgetTitleBackgroundColor}});function tPt(e,t,n){if(!t||!n)return e;const r=oue(t);return Pe(Pe({},e),r)}function nPt(e,t){return e&&e.length?Yj(e,Dh(t)):[]}function rPt(e,t){var n;const r=(n=e==null?void 0:e.findIndex(o=>o===t))!=null?n:-1;return r===-1?[]:e.slice(r)}const iue=e=>e!=null&&e.parent?[...iue(e.parent),wh(e).column]:[],aue=e=>{var t,n,r;if(e!=null&&e.parent&&e.through&&"filter"in e.through.jaql){const o=wh(e).column,{jaql:i,format:{mask:a}={}}=e.parent,s="level"in i&&i.level&&a&&a[i.level],l=(r=(n=(t=e.through.jaql.filter)==null?void 0:t.members)==null?void 0:n.map(s?c=>({categoryValue:c,categoryDisplayValue:np(c1(c),s)}):c=>({categoryValue:c})))!=null?r:[];return[...aue(e.parent),{nextDimension:o,points:l}]}return[]};function oPt(e){switch(e){case"chart/line":case"chart/area":return["x-axis"];case"chart/boxplot":return["category"];case"chart/scatter":return["x-axis","y-axis","point","Break By / Color"];default:return["categories"]}}const iPt=(e,t)=>{const n=oPt(e).map(r=>ei(t,r)).flat().filter(r=>{const o="agg"in r.jaql&&r.jaql.agg,i="formula"in r.jaql&&r.jaql.formula;return!o&&!i});return n.length===1?n[0]:void 0},sue="calendar",lue="calendar - weeks",aPt=[nt.Years,nt.Quarters,nt.Months,nt.Days],sPt=[nt.Years,nt.Weeks,nt.Days],lPt=[nt.Years,nt.Quarters,nt.Months,nt.Weeks,nt.Days],cPt=e=>e.length===2?lPt:e[0]===sue?aPt:e[0]===lue?sPt:[],uPt=(e,t)=>{const[n=[],r]=N1(e,i=>[sue,lue].includes(i)),o=rPt(cPt(n),t.granularity);return o.length?[{title:"Calendar Hierarchy",levels:o.map(i=>new oo(`${i} in ${t.name}`,t.expression,i,oo.getDefaultFormatForGranularity(i)))},...r]:r},dPt=e=>{const t=e&&wh(e),n=(e==null?void 0:e.hierarchies)||[];return t&&Di(t.column.type)?(t.column.name=(e==null?void 0:e.jaql).column,uPt(n,t.column)):n},pPt=(e,t,n=[],r)=>{const o=iPt(e,t),i=o&&y2(o),a=aue(o),s=dPt(i);return{drilldownPaths:[...nPt([...o?iue(o):[]],({expression:l})=>l),...s],drilldownSelections:a}};function X4(e){const t=e.filter,{filter:n}=t,r=_n(t,["filter"]),o=n&&"turnedOff"in n&&n.turnedOff;let i,a;return o?a=n:i=n,r.members&&r.members.length===0&&(r.all=!0),{filter:r,backgroundFilter:i,turnOffMembersFilter:a}}function hPt(e){const{filter:t,backgroundFilter:n,turnOffMembersFilter:r}=X4(e.jaql),o=[je(Pe({},e),{jaql:je(Pe({},e.jaql),{filter:Pe(Pe({},t),r&&{filter:r})})})];return n&&o.push(je(Pe({},e),{jaql:je(Pe({},e.jaql),{filter:n}),disabled:!1})),o}function fPt(e){const t=e.find(r=>r.name==="filters"),n=[];return t==null||t.items.forEach(r=>{n.push(...hPt(r).filter(({disabled:o})=>!o))}),n}function mPt(e){return fPt(e).map(t=>ih(t.jaql,t.instanceid))}function cue(e){if(ip(e.widgetType))throw new q4("toExecuteQueryParams");let t,n,r,o;if(m2(e)){const{attributes:i,measures:a}=Xj(gae(e.dataOptions));t=i,n=a,r=xle*wle+1,o=!0}else{const{attributes:i,measures:a}=yae(e.dataOptions,e.chartType);t=i,n=a}return{dataSource:e.dataSource,dimensions:t,measures:n,filters:e.filters,highlights:e.highlights,count:r,ungroup:o}}function uue(e){if(!ip(e.widgetType))throw new kt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toExecutePivotQueryParams"});const{rows:t,columns:n,values:r,grandTotals:o}=Kce(vae(e.dataOptions));return{dataSource:e.dataSource,rows:t,columns:n,values:r,grandTotals:o,filters:e.filters,highlights:e.highlights}}function gPt(e){if(ip(e.widgetType))throw new q4("toChartProps");if(g2(e.widgetType))throw new wue("toChartProps");return m2(e)?Pe({chartType:e.chartType},due(e)):{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function due(e){if(!m2(e))throw new kt("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters}}function vPt(e){if(!ip(e.widgetType))throw new kt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function pue(e){if(ip(e.widgetType))throw new q4("toChartWidgetProps");if(g2(e.widgetType))throw new wue("toChartWidgetProps");return{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||"",drilldownOptions:e.drilldownOptions}}function yPt(e){if(!m2(e))throw new kt("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,title:e.title,description:e.description||""}}function hue(e){if(!ip(e.widgetType))throw new kt("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function fue(e){if(!g2(e.widgetType))throw new kt("errors.widgetModel.onlyTextWidgetSupported",{methodName:"toTextWidgetProps"});return{styleOptions:e.styleOptions}}function mue(e){if(!Cre(e.widgetType))throw new kt("errors.widgetModel.onlyCustomWidgetSupported",{methodName:"toCustomWidgetProps"});return{customWidgetType:e.customWidgetType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function gue(e){const{widgetType:t}=e;return ip(t)?Pe({widgetType:"pivot"},hue(e)):g2(t)?Pe({widgetType:"text"},fue(e)):Cre(t)?Pe({widgetType:"custom"},mue(e)):Pe({widgetType:"chart"},pue(e))}function vue(e){const{oid:t}=e;return je(Pe({},gue(e)),{id:t})}const yue={oid:"",title:"",dataSource:"",description:"",widgetType:"custom",customWidgetType:"",dataOptions:{},styleOptions:{},drilldownOptions:{},filters:[],highlights:[],chartType:void 0};function B1(e,t,n){var r,o,i,a;let s,l,c,d;const h=DOt(e.metadata.panels,e.datasource);if(s=e.type,TYe(s)){c=LOt(s,h,e.style,t==null?void 0:t.palette.variantColors),d=ePt(s,e);const p=(a=(i=(o=n==null?void 0:n.serverFeatures)==null?void 0:o.widgetDesignStyle)==null?void 0:i.active)!=null?a:!0;d=tPt(d,e.style.widgetDesign,p)}else{l=s,s="custom",c=xOt(h,(r=t==null?void 0:t.palette.variantColors)!=null?r:[]);const p=e.style,{widgetDesign:k}=p,j=_n(p,["widgetDesign"]);d=Pe(Pe({},j),k?oue(k):{})}const u=pPt(s,h),w=mPt(h),y=kre(s)?_Ye(s):void 0;return je(Pe({},yue),{oid:e.oid,title:e.title,dataSource:Xb(e.datasource),description:e.desc||"",widgetType:kYe(s),chartType:y,customWidgetType:l||"",dataOptions:c||{},styleOptions:d||{},drilldownOptions:u,filters:w})}function bue(e){return je(Pe(Pe({},yue),e),{filters:e.filters||[],widgetType:"chart"})}function bPt(e){if(wu(e))return bue(e);throw new kt("errors.otherWidgetTypesNotSupported")}function xue(e,t){const n=t||e.dataSource;if(typeof n=="string")throw new SY("dataSource");if(!n.id||!n.live&&!n.address)throw new SY("dataSource");const r=e.chartType;let o=CYe(e.widgetType,r),i={},a=e.styleOptions.subtype||"";if(!r)throw new Error("Chart type is required");const s=[];if(El(r)){const c=["chart/line","chart/area"].includes(o)?"x-axis":"categories",d=e.dataOptions.category.map(y=>Vc(pi(y))),h={name:c,items:d};s.push(h);const u=e.dataOptions.value.map(y=>Vc(mo(y)));s.push({name:"values",items:u});const w=e.dataOptions.breakBy.map(y=>Vc(pi(y)));s.push({name:"break by",items:w}),r==="polar"?a="column/polar":r==="bar"?a=a||"bar/classic":r==="column"?a=a||"column/classic":r==="area"?a=a||"area/basic":r==="line"&&(a=a||"line/basic")}else if(YR(r)){const{attributes:c,measures:d}=Xj(e.dataOptions),h=[...c.map(u=>Vc(pi(u))),...d.map(u=>Vc(mo(u)))];s.push({name:"columns",items:h}),o="tablewidget"}else if(Bg(r))["value","min","max","secondary"].forEach(c=>{const d=(e.dataOptions[c]||[]).map(h=>Vc(mo(h)));s.push({name:c,items:d})}),a=a||"indicator/numeric",i=je(Pe({},a==="indicator/gauge"?{subtype:"round",skin:"1"}:{subtype:"simple",skin:"vertical"}),{components:{ticks:{inactive:!1,enabled:!0},labels:{inactive:!1,enabled:!0},title:{inactive:!1,enabled:!0},secondaryTitle:{inactive:!0,enabled:!0}}});else if(rp(r)){const c=e.dataOptions.category.map(u=>Vc(nu(u)));s.push({name:"categories",items:c});const d=e.dataOptions.value.map(u=>Vc(nu(u))),h=r==="treemap";s.push({name:h?"size":"values",items:d}),h&&["color","values"].forEach(u=>{s.push({name:u,items:[]})}),r==="pie"?(a=a||"pie/basic",i={convolution:{enabled:!0,selectedConvolutionType:"bySlicesCount",minimalIndependentSlicePercentage:3,independentSlicesCount:7}}):r==="treemap"||r==="sunburst"?a=a||r:r==="funnel"&&(a=a||"chart/funnel")}else if(vl(r))["x","y","size","breakByColor","breakByPoint"].forEach(c=>{if(e.dataOptions[c]){const d={breakByColor:"Break By / Color",breakByPoint:"point",x:"x-axis",y:"y-axis"},h=[Vc(nu(e.dataOptions[c]))];s.push({name:d[c]||c,items:h})}}),a=a||"bubble/scatter";else throw new xPt(r);const l=(e.filters||[]).map(c=>c.jaql());return s.push({name:"filters",items:l}),{oid:e.oid||"",title:e.title,desc:e.description,datasource:n,type:o,metadata:{panels:s},style:i,subtype:a}}class SY extends kt{constructor(t){super("errors.widgetModel.incomleteWidget",{prop:t})}}class xPt extends kt{constructor(t){super("errors.widgetModel.unsupportedWidgetTypeDto",{chartType:t})}}class q4 extends kt{constructor(t){super("errors.widgetModel.pivotWidgetNotSupported",{methodName:t})}}class wue extends kt{constructor(t){super("errors.widgetModel.textWidgetNotSupported",{methodName:t})}}const wPt=Object.freeze(Object.defineProperty({__proto__:null,fromChartWidgetProps:bue,fromWidgetDto:B1,fromWidgetProps:bPt,toChartProps:gPt,toChartWidgetProps:pue,toCommonWidgetProps:gue,toCustomWidgetProps:mue,toExecutePivotQueryParams:uue,toExecuteQueryParams:cue,toPivotTableProps:vPt,toPivotTableWidgetProps:hue,toTableProps:due,toTableWidgetProps:yPt,toTextWidgetProps:fue,toWidgetDto:xue,toWidgetProps:vue},Symbol.toStringTag,{value:"Module"}));function FT(e){const{title:t,dataSource:n,widgets:r,layoutOptions:o,filters:i,widgetsOptions:a,tabbersOptions:s,styleOptions:l}=e;return{title:t,defaultDataSource:n,widgets:r.map(vue),layoutOptions:o,config:{},filters:i,widgetsOptions:a,styleOptions:l,tabbersOptions:s}}function Z4(e,t,n){var r;const{oid:o,title:i,datasource:a,widgets:s,layout:l,filters:c,filterRelations:d,style:h,settings:u}=e,w=Xb(a),y=Pe({},h!=null&&h.palette?{palette:{variantColors:h==null?void 0:h.palette.colors}}:null),p=t&&Pe(Pe({},t),y.palette?{palette:y.palette}:null),k=(s==null?void 0:s.map(z=>B1(z,p,n)))||[],j=l?ZAt(l):{columns:[]},F=(r=d==null?void 0:d[0])==null?void 0:r.filterRelations,U=JAt(c||[],F),H=rOt(s),R=oOt(s);return{oid:o,title:i,dataSource:w,styleOptions:y,widgets:k,layoutOptions:{widgetsPanel:j},filters:U,widgetsOptions:H,tabbersOptions:R,settings:u}}const _Pt=Object.freeze(Object.defineProperty({__proto__:null,fromDashboardDto:Z4,toDashboardProps:FT},Symbol.toStringTag,{value:"Module"}));function SPt(e){return ui(e)?CPt(e):K4(e)}function K4(e){return Pi(e)?kPt(e):Gb(e)?TPt(e):Q4(e)}function CPt(e){return{isCascading:!0,instanceid:e.config.guid,disabled:e.config.disabled,levels:e.filters.map(t=>{const n=K4(t);return je(Pe({},n.jaql),{instanceid:n.instanceid})})}}function Q4(e){const{config:{disabled:t}}=e,n=Object.assign(Object.create(e),{config:je(Pe({},e.config),{disabled:!1})}).jaql(!0);return{jaql:je(Pe({},n),{table:y5(e.attribute),column:rk(e.attribute)}),disabled:t,instanceid:e.config.guid,isCascading:!1}}function kPt(e){const t=Q4(e);return t.jaql.filter.multiSelection=e.config.enableMultiSelection,e.config.deactivatedMembers.length>0&&(e.config.excludeMembers?t.jaql.filter.exclude.members=[...e.members,...e.config.deactivatedMembers]:t.jaql.filter.members=[...e.members,...e.config.deactivatedMembers]),e.config.backgroundFilter&&G3(t.jaql,K4(e.config.backgroundFilter).jaql.filter),e.config.deactivatedMembers.length>0&&G3(t.jaql,{exclude:{members:e.config.deactivatedMembers},turnedOff:!0}),t}function TPt(e){const t=Q4(e);if(e.measure instanceof Ub){const n=t.jaql.filter;n.by.table=y5(e.measure.attribute),n.by.column=rk(e.measure.attribute),n.rankingMessage=e.measure.name}return t}function G3(e,t){if(e.filter)return G3(e.filter,t);e.filter=t}function CY(e){const t="500px";return{columns:e.columns.map(n=>({width:n.widthPercentage,cells:n.rows.map(r=>({subcells:r.cells.map(o=>{var i;return{width:o.widthPercentage,elements:[{widgetid:o.widgetId,height:(i=o.height)!=null?i:t}]}})}))}))}}var JO=function(e){return e.DASHBOARD_INIT="DASHBOARD.INIT",e.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE="UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE",e}({}),pC=function(e){return e.FILTERS_UPDATE="FILTERS.UPDATE",e.ADD_WIDGET="WIDGETS.ADD",e.WIDGETS_PANEL_LAYOUT_UPDATE="WIDGETS_PANEL_LAYOUT.UPDATE",e.WIDGETS_DELETE="WIDGETS.DELETE",e}({});function MPt(e,t){var n,r;switch(t.type){case"DASHBOARD.INIT":return Pe(Pe({},e),t.payload);case"FILTERS.UPDATE":return je(Pe({},e),{filters:t.payload});case"WIDGETS_PANEL_LAYOUT.UPDATE":return je(Pe({},e),{layoutOptions:je(Pe({},e.layoutOptions),{widgetsPanel:t.payload})});case"WIDGETS.DELETE":return je(Pe({},e),{widgets:e.widgets.filter(o=>!t.payload.includes(o.oid))});case"UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE":return je(Pe({},e),{layoutOptions:je(Pe({},e.layoutOptions),{widgetsPanel:t.payload.widgetsPanel}),widgets:e.widgets.filter(o=>!t.payload.widgets.includes(o.oid))});case"WIDGETS.ADD":{const o=[...e.widgets,t.payload],i=[...((r=(n=e==null?void 0:e.layoutOptions)==null?void 0:n.widgetsPanel)==null?void 0:r.columns)||[]];return i[0]&&(i[0].rows.length||i[0].rows.push({cells:[]}),i[0].rows[0].cells.push({widgetId:t.payload.oid,widthPercentage:100})),je(Pe(Pe({},e),e!=null&&e.layoutOptions.widgetsPanel?{layoutOptions:je(Pe({},e==null?void 0:e.layoutOptions),{widgetsPanel:je(Pe({},e==null?void 0:e.layoutOptions.widgetsPanel),{columns:i})})}:null),{widgets:o})}default:return e}}function EPt(e){const{filters:t,relations:n}=yl(e),r=t.map(SPt),o=tJe(n,t),i=OPt(t);return{filters:r,filterRelations:o?[{datasource:i,filterRelations:o}]:void 0}}function APt(e,t,n,r){return Co(this,null,function*(){if(!e)throw new Error("Dashboard model is not initialized");switch(t.type){case"FILTERS.UPDATE":yield n.patchDashboard(e,EPt(t.payload));break;case"WIDGETS.ADD":{const o=yield n.addWidgetToDashboard(e,xue(t.payload),r);if(!o)throw new Error("Failed to add widget to dashboard");return{type:"WIDGETS.ADD",payload:B1(o)}}case"WIDGETS_PANEL_LAYOUT.UPDATE":yield n.patchDashboard(e,{layout:CY(t.payload)},r);break;case"WIDGETS.DELETE":yield Promise.all(t.payload.map(o=>n.deleteWidgetFromDashboard(e,o,r)));break;case"UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE":yield n.patchDashboard(e,{layout:CY(t.payload.widgetsPanel)},r),yield Promise.all(t.payload.widgets.map(o=>n.deleteWidgetFromDashboard(e,o,r)));break}return t})}function OPt(e){const t=new Set(e.map(n=>{var r;return(r=n.dataSource)==null?void 0:r.title}));if(t.size>1)throw new Error("Persisting filters from multiple datasources is not supported now");return t.values().next().value}function PPt(e){return e.type===pm.FILTERS_UPDATE?{type:pC.FILTERS_UPDATE,payload:e.payload}:e.type===pm.WIDGETS_PANEL_LAYOUT_UPDATE?{type:pC.WIDGETS_PANEL_LAYOUT_UPDATE,payload:e.payload}:null}function DPt(e,t){return e==="wat"?(t&&console.warn('WAT authentication does not support persistence. The changes will not be saved. Set "persist" flag to false to avoid this warning.'),!1):!0}var Wa=function(e){return e.PLACE_LEFT="PLACE_LEFT",e.PLACE_RIGHT="PLACE_RIGHT",e.SWAP="SWAP",e.NEW_ROW="NEW_ROW",e}({});function LPt(e,t,n,r){return je(Pe({},e),{columns:e.columns.map((o,i)=>i===n?je(Pe({},o),{rows:o.rows.map((a,s)=>s===r?je(Pe({},a),{cells:a.cells.map(l=>je(Pe({},l),{height:t}))}):a)}):o)})}function kY(e,t,n,r){return!Id(n)&&!Id(r)?e.columns[n].rows[r].cells.length!==t.length?e:je(Pe({},e),{columns:e.columns.map((o,i)=>i===n?je(Pe({},o),{rows:o.rows.map((a,s)=>s===r?je(Pe({},a),{cells:a.cells.map((l,c)=>je(Pe({},l),{widthPercentage:t[c]}))}):a)}):o)}):e.columns.length!==t.length?e:je(Pe({},e),{columns:e.columns.map((o,i)=>je(Pe({},o),{widthPercentage:t[i]}))})}function NPt(e,t,n){let r=!1,o=!1;const i=je(Pe({},e),{columns:e.columns.map(a=>je(Pe({},a),{rows:a.rows.map(s=>je(Pe({},s),{cells:s.cells.map(l=>l.widgetId===t?(r=!0,je(Pe({},l),{widgetId:n})):l.widgetId===n?(o=!0,je(Pe({},l),{widgetId:t})):l)}))}))});return r&&o?i:e}function IPt(e,t,n){const r={cells:[je(Pe({},e),{widthPercentage:100})]};return je(Pe({},t),{rows:Id(n)?[...t.rows,r]:t.rows.reduce((o,i,a)=>(a===n&&o.push(r),o.push(i),o),[])})}function _ue(e,t,n){return je(Pe({},e),{rows:e.rows.map((r,o)=>o===n?J4(r,[t]):r)})}function RPt(e,t,n,r,o,i){const a=e.columns[n].rows[r].cells.find(s=>s.widgetId===t);return a?je(Pe({},e),{columns:e.columns.map((s,l)=>{let c=s;return l===n&&(c=_ue(s,t,r)),l===o&&(c=IPt(a,c,i)),l===n&&(c=HT(c)),c})}):e}function J4(e,t){const n=e.cells.filter(i=>t.includes(i.widgetId)),r=n.reduce((i,a)=>i+a.widthPercentage,0),o=e.cells.length-n.length;return je(Pe({},e),{cells:e.cells.filter(i=>!t.includes(i.widgetId)).map(i=>je(Pe({},i),{widthPercentage:i.widthPercentage+r/o}))})}function HT(e){return je(Pe({},e),{rows:e.rows.filter(t=>t.cells.length>0)})}function jPt(e,t,n,r,o,i,a,s){const l=e.columns[r].rows[o].cells.find(c=>c.widgetId===n);return l?je(Pe({},e),{columns:e.columns.map((c,d)=>{let h=c;return d===r&&(h=_ue(c,n,o)),d===a&&(h=je(Pe({},h),{rows:h.rows.map((u,w)=>w===s?je(Pe({},u),{cells:u.cells.reduce((y,p)=>{if(p.widgetId===i){const k=je(Pe({},l),{widthPercentage:p.widthPercentage/2,height:p.height});t==="left"&&y.push(k),y.push(je(Pe({},p),{widthPercentage:p.widthPercentage/2})),t==="right"&&y.push(k)}else y.push(p);return y},[])}):u)})),d===r&&(h=HT(h)),h})}):e}function zPt(e,t,n,r){return je(Pe({},e),{columns:e.columns.map((o,i)=>i===t?HT(je(Pe({},o),{rows:o.rows.map((a,s)=>s===n?J4(a,[r]):a)})):o)})}function BPt(e,t){return je(Pe({},e),{columns:e.columns.map(n=>HT(je(Pe({},n),{rows:n.rows.map(r=>J4(r,t))})))})}function Sue(e,t){const n=e.columns.flatMap(o=>o.rows.flatMap(i=>i.cells.map(a=>a.widgetId))),r=t.columns.flatMap(o=>o.rows.flatMap(i=>i.cells.map(a=>a.widgetId)));return n.filter(o=>!r.includes(o))}function $Pt(e){return je(Pe({},e),{cells:e.cells.map(t=>je(Pe({},t),{widthPercentage:100/e.cells.length}))})}const FPt=(e,t,n)=>je(Pe({},e),{columns:e.columns.map((r,o)=>o===t?je(Pe({},r),{rows:r.rows.map((i,a)=>a===n?$Pt(i):i)}):r)});function HPt(e,t,n){switch(n.type){case Wa.SWAP:return NPt(e,t.widgetId,n.widgetId);case Wa.NEW_ROW:return RPt(e,t.widgetId,t.columnIndex,t.rowIndex,n.columnIndex,n.rowIndex);case Wa.PLACE_LEFT:case Wa.PLACE_RIGHT:return jPt(e,n.type===Wa.PLACE_LEFT?"left":"right",t.widgetId,t.columnIndex,t.rowIndex,n.widgetId,n.columnIndex,n.rowIndex);default:return e}}function WPt({dashboard:e,persist:t=!0,sharedMode:n=!1}){const{restApi:r,isReady:o}=Ere(),{app:i}=Ln(),a=Hs(e),s=Ke(()=>!!(i!=null&&i.httpClient.auth)&&DPt(i.httpClient.auth.type,t),[i==null?void 0:i.httpClient.auth,t]),l=t&&s,[c,d]=ls(MPt,e),h=He(u=>Co(this,null,function*(){if(!o||!r)throw new YYe;if(c&&u.type===pC.WIDGETS_DELETE&&c.layoutOptions.widgetsPanel){const w=BPt(c.layoutOptions.widgetsPanel,u.payload);u={type:JO.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE,payload:{widgetsPanel:w,widgets:u.payload}}}if(c&&u.type===pC.WIDGETS_PANEL_LAYOUT_UPDATE&&c.layoutOptions.widgetsPanel){const w=Sue(c.layoutOptions.widgetsPanel,u.payload);w.length>0&&(u={type:JO.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE,payload:{widgetsPanel:u.payload,widgets:w}})}if(l){const w=yield APt(c==null?void 0:c.oid,u,r,n);d(w)}else d(u)}),[l,c,r,o,d,n]);return Je(()=>{e&&e!==a&&d({type:JO.DASHBOARD_INIT,payload:e})},[e,a]),{dashboard:c,dispatchChanges:h}}const VPt=j4("useDashboardModel")(Cue);function Cue({dashboardOid:e,includeWidgets:t,includeFilters:n,persist:r=!0,sharedMode:o=!1}){const{dashboard:i,isLoading:a,isError:s,error:l}=nue({dashboardOid:e,includeWidgets:t,includeFilters:n,sharedMode:o}),{dashboard:c,dispatchChanges:d}=WPt({dashboard:i??null,persist:r,sharedMode:o});return{dashboard:c,isLoading:a,isError:s,error:l,dispatchChanges:d}}/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:kue,setPrototypeOf:TY,isFrozen:UPt,getPrototypeOf:GPt,getOwnPropertyDescriptor:YPt}=Object;let{freeze:va,seal:Us,create:Tue}=Object,{apply:Y3,construct:X3}=typeof Reflect<"u"&&Reflect;va||(va=function(e){return e});Us||(Us=function(e){return e});Y3||(Y3=function(e,t,n){return e.apply(t,n)});X3||(X3=function(e,t){return new e(...t)});const Ew=is(Array.prototype.forEach),MY=is(Array.prototype.pop),nv=is(Array.prototype.push),__=is(String.prototype.toLowerCase),eP=is(String.prototype.toString),EY=is(String.prototype.match),rv=is(String.prototype.replace),XPt=is(String.prototype.indexOf),qPt=is(String.prototype.trim),ol=is(Object.prototype.hasOwnProperty),ra=is(RegExp.prototype.test),ov=ZPt(TypeError);function is(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Y3(e,t,r)}}function ZPt(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return X3(e,n)}}function An(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:__;TY&&TY(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(UPt(t)||(t[r]=i),o=i)}e[o]=!0}return e}function KPt(e){for(let t=0;t<e.length;t++)ol(e,t)||(e[t]=null);return e}function Dp(e){const t=Tue(null);for(const[n,r]of kue(e))ol(e,n)&&(Array.isArray(r)?t[n]=KPt(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Dp(r):t[n]=r);return t}function iv(e,t){for(;e!==null;){const r=YPt(e,t);if(r){if(r.get)return is(r.get);if(typeof r.value=="function")return is(r.value)}e=GPt(e)}function n(){return null}return n}const AY=va(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),tP=va(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),nP=va(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),QPt=va(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),rP=va(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),JPt=va(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),OY=va(["#text"]),PY=va(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),oP=va(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),DY=va(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Aw=va(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),eDt=Us(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tDt=Us(/<%[\w\W]*|[\w\W]*%>/gm),nDt=Us(/\${[\w\W]*}/gm),rDt=Us(/^data-[\-\w.\u00B7-\uFFFF]/),oDt=Us(/^aria-[\-\w]+$/),Mue=Us(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),iDt=Us(/^(?:\w+script|data):/i),aDt=Us(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Eue=Us(/^html$/i),sDt=Us(/^[a-z][.\w]*(-[.\w]+)+$/i);var LY=Object.freeze({__proto__:null,MUSTACHE_EXPR:eDt,ERB_EXPR:tDt,TMPLIT_EXPR:nDt,DATA_ATTR:rDt,ARIA_ATTR:oDt,IS_ALLOWED_URI:Mue,IS_SCRIPT_OR_DATA:iDt,ATTR_WHITESPACE:aDt,DOCTYPE_NAME:Eue,CUSTOM_ELEMENT:sDt});const av={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lDt=function(){return typeof window>"u"?null:window},cDt=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Aue(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lDt();const t=Ue=>Aue(Ue);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==av.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:u,trustedTypes:w}=e,y=l.prototype,p=iv(y,"cloneNode"),k=iv(y,"remove"),j=iv(y,"nextSibling"),F=iv(y,"childNodes"),U=iv(y,"parentNode");if(typeof a=="function"){const Ue=n.createElement("template");Ue.content&&Ue.content.ownerDocument&&(n=Ue.content.ownerDocument)}let H,R="";const{implementation:z,createNodeIterator:I,createDocumentFragment:N,getElementsByTagName:W}=n,{importNode:A}=r;let C={};t.isSupported=typeof kue=="function"&&typeof U=="function"&&z&&z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:v,ERB_EXPR:T,TMPLIT_EXPR:S,DATA_ATTR:D,ARIA_ATTR:G,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:O}=LY;let{IS_ALLOWED_URI:E}=LY,_=null;const x=An({},[...AY,...tP,...nP,...rP,...OY]);let f=null;const b=An({},[...PY,...oP,...DY,...Aw]);let m=Object.seal(Tue(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),g=null,M=null,P=!0,B=!0,X=!1,J=!0,K=!1,V=!0,Z=!1,Q=!1,re=!1,oe=!1,ee=!1,te=!1,ne=!0,le=!1;const ae="user-content-";let se=!0,de=!1,fe={},he=null;const ve=An({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let xe=null;const ke=An({},["audio","video","img","source","image","track"]);let Ce=null;const Oe=An({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Te="http://www.w3.org/1998/Math/MathML",_e="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let be=me,we=!1,Ee=null;const Le=An({},[Te,_e,me],eP);let De=null;const $e=["application/xhtml+xml","text/html"],Ve="text/html";let Fe=null,Ze=null;const rt=n.createElement("form"),et=function(Ue){return Ue instanceof RegExp||Ue instanceof Function},ct=function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ze&&Ze===Ue)){if((!Ue||typeof Ue!="object")&&(Ue={}),Ue=Dp(Ue),De=$e.indexOf(Ue.PARSER_MEDIA_TYPE)===-1?Ve:Ue.PARSER_MEDIA_TYPE,Fe=De==="application/xhtml+xml"?eP:__,_=ol(Ue,"ALLOWED_TAGS")?An({},Ue.ALLOWED_TAGS,Fe):x,f=ol(Ue,"ALLOWED_ATTR")?An({},Ue.ALLOWED_ATTR,Fe):b,Ee=ol(Ue,"ALLOWED_NAMESPACES")?An({},Ue.ALLOWED_NAMESPACES,eP):Le,Ce=ol(Ue,"ADD_URI_SAFE_ATTR")?An(Dp(Oe),Ue.ADD_URI_SAFE_ATTR,Fe):Oe,xe=ol(Ue,"ADD_DATA_URI_TAGS")?An(Dp(ke),Ue.ADD_DATA_URI_TAGS,Fe):ke,he=ol(Ue,"FORBID_CONTENTS")?An({},Ue.FORBID_CONTENTS,Fe):ve,g=ol(Ue,"FORBID_TAGS")?An({},Ue.FORBID_TAGS,Fe):{},M=ol(Ue,"FORBID_ATTR")?An({},Ue.FORBID_ATTR,Fe):{},fe=ol(Ue,"USE_PROFILES")?Ue.USE_PROFILES:!1,P=Ue.ALLOW_ARIA_ATTR!==!1,B=Ue.ALLOW_DATA_ATTR!==!1,X=Ue.ALLOW_UNKNOWN_PROTOCOLS||!1,J=Ue.ALLOW_SELF_CLOSE_IN_ATTR!==!1,K=Ue.SAFE_FOR_TEMPLATES||!1,V=Ue.SAFE_FOR_XML!==!1,Z=Ue.WHOLE_DOCUMENT||!1,oe=Ue.RETURN_DOM||!1,ee=Ue.RETURN_DOM_FRAGMENT||!1,te=Ue.RETURN_TRUSTED_TYPE||!1,re=Ue.FORCE_BODY||!1,ne=Ue.SANITIZE_DOM!==!1,le=Ue.SANITIZE_NAMED_PROPS||!1,se=Ue.KEEP_CONTENT!==!1,de=Ue.IN_PLACE||!1,E=Ue.ALLOWED_URI_REGEXP||Mue,be=Ue.NAMESPACE||me,m=Ue.CUSTOM_ELEMENT_HANDLING||{},Ue.CUSTOM_ELEMENT_HANDLING&&et(Ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=Ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ue.CUSTOM_ELEMENT_HANDLING&&et(Ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=Ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ue.CUSTOM_ELEMENT_HANDLING&&typeof Ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=Ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(B=!1),ee&&(oe=!0),fe&&(_=An({},OY),f=[],fe.html===!0&&(An(_,AY),An(f,PY)),fe.svg===!0&&(An(_,tP),An(f,oP),An(f,Aw)),fe.svgFilters===!0&&(An(_,nP),An(f,oP),An(f,Aw)),fe.mathMl===!0&&(An(_,rP),An(f,DY),An(f,Aw))),Ue.ADD_TAGS&&(_===x&&(_=Dp(_)),An(_,Ue.ADD_TAGS,Fe)),Ue.ADD_ATTR&&(f===b&&(f=Dp(f)),An(f,Ue.ADD_ATTR,Fe)),Ue.ADD_URI_SAFE_ATTR&&An(Ce,Ue.ADD_URI_SAFE_ATTR,Fe),Ue.FORBID_CONTENTS&&(he===ve&&(he=Dp(he)),An(he,Ue.FORBID_CONTENTS,Fe)),se&&(_["#text"]=!0),Z&&An(_,["html","head","body"]),_.table&&(An(_,["tbody"]),delete g.tbody),Ue.TRUSTED_TYPES_POLICY){if(typeof Ue.TRUSTED_TYPES_POLICY.createHTML!="function")throw ov('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ue.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ov('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=Ue.TRUSTED_TYPES_POLICY,R=H.createHTML("")}else H===void 0&&(H=cDt(w,o)),H!==null&&typeof R=="string"&&(R=H.createHTML(""));va&&va(Ue),Ze=Ue}},dt=An({},["mi","mo","mn","ms","mtext"]),lt=An({},["foreignobject","annotation-xml"]),gt=An({},["title","style","font","a","script"]),Qe=An({},[...tP,...nP,...QPt]),Et=An({},[...rP,...JPt]),vt=function(Ue){let xt=U(Ue);(!xt||!xt.tagName)&&(xt={namespaceURI:be,tagName:"template"});const St=__(Ue.tagName),Kt=__(xt.tagName);return Ee[Ue.namespaceURI]?Ue.namespaceURI===_e?xt.namespaceURI===me?St==="svg":xt.namespaceURI===Te?St==="svg"&&(Kt==="annotation-xml"||dt[Kt]):!!Qe[St]:Ue.namespaceURI===Te?xt.namespaceURI===me?St==="math":xt.namespaceURI===_e?St==="math"&&lt[Kt]:!!Et[St]:Ue.namespaceURI===me?xt.namespaceURI===_e&&!lt[Kt]||xt.namespaceURI===Te&&!dt[Kt]?!1:!Et[St]&&(gt[St]||!Qe[St]):!!(De==="application/xhtml+xml"&&Ee[Ue.namespaceURI]):!1},Pt=function(Ue){nv(t.removed,{element:Ue});try{U(Ue).removeChild(Ue)}catch{k(Ue)}},It=function(Ue,xt){try{nv(t.removed,{attribute:xt.getAttributeNode(Ue),from:xt})}catch{nv(t.removed,{attribute:null,from:xt})}if(xt.removeAttribute(Ue),Ue==="is"&&!f[Ue])if(oe||ee)try{Pt(xt)}catch{}else try{xt.setAttribute(Ue,"")}catch{}},wt=function(Ue){let xt=null,St=null;if(re)Ue="<remove></remove>"+Ue;else{const Rn=EY(Ue,/^[\r\n\t ]+/);St=Rn&&Rn[0]}De==="application/xhtml+xml"&&be===me&&(Ue='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ue+"</body></html>");const Kt=H?H.createHTML(Ue):Ue;if(be===me)try{xt=new u().parseFromString(Kt,De)}catch{}if(!xt||!xt.documentElement){xt=z.createDocument(be,"template",null);try{xt.documentElement.innerHTML=we?R:Kt}catch{}}const pr=xt.body||xt.documentElement;return Ue&&St&&pr.insertBefore(n.createTextNode(St),pr.childNodes[0]||null),be===me?W.call(xt,Z?"html":"body")[0]:Z?xt.documentElement:pr},$t=function(Ue){return I.call(Ue.ownerDocument||Ue,Ue,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},rn=function(Ue){return Ue instanceof h&&(typeof Ue.nodeName!="string"||typeof Ue.textContent!="string"||typeof Ue.removeChild!="function"||!(Ue.attributes instanceof d)||typeof Ue.removeAttribute!="function"||typeof Ue.setAttribute!="function"||typeof Ue.namespaceURI!="string"||typeof Ue.insertBefore!="function"||typeof Ue.hasChildNodes!="function")},Ur=function(Ue){return typeof s=="function"&&Ue instanceof s},pt=function(Ue,xt,St){C[Ue]&&Ew(C[Ue],Kt=>{Kt.call(t,xt,St,Ze)})},_t=function(Ue){let xt=null;if(pt("beforeSanitizeElements",Ue,null),rn(Ue))return Pt(Ue),!0;const St=Fe(Ue.nodeName);if(pt("uponSanitizeElement",Ue,{tagName:St,allowedTags:_}),Ue.hasChildNodes()&&!Ur(Ue.firstElementChild)&&ra(/<[/\w]/g,Ue.innerHTML)&&ra(/<[/\w]/g,Ue.textContent)||Ue.nodeType===av.progressingInstruction||V&&Ue.nodeType===av.comment&&ra(/<[/\w]/g,Ue.data))return Pt(Ue),!0;if(!_[St]||g[St]){if(!g[St]&&Zt(St)&&(m.tagNameCheck instanceof RegExp&&ra(m.tagNameCheck,St)||m.tagNameCheck instanceof Function&&m.tagNameCheck(St)))return!1;if(se&&!he[St]){const Kt=U(Ue)||Ue.parentNode,pr=F(Ue)||Ue.childNodes;if(pr&&Kt){const Rn=pr.length;for(let po=Rn-1;po>=0;--po){const an=p(pr[po],!0);an.__removalCount=(Ue.__removalCount||0)+1,Kt.insertBefore(an,j(Ue))}}}return Pt(Ue),!0}return Ue instanceof l&&!vt(Ue)||(St==="noscript"||St==="noembed"||St==="noframes")&&ra(/<\/no(script|embed|frames)/i,Ue.innerHTML)?(Pt(Ue),!0):(K&&Ue.nodeType===av.text&&(xt=Ue.textContent,Ew([v,T,S],Kt=>{xt=rv(xt,Kt," ")}),Ue.textContent!==xt&&(nv(t.removed,{element:Ue.cloneNode()}),Ue.textContent=xt)),pt("afterSanitizeElements",Ue,null),!1)},Yt=function(Ue,xt,St){if(ne&&(xt==="id"||xt==="name")&&(St in n||St in rt))return!1;if(!(B&&!M[xt]&&ra(D,xt))&&!(P&&ra(G,xt))){if(!f[xt]||M[xt]){if(!(Zt(Ue)&&(m.tagNameCheck instanceof RegExp&&ra(m.tagNameCheck,Ue)||m.tagNameCheck instanceof Function&&m.tagNameCheck(Ue))&&(m.attributeNameCheck instanceof RegExp&&ra(m.attributeNameCheck,xt)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(xt))||xt==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&ra(m.tagNameCheck,St)||m.tagNameCheck instanceof Function&&m.tagNameCheck(St))))return!1}else if(!Ce[xt]&&!ra(E,rv(St,$,""))&&!((xt==="src"||xt==="xlink:href"||xt==="href")&&Ue!=="script"&&XPt(St,"data:")===0&&xe[Ue])&&!(X&&!ra(q,rv(St,$,"")))&&St)return!1}return!0},Zt=function(Ue){return Ue!=="annotation-xml"&&EY(Ue,O)},ur=function(Ue){pt("beforeSanitizeAttributes",Ue,null);const{attributes:xt}=Ue;if(!xt)return;const St={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let Kt=xt.length;for(;Kt--;){const pr=xt[Kt],{name:Rn,namespaceURI:po,value:an}=pr,Un=Fe(Rn);let Gn=Rn==="value"?an:qPt(an);if(St.attrName=Un,St.attrValue=Gn,St.keepAttr=!0,St.forceKeepAttr=void 0,pt("uponSanitizeAttribute",Ue,St),Gn=St.attrValue,V&&ra(/((--!?|])>)|<\/(style|title)/i,Gn)){It(Rn,Ue);continue}if(St.forceKeepAttr||(It(Rn,Ue),!St.keepAttr))continue;if(!J&&ra(/\/>/i,Gn)){It(Rn,Ue);continue}K&&Ew([v,T,S],Ks=>{Gn=rv(Gn,Ks," ")});const Zs=Fe(Ue.nodeName);if(Yt(Zs,Un,Gn)){if(le&&(Un==="id"||Un==="name")&&(It(Rn,Ue),Gn=ae+Gn),H&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!po)switch(w.getAttributeType(Zs,Un)){case"TrustedHTML":{Gn=H.createHTML(Gn);break}case"TrustedScriptURL":{Gn=H.createScriptURL(Gn);break}}try{po?Ue.setAttributeNS(po,Rn,Gn):Ue.setAttribute(Rn,Gn),rn(Ue)?Pt(Ue):MY(t.removed)}catch{}}}pt("afterSanitizeAttributes",Ue,null)},dr=function Ue(xt){let St=null;const Kt=$t(xt);for(pt("beforeSanitizeShadowDOM",xt,null);St=Kt.nextNode();)pt("uponSanitizeShadowNode",St,null),!_t(St)&&(St.content instanceof i&&Ue(St.content),ur(St));pt("afterSanitizeShadowDOM",xt,null)};return t.sanitize=function(Ue){let xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},St=null,Kt=null,pr=null,Rn=null;if(we=!Ue,we&&(Ue="<!-->"),typeof Ue!="string"&&!Ur(Ue))if(typeof Ue.toString=="function"){if(Ue=Ue.toString(),typeof Ue!="string")throw ov("dirty is not a string, aborting")}else throw ov("toString is not a function");if(!t.isSupported)return Ue;if(Q||ct(xt),t.removed=[],typeof Ue=="string"&&(de=!1),de){if(Ue.nodeName){const Un=Fe(Ue.nodeName);if(!_[Un]||g[Un])throw ov("root node is forbidden and cannot be sanitized in-place")}}else if(Ue instanceof s)St=wt("<!---->"),Kt=St.ownerDocument.importNode(Ue,!0),Kt.nodeType===av.element&&Kt.nodeName==="BODY"||Kt.nodeName==="HTML"?St=Kt:St.appendChild(Kt);else{if(!oe&&!K&&!Z&&Ue.indexOf("<")===-1)return H&&te?H.createHTML(Ue):Ue;if(St=wt(Ue),!St)return oe?null:te?R:""}St&&re&&Pt(St.firstChild);const po=$t(de?Ue:St);for(;pr=po.nextNode();)_t(pr)||(pr.content instanceof i&&dr(pr.content),ur(pr));if(de)return Ue;if(oe){if(ee)for(Rn=N.call(St.ownerDocument);St.firstChild;)Rn.appendChild(St.firstChild);else Rn=St;return(f.shadowroot||f.shadowrootmode)&&(Rn=A.call(r,Rn,!0)),Rn}let an=Z?St.outerHTML:St.innerHTML;return Z&&_["!doctype"]&&St.ownerDocument&&St.ownerDocument.doctype&&St.ownerDocument.doctype.name&&ra(Eue,St.ownerDocument.doctype.name)&&(an="<!DOCTYPE "+St.ownerDocument.doctype.name+`>
1025
1025
  `+an),K&&Ew([v,T,S],Un=>{an=rv(an,Un," ")}),H&&te?H.createHTML(an):an},t.setConfig=function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ct(Ue),Q=!0},t.clearConfig=function(){Ze=null,Q=!1},t.isValidAttribute=function(Ue,xt,St){Ze||ct({});const Kt=Fe(Ue),pr=Fe(xt);return Yt(Kt,pr,St)},t.addHook=function(Ue,xt){typeof xt=="function"&&(C[Ue]=C[Ue]||[],nv(C[Ue],xt))},t.removeHook=function(Ue){if(C[Ue])return MY(C[Ue])},t.removeHooks=function(Ue){C[Ue]&&(C[Ue]=[])},t.removeAllHooks=function(){C={}},t}var uDt=Aue();const dDt={"valign-top":"flex-start","valign-middle":"center","valign-bottom":"flex-end"},pDt=at("div",{target:"e1irzjbd0",label:"TextWidgetSpaceAroundWrapper"})("padding:",e=>Mle[Sd(e.styleOptions,"spaceAround",e.themeSettings.widget.spaceAround)]||"0px",";"),hDt=at("div",{target:"e1irzjbd1",label:"TextWidgetContainer"})("background-color:",e=>e.styleOptions.bgColor,";display:flex;align-items:",e=>dDt[e.styleOptions.vAlign],";text-align:center;height:100%;width:100%;padding:10px;box-sizing:border-box;cursor:",e=>e.cursor||"default",";"),fDt=at("div",{target:"e1irzjbd2",label:"InnerHtml"})("width:100%;"),mDt=Sn({componentName:"TextWidget"})(e=>{const{html:t}=e.styleOptions,n=uDt.sanitize(t),{themeSettings:r}=Lt(),o=i=>{if(e.onDataPointClick){const a={html:t};e.onDataPointClick(a,i.nativeEvent)}};return ge(pDt,{themeSettings:r,styleOptions:e.styleOptions,children:ge(hDt,{styleOptions:e.styleOptions,onClick:o,cursor:e.onDataPointClick?"pointer":"default",children:ge(fDt,{dangerouslySetInnerHTML:{__html:n}})})})}),Oue=pn(null),gDt=e=>{const{error:t,context:n,children:r}=e;if(t)throw t;const{customWidgetsMap:o}=n;return ge(Oue.Provider,{value:o,children:r})};function hC(e,t){var n,r,o,i,a;switch(t.type){case"success-load-more":return je(Pe({},e),{isLoading:!1,isError:!1,isSuccess:!0,status:"success",error:void 0,data:{columns:(i=(o=(n=e.data)==null?void 0:n.columns)!=null?o:(r=t.data)==null?void 0:r.columns)!=null?i:[],rows:[...(a=e==null?void 0:e.data)!=null&&a.rows?e.data.rows:[],...t.data.rows?t.data.rows:[]]}});default:return Hd(e,t)}}const vDt=(e,t)=>e===void 0&&t===void 0?!1:[e,t].some(n=>n===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.map((n,r)=>{const o=t[r];return!yDt(n,o)}).includes(!0);function fC(e){return"context"in e&&"expression"in e}function yDt(e,t){return fC(e)&&fC(t)?Pue(e,t):Ra(e,t)}function Pue(e,t){const n=e,{context:r}=n,o=_n(n,["context"]),i=t,{context:a}=i,s=_n(i,["context"]);return xDt(r,a)&&Ra(o,s)}const NY=e=>bDt(e)&&e.type==="filter",bDt=e=>typeof e=="object"&&!!e&&"type"in e;function xDt(e,t){const n=Object.keys(e),r=Object.keys(t);return Ra(n,r)?n.every(o=>{const i=e[o],a=t[o];return fC(i)&&fC(a)?Pue(i,a):NY(i)&&NY(a)?Ole(i,a):Ra(i,a)}):!1}const wDt=["dataSource","dimensions","count","offset","onBeforeQuery"];function Due(e){return xl(e,wDt,(t,n)=>{const{filters:r,relations:o}=Qa(n.filters),{filters:i,relations:a}=Qa(t.filters);return vDt(n.measures,t.measures)||xh(r,i)||lkt(r,i,o,a)||xh(n.highlights,t.highlights)})}const _Dt=j4("useExecuteQuery")(WT);function WT(e){var t,n,r,o;const i=Due(e),a=Qg(e,i),[s,l]=Ge(!1),[c,d]=Ge(),{isInitialized:h,app:u}=Ln(),w=(t=u==null?void 0:u.settings.queryCacheConfig)==null?void 0:t.enabled,y=w?d1:Lc,[p,k]=Ge(((n=e.offset)!=null?n:0)+((o=(r=e.count)!=null?r:u==null?void 0:u.settings.queryLimit)!=null?o:0)),[j,F]=Ge(0),[U,H]=Ge(!1),[R,z]=Ge(!1),I=He(()=>{var T,S,D;k(((T=e.offset)!=null?T:0)+((D=(S=e.count)!=null?S:u==null?void 0:u.settings.queryLimit)!=null?D:0)),H(!1),F(0),z(!1)},[e,u]);Je(()=>{i&&I()},[I,i]);const[N,W]=ls(hC,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),A=He(()=>{w&&c&&(Mne(c),d(void 0)),N.isLoading||(I(),l(!0))},[w,c,N.isLoading,I]),C=He((T,S,D=!1)=>{const{dataSource:G,dimensions:q,measures:$,filters:O,highlights:E,count:_=T.settings.queryLimit,offset:x,ungroup:f,onBeforeQuery:b}=S;W({type:"loading"});const{filters:m,relations:g}=Qa(O),M=[{dataSource:G,dimensions:q,measures:$,filters:m,filterRelations:g,highlights:E,count:_,offset:x,ungroup:f},T,{onBeforeQuery:b}];if(w){const P=Tne(...M);c!==P&&d(P)}y(...M).then(P=>{_>P.rows.length&&H(!0),W({type:D?"success-load-more":"success",data:P})}).catch(P=>{W({type:"error",error:P})})},[y,w,c]),v=He(T=>{e.enabled!==!1&&u&&T>0&&!U&&!N.isError&&!N.isLoading&&(F(T),z(!0))},[e,u,U,F,N.isLoading,N.isError,z]);return Je(()=>{h&&R&&u&&(C(u,je(Pe({},e),{count:j,offset:p}),!0),k(p+j),z(!1))},[h,e,p,j,R,u,C]),Je(()=>{h||W({type:"error",error:new kt("errors.executeQueryNoSisenseContext")}),s&&l(!1),a(u,s)&&C(u,e)},[u,y,h,e,C,a,s]),N.data&&i?je(Pe({},hC(N,{type:"loading"})),{refetch:A,loadMore:v}):je(Pe({},N),{refetch:A,loadMore:v})}function Lue(e){const t=[],n=[];return Object.keys(e).forEach(r=>{e[r].length&&e[r].forEach(o=>{Kn(o)?n.push(g1(o)):t.push(Fs(o))})}),{dimensions:t,measures:n}}function SDt(e){return Object.values(e).reduce((t,n)=>(n.forEach(r=>{r.numberFormatConfig&&t.set(r.column.name,r.numberFormatConfig)}),t),new Map)}function CDt(e,t){const n=SDt(t);return e.rows=e.rows.map(r=>r.map((o,i)=>{const a=n.get(e.columns[i].name);return a?je(Pe({},o),{text:Zr(Or(a),o.data)}):o})),e}function kDt({dataSource:e,dataOptions:t,filters:n,highlights:r,count:o,offset:i,ungroup:a,onBeforeQuery:s}){const{dimensions:l,measures:c}=Lue(t),{data:d,isLoading:h,isError:u,isSuccess:w,status:y,error:p}=_Dt({dataSource:e,dimensions:l,measures:c,filters:n,highlights:r,count:o,offset:i,ungroup:a,onBeforeQuery:s});return{data:Ke(()=>d&&CDt(d,t),[d,t]),isLoading:h,isError:u,isSuccess:w,status:y,error:p}}const Nue=()=>{const e=en(Oue);if(!e)throw new Error("useCustomWidgets must be used within a CustomWidgetsProvider");const t=He((o,i)=>{e.has(o)||e.set(o,i)},[e]),n=He(o=>e.has(o),[e]),r=He(o=>e.get(o),[e]);return{registerCustomWidget:t,hasCustomWidget:n,getCustomWidget:r}},TDt=Sn({componentName:"CustomWidget"})(e=>{var t;const{t:n}=Jt(),{getCustomWidget:r}=Nue(),{app:o}=Ln(),i=r(e.customWidgetType);if(!i)return ge(iie,{error:n("customWidgets.registerPrompt",{customWidgetType:e.customWidgetType})});const a=(t=e.dataSource)!=null?t:o==null?void 0:o.defaultDataSource,s=je(Pe({},e),{dataSource:a,dataOptions:e.dataOptions,styleOptions:e.styleOptions,filters:e.filters,highlights:e.highlights,description:e.description});return ge(Zh,{defaultSize:K2("line",{hasHeader:!0}),children:ge(MT,{title:e.title,description:e.description,styleOptions:e.styleOptions,dataSetName:a&&Mc(a),children:i(s)})})}),MDt=e=>ot(Fj,{onBeforeMenuOpen:e.onBeforeMenuOpen,children:[ej(e)&&ge(TDt,Pe({},e)),JR(e)&&ge(VAt,Pe({},e)),v2(e)&&ge(mDt,Pe({},e)),wu(e)&&ge(cce,je(Pe({},e),{highlightSelectionDisabled:!0}))]}),vb=e=>ge(MDt,Pe({},e),e.id),Vd="600px",VT="900px",EDt=at("div",{target:"e1axwqlr0",label:"GridContainer"})("display:grid;grid-template-columns:",({widths:e})=>e.map(t=>`${t}%`).join(" "),";@container content-panel-container (max-width:",Vd,"){grid-template-columns:repeat(1,1fr);}@container content-panel-container ((min-width:",Vd,") and (max-width:",VT,")){grid-template-columns:",({widths:e})=>e.length>1?"repeat(2, 1fr)":"repeat(1, 1fr)",";}"),ADt=at("div",{target:"e1axwqlr1",label:"Column"})("container-name:content-panel-column;container-type:",({responsive:e})=>e?"inline-size":"unset",";&:not(:first-of-type){border-left:",({dividerWidth:e,dividerColor:t})=>yd(t,e),";}@container content-panel-container ((min-width:",Vd,") and (max-width:",VT,")){&:last-of-type{grid-column-end:",({colWidths:e})=>e.length%2===0?"span 1":"span 2",";}}@container content-panel-container (max-width:",Vd,"){&:not(:first-of-type){border-left:none;}}"),ODt=at("div",{target:"e1axwqlr2",label:"Row"})("display:grid;grid-template-columns:",({widths:e})=>e.map(t=>`${t}%`).join(" "),";@container content-panel-column (max-width:",Vd,"){grid-template-columns:repeat(1,1fr);}@container content-panel-column ((min-width:",Vd,") and (max-width:",VT,")){grid-template-columns:",({widths:e})=>e.length===1?"repeat(1, 1fr)":"repeat(2, 1fr)",";}"),PDt=at("div",{target:"e1axwqlr3",label:"Subcell"})("border-bottom:",({dividerWidth:e,dividerColor:t})=>yd(t,e),";&:not(:first-of-type){border-left:",({dividerWidth:e,dividerColor:t})=>yd(t,e),";}height:",({height:e})=>Id(e)?"auto":gl(e)?`calc(${e}px + 32px)`:`calc(${e} + 32px)`,";@container ((min-width:",Vd,") and (max-width:",VT,")){&:last-of-type{grid-column-end:",({rowWidths:e})=>e.length%2===0?"span 1":"span 2",";}}@container (max-width:",Vd,"){&:not(:first-of-type){border-left:none;}}"),DDt=({layout:e,responsive:t,widgets:n})=>{const{themeSettings:r}=Lt();Je(()=>{window.dispatchEvent(new Event("resize"))},[t]);const o=e.columns.map(i=>i.widthPercentage);return ge(EDt,{widths:o,children:e.columns.map((i,a)=>{var s;return ge(ADt,{colWidths:o,responsive:t,dividerWidth:r.dashboard.dividerLineWidth,dividerColor:r.dashboard.dividerLineColor,children:(s=i.rows)==null?void 0:s.map((l,c)=>{const d=l.cells.map(h=>h.widthPercentage);return ge(ODt,{widths:d,children:l.cells.map(h=>{var u;const w=n.find(y=>y.id===h.widgetId);return(w==null?void 0:w.widgetType)==="pivot"&&h.height&&(u=w==null?void 0:w.styleOptions)!=null&&u.isAutoHeight&&(w.styleOptions.isAutoHeight=!1),ge(PDt,{responsive:t,rowWidths:d,height:h.height,dividerWidth:r.dashboard.dividerLineWidth,dividerColor:r.dashboard.dividerLineColor,children:w&&ge(vb,Pe({},w))},`${h.widgetId},${h.widthPercentage}`)})},`${a},${c}`)})},a)})})},Iue=48,LDt=at("div",{target:"eaeh3800",label:"DashboardHeaderContainer"})("height:",Iue,"px;font-family:",({theme:e})=>e.typography.fontFamily,";background-color:",({theme:e})=>e.dashboard.toolbar.backgroundColor,";color:",({theme:e})=>e.dashboard.toolbar.primaryTextColor,";border-bottom:",({theme:e})=>yd(e.dashboard.borderColor,e.dashboard.borderWidth),";padding:10px 20px;display:flex;align-items:center;box-sizing:border-box;justify-content:space-between;"),NDt=at("div",{target:"eaeh3801",label:"DashboardHeaderTitle"})("font-size:13px;font-weight:700;"),IDt=({title:e,toolbar:t})=>{const{themeSettings:n}=Lt();return ot(LDt,{theme:n,children:[ge(NDt,{children:e}),ge("div",{children:t==null?void 0:t()})]})},Rue=Tt((e,t)=>ge("button",je(Pe({},e),{ref:t,className:"csdk-rounded csdk-cursor-pointer disabled:csdk-cursor-not-allowed csdk-leading-[18px] csdk-text-[13px] csdk-py-[5px] csdk-px-[8px] csdk-text-text-content disabled:csdk-opacity-30 "+(e.className||""),children:e.children}))),RDt=e=>{const t=e,{tooltipTitle:n,disableTooltip:r,children:o,disabled:i}=t,a=_n(t,["tooltipTitle","disableTooltip","children","disabled"]);return ge(Mu,{title:n,disableHoverListener:r,children:ge("span",{children:ge(Rue,je(Pe({disabled:i,style:i?je(Pe({},a.style||{}),{pointerEvents:"none"}):a.style},a),{children:o}))})})},UT=e=>{const t=e,{wrapperClassName:n,label:r,isLabelInactive:o,indeterminate:i,className:a,labelProps:s}=t,l=_n(t,["wrapperClassName","label","isLabelInactive","indeterminate","className","labelProps"]),c=["csdk-border-l","csdk-pl-3"],d=Ye(null);return Je(()=>{d.current&&(d.current.indeterminate=i??!1)},[d,i]),o&&c.push("csdk-opacity-50"),ot("label",je(Pe({},s),{className:Fd("csdk-my-[2px] csdk-flex csdk-items-center csdk-leading-4 csdk-text-[13px]",n,{"csdk-cursor-pointer":!e.disabled},a,s==null?void 0:s.className),children:[ge("input",je(Pe({},l),{ref:d,type:"checkbox",className:Fd("csdk-accent-UI-default csdk-h-checkbox csdk-w-checkbox csdk-m-checkbox",{"csdk-cursor-pointer":!e.disabled})})),r&&ge("span",{className:c.join(" "),children:r})]}))},jDt=at("input",{target:"e1y9klst0",label:"StyledBasicInput"})("box-sizing:border-box;height:100%;border-width:1px;border-style:solid;background-color:transparent;font-size:13px;color:inherit;padding:0 8px;border-radius:0;transition:border-color 250ms;border-color:#e6e6e6;width:100%;height:24px;box-sizing:border-box;&:disabled{cursor:not-allowed;}&:invalid{border-color:#fb7570;}&::placeholder{color:inherit;opacity:0.75;}&:focus{outline:none;border-color:inherit;}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}"),zDt=at("div",{target:"e1y9klst1",label:"ArrowsContainer"})("border:1px solid #e6e6e6;border-left:none;display:flex;flex-direction:column;width:14px;height:24px;box-sizing:border-box;"),IY=at("button",{target:"e1y9klst2",label:"ButtonWithIcon"})("height:12px;width:14px;position:relative;overflow:hidden;padding:0;margin:0;border:none;background-color:transparent;cursor:pointer;svg{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin-left:-0.5px;}"),yb=e=>{var t;const n=e,{callback:r,className:o,type:i="text",value:a,disabled:s,containerStyle:l,labelStyle:c,inputStyle:d}=n,h=_n(n,["callback","className","type","value","disabled","containerStyle","labelStyle","inputStyle"]),[u,w]=Ge((t=a==null?void 0:a.toString())!=null?t:""),y=Ns(),{themeSettings:p}=Lt(),k=He((j,F)=>{const U=F==="increment"?parseFloat(j)+1:parseFloat(j)-1;gl(U)&&(r(U.toString()),w(U.toString()))},[r,w]);return ot("div",{className:"csdk-flex csdk-items-center csdk-gap-x-2",style:l,children:[e.label&&ge("label",{style:c,className:"csdk-min-w-fit",htmlFor:e.id,children:e.label}),ot("div",{className:"csdk-h-full csdk-w-[100%] csdk-flex csdk-justify-end",children:[ge(jDt,je(Pe({},h),{type:i,style:d,ref:y,className:["csdk-border-UI-default",o].join(" "),value:u,onChange:j=>{r(j.target.value),w(j.target.value)},disabled:s})),i==="number"&&ot(zDt,{children:[ge(IY,{onClick:()=>k(u,"increment"),children:ge("svg",{className:"csdk-mt-[2px]",width:24,height:24,viewBox:"0 0 24 24",children:ge("path",{fill:p.typography.primaryTextColor,d:"M12 10.16l-3.174 2.719a.5.5 0 0 1-.65-.76l3.5-2.998a.5.5 0 0 1 .65 0l3.5 2.998a.5.5 0 1 1-.65.76L12 10.159z"})})}),ge(IY,{onClick:()=>k(u,"decrement"),children:ge("svg",{className:"csdk-mt-[-2px]",width:24,height:24,viewBox:"0 0 24 24",children:ge("path",{fill:p.typography.primaryTextColor,d:"M12 13.84l3.174-2.719a.5.5 0 0 1 .65.76l-3.5 2.998a.5.5 0 0 1-.65 0l-3.5-2.998a.5.5 0 1 1 .65-.76L12 13.841z"})})})]})]})]})},jue=e=>ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 15C7.23858 15 5 12.7614 5 10C5 7.23858 7.23858 5 10 5C12.7614 5 15 7.23858 15 10C15 11.2006 14.5768 12.3024 13.8715 13.1644L18.8536 18.1464C19.0488 18.3417 19.0488 18.6583 18.8536 18.8536C18.6583 19.0488 18.3417 19.0488 18.1464 18.8536L13.1644 13.8715C12.3024 14.5768 11.2006 15 10 15ZM10 14C12.2091 14 14 12.2091 14 10C14 7.79086 12.2091 6 10 6C7.79086 6 6 7.79086 6 10C6 12.2091 7.79086 14 10 14Z",fill:"#262E3D",fillOpacity:"0.67"})})),BDt=e=>ot("label",{children:[ge("input",je(Pe({},e),{className:"csdk-accent-UI-default csdk-text-UI-default csdk-w-radio csdk-h-radio csdk-m-radio "+e.className,type:"radio"})),e.label]}),$Dt=at("div",{target:"e15tkvqq0",label:"StyledDiv"})({"::-webkit-scrollbar":{width:"8px",height:"8px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{backgroundColor:"#c2c2c2",borderRadius:"4px",border:"1px solid transparent",backgroundClip:"content-box",minHeight:"20px",minWidth:"20px"},"::-webkit-scrollbar-thumb:hover":{backgroundColor:"#7d7d7d",border:"none"}}),FDt=e=>{var t=e,{items:n,currentSelection:r,title:o,className:i}=t,a=_n(t,["items","currentSelection","title","className"]);return ot($Dt,{className:i,children:[ge("div",{className:"csdk-ml-1.5",children:o}),n.map((s,l)=>ge(BDt,Pe({value:s,label:s,checked:s===r},a),l))]})},zue=pn(void 0);process.env.NODE_ENV!=="production"&&(zue.displayName="FormControlContext");function Bue(){return en(zue)}function HDt(e){return Vn("PrivateSwitchBase",e)}er("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const WDt=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${nn(o)}`],input:["input"]};return lr(i,HDt,t)},VDt=Gt(lp)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),UDt=Gt("input",{shouldForwardProp:sp})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ez=Tt(function(e,t){const n=e,{autoFocus:r,checked:o,checkedIcon:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:d,id:h,inputProps:u,inputRef:w,name:y,onBlur:p,onChange:k,onFocus:j,readOnly:F,required:U=!1,tabIndex:H,type:R,value:z,slots:I={},slotProps:N={}}=n,W=_n(n,["autoFocus","checked","checkedIcon","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value","slots","slotProps"]),[A,C]=Dj({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),v=Bue(),T=m=>{j&&j(m),v&&v.onFocus&&v.onFocus(m)},S=m=>{p&&p(m),v&&v.onBlur&&v.onBlur(m)},D=m=>{if(m.nativeEvent.defaultPrevented)return;const g=m.target.checked;C(g),k&&k(m,g)};let G=s;v&&typeof G>"u"&&(G=v.disabled);const q=R==="checkbox"||R==="radio",$=je(Pe({},e),{checked:A,disabled:G,disableFocusRipple:l,edge:c}),O=WDt($),E={slots:I,slotProps:Pe({input:u},N)},[_,x]=Vr("root",{ref:t,elementType:VDt,className:O.root,shouldForwardComponentProp:!0,externalForwardedProps:Pe(je(Pe({},E),{component:"span"}),W),getSlotProps:m=>je(Pe({},m),{onFocus:g=>{var M;(M=m.onFocus)==null||M.call(m,g),T(g)},onBlur:g=>{var M;(M=m.onBlur)==null||M.call(m,g),S(g)}}),ownerState:$,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:G,role:void 0,tabIndex:null}}),[f,b]=Vr("input",{ref:w,elementType:UDt,className:O.input,externalForwardedProps:E,getSlotProps:m=>({onChange:g=>{var M;(M=m.onChange)==null||M.call(m,g),D(g)}}),ownerState:$,additionalProps:Pe({autoFocus:r,checked:o,defaultChecked:a,disabled:G,id:q?h:void 0,name:y,readOnly:F,required:U,tabIndex:H,type:R},R==="checkbox"&&z===void 0?{}:{value:z})});return Me(_,je(Pe({},x),{children:[Me(f,Pe({},b)),A?i:d]}))});process.env.NODE_ENV!=="production"&&(ez.propTypes={autoFocus:ue.bool,checked:ue.bool,checkedIcon:ue.node.isRequired,classes:ue.object,className:ue.string,defaultChecked:ue.bool,disabled:ue.bool,disableFocusRipple:ue.bool,edge:ue.oneOf(["end","start",!1]),icon:ue.node.isRequired,id:ue.string,inputProps:ue.object,inputRef:Yh,name:ue.string,onBlur:ue.func,onChange:ue.func,onFocus:ue.func,readOnly:ue.bool,required:ue.bool,slotProps:ue.shape({input:ue.oneOfType([ue.func,ue.object]),root:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({input:ue.elementType,root:ue.elementType}),sx:ue.object,tabIndex:ue.oneOfType([ue.number,ue.string]),type:ue.string.isRequired,value:ue.any});function GDt(e){return Vn("MuiSwitch",e)}const sa=er("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),YDt=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${nn(n)}`,`size${nn(r)}`],switchBase:["switchBase",`color${nn(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=lr(s,GDt,t);return Pe(Pe({},t),l)},XDt=Gt("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${nn(n.edge)}`],t[`size${nn(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${sa.thumb}`]:{width:16,height:16},[`& .${sa.switchBase}`]:{padding:4,[`&.${sa.checked}`]:{transform:"translateX(16px)"}}}}]}),qDt=Gt(ez,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${sa.input}`]:t.input},n.color!=="default"&&t[`color${nn(n.color)}`]]}})(xr(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${sa.checked}`]:{transform:"translateX(20px)"},[`&.${sa.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${sa.checked} + .${sa.track}`]:{opacity:.5},[`&.${sa.disabled} + .${sa.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${sa.input}`]:{left:"-100%",width:"300%"}})),xr(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:qn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(_c(["light"])).map(([t])=>({props:{color:t},style:{[`&.${sa.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:qn(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${sa.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?G2(e.palette[t].main,.62):U2(e.palette[t].main,.55)}`}},[`&.${sa.checked} + .${sa.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),ZDt=Gt("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(xr(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),KDt=Gt("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(xr(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),$ue=Tt(function(e,t){const n=cr({props:e,name:"MuiSwitch"}),r=n,{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,slots:c={},slotProps:d={}}=r,h=_n(r,["className","color","edge","size","sx","slots","slotProps"]),u=je(Pe({},n),{color:i,edge:a,size:s}),w=YDt(u),y={slots:c,slotProps:d},[p,k]=Vr("root",{className:Wt(w.root,o),elementType:XDt,externalForwardedProps:y,ownerState:u,additionalProps:{sx:l}}),[j,F]=Vr("thumb",{className:w.thumb,elementType:KDt,externalForwardedProps:y,ownerState:u}),U=Me(j,Pe({},F)),[H,R]=Vr("track",{className:w.track,elementType:ZDt,externalForwardedProps:y,ownerState:u});return Me(p,je(Pe({},k),{children:[Me(qDt,je(Pe({type:"checkbox",icon:U,checkedIcon:U,ref:t,ownerState:u},h),{classes:je(Pe({},w),{root:w.switchBase}),slots:Pe(Pe({},c.switchBase&&{root:c.switchBase}),c.input&&{input:c.input}),slotProps:Pe(Pe({},d.switchBase&&{root:typeof d.switchBase=="function"?d.switchBase(u):d.switchBase}),d.input&&{input:typeof d.input=="function"?d.input(u):d.input})})),Me(H,Pe({},R))]}))});process.env.NODE_ENV!=="production"&&($ue.propTypes={checked:ue.bool,checkedIcon:ue.node,classes:ue.object,className:ue.string,color:ue.oneOfType([ue.oneOf(["default","primary","secondary","error","info","success","warning"]),ue.string]),defaultChecked:ue.bool,disabled:ue.bool,disableRipple:ue.bool,edge:ue.oneOf(["end","start",!1]),icon:ue.node,id:ue.string,inputProps:ue.object,inputRef:Yh,onChange:ue.func,required:ue.bool,size:ue.oneOfType([ue.oneOf(["medium","small"]),ue.string]),slotProps:ue.shape({input:ue.oneOfType([ue.func,ue.object]),root:ue.oneOfType([ue.func,ue.object]),switchBase:ue.oneOfType([ue.func,ue.object]),thumb:ue.oneOfType([ue.func,ue.object]),track:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({input:ue.elementType,root:ue.elementType,switchBase:ue.elementType,thumb:ue.elementType,track:ue.elementType}),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),value:ue.any});const Fue=at($ue,{target:"e151xo3r0",label:"SisenseSwitchButton"})(({theme:e})=>{var t;return{height:"23px",width:"33px","& .MuiSwitch-switchBase":{transform:"translateX(1px)",top:"2px",transition:"all .3s ease","&.Mui-checked":{color:"#fff",transform:"translateX(13px)","& + .MuiSwitch-track":{opacity:1,backgroundColor:(t=e.general.brandColor)!=null?t:"#FFC805"},"&:hover":{background:"transparent"}},"&:hover":{background:"transparent"}},"&:hover":{"& .MuiSwitch-thumb":{transform:"scale(1.2)"}},"& .MuiSwitch-thumb":{backgroundColor:"#fff",width:11,height:11,border:"1px solid #c4c8cd",boxShadow:"none",transition:"all .3s ease",boxSizing:"border-box"},"& .MuiSwitch-track":{opacity:1,height:"9px",width:"19px",backgroundColor:"#6e737d",borderRadius:9},"&:focus-visible, & .Mui-focusVisible":{outline:"-webkit-focus-ring-color auto 1px"}}}),Hue=()=>{const{themeSettings:e}=Lt(),{backgroundColor:t}=e.general,n=fi(t,rre);return ge("div",{className:"csdk-flex csdk-justify-center","data-testid":"triangle-indicator",children:ge("div",{style:{borderTopColor:n},className:"csdk-border-l-[70px] csdk-border-l-[transparent] csdk-border-r-[70px] csdk-border-r-[transparent] csdk-border-t-[13px]"})})},QDt=e=>{const t=e,{color:n=di}=t,r=_n(t,["color"]);return ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{children:ge("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18.808L20 8.80798L15.0995 4L5 13.808V18.7949L10 18.808ZM6 14.2308L12.8609 7.56797L16.3433 11.0504L9.58687 17.8069L6 17.7975V14.2308ZM15.0959 5.39742L13.5783 6.87121L17.0504 10.3433L18.579 8.81475L15.0959 5.39742ZM13.499 10.4355L9.64164 14.2398L8.93945 13.5278L12.7968 9.72353L13.499 10.4355Z",fill:n})}))},JDt=e=>ot("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:[ge("path",{d:"M10 10.5V15.5C10 15.7761 10.2239 16 10.5 16C10.7761 16 11 15.7761 11 15.5V10.5C11 10.2239 10.7761 10 10.5 10C10.2239 10 10 10.2239 10 10.5Z",fill:e.fill||di}),ge("path",{d:"M13 15.5V10.5C13 10.2239 13.2239 10 13.5 10C13.7761 10 14 10.2239 14 10.5V15.5C14 15.7761 13.7761 16 13.5 16C13.2239 16 13 15.7761 13 15.5Z",fill:e.fill||di}),ge("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 5H11C9.89543 5 9 5.89543 9 7H6.5C6.22386 7 6 7.22386 6 7.5C6 7.77614 6.22386 8 6.5 8H7V16.5C7 17.8807 8.11929 19 9.5 19H14.5C15.8807 19 17 17.8807 17 16.5V8H17.5C17.7761 8 18 7.77614 18 7.5C18 7.22386 17.7761 7 17.5 7H15C15 5.89543 14.1046 5 13 5ZM8 8V16.5C8 17.3284 8.67157 18 9.5 18H14.5C15.3284 18 16 17.3284 16 16.5V8H8ZM14 7H10C10 6.44772 10.4477 6 11 6H13C13.5523 6 14 6.44772 14 7Z",fill:e.fill||di})]})),eLt=e=>ge("svg",je(Pe({width:"22",height:"22",viewBox:"0 0 22 22",fill:"#b4b4b4",xmlns:"http://www.w3.org/2000/svg"},e),{children:ot("g",{transform:"translate(5.000000,5.000000) scale(.70, 0.6)",children:[ge("path",{d:"m3,9v11h14V9M4,9V6c0-3.3 2.7-6 6-6c3.3,0 6,2.7 6,6v3H14V6c0-2.2-1.8-4-4-4-2.2,0-4,1.8-4,4v3"}),ge("rect",{y:"10",x:"4",width:"12",height:"9",fill:"#dcdcdc"})]})})),Wue=e=>{const t=e.width||"24",n=e.height||"24";return ge("svg",{viewBox:`0 0 ${t} ${n}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e.className,style:e.style,width:t,height:n,children:ge("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 5V3.5C9 3.22386 9.22386 3 9.5 3C9.77614 3 10 3.22386 10 3.5V5H13V3.5C13 3.22386 13.2239 3 13.5 3C13.7761 3 14 3.22386 14 3.5V5H17C18.1046 5 19 5.89543 19 7V8V9V17C19 18.1046 18.1046 19 17 19H6C4.89543 19 4 18.1046 4 17V9V8V7C4 5.89543 4.89543 5 6 5H9ZM10 6H13V6.5C13 6.77614 13.2239 7 13.5 7C13.7761 7 14 6.77614 14 6.5V6H17C17.5523 6 18 6.44772 18 7V8H5V7C5 6.44772 5.44772 6 6 6H9V6.5C9 6.77614 9.22386 7 9.5 7C9.77614 7 10 6.77614 10 6.5V6ZM5 17V9H18V17C18 17.5523 17.5523 18 17 18H6C5.44772 18 5 17.5523 5 17ZM14.5 12H8.5C8.22386 12 8 11.7761 8 11.5C8 11.2239 8.22386 11 8.5 11H14.5C14.7761 11 15 11.2239 15 11.5C15 11.7761 14.7761 12 14.5 12ZM8.5 14H14.5C14.7761 14 15 13.7761 15 13.5C15 13.2239 14.7761 13 14.5 13H8.5C8.22386 13 8 13.2239 8 13.5C8 13.7761 8.22386 14 8.5 14ZM14.5 16H8.5C8.22386 16 8 15.7761 8 15.5C8 15.2239 8.22386 15 8.5 15H14.5C14.7761 15 15 15.2239 15 15.5C15 15.7761 14.7761 16 14.5 16Z",fill:e.iconColor||di})})},GT=e=>{var t;return ge("svg",je(Pe({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:ge("path",{fill:(t=e.fill)!=null?t:"#000",fillRule:"nonzero",d:"M7.589 10L7 10.777 11.99 15 17 10.777 16.413 10l-4.422 3.727z"})}))},tLt=e=>ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fill:"currentColor",d:"M18.5 8.228L13 10.343v6.894l5.5-2.39v-6.62zm-.893-.728l-5.113-1.967-5.297 1.892 5.303 2.04L17.607 7.5zM6 8.036v6.8l6 2.423v-6.916L6 8.036zm-1-.888l7.506-2.681 6.994 2.69v8.345l-6.993 3.04L5 15.512V7.147z"})})),nLt=e=>ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fill:e.color,d:"M8.354 11.646l-.708.708 3.418 3.417 5.343-7.48-.814-.582-4.657 6.52z"})})),rLt=e=>{var t;return ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M9 11h7v1H9v-1zm0 2h7v1H9v-1z"})}))},oLt=e=>{var t;return ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M11.715 12l.488-1H9v-1h3.69l.989-2.025.898.438L13.804 10H16v1h-2.684l-.488 1H16v1h-3.66l-1.035 2.124-.9-.439.823-1.685H9v-1h2.715z"})}))},iLt=e=>{var t;return ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M16.242 15.066l-.456.89L9 12.476 15.85 9l.452.892L11.2 12.48z"})}))},aLt=e=>{var t;return ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M9 17h7v1H9v-1zm6.942-2.934l-.437.89L9 11.476 15.566 8l.434.892-4.89 2.589 4.832 2.585z"})}))},sLt=e=>{var t;return ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M8.06 9.89L8.517 9l6.785 3.48-6.85 3.476L8 15.065l5.102-2.59z"})}))},lLt=e=>{var t;return ge("svg",je(Pe({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:ge("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M9.06 8.89L9.517 8l6.785 3.48-6.85 3.476L9 14.065l5.102-2.59L9.06 8.89zM9 17h7v1H9v-1z"})}))},S_=e=>e==="white",RY="rgb(240, 240, 240)",cLt="rgba(0, 0, 0, 0.26)",uLt=at("button",{target:"e1pmmnp20",label:"CalendarButton"})("cursor:pointer;background-color:",({theme:e,variant:t,disabled:n})=>n?RY:S_(t)?e.general.backgroundColor:Fy,";border:",({variant:e})=>S_(e)?"1px solid rgb(110 115 125 / var(--tw-border-opacity))":"none",";color:",({theme:e,isActive:t,disabled:n})=>n?cLt:t?e.general.primaryButtonTextColor:e.typography.primaryTextColor,";border-radius:0.375rem;&:hover{background-color:",({theme:e,variant:t,disabled:n})=>n?RY:fi(S_(t)?e.general.backgroundColor:Fy),";transition:0.2s;}transition:color 250ms;"),dLt=at("label",{target:"e1pmmnp21",label:"CalendarLabel"})("color:",({theme:e,variant:t})=>S_(t)?e.typography.primaryTextColor:e.general.primaryButtonTextColor,";"),q3=e=>{const{variant:t="grey",label:n,isActive:r,theme:o}=e,i=`csdk-text-left csdk-w-[152px] csdk-bg-[${Fy}] csdk-text-[13px] csdk-outline-0 csdk-border csdk-border-transparent csdk-p-input csdk-h-6 csdk-rounded-[4px] `;return ot("div",{className:"csdk-relative csdk-flex csdk-mr-[5px] csdk-cursor-pointer","aria-label":"DateRangeField",children:[n&&ge(dLt,{htmlFor:e.id,className:"csdk-my-[5px] csdk-mr-[7px] csdk-text-[13px] csdk-leading-[18px]",theme:o,variant:t,children:n}),ge("div",{className:"csdk-relative csdk-h-6",children:ot(uLt,je(Pe({},e),{variant:t,"aria-label":"DateRangeFieldButton",className:i+"disabled:csdk-placeholder:csdk-opacity-30 disabled:csdk-cursor-not-allowed focus:csdk-border-solid focus:csdk-border-input focus:csdk-border-UI-default hover:csdk-border-guiding csdk-text-text-active csdk-pl-2.5 csdk-pr-10 csdk-overflow-hidden "+(e.className||""),children:[e.value,ge("div",{"aria-label":"DateRangeFieldIcon",className:"csdk-absolute csdk-right-[4px] csdk-top-1/2 csdk-transform -csdk-translate-y-1/2",children:ge(Wue,{className:"csdk-flex csdk-text-text-active","aria-hidden":"true",iconColor:r?o.general.primaryButtonTextColor:o.typography.primaryTextColor})})]}))})]})};function jY(e){return e.substring(2).toLowerCase()}function pLt(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Ud(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,a=Ye(!1),s=Ye(null),l=Ye(!1),c=Ye(!1);Je(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const d=Ni(Wg(t),s),h=ru(y=>{const p=c.current;c.current=!1;const k=fa(s.current);if(!l.current||!s.current||"clientX"in y&&pLt(y,k))return;if(a.current){a.current=!1;return}let j;y.composedPath?j=y.composedPath().includes(s.current):j=!k.documentElement.contains(y.target)||s.current.contains(y.target),!j&&(n||!p)&&o(y)}),u=y=>p=>{c.current=!0;const k=t.props[y];k&&k(p)},w={ref:d};return i!==!1&&(w[i]=u(i)),Je(()=>{if(i!==!1){const y=jY(i),p=fa(s.current),k=()=>{a.current=!0};return p.addEventListener(y,h),p.addEventListener("touchmove",k),()=>{p.removeEventListener(y,h),p.removeEventListener("touchmove",k)}}},[h,i]),r!==!1&&(w[r]=u(r)),Je(()=>{if(r!==!1){const y=jY(r),p=fa(s.current);return p.addEventListener(y,h),()=>{p.removeEventListener(y,h)}}},[h,r]),wn(t,w)}process.env.NODE_ENV!=="production"&&(Ud.propTypes={children:Gh.isRequired,disableReactTree:ue.bool,mouseEvent:ue.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:ue.func.isRequired,touchEvent:ue.oneOf(["onTouchEnd","onTouchStart",!1])});process.env.NODE_ENV!=="production"&&(Ud.propTypes=Pj(Ud.propTypes));const Z3=e=>{var t,n;const[r,o]=Ge(!1),{themeSettings:i}=Lt(),a=()=>{o(!r)},s=Ye(null),l=(t=e.selectedIdx)!=null?t:null,c={fontFamily:i.typography.fontFamily,fontWeight:400,textTransform:"none",fontSize:"13px",color:i.typography.primaryTextColor},d=e.elements.map((h,u)=>ge(C1,{onClick:()=>{o(!1)},sx:je(Pe({},c),{minHeight:"unset","&:hover":{backgroundColor:fi(i.general.backgroundColor)}}),disabled:e.disabled,children:h},u));return ot(bn,{children:[ge(Wd,{ref:s,onClick:a,className:"csdk-h-full csdk-border-solid csdk-border-input csdk-box-border",sx:je(Pe({},c),{border:"1px solid rgb(110 115 125 / var(--tw-border-opacity))",marginLeft:"5px",marginRight:"5px",borderRadius:"0.375rem",verticalAlign:"unset","&:hover":{backgroundColor:fi(i.general.backgroundColor)}}),disabled:e.disabled,children:((n=e.icon)!=null?n:l!==null)?e.elements[l??0]:ge("div",{children:"Select..."})}),ge(ef,{open:r,anchorEl:s.current,placement:"bottom-start",sx:{backgroundColor:i.general.backgroundColor,border:"1px solid #c4c8cd",borderRadius:"4px",boxShadow:"0px 2px 2px rgba(0, 0, 0, 0.25)"},children:ge(Ud,{onClickAway:()=>o(!1),children:ge(Nj,{autoFocusItem:r,children:d})})})]})},t0=at("div",{target:"e1f1pk9t0",label:"FilterContentDisplay"})("padding:12px;font-size:13px;"),au=e=>e==="vertical",hLt=at("div",{target:"e1jswn0s0",label:"BackgroundFilterIcon"})(`background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpkZmY0YWNkMy1lYWYxLTQwNzItYTdlMy1hMjk3YzZjZTFlODUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTBFNDE0ODgwMjBFMTFFNThCQzJGRjdDRkI3RTQ1RUMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODRDMjI3QTIwMUU4MTFFNThCQzJGRjdDRkI3RTQ1RUMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpkZmY0YWNkMy1lYWYxLTQwNzItYTdlMy1hMjk3YzZjZTFlODUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6ZGZmNGFjZDMtZWFmMS00MDcyLWE3ZTMtYTI5N2M2Y2UxZTg1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+caeyqgAAAIdJREFUeNpi/P
1026
1026
  center center no-repeat;float:left;margin:4px 0 0 0;width:16px;height:16px;display:inline-block;`),cm="#dadada",um="1px",fLt=213,mLt=at("div",{target:"e14pkwr00",label:"BaseContainer"})("width:min-content;max-width:100%;align-self:flex-start;box-sizing:border-box;",({shouldShowBorder:e})=>e&&ca`
1027
1027
  border-top: ${um} solid ${cm};