@sisense/sdk-ui-preact 1.34.0 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +1 -1
- package/dist/ai.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +3 -3
- package/dist/{use-common-filters-Bw15BNGn-9af1ab9b.js → use-common-filters-CRL16HJ4-74ae559f.js} +4 -4
- package/dist/{use-common-filters-Bw15BNGn-57e81698.cjs → use-common-filters-CRL16HJ4-f5d9b1aa.cjs} +2 -2
- package/package.json +4 -7
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./use-common-filters-Bw15BNGn-57e81698.cjs");class Cc{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 i=t.subscribe(a=>{r.data=a,r.isReady=!0,this.rootElement&&this.renderComponentWithContext(this.rootElement,this.props)});this.subscriptions.push(i)})}renderComponentWithContext(t,n){if(!this.contexts.every(({isReady:l})=>l)||!t)return;const i=o.g(this.component,n,n==null?void 0:n.children),a=this.contextConnectors.reduceRight((l,{providerComponent:s},d)=>o.g(s,this.contexts[d].data,l),i);o.B(a,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&&o.B(null,this.rootElement)}}const Dc=({nativeElement:e})=>{const t=o.F(null);return o.A(()=>{t.current&&t.current.appendChild(e)},[e]),o.u("div",{ref:t,style:"width: 100%; height: 100%"})};function eh({hook:e,params:t,onResult:n}){const r=o.F(null),i=e(...t);return o._(()=>{r.current!==i&&n(i),r.current=i},[i,n]),null}class th{constructor(t,n=[]){this.hook=t,this.rootElement=document.createElement("div"),this.resultSubscribeFn=null,this.componentAdapter=new Cc(eh,n)}handleHookResult(t){var n;(n=this.resultSubscribeFn)==null||n.call(this,t)}run(...t){this.params=t,this.componentAdapter.render(this.rootElement,{hook:this.hook,params:this.params,onResult:this.handleHookResult.bind(this)})}subscribe(t){this.resultSubscribeFn=t}destroy(){this.componentAdapter.destroy(),this.resultSubscribeFn=null,this.rootElement.remove()}}class nh{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 rh{constructor(t){this.observable=new nh,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()}}const oh=(e,t,n)=>{o.B(o.g(t,n),e)},Mc=(e,t,n=[])=>{const r=Array.isArray(n)?n:[n];return o.g(e,t,...r)},Tc=e=>Mc(Dc,{nativeElement:e}),ih=e=>t=>{const n=e(t);return Tc(n)},ah=e=>t=>{o.B(e,t)};var lh=Object.defineProperty,sh=Object.defineProperties,ch=Object.getOwnPropertyDescriptors,Jr=Object.getOwnPropertySymbols,Ac=Object.prototype.hasOwnProperty,Ec=Object.prototype.propertyIsEnumerable,Hi=(e,t,n)=>t in e?lh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||(t={}))Ac.call(t,n)&&Hi(e,n,t[n]);if(Jr)for(var n of Jr(t))Ec.call(t,n)&&Hi(e,n,t[n]);return e},S=(e,t)=>sh(e,ch(t)),oe=(e,t)=>{var n={};for(var r in e)Ac.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jr)for(var r of Jr(e))t.indexOf(r)<0&&Ec.call(e,r)&&(n[r]=e[r]);return n},B=(e,t,n)=>(Hi(e,typeof t!="symbol"?t+"":t,n),n),xe=(e,t,n)=>new Promise((r,i)=>{var a=d=>{try{s(n.next(d))}catch(c){i(c)}},l=d=>{try{s(n.throw(d))}catch(c){i(c)}},s=d=>d.done?r(d.value):Promise.resolve(d.value).then(a,l);s((n=n.apply(e,t)).next())});function Pn(e){return e.endsWith("/")?e:`${e}/`}const dh={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}}"}},uh={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}}"}},Nc="sdkRestClient",ph={en:dh,uk:uh};function hh(){return o.lD({resource:ph,language:"en",namespace:Nc})}const{i18nextInstance:fh}=hh();class hr{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 _o=(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},Lc=(e,t)=>{if(!e||typeof e!="string")return e;const n=new URL(e);for(const[r,i]of Object.entries(t))n.searchParams.append(r,i);return n.toString().replace(/\/([?&])/,"$1")},mh=(e,t)=>e===null||t===null;class gh extends hr{constructor(t,n){super("bearer"),this.bearer=n,this._resolve(!0)}applyHeader(t){const n="Bearer "+this.bearer;_o(t,{Authorization:n})}authenticate(){return this._result}authenticated(){return this._result}}function bh(e){return e.type==="bearer"}class vh extends hr{constructor(){super("fusion")}authenticate(){var t,n,r,i,a;const l=!!(!((n=(t=window.prism)===null||t===void 0?void 0:t.user)===null||n===void 0)&&n._id);this._resolve(l);const s=(a=(i=(r=window.document)===null||r===void 0?void 0:r.cookie)===null||i===void 0?void 0:i.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/))===null||a===void 0?void 0:a[1];return s&&(this.antiCsrfToken=s),this._result}applyHeader(t){this.antiCsrfToken&&_o(t,{"X-Xsrf-Token":this.antiCsrfToken})}}let Ot=class extends o.cD{constructor(e,t){super(Nc,{key:e,interpolationOptions:t},fh.t)}get status(){return this.interpolationOptions.status}};var ai=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class yh extends hr{constructor(t,n=!1){super("sso"),this.url=Pn(t),this._enableSilentPreAuth=n}authenticate(t=!0){var n;return ai(this,void 0,void 0,function*(){try{this._authenticating=!0;const{isAuthenticated:r,loginUrl:i}=yield this.checkAuthentication();if(r)return this._resolve(!0),yield this._result;const a=Lc(i,{return_to:window.location.href});if(this._enableSilentPreAuth&&t){yield this.authenticateSilent(a);const{isAuthenticated:l}=yield this.checkAuthentication();if(l)return this._resolve(!0),yield this._result}(n=window==null?void 0:window.location)===null||n===void 0||n.replace(a)}finally{this._resolve(!1),this._authenticating=!1}return this._result})}authenticateSilent(t){return ai(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;return ai(this,void 0,void 0,function*(){const r=`${this.url}api/auth/isauth`,i=yield fetch(r,{headers:{Internal:"true"},credentials:"include"}).catch(So);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 Ot("errors.authFailed");const a=yield i.json();if(!a.isAuthenticated){if(!a.ssoEnabled)throw new Ot("errors.ssoNotEnabled");if(!a.loginUrl)throw new Ot("errors.ssoNoLoginUrl")}return{isAuthenticated:a.isAuthenticated,loginUrl:a.loginUrl||""}})}}function Ic(e){return e.type==="sso"}var wh=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class xh extends hr{constructor(t,n){super("wat"),this.url=`${Pn(t)}api/v1/wat/sessionToken`,this.body=`{"webAccessToken": "${n}"}`}authenticate(){return wh(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(So);if(t.ok){const n=yield t.json();this._initialiser=n.initialiser,this._webSessionToken=n.webSessionToken,this._resolve(!0)}}catch{throw new Ot("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;_o(t,{Authorization:n,Initialiser:r})}}}function Oc(e){return e.type==="wat"}var Hc=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};function kh(e){var t,n,r;return Hc(this,void 0,void 0,function*(){if(!e.ok){const i=(t=e.headers)===null||t===void 0?void 0:t.get("Content-Type"),a=i&&i.includes("application/json")?yield e.json().catch(()=>({})):{};throw new Ot("errors.responseError",{status:e.status.toString(),statusText:e.statusText,errorCode:(n=a.error)===null||n===void 0?void 0:n.code,errorMessage:(r=a.error)===null||r===void 0?void 0:r.message,context:e.statusText?"withStatusText":"onlyStatus"})}return e})}function _h(e,t){if(t.invalidate(),Ah(t))throw new Ot("errors.passwordAuthFailed");if(bh(t)||Oc(t))throw new Ot("errors.tokenAuthFailed");return Ic(t)&&!t.isAuthenticating()&&t.authenticate(),e}function Sh(e){return e.message==="Failed to fetch"&&e.name==="TypeError"}function Ch(){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 Ot("errors.networkError"))}const Dh=e=>t=>Hc(void 0,void 0,void 0,function*(){return t.status===401?_h(t,e):t.ok?t:kh(t)}),So=e=>Sh(e)?Ch():Promise.reject(e);var Mh=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class Th extends hr{constructor(t,n,r){super("password"),this._authheader="",this.url=`${Pn(t)}api/v1/authentication/login`;const i=encodeURIComponent(n),a=encodeURIComponent(r);this.body=`username=${i}&password=${a}`}authenticate(){return Mh(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(So);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;_o(t,{Authorization:n})}}function Ah(e){return e.type==="password"}function Eh({url:e,username:t,password:n,token:r,wat:i,ssoEnabled:a=!1,enableSilentPreAuth:l=!1,useFusionAuth:s=!1}){const d=Pn(e);return a?new yh(d,l):t&&n?new Th(d,t,n):r?new gh(d,r):i?new xh(d,i):s?new vh:null}var Nh=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class Lh{constructor(t,n,r){this.url=Pn(t),this.auth=n,this.env=r}login(){return this.auth.authenticate()}call(t,n,r){return Nh(this,void 0,void 0,function*(){this.auth.isAuthenticating()&&(yield this.auth.authenticated()),n.headers=n.headers||{},Ic(this.auth)&&(n.credentials="include"),this.auth.applyHeader(n.headers);const i=r!=null&&r.skipTrackingParam?t:Lc(t,{trc:this.env}),a=yield fetch(i,n).then(Dh(this.auth)).catch(So);if(!(a.status===204||a.status===304))return r!=null&&r.returnBlob?a.blob():a.json().catch(l=>{var s,d;if(!(!((d=(s=l==null?void 0:l.message)===null||s===void 0?void 0:s.includes)===null||d===void 0)&&d.call(s,"Unexpected end of JSON input")))throw l})})}post(t,n,r={},i,a){const l=Object.assign({method:"POST",body:a!=null&&a.nonJSONBody?n:JSON.stringify(n),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json;charset=UTF-8"},signal:i},r);return this.call(this.url+t,l,a)}patch(t,n,r={},i,a){const l=Object.assign({method:"PATCH",body:a!=null&&a.nonJSONBody?n:JSON.stringify(n),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json;charset=UTF-8"},signal:i},r);return this.call(this.url+t,l,a)}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 Ih={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.'}},Oh={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}}". Переконайтесь що джерело існує і доступне.'}},Rc="sdkQueryClient",Hh={en:Ih,uk:Oh};function Rh(){return o.lD({resource:Hh,language:"en",namespace:Rc})}const{i18nextInstance:Ph}=Rh();class nr extends o.D_{constructor(t,n,r,i,a,l,s,d){super(t,a||o.Ni.Dimension,l,d),this._dimensions=[],this._attributes=[],this._sort=o.Jn.None,this._sort=s||o.Jn.None,this._expression=n,this.setDimensions(i||[]),this.setAttributes(r)}static parseType(t){switch(t){case"datetime":case o.Ni.DateDimension:return o.Ni.DateDimension;case"text":case o.Ni.TextDimension:return o.Ni.TextDimension;case"numeric":case o.Ni.NumericDimension:return o.Ni.NumericDimension}return o.Ni.TextDimension}getAttachedName(t,n){let r=t;const i=o.Bu(t);return(i==="id"||i==="name"||Object.getOwnPropertyDescriptor(this,i)!==void 0||this[i]!==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[o.Bu(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[o.Bu(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 nr(this.name,this.expression,this.attributes,this.dimensions,this.type,this.description,t,this.dataSource)}serializable(){const t=super.serializable();return t.expression=this.expression,this.getSort()!==void 0&&(t.sort=this.getSort()),t.attributes=this._attributes.map(n=>n.serializable()),t.diemsnions=this._dimensions.map(n=>n.serializable()),this.defaultAttribute&&(t.defaultAttribute=this.defaultAttribute.serializable()),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:o.gD(this.type)}};return this._sort!=o.Jn.None&&(n.jaql.sort=this._sort==o.Jn.Ascending?"asc":"desc"),t===!0?n.jaql:n}}class Co extends nr{constructor(t,n,r,i,a){super(t,n,[],[],o.Ni.DateDimension,r,i,a),this.defaultLevel=o.Et.Years,this.Years=new o.Pc(o.Et.Years,n,o.Et.Years,"yyyy",r,i,a),this.Quarters=new o.Pc(o.Et.Quarters,n,o.Et.Quarters,"Q yyyy",r,i,a),this.Months=new o.Pc(o.Et.Months,n,o.Et.Months,"yyyy-MM",r,i,a),this.Weeks=new o.Pc(o.Et.Weeks,n,o.Et.Weeks,"ww yyyy",r,i,a),this.Days=new o.Pc(o.Et.Days,n,o.Et.Days,"yyyy-MM-dd",r,i,a),this.Hours=new o.Pc(o.Et.Hours,n,o.Et.Hours,"yyyy-MM-dd HH:mm",r,i,a),this.MinutesRoundTo30=new o.Pc(o.Et.MinutesRoundTo30,n,o.Et.MinutesRoundTo30,"yyyy-MM-dd HH:mm",r,i,a),this.MinutesRoundTo15=new o.Pc(o.Et.MinutesRoundTo15,n,o.Et.MinutesRoundTo15,"yyyy-MM-dd HH:mm",r,i,a),this.Minutes=new o.Pc(o.Et.Minutes,n,o.Et.Minutes,"yyyy-MM-dd HH:mm",r,i,a),this.Seconds=new o.Pc(o.Et.Seconds,n,o.Et.Seconds,"yyyy-MM-dd HH:mm:ss",r,i,a),this.AggHours=new o.Pc(o.Et.AggHours,n,o.Et.AggHours,"HH:mm",r,i,a),this.AggMinutesRoundTo30=new o.Pc(o.Et.AggMinutesRoundTo30,n,o.Et.AggMinutesRoundTo30,"HH:mm",r,i,a),this.AggMinutesRoundTo15=new o.Pc(o.Et.AggMinutesRoundTo15,n,o.Et.AggMinutesRoundTo15,"HH:mm",r,i,a),this.AggMinutesRoundTo1=new o.Pc(o.Et.AggMinutesRoundTo1,n,o.Et.AggMinutesRoundTo1,"HH:mm",r,i,a),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 Co(this.name,this.expression,this.description,t,this.dataSource)}serializable(){const t=super.serializable();return this.defaultLevel&&(t.defaultLevel=this.defaultLevel),t}jaql(t){const n=this[this.defaultLevel].jaql();return n.jaql.title=this.name,t?n.jaql:n}}function Pc(e){const t=e.name||e.title,n=e.desc||e.description,r=e.expression||e.dim,i=nr.parseType(e.dimtype||e.type),a=e.sort,l=e.dataSource;if(i==o.Ni.DateDimension)return new Co(t,r,n,a,l);const s=Object.getOwnPropertyNames(e).map(u=>e[u]).filter(u=>o.Ni.isAttribute(u.type));if(s.length==0)if(e.attributes){let u;for(let p=0;p<e.attributes.length;p++)u=e.attributes[p],s.push(new o.Mm(u.name,u.expression,u.type,u.description,u.sort,u.dataSource))}else r&&s.push(new o.Mm(t,r,i,n,a,l));const d=Object.getOwnPropertyNames(e).map(u=>e[u]).filter(u=>o.Ni.isDimension(u.type));if(d.length==0&&e.dimensions)for(let u=0;u<e.dimensions.length;u++)d.push(Pc(e.dimensions[u]));const c=new nr(t,r,s,d,i,n,a,l);return e.defaultAttribute&&(c.defaultAttribute=s.find(u=>u.name===e.defaultAttribute)),c}function Fh(e){const t=e.name||e.title,n=e.expression||e.dim,r=e.desc||e.description,i=e.sort,a=e.dataSource;return new Co(t,n,r,i,a)}function jh(e,t){const n=e.map(i=>zh(i,t)),r=Wh(n);return Object.values(r).map(i=>Pc(i))}const zh=(e,t)=>{const n=e.table,r=e.tableTitle||n,i=e.id,a=e.title||i,l=o.fG(t)?t:{title:t,live:!1},s=e.dimtype==="datetime"?Fh({name:a,expression:i,dataSource:l}):o.eAe({name:a,type:e.dimtype==="text"?"text-attribute":"numeric-attribute",expression:i,dataSource:l});return{dimension:{id:n,name:r},attribute:s}},Wh=e=>e.reduce((t,{dimension:n,attribute:r})=>{const i=t[n.name]||{name:n.name,expression:n.id};return Object.assign(Object.assign({},t),{[n.name]:Object.assign(Object.assign({},i),{[r.name]:r})})},{}),Fc=e=>{if(e!==void 0)return`${e}`},jc=e=>{if(e!==void 0)return new Date(e).toISOString()},da=()=>!1;function jl(e,t){const n=t.filter;return"or"in n?r=>n.or.map(i=>e(Object.assign(Object.assign({},t),{filter:i}))).reduce((i,a)=>i||a(r),!1):"and"in n?r=>n.and.map(i=>e(Object.assign(Object.assign({},t),{filter:i}))).reduce((i,a)=>i&&a(r),!0):e(t)}function Bh(e){const{datatype:t}=e,n=e.filter,r=t==="datetime"?jc:Fc;return i=>{const a=n.members.map(r),l=r(i);return a.includes(l)}}function Yh(e){const{datatype:t}=e,n=e.filter,r=t==="datetime"?jc:Fc;return i=>{var a,l;const s=((l=(a=n.exclude)===null||a===void 0?void 0:a.members)===null||l===void 0?void 0:l.map(r))||[],d=r(i);return!s.includes(d)}}function qh(e){const t=e.filter,n=o.q_(t);return n===o.Ht.STARTS_WITH?r=>new RegExp(`^${t.startsWith}`,"i").test(r):n===o.Ht.ENDS_WITH?r=>new RegExp(`${t.endsWith}$`,"i").test(r):n===o.Ht.CONTAINS?r=>new RegExp(t.contains,"i").test(r):n===o.Ht.EQUALS?r=>r.localeCompare(t.equals,void 0,{sensitivity:"base"})===0:n===o.Ht.DOESNT_START_WITH?r=>!new RegExp(`^${t.doesntStartWith}`,"i").test(r):n===o.Ht.DOESNT_END_WITH?r=>!new RegExp(`${t.doesntEndWith}$`,"i").test(r):n===o.Ht.DOESNT_CONTAIN?r=>!new RegExp(t.doesntContain,"i").test(r):n===o.Ht.DOESNT_EQUAL?r=>r.localeCompare(t.doesntEqual,void 0,{sensitivity:"base"})!==0:da}function Uh(e){const t=e.filter,n=o.q_(t);return n===o.Ht.EQUALS?r=>Number(t.equals)===Number(r):n===o.Ht.DOESNT_EQUAL?r=>Number(t.doesntEqual)!==Number(r):n===o.Ht.LESS_THAN?r=>Number(r)<Number(t.toNotEqual):n===o.Ht.GREATER_THAN?r=>Number(r)>Number(t.fromNotEqual):n===o.Ht.BETWEEN?r=>Number(t.to)>=Number(r)&&Number(r)>=Number(t.from):n===o.Ht.GREATER_THAN_OR_EQUAL?r=>Number(r)>=Number(t.from):n===o.Ht.LESS_THAN_OR_EQUAL?r=>Number(t.to)>=Number(r):da}function Vh(e){const t=e,{datatype:n}=t,r=t.filter;return o.XV(r)?Bh(t):o.QV(r)&&o.q_(r)===o.Ht.IS_NOT?Yh(t):n==="text"?jl(qh,t):n==="numeric"?jl(Uh,t):da}function Qh(e){return t=>{if(o.Ti(t)){const{filters:n,relations:r}=o.Ei(t),i=[...n,e],a=o.mi(n,r,i);return o.gi(i,a)}return[...t||[],e]}}function Gh(e){return t=>{if(o.Ti(t)){const{filters:n,relations:r}=o.Ei(t),i=[...n,...e],a=o.mi(n,r,i);return o.gi(i,a)}return[...t||[],...e]}}function $h(e){return t=>{if(o.Ti(t)){const{filters:n,relations:r}=o.Ei(t),i=n.filter(l=>l.config.guid!==e.config.guid),a=o.mi(n,r,i);return o.gi(i,a)}return(t||[]).filter(n=>n.config.guid!==e.config.guid)}}function Zh(e){return t=>{if(o.Ti(t)){const{filters:n,relations:r}=o.Ei(t),i=n.filter(l=>!e.some(s=>l.config.guid===s.config.guid)),a=o.mi(n,r,i);return o.gi(i,a)}return(t||[]).filter(n=>!e.some(r=>n.config.guid===r.config.guid))}}function Xh(e,t){return n=>{if(o.Ti(n)){const{filters:r,relations:i}=o.Ei(n),a=r.map(s=>s.config.guid===e.config.guid?t:s),l=o.eL(i,e,t);return o.gi(a,l)}return(n||[]).map(r=>r.config.guid===e.config.guid?t:r)}}var Be={},zc={},Do={},ua={};(function(e){var t=o.rh&&o.rh.__awaiter||function(i,a,l,s){function d(c){return c instanceof l?c:new l(function(u){u(c)})}return new(l||(l=Promise))(function(c,u){function p(m){try{f(s.next(m))}catch(g){u(g)}}function h(m){try{f(s.throw(m))}catch(g){u(g)}}function f(m){m.done?c(m.value):d(m.value).then(p,h)}f((s=s.apply(i,a||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.Task=e.ExecutionResultStatus=void 0;var n;(function(i){i.SUCCESS="SUCCESS",i.ERROR="ERROR"})(n=e.ExecutionResultStatus||(e.ExecutionResultStatus={}));class r{constructor(a,l,s){this.steps=a,this.passport=l,this.addons=s,this.statistics={startTime:new Date,steps:[],runtimeInfo:{}},this.currentStep=void 0}run(a){return t(this,void 0,void 0,function*(){let l=a,s;for(let c=0;c<this.steps.length;c+=1){this.currentStep=this.steps[c];const{resultValue:u,info:p}=yield this.currentStep.run(this,l);if(this.statistics.steps.push(p),p.success)l=u;else{s=p.error;break}}const d=this.statistics.steps.length===this.steps.length&&this.statistics.steps.every(c=>c.success);return this.statistics.endTime=new Date,{status:d?n.SUCCESS:n.ERROR,error:s,result:d?l:void 0,statistics:this.statistics}})}cancel(a){var l;return t(this,void 0,void 0,function*(){yield(l=this.currentStep)===null||l===void 0?void 0:l.cancel(this,a)})}addRuntimeInfo(a,l){this.statistics.runtimeInfo[a]=l}emitAddonEvent(a,...l){var s;const d=a.split("."),c=d[0],u=d[1],p=(s=this.addons)===null||s===void 0?void 0:s.find(f=>f.addonName===c),h=(p==null?void 0:p.events)[u];h(...l)}}e.Task=r})(ua);var li=o.rh&&o.rh.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(Do,"__esModule",{value:!0});Do.AbstractTaskManager=void 0;const Kh=ua;class Jh{constructor(t){this.runningTasks=new Map,this.addons=t||[]}runTask(t){return li(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=>li(this,void 0,void 0,function*(){const r=new Kh.Task(t,n,this.addons);return this.runTask(r)})}cancel(t,n){return li(this,void 0,void 0,function*(){const r=this.runningTasks.get(t);r&&(yield r.cancel(n))})}}Do.AbstractTaskManager=Jh;var Mo={},fr={};Object.defineProperty(fr,"__esModule",{value:!0});fr.TaskCanceledError=void 0;class ef extends Error{constructor(t){const n=`Task was canceled due to: "${t}"`;super(n)}}fr.TaskCanceledError=ef;var zl=o.rh&&o.rh.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.Step=void 0;const tf=fr;class nf{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 zl(this,void 0,void 0,function*(){return this.addStepInfo(t,{name:this.name}),new Promise(r=>{const i=new Date,a=(l,s)=>{const d=new Date,c=d.getTime()-i.getTime();this.addStepInfo(t,{startTime:i,endTime:d,duration:c}),this.addStepInfo(t,s?{success:!1,error:s}:{success:!0}),r({resultValue:l,info:this.getStepInfo(t)})};this.taskSelfResolvers.set(t,a),this.runLogic(t,n).then(l=>a(l)).finally(()=>{this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t)}).catch(l=>a(void 0,l))})})}cancel(t,n){return zl(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 tf.TaskCanceledError(n)),this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t),yield this.cancelLogic(t,n)})}addStepInfo(t,n){const r=this.taskStepInfos.get(t)||{},i=Object.assign(Object.assign({},r),n);this.taskStepInfos.set(t,i)}getStepInfo(t){return this.taskStepInfos.get(t)}}Mo.Step=nf;var To={};Object.defineProperty(To,"__esModule",{value:!0});To.Addon=void 0;class rf{constructor(){this.events={}}}To.Addon=rf;var Ao={},Er,of=new Uint8Array(16);function Wc(){if(!Er&&(Er=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Er))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Er(of)}const af=/^(?:[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 Eo(e){return typeof e=="string"&&af.test(e)}var Me=[];for(var si=0;si<256;++si)Me.push((si+256).toString(16).substr(1));function No(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Me[e[t+0]]+Me[e[t+1]]+Me[e[t+2]]+Me[e[t+3]]+"-"+Me[e[t+4]]+Me[e[t+5]]+"-"+Me[e[t+6]]+Me[e[t+7]]+"-"+Me[e[t+8]]+Me[e[t+9]]+"-"+Me[e[t+10]]+Me[e[t+11]]+Me[e[t+12]]+Me[e[t+13]]+Me[e[t+14]]+Me[e[t+15]]).toLowerCase();if(!Eo(n))throw TypeError("Stringified UUID is invalid");return n}var Wl,ci,di=0,ui=0;function lf(e,t,n){var r=t&&n||0,i=t||new Array(16);e=e||{};var a=e.node||Wl,l=e.clockseq!==void 0?e.clockseq:ci;if(a==null||l==null){var s=e.random||(e.rng||Wc)();a==null&&(a=Wl=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),l==null&&(l=ci=(s[6]<<8|s[7])&16383)}var d=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:ui+1,u=d-di+(c-ui)/1e4;if(u<0&&e.clockseq===void 0&&(l=l+1&16383),(u<0||d>di)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");di=d,ui=c,ci=l,d+=122192928e5;var p=((d&268435455)*1e4+c)%4294967296;i[r++]=p>>>24&255,i[r++]=p>>>16&255,i[r++]=p>>>8&255,i[r++]=p&255;var h=d/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=h&255,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=l>>>8|128,i[r++]=l&255;for(var f=0;f<6;++f)i[r+f]=a[f];return t||No(i)}function Bc(e){if(!Eo(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 sf(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var cf="6ba7b810-9dad-11d1-80b4-00c04fd430c8",df="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Yc(e,t,n){function r(i,a,l,s){if(typeof i=="string"&&(i=sf(i)),typeof a=="string"&&(a=Bc(a)),a.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var d=new Uint8Array(16+i.length);if(d.set(a),d.set(i,a.length),d=n(d),d[6]=d[6]&15|t,d[8]=d[8]&63|128,l){s=s||0;for(var c=0;c<16;++c)l[s+c]=d[c];return l}return No(d)}try{r.name=e}catch{}return r.DNS=cf,r.URL=df,r}function uf(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 pf(hf(ff(e),e.length*8))}function pf(e){for(var t=[],n=e.length*32,r="0123456789abcdef",i=0;i<n;i+=8){var a=e[i>>5]>>>i%32&255,l=parseInt(r.charAt(a>>>4&15)+r.charAt(a&15),16);t.push(l)}return t}function qc(e){return(e+64>>>9<<4)+14+1}function hf(e,t){e[t>>5]|=128<<t%32,e[qc(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,l=0;l<e.length;l+=16){var s=n,d=r,c=i,u=a;n=Ae(n,r,i,a,e[l],7,-680876936),a=Ae(a,n,r,i,e[l+1],12,-389564586),i=Ae(i,a,n,r,e[l+2],17,606105819),r=Ae(r,i,a,n,e[l+3],22,-1044525330),n=Ae(n,r,i,a,e[l+4],7,-176418897),a=Ae(a,n,r,i,e[l+5],12,1200080426),i=Ae(i,a,n,r,e[l+6],17,-1473231341),r=Ae(r,i,a,n,e[l+7],22,-45705983),n=Ae(n,r,i,a,e[l+8],7,1770035416),a=Ae(a,n,r,i,e[l+9],12,-1958414417),i=Ae(i,a,n,r,e[l+10],17,-42063),r=Ae(r,i,a,n,e[l+11],22,-1990404162),n=Ae(n,r,i,a,e[l+12],7,1804603682),a=Ae(a,n,r,i,e[l+13],12,-40341101),i=Ae(i,a,n,r,e[l+14],17,-1502002290),r=Ae(r,i,a,n,e[l+15],22,1236535329),n=Ee(n,r,i,a,e[l+1],5,-165796510),a=Ee(a,n,r,i,e[l+6],9,-1069501632),i=Ee(i,a,n,r,e[l+11],14,643717713),r=Ee(r,i,a,n,e[l],20,-373897302),n=Ee(n,r,i,a,e[l+5],5,-701558691),a=Ee(a,n,r,i,e[l+10],9,38016083),i=Ee(i,a,n,r,e[l+15],14,-660478335),r=Ee(r,i,a,n,e[l+4],20,-405537848),n=Ee(n,r,i,a,e[l+9],5,568446438),a=Ee(a,n,r,i,e[l+14],9,-1019803690),i=Ee(i,a,n,r,e[l+3],14,-187363961),r=Ee(r,i,a,n,e[l+8],20,1163531501),n=Ee(n,r,i,a,e[l+13],5,-1444681467),a=Ee(a,n,r,i,e[l+2],9,-51403784),i=Ee(i,a,n,r,e[l+7],14,1735328473),r=Ee(r,i,a,n,e[l+12],20,-1926607734),n=Ne(n,r,i,a,e[l+5],4,-378558),a=Ne(a,n,r,i,e[l+8],11,-2022574463),i=Ne(i,a,n,r,e[l+11],16,1839030562),r=Ne(r,i,a,n,e[l+14],23,-35309556),n=Ne(n,r,i,a,e[l+1],4,-1530992060),a=Ne(a,n,r,i,e[l+4],11,1272893353),i=Ne(i,a,n,r,e[l+7],16,-155497632),r=Ne(r,i,a,n,e[l+10],23,-1094730640),n=Ne(n,r,i,a,e[l+13],4,681279174),a=Ne(a,n,r,i,e[l],11,-358537222),i=Ne(i,a,n,r,e[l+3],16,-722521979),r=Ne(r,i,a,n,e[l+6],23,76029189),n=Ne(n,r,i,a,e[l+9],4,-640364487),a=Ne(a,n,r,i,e[l+12],11,-421815835),i=Ne(i,a,n,r,e[l+15],16,530742520),r=Ne(r,i,a,n,e[l+2],23,-995338651),n=Le(n,r,i,a,e[l],6,-198630844),a=Le(a,n,r,i,e[l+7],10,1126891415),i=Le(i,a,n,r,e[l+14],15,-1416354905),r=Le(r,i,a,n,e[l+5],21,-57434055),n=Le(n,r,i,a,e[l+12],6,1700485571),a=Le(a,n,r,i,e[l+3],10,-1894986606),i=Le(i,a,n,r,e[l+10],15,-1051523),r=Le(r,i,a,n,e[l+1],21,-2054922799),n=Le(n,r,i,a,e[l+8],6,1873313359),a=Le(a,n,r,i,e[l+15],10,-30611744),i=Le(i,a,n,r,e[l+6],15,-1560198380),r=Le(r,i,a,n,e[l+13],21,1309151649),n=Le(n,r,i,a,e[l+4],6,-145523070),a=Le(a,n,r,i,e[l+11],10,-1120210379),i=Le(i,a,n,r,e[l+2],15,718787259),r=Le(r,i,a,n,e[l+9],21,-343485551),n=Nt(n,s),r=Nt(r,d),i=Nt(i,c),a=Nt(a,u)}return[n,r,i,a]}function ff(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(qc(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function Nt(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function mf(e,t){return e<<t|e>>>32-t}function Lo(e,t,n,r,i,a){return Nt(mf(Nt(Nt(t,e),Nt(r,a)),i),n)}function Ae(e,t,n,r,i,a,l){return Lo(t&n|~t&r,e,t,i,a,l)}function Ee(e,t,n,r,i,a,l){return Lo(t&r|n&~r,e,t,i,a,l)}function Ne(e,t,n,r,i,a,l){return Lo(t^n^r,e,t,i,a,l)}function Le(e,t,n,r,i,a,l){return Lo(n^(t|~r),e,t,i,a,l)}var gf=Yc("v3",48,uf);const bf=gf;function vf(e,t,n){e=e||{};var r=e.random||(e.rng||Wc)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return No(r)}function yf(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 pi(e,t){return e<<t|e>>>32-t}function wf(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 i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,l=Math.ceil(a/16),s=new Array(l),d=0;d<l;++d){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[d*64+u*4]<<24|e[d*64+u*4+1]<<16|e[d*64+u*4+2]<<8|e[d*64+u*4+3];s[d]=c}s[l-1][14]=(e.length-1)*8/Math.pow(2,32),s[l-1][14]=Math.floor(s[l-1][14]),s[l-1][15]=(e.length-1)*8&4294967295;for(var p=0;p<l;++p){for(var h=new Uint32Array(80),f=0;f<16;++f)h[f]=s[p][f];for(var m=16;m<80;++m)h[m]=pi(h[m-3]^h[m-8]^h[m-14]^h[m-16],1);for(var g=n[0],b=n[1],v=n[2],y=n[3],x=n[4],C=0;C<80;++C){var k=Math.floor(C/20),D=pi(g,5)+yf(k,b,v,y)+x+t[k]+h[C]>>>0;x=y,y=v,v=pi(b,30)>>>0,b=g,g=D}n[0]=n[0]+g>>>0,n[1]=n[1]+b>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+x>>>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 xf=Yc("v5",80,wf);const kf=xf,_f="00000000-0000-0000-0000-000000000000";function Sf(e){if(!Eo(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const Cf=Object.freeze(Object.defineProperty({__proto__:null,NIL:_f,parse:Bc,stringify:No,v1:lf,v3:bf,v4:vf,v5:kf,validate:Eo,version:Sf},Symbol.toStringTag,{value:"Module"})),Df=o.QPe(Cf);Object.defineProperty(Ao,"__esModule",{value:!0});Ao.TaskPassport=void 0;const Mf=Df;class Tf{constructor(){this.taskId=(0,Mf.v4)()}}Ao.TaskPassport=Tf;(function(e){var t=o.rh&&o.rh.__createBinding||(Object.create?function(r,i,a,l){l===void 0&&(l=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,l,s)}:function(r,i,a,l){l===void 0&&(l=a),r[l]=i[a]}),n=o.rh&&o.rh.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(Do,e),n(Mo,e),n(ua,e),n(To,e),n(Ao,e),n(fr,e)})(zc);(function(e){var t=o.rh&&o.rh.__createBinding||(Object.create?function(r,i,a,l){l===void 0&&(l=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,l,s)}:function(r,i,a,l){l===void 0&&(l=a),r[l]=i[a]}),n=o.rh&&o.rh.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(zc,e)})(Be);class Ie extends o.cD{constructor(t,n){super(Rc,{key:t,interpolationOptions:n},Ph.t)}get status(){return this.interpolationOptions.status}}var Af=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};const rr="api/datasources",Ef="api/v2/datamodels";class Nf{constructor(t){this.httpClient=t}getDataSourceFields(t,n=9999,r=0){const i=o.pG(t),a=`${rr}/${encodeURI(i)}/fields/search`;return this.httpClient.post(a,{offset:r,count:n}).catch(()=>{throw new Ie("errors.dataSourceNotFound",{dataSource:typeof t=="string"?t:t.title})})}getDataSourceList(){const t=`${rr}/?sharedWith=r,w`;return this.httpClient.get(t)}getDataSourceSchema(t){const n=`${Ef}/schema?title=${encodeURIComponent(t)}`;return this.httpClient.get(n)}sendJaqlRequest(t,n){const r=Uc(t),i=new AbortController;return{responsePromise:this.httpClient.post(r,n,void 0,i.signal).then(a=>Array.isArray(a)?{values:[],metadata:[]}:a),abortHttpRequest:a=>i.abort(a)}}sendDownloadCsvRequest(t,n){const r=Of(t),i=new AbortController,a=new URLSearchParams;return a.append("data",encodeURIComponent(JSON.stringify(n))),{responsePromise:this.httpClient.post(r,a,{headers:{"Content-Type":"application/x-www-form-urlencoded"}},i.signal,{nonJSONBody:!0,returnBlob:!0}),abortHttpRequest:l=>i.abort(l)}}sendCancelJaqlQueryRequest(t,n){return this.sendCancelMultipleJaqlQueriesRequest([t],n)}sendCancelMultipleJaqlQueriesRequest(t,n){return Af(this,void 0,void 0,function*(){const r={queries:t.join(";")},i=Lf(n);try{yield this.httpClient.post(i,r)}catch(a){if(a.status==="404"){const l=If(n);yield this.httpClient.post(l,r)}else throw a}})}}function Lf(e){const t=encodeURIComponent(o.pG(e));return`${rr}/localhost/${t}/cancel_queries`}function If(e){const t=encodeURIComponent(o.pG(e));return`${rr}/live/${t}/cancel_queries`}function Uc(e){const t=encodeURIComponent(o.pG(e));return`${rr}/${t}/jaql`}function Of(e){return`${Uc(e)}/csv`}var Vc={exports:{}};/*! @preserve
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./use-common-filters-CRL16HJ4-f5d9b1aa.cjs");class Cc{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 i=t.subscribe(a=>{r.data=a,r.isReady=!0,this.rootElement&&this.renderComponentWithContext(this.rootElement,this.props)});this.subscriptions.push(i)})}renderComponentWithContext(t,n){if(!this.contexts.every(({isReady:l})=>l)||!t)return;const i=o.g(this.component,n,n==null?void 0:n.children),a=this.contextConnectors.reduceRight((l,{providerComponent:s},d)=>o.g(s,this.contexts[d].data,l),i);o.B(a,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&&o.B(null,this.rootElement)}}const Dc=({nativeElement:e})=>{const t=o.F(null);return o.A(()=>{t.current&&t.current.appendChild(e)},[e]),o.u("div",{ref:t,style:"width: 100%; height: 100%"})};function eh({hook:e,params:t,onResult:n}){const r=o.F(null),i=e(...t);return o._(()=>{r.current!==i&&n(i),r.current=i},[i,n]),null}class th{constructor(t,n=[]){this.hook=t,this.rootElement=document.createElement("div"),this.resultSubscribeFn=null,this.componentAdapter=new Cc(eh,n)}handleHookResult(t){var n;(n=this.resultSubscribeFn)==null||n.call(this,t)}run(...t){this.params=t,this.componentAdapter.render(this.rootElement,{hook:this.hook,params:this.params,onResult:this.handleHookResult.bind(this)})}subscribe(t){this.resultSubscribeFn=t}destroy(){this.componentAdapter.destroy(),this.resultSubscribeFn=null,this.rootElement.remove()}}class nh{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 rh{constructor(t){this.observable=new nh,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()}}const oh=(e,t,n)=>{o.B(o.g(t,n),e)},Mc=(e,t,n=[])=>{const r=Array.isArray(n)?n:[n];return o.g(e,t,...r)},Tc=e=>Mc(Dc,{nativeElement:e}),ih=e=>t=>{const n=e(t);return Tc(n)},ah=e=>t=>{o.B(e,t)};var lh=Object.defineProperty,sh=Object.defineProperties,ch=Object.getOwnPropertyDescriptors,Jr=Object.getOwnPropertySymbols,Ac=Object.prototype.hasOwnProperty,Ec=Object.prototype.propertyIsEnumerable,Hi=(e,t,n)=>t in e?lh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||(t={}))Ac.call(t,n)&&Hi(e,n,t[n]);if(Jr)for(var n of Jr(t))Ec.call(t,n)&&Hi(e,n,t[n]);return e},S=(e,t)=>sh(e,ch(t)),oe=(e,t)=>{var n={};for(var r in e)Ac.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jr)for(var r of Jr(e))t.indexOf(r)<0&&Ec.call(e,r)&&(n[r]=e[r]);return n},B=(e,t,n)=>(Hi(e,typeof t!="symbol"?t+"":t,n),n),xe=(e,t,n)=>new Promise((r,i)=>{var a=d=>{try{s(n.next(d))}catch(c){i(c)}},l=d=>{try{s(n.throw(d))}catch(c){i(c)}},s=d=>d.done?r(d.value):Promise.resolve(d.value).then(a,l);s((n=n.apply(e,t)).next())});function Pn(e){return e.endsWith("/")?e:`${e}/`}const dh={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}}"}},uh={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}}"}},Nc="sdkRestClient",ph={en:dh,uk:uh};function hh(){return o.lD({resource:ph,language:"en",namespace:Nc})}const{i18nextInstance:fh}=hh();class hr{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 _o=(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},Lc=(e,t)=>{if(!e||typeof e!="string")return e;const n=new URL(e);for(const[r,i]of Object.entries(t))n.searchParams.append(r,i);return n.toString().replace(/\/([?&])/,"$1")},mh=(e,t)=>e===null||t===null;class gh extends hr{constructor(t,n){super("bearer"),this.bearer=n,this._resolve(!0)}applyHeader(t){const n="Bearer "+this.bearer;_o(t,{Authorization:n})}authenticate(){return this._result}authenticated(){return this._result}}function bh(e){return e.type==="bearer"}class vh extends hr{constructor(){super("fusion")}authenticate(){var t,n,r,i,a;const l=!!(!((n=(t=window.prism)===null||t===void 0?void 0:t.user)===null||n===void 0)&&n._id);this._resolve(l);const s=(a=(i=(r=window.document)===null||r===void 0?void 0:r.cookie)===null||i===void 0?void 0:i.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/))===null||a===void 0?void 0:a[1];return s&&(this.antiCsrfToken=s),this._result}applyHeader(t){this.antiCsrfToken&&_o(t,{"X-Xsrf-Token":this.antiCsrfToken})}}let Ot=class extends o.cD{constructor(e,t){super(Nc,{key:e,interpolationOptions:t},fh.t)}get status(){return this.interpolationOptions.status}};var ai=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class yh extends hr{constructor(t,n=!1){super("sso"),this.url=Pn(t),this._enableSilentPreAuth=n}authenticate(t=!0){var n;return ai(this,void 0,void 0,function*(){try{this._authenticating=!0;const{isAuthenticated:r,loginUrl:i}=yield this.checkAuthentication();if(r)return this._resolve(!0),yield this._result;const a=Lc(i,{return_to:window.location.href});if(this._enableSilentPreAuth&&t){yield this.authenticateSilent(a);const{isAuthenticated:l}=yield this.checkAuthentication();if(l)return this._resolve(!0),yield this._result}(n=window==null?void 0:window.location)===null||n===void 0||n.replace(a)}finally{this._resolve(!1),this._authenticating=!1}return this._result})}authenticateSilent(t){return ai(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;return ai(this,void 0,void 0,function*(){const r=`${this.url}api/auth/isauth`,i=yield fetch(r,{headers:{Internal:"true"},credentials:"include"}).catch(So);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 Ot("errors.authFailed");const a=yield i.json();if(!a.isAuthenticated){if(!a.ssoEnabled)throw new Ot("errors.ssoNotEnabled");if(!a.loginUrl)throw new Ot("errors.ssoNoLoginUrl")}return{isAuthenticated:a.isAuthenticated,loginUrl:a.loginUrl||""}})}}function Ic(e){return e.type==="sso"}var wh=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class xh extends hr{constructor(t,n){super("wat"),this.url=`${Pn(t)}api/v1/wat/sessionToken`,this.body=`{"webAccessToken": "${n}"}`}authenticate(){return wh(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(So);if(t.ok){const n=yield t.json();this._initialiser=n.initialiser,this._webSessionToken=n.webSessionToken,this._resolve(!0)}}catch{throw new Ot("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;_o(t,{Authorization:n,Initialiser:r})}}}function Oc(e){return e.type==="wat"}var Hc=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};function kh(e){var t,n,r;return Hc(this,void 0,void 0,function*(){if(!e.ok){const i=(t=e.headers)===null||t===void 0?void 0:t.get("Content-Type"),a=i&&i.includes("application/json")?yield e.json().catch(()=>({})):{};throw new Ot("errors.responseError",{status:e.status.toString(),statusText:e.statusText,errorCode:(n=a.error)===null||n===void 0?void 0:n.code,errorMessage:(r=a.error)===null||r===void 0?void 0:r.message,context:e.statusText?"withStatusText":"onlyStatus"})}return e})}function _h(e,t){if(t.invalidate(),Ah(t))throw new Ot("errors.passwordAuthFailed");if(bh(t)||Oc(t))throw new Ot("errors.tokenAuthFailed");return Ic(t)&&!t.isAuthenticating()&&t.authenticate(),e}function Sh(e){return e.message==="Failed to fetch"&&e.name==="TypeError"}function Ch(){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 Ot("errors.networkError"))}const Dh=e=>t=>Hc(void 0,void 0,void 0,function*(){return t.status===401?_h(t,e):t.ok?t:kh(t)}),So=e=>Sh(e)?Ch():Promise.reject(e);var Mh=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class Th extends hr{constructor(t,n,r){super("password"),this._authheader="",this.url=`${Pn(t)}api/v1/authentication/login`;const i=encodeURIComponent(n),a=encodeURIComponent(r);this.body=`username=${i}&password=${a}`}authenticate(){return Mh(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(So);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;_o(t,{Authorization:n})}}function Ah(e){return e.type==="password"}function Eh({url:e,username:t,password:n,token:r,wat:i,ssoEnabled:a=!1,enableSilentPreAuth:l=!1,useFusionAuth:s=!1}){const d=Pn(e);return a?new yh(d,l):t&&n?new Th(d,t,n):r?new gh(d,r):i?new xh(d,i):s?new vh:null}var Nh=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class Lh{constructor(t,n,r){this.url=Pn(t),this.auth=n,this.env=r}login(){return this.auth.authenticate()}call(t,n,r){return Nh(this,void 0,void 0,function*(){this.auth.isAuthenticating()&&(yield this.auth.authenticated()),n.headers=n.headers||{},Ic(this.auth)&&(n.credentials="include"),this.auth.applyHeader(n.headers);const i=r!=null&&r.skipTrackingParam?t:Lc(t,{trc:this.env}),a=yield fetch(i,n).then(Dh(this.auth)).catch(So);if(!(a.status===204||a.status===304))return r!=null&&r.returnBlob?a.blob():a.json().catch(l=>{var s,d;if(!(!((d=(s=l==null?void 0:l.message)===null||s===void 0?void 0:s.includes)===null||d===void 0)&&d.call(s,"Unexpected end of JSON input")))throw l})})}post(t,n,r={},i,a){const l=Object.assign({method:"POST",body:a!=null&&a.nonJSONBody?n:JSON.stringify(n),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json;charset=UTF-8"},signal:i},r);return this.call(this.url+t,l,a)}patch(t,n,r={},i,a){const l=Object.assign({method:"PATCH",body:a!=null&&a.nonJSONBody?n:JSON.stringify(n),headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json;charset=UTF-8"},signal:i},r);return this.call(this.url+t,l,a)}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 Ih={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.'}},Oh={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}}". Переконайтесь що джерело існує і доступне.'}},Rc="sdkQueryClient",Hh={en:Ih,uk:Oh};function Rh(){return o.lD({resource:Hh,language:"en",namespace:Rc})}const{i18nextInstance:Ph}=Rh();class nr extends o.D_{constructor(t,n,r,i,a,l,s,d){super(t,a||o.Ni.Dimension,l,d),this._dimensions=[],this._attributes=[],this._sort=o.Jn.None,this._sort=s||o.Jn.None,this._expression=n,this.setDimensions(i||[]),this.setAttributes(r)}static parseType(t){switch(t){case"datetime":case o.Ni.DateDimension:return o.Ni.DateDimension;case"text":case o.Ni.TextDimension:return o.Ni.TextDimension;case"numeric":case o.Ni.NumericDimension:return o.Ni.NumericDimension}return o.Ni.TextDimension}getAttachedName(t,n){let r=t;const i=o.Bu(t);return(i==="id"||i==="name"||Object.getOwnPropertyDescriptor(this,i)!==void 0||this[i]!==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[o.Bu(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[o.Bu(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 nr(this.name,this.expression,this.attributes,this.dimensions,this.type,this.description,t,this.dataSource)}serializable(){const t=super.serializable();return t.expression=this.expression,this.getSort()!==void 0&&(t.sort=this.getSort()),t.attributes=this._attributes.map(n=>n.serializable()),t.diemsnions=this._dimensions.map(n=>n.serializable()),this.defaultAttribute&&(t.defaultAttribute=this.defaultAttribute.serializable()),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:o.gD(this.type)}};return this._sort!=o.Jn.None&&(n.jaql.sort=this._sort==o.Jn.Ascending?"asc":"desc"),t===!0?n.jaql:n}}class Co extends nr{constructor(t,n,r,i,a){super(t,n,[],[],o.Ni.DateDimension,r,i,a),this.defaultLevel=o.Et.Years,this.Years=new o.Pc(o.Et.Years,n,o.Et.Years,"yyyy",r,i,a),this.Quarters=new o.Pc(o.Et.Quarters,n,o.Et.Quarters,"Q yyyy",r,i,a),this.Months=new o.Pc(o.Et.Months,n,o.Et.Months,"yyyy-MM",r,i,a),this.Weeks=new o.Pc(o.Et.Weeks,n,o.Et.Weeks,"ww yyyy",r,i,a),this.Days=new o.Pc(o.Et.Days,n,o.Et.Days,"yyyy-MM-dd",r,i,a),this.Hours=new o.Pc(o.Et.Hours,n,o.Et.Hours,"yyyy-MM-dd HH:mm",r,i,a),this.MinutesRoundTo30=new o.Pc(o.Et.MinutesRoundTo30,n,o.Et.MinutesRoundTo30,"yyyy-MM-dd HH:mm",r,i,a),this.MinutesRoundTo15=new o.Pc(o.Et.MinutesRoundTo15,n,o.Et.MinutesRoundTo15,"yyyy-MM-dd HH:mm",r,i,a),this.Minutes=new o.Pc(o.Et.Minutes,n,o.Et.Minutes,"yyyy-MM-dd HH:mm",r,i,a),this.Seconds=new o.Pc(o.Et.Seconds,n,o.Et.Seconds,"yyyy-MM-dd HH:mm:ss",r,i,a),this.AggHours=new o.Pc(o.Et.AggHours,n,o.Et.AggHours,"HH:mm",r,i,a),this.AggMinutesRoundTo30=new o.Pc(o.Et.AggMinutesRoundTo30,n,o.Et.AggMinutesRoundTo30,"HH:mm",r,i,a),this.AggMinutesRoundTo15=new o.Pc(o.Et.AggMinutesRoundTo15,n,o.Et.AggMinutesRoundTo15,"HH:mm",r,i,a),this.AggMinutesRoundTo1=new o.Pc(o.Et.AggMinutesRoundTo1,n,o.Et.AggMinutesRoundTo1,"HH:mm",r,i,a),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 Co(this.name,this.expression,this.description,t,this.dataSource)}serializable(){const t=super.serializable();return this.defaultLevel&&(t.defaultLevel=this.defaultLevel),t}jaql(t){const n=this[this.defaultLevel].jaql();return n.jaql.title=this.name,t?n.jaql:n}}function Pc(e){const t=e.name||e.title,n=e.desc||e.description,r=e.expression||e.dim,i=nr.parseType(e.dimtype||e.type),a=e.sort,l=e.dataSource;if(i==o.Ni.DateDimension)return new Co(t,r,n,a,l);const s=Object.getOwnPropertyNames(e).map(u=>e[u]).filter(u=>o.Ni.isAttribute(u.type));if(s.length==0)if(e.attributes){let u;for(let p=0;p<e.attributes.length;p++)u=e.attributes[p],s.push(new o.Mm(u.name,u.expression,u.type,u.description,u.sort,u.dataSource))}else r&&s.push(new o.Mm(t,r,i,n,a,l));const d=Object.getOwnPropertyNames(e).map(u=>e[u]).filter(u=>o.Ni.isDimension(u.type));if(d.length==0&&e.dimensions)for(let u=0;u<e.dimensions.length;u++)d.push(Pc(e.dimensions[u]));const c=new nr(t,r,s,d,i,n,a,l);return e.defaultAttribute&&(c.defaultAttribute=s.find(u=>u.name===e.defaultAttribute)),c}function Fh(e){const t=e.name||e.title,n=e.expression||e.dim,r=e.desc||e.description,i=e.sort,a=e.dataSource;return new Co(t,n,r,i,a)}function jh(e,t){const n=e.map(i=>zh(i,t)),r=Wh(n);return Object.values(r).map(i=>Pc(i))}const zh=(e,t)=>{const n=e.table,r=e.tableTitle||n,i=e.id,a=e.title||i,l=o.fG(t)?t:{title:t,live:!1},s=e.dimtype==="datetime"?Fh({name:a,expression:i,dataSource:l}):o.eAe({name:a,type:e.dimtype==="text"?"text-attribute":"numeric-attribute",expression:i,dataSource:l});return{dimension:{id:n,name:r},attribute:s}},Wh=e=>e.reduce((t,{dimension:n,attribute:r})=>{const i=t[n.name]||{name:n.name,expression:n.id};return Object.assign(Object.assign({},t),{[n.name]:Object.assign(Object.assign({},i),{[r.name]:r})})},{}),Fc=e=>{if(e!==void 0)return`${e}`},jc=e=>{if(e!==void 0)return new Date(e).toISOString()},da=()=>!1;function jl(e,t){const n=t.filter;return"or"in n?r=>n.or.map(i=>e(Object.assign(Object.assign({},t),{filter:i}))).reduce((i,a)=>i||a(r),!1):"and"in n?r=>n.and.map(i=>e(Object.assign(Object.assign({},t),{filter:i}))).reduce((i,a)=>i&&a(r),!0):e(t)}function Bh(e){const{datatype:t}=e,n=e.filter,r=t==="datetime"?jc:Fc;return i=>{const a=n.members.map(r),l=r(i);return a.includes(l)}}function Yh(e){const{datatype:t}=e,n=e.filter,r=t==="datetime"?jc:Fc;return i=>{var a,l;const s=((l=(a=n.exclude)===null||a===void 0?void 0:a.members)===null||l===void 0?void 0:l.map(r))||[],d=r(i);return!s.includes(d)}}function qh(e){const t=e.filter,n=o.q_(t);return n===o.Ht.STARTS_WITH?r=>new RegExp(`^${t.startsWith}`,"i").test(r):n===o.Ht.ENDS_WITH?r=>new RegExp(`${t.endsWith}$`,"i").test(r):n===o.Ht.CONTAINS?r=>new RegExp(t.contains,"i").test(r):n===o.Ht.EQUALS?r=>r.localeCompare(t.equals,void 0,{sensitivity:"base"})===0:n===o.Ht.DOESNT_START_WITH?r=>!new RegExp(`^${t.doesntStartWith}`,"i").test(r):n===o.Ht.DOESNT_END_WITH?r=>!new RegExp(`${t.doesntEndWith}$`,"i").test(r):n===o.Ht.DOESNT_CONTAIN?r=>!new RegExp(t.doesntContain,"i").test(r):n===o.Ht.DOESNT_EQUAL?r=>r.localeCompare(t.doesntEqual,void 0,{sensitivity:"base"})!==0:da}function Uh(e){const t=e.filter,n=o.q_(t);return n===o.Ht.EQUALS?r=>Number(t.equals)===Number(r):n===o.Ht.DOESNT_EQUAL?r=>Number(t.doesntEqual)!==Number(r):n===o.Ht.LESS_THAN?r=>Number(r)<Number(t.toNotEqual):n===o.Ht.GREATER_THAN?r=>Number(r)>Number(t.fromNotEqual):n===o.Ht.BETWEEN?r=>Number(t.to)>=Number(r)&&Number(r)>=Number(t.from):n===o.Ht.GREATER_THAN_OR_EQUAL?r=>Number(r)>=Number(t.from):n===o.Ht.LESS_THAN_OR_EQUAL?r=>Number(t.to)>=Number(r):da}function Vh(e){const t=e,{datatype:n}=t,r=t.filter;return o.XV(r)?Bh(t):o.QV(r)&&o.q_(r)===o.Ht.IS_NOT?Yh(t):n==="text"?jl(qh,t):n==="numeric"?jl(Uh,t):da}function Qh(e){return t=>{if(o.Ti(t)){const{filters:n,relations:r}=o.Ei(t),i=[...n,e],a=o.mi(n,r,i);return o.gi(i,a)}return[...t||[],e]}}function Gh(e){return t=>{if(o.Ti(t)){const{filters:n,relations:r}=o.Ei(t),i=[...n,...e],a=o.mi(n,r,i);return o.gi(i,a)}return[...t||[],...e]}}function $h(e){return t=>{if(o.Ti(t)){const{filters:n,relations:r}=o.Ei(t),i=n.filter(l=>l.config.guid!==e.config.guid),a=o.mi(n,r,i);return o.gi(i,a)}return(t||[]).filter(n=>n.config.guid!==e.config.guid)}}function Zh(e){return t=>{if(o.Ti(t)){const{filters:n,relations:r}=o.Ei(t),i=n.filter(l=>!e.some(s=>l.config.guid===s.config.guid)),a=o.mi(n,r,i);return o.gi(i,a)}return(t||[]).filter(n=>!e.some(r=>n.config.guid===r.config.guid))}}function Xh(e,t){return n=>{if(o.Ti(n)){const{filters:r,relations:i}=o.Ei(n),a=r.map(s=>s.config.guid===e.config.guid?t:s),l=o.eL(i,e,t);return o.gi(a,l)}return(n||[]).map(r=>r.config.guid===e.config.guid?t:r)}}var Be={},zc={},Do={},ua={};(function(e){var t=o.rh&&o.rh.__awaiter||function(i,a,l,s){function d(c){return c instanceof l?c:new l(function(u){u(c)})}return new(l||(l=Promise))(function(c,u){function p(m){try{f(s.next(m))}catch(g){u(g)}}function h(m){try{f(s.throw(m))}catch(g){u(g)}}function f(m){m.done?c(m.value):d(m.value).then(p,h)}f((s=s.apply(i,a||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.Task=e.ExecutionResultStatus=void 0;var n;(function(i){i.SUCCESS="SUCCESS",i.ERROR="ERROR"})(n=e.ExecutionResultStatus||(e.ExecutionResultStatus={}));class r{constructor(a,l,s){this.steps=a,this.passport=l,this.addons=s,this.statistics={startTime:new Date,steps:[],runtimeInfo:{}},this.currentStep=void 0}run(a){return t(this,void 0,void 0,function*(){let l=a,s;for(let c=0;c<this.steps.length;c+=1){this.currentStep=this.steps[c];const{resultValue:u,info:p}=yield this.currentStep.run(this,l);if(this.statistics.steps.push(p),p.success)l=u;else{s=p.error;break}}const d=this.statistics.steps.length===this.steps.length&&this.statistics.steps.every(c=>c.success);return this.statistics.endTime=new Date,{status:d?n.SUCCESS:n.ERROR,error:s,result:d?l:void 0,statistics:this.statistics}})}cancel(a){var l;return t(this,void 0,void 0,function*(){yield(l=this.currentStep)===null||l===void 0?void 0:l.cancel(this,a)})}addRuntimeInfo(a,l){this.statistics.runtimeInfo[a]=l}emitAddonEvent(a,...l){var s;const d=a.split("."),c=d[0],u=d[1],p=(s=this.addons)===null||s===void 0?void 0:s.find(f=>f.addonName===c),h=(p==null?void 0:p.events)[u];h(...l)}}e.Task=r})(ua);var li=o.rh&&o.rh.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(Do,"__esModule",{value:!0});Do.AbstractTaskManager=void 0;const Kh=ua;class Jh{constructor(t){this.runningTasks=new Map,this.addons=t||[]}runTask(t){return li(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=>li(this,void 0,void 0,function*(){const r=new Kh.Task(t,n,this.addons);return this.runTask(r)})}cancel(t,n){return li(this,void 0,void 0,function*(){const r=this.runningTasks.get(t);r&&(yield r.cancel(n))})}}Do.AbstractTaskManager=Jh;var Mo={},fr={};Object.defineProperty(fr,"__esModule",{value:!0});fr.TaskCanceledError=void 0;class ef extends Error{constructor(t){const n=`Task was canceled due to: "${t}"`;super(n)}}fr.TaskCanceledError=ef;var zl=o.rh&&o.rh.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.Step=void 0;const tf=fr;class nf{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 zl(this,void 0,void 0,function*(){return this.addStepInfo(t,{name:this.name}),new Promise(r=>{const i=new Date,a=(l,s)=>{const d=new Date,c=d.getTime()-i.getTime();this.addStepInfo(t,{startTime:i,endTime:d,duration:c}),this.addStepInfo(t,s?{success:!1,error:s}:{success:!0}),r({resultValue:l,info:this.getStepInfo(t)})};this.taskSelfResolvers.set(t,a),this.runLogic(t,n).then(l=>a(l)).finally(()=>{this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t)}).catch(l=>a(void 0,l))})})}cancel(t,n){return zl(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 tf.TaskCanceledError(n)),this.taskSelfResolvers.delete(t),this.taskStepInfos.delete(t),yield this.cancelLogic(t,n)})}addStepInfo(t,n){const r=this.taskStepInfos.get(t)||{},i=Object.assign(Object.assign({},r),n);this.taskStepInfos.set(t,i)}getStepInfo(t){return this.taskStepInfos.get(t)}}Mo.Step=nf;var To={};Object.defineProperty(To,"__esModule",{value:!0});To.Addon=void 0;class rf{constructor(){this.events={}}}To.Addon=rf;var Ao={},Er,of=new Uint8Array(16);function Wc(){if(!Er&&(Er=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Er))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Er(of)}const af=/^(?:[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 Eo(e){return typeof e=="string"&&af.test(e)}var Me=[];for(var si=0;si<256;++si)Me.push((si+256).toString(16).substr(1));function No(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Me[e[t+0]]+Me[e[t+1]]+Me[e[t+2]]+Me[e[t+3]]+"-"+Me[e[t+4]]+Me[e[t+5]]+"-"+Me[e[t+6]]+Me[e[t+7]]+"-"+Me[e[t+8]]+Me[e[t+9]]+"-"+Me[e[t+10]]+Me[e[t+11]]+Me[e[t+12]]+Me[e[t+13]]+Me[e[t+14]]+Me[e[t+15]]).toLowerCase();if(!Eo(n))throw TypeError("Stringified UUID is invalid");return n}var Wl,ci,di=0,ui=0;function lf(e,t,n){var r=t&&n||0,i=t||new Array(16);e=e||{};var a=e.node||Wl,l=e.clockseq!==void 0?e.clockseq:ci;if(a==null||l==null){var s=e.random||(e.rng||Wc)();a==null&&(a=Wl=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),l==null&&(l=ci=(s[6]<<8|s[7])&16383)}var d=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:ui+1,u=d-di+(c-ui)/1e4;if(u<0&&e.clockseq===void 0&&(l=l+1&16383),(u<0||d>di)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");di=d,ui=c,ci=l,d+=122192928e5;var p=((d&268435455)*1e4+c)%4294967296;i[r++]=p>>>24&255,i[r++]=p>>>16&255,i[r++]=p>>>8&255,i[r++]=p&255;var h=d/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=h&255,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=l>>>8|128,i[r++]=l&255;for(var f=0;f<6;++f)i[r+f]=a[f];return t||No(i)}function Bc(e){if(!Eo(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 sf(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var cf="6ba7b810-9dad-11d1-80b4-00c04fd430c8",df="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Yc(e,t,n){function r(i,a,l,s){if(typeof i=="string"&&(i=sf(i)),typeof a=="string"&&(a=Bc(a)),a.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var d=new Uint8Array(16+i.length);if(d.set(a),d.set(i,a.length),d=n(d),d[6]=d[6]&15|t,d[8]=d[8]&63|128,l){s=s||0;for(var c=0;c<16;++c)l[s+c]=d[c];return l}return No(d)}try{r.name=e}catch{}return r.DNS=cf,r.URL=df,r}function uf(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 pf(hf(ff(e),e.length*8))}function pf(e){for(var t=[],n=e.length*32,r="0123456789abcdef",i=0;i<n;i+=8){var a=e[i>>5]>>>i%32&255,l=parseInt(r.charAt(a>>>4&15)+r.charAt(a&15),16);t.push(l)}return t}function qc(e){return(e+64>>>9<<4)+14+1}function hf(e,t){e[t>>5]|=128<<t%32,e[qc(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,l=0;l<e.length;l+=16){var s=n,d=r,c=i,u=a;n=Ae(n,r,i,a,e[l],7,-680876936),a=Ae(a,n,r,i,e[l+1],12,-389564586),i=Ae(i,a,n,r,e[l+2],17,606105819),r=Ae(r,i,a,n,e[l+3],22,-1044525330),n=Ae(n,r,i,a,e[l+4],7,-176418897),a=Ae(a,n,r,i,e[l+5],12,1200080426),i=Ae(i,a,n,r,e[l+6],17,-1473231341),r=Ae(r,i,a,n,e[l+7],22,-45705983),n=Ae(n,r,i,a,e[l+8],7,1770035416),a=Ae(a,n,r,i,e[l+9],12,-1958414417),i=Ae(i,a,n,r,e[l+10],17,-42063),r=Ae(r,i,a,n,e[l+11],22,-1990404162),n=Ae(n,r,i,a,e[l+12],7,1804603682),a=Ae(a,n,r,i,e[l+13],12,-40341101),i=Ae(i,a,n,r,e[l+14],17,-1502002290),r=Ae(r,i,a,n,e[l+15],22,1236535329),n=Ee(n,r,i,a,e[l+1],5,-165796510),a=Ee(a,n,r,i,e[l+6],9,-1069501632),i=Ee(i,a,n,r,e[l+11],14,643717713),r=Ee(r,i,a,n,e[l],20,-373897302),n=Ee(n,r,i,a,e[l+5],5,-701558691),a=Ee(a,n,r,i,e[l+10],9,38016083),i=Ee(i,a,n,r,e[l+15],14,-660478335),r=Ee(r,i,a,n,e[l+4],20,-405537848),n=Ee(n,r,i,a,e[l+9],5,568446438),a=Ee(a,n,r,i,e[l+14],9,-1019803690),i=Ee(i,a,n,r,e[l+3],14,-187363961),r=Ee(r,i,a,n,e[l+8],20,1163531501),n=Ee(n,r,i,a,e[l+13],5,-1444681467),a=Ee(a,n,r,i,e[l+2],9,-51403784),i=Ee(i,a,n,r,e[l+7],14,1735328473),r=Ee(r,i,a,n,e[l+12],20,-1926607734),n=Ne(n,r,i,a,e[l+5],4,-378558),a=Ne(a,n,r,i,e[l+8],11,-2022574463),i=Ne(i,a,n,r,e[l+11],16,1839030562),r=Ne(r,i,a,n,e[l+14],23,-35309556),n=Ne(n,r,i,a,e[l+1],4,-1530992060),a=Ne(a,n,r,i,e[l+4],11,1272893353),i=Ne(i,a,n,r,e[l+7],16,-155497632),r=Ne(r,i,a,n,e[l+10],23,-1094730640),n=Ne(n,r,i,a,e[l+13],4,681279174),a=Ne(a,n,r,i,e[l],11,-358537222),i=Ne(i,a,n,r,e[l+3],16,-722521979),r=Ne(r,i,a,n,e[l+6],23,76029189),n=Ne(n,r,i,a,e[l+9],4,-640364487),a=Ne(a,n,r,i,e[l+12],11,-421815835),i=Ne(i,a,n,r,e[l+15],16,530742520),r=Ne(r,i,a,n,e[l+2],23,-995338651),n=Le(n,r,i,a,e[l],6,-198630844),a=Le(a,n,r,i,e[l+7],10,1126891415),i=Le(i,a,n,r,e[l+14],15,-1416354905),r=Le(r,i,a,n,e[l+5],21,-57434055),n=Le(n,r,i,a,e[l+12],6,1700485571),a=Le(a,n,r,i,e[l+3],10,-1894986606),i=Le(i,a,n,r,e[l+10],15,-1051523),r=Le(r,i,a,n,e[l+1],21,-2054922799),n=Le(n,r,i,a,e[l+8],6,1873313359),a=Le(a,n,r,i,e[l+15],10,-30611744),i=Le(i,a,n,r,e[l+6],15,-1560198380),r=Le(r,i,a,n,e[l+13],21,1309151649),n=Le(n,r,i,a,e[l+4],6,-145523070),a=Le(a,n,r,i,e[l+11],10,-1120210379),i=Le(i,a,n,r,e[l+2],15,718787259),r=Le(r,i,a,n,e[l+9],21,-343485551),n=Nt(n,s),r=Nt(r,d),i=Nt(i,c),a=Nt(a,u)}return[n,r,i,a]}function ff(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(qc(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function Nt(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function mf(e,t){return e<<t|e>>>32-t}function Lo(e,t,n,r,i,a){return Nt(mf(Nt(Nt(t,e),Nt(r,a)),i),n)}function Ae(e,t,n,r,i,a,l){return Lo(t&n|~t&r,e,t,i,a,l)}function Ee(e,t,n,r,i,a,l){return Lo(t&r|n&~r,e,t,i,a,l)}function Ne(e,t,n,r,i,a,l){return Lo(t^n^r,e,t,i,a,l)}function Le(e,t,n,r,i,a,l){return Lo(n^(t|~r),e,t,i,a,l)}var gf=Yc("v3",48,uf);const bf=gf;function vf(e,t,n){e=e||{};var r=e.random||(e.rng||Wc)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return No(r)}function yf(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 pi(e,t){return e<<t|e>>>32-t}function wf(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 i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,l=Math.ceil(a/16),s=new Array(l),d=0;d<l;++d){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[d*64+u*4]<<24|e[d*64+u*4+1]<<16|e[d*64+u*4+2]<<8|e[d*64+u*4+3];s[d]=c}s[l-1][14]=(e.length-1)*8/Math.pow(2,32),s[l-1][14]=Math.floor(s[l-1][14]),s[l-1][15]=(e.length-1)*8&4294967295;for(var p=0;p<l;++p){for(var h=new Uint32Array(80),f=0;f<16;++f)h[f]=s[p][f];for(var m=16;m<80;++m)h[m]=pi(h[m-3]^h[m-8]^h[m-14]^h[m-16],1);for(var g=n[0],b=n[1],v=n[2],y=n[3],x=n[4],C=0;C<80;++C){var k=Math.floor(C/20),D=pi(g,5)+yf(k,b,v,y)+x+t[k]+h[C]>>>0;x=y,y=v,v=pi(b,30)>>>0,b=g,g=D}n[0]=n[0]+g>>>0,n[1]=n[1]+b>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+x>>>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 xf=Yc("v5",80,wf);const kf=xf,_f="00000000-0000-0000-0000-000000000000";function Sf(e){if(!Eo(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const Cf=Object.freeze(Object.defineProperty({__proto__:null,NIL:_f,parse:Bc,stringify:No,v1:lf,v3:bf,v4:vf,v5:kf,validate:Eo,version:Sf},Symbol.toStringTag,{value:"Module"})),Df=o.QPe(Cf);Object.defineProperty(Ao,"__esModule",{value:!0});Ao.TaskPassport=void 0;const Mf=Df;class Tf{constructor(){this.taskId=(0,Mf.v4)()}}Ao.TaskPassport=Tf;(function(e){var t=o.rh&&o.rh.__createBinding||(Object.create?function(r,i,a,l){l===void 0&&(l=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,l,s)}:function(r,i,a,l){l===void 0&&(l=a),r[l]=i[a]}),n=o.rh&&o.rh.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(Do,e),n(Mo,e),n(ua,e),n(To,e),n(Ao,e),n(fr,e)})(zc);(function(e){var t=o.rh&&o.rh.__createBinding||(Object.create?function(r,i,a,l){l===void 0&&(l=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(r,l,s)}:function(r,i,a,l){l===void 0&&(l=a),r[l]=i[a]}),n=o.rh&&o.rh.__exportStar||function(r,i){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(zc,e)})(Be);class Ie extends o.cD{constructor(t,n){super(Rc,{key:t,interpolationOptions:n},Ph.t)}get status(){return this.interpolationOptions.status}}var Af=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};const rr="api/datasources",Ef="api/v2/datamodels";class Nf{constructor(t){this.httpClient=t}getDataSourceFields(t,n=9999,r=0){const i=o.pG(t),a=`${rr}/${encodeURI(i)}/fields/search`;return this.httpClient.post(a,{offset:r,count:n}).catch(()=>{throw new Ie("errors.dataSourceNotFound",{dataSource:typeof t=="string"?t:t.title})})}getDataSourceList(){const t=`${rr}/?sharedWith=r,w`;return this.httpClient.get(t)}getDataSourceSchema(t){const n=`${Ef}/schema?title=${encodeURIComponent(t)}`;return this.httpClient.get(n)}sendJaqlRequest(t,n){const r=Uc(t),i=new AbortController;return{responsePromise:this.httpClient.post(r,n,void 0,i.signal).then(a=>Array.isArray(a)?{values:[],metadata:[]}:a),abortHttpRequest:a=>i.abort(a)}}sendDownloadCsvRequest(t,n){const r=Of(t),i=new AbortController,a=new URLSearchParams;return a.append("data",encodeURIComponent(JSON.stringify(n))),{responsePromise:this.httpClient.post(r,a,{headers:{"Content-Type":"application/x-www-form-urlencoded"}},i.signal,{nonJSONBody:!0,returnBlob:!0}),abortHttpRequest:l=>i.abort(l)}}sendCancelJaqlQueryRequest(t,n){return this.sendCancelMultipleJaqlQueriesRequest([t],n)}sendCancelMultipleJaqlQueriesRequest(t,n){return Af(this,void 0,void 0,function*(){const r={queries:t.join(";")},i=Lf(n);try{yield this.httpClient.post(i,r)}catch(a){if(a.status==="404"){const l=If(n);yield this.httpClient.post(l,r)}else throw a}})}}function Lf(e){const t=encodeURIComponent(o.pG(e));return`${rr}/localhost/${t}/cancel_queries`}function If(e){const t=encodeURIComponent(o.pG(e));return`${rr}/live/${t}/cancel_queries`}function Uc(e){const t=encodeURIComponent(o.pG(e));return`${rr}/${t}/jaql`}function Of(e){return`${Uc(e)}/csv`}var Vc={exports:{}};/*! @preserve
|
|
2
2
|
* numeral.js
|
|
3
3
|
* version : 2.0.6
|
|
4
4
|
* author : Adam Draper
|
|
5
5
|
* license : MIT
|
|
6
6
|
* http://adamwdraper.github.com/Numeral-js/
|
|
7
|
-
*/(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(o.rh,function(){var t,n,r="2.0.6",i={},a={},l={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:l.currentLocale,zeroFormat:l.zeroFormat,nullFormat:l.nullFormat,defaultFormat:l.defaultFormat,scalePercentBy100:l.scalePercentBy100};function d(c,u){this._input=c,this._value=u}return t=function(c){var u,p,h,f;if(t.isNumeral(c))u=c.value();else if(c===0||typeof c>"u")u=0;else if(c===null||n.isNaN(c))u=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)u=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)u=null;else{for(p in i)if(f=typeof i[p].regexps.unformat=="function"?i[p].regexps.unformat():i[p].regexps.unformat,f&&c.match(f)){h=i[p].unformat;break}h=h||t._.stringToNumber,u=h(c)}else u=Number(c)||null;return new d(c,u)},t.version=r,t.isNumeral=function(c){return c instanceof d},t._=n={numberToFormat:function(c,u,p){var h=a[t.options.currentLocale],f=!1,m=!1,g=0,b="",v=1e12,y=1e9,x=1e6,C=1e3,k="",D=!1,M,E,H,R,O,F,P;if(c=c||0,E=Math.abs(c),t._.includes(u,"(")?(f=!0,u=u.replace(/[\(|\)]/g,"")):(t._.includes(u,"+")||t._.includes(u,"-"))&&(O=t._.includes(u,"+")?u.indexOf("+"):c<0?u.indexOf("-"):-1,u=u.replace(/[\+|\-]/g,"")),t._.includes(u,"a")&&(M=u.match(/a(k|m|b|t)?/),M=M?M[1]:!1,t._.includes(u," a")&&(b=" "),u=u.replace(new RegExp(b+"a[kmbt]?"),""),E>=v&&!M||M==="t"?(b+=h.abbreviations.trillion,c=c/v):E<v&&E>=y&&!M||M==="b"?(b+=h.abbreviations.billion,c=c/y):E<y&&E>=x&&!M||M==="m"?(b+=h.abbreviations.million,c=c/x):(E<x&&E>=C&&!M||M==="k")&&(b+=h.abbreviations.thousand,c=c/C)),t._.includes(u,"[.]")&&(m=!0,u=u.replace("[.]",".")),H=c.toString().split(".")[0],R=u.split(".")[1],F=u.indexOf(","),g=(u.split(".")[0].split(",")[0].match(/0/g)||[]).length,R?(t._.includes(R,"[")?(R=R.replace("]",""),R=R.split("["),k=t._.toFixed(c,R[0].length+R[1].length,p,R[1].length)):k=t._.toFixed(c,R.length,p),H=k.split(".")[0],t._.includes(k,".")?k=h.delimiters.decimal+k.split(".")[1]:k="",m&&Number(k.slice(1))===0&&(k="")):H=t._.toFixed(c,0,p),b&&!M&&Number(H)>=1e3&&b!==h.abbreviations.trillion)switch(H=String(Number(H)/1e3),b){case h.abbreviations.thousand:b=h.abbreviations.million;break;case h.abbreviations.million:b=h.abbreviations.billion;break;case h.abbreviations.billion:b=h.abbreviations.trillion;break}if(t._.includes(H,"-")&&(H=H.slice(1),D=!0),H.length<g)for(var L=g-H.length;L>0;L--)H="0"+H;return F>-1&&(H=H.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+h.delimiters.thousands)),u.indexOf(".")===0&&(H=""),P=H+k+(b||""),f?P=(f&&D?"(":"")+P+(f&&D?")":""):O>=0?P=O===0?(D?"-":"+")+P:P+(D?"-":"+"):D&&(P="-"+P),P},stringToNumber:function(c){var u=a[s.currentLocale],p=c,h={thousand:3,million:6,billion:9,trillion:12},f,m,g;if(s.zeroFormat&&c===s.zeroFormat)m=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)m=null;else{m=1,u.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(u.delimiters.decimal,"."));for(f in h)if(g=new RegExp("[^a-zA-Z]"+u.abbreviations[f]+"(?:\\)|(\\"+u.currency.symbol+")?(?:\\))?)?$"),p.match(g)){m*=Math.pow(10,h[f]);break}m*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),m*=Number(c)}return m},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,u){return c.indexOf(u)!==-1},insert:function(c,u,p){return c.slice(0,p)+u+c.slice(p)},reduce:function(c,u){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof u!="function")throw new TypeError(u+" is not a function");var p=Object(c),h=p.length>>>0,f=0,m;if(arguments.length===3)m=arguments[2];else{for(;f<h&&!(f in p);)f++;if(f>=h)throw new TypeError("Reduce of empty array with no initial value");m=p[f++]}for(;f<h;f++)f in p&&(m=u(m,p[f],f,p));return m},multiplier:function(c){var u=c.toString().split(".");return u.length<2?1:Math.pow(10,u[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(u,p){var h=n.multiplier(p);return u>h?u:h},1)},toFixed:function(c,u,p,h){var f=c.toString().split("."),m=u-(h||0),g,b,v,y;return f.length===2?g=Math.min(Math.max(f[1].length,m),u):g=m,v=Math.pow(10,g),y=(p(c+"e+"+g)/v).toFixed(g),h>u-g&&(b=new RegExp("\\.?0{1,"+(h-(u-g))+"}$"),y=y.replace(b,"")),y}},t.options=s,t.formats=i,t.locales=a,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return a[s.currentLocale];if(c=c.toLowerCase(),!a[c])throw new Error("Unknown locale : "+c);return a[c]},t.reset=function(){for(var c in l)s[c]=l[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,u,p){if(u=u.toLowerCase(),this[c+"s"][u])throw new TypeError(u+" "+c+" already registered.");return this[c+"s"][u]=p,p},t.validate=function(c,u){var p,h,f,m,g,b,v,y;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{v=t.localeData(u)}catch{v=t.localeData(t.locale())}return f=v.currency.symbol,g=v.abbreviations,p=v.delimiters.decimal,v.delimiters.thousands==="."?h="\\.":h=v.delimiters.thousands,y=c.match(/^[^\d]+/),y!==null&&(c=c.substr(1),y[0]!==f)||(y=c.match(/[^\d]+$/),y!==null&&(c=c.slice(0,-1),y[0]!==g.thousand&&y[0]!==g.million&&y[0]!==g.billion&&y[0]!==g.trillion))?!1:(b=new RegExp(h+"{2}"),c.match(/[^\d.,]/g)?!1:(m=c.split(p),m.length>2?!1:m.length<2?!!m[0].match(/^\d+.*\d$/)&&!m[0].match(b):m[0].length===1?!!m[0].match(/^\d+$/)&&!m[0].match(b)&&!!m[1].match(/^\d+$/):!!m[0].match(/^\d+.*\d$/)&&!m[0].match(b)&&!!m[1].match(/^\d+$/)))},t.fn=d.prototype={clone:function(){return t(this)},format:function(c,u){var p=this._value,h=c||s.defaultFormat,f,m,g;if(u=u||Math.round,p===0&&s.zeroFormat!==null)m=s.zeroFormat;else if(p===null&&s.nullFormat!==null)m=s.nullFormat;else{for(f in i)if(h.match(i[f].regexps.format)){g=i[f].format;break}g=g||t._.numberToFormat,m=g(p,h,u)}return m},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var u=n.correctionFactor.call(null,this._value,c);function p(h,f,m,g){return h+Math.round(u*f)}return this._value=n.reduce([this._value,c],p,0)/u,this},subtract:function(c){var u=n.correctionFactor.call(null,this._value,c);function p(h,f,m,g){return h-Math.round(u*f)}return this._value=n.reduce([c],p,Math.round(this._value*u))/u,this},multiply:function(c){function u(p,h,f,m){var g=n.correctionFactor(p,h);return Math.round(p*g)*Math.round(h*g)/Math.round(g*g)}return this._value=n.reduce([this._value,c],u,1),this},divide:function(c){function u(p,h,f,m){var g=n.correctionFactor(p,h);return Math.round(p*g)/Math.round(h*g)}return this._value=n.reduce([this._value,c],u),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 u=c%10;return~~(c%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,u,p){var h=t._.includes(u," BPS")?" ":"",f;return c=c*1e4,u=u.replace(/\s?BPS/,""),f=t._.numberToFormat(c,u,p),t._.includes(f,")")?(f=f.split(""),f.splice(-1,0,h+"BPS"),f=f.join("")):f=f+h+"BPS",f},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"]},u={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},p=c.suffixes.concat(u.suffixes.filter(function(f){return c.suffixes.indexOf(f)<0})),h=p.join("|");h="("+h.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(h)},format:function(f,m,g){var b,v=t._.includes(m,"ib")?u:c,y=t._.includes(m," b")||t._.includes(m," ib")?" ":"",x,C,k;for(m=m.replace(/\s?i?b/,""),x=0;x<=v.suffixes.length;x++)if(C=Math.pow(v.base,x),k=Math.pow(v.base,x+1),f===null||f===0||f>=C&&f<k){y+=v.suffixes[x],C>0&&(f=f/C);break}return b=t._.numberToFormat(f,m,g),b+y},unformat:function(f){var m=t._.stringToNumber(f),g,b;if(m){for(g=c.suffixes.length-1;g>=0;g--){if(t._.includes(f,c.suffixes[g])){b=Math.pow(c.base,g);break}if(t._.includes(f,u.suffixes[g])){b=Math.pow(u.base,g);break}}m*=b||1}return m}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,u,p){var h=t.locales[t.options.currentLocale],f={before:u.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:u.match(/([\+|\-|\)|\s|\$]*)$/)[0]},m,g,b;for(u=u.replace(/\s?\$\s?/,""),m=t._.numberToFormat(c,u,p),c>=0?(f.before=f.before.replace(/[\-\(]/,""),f.after=f.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(f.before,"-")&&!t._.includes(f.before,"(")&&(f.before="-"+f.before),b=0;b<f.before.length;b++)switch(g=f.before[b],g){case"$":m=t._.insert(m,h.currency.symbol,b);break;case" ":m=t._.insert(m," ",b+h.currency.symbol.length-1);break}for(b=f.after.length-1;b>=0;b--)switch(g=f.after[b],g){case"$":m=b===f.after.length-1?m+h.currency.symbol:t._.insert(m,h.currency.symbol,-(f.after.length-(1+b)));break;case" ":m=b===f.after.length-1?m+" ":t._.insert(m," ",-(f.after.length-(1+b)+h.currency.symbol.length-1));break}return m}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,u,p){var h,f=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",m=f.split("e");return u=u.replace(/e[\+|\-]{1}0/,""),h=t._.numberToFormat(Number(m[0]),u,p),h+"e"+m[1]},unformat:function(c){var u=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),p=Number(u[0]),h=Number(u[1]);h=t._.includes(c,"e-")?h*=-1:h;function f(m,g,b,v){var y=t._.correctionFactor(m,g),x=m*y*(g*y)/(y*y);return x}return t._.reduce([p,Math.pow(10,h)],f,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,u,p){var h=t.locales[t.options.currentLocale],f,m=t._.includes(u," o")?" ":"";return u=u.replace(/\s?o/,""),m+=h.ordinal(c),f=t._.numberToFormat(c,u,p),f+m}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,u,p){var h=t._.includes(u," %")?" ":"",f;return t.options.scalePercentBy100&&(c=c*100),u=u.replace(/\s?\%/,""),f=t._.numberToFormat(c,u,p),t._.includes(f,")")?(f=f.split(""),f.splice(-1,0,h+"%"),f=f.join("")):f=f+h+"%",f},unformat:function(c){var u=t._.stringToNumber(c);return t.options.scalePercentBy100?u*.01:u}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,u,p){var h=Math.floor(c/60/60),f=Math.floor((c-h*60*60)/60),m=Math.round(c-h*60*60-f*60);return h+":"+(f<10?"0"+f:f)+":"+(m<10?"0"+m:m)},unformat:function(c){var u=c.split(":"),p=0;return u.length===3?(p=p+Number(u[0])*60*60,p=p+Number(u[1])*60,p=p+Number(u[2])):u.length===2&&(p=p+Number(u[0])*60,p=p+Number(u[1])),Number(p)}})}(),t})})(Vc);var Hf=Vc.exports;const Rf=o.Bl(Hf),Pf=(e,t)=>{const n=zf(e);return Ff(n,t)};function Ff(e,t){return{columns:t==null?void 0:t.map(n=>({name:n.name,type:o.mW(n.type)})),rows:jf(e)}}function jf(e){var t;let n=!1;const r=(t=e[0])===null||t===void 0?void 0:t.map((i,a)=>{const l=e.some(s=>"selected"in s[a]);return l&&(n=!0),l});return e.map(i=>{const a=n?r.some((l,s)=>l&&!i[s].selected):void 0;return i.map(l=>a!==void 0?{data:l.data,text:l.text,blur:a}:{data:l.data,text:l.text})})}function zf({values:e=[],metadata:t=[]}){var n,r,i,a;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let l=0;l<e.length;l++){const s=e[l];for(let d=0;d<s.length;d++)t[d].format&&!((r=(n=t[d])===null||n===void 0?void 0:n.format)===null||r===void 0)&&r.number&&(s[d].text=Rf(s[d].data).format((a=(i=t[d])===null||i===void 0?void 0:i.format)===null||a===void 0?void 0:a.number))}return e}var Gt=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class Wf extends Be.AbstractTaskManager{constructor(t,n){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new Be.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Gt(this,void 0,void 0,function*(){})),new Be.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new Be.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Gt(this,void 0,void 0,function*(){})),new Be.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new Be.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>Gt(this,void 0,void 0,function*(){})),new Be.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotClient=n}prepareJaqlPayload(t){return Gt(this,void 0,void 0,function*(){const{queryDescription:n,executionConfig:r}=t.passport,i=o.NG(n,r.shouldSkipHighlightsWithoutAttributes),a=t.passport.executionConfig.onBeforeQuery;return a?a(i):i})}sendJaqlQuery(t,n){return Gt(this,void 0,void 0,function*(){const{queryDescription:r,taskId:i}=t.passport,{responsePromise:a,abortHttpRequest:l}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,n);this.sentRequestsAbortersMap.set(i,l);const s=yield a.finally(()=>{this.sentRequestsAbortersMap.delete(i)});Bf(s);const d=[...r.attributes,...r.measures],c=(s.headers||[]).slice(d.length).map(u=>({name:u,type:"number"}));return Pf(s,[...d,...c])})}sendCsvQuery(t,n){return Gt(this,void 0,void 0,function*(){const{taskId:r}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,n);return this.sentRequestsAbortersMap.set(r,a),i.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 Gt(this,void 0,void 0,function*(){const{pivotQueryDescription:n,executionConfig:r}=t.passport,i=o.wAe(n,r.shouldSkipHighlightsWithoutAttributes),a=t.passport.executionConfig.onBeforeQuery;return a?a(i):i})}sendPivotJaqlQuery(t,n){var r;const{pivotQueryDescription:i}=t.passport;return this.pivotClient.queryData(n,!0,(r=i.count)!==null&&r!==void 0?r:qf,!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 Bf(e){var t;if(!e)throw new Ie("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 Bl extends Be.TaskPassport{constructor(t,n,r){super(),this.queryDescription=n,this.type=t,this.executionConfig=r}}class Yf extends Be.TaskPassport{constructor(t,n,r){super(),this.pivotQueryDescription=n,this.type=t,this.executionConfig=r}}var Yl=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};const qf=2e4,hi="Unspecified reason";class Uf{constructor(t,n=new o.MAe(t.url,t.auth),r){Qf(t),this.queryApi=new Nf(t),this.taskManager=new Wf(this.queryApi,n),this.shouldSkipHighlightsWithoutAttributes=r??!1}executeQuery(t,n){const r=new Bl("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{ql(t),this.taskManager.executeQuerySending(r).then(l=>{l.status===Be.ExecutionResultStatus.SUCCESS?i(l.result):a(l.error)})}),cancel:i=>this.taskManager.cancel(r.taskId,i||hi)}}executeCsvQuery(t,n){const r=new Bl("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{ql(t),this.taskManager.executeDownloadCsvSending(r).then(l=>{l.status===Be.ExecutionResultStatus.SUCCESS?i(l.result):a(l.error)})}),cancel:i=>this.taskManager.cancel(r.taskId,i||hi)}}executePivotQuery(t,n){const r=new Yf("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{Vf(t),this.taskManager.executePivotQuerySending(r).then(l=>{l.status===Be.ExecutionResultStatus.SUCCESS?i(l.result):a(l.error)})}),cancel:i=>this.taskManager.cancel(r.taskId,i||hi)}}getDataSourceFields(t,n=9999,r=0){return Yl(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceFields(t,n,r))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return Yl(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function ql(e){const{attributes:t,measures:n,filters:r,highlights:i,count:a,offset:l}=e;if(a&&a<0)throw new Ie("errors.invalidCountNegative",{count:a.toString()});if(l&&l<0)throw new Ie("errors.invalidOffset",{offset:l.toString()});if(t.length+n.length===0)throw new Ie("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!o.Ni.isAttribute(s)){const{name:d}=s;throw new Ie("errors.invalidAttribute",{attributeName:d})}}),n.forEach(s=>{if(!s.skipValidation&&!o.Ni.isMeasure(s))throw new Ie("errors.invalidMeasure",{measureName:s.name})}),r.forEach(s=>{if(!s.skipValidation&&!o.Ni.isFilter(s))throw new Ie("errors.invalidFilter",{filterName:s.name})}),i.forEach(s=>{if(!s.skipValidation&&!o.Ni.isFilter(s))throw new Ie("errors.invalidHighlight",{highlightName:s.name})})}function Vf(e){const{rowsAttributes:t,columnsAttributes:n,measures:r,filters:i,highlights:a,count:l,offset:s}=e;if(l&&l<0)throw new Ie("errors.invalidCountNegative",{count:l.toString()});if(s&&s<0)throw new Ie("errors.invalidOffset",{offset:s.toString()});if(t.length+n.length+r.length===0)throw new Ie("errors.noDimensionsOrMeasures");i.forEach(d=>{if(!d.skipValidation&&!o.Ni.isFilter(d))throw new Ie("errors.invalidFilter",{filterName:d.name})}),a.forEach(d=>{if(!d.skipValidation&&!o.Ni.isFilter(d))throw new Ie("errors.invalidHighlight",{highlightName:d.name})})}function Qf(e){if(!e)throw new Ie("errors.missingHttpClient");if(!e.post)throw new Ie("errors.missingPostMethod")}const Gf={enabled:!0,delay:500},$f={locale:o.u0e(),dateConfig:o.Ixe,loadingIndicatorConfig:Gf,translationConfig:{language:"en",customTranslations:[]},language:"en",queryCacheConfig:{enabled:!1},queryLimit:o.AAe,tabberConfig:{enabled:!1},accessibilityConfig:{enabled:!1},errorBoundaryConfig:{alwaysShowErrorText:!1},trackingConfig:{enabled:!0}};function Zf(e,t,n){return xe(this,null,function*(){var r;const i=yield Kf(t,n);return o.Jr.withOptions({mergeArrays:!1},$f,{locale:o.u0e((r=e==null?void 0:e.translationConfig)==null?void 0:r.language)},i,e)})}function Xf(e){const t={};return e.forEach(n=>{t[n.key]=n}),t}function Kf(e,t=!1){return xe(this,null,function*(){var n,r;const i=yield e.get("api/globals");if(!i)throw new o.Qn("errors.serverSettingsNotLoaded");const a=t?{colors:o.Fxe().palette.variantColors}:yield o.Jv(o.Kv(i.designSettings),e);return{serverThemeSettings:o.Yv(i.designSettings,a,e.url),serverLanguage:i.language,serverVersion:i.version,serverFeatures:Xf(i.features),user:{tenant:{name:((r=(n=i.user)==null?void 0:n.tenant)==null?void 0:r.name)||o.EAe}}}})}function Jf(e,t){return t===o.EAe?e:e.replace(`/${t}`,"")}function em(){window.addEventListener("unhandledrejection",e=>{e.reason instanceof Error?console.error(e.reason.message):console.error(e.reason)})}const Qc=e=>xe(void 0,[e],function*({defaultDataSource:t,url:n,token:r,wat:i,ssoEnabled:a,appConfig:l,enableSilentPreAuth:s,useFusionAuth:d}){if(n===void 0)throw new o.Qn("errors.sisenseContextNoAuthentication");const c=Pn(n),u=Eh({url:c,token:r,wat:i,ssoEnabled:a,enableSilentPreAuth:s,useFusionAuth:d});if(!u)throw new o.Qn("errors.sisenseContextNoAuthentication");em();const p=new Lh(c,u,"sdk-ui-1.34.0"),h=yield p.login(),f=Oc(u)||!h,m=yield Zf(l||{},p,f),g=new o.MAe(Jf(c,m.user.tenant.name),u),b=new Uf(p,g);return{httpClient:p,pivotClient:g,queryClient:b,settings:m,defaultDataSource:t,queryCache:{clear:o.RAe}}}),Ul=e=>e,tm=()=>{let e=Ul;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ul}}},nm=tm(),rm={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function om(e,t,n="Mui"){const r=rm[t];return r?`${n}-${r}`:`${nm.generate(e)}-${t}`}const im=["ownerState"],am=["variants"],lm=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function sm(e){return Object.keys(e).length===0}function cm(e){return typeof e=="string"&&e.charCodeAt(0)>96}function fi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dm=o.Ol(),Vl=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Nr({defaultTheme:e,theme:t,themeId:n}){return sm(t)?e:t[n]||t}function um(e){return e?(t,n)=>n[e]:null}function jr(e,t){let{ownerState:n}=t,r=o.se(t,im);const i=typeof e=="function"?e(o.hy({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(a=>jr(a,o.hy({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:a=[]}=i;let l=o.se(i,am);return a.forEach(s=>{let d=!0;typeof s.props=="function"?d=s.props(o.hy({ownerState:n},r,n)):Object.keys(s.props).forEach(c=>{(n==null?void 0:n[c])!==s.props[c]&&r[c]!==s.props[c]&&(d=!1)}),d&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style(o.hy({ownerState:n},r,n)):s.style))}),l}return i}function pm(e={}){const{themeId:t,defaultTheme:n=dm,rootShouldForwardProp:r=fi,slotShouldForwardProp:i=fi}=e,a=l=>o.ia(o.hy({},l,{theme:Nr(o.hy({},l,{defaultTheme:n,themeId:t}))}));return a.__mui_systemSx=!0,(l,s={})=>{o.L1(l,k=>k.filter(D=>!(D!=null&&D.__mui_systemSx)));const{name:d,slot:c,skipVariantsResolver:u,skipSx:p,overridesResolver:h=um(Vl(c))}=s,f=o.se(s,lm),m=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=p||!1;let b;process.env.NODE_ENV!=="production"&&d&&(b=`${d}-${Vl(c||"Root")}`);let v=fi;c==="Root"||c==="root"?v=r:c?v=i:cm(l)&&(v=void 0);const y=o.$1(l,o.hy({shouldForwardProp:v,label:b},f)),x=k=>typeof k=="function"&&k.__emotion_real!==k||o.cr(k)?D=>jr(k,o.hy({},D,{theme:Nr({theme:D.theme,defaultTheme:n,themeId:t})})):k,C=(k,...D)=>{let M=x(k);const E=D?D.map(x):[];d&&h&&E.push(O=>{const F=Nr(o.hy({},O,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[d]||!F.components[d].styleOverrides)return null;const P=F.components[d].styleOverrides,L={};return Object.entries(P).forEach(([N,T])=>{L[N]=jr(T,o.hy({},O,{theme:F}))}),h(O,L)}),d&&!m&&E.push(O=>{var F;const P=Nr(o.hy({},O,{defaultTheme:n,themeId:t})),L=P==null||(F=P.components)==null||(F=F[d])==null?void 0:F.variants;return jr({variants:L},o.hy({},O,{theme:P}))}),g||E.push(a);const H=E.length-D.length;if(Array.isArray(k)&&H>0){const O=new Array(H).fill("");M=[...k,...O],M.raw=[...k.raw,...O]}const R=y(M,...E);if(process.env.NODE_ENV!=="production"){let O;d&&(O=`${d}${o.El(c||"")}`),O===void 0&&(O=`Styled(${o.U1(l)})`),R.displayName=O}return l.muiName&&(R.muiName=l.muiName),R};return y.withConfig&&(C.withConfig=y.withConfig),C}}const hm=pm();function fm(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:o.Os(t.components[n].defaultProps,r)}function mm({props:e,name:t,defaultTheme:n,themeId:r}){let i=o.T2(n);return r&&(i=i[r]||i),fm({theme:i,name:t,props:e})}function gm(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((a,l)=>{if(l){const s=t(l);s!==""&&a.push(s),n&&n[l]&&a.push(n[l])}return a},[]).join(" ")}),r}const bm=["component","direction","spacing","divider","children","className","useFlexGap"],vm=o.Ol(),ym=hm("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function wm(e){return mm({props:e,name:"MuiStack",defaultTheme:vm})}function xm(e,t){const n=o.N.toArray(e).filter(Boolean);return n.reduce((r,i,a)=>(r.push(i),a<n.length-1&&r.push(o.hn(t,{key:`separator-${a}`})),r),[])}const km=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],_m=({ownerState:e,theme:t})=>{let n=o.hy({display:"flex",flexDirection:"column"},o.Xt({theme:t},o.dL({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=o.p0(t),i=Object.keys(t.breakpoints.values).reduce((s,d)=>((typeof e.spacing=="object"&&e.spacing[d]!=null||typeof e.direction=="object"&&e.direction[d]!=null)&&(s[d]=!0),s),{}),a=o.dL({values:e.direction,base:i}),l=o.dL({values:e.spacing,base:i});typeof a=="object"&&Object.keys(a).forEach((s,d,c)=>{if(!a[s]){const u=d>0?a[c[d-1]]:"column";a[s]=u}}),n=o.fn(n,o.Xt({theme:t},l,(s,d)=>e.useFlexGap?{gap:o.Po(r,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${km(d?a[d]:e.direction)}`]:o.Po(r,s)}}))}return n=o.uL(t.breakpoints,n),n};function Sm(e={}){const{createStyledComponent:t=ym,useThemeProps:n=wm,componentName:r="MuiStack"}=e,i=()=>gm({root:["root"]},s=>om(r,s),{}),a=t(_m),l=o.k(function(s,d){const c=n(s),u=o.v0(c),{component:p="div",direction:h="column",spacing:f=0,divider:m,children:g,className:b,useFlexGap:v=!1}=u,y=o.se(u,bm),x={direction:h,spacing:f,useFlexGap:v},C=i();return o.u(a,o.hy({as:p,ownerState:x,ref:d,className:o.ce(C.root,b)},y,{children:m?xm(g,m):g}))});return process.env.NODE_ENV!=="production"&&(l.propTypes={children:o.d.node,direction:o.d.oneOfType([o.d.oneOf(["column-reverse","column","row-reverse","row"]),o.d.arrayOf(o.d.oneOf(["column-reverse","column","row-reverse","row"])),o.d.object]),divider:o.d.node,spacing:o.d.oneOfType([o.d.arrayOf(o.d.oneOfType([o.d.number,o.d.string])),o.d.number,o.d.object,o.d.string]),sx:o.d.oneOfType([o.d.arrayOf(o.d.oneOfType([o.d.func,o.d.object,o.d.bool])),o.d.func,o.d.object])}),l}function Gc(e,t){var n,r;return o.fn$1(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const Cm=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Dm=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return o.He({root:["root",n&&"inset",a&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},o.fL$1,t)},Mm=o.de("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${o.$u.primary}`]:t.primary},{[`& .${o.$u.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>o.hy({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),$c=o.k(function(e,t){const n=o.Le({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:a=!1,inset:l=!1,primary:s,primaryTypographyProps:d,secondary:c,secondaryTypographyProps:u}=n,p=o.se(n,Cm),{dense:h}=o.P(o.Mi);let f=s??r,m=c;const g=o.hy({},n,{disableTypography:a,inset:l,primary:!!f,secondary:!!m,dense:h}),b=Dm(g);return f!=null&&f.type!==o.Ct&&!a&&(f=o.u(o.Ct,o.hy({variant:h?"body2":"body1",className:b.primary,component:d!=null&&d.variant?void 0:"span",display:"block"},d,{children:f}))),m!=null&&m.type!==o.Ct&&!a&&(m=o.u(o.Ct,o.hy({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},u,{children:m}))),o.u(Mm,o.hy({className:o.ce(b.root,i),ownerState:g,ref:t},p,{children:[f,m]}))});process.env.NODE_ENV!=="production"&&($c.propTypes={children:o.d.node,classes:o.d.object,className:o.d.string,disableTypography:o.d.bool,inset:o.d.bool,primary:o.d.node,primaryTypographyProps:o.d.object,secondary:o.d.node,secondaryTypographyProps:o.d.object,sx:o.d.oneOfType([o.d.arrayOf(o.d.oneOfType([o.d.func,o.d.object,o.d.bool])),o.d.func,o.d.object])});const Jt=(e,t)=>`${t}px solid ${e}`,Zc=e=>({columns:[{widthPercentage:100,rows:e.map(t=>({cells:[{widthPercentage:100,widgetId:t.id}]}))}]});function Xc(e){return o.PA(e)?{direction:e}:e}function Ql(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function Tm({type:e,settings:t,sortDetails:n},r){return e==="simple"?n.field>=(r.rows||[]).length?[{rowIndex:0,sort:{direction:o.xAe(t[0].direction),by:Ql(n,r)}}]:[{rowIndex:n.field,sort:{direction:o.xAe(t[0].direction)}}]:t.reduce((i,a,l)=>{var s;const d=(s=r.rows)==null?void 0:s[l],c=(d==null?void 0:d.sortType)&&Xc(d==null?void 0:d.sortType),u={direction:o.xAe(a.direction),by:Ql(n,r)};return!a.selected&&o.N$(c==null?void 0:c.by,u.by)&&i.push({rowIndex:l,sort:null}),a.selected&&i.push({rowIndex:l,sort:u}),i},[])}function Am(e){const{jaql:t,pivotBuilder:n,isForceReload:r}=e,[i,a]=o.p({isLoading:!1,isNoResults:!1}),l=o.sg(t);o._(()=>{t&&(l||r)&&n.updateJaql(t)},[r,l,t,n]);const s=o.x(()=>{a({isLoading:!0,isNoResults:!1})},[]),d=o.x(c=>{a({isLoading:!1,isNoResults:!c.cellsMetadata})},[]);return o._(()=>{const c=[{event:o.fL,handler:s},{event:o.mL$1,handler:d}];return c.forEach(({event:u,handler:p})=>{n.on(u,p)}),()=>{c.forEach(({event:u,handler:p})=>{n.off(u,p)})}},[n,s,d]),i}function Em(e){const{pivotClient:t,pivotBuilder:n,shouldBeRecreated:r}=e,[i,a]=o.p(()=>t.prepareDataService());return o._(()=>{if(r){const l=t.prepareDataService();a(l),n.updateDataService(l)}},[t,n,r]),o._(()=>()=>{i.destroy()},[i]),i}const Nm=({dataOptions:e})=>{const[t,n]=o.p(o.hL(e));return{dataOptionsInternal:t,updateSort(r){var i;n(S(w({},t),{rows:(i=t.rows)==null?void 0:i.map((a,l)=>{const s=r.rows.find(({rowIndex:d})=>d===l);return s?s.sort===null?o.BAe(a,{sortType:void 0}):o.BAe(a,{sortType:s.sort}):a})}))}}},Lm=e=>(t,n,r,i)=>{var a;const l=o.sSe(e,(a=i==null?void 0:i.field)==null?void 0:a.index),s=o.lSe(l),d=t.value===null||typeof t.value>"u";t.content=d?"":o.Er(s,t.value)},Im=()=>(e,t,n)=>{var r,i;const a=e.userType===o.Sn.CORNER,l=e.userType===o.Sn.SUB_TOTAL;if(!t||a||l)return;const s=n.metadata.find(({panel:c,jaql:u})=>{var p;const h=["rows","columns"].includes(c),f=u.dim===t.jaql.dim,m=t.jaql.datatype===u.datatype&&t.jaql.level===u.level,g=(p=u.in)==null?void 0:p.selected;return h&&f&&m&&g}),d=(i=(r=s==null?void 0:s.jaql)==null?void 0:r.in)==null?void 0:i.selected;d&&Vh(d.jaql)(e.value)&&(e.state={isSelected:!0})};function Om(e,t){return n=>{var r,i,a,l;if(n.userType===o.Sn.SUB_TOTAL&&(n.content=t("pivotTable.subTotal",{value:(r=n.content)!=null?r:""})),n.userType===o.Sn.GRAND_TOTAL){if(n.metadataType===o.gi$1.ROWS&&(n.content=t("pivotTable.grandTotal"),((i=e.values)==null?void 0:i.length)===1&&!((a=e.columns)!=null&&a.length))){const[s]=e.values,d="column"in s?s.column:s;n.content=(l=d.name)!=null?l:n.content}n.metadataType===o.gi$1.COLUMNS&&n.parent&&(n.content=t("pivotTable.grandTotal"))}}}const Hm="#000000",Rm="#ffffff";function Pm(e,t){return(n,r,i,a)=>{var l;const s={};if(r.userType===o.Sn.SUB_TOTAL||r.userType===o.Sn.GRAND_TOTAL||i.userType===o.Sn.SUB_TOTAL||i.userType===o.Sn.GRAND_TOTAL||i.parent&&i.parent.userType===o.Sn.SUB_TOTAL||i.parent&&i.parent.userType===o.Sn.GRAND_TOTAL)return;const d=o.sSe(e,(l=a==null?void 0:a.field)==null?void 0:l.index),c=d==null?void 0:d.color,u=d==null?void 0:d.dataBarsColor;if(c){const p=o.vCe(c);if(p.type==="Static"||p.type==="Absolute"){const h=p.getColor(n.value);h&&(s.backgroundColor=h)}else if(p.type==="Relative"){const h=c,[f]=t.palette.variantColors,m=f?o.Vc(f,.2):Hm,g=f?o.Vc(f,-.2):Rm,b={steps:h.steps,min:h.minColor,max:h.maxColor,minDef:m,maxDef:g,minGray:o.W5(m),maxGray:o.W5(g)};n.store=n.store||{},n.store.compileRange=({min:v,max:y,minvalue:x,midvalue:C,maxvalue:k})=>o.hCe(v??"#000000",y??"#ffffff",x??0,C??0,k??0),n.store.compileRangeContext={},n.store.compileRangeArgs=b}}if(u){const p=o.vCe(u);if(p.type==="Static"||p.type==="Absolute"){const h=p.getColor(n.value);h&&(s.databarColor=h)}}Object.keys(s).length>0&&(n.style=n.style||{},Object.assign(n.style,s))}}const Fm=({dataService:e,dataOptions:t})=>{const{app:n}=o.NT(),{t:r}=o.N_(),{themeSettings:i}=o.DT(),a=o.x(o.CSe([Lm(t),Pm(t,i)]),[t]),l=o.x((d,c)=>o.a5(d,c,n==null?void 0:n.settings.locale,n==null?void 0:n.settings.dateConfig),[n]),s=o.x(o.CSe([o.VAe(t,l),Om(t,r),Im()]),[t,r]);o._(()=>(e.on(o.OZ,a),e.on(o.pA,s),()=>{e.off(o.OZ,a),e.off(o.pA,s)}),[e,a])};function Gl(e,t){return o.rf(e,t)}const jm=o.FA("useExecutePivotQuery")(Kc);function Kc(e){const t=Wm(e),n=o.zA(e,t),[r,i]=o.y(Gl,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:a,app:l}=o.NT();return o._(()=>{if(a||i({type:"error",error:new o.Qn("errors.executeQueryNoSisenseContext")}),n(l)){i({type:"loading"});const{dataSource:s,rows:d,columns:c,values:u,grandTotals:p,filters:h,highlights:f,count:m,offset:g,onBeforeQuery:b}=e,{filters:v,relations:y}=o.vAe(h);o.DAe({dataSource:s,rows:d,columns:c,values:u,grandTotals:p,filters:v,filterRelations:y,highlights:f,count:m,offset:g},l,{onBeforeQuery:b}).then(x=>{i({type:"success",data:x})}).catch(x=>{i({type:"error",error:x})})}},[l,a,e,n]),r.data&&t?Gl(r,{type:"loading"}):r}const zm=["dataSource","rows","columns","values","grandTotals","count","offset","onBeforeQuery"];function Wm(e){return o.sg(e,zm,(t,n)=>{const{filters:r}=o.vAe(n.filters),{filters:i}=o.vAe(t.filters);return o.IA(r,i)||o.IA(n.highlights,t.highlights)})}function Jc(e,t){const[n,r]=o.p(e),i=o.q(()=>o.bL(a=>{r(a)},t),[t]);return o._(()=>{i(e)},[e,i]),n}const Bm=200,$l=e=>w({attribute:o.FAe(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:Xc(e.sortType)}),Ym=e=>{var t;return{measure:o.zAe(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},ed=e=>{const{rows:t=[],columns:n=[],values:r=[],grandTotals:i}=e,a=t.flatMap($l),l=n.flatMap($l),s=r.flatMap(Ym);return{rows:a,columns:l,values:s,grandTotals:i}},qm=({dataSet:e,dataOptionsInternal:t,filters:n,highlights:r})=>{const[i,a]=o.p(),{rows:l,columns:s,values:d,grandTotals:c}=ed(t),u=o.x(f=>{a(m=>o.N$(m,f)?m:f)},[a]),p=Jc({dataSource:e,rows:l,columns:s,values:d,grandTotals:c,filters:n,highlights:r,onBeforeQuery:u},Bm),{error:h}=Kc(p);return{jaql:i,error:h}},Um="#cbced7",Vm="#ffff9c";function Qm(e,t){var n,r,i,a,l,s,d,c,u,p,h;let f,m;if((n=t==null?void 0:t.chart)!=null&&n.backgroundColor){const g=o.Z0(o.Js((r=t==null?void 0:t.chart)==null?void 0:r.backgroundColor))<.5?.07:-.07;f=o.jAe((i=t==null?void 0:t.chart)==null?void 0:i.backgroundColor,g),m=o.jAe((a=t==null?void 0:t.chart)==null?void 0:a.backgroundColor,g*1.5)}return{fontFamily:(l=t==null?void 0:t.typography)==null?void 0:l.fontFamily,textColor:(s=t==null?void 0:t.chart)==null?void 0:s.textColor,backgroundColor:(d=t==null?void 0:t.chart)==null?void 0:d.backgroundColor,borderColor:Um,fillColor:f,additionalFillColor:m,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:(u=t==null?void 0:t.typography)==null?void 0:u.primaryTextColor,navigationSecondaryColor:(p=t==null?void 0:t.typography)==null?void 0:p.secondaryTextColor,selectionColor:(h=e==null?void 0:e.highlightColor)!=null?h:Vm}}const Gm=25;function $m({nodeRef:e,pivotBuilder:t,dataOptions:n,styleOptions:r,themeSettings:i,size:a,onTotalHeightChange:l}){const[s,d]=o.fg((r==null?void 0:r.rowsPerPage)||Gm),c=o.x((f,m)=>{const g=[...n.rows?n.rows:[],...n.columns?n.columns:[],...n.values?n.values:[]].map(v=>v==null?void 0:v.width);if(m){const[v,y]=m,x=f[v];x&&typeof x.jaqlIndex<"u"&&(g[x.jaqlIndex]=y)}const b=[];return f.forEach((v,y)=>{typeof v.jaqlIndex<"u"&&typeof g[v.jaqlIndex]<"u"&&b.push([y,g[v.jaqlIndex]])}),b},[n]),u=o.x(f=>{d(f)},[d]),p=o.q(()=>Qm(r,i),[r,i]),h=o.q(()=>a?w({width:a.width,height:a.height,isPaginated:!0,itemsPerPage:s,isSelectedMode:!0,onUpdatePredefinedColumnWidth:c,onItemsPerPageChange:u,onTotalHeightChange:l},p):null,[a,s,c,p,l,u]);o._(()=>{e.current&&h&&(e.current.children.length?t.updateProps(h):t.render(e.current,h))},[e,t,h])}function Zm(e){const{pivotClient:t}=e,n=o.q(()=>t.preparePivotBuilder(),[t]);return o._(()=>()=>{n.destroy()},[n]),n}const td=o.da({componentName:"PivotTable"})(e=>{const{dataSet:t,dataOptions:n,filters:r,highlights:i,refreshCounter:a=0}=e,l=o.q(()=>{var O;return(O=e.styleOptions)!=null?O:{}},[e.styleOptions]),s=o.F(null),[d,c]=o.p(null),[u,p]=o.p(null),{app:h}=o.NT(),{themeSettings:f}=o.DT(),m=h==null?void 0:h.pivotClient;if(!m)throw new o.Qn("errors.noPivotClient");const{dataOptionsInternal:g,updateSort:b}=Nm({dataOptions:n}),{error:v,jaql:y}=qm({dataSet:t,dataOptionsInternal:g,filters:r,highlights:i});if(v)throw v;const x=Zm({pivotClient:m}),C=o.sg(y),k=a>0&&o.sg(a),D=Em({pivotClient:m,pivotBuilder:x,shouldBeRecreated:C||k});Fm({dataService:D,dataOptions:n}),$m({nodeRef:s,pivotBuilder:x,dataOptions:n,styleOptions:l,themeSettings:f,size:d,onTotalHeightChange:p});const{isLoading:M,isNoResults:E}=Am({jaql:y,pivotBuilder:x,isForceReload:k}),H=o.x(O=>{const F=Tm(O,g);b({rows:F})},[g,b]);o._(()=>(x.on(o.gL,H),()=>{x.off(o.gL,H)}),[x,H]);const R=o.x(O=>{(O.width!==(d==null?void 0:d.width)||O.height!==(d==null?void 0:d.height))&&c(O)},[d,c]);return o.Hi(o.Hl,{defaultSize:o.PC,size:{width:l==null?void 0:l.width,height:l!=null&&l.isAutoHeight&&!E&&u!=null?u:l==null?void 0:l.height},onSizeChange:R,children:o.Hi(o.ns,{themeSettings:f,isVisible:M,children:o.Fc(o.d5,{children:[E&&o.Hi(o.up,{iconType:"table"}),o.Hi("div",{ref:s,"aria-label":"pivot-table-root"})]})})})}),pa=o.da({componentName:"PivotTableWidget"})(e=>{var t;const[n,r]=o.p(0),{app:i}=o.NT(),{styleOptions:a,dataSource:l=i==null?void 0:i.defaultDataSource,dataOptions:s}=e,d=o.kC("pivot",{hasHeader:!((t=a==null?void 0:a.header)!=null&&t.hidden)}),c=e.styleOptions||{},{width:u,height:p}=c,h=oe(c,["width","height"]);return s?o.Hi(o.Hl,{defaultSize:d,size:{width:u,height:a!=null&&a.isAutoHeight?void 0:p},children:o.Hi(o.SA,S(w({},e),{dataSetName:l&&o.pG(l),onRefresh:()=>r(n+1),children:o.Hi(td,{dataSet:e.dataSource,dataOptions:e.dataOptions,styleOptions:h,filters:e.filters,highlights:e.highlights,refreshCounter:n})}))}):null}),Xm=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},Km=e=>"levels"in e&&e.isCascading===!0;function Jm(e,t){if(!e)return[];return n(e);function n(r){var i,a;if(o.vl(r))return[{nodeType:"attribute",attribute:((a=(i=o.nL(t,r.instanceid))==null?void 0:i.attribute)==null?void 0:a.name)||r.instanceid}];if(o.yl(r))return[{nodeType:"openBracket"},...n(r.left),{nodeType:"operator",operator:r.operator},...n(r.right),{nodeType:"closeBracket"}];throw new o.bl}}function eo(e=[],t=[],n){switch(n){case"widgetFirst":return o.Lv(t,e);case"codeFirst":return o.Lv(e,t);case"codeOnly":return t;default:return o.Lv(e,t)}}var eg=function(e){return e.FILTER="filter",e.SELECT="select",e}({});function Zl(e){return!!e&&e.min!==null&&e.max!==null}var tg=function(e){return e.PRE="pre",e.POST="post",e}({});function nd(e){return"formula"in e}function rd(e){return"formulaRef"in e}const ng=e=>({columns:(e.columns||[]).map(t=>({widthPercentage:t.width,rows:(t.cells||[]).map(n=>{const r=n.subcells.reduce((i,a)=>i+a.width,0);return{cells:n.subcells.map(i=>({widthPercentage:r<100?i.width/(r/100):i.width,height:i.elements[0].height,widgetId:i.elements[0].widgetid}))}})}))}),rg=e=>o.mG(e.jaql,e.instanceid,e.disabled,e.locked),og=e=>{const{levels:t,instanceid:n,disabled:r,locked:i}=e,a=t.map(l=>o.mG(l,l.instanceid));return new o.I$(a,{guid:n,disabled:r,locked:i})};function ig(e,t){const n=e.map(i=>Km(i)?og(i):rg(i));if(!t)return n;const r=o.tL(t,n);return!r||o.qf(r)?n:o.gi(n,r)}const ag=e=>e.subtype==="WidgetsTabber";function lg(e=[]){const t={};return e.forEach(n=>{var r,i,a,l;t[n.oid]={filtersOptions:{applyMode:((r=n.options)==null?void 0:r.dashboardFiltersMode)==="filter"?o.Mc.FILTER:o.Mc.HIGHLIGHT,shouldAffectFilters:(i=n.options)==null?void 0:i.selector,ignoreFilters:{all:(a=n.metadata.ignore)==null?void 0:a.all,ids:(l=n.metadata.ignore)==null?void 0:l.ids},forceApplyBackgroundFilters:!0}}}),t}function sg(e=[]){const t={};return e.forEach(n=>{ag(n)&&(t[n.oid]={tabs:n.style.tabs,activeTab:parseInt(n.style.activeTab||"1",10)})}),t}function cg(e,t){return xe(this,null,function*(){var n;const r=dg(e.widgets||[]);if(r.length===0)return e;const i=yield t.getSharedFormulas(r);return S(w({},e),{widgets:(n=e.widgets)==null?void 0:n.map(a=>ug(a,i))})})}function dg(e){const t=e.flatMap(n=>n.metadata.panels.flatMap(r=>r.items.flatMap(i=>!nd(i.jaql)||!i.jaql.context?[]:Object.values(i.jaql.context).filter(rd).map(a=>a.formulaRef))));return Array.from(new Set(t))}function ug(e,t){const n=e.metadata.panels.map(r=>{const i=r.items.map(a=>{const{jaql:l}=a;if(!nd(l)||!l.context)return a;const s=Object.fromEntries(Object.entries(l.context).map(([d,c])=>rd(c)?[d,t[c.formulaRef]]:[d,c]));return S(w({},a),{jaql:S(w({},l),{context:s})})});return S(w({},r),{items:i})});return S(w({},e),{metadata:S(w({},e.metadata),{panels:n})})}function od(e,t){return xe(this,arguments,function*(n,r,i={},a,l){var s,d;const{includeWidgets:c,includeFilters:u}=i,p=new o.YSe(n),h=["oid","title","datasource","style"],f=((s=n.auth)==null?void 0:s.type)==="wat";c&&h.push("layout"),u&&(h.push("filters"),h.push("filterRelations"));const m=yield p.getDashboard(r,{fields:h});if(!m)throw new o.Qn("errors.dashboardWithOidNotFound",{dashboardOid:r});if(c){let b;if(f){const v=Xm(m);b=(yield Promise.all(v.map(y=>p.getWidget(y,m.oid)))).filter(y=>y!==void 0)}else b=(yield p.getDashboardWidgets(r))||[];m.widgets=b}if((d=m.style)!=null&&d.paletteId&&!m.style.palette){const b=yield p.getPalettes(),v=b==null?void 0:b.find(({_id:y})=>{var x;return y===((x=m.style)==null?void 0:x.paletteId)});v&&(m.style.palette={name:v.name,colors:v.colors})}const g=yield cg(m,p);return _a(g,a,l)})}const id=(e,t)=>{const n={};for(const r of e){const i=t(r);i in n||(n[i]=r)}return Object.values(n)};function ad(e){return xe(this,arguments,function*(t,n={}){const{includeWidgets:r,searchByTitle:i}=n,a=new o.YSe(t),l=[];let s=["oid","title","datasource"];r&&(s=[],l.push("widgets"));const d=yield a.getDashboards({fields:s,expand:l,searchByTitle:i});if(!d)return[];const c=id(d,u=>u.oid);return c.length!==d.length&&console.warn("Removing detected duplicate dashboard(s)"),c.map(u=>_a(u))})}const ld=o.FA("useGetDashboardModel")(sd);function sd(e){const t=o.sg(e,["dashboardOid"]),n=o.zA(e,t),[r,i]=o.y(o.rf,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:a,app:l}=o.NT(),{themeSettings:s}=o.DT();return o._(()=>{if(a||i({type:"error",error:new o.Qn("errors.sisenseContextNotFound")}),n(l)){i({type:"loading"});const{dashboardOid:d,includeWidgets:c,includeFilters:u}=e;od(l.httpClient,d,{includeWidgets:c,includeFilters:u},s,l.settings).then(p=>{i({type:"success",data:p})}).catch(p=>{i({type:"error",error:p})})}},[l,a,e,n,s]),r.data&&t?Ri(o.rf(r,{type:"loading"})):Ri(r)}function Ri(e){const t=e,{data:n}=t,r=oe(t,["data"]);return S(w({},r),{dashboard:n})}const pg=o.FA("useGetDashboardModels")(hg);function hg(e={}){const t=o.sg(e,["includeWidgets"]),n=o.zA(e,t),[r,i]=o.y(o.rf,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:a,app:l}=o.NT();return o._(()=>{a||i({type:"error",error:new o.Qn("errors.sisenseContextNotFound")}),n(l)&&(i({type:"loading"}),ad(l.httpClient,e).then(s=>{i({type:"success",data:s})}).catch(s=>{i({type:"error",error:s})}))},[l,a,e,n]),r.data&&t?Pi(o.rf(r,{type:"loading"})):Pi(r)}function Pi(e){const t=e,{data:n}=t,r=oe(t,["data"]);return S(w({},r),{dashboards:n})}const cd=e=>xe(void 0,[e],function*({widgetOid:t,dashboardOid:n,includeDashboard:r,api:i}){const[a,l]=yield Promise.all([i.getWidget(t,n),r?i.getDashboard(n):void 0]);return{widget:a,dashboard:l}});function dd(e,t,n,r,i){return xe(this,null,function*(){const a=new o.YSe(e),{widget:l}=yield cd({widgetOid:n,dashboardOid:t,api:a});if(!l)throw new o.Qn("errors.widgetWithOidNotFound",{widgetOid:n});return mr(l,r,i)})}const fg=o.FA("useGetWidgetModel")(ud);function ud(e){const t=o.sg(e,["dashboardOid","widgetOid"]),n=o.zA(e,t),{themeSettings:r}=o.DT(),[i,a]=o.y(o.rf,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:l,app:s}=o.NT();return o._(()=>{if(l||a({type:"error",error:new o.Qn("errors.sisenseContextNotFound")}),n(s)){a({type:"loading"});const{dashboardOid:d,widgetOid:c}=e;dd(s.httpClient,d,c,r,s.settings).then(u=>{a({type:"success",data:u})}).catch(u=>{a({type:"error",error:u})})}},[s,l,e,n,r]),i.data&&t?Xl(o.rf(i,{type:"loading"})):Xl(i)}function Xl(e){const t=e,{data:n}=t,r=oe(t,["data"]);return S(w({},r),{widget:n})}function mg(e,t,n){var r;return n(e,function(i,a,l){if(t(i,a,l))return r=a,!1}),r}function gg(e,t){return mg(e,o.HD(t),o.I4)}function bg(e){return e.percent||e.type==="percent"?"Percent":e.currency?"Currency":"Numbers"}function vg(e){return e.decimals!==void 0&&e.decimals!=="auto"?typeof e.decimals=="string"?Number.parseFloat(e.decimals):e.decimals:"auto"}function yg(e){var t,n,r,i,a,l,s,d,c;const u=e.jaql.datatype==="numeric"||e.jaql.agg==="count"||"context"in e.jaql,p=(t=e.format)==null?void 0:t.mask;return u&&p?{decimalScale:vg(p),kilo:(n=p.abbreviations)==null?void 0:n.k,million:(r=p.abbreviations)==null?void 0:r.m,billion:(i=p.abbreviations)==null?void 0:i.b,trillion:(a=p.abbreviations)==null?void 0:a.t,thousandSeparator:(s=(l=p.number)==null?void 0:l.separated)!=null?s:p.separated,prefix:((d=p.currency)==null?void 0:d.position)===tg.PRE,symbol:(c=p.currency)==null?void 0:c.symbol,name:bg(p)}:null}const wg=!0;function xg(e,t){if(!t||!wg)return e;const{forecast:n,trend:r}=t;let i=w({},e);return n&&!n.isViewerDisabled&&n.isEnabled&&(i=S(w({},i),{forecast:{confidenceInterval:n.confidence/100,forecastHorizon:n.forecastPeriod,modelType:"auto"}})),r&&!r.isViewerDisabled&&r.isEnabled&&(i=S(w({},i),{trend:{modelType:r.trendType}})),i}const kg=e=>{var t,n,r,i,a,l,s;return e.jaql&&"level"in e.jaql?(a=(n=(t=e.format)==null?void 0:t.mask)==null?void 0:n[e.jaql.level])!=null?a:(i=(r=e.format)==null?void 0:r.mask)==null?void 0:i.dateAndTime:(s=(l=e.format)==null?void 0:l.mask)==null?void 0:s.dateAndTime};function nn(e,t){var n,r,i,a,l,s,d,c;const u=o.bG(e.jaql,kg(e),e.panel),p=o.xAe((n=e.jaql.sort)!=null?n:e.categoriesSorting),h=yg(e),f=(r=e.format)==null?void 0:r.subtotal,m=(i=e.format)==null?void 0:i.width;let g=o.d_e((a=e.format)==null?void 0:a.color,t);const b=o.d_e((l=e.format)==null?void 0:l.colorSecond,t),v=e.panel==="columns"&&e.panel;if(!g&&!((s=e.format)!=null&&s.color)&&e.format&&"colorIndex"in e.format&&(g=o.d_e({type:"color",colorIndex:e.format.colorIndex},t)),o.Ni.isMeasure(u)){const y=e.y2,x=e.singleSeriesType,C="subtotalAgg"in e.jaql&&e.jaql.subtotalAgg,k=(d=e.format)==null?void 0:d.databars,D=w(w(w(w(w(w(w(w(w(w({column:u},g&&{color:g}),b&&{dataBarsColor:b}),y&&{showOnRightAxis:y}),p&&{sortType:p}),x&&{chartType:x}),h&&{numberFormatConfig:h}),C&&{totalsCalculation:C}),k&&{dataBars:k}),m&&{width:m}),v&&{panel:v});return xg(D,e.statisticalModels)}return w(w(w(w(w(w({column:u,isColored:(c=e.isColored)!=null?c:!1},p&&{sortType:p}),h&&{numberFormatConfig:h}),f&&{includeSubTotals:f}),m&&{width:m}),g&&{color:g}),v&&{panel:v})}function bt(e){const t=e.column;let n;if(o.Ni.isAttribute(t))n=t.jaql(!0);else if(o.Ni.isMeasure(t))n=t.jaql(!0);else throw new o.Qn("errors.unsupportedDimensionalElement");return n.jaql?n:{jaql:n}}const pd=(e,t)=>{const n={};return e.forEach(r=>{r.name!=="filters"&&(n[o.z$(r.name)]=ue(e,r.name,t))}),n};function Fi(e,t,n){return o.oEe(e,t).map(o.PSe).map(n)}function ue(e,t,n){return Fi(e,t,r=>nn(r,n))}function _g(e,t,n){var r,i;const a=["chart/line","chart/area"].includes(t)?"x-axis":"categories",l=ue(e,a,n),s=ue(e,"values",n),d=ue(e,"break by",n),c=(i=(r=o.oEe(e,"break by")[0])==null?void 0:r.format)==null?void 0:i.members,u=c&&o.h_e(c);return w({category:l,value:s,breakBy:d},u&&{seriesToColorMap:u})}function Sg(e,t,n){var r,i,a,l;const s=ue(t,"categories",n),d=ue(t,"values",n),c=ue(t,"size",n);let u,p;return e==="sunburst"?p=o.sEe(o.oEe(t,"categories")):(u=(i=(r=o.oEe(t,"categories")[0])==null?void 0:r.format)==null?void 0:i.members,o.oEe(t,"color").length&&(u=(l=(a=o.oEe(t,"color")[0])==null?void 0:a.format)==null?void 0:l.members),p=u&&o.h_e(u)),w({category:s,value:[...d,...c]},p&&{seriesToColorMap:p})}function Cg(e,t){var n,r;const[i]=ue(e,"x-axis",t),[a]=ue(e,"y-axis",t),[l]=ue(e,"point",t),[s]=ue(e,"Break By / Color",t),[d]=ue(e,"size",t),c=(r=(n=o.oEe(e,"Break By / Color")[0])==null?void 0:n.format)==null?void 0:r.members,u=c&&o.h_e(c);return w({x:i,y:a,breakByPoint:l,breakByColor:s,size:d},u&&{seriesToColorMap:u})}function Dg(e,t){const n=ue(e,"value",t),r=ue(e,"secondary",t),i=ue(e,"min",t),a=ue(e,"max",t);return{value:n,secondary:r,min:i,max:a}}function Mg(e,t){return{columns:ue(e,"columns",t)}}function Tg(e,t,n){let r;const i={},a=ue(e,"columns",n),l=Fi(e,"values",(s,d)=>{var c,u,p,h,f;const{field:m,jaql:g}=s,{sortDetails:b}=g;b&&(r=b),m&&(i[m.index]=d),((u=(c=s.format)==null?void 0:c.color)==null?void 0:u.type)==="color"&&!((h=(p=s.format)==null?void 0:p.color)!=null&&h.color)&&delete s.format.color;const v=nn(s,n);return typeof v.color!="string"&&((f=v.color)==null?void 0:f.type)==="conditional"&&delete v.color.defaultColor,v});return{rows:Fi(e,"rows",(s,d,c)=>{var u;const p=d===c.length-1;let{sortDetails:h}=s==null?void 0:s.jaql;const f=nn(s,n);f.column&&o.Ni.isAttribute(f.column)&&(f.column=f.column.sort(o.Jn.None)),p&&r&&(h=r);const m=(h==null?void 0:h.field)!==((u=s.field)==null?void 0:u.index);return h&&(f.sortType=w({direction:o.xAe(h.dir)},m&&{by:{valuesIndex:i[h.field],columnsMembersPath:Object.values(h.measurePath||{})}})),f}),columns:a,values:l,grandTotals:{rows:t.rowsGrandTotal,columns:t.columnsGrandTotal}}}function Ag(e){const t={"whisker/iqr":"iqr","whisker/extremums":"extremums","whisker/deviation":"standardDeviation"},n=gg(e.whisker,r=>r);return t[n]}function Eg(e,t,n){const r=ue(e,"category",n),i=ue(e,"value",n),a=Ag(t),l=t.outliers.enabled;return{category:r,value:i,boxType:a,outliersEnabled:l}}function Ng(e,t){return o.oEe(e,"geo").map(o.PSe).map(n=>{const r=nn(n,t);return"geoLevel"in n?S(w({},r),{level:n.geoLevel}):r})}function Lg(e,t){const n=Ng(e,t),r=ue(e,"size",t)[0],i=ue(e,"color",t)[0],a=ue(e,"details",t)[0];return{geo:n,size:r,colorBy:i,details:a}}function Ig(e,t){const n=[ue(e,"geo",t)[0]],r=ue(e,"color",t)[0];return w({geo:n},r&&{color:[r]})}function ji(e,t){const n="dim"in e.jaql?S(w({},e),{jaql:S(w({},e.jaql),{datasource:t})}):e,r=e.parent?ji(e.parent,t):void 0,i=e.through?ji(e.through,t):void 0;return S(w({},n),{parent:r,through:i})}function Og(e,t){return e.map(n=>S(w({},n),{items:n.items.map(r=>ji(r,t))}))}function Hg(e,t,n,r){if(Rg(e))return _g(t,e,r);if(Pg(e))return Sg(e,t,r);if(e==="chart/scatter")return Cg(t,r);if(e==="indicator")return Dg(t,r);if(o.KAe(e))return Mg(t,r);if(o.SSe(e))return Tg(t,n,r);if(e==="chart/boxplot")return Eg(t,n,r);if(e==="map/scatter")return Lg(t,r);if(e==="map/area")return Ig(t,r);if(e==="richtexteditor")return{};throw new o.Qn("errors.unsupportedWidgetType",{widgetType:e})}function Rg(e){return["chart/line","chart/area","chart/bar","chart/column","chart/polar"].includes(e)}function Pg(e){return["chart/pie","chart/funnel","treemap","sunburst"].includes(e)}function un(e,t){const n=o.ZAe(e);return w(w({},t),n&&{subtype:n})}function wt(e){const{min:t,max:n}=e||{};return S(w({},e),{min:typeof t=="number"?t:null,max:typeof n=="number"?n:null})}function Fg(e,t,n){var r,i,a,l,s,d,c,u,p,h;const f={xAxis:wt(t.xAxis),yAxis:wt(t.yAxis),y2Axis:wt(t.y2Axis)},m=["chart/line","chart/area"].includes(e)?"x-axis":"categories",g=o.oEe(n,m),b=o.oEe(n,"values"),v=g.length===2;v&&(f.xAxis=S(w({},f.xAxis),{title:(r=f.xAxis)==null?void 0:r.x2Title,x2Title:(i=f.xAxis)==null?void 0:i.title}));const y=!!((a=f.xAxis)!=null&&a.title&&"text"in f.xAxis.title),x=g[g.length-1];!y&&x&&(f.xAxis=S(w({},f.xAxis),{title:S(w({},(l=f.xAxis)==null?void 0:l.title),{text:x.jaql.title})}));const C=!!((s=f.xAxis)!=null&&s.x2Title&&"text"in f.xAxis.x2Title),k=g[0];!C&&v&&(f.xAxis=S(w({},f.xAxis),{x2Title:S(w({},(d=f.xAxis)==null?void 0:d.x2Title),{text:k.jaql.title})}));const D=!!((c=f.yAxis)!=null&&c.title&&"text"in f.yAxis.title),M=b.filter(R=>!R.y2);!D&&M.length===1&&(f.yAxis=S(w({},f.yAxis),{title:S(w({},(u=f.yAxis)==null?void 0:u.title),{text:M[0].jaql.title})}));const E=!!((p=f.y2Axis)!=null&&p.title&&"text"in f.y2Axis.title),H=b.filter(R=>R.y2);return!E&&H.length===1&&(f.y2Axis=S(w({},f.y2Axis),{title:S(w({},(h=f.y2Axis)==null?void 0:h.title),{text:H[0].jaql.title})})),f}function jg(e,t){var n,r;const i={xAxis:wt(e.categories),yAxis:wt(e.axis)},a=o.oEe(t,"categories")[0];return!((n=i.xAxis)!=null&&n.title&&"text"in i.xAxis.title)&&a&&(i.xAxis=S(w({},i.xAxis),{title:S(w({},(r=i.xAxis)==null?void 0:r.title),{text:a.jaql.title})})),i.yAxis=S(w({},i.yAxis),{title:{enabled:!1}}),i}function zg(e,t){var n,r,i,a;const l={xAxis:wt(e.xAxis),yAxis:wt(e.yAxis)},s=o.oEe(t,"x-axis")[0],d=o.oEe(t,"y-axis")[0];return!((n=l.xAxis)!=null&&n.title&&"text"in l.xAxis.title)&&s&&(l.xAxis=S(w({},l.xAxis),{title:S(w({},(r=l.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((i=l.yAxis)!=null&&i.title&&"text"in l.yAxis.title)&&d&&(l.yAxis=S(w({},l.yAxis),{title:S(w({},(a=l.yAxis)==null?void 0:a.title),{text:d.jaql.title})})),l}function Wg(e,t){var n,r,i,a;const l={xAxis:wt(e.xAxis),yAxis:wt(e.yAxis)},s=o.oEe(t,"category")[0],d=o.oEe(t,"value")[0];return!((n=l.xAxis)!=null&&n.title&&"text"in l.xAxis.title)&&s&&(l.xAxis=S(w({},l.xAxis),{title:S(w({},(r=l.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((i=l.yAxis)!=null&&i.title&&"text"in l.yAxis.title)&&d&&(l.yAxis=S(w({},l.yAxis),{title:S(w({},(a=l.yAxis)==null?void 0:a.title),{text:d.jaql.title})})),l}function Bg(e,t){var n,r,i,a,l,s,d,c,u,p,h,f,m,g,b,v,y,x,C,k,D;const M=((n=t.seriesLabels)==null?void 0:n.enabled)&&((a=(i=(r=t.seriesLabels)==null?void 0:r.labels)==null?void 0:i.types)==null?void 0:a.totals),E=e==="area/stacked"||e==="area/stackedspline"||e==="column/stackedcolumn"||e==="bar/stacked",H=e==="area/stacked100"||e==="area/stackedspline100"||e==="column/stackedcolumn100"||e==="bar/stacked100";let R=(s=(l=t.seriesLabels)==null?void 0:l.enabled)!=null?s:!1;return(E||H)&&(R=!!(E&&(u=(c=(d=t.seriesLabels)==null?void 0:d.labels)==null?void 0:c.types)!=null&&u.relative||H&&(f=(h=(p=t.seriesLabels)==null?void 0:p.labels)==null?void 0:h.types)!=null&&f.count)),S(w({},M&&{totalLabels:{enabled:M,rotation:(g=(m=t.seriesLabels)==null?void 0:m.rotation)!=null?g:0}}),{seriesLabels:{enabled:(v=(b=t.seriesLabels)==null?void 0:b.enabled)!=null?v:!1,rotation:(x=(y=t.seriesLabels)==null?void 0:y.rotation)!=null?x:0,showValue:R,showPercentage:!!(H&&(D=(k=(C=t.seriesLabels)==null?void 0:C.labels)==null?void 0:k.types)!=null&&D.percentage)}})}function Yg(e,t,n,r){return S(w(w(w({},un(t,n)),Fg(e,n,r)),Bg(t,n)),{lineWidth:n.lineWidth,markers:n.markers})}function qg(e,t,n){return w(w({},un(e,t)),jg(t,n))}function Ug(e,t,n){var r,i,a;return S(w(w({},un(e,t)),zg(t,n)),{markerSize:{scatterDefaultSize:(r=t.markerSize)==null?void 0:r.defaultSize,scatterBubbleMinSize:(i=t.markerSize)==null?void 0:i.min,scatterBubbleMaxSize:(a=t.markerSize)==null?void 0:a.max}})}function Vg(e){return{header:{color:{enabled:e["colors/headers"]}},rows:{alternatingColor:{enabled:e["colors/rows"]}},columns:{alternatingColor:{enabled:e["colors/columns"]}}}}function Qg(e,t){return S(w({},un(e,t)),{funnelSize:t.size,funnelType:t.type,funnelDirection:t.direction,labels:t.labels,legend:t.legend})}const Gg=(e,t)=>{const n=o.ZAe(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 $g(e,t,n){var r,i,a,l,s,d,c,u;const p=Gg(e,t),h=(r=o.oEe(n,"value")[0])==null?void 0:r.jaql.title,f=(i=o.oEe(n,"secondary")[0])==null?void 0:i.jaql.title;return S(w({},p),{indicatorComponents:{title:{shouldBeShown:((l=(a=t.components)==null?void 0:a.title)==null?void 0:l.enabled)||!1,text:h},secondaryTitle:{text:f||""},ticks:{shouldBeShown:((d=(s=t.components)==null?void 0:s.ticks)==null?void 0:d.enabled)||!1},labels:{shouldBeShown:((u=(c=t.components)==null?void 0:c.labels)==null?void 0:u.enabled)||!1}}})}function Zg(e){var t,n,r,i;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:(i=e["tooltip/value"])==null||i?"value":"contribution"}}}function Xg(e){var t;return{legend:{enabled:e["legend/enabled"],position:e["legend/position"]},tooltip:{mode:(t=e["tooltip/value"])==null||t?"value":"contribution"}}}function Kg(e,t,n){return w(w({},un(e,t)),Wg(t,n))}function Jg(e,t){return S(w({},un(e,t)),{markers:{fill:t.markers.fill,size:{defaultSize:t.markers.size.defaultSize,minSize:t.markers.size.min,maxSize:t.markers.size.max}}})}function eb(e){let t;switch(e){case"areamap/world":t="world";break;case"areamap/usa":t="usa";break;default:throw new o.Qn("errors.unsupportedWidgetType",{widgetSubtype:e})}return{mapType:t}}function tb(e){var t,n,r,i,a;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:(i=e.colors)==null?void 0:i.members,totalsColor:(a=e.colors)==null?void 0:a.totals}}function nb(e,t){var n,r,i;const{subtype:a,style:l,metadata:{panels:s}}=t;switch(e){case"chart/line":case"chart/area":case"chart/bar":case"chart/column":{const d=Yg(e,a,l,s);if(d.navigator){const c=(n=t.options)==null?void 0:n.previousScrollerLocation;d.navigator.scrollerLocation=Zl(c)?c:void 0}return d}case"chart/polar":return qg(a,l,s);case"chart/scatter":return Ug(a,l,s);case"chart/funnel":return Qg(a,l);case"treemap":return Zg(l);case"sunburst":return Xg(l);case"chart/pie":return un(a,l);case"tablewidget":case"tablewidgetagg":return Vg(l);case"pivot":case"pivot2":return tb(l);case"indicator":return $g(a,l,s);case"chart/boxplot":{const d=Kg(a,l,s);return d.navigator&&(d.navigator.scrollerLocation=Zl((r=t.options)==null?void 0:r.previousScrollerLocation)?(i=t.options)==null?void 0:i.previousScrollerLocation:void 0),d}case"map/scatter":return Jg(a,l);case"map/area":return eb(a);case"richtexteditor":return l.content;default:throw new o.Qn("errors.unsupportedWidgetType",{widgetType:e})}}const hd=e=>({backgroundColor:e.widgetBackgroundColor,spaceAround:o.ei[e.widgetSpacing],cornerRadius:o.ei[e.widgetCornerRadius],shadow:o.ei[e.widgetShadow],border:e.widgetBorderEnabled,borderColor:e.widgetBorderColor,header:{titleTextColor:e.widgetTitleColor,titleAlignment:o.ei[e.widgetTitleAlignment],dividerLine:e.widgetTitleDividerEnabled,dividerLineColor:e.widgetTitleDividerColor,backgroundColor:e.widgetTitleBackgroundColor}});function rb(e,t,n){if(!t||!n)return e;const r=hd(t);return w(w({},e),r)}function ob(e,t){return e&&e.length?o.mp(e,o.HD(t)):[]}function ib(e,t){var n;const r=(n=e==null?void 0:e.findIndex(i=>i===t))!=null?n:-1;return r===-1?[]:e.slice(r)}const fd=e=>e!=null&&e.parent?[...fd(e.parent),nn(e).column]:[],md=e=>{var t,n,r;if(e!=null&&e.parent&&e.through&&"filter"in e.through.jaql){const i=nn(e).column,{jaql:a,format:{mask:l}={}}=e.parent,s="level"in a&&a.level&&l&&l[a.level],d=(r=(n=(t=e.through.jaql.filter)==null?void 0:t.members)==null?void 0:n.map(s?c=>({categoryValue:c,categoryDisplayValue:o.a5(o.CT(c),s)}):c=>({categoryValue:c})))!=null?r:[];return[...md(e.parent),{nextDimension:i,points:d}]}return[]};function ab(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 lb=(e,t)=>{const n=ab(e).map(r=>o.oEe(t,r)).flat().filter(r=>{const i="agg"in r.jaql&&r.jaql.agg,a="formula"in r.jaql&&r.jaql.formula;return!i&&!a});return n.length===1?n[0]:void 0},gd="calendar",bd="calendar - weeks",sb=[o.Et.Years,o.Et.Quarters,o.Et.Months,o.Et.Days],cb=[o.Et.Years,o.Et.Weeks,o.Et.Days],db=[o.Et.Years,o.Et.Quarters,o.Et.Months,o.Et.Weeks,o.Et.Days],ub=e=>e.length===2?db:e[0]===gd?sb:e[0]===bd?cb:[],pb=(e,t)=>{const[n=[],r]=o.ka(e,a=>[gd,bd].includes(a)),i=ib(ub(n),t.granularity);return i.length?[{title:"Calendar Hierarchy",levels:i.map(a=>new o.Pc(`${a} in ${t.name}`,t.expression,a,o.Pc.getDefaultFormatForGranularity(a)))},...r]:r},hb=e=>{const t=e&&nn(e),n=(e==null?void 0:e.hierarchies)||[];return t&&o.Ol$1(t.column.type)?(t.column.name=(e==null?void 0:e.jaql).column,pb(n,t.column)):n},fb=(e,t,n=[],r)=>{const i=lb(e,t),a=i&&o.PSe(i),l=md(i),s=hb(a);return{drilldownPaths:[...ob([...i?fd(i):[]],({expression:d})=>d),...s],drilldownSelections:l}};function ha(e){const t=e.filter,{filter:n}=t,r=oe(t,["filter"]),i=n&&"turnedOff"in n&&n.turnedOff;let a,l;return i?l=n:a=n,r.members&&r.members.length===0&&(r.all=!0),{filter:r,backgroundFilter:a,turnOffMembersFilter:l}}function mb(e){const{filter:t,backgroundFilter:n,turnOffMembersFilter:r}=ha(e.jaql),i=[S(w({},e),{jaql:S(w({},e.jaql),{filter:w(w({},t),r&&{filter:r})})})];return n&&i.push(S(w({},e),{jaql:S(w({},e.jaql),{filter:n}),disabled:!1})),i}function gb(e){const t=e.find(r=>r.name==="filters"),n=[];return t==null||t.items.forEach(r=>{n.push(...mb(r).filter(({disabled:i})=>!i))}),n}function vd(e){return gb(e).map(t=>o.mG(t.jaql,t.instanceid))}function fa(e){if(o.SSe(e.widgetType))throw new xa("toExecuteQueryParams");let t,n,r,i;if(o.KAe(e.widgetType)){const{attributes:a,measures:l}=o.Xx(o.nx(e.dataOptions));t=a,n=l,r=o.GI*o.YI+1,i=!0}else{const{attributes:a,measures:l}=o.ox(e.dataOptions,e.chartType);t=a,n=l}return{dataSource:e.dataSource,dimensions:t,measures:n,filters:e.filters,highlights:e.highlights,count:r,ungroup:i}}function ma(e){if(!o.SSe(e.widgetType))throw new o.Qn("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toExecutePivotQueryParams"});const{rows:t,columns:n,values:r,grandTotals:i}=ed(o.hL(e.dataOptions));return{dataSource:e.dataSource,rows:t,columns:n,values:r,grandTotals:i,filters:e.filters,highlights:e.highlights}}function yd(e){if(o.SSe(e.widgetType))throw new xa("toChartProps");if(o._Se(e.widgetType))throw new Td("toChartProps");return o.KAe(e.widgetType)?w({chartType:e.chartType},ga(e)):{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function ga(e){if(!o.KAe(e.widgetType))throw new o.Qn("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters}}function wd(e){if(!o.SSe(e.widgetType))throw new o.Qn("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function ba(e){if(o.SSe(e.widgetType))throw new xa("toChartWidgetProps");if(o._Se(e.widgetType))throw new Td("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 xd(e){if(!o.KAe(e.widgetType))throw new o.Qn("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 va(e){if(!o.SSe(e.widgetType))throw new o.Qn("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 ya(e){if(!o._Se(e.widgetType))throw new o.Qn("errors.widgetModel.onlyTextWidgetSupported",{methodName:"toTextWidgetProps"});return{styleOptions:e.styleOptions}}function kd(e){if(!o.JAe(e.widgetType))throw new o.Qn("errors.widgetModel.onlyPluginWidgetSupported",{methodName:"toPluginWidgetProps"});return{pluginType:e.pluginType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function _d(e){const{widgetType:t}=e;return o.SSe(t)?w({widgetType:"pivot"},va(e)):o._Se(t)?w({widgetType:"text"},ya(e)):o.JAe(t)?w({widgetType:"plugin"},kd(e)):w({widgetType:"chart"},ba(e))}function wa(e){const{oid:t}=e;return S(w({},_d(e)),{id:t})}const vt=()=>{throw new o.Qn("errors.methodNotImplemented")},Sd={oid:"",title:"",dataSource:"",description:"",widgetType:"plugin",pluginType:"",dataOptions:{},styleOptions:{},drilldownOptions:{},filters:[],highlights:[],chartType:void 0,getExecuteQueryParams:vt,getExecutePivotQueryParams:vt,getChartProps:vt,getTableProps:vt,getPivotTableProps:vt,getPivotTableWidgetProps:vt,getChartWidgetProps:vt,getTableWidgetProps:vt,getTextWidgetProps:vt};function Cd(e){return S(w({},e),{getExecuteQueryParams:()=>fa(e),getExecutePivotQueryParams:()=>ma(e),getChartProps:()=>yd(e),getTableProps:()=>ga(e),getPivotTableProps:()=>wd(e),getChartWidgetProps:()=>ba(e),getTableWidgetProps:()=>xd(e),getPivotTableWidgetProps:()=>va(e),getTextWidgetProps:()=>ya(e)})}function mr(e,t,n){var r,i,a,l;let s,d,c,u;const p=Og(e.metadata.panels,e.datasource);if(s=e.type,o.qAe(s)){c=Hg(s,p,e.style,t==null?void 0:t.palette.variantColors),u=nb(s,e);const b=(l=(a=(i=n==null?void 0:n.serverFeatures)==null?void 0:i.widgetDesignStyle)==null?void 0:a.active)!=null?l:!0;u=rb(u,e.style.widgetDesign,b)}else{d=s,s="plugin",c=pd(p,(r=t==null?void 0:t.palette.variantColors)!=null?r:[]);const b=e.style,{widgetDesign:v}=b,y=oe(b,["widgetDesign"]);u=w(w({},y),v?hd(v):{})}const h=fb(s,p),f=vd(p),m=o.QAe(s)?o.YAe(s):void 0,g=S(w({},Sd),{oid:e.oid,title:e.title,dataSource:o.yAe(e.datasource),description:e.desc||"",widgetType:s,chartType:m,pluginType:d||"",dataOptions:c||{},styleOptions:u||{},drilldownOptions:h,filters:f});return Cd(g)}function Dd(e){const t=o.XAe(e.chartType),n=S(w(w({},Sd),e),{filters:e.filters||[],widgetType:t});return Cd(n)}function bb(e){if(o.YT(e))return Dd(e);throw new o.Qn("errors.otherWidgetTypesNotSupported")}function Md(e,t){const n=t||e.dataSource;if(typeof n=="string")throw new Kl("dataSource");if(!n.id||!n.live&&!n.address)throw new Kl("dataSource");const r=e.chartType;let i=e.widgetType,a={},l=e.styleOptions.subtype||"";if(!r)throw new Error("Chart type is required");const s=[];if(o.ZCe(r)){const c=["chart/line","chart/area"].includes(e.widgetType)?"x-axis":"categories",u=e.dataOptions.category.map(m=>bt(o.Sm(m))),p={name:c,items:u};s.push(p);const h=e.dataOptions.value.map(m=>bt(o.zT(m)));s.push({name:"values",items:h});const f=e.dataOptions.breakBy.map(m=>bt(o.Sm(m)));s.push({name:"break by",items:f}),r==="polar"?l="column/polar":r==="bar"?l=l||"bar/classic":r==="column"?l=l||"column/classic":r==="area"?l=l||"area/basic":r==="line"&&(l=l||"line/basic")}else if(o.HAe(r)){const{attributes:c,measures:u}=o.Xx(e.dataOptions),p=[...c.map(h=>bt(o.Sm(h))),...u.map(h=>bt(o.zT(h)))];s.push({name:"columns",items:p}),i="tablewidget"}else if(o.QCe(r))["value","min","max","secondary"].forEach(c=>{const u=(e.dataOptions[c]||[]).map(p=>bt(o.zT(p)));s.push({name:c,items:u})}),l=l||"indicator/numeric",a=S(w({},l==="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(o.qCe(r)){const c=e.dataOptions.category.map(h=>bt(o.WAe(h)));s.push({name:"categories",items:c});const u=e.dataOptions.value.map(h=>bt(o.WAe(h))),p=r==="treemap";s.push({name:p?"size":"values",items:u}),p&&["color","values"].forEach(h=>{s.push({name:h,items:[]})}),r==="pie"?(l=l||"pie/basic",a={convolution:{enabled:!0,selectedConvolutionType:"bySlicesCount",minimalIndependentSlicePercentage:3,independentSlicesCount:7}}):r==="treemap"||r==="sunburst"?l=l||r:r==="funnel"&&(l=l||"chart/funnel")}else if(o.KCe(r))["x","y","size","breakByColor","breakByPoint"].forEach(c=>{if(e.dataOptions[c]){const u={breakByColor:"Break By / Color",breakByPoint:"point",x:"x-axis",y:"y-axis"},p=[bt(o.WAe(e.dataOptions[c]))];s.push({name:u[c]||c,items:p})}}),l=l||"bubble/scatter";else throw new vb(r);const d=(e.filters||[]).map(c=>c.jaql());return s.push({name:"filters",items:d}),{oid:e.oid||"",title:e.title,desc:e.description,datasource:n,type:i,metadata:{panels:s},style:a,subtype:l}}class Kl extends o.Qn{constructor(t){super("errors.widgetModel.incomleteWidget",{prop:t})}}class vb extends o.Qn{constructor(t){super("errors.widgetModel.unsupportedWidgetTypeDto",{chartType:t})}}class xa extends o.Qn{constructor(t){super("errors.widgetModel.pivotWidgetNotSupported",{methodName:t})}}class Td extends o.Qn{constructor(t){super("errors.widgetModel.textWidgetNotSupported",{methodName:t})}}const yb=Object.freeze(Object.defineProperty({__proto__:null,fromChartWidgetProps:Dd,fromWidgetDto:mr,fromWidgetProps:bb,toChartProps:yd,toChartWidgetProps:ba,toCommonWidgetProps:_d,toExecutePivotQueryParams:ma,toExecuteQueryParams:fa,toPivotTableProps:wd,toPivotTableWidgetProps:va,toPluginWidgetProps:kd,toTableProps:ga,toTableWidgetProps:xd,toTextWidgetProps:ya,toWidgetDto:Md,toWidgetProps:wa},Symbol.toStringTag,{value:"Module"}));function ka(e){const{title:t,dataSource:n,widgets:r,layoutOptions:i,filters:a,widgetsOptions:l,tabbersOptions:s,styleOptions:d}=e;return{title:t,defaultDataSource:n,widgets:r.map(wa),layoutOptions:i,config:{},filters:a,widgetsOptions:l,styleOptions:d,tabbersOptions:s}}function _a(e,t,n){var r;const{oid:i,title:a,datasource:l,widgets:s,layout:d,filters:c,filterRelations:u,style:p}=e,h={title:l.title,type:l.live?"live":"elasticube"},f=w({},p!=null&&p.palette?{palette:{variantColors:p==null?void 0:p.palette.colors}}:null),m=t&&w(w({},t),f.palette?{palette:f.palette}:null),g=(s==null?void 0:s.map(k=>mr(k,m,n)))||[],b=d?ng(d):{columns:[]},v=(r=u==null?void 0:u[0])==null?void 0:r.filterRelations,y=ig(c||[],v),x=lg(s),C=sg(s);return{oid:i,title:a,dataSource:h,styleOptions:f,widgets:g,layoutOptions:{widgetsPanel:b},filters:y,widgetsOptions:x,tabbersOptions:C}}const wb=Object.freeze(Object.defineProperty({__proto__:null,fromDashboardDto:_a,toDashboardProps:ka},Symbol.toStringTag,{value:"Module"}));function xb(e){return o.H$(e)?kb(e):Sa(e)}function Sa(e){return o.sAe(e)?_b(e):o.cAe(e)?Sb(e):Ca(e)}function kb(e){return{isCascading:!0,instanceid:e.config.guid,disabled:e.config.disabled,levels:e.filters.map(t=>{const n=Sa(t);return S(w({},n.jaql),{instanceid:n.instanceid})})}}function Ca(e){const{config:{disabled:t}}=e,n=Object.assign(Object.create(e),{config:S(w({},e.config),{disabled:!1})}).jaql(!0);return{jaql:S(w({},n),{table:o.gG(e.attribute),column:o.vG(e.attribute)}),disabled:t,instanceid:e.config.guid,isCascading:!1}}function _b(e){const t=Ca(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&&zi(t.jaql,Sa(e.config.backgroundFilter).jaql.filter),e.config.deactivatedMembers.length>0&&zi(t.jaql,{exclude:{members:e.config.deactivatedMembers},turnedOff:!0}),t}function Sb(e){const t=Ca(e);if(e.measure instanceof o.Ac){const n=t.jaql.filter;n.by.table=o.gG(e.measure.attribute),n.by.column=o.vG(e.measure.attribute),n.rankingMessage=e.measure.name}return t}function zi(e,t){if(e.filter)return zi(e.filter,t);e.filter=t}var Cb=function(e){return e.DASHBOARD_INIT="DASHBOARD.INIT",e.DASHBOARD_UPDATE_LAYOUT="DASHBOARD.UPDATE_LAYOUT",e}({}),Ad=function(e){return e.FILTERS_UPDATE="FILTERS.UPDATE",e.ADD_WIDGET="WIDGETS.ADD",e}({});function Db(e,t){var n,r;switch(t.type){case"DASHBOARD.INIT":return w(w({},e),t.payload);case"FILTERS.UPDATE":return S(w({},e),{filters:t.payload});case"WIDGETS.ADD":{const i=[...e.widgets,t.payload],a=[...((r=(n=e==null?void 0:e.layoutOptions)==null?void 0:n.widgetsPanel)==null?void 0:r.columns)||[]];return a[0]&&(a[0].rows.length||a[0].rows.push({cells:[]}),a[0].rows[0].cells.push({widgetId:t.payload.oid,widthPercentage:100})),S(w(w({},e),e!=null&&e.layoutOptions.widgetsPanel?{layoutOptions:S(w({},e==null?void 0:e.layoutOptions),{widgetsPanel:S(w({},e==null?void 0:e.layoutOptions.widgetsPanel),{columns:a})})}:null),{widgets:i})}default:return e}}function Mb(e,t,n){return xe(this,null,function*(){if(!e)throw new Error("Dashboard model is not initialized");if(t.type==="FILTERS.UPDATE"){const{filters:r,relations:i}=o.Ei(t.payload),a=r.map(xb),l=o.rL(i,r),s=Tb(r);yield n.patchDashboard(e,{filters:a,filterRelations:l?[{datasource:s,filterRelations:l}]:void 0})}else if(t.type==="WIDGETS.ADD"){const r=yield n.addWidgetToDashboard(e,Md(t.payload));if(!r)throw new Error("Failed to add widget to dashboard");return{type:"WIDGETS.ADD",payload:mr(r)}}return t})}function Tb(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 Ab(e){return e.type===Np.FILTERS_UPDATE?{type:Ad.FILTERS_UPDATE,payload:e.payload}:null}function Eb(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}const Ed=o.FA("useDashboardModel")(Nb);function Nb({dashboardOid:e,includeWidgets:t,includeFilters:n,persist:r=!0}){const{restApi:i,isReady:a}=o.ZSe(),{app:l}=o.NT(),s=o.q(()=>!!(l!=null&&l.httpClient.auth)&&Eb(l.httpClient.auth.type,r),[l==null?void 0:l.httpClient.auth,r]),d=r&&s,[c,u]=o.y(Db,null),p=o.x(b=>xe(this,null,function*(){if(!a||!i)throw new o.aEe;return d&&(b=yield Mb(c==null?void 0:c.oid,b,i)),u(b)}),[d,c==null?void 0:c.oid,i,a,u]),{dashboard:h,isLoading:f,isError:m,error:g}=ld({dashboardOid:e,includeWidgets:t,includeFilters:n});return o._(()=>{h&&u({type:Cb.DASHBOARD_INIT,payload:h})},[h,u]),{dashboard:c,isLoading:f,isError:m,error:g,dispatchChanges:p}}/*! @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:Nd,setPrototypeOf:Jl,isFrozen:Lb,getPrototypeOf:Ib,getOwnPropertyDescriptor:Ob}=Object;let{freeze:je,seal:Xe,create:Ld}=Object,{apply:Wi,construct:Bi}=typeof Reflect<"u"&&Reflect;je||(je=function(e){return e});Xe||(Xe=function(e){return e});Wi||(Wi=function(e,t,n){return e.apply(t,n)});Bi||(Bi=function(e,t){return new e(...t)});const Lr=Ue(Array.prototype.forEach),es=Ue(Array.prototype.pop),Yn=Ue(Array.prototype.push),zr=Ue(String.prototype.toLowerCase),mi=Ue(String.prototype.toString),ts=Ue(String.prototype.match),qn=Ue(String.prototype.replace),Hb=Ue(String.prototype.indexOf),Rb=Ue(String.prototype.trim),Je=Ue(Object.prototype.hasOwnProperty),He=Ue(RegExp.prototype.test),Un=Pb(TypeError);function Ue(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Wi(e,t,r)}}function Pb(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bi(e,n)}}function X(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zr;Jl&&Jl(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const a=n(i);a!==i&&(Lb(t)||(t[r]=a),i=a)}e[i]=!0}return e}function Fb(e){for(let t=0;t<e.length;t++)Je(e,t)||(e[t]=null);return e}function $t(e){const t=Ld(null);for(const[n,r]of Nd(e))Je(e,n)&&(Array.isArray(r)?t[n]=Fb(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=$t(r):t[n]=r);return t}function Vn(e,t){for(;e!==null;){const r=Ob(e,t);if(r){if(r.get)return Ue(r.get);if(typeof r.value=="function")return Ue(r.value)}e=Ib(e)}function n(){return null}return n}const ns=je(["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"]),gi=je(["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"]),bi=je(["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"]),jb=je(["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"]),vi=je(["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"]),zb=je(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rs=je(["#text"]),os=je(["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"]),yi=je(["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"]),is=je(["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"]),Ir=je(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wb=Xe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Bb=Xe(/<%[\w\W]*|[\w\W]*%>/gm),Yb=Xe(/\${[\w\W]*}/gm),qb=Xe(/^data-[\-\w.\u00B7-\uFFFF]/),Ub=Xe(/^aria-[\-\w]+$/),Id=Xe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vb=Xe(/^(?:\w+script|data):/i),Qb=Xe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Od=Xe(/^html$/i),Gb=Xe(/^[a-z][.\w]*(-[.\w]+)+$/i);var as=Object.freeze({__proto__:null,MUSTACHE_EXPR:Wb,ERB_EXPR:Bb,TMPLIT_EXPR:Yb,DATA_ATTR:qb,ARIA_ATTR:Ub,IS_ALLOWED_URI:Id,IS_SCRIPT_OR_DATA:Vb,ATTR_WHITESPACE:Qb,DOCTYPE_NAME:Od,CUSTOM_ELEMENT:Gb});const Qn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$b=function(){return typeof window>"u"?null:window},Zb=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 i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Hd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$b();const t=_=>Hd(_);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==Qn.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:s,Element:d,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:h,trustedTypes:f}=e,m=d.prototype,g=Vn(m,"cloneNode"),b=Vn(m,"remove"),v=Vn(m,"nextSibling"),y=Vn(m,"childNodes"),x=Vn(m,"parentNode");if(typeof l=="function"){const _=n.createElement("template");_.content&&_.content.ownerDocument&&(n=_.content.ownerDocument)}let C,k="";const{implementation:D,createNodeIterator:M,createDocumentFragment:E,getElementsByTagName:H}=n,{importNode:R}=r;let O={};t.isSupported=typeof Nd=="function"&&typeof x=="function"&&D&&D.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:P,TMPLIT_EXPR:L,DATA_ATTR:N,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:j}=as;let{IS_ALLOWED_URI:U}=as,V=null;const ne=X({},[...ns,...gi,...bi,...vi,...rs]);let $=null;const Q=X({},[...os,...yi,...is,...Ir]);let G=Object.seal(Ld(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}})),he=null,ke=null,be=!0,ze=!0,Ce=!1,Ke=!0,Ge=!1,At=!0,Vt=!1,Jo=!1,ei=!1,mn=!1,Cr=!1,Dr=!1,vl=!0,yl=!1;const Vp="user-content-";let ti=!0,Wn=!1,gn={},bn=null;const wl=X({},["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 xl=null;const kl=X({},["audio","video","img","source","image","track"]);let ni=null;const _l=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Mr="http://www.w3.org/1998/Math/MathML",Tr="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml";let vn=ft,ri=!1,oi=null;const Qp=X({},[Mr,Tr,ft],mi);let Bn=null;const Gp=["application/xhtml+xml","text/html"],$p="text/html";let _e=null,yn=null;const Zp=n.createElement("form"),Sl=function(_){return _ instanceof RegExp||_ instanceof Function},ii=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(yn&&yn===_)){if((!_||typeof _!="object")&&(_={}),_=$t(_),Bn=Gp.indexOf(_.PARSER_MEDIA_TYPE)===-1?$p:_.PARSER_MEDIA_TYPE,_e=Bn==="application/xhtml+xml"?mi:zr,V=Je(_,"ALLOWED_TAGS")?X({},_.ALLOWED_TAGS,_e):ne,$=Je(_,"ALLOWED_ATTR")?X({},_.ALLOWED_ATTR,_e):Q,oi=Je(_,"ALLOWED_NAMESPACES")?X({},_.ALLOWED_NAMESPACES,mi):Qp,ni=Je(_,"ADD_URI_SAFE_ATTR")?X($t(_l),_.ADD_URI_SAFE_ATTR,_e):_l,xl=Je(_,"ADD_DATA_URI_TAGS")?X($t(kl),_.ADD_DATA_URI_TAGS,_e):kl,bn=Je(_,"FORBID_CONTENTS")?X({},_.FORBID_CONTENTS,_e):wl,he=Je(_,"FORBID_TAGS")?X({},_.FORBID_TAGS,_e):{},ke=Je(_,"FORBID_ATTR")?X({},_.FORBID_ATTR,_e):{},gn=Je(_,"USE_PROFILES")?_.USE_PROFILES:!1,be=_.ALLOW_ARIA_ATTR!==!1,ze=_.ALLOW_DATA_ATTR!==!1,Ce=_.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ge=_.SAFE_FOR_TEMPLATES||!1,At=_.SAFE_FOR_XML!==!1,Vt=_.WHOLE_DOCUMENT||!1,mn=_.RETURN_DOM||!1,Cr=_.RETURN_DOM_FRAGMENT||!1,Dr=_.RETURN_TRUSTED_TYPE||!1,ei=_.FORCE_BODY||!1,vl=_.SANITIZE_DOM!==!1,yl=_.SANITIZE_NAMED_PROPS||!1,ti=_.KEEP_CONTENT!==!1,Wn=_.IN_PLACE||!1,U=_.ALLOWED_URI_REGEXP||Id,vn=_.NAMESPACE||ft,G=_.CUSTOM_ELEMENT_HANDLING||{},_.CUSTOM_ELEMENT_HANDLING&&Sl(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=_.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_.CUSTOM_ELEMENT_HANDLING&&Sl(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=_.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ge&&(ze=!1),Cr&&(mn=!0),gn&&(V=X({},rs),$=[],gn.html===!0&&(X(V,ns),X($,os)),gn.svg===!0&&(X(V,gi),X($,yi),X($,Ir)),gn.svgFilters===!0&&(X(V,bi),X($,yi),X($,Ir)),gn.mathMl===!0&&(X(V,vi),X($,is),X($,Ir))),_.ADD_TAGS&&(V===ne&&(V=$t(V)),X(V,_.ADD_TAGS,_e)),_.ADD_ATTR&&($===Q&&($=$t($)),X($,_.ADD_ATTR,_e)),_.ADD_URI_SAFE_ATTR&&X(ni,_.ADD_URI_SAFE_ATTR,_e),_.FORBID_CONTENTS&&(bn===wl&&(bn=$t(bn)),X(bn,_.FORBID_CONTENTS,_e)),ti&&(V["#text"]=!0),Vt&&X(V,["html","head","body"]),V.table&&(X(V,["tbody"]),delete he.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=_.TRUSTED_TYPES_POLICY,k=C.createHTML("")}else C===void 0&&(C=Zb(f,i)),C!==null&&typeof k=="string"&&(k=C.createHTML(""));je&&je(_),yn=_}},Cl=X({},["mi","mo","mn","ms","mtext"]),Dl=X({},["foreignobject","annotation-xml"]),Xp=X({},["title","style","font","a","script"]),Ml=X({},[...gi,...bi,...jb]),Tl=X({},[...vi,...zb]),Kp=function(_){let q=x(_);(!q||!q.tagName)&&(q={namespaceURI:vn,tagName:"template"});const z=zr(_.tagName),ie=zr(q.tagName);return oi[_.namespaceURI]?_.namespaceURI===Tr?q.namespaceURI===ft?z==="svg":q.namespaceURI===Mr?z==="svg"&&(ie==="annotation-xml"||Cl[ie]):!!Ml[z]:_.namespaceURI===Mr?q.namespaceURI===ft?z==="math":q.namespaceURI===Tr?z==="math"&&Dl[ie]:!!Tl[z]:_.namespaceURI===ft?q.namespaceURI===Tr&&!Dl[ie]||q.namespaceURI===Mr&&!Cl[ie]?!1:!Tl[z]&&(Xp[z]||!Ml[z]):!!(Bn==="application/xhtml+xml"&&oi[_.namespaceURI]):!1},Qt=function(_){Yn(t.removed,{element:_});try{x(_).removeChild(_)}catch{b(_)}},Ar=function(_,q){try{Yn(t.removed,{attribute:q.getAttributeNode(_),from:q})}catch{Yn(t.removed,{attribute:null,from:q})}if(q.removeAttribute(_),_==="is"&&!$[_])if(mn||Cr)try{Qt(q)}catch{}else try{q.setAttribute(_,"")}catch{}},Al=function(_){let q=null,z=null;if(ei)_="<remove></remove>"+_;else{const me=ts(_,/^[\r\n\t ]+/);z=me&&me[0]}Bn==="application/xhtml+xml"&&vn===ft&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const ie=C?C.createHTML(_):_;if(vn===ft)try{q=new h().parseFromString(ie,Bn)}catch{}if(!q||!q.documentElement){q=D.createDocument(vn,"template",null);try{q.documentElement.innerHTML=ri?k:ie}catch{}}const De=q.body||q.documentElement;return _&&z&&De.insertBefore(n.createTextNode(z),De.childNodes[0]||null),vn===ft?H.call(q,Vt?"html":"body")[0]:Vt?q.documentElement:De},El=function(_){return M.call(_.ownerDocument||_,_,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Nl=function(_){return _ instanceof p&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof u)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},Ll=function(_){return typeof s=="function"&&_ instanceof s},mt=function(_,q,z){O[_]&&Lr(O[_],ie=>{ie.call(t,q,z,yn)})},Il=function(_){let q=null;if(mt("beforeSanitizeElements",_,null),Nl(_))return Qt(_),!0;const z=_e(_.nodeName);if(mt("uponSanitizeElement",_,{tagName:z,allowedTags:V}),_.hasChildNodes()&&!Ll(_.firstElementChild)&&He(/<[/\w]/g,_.innerHTML)&&He(/<[/\w]/g,_.textContent)||_.nodeType===Qn.progressingInstruction||At&&_.nodeType===Qn.comment&&He(/<[/\w]/g,_.data))return Qt(_),!0;if(!V[z]||he[z]){if(!he[z]&&Hl(z)&&(G.tagNameCheck instanceof RegExp&&He(G.tagNameCheck,z)||G.tagNameCheck instanceof Function&&G.tagNameCheck(z)))return!1;if(ti&&!bn[z]){const ie=x(_)||_.parentNode,De=y(_)||_.childNodes;if(De&&ie){const me=De.length;for(let gt=me-1;gt>=0;--gt){const $e=g(De[gt],!0);$e.__removalCount=(_.__removalCount||0)+1,ie.insertBefore($e,v(_))}}}return Qt(_),!0}return _ instanceof d&&!Kp(_)||(z==="noscript"||z==="noembed"||z==="noframes")&&He(/<\/no(script|embed|frames)/i,_.innerHTML)?(Qt(_),!0):(Ge&&_.nodeType===Qn.text&&(q=_.textContent,Lr([F,P,L],ie=>{q=qn(q,ie," ")}),_.textContent!==q&&(Yn(t.removed,{element:_.cloneNode()}),_.textContent=q)),mt("afterSanitizeElements",_,null),!1)},Ol=function(_,q,z){if(vl&&(q==="id"||q==="name")&&(z in n||z in Zp))return!1;if(!(ze&&!ke[q]&&He(N,q))&&!(be&&He(T,q))){if(!$[q]||ke[q]){if(!(Hl(_)&&(G.tagNameCheck instanceof RegExp&&He(G.tagNameCheck,_)||G.tagNameCheck instanceof Function&&G.tagNameCheck(_))&&(G.attributeNameCheck instanceof RegExp&&He(G.attributeNameCheck,q)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(q))||q==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&He(G.tagNameCheck,z)||G.tagNameCheck instanceof Function&&G.tagNameCheck(z))))return!1}else if(!ni[q]&&!He(U,qn(z,I,""))&&!((q==="src"||q==="xlink:href"||q==="href")&&_!=="script"&&Hb(z,"data:")===0&&xl[_])&&!(Ce&&!He(A,qn(z,I,"")))&&z)return!1}return!0},Hl=function(_){return _!=="annotation-xml"&&ts(_,j)},Rl=function(_){mt("beforeSanitizeAttributes",_,null);const{attributes:q}=_;if(!q)return;const z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};let ie=q.length;for(;ie--;){const De=q[ie],{name:me,namespaceURI:gt,value:$e}=De,nt=_e(me);let Oe=me==="value"?$e:Rb($e);if(z.attrName=nt,z.attrValue=Oe,z.keepAttr=!0,z.forceKeepAttr=void 0,mt("uponSanitizeAttribute",_,z),Oe=z.attrValue,At&&He(/((--!?|])>)|<\/(style|title)/i,Oe)){Ar(me,_);continue}if(z.forceKeepAttr||(Ar(me,_),!z.keepAttr))continue;if(!Ke&&He(/\/>/i,Oe)){Ar(me,_);continue}Ge&&Lr([F,P,L],Fl=>{Oe=qn(Oe,Fl," ")});const Pl=_e(_.nodeName);if(Ol(Pl,nt,Oe)){if(yl&&(nt==="id"||nt==="name")&&(Ar(me,_),Oe=Vp+Oe),C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!gt)switch(f.getAttributeType(Pl,nt)){case"TrustedHTML":{Oe=C.createHTML(Oe);break}case"TrustedScriptURL":{Oe=C.createScriptURL(Oe);break}}try{gt?_.setAttributeNS(gt,me,Oe):_.setAttribute(me,Oe),Nl(_)?Qt(_):es(t.removed)}catch{}}}mt("afterSanitizeAttributes",_,null)},Jp=function _(q){let z=null;const ie=El(q);for(mt("beforeSanitizeShadowDOM",q,null);z=ie.nextNode();)mt("uponSanitizeShadowNode",z,null),!Il(z)&&(z.content instanceof a&&_(z.content),Rl(z));mt("afterSanitizeShadowDOM",q,null)};return t.sanitize=function(_){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,ie=null,De=null,me=null;if(ri=!_,ri&&(_="<!-->"),typeof _!="string"&&!Ll(_))if(typeof _.toString=="function"){if(_=_.toString(),typeof _!="string")throw Un("dirty is not a string, aborting")}else throw Un("toString is not a function");if(!t.isSupported)return _;if(Jo||ii(q),t.removed=[],typeof _=="string"&&(Wn=!1),Wn){if(_.nodeName){const nt=_e(_.nodeName);if(!V[nt]||he[nt])throw Un("root node is forbidden and cannot be sanitized in-place")}}else if(_ instanceof s)z=Al("<!---->"),ie=z.ownerDocument.importNode(_,!0),ie.nodeType===Qn.element&&ie.nodeName==="BODY"||ie.nodeName==="HTML"?z=ie:z.appendChild(ie);else{if(!mn&&!Ge&&!Vt&&_.indexOf("<")===-1)return C&&Dr?C.createHTML(_):_;if(z=Al(_),!z)return mn?null:Dr?k:""}z&&ei&&Qt(z.firstChild);const gt=El(Wn?_:z);for(;De=gt.nextNode();)Il(De)||(De.content instanceof a&&Jp(De.content),Rl(De));if(Wn)return _;if(mn){if(Cr)for(me=E.call(z.ownerDocument);z.firstChild;)me.appendChild(z.firstChild);else me=z;return($.shadowroot||$.shadowrootmode)&&(me=R.call(r,me,!0)),me}let $e=Vt?z.outerHTML:z.innerHTML;return Vt&&V["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&He(Od,z.ownerDocument.doctype.name)&&($e="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
|
|
7
|
+
*/(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(o.rh,function(){var t,n,r="2.0.6",i={},a={},l={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:l.currentLocale,zeroFormat:l.zeroFormat,nullFormat:l.nullFormat,defaultFormat:l.defaultFormat,scalePercentBy100:l.scalePercentBy100};function d(c,u){this._input=c,this._value=u}return t=function(c){var u,p,h,f;if(t.isNumeral(c))u=c.value();else if(c===0||typeof c>"u")u=0;else if(c===null||n.isNaN(c))u=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)u=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)u=null;else{for(p in i)if(f=typeof i[p].regexps.unformat=="function"?i[p].regexps.unformat():i[p].regexps.unformat,f&&c.match(f)){h=i[p].unformat;break}h=h||t._.stringToNumber,u=h(c)}else u=Number(c)||null;return new d(c,u)},t.version=r,t.isNumeral=function(c){return c instanceof d},t._=n={numberToFormat:function(c,u,p){var h=a[t.options.currentLocale],f=!1,m=!1,g=0,b="",v=1e12,y=1e9,x=1e6,C=1e3,k="",D=!1,M,E,H,R,O,F,P;if(c=c||0,E=Math.abs(c),t._.includes(u,"(")?(f=!0,u=u.replace(/[\(|\)]/g,"")):(t._.includes(u,"+")||t._.includes(u,"-"))&&(O=t._.includes(u,"+")?u.indexOf("+"):c<0?u.indexOf("-"):-1,u=u.replace(/[\+|\-]/g,"")),t._.includes(u,"a")&&(M=u.match(/a(k|m|b|t)?/),M=M?M[1]:!1,t._.includes(u," a")&&(b=" "),u=u.replace(new RegExp(b+"a[kmbt]?"),""),E>=v&&!M||M==="t"?(b+=h.abbreviations.trillion,c=c/v):E<v&&E>=y&&!M||M==="b"?(b+=h.abbreviations.billion,c=c/y):E<y&&E>=x&&!M||M==="m"?(b+=h.abbreviations.million,c=c/x):(E<x&&E>=C&&!M||M==="k")&&(b+=h.abbreviations.thousand,c=c/C)),t._.includes(u,"[.]")&&(m=!0,u=u.replace("[.]",".")),H=c.toString().split(".")[0],R=u.split(".")[1],F=u.indexOf(","),g=(u.split(".")[0].split(",")[0].match(/0/g)||[]).length,R?(t._.includes(R,"[")?(R=R.replace("]",""),R=R.split("["),k=t._.toFixed(c,R[0].length+R[1].length,p,R[1].length)):k=t._.toFixed(c,R.length,p),H=k.split(".")[0],t._.includes(k,".")?k=h.delimiters.decimal+k.split(".")[1]:k="",m&&Number(k.slice(1))===0&&(k="")):H=t._.toFixed(c,0,p),b&&!M&&Number(H)>=1e3&&b!==h.abbreviations.trillion)switch(H=String(Number(H)/1e3),b){case h.abbreviations.thousand:b=h.abbreviations.million;break;case h.abbreviations.million:b=h.abbreviations.billion;break;case h.abbreviations.billion:b=h.abbreviations.trillion;break}if(t._.includes(H,"-")&&(H=H.slice(1),D=!0),H.length<g)for(var L=g-H.length;L>0;L--)H="0"+H;return F>-1&&(H=H.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+h.delimiters.thousands)),u.indexOf(".")===0&&(H=""),P=H+k+(b||""),f?P=(f&&D?"(":"")+P+(f&&D?")":""):O>=0?P=O===0?(D?"-":"+")+P:P+(D?"-":"+"):D&&(P="-"+P),P},stringToNumber:function(c){var u=a[s.currentLocale],p=c,h={thousand:3,million:6,billion:9,trillion:12},f,m,g;if(s.zeroFormat&&c===s.zeroFormat)m=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)m=null;else{m=1,u.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(u.delimiters.decimal,"."));for(f in h)if(g=new RegExp("[^a-zA-Z]"+u.abbreviations[f]+"(?:\\)|(\\"+u.currency.symbol+")?(?:\\))?)?$"),p.match(g)){m*=Math.pow(10,h[f]);break}m*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),m*=Number(c)}return m},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,u){return c.indexOf(u)!==-1},insert:function(c,u,p){return c.slice(0,p)+u+c.slice(p)},reduce:function(c,u){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof u!="function")throw new TypeError(u+" is not a function");var p=Object(c),h=p.length>>>0,f=0,m;if(arguments.length===3)m=arguments[2];else{for(;f<h&&!(f in p);)f++;if(f>=h)throw new TypeError("Reduce of empty array with no initial value");m=p[f++]}for(;f<h;f++)f in p&&(m=u(m,p[f],f,p));return m},multiplier:function(c){var u=c.toString().split(".");return u.length<2?1:Math.pow(10,u[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(u,p){var h=n.multiplier(p);return u>h?u:h},1)},toFixed:function(c,u,p,h){var f=c.toString().split("."),m=u-(h||0),g,b,v,y;return f.length===2?g=Math.min(Math.max(f[1].length,m),u):g=m,v=Math.pow(10,g),y=(p(c+"e+"+g)/v).toFixed(g),h>u-g&&(b=new RegExp("\\.?0{1,"+(h-(u-g))+"}$"),y=y.replace(b,"")),y}},t.options=s,t.formats=i,t.locales=a,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return a[s.currentLocale];if(c=c.toLowerCase(),!a[c])throw new Error("Unknown locale : "+c);return a[c]},t.reset=function(){for(var c in l)s[c]=l[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,u,p){if(u=u.toLowerCase(),this[c+"s"][u])throw new TypeError(u+" "+c+" already registered.");return this[c+"s"][u]=p,p},t.validate=function(c,u){var p,h,f,m,g,b,v,y;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{v=t.localeData(u)}catch{v=t.localeData(t.locale())}return f=v.currency.symbol,g=v.abbreviations,p=v.delimiters.decimal,v.delimiters.thousands==="."?h="\\.":h=v.delimiters.thousands,y=c.match(/^[^\d]+/),y!==null&&(c=c.substr(1),y[0]!==f)||(y=c.match(/[^\d]+$/),y!==null&&(c=c.slice(0,-1),y[0]!==g.thousand&&y[0]!==g.million&&y[0]!==g.billion&&y[0]!==g.trillion))?!1:(b=new RegExp(h+"{2}"),c.match(/[^\d.,]/g)?!1:(m=c.split(p),m.length>2?!1:m.length<2?!!m[0].match(/^\d+.*\d$/)&&!m[0].match(b):m[0].length===1?!!m[0].match(/^\d+$/)&&!m[0].match(b)&&!!m[1].match(/^\d+$/):!!m[0].match(/^\d+.*\d$/)&&!m[0].match(b)&&!!m[1].match(/^\d+$/)))},t.fn=d.prototype={clone:function(){return t(this)},format:function(c,u){var p=this._value,h=c||s.defaultFormat,f,m,g;if(u=u||Math.round,p===0&&s.zeroFormat!==null)m=s.zeroFormat;else if(p===null&&s.nullFormat!==null)m=s.nullFormat;else{for(f in i)if(h.match(i[f].regexps.format)){g=i[f].format;break}g=g||t._.numberToFormat,m=g(p,h,u)}return m},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var u=n.correctionFactor.call(null,this._value,c);function p(h,f,m,g){return h+Math.round(u*f)}return this._value=n.reduce([this._value,c],p,0)/u,this},subtract:function(c){var u=n.correctionFactor.call(null,this._value,c);function p(h,f,m,g){return h-Math.round(u*f)}return this._value=n.reduce([c],p,Math.round(this._value*u))/u,this},multiply:function(c){function u(p,h,f,m){var g=n.correctionFactor(p,h);return Math.round(p*g)*Math.round(h*g)/Math.round(g*g)}return this._value=n.reduce([this._value,c],u,1),this},divide:function(c){function u(p,h,f,m){var g=n.correctionFactor(p,h);return Math.round(p*g)/Math.round(h*g)}return this._value=n.reduce([this._value,c],u),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 u=c%10;return~~(c%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,u,p){var h=t._.includes(u," BPS")?" ":"",f;return c=c*1e4,u=u.replace(/\s?BPS/,""),f=t._.numberToFormat(c,u,p),t._.includes(f,")")?(f=f.split(""),f.splice(-1,0,h+"BPS"),f=f.join("")):f=f+h+"BPS",f},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"]},u={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},p=c.suffixes.concat(u.suffixes.filter(function(f){return c.suffixes.indexOf(f)<0})),h=p.join("|");h="("+h.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(h)},format:function(f,m,g){var b,v=t._.includes(m,"ib")?u:c,y=t._.includes(m," b")||t._.includes(m," ib")?" ":"",x,C,k;for(m=m.replace(/\s?i?b/,""),x=0;x<=v.suffixes.length;x++)if(C=Math.pow(v.base,x),k=Math.pow(v.base,x+1),f===null||f===0||f>=C&&f<k){y+=v.suffixes[x],C>0&&(f=f/C);break}return b=t._.numberToFormat(f,m,g),b+y},unformat:function(f){var m=t._.stringToNumber(f),g,b;if(m){for(g=c.suffixes.length-1;g>=0;g--){if(t._.includes(f,c.suffixes[g])){b=Math.pow(c.base,g);break}if(t._.includes(f,u.suffixes[g])){b=Math.pow(u.base,g);break}}m*=b||1}return m}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,u,p){var h=t.locales[t.options.currentLocale],f={before:u.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:u.match(/([\+|\-|\)|\s|\$]*)$/)[0]},m,g,b;for(u=u.replace(/\s?\$\s?/,""),m=t._.numberToFormat(c,u,p),c>=0?(f.before=f.before.replace(/[\-\(]/,""),f.after=f.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(f.before,"-")&&!t._.includes(f.before,"(")&&(f.before="-"+f.before),b=0;b<f.before.length;b++)switch(g=f.before[b],g){case"$":m=t._.insert(m,h.currency.symbol,b);break;case" ":m=t._.insert(m," ",b+h.currency.symbol.length-1);break}for(b=f.after.length-1;b>=0;b--)switch(g=f.after[b],g){case"$":m=b===f.after.length-1?m+h.currency.symbol:t._.insert(m,h.currency.symbol,-(f.after.length-(1+b)));break;case" ":m=b===f.after.length-1?m+" ":t._.insert(m," ",-(f.after.length-(1+b)+h.currency.symbol.length-1));break}return m}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,u,p){var h,f=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",m=f.split("e");return u=u.replace(/e[\+|\-]{1}0/,""),h=t._.numberToFormat(Number(m[0]),u,p),h+"e"+m[1]},unformat:function(c){var u=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),p=Number(u[0]),h=Number(u[1]);h=t._.includes(c,"e-")?h*=-1:h;function f(m,g,b,v){var y=t._.correctionFactor(m,g),x=m*y*(g*y)/(y*y);return x}return t._.reduce([p,Math.pow(10,h)],f,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,u,p){var h=t.locales[t.options.currentLocale],f,m=t._.includes(u," o")?" ":"";return u=u.replace(/\s?o/,""),m+=h.ordinal(c),f=t._.numberToFormat(c,u,p),f+m}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,u,p){var h=t._.includes(u," %")?" ":"",f;return t.options.scalePercentBy100&&(c=c*100),u=u.replace(/\s?\%/,""),f=t._.numberToFormat(c,u,p),t._.includes(f,")")?(f=f.split(""),f.splice(-1,0,h+"%"),f=f.join("")):f=f+h+"%",f},unformat:function(c){var u=t._.stringToNumber(c);return t.options.scalePercentBy100?u*.01:u}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,u,p){var h=Math.floor(c/60/60),f=Math.floor((c-h*60*60)/60),m=Math.round(c-h*60*60-f*60);return h+":"+(f<10?"0"+f:f)+":"+(m<10?"0"+m:m)},unformat:function(c){var u=c.split(":"),p=0;return u.length===3?(p=p+Number(u[0])*60*60,p=p+Number(u[1])*60,p=p+Number(u[2])):u.length===2&&(p=p+Number(u[0])*60,p=p+Number(u[1])),Number(p)}})}(),t})})(Vc);var Hf=Vc.exports;const Rf=o.Bl(Hf),Pf=(e,t)=>{const n=zf(e);return Ff(n,t)};function Ff(e,t){return{columns:t==null?void 0:t.map(n=>({name:n.name,type:o.mW(n.type)})),rows:jf(e)}}function jf(e){var t;let n=!1;const r=(t=e[0])===null||t===void 0?void 0:t.map((i,a)=>{const l=e.some(s=>"selected"in s[a]);return l&&(n=!0),l});return e.map(i=>{const a=n?r.some((l,s)=>l&&!i[s].selected):void 0;return i.map(l=>a!==void 0?{data:l.data,text:l.text,blur:a}:{data:l.data,text:l.text})})}function zf({values:e=[],metadata:t=[]}){var n,r,i,a;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let l=0;l<e.length;l++){const s=e[l];for(let d=0;d<s.length;d++)t[d].format&&!((r=(n=t[d])===null||n===void 0?void 0:n.format)===null||r===void 0)&&r.number&&(s[d].text=Rf(s[d].data).format((a=(i=t[d])===null||i===void 0?void 0:i.format)===null||a===void 0?void 0:a.number))}return e}var Gt=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};class Wf extends Be.AbstractTaskManager{constructor(t,n){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new Be.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Gt(this,void 0,void 0,function*(){})),new Be.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new Be.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Gt(this,void 0,void 0,function*(){})),new Be.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new Be.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>Gt(this,void 0,void 0,function*(){})),new Be.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotClient=n}prepareJaqlPayload(t){return Gt(this,void 0,void 0,function*(){const{queryDescription:n,executionConfig:r}=t.passport,i=o.NG(n,r.shouldSkipHighlightsWithoutAttributes),a=t.passport.executionConfig.onBeforeQuery;return a?a(i):i})}sendJaqlQuery(t,n){return Gt(this,void 0,void 0,function*(){const{queryDescription:r,taskId:i}=t.passport,{responsePromise:a,abortHttpRequest:l}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,n);this.sentRequestsAbortersMap.set(i,l);const s=yield a.finally(()=>{this.sentRequestsAbortersMap.delete(i)});Bf(s);const d=[...r.attributes,...r.measures],c=(s.headers||[]).slice(d.length).map(u=>({name:u,type:"number"}));return Pf(s,[...d,...c])})}sendCsvQuery(t,n){return Gt(this,void 0,void 0,function*(){const{taskId:r}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,n);return this.sentRequestsAbortersMap.set(r,a),i.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 Gt(this,void 0,void 0,function*(){const{pivotQueryDescription:n,executionConfig:r}=t.passport,i=o.wAe(n,r.shouldSkipHighlightsWithoutAttributes),a=t.passport.executionConfig.onBeforeQuery;return a?a(i):i})}sendPivotJaqlQuery(t,n){var r;const{pivotQueryDescription:i}=t.passport;return this.pivotClient.queryData(n,!0,(r=i.count)!==null&&r!==void 0?r:qf,!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 Bf(e){var t;if(!e)throw new Ie("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 Bl extends Be.TaskPassport{constructor(t,n,r){super(),this.queryDescription=n,this.type=t,this.executionConfig=r}}class Yf extends Be.TaskPassport{constructor(t,n,r){super(),this.pivotQueryDescription=n,this.type=t,this.executionConfig=r}}var Yl=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(u){try{c(r.next(u))}catch(p){l(p)}}function d(u){try{c(r.throw(u))}catch(p){l(p)}}function c(u){u.done?a(u.value):i(u.value).then(s,d)}c((r=r.apply(e,t||[])).next())})};const qf=2e4,hi="Unspecified reason";class Uf{constructor(t,n=new o.MAe(t.url,t.auth),r){Qf(t),this.queryApi=new Nf(t),this.taskManager=new Wf(this.queryApi,n),this.shouldSkipHighlightsWithoutAttributes=r??!1}executeQuery(t,n){const r=new Bl("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{ql(t),this.taskManager.executeQuerySending(r).then(l=>{l.status===Be.ExecutionResultStatus.SUCCESS?i(l.result):a(l.error)})}),cancel:i=>this.taskManager.cancel(r.taskId,i||hi)}}executeCsvQuery(t,n){const r=new Bl("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{ql(t),this.taskManager.executeDownloadCsvSending(r).then(l=>{l.status===Be.ExecutionResultStatus.SUCCESS?i(l.result):a(l.error)})}),cancel:i=>this.taskManager.cancel(r.taskId,i||hi)}}executePivotQuery(t,n){const r=new Yf("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((i,a)=>{Vf(t),this.taskManager.executePivotQuerySending(r).then(l=>{l.status===Be.ExecutionResultStatus.SUCCESS?i(l.result):a(l.error)})}),cancel:i=>this.taskManager.cancel(r.taskId,i||hi)}}getDataSourceFields(t,n=9999,r=0){return Yl(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceFields(t,n,r))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return Yl(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function ql(e){const{attributes:t,measures:n,filters:r,highlights:i,count:a,offset:l}=e;if(a&&a<0)throw new Ie("errors.invalidCountNegative",{count:a.toString()});if(l&&l<0)throw new Ie("errors.invalidOffset",{offset:l.toString()});if(t.length+n.length===0)throw new Ie("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!o.Ni.isAttribute(s)){const{name:d}=s;throw new Ie("errors.invalidAttribute",{attributeName:d})}}),n.forEach(s=>{if(!s.skipValidation&&!o.Ni.isMeasure(s))throw new Ie("errors.invalidMeasure",{measureName:s.name})}),r.forEach(s=>{if(!s.skipValidation&&!o.Ni.isFilter(s))throw new Ie("errors.invalidFilter",{filterName:s.name})}),i.forEach(s=>{if(!s.skipValidation&&!o.Ni.isFilter(s))throw new Ie("errors.invalidHighlight",{highlightName:s.name})})}function Vf(e){const{rowsAttributes:t,columnsAttributes:n,measures:r,filters:i,highlights:a,count:l,offset:s}=e;if(l&&l<0)throw new Ie("errors.invalidCountNegative",{count:l.toString()});if(s&&s<0)throw new Ie("errors.invalidOffset",{offset:s.toString()});if(t.length+n.length+r.length===0)throw new Ie("errors.noDimensionsOrMeasures");i.forEach(d=>{if(!d.skipValidation&&!o.Ni.isFilter(d))throw new Ie("errors.invalidFilter",{filterName:d.name})}),a.forEach(d=>{if(!d.skipValidation&&!o.Ni.isFilter(d))throw new Ie("errors.invalidHighlight",{highlightName:d.name})})}function Qf(e){if(!e)throw new Ie("errors.missingHttpClient");if(!e.post)throw new Ie("errors.missingPostMethod")}const Gf={enabled:!0,delay:500},$f={locale:o.u0e(),dateConfig:o.Ixe,loadingIndicatorConfig:Gf,translationConfig:{language:"en",customTranslations:[]},language:"en",queryCacheConfig:{enabled:!1},queryLimit:o.AAe,tabberConfig:{enabled:!1},accessibilityConfig:{enabled:!1},errorBoundaryConfig:{alwaysShowErrorText:!1},trackingConfig:{enabled:!0}};function Zf(e,t,n){return xe(this,null,function*(){var r;const i=yield Kf(t,n);return o.Jr.withOptions({mergeArrays:!1},$f,{locale:o.u0e((r=e==null?void 0:e.translationConfig)==null?void 0:r.language)},i,e)})}function Xf(e){const t={};return e.forEach(n=>{t[n.key]=n}),t}function Kf(e,t=!1){return xe(this,null,function*(){var n,r;const i=yield e.get("api/globals");if(!i)throw new o.Qn("errors.serverSettingsNotLoaded");const a=t?{colors:o.Fxe().palette.variantColors}:yield o.Jv(o.Kv(i.designSettings),e);return{serverThemeSettings:o.Yv(i.designSettings,a,e.url),serverLanguage:i.language,serverVersion:i.version,serverFeatures:Xf(i.features),user:{tenant:{name:((r=(n=i.user)==null?void 0:n.tenant)==null?void 0:r.name)||o.EAe}}}})}function Jf(e,t){return t===o.EAe?e:e.replace(`/${t}`,"")}function em(){window.addEventListener("unhandledrejection",e=>{e.reason instanceof Error?console.error(e.reason.message):console.error(e.reason)})}const Qc=e=>xe(void 0,[e],function*({defaultDataSource:t,url:n,token:r,wat:i,ssoEnabled:a,appConfig:l,enableSilentPreAuth:s,useFusionAuth:d}){if(n===void 0)throw new o.Qn("errors.sisenseContextNoAuthentication");const c=Pn(n),u=Eh({url:c,token:r,wat:i,ssoEnabled:a,enableSilentPreAuth:s,useFusionAuth:d});if(!u)throw new o.Qn("errors.sisenseContextNoAuthentication");em();const p=new Lh(c,u,"sdk-ui-1.35.0"),h=yield p.login(),f=Oc(u)||!h,m=yield Zf(l||{},p,f),g=new o.MAe(Jf(c,m.user.tenant.name),u),b=new Uf(p,g);return{httpClient:p,pivotClient:g,queryClient:b,settings:m,defaultDataSource:t,queryCache:{clear:o.RAe}}}),Ul=e=>e,tm=()=>{let e=Ul;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ul}}},nm=tm(),rm={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function om(e,t,n="Mui"){const r=rm[t];return r?`${n}-${r}`:`${nm.generate(e)}-${t}`}const im=["ownerState"],am=["variants"],lm=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function sm(e){return Object.keys(e).length===0}function cm(e){return typeof e=="string"&&e.charCodeAt(0)>96}function fi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const dm=o.Ol(),Vl=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Nr({defaultTheme:e,theme:t,themeId:n}){return sm(t)?e:t[n]||t}function um(e){return e?(t,n)=>n[e]:null}function jr(e,t){let{ownerState:n}=t,r=o.se(t,im);const i=typeof e=="function"?e(o.hy({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(a=>jr(a,o.hy({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:a=[]}=i;let l=o.se(i,am);return a.forEach(s=>{let d=!0;typeof s.props=="function"?d=s.props(o.hy({ownerState:n},r,n)):Object.keys(s.props).forEach(c=>{(n==null?void 0:n[c])!==s.props[c]&&r[c]!==s.props[c]&&(d=!1)}),d&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style(o.hy({ownerState:n},r,n)):s.style))}),l}return i}function pm(e={}){const{themeId:t,defaultTheme:n=dm,rootShouldForwardProp:r=fi,slotShouldForwardProp:i=fi}=e,a=l=>o.ia(o.hy({},l,{theme:Nr(o.hy({},l,{defaultTheme:n,themeId:t}))}));return a.__mui_systemSx=!0,(l,s={})=>{o.L1(l,k=>k.filter(D=>!(D!=null&&D.__mui_systemSx)));const{name:d,slot:c,skipVariantsResolver:u,skipSx:p,overridesResolver:h=um(Vl(c))}=s,f=o.se(s,lm),m=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,g=p||!1;let b;process.env.NODE_ENV!=="production"&&d&&(b=`${d}-${Vl(c||"Root")}`);let v=fi;c==="Root"||c==="root"?v=r:c?v=i:cm(l)&&(v=void 0);const y=o.$1(l,o.hy({shouldForwardProp:v,label:b},f)),x=k=>typeof k=="function"&&k.__emotion_real!==k||o.cr(k)?D=>jr(k,o.hy({},D,{theme:Nr({theme:D.theme,defaultTheme:n,themeId:t})})):k,C=(k,...D)=>{let M=x(k);const E=D?D.map(x):[];d&&h&&E.push(O=>{const F=Nr(o.hy({},O,{defaultTheme:n,themeId:t}));if(!F.components||!F.components[d]||!F.components[d].styleOverrides)return null;const P=F.components[d].styleOverrides,L={};return Object.entries(P).forEach(([N,T])=>{L[N]=jr(T,o.hy({},O,{theme:F}))}),h(O,L)}),d&&!m&&E.push(O=>{var F;const P=Nr(o.hy({},O,{defaultTheme:n,themeId:t})),L=P==null||(F=P.components)==null||(F=F[d])==null?void 0:F.variants;return jr({variants:L},o.hy({},O,{theme:P}))}),g||E.push(a);const H=E.length-D.length;if(Array.isArray(k)&&H>0){const O=new Array(H).fill("");M=[...k,...O],M.raw=[...k.raw,...O]}const R=y(M,...E);if(process.env.NODE_ENV!=="production"){let O;d&&(O=`${d}${o.El(c||"")}`),O===void 0&&(O=`Styled(${o.U1(l)})`),R.displayName=O}return l.muiName&&(R.muiName=l.muiName),R};return y.withConfig&&(C.withConfig=y.withConfig),C}}const hm=pm();function fm(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:o.Os(t.components[n].defaultProps,r)}function mm({props:e,name:t,defaultTheme:n,themeId:r}){let i=o.T2(n);return r&&(i=i[r]||i),fm({theme:i,name:t,props:e})}function gm(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((a,l)=>{if(l){const s=t(l);s!==""&&a.push(s),n&&n[l]&&a.push(n[l])}return a},[]).join(" ")}),r}const bm=["component","direction","spacing","divider","children","className","useFlexGap"],vm=o.Ol(),ym=hm("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function wm(e){return mm({props:e,name:"MuiStack",defaultTheme:vm})}function xm(e,t){const n=o.N.toArray(e).filter(Boolean);return n.reduce((r,i,a)=>(r.push(i),a<n.length-1&&r.push(o.hn(t,{key:`separator-${a}`})),r),[])}const km=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],_m=({ownerState:e,theme:t})=>{let n=o.hy({display:"flex",flexDirection:"column"},o.Xt({theme:t},o.dL({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=o.p0(t),i=Object.keys(t.breakpoints.values).reduce((s,d)=>((typeof e.spacing=="object"&&e.spacing[d]!=null||typeof e.direction=="object"&&e.direction[d]!=null)&&(s[d]=!0),s),{}),a=o.dL({values:e.direction,base:i}),l=o.dL({values:e.spacing,base:i});typeof a=="object"&&Object.keys(a).forEach((s,d,c)=>{if(!a[s]){const u=d>0?a[c[d-1]]:"column";a[s]=u}}),n=o.fn(n,o.Xt({theme:t},l,(s,d)=>e.useFlexGap?{gap:o.Po(r,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${km(d?a[d]:e.direction)}`]:o.Po(r,s)}}))}return n=o.uL(t.breakpoints,n),n};function Sm(e={}){const{createStyledComponent:t=ym,useThemeProps:n=wm,componentName:r="MuiStack"}=e,i=()=>gm({root:["root"]},s=>om(r,s),{}),a=t(_m),l=o.k(function(s,d){const c=n(s),u=o.v0(c),{component:p="div",direction:h="column",spacing:f=0,divider:m,children:g,className:b,useFlexGap:v=!1}=u,y=o.se(u,bm),x={direction:h,spacing:f,useFlexGap:v},C=i();return o.u(a,o.hy({as:p,ownerState:x,ref:d,className:o.ce(C.root,b)},y,{children:m?xm(g,m):g}))});return process.env.NODE_ENV!=="production"&&(l.propTypes={children:o.d.node,direction:o.d.oneOfType([o.d.oneOf(["column-reverse","column","row-reverse","row"]),o.d.arrayOf(o.d.oneOf(["column-reverse","column","row-reverse","row"])),o.d.object]),divider:o.d.node,spacing:o.d.oneOfType([o.d.arrayOf(o.d.oneOfType([o.d.number,o.d.string])),o.d.number,o.d.object,o.d.string]),sx:o.d.oneOfType([o.d.arrayOf(o.d.oneOfType([o.d.func,o.d.object,o.d.bool])),o.d.func,o.d.object])}),l}function Gc(e,t){var n,r;return o.fn$1(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const Cm=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Dm=e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:a}=e;return o.He({root:["root",n&&"inset",a&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},o.fL$1,t)},Mm=o.de("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${o.$u.primary}`]:t.primary},{[`& .${o.$u.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>o.hy({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),$c=o.k(function(e,t){const n=o.Le({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:a=!1,inset:l=!1,primary:s,primaryTypographyProps:d,secondary:c,secondaryTypographyProps:u}=n,p=o.se(n,Cm),{dense:h}=o.P(o.Mi);let f=s??r,m=c;const g=o.hy({},n,{disableTypography:a,inset:l,primary:!!f,secondary:!!m,dense:h}),b=Dm(g);return f!=null&&f.type!==o.Ct&&!a&&(f=o.u(o.Ct,o.hy({variant:h?"body2":"body1",className:b.primary,component:d!=null&&d.variant?void 0:"span",display:"block"},d,{children:f}))),m!=null&&m.type!==o.Ct&&!a&&(m=o.u(o.Ct,o.hy({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},u,{children:m}))),o.u(Mm,o.hy({className:o.ce(b.root,i),ownerState:g,ref:t},p,{children:[f,m]}))});process.env.NODE_ENV!=="production"&&($c.propTypes={children:o.d.node,classes:o.d.object,className:o.d.string,disableTypography:o.d.bool,inset:o.d.bool,primary:o.d.node,primaryTypographyProps:o.d.object,secondary:o.d.node,secondaryTypographyProps:o.d.object,sx:o.d.oneOfType([o.d.arrayOf(o.d.oneOfType([o.d.func,o.d.object,o.d.bool])),o.d.func,o.d.object])});const Jt=(e,t)=>`${t}px solid ${e}`,Zc=e=>({columns:[{widthPercentage:100,rows:e.map(t=>({cells:[{widthPercentage:100,widgetId:t.id}]}))}]});function Xc(e){return o.PA(e)?{direction:e}:e}function Ql(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function Tm({type:e,settings:t,sortDetails:n},r){return e==="simple"?n.field>=(r.rows||[]).length?[{rowIndex:0,sort:{direction:o.xAe(t[0].direction),by:Ql(n,r)}}]:[{rowIndex:n.field,sort:{direction:o.xAe(t[0].direction)}}]:t.reduce((i,a,l)=>{var s;const d=(s=r.rows)==null?void 0:s[l],c=(d==null?void 0:d.sortType)&&Xc(d==null?void 0:d.sortType),u={direction:o.xAe(a.direction),by:Ql(n,r)};return!a.selected&&o.N$(c==null?void 0:c.by,u.by)&&i.push({rowIndex:l,sort:null}),a.selected&&i.push({rowIndex:l,sort:u}),i},[])}function Am(e){const{jaql:t,pivotBuilder:n,isForceReload:r}=e,[i,a]=o.p({isLoading:!1,isNoResults:!1}),l=o.sg(t);o._(()=>{t&&(l||r)&&n.updateJaql(t)},[r,l,t,n]);const s=o.x(()=>{a({isLoading:!0,isNoResults:!1})},[]),d=o.x(c=>{a({isLoading:!1,isNoResults:!c.cellsMetadata})},[]);return o._(()=>{const c=[{event:o.fL,handler:s},{event:o.mL$1,handler:d}];return c.forEach(({event:u,handler:p})=>{n.on(u,p)}),()=>{c.forEach(({event:u,handler:p})=>{n.off(u,p)})}},[n,s,d]),i}function Em(e){const{pivotClient:t,pivotBuilder:n,shouldBeRecreated:r}=e,[i,a]=o.p(()=>t.prepareDataService());return o._(()=>{if(r){const l=t.prepareDataService();a(l),n.updateDataService(l)}},[t,n,r]),o._(()=>()=>{i.destroy()},[i]),i}const Nm=({dataOptions:e})=>{const[t,n]=o.p(o.hL(e));return{dataOptionsInternal:t,updateSort(r){var i;n(S(w({},t),{rows:(i=t.rows)==null?void 0:i.map((a,l)=>{const s=r.rows.find(({rowIndex:d})=>d===l);return s?s.sort===null?o.BAe(a,{sortType:void 0}):o.BAe(a,{sortType:s.sort}):a})}))}}},Lm=e=>(t,n,r,i)=>{var a;const l=o.sSe(e,(a=i==null?void 0:i.field)==null?void 0:a.index),s=o.lSe(l),d=t.value===null||typeof t.value>"u";t.content=d?"":o.Er(s,t.value)},Im=()=>(e,t,n)=>{var r,i;const a=e.userType===o.Sn.CORNER,l=e.userType===o.Sn.SUB_TOTAL;if(!t||a||l)return;const s=n.metadata.find(({panel:c,jaql:u})=>{var p;const h=["rows","columns"].includes(c),f=u.dim===t.jaql.dim,m=t.jaql.datatype===u.datatype&&t.jaql.level===u.level,g=(p=u.in)==null?void 0:p.selected;return h&&f&&m&&g}),d=(i=(r=s==null?void 0:s.jaql)==null?void 0:r.in)==null?void 0:i.selected;d&&Vh(d.jaql)(e.value)&&(e.state={isSelected:!0})};function Om(e,t){return n=>{var r,i,a,l;if(n.userType===o.Sn.SUB_TOTAL&&(n.content=t("pivotTable.subTotal",{value:(r=n.content)!=null?r:""})),n.userType===o.Sn.GRAND_TOTAL){if(n.metadataType===o.gi$1.ROWS&&(n.content=t("pivotTable.grandTotal"),((i=e.values)==null?void 0:i.length)===1&&!((a=e.columns)!=null&&a.length))){const[s]=e.values,d="column"in s?s.column:s;n.content=(l=d.name)!=null?l:n.content}n.metadataType===o.gi$1.COLUMNS&&n.parent&&(n.content=t("pivotTable.grandTotal"))}}}const Hm="#000000",Rm="#ffffff";function Pm(e,t){return(n,r,i,a)=>{var l;const s={};if(r.userType===o.Sn.SUB_TOTAL||r.userType===o.Sn.GRAND_TOTAL||i.userType===o.Sn.SUB_TOTAL||i.userType===o.Sn.GRAND_TOTAL||i.parent&&i.parent.userType===o.Sn.SUB_TOTAL||i.parent&&i.parent.userType===o.Sn.GRAND_TOTAL)return;const d=o.sSe(e,(l=a==null?void 0:a.field)==null?void 0:l.index),c=d==null?void 0:d.color,u=d==null?void 0:d.dataBarsColor;if(c){const p=o.vCe(c);if(p.type==="Static"||p.type==="Absolute"){const h=p.getColor(n.value);h&&(s.backgroundColor=h)}else if(p.type==="Relative"){const h=c,[f]=t.palette.variantColors,m=f?o.Vc(f,.2):Hm,g=f?o.Vc(f,-.2):Rm,b={steps:h.steps,min:h.minColor,max:h.maxColor,minDef:m,maxDef:g,minGray:o.W5(m),maxGray:o.W5(g)};n.store=n.store||{},n.store.compileRange=({min:v,max:y,minvalue:x,midvalue:C,maxvalue:k})=>o.hCe(v??"#000000",y??"#ffffff",x??0,C??0,k??0),n.store.compileRangeContext={},n.store.compileRangeArgs=b}}if(u){const p=o.vCe(u);if(p.type==="Static"||p.type==="Absolute"){const h=p.getColor(n.value);h&&(s.databarColor=h)}}Object.keys(s).length>0&&(n.style=n.style||{},Object.assign(n.style,s))}}const Fm=({dataService:e,dataOptions:t})=>{const{app:n}=o.NT(),{t:r}=o.N_(),{themeSettings:i}=o.DT(),a=o.x(o.CSe([Lm(t),Pm(t,i)]),[t]),l=o.x((d,c)=>o.a5(d,c,n==null?void 0:n.settings.locale,n==null?void 0:n.settings.dateConfig),[n]),s=o.x(o.CSe([o.VAe(t,l),Om(t,r),Im()]),[t,r]);o._(()=>(e.on(o.OZ,a),e.on(o.pA,s),()=>{e.off(o.OZ,a),e.off(o.pA,s)}),[e,a])};function Gl(e,t){return o.rf(e,t)}const jm=o.FA("useExecutePivotQuery")(Kc);function Kc(e){const t=Wm(e),n=o.zA(e,t),[r,i]=o.y(Gl,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:a,app:l}=o.NT();return o._(()=>{if(a||i({type:"error",error:new o.Qn("errors.executeQueryNoSisenseContext")}),n(l)){i({type:"loading"});const{dataSource:s,rows:d,columns:c,values:u,grandTotals:p,filters:h,highlights:f,count:m,offset:g,onBeforeQuery:b}=e,{filters:v,relations:y}=o.vAe(h);o.DAe({dataSource:s,rows:d,columns:c,values:u,grandTotals:p,filters:v,filterRelations:y,highlights:f,count:m,offset:g},l,{onBeforeQuery:b}).then(x=>{i({type:"success",data:x})}).catch(x=>{i({type:"error",error:x})})}},[l,a,e,n]),r.data&&t?Gl(r,{type:"loading"}):r}const zm=["dataSource","rows","columns","values","grandTotals","count","offset","onBeforeQuery"];function Wm(e){return o.sg(e,zm,(t,n)=>{const{filters:r}=o.vAe(n.filters),{filters:i}=o.vAe(t.filters);return o.IA(r,i)||o.IA(n.highlights,t.highlights)})}function Jc(e,t){const[n,r]=o.p(e),i=o.q(()=>o.bL(a=>{r(a)},t),[t]);return o._(()=>{i(e)},[e,i]),n}const Bm=200,$l=e=>w({attribute:o.FAe(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:Xc(e.sortType)}),Ym=e=>{var t;return{measure:o.zAe(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},ed=e=>{const{rows:t=[],columns:n=[],values:r=[],grandTotals:i}=e,a=t.flatMap($l),l=n.flatMap($l),s=r.flatMap(Ym);return{rows:a,columns:l,values:s,grandTotals:i}},qm=({dataSet:e,dataOptionsInternal:t,filters:n,highlights:r})=>{const[i,a]=o.p(),{rows:l,columns:s,values:d,grandTotals:c}=ed(t),u=o.x(f=>{a(m=>o.N$(m,f)?m:f)},[a]),p=Jc({dataSource:e,rows:l,columns:s,values:d,grandTotals:c,filters:n,highlights:r,onBeforeQuery:u},Bm),{error:h}=Kc(p);return{jaql:i,error:h}},Um="#cbced7",Vm="#ffff9c";function Qm(e,t){var n,r,i,a,l,s,d,c,u,p,h;let f,m;if((n=t==null?void 0:t.chart)!=null&&n.backgroundColor){const g=o.Z0(o.Js((r=t==null?void 0:t.chart)==null?void 0:r.backgroundColor))<.5?.07:-.07;f=o.jAe((i=t==null?void 0:t.chart)==null?void 0:i.backgroundColor,g),m=o.jAe((a=t==null?void 0:t.chart)==null?void 0:a.backgroundColor,g*1.5)}return{fontFamily:(l=t==null?void 0:t.typography)==null?void 0:l.fontFamily,textColor:(s=t==null?void 0:t.chart)==null?void 0:s.textColor,backgroundColor:(d=t==null?void 0:t.chart)==null?void 0:d.backgroundColor,borderColor:Um,fillColor:f,additionalFillColor:m,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:(u=t==null?void 0:t.typography)==null?void 0:u.primaryTextColor,navigationSecondaryColor:(p=t==null?void 0:t.typography)==null?void 0:p.secondaryTextColor,selectionColor:(h=e==null?void 0:e.highlightColor)!=null?h:Vm}}const Gm=25;function $m({nodeRef:e,pivotBuilder:t,dataOptions:n,styleOptions:r,themeSettings:i,size:a,onTotalHeightChange:l}){const[s,d]=o.fg((r==null?void 0:r.rowsPerPage)||Gm),c=o.x((f,m)=>{const g=[...n.rows?n.rows:[],...n.columns?n.columns:[],...n.values?n.values:[]].map(v=>v==null?void 0:v.width);if(m){const[v,y]=m,x=f[v];x&&typeof x.jaqlIndex<"u"&&(g[x.jaqlIndex]=y)}const b=[];return f.forEach((v,y)=>{typeof v.jaqlIndex<"u"&&typeof g[v.jaqlIndex]<"u"&&b.push([y,g[v.jaqlIndex]])}),b},[n]),u=o.x(f=>{d(f)},[d]),p=o.q(()=>Qm(r,i),[r,i]),h=o.q(()=>a?w({width:a.width,height:a.height,isPaginated:!0,itemsPerPage:s,isSelectedMode:!0,onUpdatePredefinedColumnWidth:c,onItemsPerPageChange:u,onTotalHeightChange:l},p):null,[a,s,c,p,l,u]);o._(()=>{e.current&&h&&(e.current.children.length?t.updateProps(h):t.render(e.current,h))},[e,t,h])}function Zm(e){const{pivotClient:t}=e,n=o.q(()=>t.preparePivotBuilder(),[t]);return o._(()=>()=>{n.destroy()},[n]),n}const td=o.da({componentName:"PivotTable"})(e=>{const{dataSet:t,dataOptions:n,filters:r,highlights:i,refreshCounter:a=0}=e,l=o.q(()=>{var O;return(O=e.styleOptions)!=null?O:{}},[e.styleOptions]),s=o.F(null),[d,c]=o.p(null),[u,p]=o.p(null),{app:h}=o.NT(),{themeSettings:f}=o.DT(),m=h==null?void 0:h.pivotClient;if(!m)throw new o.Qn("errors.noPivotClient");const{dataOptionsInternal:g,updateSort:b}=Nm({dataOptions:n}),{error:v,jaql:y}=qm({dataSet:t,dataOptionsInternal:g,filters:r,highlights:i});if(v)throw v;const x=Zm({pivotClient:m}),C=o.sg(y),k=a>0&&o.sg(a),D=Em({pivotClient:m,pivotBuilder:x,shouldBeRecreated:C||k});Fm({dataService:D,dataOptions:n}),$m({nodeRef:s,pivotBuilder:x,dataOptions:n,styleOptions:l,themeSettings:f,size:d,onTotalHeightChange:p});const{isLoading:M,isNoResults:E}=Am({jaql:y,pivotBuilder:x,isForceReload:k}),H=o.x(O=>{const F=Tm(O,g);b({rows:F})},[g,b]);o._(()=>(x.on(o.gL,H),()=>{x.off(o.gL,H)}),[x,H]);const R=o.x(O=>{(O.width!==(d==null?void 0:d.width)||O.height!==(d==null?void 0:d.height))&&c(O)},[d,c]);return o.Hi(o.Hl,{defaultSize:o.PC,size:{width:l==null?void 0:l.width,height:l!=null&&l.isAutoHeight&&!E&&u!=null?u:l==null?void 0:l.height},onSizeChange:R,children:o.Hi(o.ns,{themeSettings:f,isVisible:M,children:o.Fc(o.d5,{children:[E&&o.Hi(o.up,{iconType:"table"}),o.Hi("div",{ref:s,"aria-label":"pivot-table-root"})]})})})}),pa=o.da({componentName:"PivotTableWidget"})(e=>{var t;const[n,r]=o.p(0),{app:i}=o.NT(),{styleOptions:a,dataSource:l=i==null?void 0:i.defaultDataSource,dataOptions:s}=e,d=o.kC("pivot",{hasHeader:!((t=a==null?void 0:a.header)!=null&&t.hidden)}),c=e.styleOptions||{},{width:u,height:p}=c,h=oe(c,["width","height"]);return s?o.Hi(o.Hl,{defaultSize:d,size:{width:u,height:a!=null&&a.isAutoHeight?void 0:p},children:o.Hi(o.SA,S(w({},e),{dataSetName:l&&o.pG(l),onRefresh:()=>r(n+1),children:o.Hi(td,{dataSet:e.dataSource,dataOptions:e.dataOptions,styleOptions:h,filters:e.filters,highlights:e.highlights,refreshCounter:n})}))}):null}),Xm=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},Km=e=>"levels"in e&&e.isCascading===!0;function Jm(e,t){if(!e)return[];return n(e);function n(r){var i,a;if(o.vl(r))return[{nodeType:"attribute",attribute:((a=(i=o.nL(t,r.instanceid))==null?void 0:i.attribute)==null?void 0:a.name)||r.instanceid}];if(o.yl(r))return[{nodeType:"openBracket"},...n(r.left),{nodeType:"operator",operator:r.operator},...n(r.right),{nodeType:"closeBracket"}];throw new o.bl}}function eo(e=[],t=[],n){switch(n){case"widgetFirst":return o.Lv(t,e);case"codeFirst":return o.Lv(e,t);case"codeOnly":return t;default:return o.Lv(e,t)}}var eg=function(e){return e.FILTER="filter",e.SELECT="select",e}({});function Zl(e){return!!e&&e.min!==null&&e.max!==null}var tg=function(e){return e.PRE="pre",e.POST="post",e}({});function nd(e){return"formula"in e}function rd(e){return"formulaRef"in e}const ng=e=>({columns:(e.columns||[]).map(t=>({widthPercentage:t.width,rows:(t.cells||[]).map(n=>{const r=n.subcells.reduce((i,a)=>i+a.width,0);return{cells:n.subcells.map(i=>({widthPercentage:r<100?i.width/(r/100):i.width,height:i.elements[0].height,widgetId:i.elements[0].widgetid}))}})}))}),rg=e=>o.mG(e.jaql,e.instanceid,e.disabled,e.locked),og=e=>{const{levels:t,instanceid:n,disabled:r,locked:i}=e,a=t.map(l=>o.mG(l,l.instanceid));return new o.I$(a,{guid:n,disabled:r,locked:i})};function ig(e,t){const n=e.map(i=>Km(i)?og(i):rg(i));if(!t)return n;const r=o.tL(t,n);return!r||o.qf(r)?n:o.gi(n,r)}const ag=e=>e.subtype==="WidgetsTabber";function lg(e=[]){const t={};return e.forEach(n=>{var r,i,a,l;t[n.oid]={filtersOptions:{applyMode:((r=n.options)==null?void 0:r.dashboardFiltersMode)==="filter"?o.Mc.FILTER:o.Mc.HIGHLIGHT,shouldAffectFilters:(i=n.options)==null?void 0:i.selector,ignoreFilters:{all:(a=n.metadata.ignore)==null?void 0:a.all,ids:(l=n.metadata.ignore)==null?void 0:l.ids},forceApplyBackgroundFilters:!0}}}),t}function sg(e=[]){const t={};return e.forEach(n=>{ag(n)&&(t[n.oid]={tabs:n.style.tabs,activeTab:parseInt(n.style.activeTab||"1",10)})}),t}function cg(e,t){return xe(this,null,function*(){var n;const r=dg(e.widgets||[]);if(r.length===0)return e;const i=yield t.getSharedFormulas(r);return S(w({},e),{widgets:(n=e.widgets)==null?void 0:n.map(a=>ug(a,i))})})}function dg(e){const t=e.flatMap(n=>n.metadata.panels.flatMap(r=>r.items.flatMap(i=>!nd(i.jaql)||!i.jaql.context?[]:Object.values(i.jaql.context).filter(rd).map(a=>a.formulaRef))));return Array.from(new Set(t))}function ug(e,t){const n=e.metadata.panels.map(r=>{const i=r.items.map(a=>{const{jaql:l}=a;if(!nd(l)||!l.context)return a;const s=Object.fromEntries(Object.entries(l.context).map(([d,c])=>rd(c)?[d,t[c.formulaRef]]:[d,c]));return S(w({},a),{jaql:S(w({},l),{context:s})})});return S(w({},r),{items:i})});return S(w({},e),{metadata:S(w({},e.metadata),{panels:n})})}function od(e,t){return xe(this,arguments,function*(n,r,i={},a,l){var s,d;const{includeWidgets:c,includeFilters:u}=i,p=new o.YSe(n),h=["oid","title","datasource","style"],f=((s=n.auth)==null?void 0:s.type)==="wat";c&&h.push("layout"),u&&(h.push("filters"),h.push("filterRelations"));const m=yield p.getDashboard(r,{fields:h});if(!m)throw new o.Qn("errors.dashboardWithOidNotFound",{dashboardOid:r});if(c){let b;if(f){const v=Xm(m);b=(yield Promise.all(v.map(y=>p.getWidget(y,m.oid)))).filter(y=>y!==void 0)}else b=(yield p.getDashboardWidgets(r))||[];m.widgets=b}if((d=m.style)!=null&&d.paletteId&&!m.style.palette){const b=yield p.getPalettes(),v=b==null?void 0:b.find(({_id:y})=>{var x;return y===((x=m.style)==null?void 0:x.paletteId)});v&&(m.style.palette={name:v.name,colors:v.colors})}const g=yield cg(m,p);return _a(g,a,l)})}const id=(e,t)=>{const n={};for(const r of e){const i=t(r);i in n||(n[i]=r)}return Object.values(n)};function ad(e){return xe(this,arguments,function*(t,n={}){const{includeWidgets:r,searchByTitle:i}=n,a=new o.YSe(t),l=[];let s=["oid","title","datasource"];r&&(s=[],l.push("widgets"));const d=yield a.getDashboards({fields:s,expand:l,searchByTitle:i});if(!d)return[];const c=id(d,u=>u.oid);return c.length!==d.length&&console.warn("Removing detected duplicate dashboard(s)"),c.map(u=>_a(u))})}const ld=o.FA("useGetDashboardModel")(sd);function sd(e){const t=o.sg(e,["dashboardOid"]),n=o.zA(e,t),[r,i]=o.y(o.rf,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:a,app:l}=o.NT(),{themeSettings:s}=o.DT();return o._(()=>{if(a||i({type:"error",error:new o.Qn("errors.sisenseContextNotFound")}),n(l)){i({type:"loading"});const{dashboardOid:d,includeWidgets:c,includeFilters:u}=e;od(l.httpClient,d,{includeWidgets:c,includeFilters:u},s,l.settings).then(p=>{i({type:"success",data:p})}).catch(p=>{i({type:"error",error:p})})}},[l,a,e,n,s]),r.data&&t?Ri(o.rf(r,{type:"loading"})):Ri(r)}function Ri(e){const t=e,{data:n}=t,r=oe(t,["data"]);return S(w({},r),{dashboard:n})}const pg=o.FA("useGetDashboardModels")(hg);function hg(e={}){const t=o.sg(e,["includeWidgets"]),n=o.zA(e,t),[r,i]=o.y(o.rf,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:a,app:l}=o.NT();return o._(()=>{a||i({type:"error",error:new o.Qn("errors.sisenseContextNotFound")}),n(l)&&(i({type:"loading"}),ad(l.httpClient,e).then(s=>{i({type:"success",data:s})}).catch(s=>{i({type:"error",error:s})}))},[l,a,e,n]),r.data&&t?Pi(o.rf(r,{type:"loading"})):Pi(r)}function Pi(e){const t=e,{data:n}=t,r=oe(t,["data"]);return S(w({},r),{dashboards:n})}const cd=e=>xe(void 0,[e],function*({widgetOid:t,dashboardOid:n,includeDashboard:r,api:i}){const[a,l]=yield Promise.all([i.getWidget(t,n),r?i.getDashboard(n):void 0]);return{widget:a,dashboard:l}});function dd(e,t,n,r,i){return xe(this,null,function*(){const a=new o.YSe(e),{widget:l}=yield cd({widgetOid:n,dashboardOid:t,api:a});if(!l)throw new o.Qn("errors.widgetWithOidNotFound",{widgetOid:n});return mr(l,r,i)})}const fg=o.FA("useGetWidgetModel")(ud);function ud(e){const t=o.sg(e,["dashboardOid","widgetOid"]),n=o.zA(e,t),{themeSettings:r}=o.DT(),[i,a]=o.y(o.rf,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:l,app:s}=o.NT();return o._(()=>{if(l||a({type:"error",error:new o.Qn("errors.sisenseContextNotFound")}),n(s)){a({type:"loading"});const{dashboardOid:d,widgetOid:c}=e;dd(s.httpClient,d,c,r,s.settings).then(u=>{a({type:"success",data:u})}).catch(u=>{a({type:"error",error:u})})}},[s,l,e,n,r]),i.data&&t?Xl(o.rf(i,{type:"loading"})):Xl(i)}function Xl(e){const t=e,{data:n}=t,r=oe(t,["data"]);return S(w({},r),{widget:n})}function mg(e,t,n){var r;return n(e,function(i,a,l){if(t(i,a,l))return r=a,!1}),r}function gg(e,t){return mg(e,o.HD(t),o.I4)}function bg(e){return e.percent||e.type==="percent"?"Percent":e.currency?"Currency":"Numbers"}function vg(e){return e.decimals!==void 0&&e.decimals!=="auto"?typeof e.decimals=="string"?Number.parseFloat(e.decimals):e.decimals:"auto"}function yg(e){var t,n,r,i,a,l,s,d,c;const u=e.jaql.datatype==="numeric"||e.jaql.agg==="count"||"context"in e.jaql,p=(t=e.format)==null?void 0:t.mask;return u&&p?{decimalScale:vg(p),kilo:(n=p.abbreviations)==null?void 0:n.k,million:(r=p.abbreviations)==null?void 0:r.m,billion:(i=p.abbreviations)==null?void 0:i.b,trillion:(a=p.abbreviations)==null?void 0:a.t,thousandSeparator:(s=(l=p.number)==null?void 0:l.separated)!=null?s:p.separated,prefix:((d=p.currency)==null?void 0:d.position)===tg.PRE,symbol:(c=p.currency)==null?void 0:c.symbol,name:bg(p)}:null}const wg=!0;function xg(e,t){if(!t||!wg)return e;const{forecast:n,trend:r}=t;let i=w({},e);return n&&!n.isViewerDisabled&&n.isEnabled&&(i=S(w({},i),{forecast:{confidenceInterval:n.confidence/100,forecastHorizon:n.forecastPeriod,modelType:"auto"}})),r&&!r.isViewerDisabled&&r.isEnabled&&(i=S(w({},i),{trend:{modelType:r.trendType}})),i}const kg=e=>{var t,n,r,i,a,l,s;return e.jaql&&"level"in e.jaql?(a=(n=(t=e.format)==null?void 0:t.mask)==null?void 0:n[e.jaql.level])!=null?a:(i=(r=e.format)==null?void 0:r.mask)==null?void 0:i.dateAndTime:(s=(l=e.format)==null?void 0:l.mask)==null?void 0:s.dateAndTime};function nn(e,t){var n,r,i,a,l,s,d,c;const u=o.bG(e.jaql,kg(e),e.panel),p=o.xAe((n=e.jaql.sort)!=null?n:e.categoriesSorting),h=yg(e),f=(r=e.format)==null?void 0:r.subtotal,m=(i=e.format)==null?void 0:i.width;let g=o.d_e((a=e.format)==null?void 0:a.color,t);const b=o.d_e((l=e.format)==null?void 0:l.colorSecond,t),v=e.panel==="columns"&&e.panel;if(!g&&!((s=e.format)!=null&&s.color)&&e.format&&"colorIndex"in e.format&&(g=o.d_e({type:"color",colorIndex:e.format.colorIndex},t)),o.Ni.isMeasure(u)){const y=e.y2,x=e.singleSeriesType,C="subtotalAgg"in e.jaql&&e.jaql.subtotalAgg,k=(d=e.format)==null?void 0:d.databars,D=w(w(w(w(w(w(w(w(w(w({column:u},g&&{color:g}),b&&{dataBarsColor:b}),y&&{showOnRightAxis:y}),p&&{sortType:p}),x&&{chartType:x}),h&&{numberFormatConfig:h}),C&&{totalsCalculation:C}),k&&{dataBars:k}),m&&{width:m}),v&&{panel:v});return xg(D,e.statisticalModels)}return w(w(w(w(w(w({column:u,isColored:(c=e.isColored)!=null?c:!1},p&&{sortType:p}),h&&{numberFormatConfig:h}),f&&{includeSubTotals:f}),m&&{width:m}),g&&{color:g}),v&&{panel:v})}function bt(e){const t=e.column;let n;if(o.Ni.isAttribute(t))n=t.jaql(!0);else if(o.Ni.isMeasure(t))n=t.jaql(!0);else throw new o.Qn("errors.unsupportedDimensionalElement");return n.jaql?n:{jaql:n}}const pd=(e,t)=>{const n={};return e.forEach(r=>{r.name!=="filters"&&(n[o.z$(r.name)]=ue(e,r.name,t))}),n};function Fi(e,t,n){return o.oEe(e,t).map(o.PSe).map(n)}function ue(e,t,n){return Fi(e,t,r=>nn(r,n))}function _g(e,t,n){var r,i;const a=["chart/line","chart/area"].includes(t)?"x-axis":"categories",l=ue(e,a,n),s=ue(e,"values",n),d=ue(e,"break by",n),c=(i=(r=o.oEe(e,"break by")[0])==null?void 0:r.format)==null?void 0:i.members,u=c&&o.h_e(c);return w({category:l,value:s,breakBy:d},u&&{seriesToColorMap:u})}function Sg(e,t,n){var r,i,a,l;const s=ue(t,"categories",n),d=ue(t,"values",n),c=ue(t,"size",n);let u,p;return e==="sunburst"?p=o.sEe(o.oEe(t,"categories")):(u=(i=(r=o.oEe(t,"categories")[0])==null?void 0:r.format)==null?void 0:i.members,o.oEe(t,"color").length&&(u=(l=(a=o.oEe(t,"color")[0])==null?void 0:a.format)==null?void 0:l.members),p=u&&o.h_e(u)),w({category:s,value:[...d,...c]},p&&{seriesToColorMap:p})}function Cg(e,t){var n,r;const[i]=ue(e,"x-axis",t),[a]=ue(e,"y-axis",t),[l]=ue(e,"point",t),[s]=ue(e,"Break By / Color",t),[d]=ue(e,"size",t),c=(r=(n=o.oEe(e,"Break By / Color")[0])==null?void 0:n.format)==null?void 0:r.members,u=c&&o.h_e(c);return w({x:i,y:a,breakByPoint:l,breakByColor:s,size:d},u&&{seriesToColorMap:u})}function Dg(e,t){const n=ue(e,"value",t),r=ue(e,"secondary",t),i=ue(e,"min",t),a=ue(e,"max",t);return{value:n,secondary:r,min:i,max:a}}function Mg(e,t){return{columns:ue(e,"columns",t)}}function Tg(e,t,n){let r;const i={},a=ue(e,"columns",n),l=Fi(e,"values",(s,d)=>{var c,u,p,h,f;const{field:m,jaql:g}=s,{sortDetails:b}=g;b&&(r=b),m&&(i[m.index]=d),((u=(c=s.format)==null?void 0:c.color)==null?void 0:u.type)==="color"&&!((h=(p=s.format)==null?void 0:p.color)!=null&&h.color)&&delete s.format.color;const v=nn(s,n);return typeof v.color!="string"&&((f=v.color)==null?void 0:f.type)==="conditional"&&delete v.color.defaultColor,v});return{rows:Fi(e,"rows",(s,d,c)=>{var u;const p=d===c.length-1;let{sortDetails:h}=s==null?void 0:s.jaql;const f=nn(s,n);f.column&&o.Ni.isAttribute(f.column)&&(f.column=f.column.sort(o.Jn.None)),p&&r&&(h=r);const m=(h==null?void 0:h.field)!==((u=s.field)==null?void 0:u.index);return h&&(f.sortType=w({direction:o.xAe(h.dir)},m&&{by:{valuesIndex:i[h.field],columnsMembersPath:Object.values(h.measurePath||{})}})),f}),columns:a,values:l,grandTotals:{rows:t.rowsGrandTotal,columns:t.columnsGrandTotal}}}function Ag(e){const t={"whisker/iqr":"iqr","whisker/extremums":"extremums","whisker/deviation":"standardDeviation"},n=gg(e.whisker,r=>r);return t[n]}function Eg(e,t,n){const r=ue(e,"category",n),i=ue(e,"value",n),a=Ag(t),l=t.outliers.enabled;return{category:r,value:i,boxType:a,outliersEnabled:l}}function Ng(e,t){return o.oEe(e,"geo").map(o.PSe).map(n=>{const r=nn(n,t);return"geoLevel"in n?S(w({},r),{level:n.geoLevel}):r})}function Lg(e,t){const n=Ng(e,t),r=ue(e,"size",t)[0],i=ue(e,"color",t)[0],a=ue(e,"details",t)[0];return{geo:n,size:r,colorBy:i,details:a}}function Ig(e,t){const n=[ue(e,"geo",t)[0]],r=ue(e,"color",t)[0];return w({geo:n},r&&{color:[r]})}function ji(e,t){const n="dim"in e.jaql?S(w({},e),{jaql:S(w({},e.jaql),{datasource:t})}):e,r=e.parent?ji(e.parent,t):void 0,i=e.through?ji(e.through,t):void 0;return S(w({},n),{parent:r,through:i})}function Og(e,t){return e.map(n=>S(w({},n),{items:n.items.map(r=>ji(r,t))}))}function Hg(e,t,n,r){if(Rg(e))return _g(t,e,r);if(Pg(e))return Sg(e,t,r);if(e==="chart/scatter")return Cg(t,r);if(e==="indicator")return Dg(t,r);if(o.KAe(e))return Mg(t,r);if(o.SSe(e))return Tg(t,n,r);if(e==="chart/boxplot")return Eg(t,n,r);if(e==="map/scatter")return Lg(t,r);if(e==="map/area")return Ig(t,r);if(e==="richtexteditor")return{};throw new o.Qn("errors.unsupportedWidgetType",{widgetType:e})}function Rg(e){return["chart/line","chart/area","chart/bar","chart/column","chart/polar"].includes(e)}function Pg(e){return["chart/pie","chart/funnel","treemap","sunburst"].includes(e)}function un(e,t){const n=o.ZAe(e);return w(w({},t),n&&{subtype:n})}function wt(e){const{min:t,max:n}=e||{};return S(w({},e),{min:typeof t=="number"?t:null,max:typeof n=="number"?n:null})}function Fg(e,t,n){var r,i,a,l,s,d,c,u,p,h;const f={xAxis:wt(t.xAxis),yAxis:wt(t.yAxis),y2Axis:wt(t.y2Axis)},m=["chart/line","chart/area"].includes(e)?"x-axis":"categories",g=o.oEe(n,m),b=o.oEe(n,"values"),v=g.length===2;v&&(f.xAxis=S(w({},f.xAxis),{title:(r=f.xAxis)==null?void 0:r.x2Title,x2Title:(i=f.xAxis)==null?void 0:i.title}));const y=!!((a=f.xAxis)!=null&&a.title&&"text"in f.xAxis.title),x=g[g.length-1];!y&&x&&(f.xAxis=S(w({},f.xAxis),{title:S(w({},(l=f.xAxis)==null?void 0:l.title),{text:x.jaql.title})}));const C=!!((s=f.xAxis)!=null&&s.x2Title&&"text"in f.xAxis.x2Title),k=g[0];!C&&v&&(f.xAxis=S(w({},f.xAxis),{x2Title:S(w({},(d=f.xAxis)==null?void 0:d.x2Title),{text:k.jaql.title})}));const D=!!((c=f.yAxis)!=null&&c.title&&"text"in f.yAxis.title),M=b.filter(R=>!R.y2);!D&&M.length===1&&(f.yAxis=S(w({},f.yAxis),{title:S(w({},(u=f.yAxis)==null?void 0:u.title),{text:M[0].jaql.title})}));const E=!!((p=f.y2Axis)!=null&&p.title&&"text"in f.y2Axis.title),H=b.filter(R=>R.y2);return!E&&H.length===1&&(f.y2Axis=S(w({},f.y2Axis),{title:S(w({},(h=f.y2Axis)==null?void 0:h.title),{text:H[0].jaql.title})})),f}function jg(e,t){var n,r;const i={xAxis:wt(e.categories),yAxis:wt(e.axis)},a=o.oEe(t,"categories")[0];return!((n=i.xAxis)!=null&&n.title&&"text"in i.xAxis.title)&&a&&(i.xAxis=S(w({},i.xAxis),{title:S(w({},(r=i.xAxis)==null?void 0:r.title),{text:a.jaql.title})})),i.yAxis=S(w({},i.yAxis),{title:{enabled:!1}}),i}function zg(e,t){var n,r,i,a;const l={xAxis:wt(e.xAxis),yAxis:wt(e.yAxis)},s=o.oEe(t,"x-axis")[0],d=o.oEe(t,"y-axis")[0];return!((n=l.xAxis)!=null&&n.title&&"text"in l.xAxis.title)&&s&&(l.xAxis=S(w({},l.xAxis),{title:S(w({},(r=l.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((i=l.yAxis)!=null&&i.title&&"text"in l.yAxis.title)&&d&&(l.yAxis=S(w({},l.yAxis),{title:S(w({},(a=l.yAxis)==null?void 0:a.title),{text:d.jaql.title})})),l}function Wg(e,t){var n,r,i,a;const l={xAxis:wt(e.xAxis),yAxis:wt(e.yAxis)},s=o.oEe(t,"category")[0],d=o.oEe(t,"value")[0];return!((n=l.xAxis)!=null&&n.title&&"text"in l.xAxis.title)&&s&&(l.xAxis=S(w({},l.xAxis),{title:S(w({},(r=l.xAxis)==null?void 0:r.title),{text:s.jaql.title})})),!((i=l.yAxis)!=null&&i.title&&"text"in l.yAxis.title)&&d&&(l.yAxis=S(w({},l.yAxis),{title:S(w({},(a=l.yAxis)==null?void 0:a.title),{text:d.jaql.title})})),l}function Bg(e,t){var n,r,i,a,l,s,d,c,u,p,h,f,m,g,b,v,y,x,C,k,D;const M=((n=t.seriesLabels)==null?void 0:n.enabled)&&((a=(i=(r=t.seriesLabels)==null?void 0:r.labels)==null?void 0:i.types)==null?void 0:a.totals),E=e==="area/stacked"||e==="area/stackedspline"||e==="column/stackedcolumn"||e==="bar/stacked",H=e==="area/stacked100"||e==="area/stackedspline100"||e==="column/stackedcolumn100"||e==="bar/stacked100";let R=(s=(l=t.seriesLabels)==null?void 0:l.enabled)!=null?s:!1;return(E||H)&&(R=!!(E&&(u=(c=(d=t.seriesLabels)==null?void 0:d.labels)==null?void 0:c.types)!=null&&u.relative||H&&(f=(h=(p=t.seriesLabels)==null?void 0:p.labels)==null?void 0:h.types)!=null&&f.count)),S(w({},M&&{totalLabels:{enabled:M,rotation:(g=(m=t.seriesLabels)==null?void 0:m.rotation)!=null?g:0}}),{seriesLabels:{enabled:(v=(b=t.seriesLabels)==null?void 0:b.enabled)!=null?v:!1,rotation:(x=(y=t.seriesLabels)==null?void 0:y.rotation)!=null?x:0,showValue:R,showPercentage:!!(H&&(D=(k=(C=t.seriesLabels)==null?void 0:C.labels)==null?void 0:k.types)!=null&&D.percentage)}})}function Yg(e,t,n,r){return S(w(w(w({},un(t,n)),Fg(e,n,r)),Bg(t,n)),{lineWidth:n.lineWidth,markers:n.markers})}function qg(e,t,n){return w(w({},un(e,t)),jg(t,n))}function Ug(e,t,n){var r,i,a;return S(w(w({},un(e,t)),zg(t,n)),{markerSize:{scatterDefaultSize:(r=t.markerSize)==null?void 0:r.defaultSize,scatterBubbleMinSize:(i=t.markerSize)==null?void 0:i.min,scatterBubbleMaxSize:(a=t.markerSize)==null?void 0:a.max}})}function Vg(e){return{header:{color:{enabled:e["colors/headers"]}},rows:{alternatingColor:{enabled:e["colors/rows"]}},columns:{alternatingColor:{enabled:e["colors/columns"]}}}}function Qg(e,t){return S(w({},un(e,t)),{funnelSize:t.size,funnelType:t.type,funnelDirection:t.direction,labels:t.labels,legend:t.legend})}const Gg=(e,t)=>{const n=o.ZAe(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 $g(e,t,n){var r,i,a,l,s,d,c,u;const p=Gg(e,t),h=(r=o.oEe(n,"value")[0])==null?void 0:r.jaql.title,f=(i=o.oEe(n,"secondary")[0])==null?void 0:i.jaql.title;return S(w({},p),{indicatorComponents:{title:{shouldBeShown:((l=(a=t.components)==null?void 0:a.title)==null?void 0:l.enabled)||!1,text:h},secondaryTitle:{text:f||""},ticks:{shouldBeShown:((d=(s=t.components)==null?void 0:s.ticks)==null?void 0:d.enabled)||!1},labels:{shouldBeShown:((u=(c=t.components)==null?void 0:c.labels)==null?void 0:u.enabled)||!1}}})}function Zg(e){var t,n,r,i;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:(i=e["tooltip/value"])==null||i?"value":"contribution"}}}function Xg(e){var t;return{legend:{enabled:e["legend/enabled"],position:e["legend/position"]},tooltip:{mode:(t=e["tooltip/value"])==null||t?"value":"contribution"}}}function Kg(e,t,n){return w(w({},un(e,t)),Wg(t,n))}function Jg(e,t){return S(w({},un(e,t)),{markers:{fill:t.markers.fill,size:{defaultSize:t.markers.size.defaultSize,minSize:t.markers.size.min,maxSize:t.markers.size.max}}})}function eb(e){let t;switch(e){case"areamap/world":t="world";break;case"areamap/usa":t="usa";break;default:throw new o.Qn("errors.unsupportedWidgetType",{widgetSubtype:e})}return{mapType:t}}function tb(e){var t,n,r,i,a;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:(i=e.colors)==null?void 0:i.members,totalsColor:(a=e.colors)==null?void 0:a.totals}}function nb(e,t){var n,r,i;const{subtype:a,style:l,metadata:{panels:s}}=t;switch(e){case"chart/line":case"chart/area":case"chart/bar":case"chart/column":{const d=Yg(e,a,l,s);if(d.navigator){const c=(n=t.options)==null?void 0:n.previousScrollerLocation;d.navigator.scrollerLocation=Zl(c)?c:void 0}return d}case"chart/polar":return qg(a,l,s);case"chart/scatter":return Ug(a,l,s);case"chart/funnel":return Qg(a,l);case"treemap":return Zg(l);case"sunburst":return Xg(l);case"chart/pie":return un(a,l);case"tablewidget":case"tablewidgetagg":return Vg(l);case"pivot":case"pivot2":return tb(l);case"indicator":return $g(a,l,s);case"chart/boxplot":{const d=Kg(a,l,s);return d.navigator&&(d.navigator.scrollerLocation=Zl((r=t.options)==null?void 0:r.previousScrollerLocation)?(i=t.options)==null?void 0:i.previousScrollerLocation:void 0),d}case"map/scatter":return Jg(a,l);case"map/area":return eb(a);case"richtexteditor":return l.content;default:throw new o.Qn("errors.unsupportedWidgetType",{widgetType:e})}}const hd=e=>({backgroundColor:e.widgetBackgroundColor,spaceAround:o.ei[e.widgetSpacing],cornerRadius:o.ei[e.widgetCornerRadius],shadow:o.ei[e.widgetShadow],border:e.widgetBorderEnabled,borderColor:e.widgetBorderColor,header:{titleTextColor:e.widgetTitleColor,titleAlignment:o.ei[e.widgetTitleAlignment],dividerLine:e.widgetTitleDividerEnabled,dividerLineColor:e.widgetTitleDividerColor,backgroundColor:e.widgetTitleBackgroundColor}});function rb(e,t,n){if(!t||!n)return e;const r=hd(t);return w(w({},e),r)}function ob(e,t){return e&&e.length?o.mp(e,o.HD(t)):[]}function ib(e,t){var n;const r=(n=e==null?void 0:e.findIndex(i=>i===t))!=null?n:-1;return r===-1?[]:e.slice(r)}const fd=e=>e!=null&&e.parent?[...fd(e.parent),nn(e).column]:[],md=e=>{var t,n,r;if(e!=null&&e.parent&&e.through&&"filter"in e.through.jaql){const i=nn(e).column,{jaql:a,format:{mask:l}={}}=e.parent,s="level"in a&&a.level&&l&&l[a.level],d=(r=(n=(t=e.through.jaql.filter)==null?void 0:t.members)==null?void 0:n.map(s?c=>({categoryValue:c,categoryDisplayValue:o.a5(o.CT(c),s)}):c=>({categoryValue:c})))!=null?r:[];return[...md(e.parent),{nextDimension:i,points:d}]}return[]};function ab(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 lb=(e,t)=>{const n=ab(e).map(r=>o.oEe(t,r)).flat().filter(r=>{const i="agg"in r.jaql&&r.jaql.agg,a="formula"in r.jaql&&r.jaql.formula;return!i&&!a});return n.length===1?n[0]:void 0},gd="calendar",bd="calendar - weeks",sb=[o.Et.Years,o.Et.Quarters,o.Et.Months,o.Et.Days],cb=[o.Et.Years,o.Et.Weeks,o.Et.Days],db=[o.Et.Years,o.Et.Quarters,o.Et.Months,o.Et.Weeks,o.Et.Days],ub=e=>e.length===2?db:e[0]===gd?sb:e[0]===bd?cb:[],pb=(e,t)=>{const[n=[],r]=o.ka(e,a=>[gd,bd].includes(a)),i=ib(ub(n),t.granularity);return i.length?[{title:"Calendar Hierarchy",levels:i.map(a=>new o.Pc(`${a} in ${t.name}`,t.expression,a,o.Pc.getDefaultFormatForGranularity(a)))},...r]:r},hb=e=>{const t=e&&nn(e),n=(e==null?void 0:e.hierarchies)||[];return t&&o.Ol$1(t.column.type)?(t.column.name=(e==null?void 0:e.jaql).column,pb(n,t.column)):n},fb=(e,t,n=[],r)=>{const i=lb(e,t),a=i&&o.PSe(i),l=md(i),s=hb(a);return{drilldownPaths:[...ob([...i?fd(i):[]],({expression:d})=>d),...s],drilldownSelections:l}};function ha(e){const t=e.filter,{filter:n}=t,r=oe(t,["filter"]),i=n&&"turnedOff"in n&&n.turnedOff;let a,l;return i?l=n:a=n,r.members&&r.members.length===0&&(r.all=!0),{filter:r,backgroundFilter:a,turnOffMembersFilter:l}}function mb(e){const{filter:t,backgroundFilter:n,turnOffMembersFilter:r}=ha(e.jaql),i=[S(w({},e),{jaql:S(w({},e.jaql),{filter:w(w({},t),r&&{filter:r})})})];return n&&i.push(S(w({},e),{jaql:S(w({},e.jaql),{filter:n}),disabled:!1})),i}function gb(e){const t=e.find(r=>r.name==="filters"),n=[];return t==null||t.items.forEach(r=>{n.push(...mb(r).filter(({disabled:i})=>!i))}),n}function vd(e){return gb(e).map(t=>o.mG(t.jaql,t.instanceid))}function fa(e){if(o.SSe(e.widgetType))throw new xa("toExecuteQueryParams");let t,n,r,i;if(o.KAe(e.widgetType)){const{attributes:a,measures:l}=o.Xx(o.nx(e.dataOptions));t=a,n=l,r=o.GI*o.YI+1,i=!0}else{const{attributes:a,measures:l}=o.ox(e.dataOptions,e.chartType);t=a,n=l}return{dataSource:e.dataSource,dimensions:t,measures:n,filters:e.filters,highlights:e.highlights,count:r,ungroup:i}}function ma(e){if(!o.SSe(e.widgetType))throw new o.Qn("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toExecutePivotQueryParams"});const{rows:t,columns:n,values:r,grandTotals:i}=ed(o.hL(e.dataOptions));return{dataSource:e.dataSource,rows:t,columns:n,values:r,grandTotals:i,filters:e.filters,highlights:e.highlights}}function yd(e){if(o.SSe(e.widgetType))throw new xa("toChartProps");if(o._Se(e.widgetType))throw new Td("toChartProps");return o.KAe(e.widgetType)?w({chartType:e.chartType},ga(e)):{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function ga(e){if(!o.KAe(e.widgetType))throw new o.Qn("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters}}function wd(e){if(!o.SSe(e.widgetType))throw new o.Qn("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function ba(e){if(o.SSe(e.widgetType))throw new xa("toChartWidgetProps");if(o._Se(e.widgetType))throw new Td("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 xd(e){if(!o.KAe(e.widgetType))throw new o.Qn("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 va(e){if(!o.SSe(e.widgetType))throw new o.Qn("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 ya(e){if(!o._Se(e.widgetType))throw new o.Qn("errors.widgetModel.onlyTextWidgetSupported",{methodName:"toTextWidgetProps"});return{styleOptions:e.styleOptions}}function kd(e){if(!o.JAe(e.widgetType))throw new o.Qn("errors.widgetModel.onlyPluginWidgetSupported",{methodName:"toPluginWidgetProps"});return{pluginType:e.pluginType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||""}}function _d(e){const{widgetType:t}=e;return o.SSe(t)?w({widgetType:"pivot"},va(e)):o._Se(t)?w({widgetType:"text"},ya(e)):o.JAe(t)?w({widgetType:"plugin"},kd(e)):w({widgetType:"chart"},ba(e))}function wa(e){const{oid:t}=e;return S(w({},_d(e)),{id:t})}const vt=()=>{throw new o.Qn("errors.methodNotImplemented")},Sd={oid:"",title:"",dataSource:"",description:"",widgetType:"plugin",pluginType:"",dataOptions:{},styleOptions:{},drilldownOptions:{},filters:[],highlights:[],chartType:void 0,getExecuteQueryParams:vt,getExecutePivotQueryParams:vt,getChartProps:vt,getTableProps:vt,getPivotTableProps:vt,getPivotTableWidgetProps:vt,getChartWidgetProps:vt,getTableWidgetProps:vt,getTextWidgetProps:vt};function Cd(e){return S(w({},e),{getExecuteQueryParams:()=>fa(e),getExecutePivotQueryParams:()=>ma(e),getChartProps:()=>yd(e),getTableProps:()=>ga(e),getPivotTableProps:()=>wd(e),getChartWidgetProps:()=>ba(e),getTableWidgetProps:()=>xd(e),getPivotTableWidgetProps:()=>va(e),getTextWidgetProps:()=>ya(e)})}function mr(e,t,n){var r,i,a,l;let s,d,c,u;const p=Og(e.metadata.panels,e.datasource);if(s=e.type,o.qAe(s)){c=Hg(s,p,e.style,t==null?void 0:t.palette.variantColors),u=nb(s,e);const b=(l=(a=(i=n==null?void 0:n.serverFeatures)==null?void 0:i.widgetDesignStyle)==null?void 0:a.active)!=null?l:!0;u=rb(u,e.style.widgetDesign,b)}else{d=s,s="plugin",c=pd(p,(r=t==null?void 0:t.palette.variantColors)!=null?r:[]);const b=e.style,{widgetDesign:v}=b,y=oe(b,["widgetDesign"]);u=w(w({},y),v?hd(v):{})}const h=fb(s,p),f=vd(p),m=o.QAe(s)?o.YAe(s):void 0,g=S(w({},Sd),{oid:e.oid,title:e.title,dataSource:o.yAe(e.datasource),description:e.desc||"",widgetType:s,chartType:m,pluginType:d||"",dataOptions:c||{},styleOptions:u||{},drilldownOptions:h,filters:f});return Cd(g)}function Dd(e){const t=o.XAe(e.chartType),n=S(w(w({},Sd),e),{filters:e.filters||[],widgetType:t});return Cd(n)}function bb(e){if(o.YT(e))return Dd(e);throw new o.Qn("errors.otherWidgetTypesNotSupported")}function Md(e,t){const n=t||e.dataSource;if(typeof n=="string")throw new Kl("dataSource");if(!n.id||!n.live&&!n.address)throw new Kl("dataSource");const r=e.chartType;let i=e.widgetType,a={},l=e.styleOptions.subtype||"";if(!r)throw new Error("Chart type is required");const s=[];if(o.ZCe(r)){const c=["chart/line","chart/area"].includes(e.widgetType)?"x-axis":"categories",u=e.dataOptions.category.map(m=>bt(o.Sm(m))),p={name:c,items:u};s.push(p);const h=e.dataOptions.value.map(m=>bt(o.zT(m)));s.push({name:"values",items:h});const f=e.dataOptions.breakBy.map(m=>bt(o.Sm(m)));s.push({name:"break by",items:f}),r==="polar"?l="column/polar":r==="bar"?l=l||"bar/classic":r==="column"?l=l||"column/classic":r==="area"?l=l||"area/basic":r==="line"&&(l=l||"line/basic")}else if(o.HAe(r)){const{attributes:c,measures:u}=o.Xx(e.dataOptions),p=[...c.map(h=>bt(o.Sm(h))),...u.map(h=>bt(o.zT(h)))];s.push({name:"columns",items:p}),i="tablewidget"}else if(o.QCe(r))["value","min","max","secondary"].forEach(c=>{const u=(e.dataOptions[c]||[]).map(p=>bt(o.zT(p)));s.push({name:c,items:u})}),l=l||"indicator/numeric",a=S(w({},l==="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(o.qCe(r)){const c=e.dataOptions.category.map(h=>bt(o.WAe(h)));s.push({name:"categories",items:c});const u=e.dataOptions.value.map(h=>bt(o.WAe(h))),p=r==="treemap";s.push({name:p?"size":"values",items:u}),p&&["color","values"].forEach(h=>{s.push({name:h,items:[]})}),r==="pie"?(l=l||"pie/basic",a={convolution:{enabled:!0,selectedConvolutionType:"bySlicesCount",minimalIndependentSlicePercentage:3,independentSlicesCount:7}}):r==="treemap"||r==="sunburst"?l=l||r:r==="funnel"&&(l=l||"chart/funnel")}else if(o.KCe(r))["x","y","size","breakByColor","breakByPoint"].forEach(c=>{if(e.dataOptions[c]){const u={breakByColor:"Break By / Color",breakByPoint:"point",x:"x-axis",y:"y-axis"},p=[bt(o.WAe(e.dataOptions[c]))];s.push({name:u[c]||c,items:p})}}),l=l||"bubble/scatter";else throw new vb(r);const d=(e.filters||[]).map(c=>c.jaql());return s.push({name:"filters",items:d}),{oid:e.oid||"",title:e.title,desc:e.description,datasource:n,type:i,metadata:{panels:s},style:a,subtype:l}}class Kl extends o.Qn{constructor(t){super("errors.widgetModel.incomleteWidget",{prop:t})}}class vb extends o.Qn{constructor(t){super("errors.widgetModel.unsupportedWidgetTypeDto",{chartType:t})}}class xa extends o.Qn{constructor(t){super("errors.widgetModel.pivotWidgetNotSupported",{methodName:t})}}class Td extends o.Qn{constructor(t){super("errors.widgetModel.textWidgetNotSupported",{methodName:t})}}const yb=Object.freeze(Object.defineProperty({__proto__:null,fromChartWidgetProps:Dd,fromWidgetDto:mr,fromWidgetProps:bb,toChartProps:yd,toChartWidgetProps:ba,toCommonWidgetProps:_d,toExecutePivotQueryParams:ma,toExecuteQueryParams:fa,toPivotTableProps:wd,toPivotTableWidgetProps:va,toPluginWidgetProps:kd,toTableProps:ga,toTableWidgetProps:xd,toTextWidgetProps:ya,toWidgetDto:Md,toWidgetProps:wa},Symbol.toStringTag,{value:"Module"}));function ka(e){const{title:t,dataSource:n,widgets:r,layoutOptions:i,filters:a,widgetsOptions:l,tabbersOptions:s,styleOptions:d}=e;return{title:t,defaultDataSource:n,widgets:r.map(wa),layoutOptions:i,config:{},filters:a,widgetsOptions:l,styleOptions:d,tabbersOptions:s}}function _a(e,t,n){var r;const{oid:i,title:a,datasource:l,widgets:s,layout:d,filters:c,filterRelations:u,style:p}=e,h={title:l.title,type:l.live?"live":"elasticube"},f=w({},p!=null&&p.palette?{palette:{variantColors:p==null?void 0:p.palette.colors}}:null),m=t&&w(w({},t),f.palette?{palette:f.palette}:null),g=(s==null?void 0:s.map(k=>mr(k,m,n)))||[],b=d?ng(d):{columns:[]},v=(r=u==null?void 0:u[0])==null?void 0:r.filterRelations,y=ig(c||[],v),x=lg(s),C=sg(s);return{oid:i,title:a,dataSource:h,styleOptions:f,widgets:g,layoutOptions:{widgetsPanel:b},filters:y,widgetsOptions:x,tabbersOptions:C}}const wb=Object.freeze(Object.defineProperty({__proto__:null,fromDashboardDto:_a,toDashboardProps:ka},Symbol.toStringTag,{value:"Module"}));function xb(e){return o.H$(e)?kb(e):Sa(e)}function Sa(e){return o.sAe(e)?_b(e):o.cAe(e)?Sb(e):Ca(e)}function kb(e){return{isCascading:!0,instanceid:e.config.guid,disabled:e.config.disabled,levels:e.filters.map(t=>{const n=Sa(t);return S(w({},n.jaql),{instanceid:n.instanceid})})}}function Ca(e){const{config:{disabled:t}}=e,n=Object.assign(Object.create(e),{config:S(w({},e.config),{disabled:!1})}).jaql(!0);return{jaql:S(w({},n),{table:o.gG(e.attribute),column:o.vG(e.attribute)}),disabled:t,instanceid:e.config.guid,isCascading:!1}}function _b(e){const t=Ca(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&&zi(t.jaql,Sa(e.config.backgroundFilter).jaql.filter),e.config.deactivatedMembers.length>0&&zi(t.jaql,{exclude:{members:e.config.deactivatedMembers},turnedOff:!0}),t}function Sb(e){const t=Ca(e);if(e.measure instanceof o.Ac){const n=t.jaql.filter;n.by.table=o.gG(e.measure.attribute),n.by.column=o.vG(e.measure.attribute),n.rankingMessage=e.measure.name}return t}function zi(e,t){if(e.filter)return zi(e.filter,t);e.filter=t}var Cb=function(e){return e.DASHBOARD_INIT="DASHBOARD.INIT",e.DASHBOARD_UPDATE_LAYOUT="DASHBOARD.UPDATE_LAYOUT",e}({}),Ad=function(e){return e.FILTERS_UPDATE="FILTERS.UPDATE",e.ADD_WIDGET="WIDGETS.ADD",e}({});function Db(e,t){var n,r;switch(t.type){case"DASHBOARD.INIT":return w(w({},e),t.payload);case"FILTERS.UPDATE":return S(w({},e),{filters:t.payload});case"WIDGETS.ADD":{const i=[...e.widgets,t.payload],a=[...((r=(n=e==null?void 0:e.layoutOptions)==null?void 0:n.widgetsPanel)==null?void 0:r.columns)||[]];return a[0]&&(a[0].rows.length||a[0].rows.push({cells:[]}),a[0].rows[0].cells.push({widgetId:t.payload.oid,widthPercentage:100})),S(w(w({},e),e!=null&&e.layoutOptions.widgetsPanel?{layoutOptions:S(w({},e==null?void 0:e.layoutOptions),{widgetsPanel:S(w({},e==null?void 0:e.layoutOptions.widgetsPanel),{columns:a})})}:null),{widgets:i})}default:return e}}function Mb(e,t,n){return xe(this,null,function*(){if(!e)throw new Error("Dashboard model is not initialized");if(t.type==="FILTERS.UPDATE"){const{filters:r,relations:i}=o.Ei(t.payload),a=r.map(xb),l=o.rL(i,r),s=Tb(r);yield n.patchDashboard(e,{filters:a,filterRelations:l?[{datasource:s,filterRelations:l}]:void 0})}else if(t.type==="WIDGETS.ADD"){const r=yield n.addWidgetToDashboard(e,Md(t.payload));if(!r)throw new Error("Failed to add widget to dashboard");return{type:"WIDGETS.ADD",payload:mr(r)}}return t})}function Tb(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 Ab(e){return e.type===Np.FILTERS_UPDATE?{type:Ad.FILTERS_UPDATE,payload:e.payload}:null}function Eb(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}const Ed=o.FA("useDashboardModel")(Nb);function Nb({dashboardOid:e,includeWidgets:t,includeFilters:n,persist:r=!0}){const{restApi:i,isReady:a}=o.ZSe(),{app:l}=o.NT(),s=o.q(()=>!!(l!=null&&l.httpClient.auth)&&Eb(l.httpClient.auth.type,r),[l==null?void 0:l.httpClient.auth,r]),d=r&&s,[c,u]=o.y(Db,null),p=o.x(b=>xe(this,null,function*(){if(!a||!i)throw new o.aEe;return d&&(b=yield Mb(c==null?void 0:c.oid,b,i)),u(b)}),[d,c==null?void 0:c.oid,i,a,u]),{dashboard:h,isLoading:f,isError:m,error:g}=ld({dashboardOid:e,includeWidgets:t,includeFilters:n});return o._(()=>{h&&u({type:Cb.DASHBOARD_INIT,payload:h})},[h,u]),{dashboard:c,isLoading:f,isError:m,error:g,dispatchChanges:p}}/*! @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:Nd,setPrototypeOf:Jl,isFrozen:Lb,getPrototypeOf:Ib,getOwnPropertyDescriptor:Ob}=Object;let{freeze:je,seal:Xe,create:Ld}=Object,{apply:Wi,construct:Bi}=typeof Reflect<"u"&&Reflect;je||(je=function(e){return e});Xe||(Xe=function(e){return e});Wi||(Wi=function(e,t,n){return e.apply(t,n)});Bi||(Bi=function(e,t){return new e(...t)});const Lr=Ue(Array.prototype.forEach),es=Ue(Array.prototype.pop),Yn=Ue(Array.prototype.push),zr=Ue(String.prototype.toLowerCase),mi=Ue(String.prototype.toString),ts=Ue(String.prototype.match),qn=Ue(String.prototype.replace),Hb=Ue(String.prototype.indexOf),Rb=Ue(String.prototype.trim),Je=Ue(Object.prototype.hasOwnProperty),He=Ue(RegExp.prototype.test),Un=Pb(TypeError);function Ue(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Wi(e,t,r)}}function Pb(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bi(e,n)}}function X(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zr;Jl&&Jl(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const a=n(i);a!==i&&(Lb(t)||(t[r]=a),i=a)}e[i]=!0}return e}function Fb(e){for(let t=0;t<e.length;t++)Je(e,t)||(e[t]=null);return e}function $t(e){const t=Ld(null);for(const[n,r]of Nd(e))Je(e,n)&&(Array.isArray(r)?t[n]=Fb(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=$t(r):t[n]=r);return t}function Vn(e,t){for(;e!==null;){const r=Ob(e,t);if(r){if(r.get)return Ue(r.get);if(typeof r.value=="function")return Ue(r.value)}e=Ib(e)}function n(){return null}return n}const ns=je(["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"]),gi=je(["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"]),bi=je(["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"]),jb=je(["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"]),vi=je(["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"]),zb=je(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rs=je(["#text"]),os=je(["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"]),yi=je(["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"]),is=je(["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"]),Ir=je(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wb=Xe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Bb=Xe(/<%[\w\W]*|[\w\W]*%>/gm),Yb=Xe(/\${[\w\W]*}/gm),qb=Xe(/^data-[\-\w.\u00B7-\uFFFF]/),Ub=Xe(/^aria-[\-\w]+$/),Id=Xe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vb=Xe(/^(?:\w+script|data):/i),Qb=Xe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Od=Xe(/^html$/i),Gb=Xe(/^[a-z][.\w]*(-[.\w]+)+$/i);var as=Object.freeze({__proto__:null,MUSTACHE_EXPR:Wb,ERB_EXPR:Bb,TMPLIT_EXPR:Yb,DATA_ATTR:qb,ARIA_ATTR:Ub,IS_ALLOWED_URI:Id,IS_SCRIPT_OR_DATA:Vb,ATTR_WHITESPACE:Qb,DOCTYPE_NAME:Od,CUSTOM_ELEMENT:Gb});const Qn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$b=function(){return typeof window>"u"?null:window},Zb=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 i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Hd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$b();const t=_=>Hd(_);if(t.version="3.1.6",t.removed=[],!e||!e.document||e.document.nodeType!==Qn.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:s,Element:d,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:h,trustedTypes:f}=e,m=d.prototype,g=Vn(m,"cloneNode"),b=Vn(m,"remove"),v=Vn(m,"nextSibling"),y=Vn(m,"childNodes"),x=Vn(m,"parentNode");if(typeof l=="function"){const _=n.createElement("template");_.content&&_.content.ownerDocument&&(n=_.content.ownerDocument)}let C,k="";const{implementation:D,createNodeIterator:M,createDocumentFragment:E,getElementsByTagName:H}=n,{importNode:R}=r;let O={};t.isSupported=typeof Nd=="function"&&typeof x=="function"&&D&&D.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:P,TMPLIT_EXPR:L,DATA_ATTR:N,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:j}=as;let{IS_ALLOWED_URI:U}=as,V=null;const ne=X({},[...ns,...gi,...bi,...vi,...rs]);let $=null;const Q=X({},[...os,...yi,...is,...Ir]);let G=Object.seal(Ld(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}})),he=null,ke=null,be=!0,ze=!0,Ce=!1,Ke=!0,Ge=!1,At=!0,Vt=!1,Jo=!1,ei=!1,mn=!1,Cr=!1,Dr=!1,vl=!0,yl=!1;const Vp="user-content-";let ti=!0,Wn=!1,gn={},bn=null;const wl=X({},["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 xl=null;const kl=X({},["audio","video","img","source","image","track"]);let ni=null;const _l=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Mr="http://www.w3.org/1998/Math/MathML",Tr="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml";let vn=ft,ri=!1,oi=null;const Qp=X({},[Mr,Tr,ft],mi);let Bn=null;const Gp=["application/xhtml+xml","text/html"],$p="text/html";let _e=null,yn=null;const Zp=n.createElement("form"),Sl=function(_){return _ instanceof RegExp||_ instanceof Function},ii=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(yn&&yn===_)){if((!_||typeof _!="object")&&(_={}),_=$t(_),Bn=Gp.indexOf(_.PARSER_MEDIA_TYPE)===-1?$p:_.PARSER_MEDIA_TYPE,_e=Bn==="application/xhtml+xml"?mi:zr,V=Je(_,"ALLOWED_TAGS")?X({},_.ALLOWED_TAGS,_e):ne,$=Je(_,"ALLOWED_ATTR")?X({},_.ALLOWED_ATTR,_e):Q,oi=Je(_,"ALLOWED_NAMESPACES")?X({},_.ALLOWED_NAMESPACES,mi):Qp,ni=Je(_,"ADD_URI_SAFE_ATTR")?X($t(_l),_.ADD_URI_SAFE_ATTR,_e):_l,xl=Je(_,"ADD_DATA_URI_TAGS")?X($t(kl),_.ADD_DATA_URI_TAGS,_e):kl,bn=Je(_,"FORBID_CONTENTS")?X({},_.FORBID_CONTENTS,_e):wl,he=Je(_,"FORBID_TAGS")?X({},_.FORBID_TAGS,_e):{},ke=Je(_,"FORBID_ATTR")?X({},_.FORBID_ATTR,_e):{},gn=Je(_,"USE_PROFILES")?_.USE_PROFILES:!1,be=_.ALLOW_ARIA_ATTR!==!1,ze=_.ALLOW_DATA_ATTR!==!1,Ce=_.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ge=_.SAFE_FOR_TEMPLATES||!1,At=_.SAFE_FOR_XML!==!1,Vt=_.WHOLE_DOCUMENT||!1,mn=_.RETURN_DOM||!1,Cr=_.RETURN_DOM_FRAGMENT||!1,Dr=_.RETURN_TRUSTED_TYPE||!1,ei=_.FORCE_BODY||!1,vl=_.SANITIZE_DOM!==!1,yl=_.SANITIZE_NAMED_PROPS||!1,ti=_.KEEP_CONTENT!==!1,Wn=_.IN_PLACE||!1,U=_.ALLOWED_URI_REGEXP||Id,vn=_.NAMESPACE||ft,G=_.CUSTOM_ELEMENT_HANDLING||{},_.CUSTOM_ELEMENT_HANDLING&&Sl(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=_.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_.CUSTOM_ELEMENT_HANDLING&&Sl(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=_.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ge&&(ze=!1),Cr&&(mn=!0),gn&&(V=X({},rs),$=[],gn.html===!0&&(X(V,ns),X($,os)),gn.svg===!0&&(X(V,gi),X($,yi),X($,Ir)),gn.svgFilters===!0&&(X(V,bi),X($,yi),X($,Ir)),gn.mathMl===!0&&(X(V,vi),X($,is),X($,Ir))),_.ADD_TAGS&&(V===ne&&(V=$t(V)),X(V,_.ADD_TAGS,_e)),_.ADD_ATTR&&($===Q&&($=$t($)),X($,_.ADD_ATTR,_e)),_.ADD_URI_SAFE_ATTR&&X(ni,_.ADD_URI_SAFE_ATTR,_e),_.FORBID_CONTENTS&&(bn===wl&&(bn=$t(bn)),X(bn,_.FORBID_CONTENTS,_e)),ti&&(V["#text"]=!0),Vt&&X(V,["html","head","body"]),V.table&&(X(V,["tbody"]),delete he.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=_.TRUSTED_TYPES_POLICY,k=C.createHTML("")}else C===void 0&&(C=Zb(f,i)),C!==null&&typeof k=="string"&&(k=C.createHTML(""));je&&je(_),yn=_}},Cl=X({},["mi","mo","mn","ms","mtext"]),Dl=X({},["foreignobject","annotation-xml"]),Xp=X({},["title","style","font","a","script"]),Ml=X({},[...gi,...bi,...jb]),Tl=X({},[...vi,...zb]),Kp=function(_){let q=x(_);(!q||!q.tagName)&&(q={namespaceURI:vn,tagName:"template"});const z=zr(_.tagName),ie=zr(q.tagName);return oi[_.namespaceURI]?_.namespaceURI===Tr?q.namespaceURI===ft?z==="svg":q.namespaceURI===Mr?z==="svg"&&(ie==="annotation-xml"||Cl[ie]):!!Ml[z]:_.namespaceURI===Mr?q.namespaceURI===ft?z==="math":q.namespaceURI===Tr?z==="math"&&Dl[ie]:!!Tl[z]:_.namespaceURI===ft?q.namespaceURI===Tr&&!Dl[ie]||q.namespaceURI===Mr&&!Cl[ie]?!1:!Tl[z]&&(Xp[z]||!Ml[z]):!!(Bn==="application/xhtml+xml"&&oi[_.namespaceURI]):!1},Qt=function(_){Yn(t.removed,{element:_});try{x(_).removeChild(_)}catch{b(_)}},Ar=function(_,q){try{Yn(t.removed,{attribute:q.getAttributeNode(_),from:q})}catch{Yn(t.removed,{attribute:null,from:q})}if(q.removeAttribute(_),_==="is"&&!$[_])if(mn||Cr)try{Qt(q)}catch{}else try{q.setAttribute(_,"")}catch{}},Al=function(_){let q=null,z=null;if(ei)_="<remove></remove>"+_;else{const me=ts(_,/^[\r\n\t ]+/);z=me&&me[0]}Bn==="application/xhtml+xml"&&vn===ft&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const ie=C?C.createHTML(_):_;if(vn===ft)try{q=new h().parseFromString(ie,Bn)}catch{}if(!q||!q.documentElement){q=D.createDocument(vn,"template",null);try{q.documentElement.innerHTML=ri?k:ie}catch{}}const De=q.body||q.documentElement;return _&&z&&De.insertBefore(n.createTextNode(z),De.childNodes[0]||null),vn===ft?H.call(q,Vt?"html":"body")[0]:Vt?q.documentElement:De},El=function(_){return M.call(_.ownerDocument||_,_,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Nl=function(_){return _ instanceof p&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof u)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},Ll=function(_){return typeof s=="function"&&_ instanceof s},mt=function(_,q,z){O[_]&&Lr(O[_],ie=>{ie.call(t,q,z,yn)})},Il=function(_){let q=null;if(mt("beforeSanitizeElements",_,null),Nl(_))return Qt(_),!0;const z=_e(_.nodeName);if(mt("uponSanitizeElement",_,{tagName:z,allowedTags:V}),_.hasChildNodes()&&!Ll(_.firstElementChild)&&He(/<[/\w]/g,_.innerHTML)&&He(/<[/\w]/g,_.textContent)||_.nodeType===Qn.progressingInstruction||At&&_.nodeType===Qn.comment&&He(/<[/\w]/g,_.data))return Qt(_),!0;if(!V[z]||he[z]){if(!he[z]&&Hl(z)&&(G.tagNameCheck instanceof RegExp&&He(G.tagNameCheck,z)||G.tagNameCheck instanceof Function&&G.tagNameCheck(z)))return!1;if(ti&&!bn[z]){const ie=x(_)||_.parentNode,De=y(_)||_.childNodes;if(De&&ie){const me=De.length;for(let gt=me-1;gt>=0;--gt){const $e=g(De[gt],!0);$e.__removalCount=(_.__removalCount||0)+1,ie.insertBefore($e,v(_))}}}return Qt(_),!0}return _ instanceof d&&!Kp(_)||(z==="noscript"||z==="noembed"||z==="noframes")&&He(/<\/no(script|embed|frames)/i,_.innerHTML)?(Qt(_),!0):(Ge&&_.nodeType===Qn.text&&(q=_.textContent,Lr([F,P,L],ie=>{q=qn(q,ie," ")}),_.textContent!==q&&(Yn(t.removed,{element:_.cloneNode()}),_.textContent=q)),mt("afterSanitizeElements",_,null),!1)},Ol=function(_,q,z){if(vl&&(q==="id"||q==="name")&&(z in n||z in Zp))return!1;if(!(ze&&!ke[q]&&He(N,q))&&!(be&&He(T,q))){if(!$[q]||ke[q]){if(!(Hl(_)&&(G.tagNameCheck instanceof RegExp&&He(G.tagNameCheck,_)||G.tagNameCheck instanceof Function&&G.tagNameCheck(_))&&(G.attributeNameCheck instanceof RegExp&&He(G.attributeNameCheck,q)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(q))||q==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&He(G.tagNameCheck,z)||G.tagNameCheck instanceof Function&&G.tagNameCheck(z))))return!1}else if(!ni[q]&&!He(U,qn(z,I,""))&&!((q==="src"||q==="xlink:href"||q==="href")&&_!=="script"&&Hb(z,"data:")===0&&xl[_])&&!(Ce&&!He(A,qn(z,I,"")))&&z)return!1}return!0},Hl=function(_){return _!=="annotation-xml"&&ts(_,j)},Rl=function(_){mt("beforeSanitizeAttributes",_,null);const{attributes:q}=_;if(!q)return;const z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};let ie=q.length;for(;ie--;){const De=q[ie],{name:me,namespaceURI:gt,value:$e}=De,nt=_e(me);let Oe=me==="value"?$e:Rb($e);if(z.attrName=nt,z.attrValue=Oe,z.keepAttr=!0,z.forceKeepAttr=void 0,mt("uponSanitizeAttribute",_,z),Oe=z.attrValue,At&&He(/((--!?|])>)|<\/(style|title)/i,Oe)){Ar(me,_);continue}if(z.forceKeepAttr||(Ar(me,_),!z.keepAttr))continue;if(!Ke&&He(/\/>/i,Oe)){Ar(me,_);continue}Ge&&Lr([F,P,L],Fl=>{Oe=qn(Oe,Fl," ")});const Pl=_e(_.nodeName);if(Ol(Pl,nt,Oe)){if(yl&&(nt==="id"||nt==="name")&&(Ar(me,_),Oe=Vp+Oe),C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!gt)switch(f.getAttributeType(Pl,nt)){case"TrustedHTML":{Oe=C.createHTML(Oe);break}case"TrustedScriptURL":{Oe=C.createScriptURL(Oe);break}}try{gt?_.setAttributeNS(gt,me,Oe):_.setAttribute(me,Oe),Nl(_)?Qt(_):es(t.removed)}catch{}}}mt("afterSanitizeAttributes",_,null)},Jp=function _(q){let z=null;const ie=El(q);for(mt("beforeSanitizeShadowDOM",q,null);z=ie.nextNode();)mt("uponSanitizeShadowNode",z,null),!Il(z)&&(z.content instanceof a&&_(z.content),Rl(z));mt("afterSanitizeShadowDOM",q,null)};return t.sanitize=function(_){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,ie=null,De=null,me=null;if(ri=!_,ri&&(_="<!-->"),typeof _!="string"&&!Ll(_))if(typeof _.toString=="function"){if(_=_.toString(),typeof _!="string")throw Un("dirty is not a string, aborting")}else throw Un("toString is not a function");if(!t.isSupported)return _;if(Jo||ii(q),t.removed=[],typeof _=="string"&&(Wn=!1),Wn){if(_.nodeName){const nt=_e(_.nodeName);if(!V[nt]||he[nt])throw Un("root node is forbidden and cannot be sanitized in-place")}}else if(_ instanceof s)z=Al("<!---->"),ie=z.ownerDocument.importNode(_,!0),ie.nodeType===Qn.element&&ie.nodeName==="BODY"||ie.nodeName==="HTML"?z=ie:z.appendChild(ie);else{if(!mn&&!Ge&&!Vt&&_.indexOf("<")===-1)return C&&Dr?C.createHTML(_):_;if(z=Al(_),!z)return mn?null:Dr?k:""}z&&ei&&Qt(z.firstChild);const gt=El(Wn?_:z);for(;De=gt.nextNode();)Il(De)||(De.content instanceof a&&Jp(De.content),Rl(De));if(Wn)return _;if(mn){if(Cr)for(me=E.call(z.ownerDocument);z.firstChild;)me.appendChild(z.firstChild);else me=z;return($.shadowroot||$.shadowrootmode)&&(me=R.call(r,me,!0)),me}let $e=Vt?z.outerHTML:z.innerHTML;return Vt&&V["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&He(Od,z.ownerDocument.doctype.name)&&($e="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
|
|
8
8
|
`+$e),Ge&&Lr([F,P,L],nt=>{$e=qn($e,nt," ")}),C&&Dr?C.createHTML($e):$e},t.setConfig=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ii(_),Jo=!0},t.clearConfig=function(){yn=null,Jo=!1},t.isValidAttribute=function(_,q,z){yn||ii({});const ie=_e(_),De=_e(q);return Ol(ie,De,z)},t.addHook=function(_,q){typeof q=="function"&&(O[_]=O[_]||[],Yn(O[_],q))},t.removeHook=function(_){if(O[_])return es(O[_])},t.removeHooks=function(_){O[_]&&(O[_]=[])},t.removeAllHooks=function(){O={}},t}var Xb=Hd();function Kb(e){return e!==null&&typeof e=="object"&&typeof e.styleOptions=="object"&&typeof e.styleOptions.html=="string"&&typeof e.styleOptions.bgColor=="string"&&typeof e.styleOptions.vAlign=="string"}const Jb={"valign-top":"flex-start","valign-middle":"center","valign-bottom":"flex-end"},e0=o.uC("div",{target:"eryn7kb0",label:"TextWidgetSpaceAroundWrapper"})("padding:",e=>o.aA[o.AU(e.styleOptions,"spaceAround",e.themeSettings.widget.spaceAround)]||"0px",";"),t0=o.uC("div",{target:"eryn7kb1",label:"TextWidgetContainer"})("background-color:",e=>e.styleOptions.bgColor,";display:flex;align-items:",e=>Jb[e.styleOptions.vAlign],";text-align:center;height:100%;width:100%;padding:10px;box-sizing:border-box;"),n0=o.uC("div",{target:"eryn7kb2",label:"InnerHtml"})("width:100%;"),Da=o.da({componentName:"TextWidget"})(e=>{const t=Xb.sanitize(e.styleOptions.html),{themeSettings:n}=o.DT();return o.Hi(e0,{themeSettings:n,styleOptions:e.styleOptions,children:o.Hi(t0,{styleOptions:e.styleOptions,children:o.Hi(n0,{dangerouslySetInnerHTML:{__html:t}})})})}),r0=new Map,Ma=o.G({plugins:r0,registerPlugin:()=>{},getPlugin:()=>{}}),o0=({children:e})=>{const t=o.F(new Map),n=o.x((a,l)=>{t.current.has(a)||t.current.set(a,l)},[]),r=o.x(a=>t.current.get(a),[]),i=o.q(()=>t.current,[]);return o.Hi(Ma.Provider,{value:{registerPlugin:n,getPlugin:r,plugins:i},children:e})},Ta=()=>o.P(Ma),i0=e=>{var t;const{t:n}=o.N_(),{plugins:r}=Ta(),{app:i}=o.NT(),a=r.get(e.pluginType);if(!a)return o.Hi(o.u1,{error:n("plugins.registerPrompt",{pluginType:e.pluginType})});const l=(t=e.dataSource)!=null?t:i==null?void 0:i.defaultDataSource,s=S(w({},e),{dataSource:l,dataOptions:e.dataOptions,styleOptions:e.styleOptions,filters:e.filters,highlights:e.highlights,description:e.description});return o.Hi(o.Hl,{defaultSize:o.kC("line",{hasHeader:!0}),children:o.Hi(o.SA,{title:e.title,description:e.description,styleOptions:e.styleOptions,dataSetName:l&&o.pG(l),children:a(s)})})},a0=e=>o.Fc(o.g3,{onBeforeMenuOpen:e.onBeforeMenuOpen,children:[o.MSe(e)&&o.Hi(i0,w({},e)),o.TSe(e)&&o.Hi(pa,w({},e)),o.kSe(e)&&o.Hi(Da,w({},e)),o.YT(e)&&o.Hi(o.wL,S(w({},e),{highlightSelectionDisabled:!0}))]}),Rd=e=>o.Hi(a0,w({},e),e.id),Pt="600px",Io="900px",l0=o.uC("div",{target:"ey54pln0",label:"GridContainer"})("display:grid;padding:",({padding:e})=>e,";grid-template-columns:",({widths:e})=>e.map(t=>`${t}%`).join(" "),";@container content-panel-container (max-width:",Pt,"){grid-template-columns:repeat(1,1fr);}@container content-panel-container ((min-width:",Pt,") and (max-width:",Io,")){grid-template-columns:",({widths:e})=>e.length>1?"repeat(2, 1fr)":"repeat(1, 1fr)",";}"),s0=o.uC("div",{target:"ey54pln1",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})=>Jt(t,e),";}@container content-panel-container ((min-width:",Pt,") and (max-width:",Io,")){&:last-of-type{grid-column-end:",({colWidths:e})=>e.length%2===0?"span 1":"span 2",";}}@container content-panel-container (max-width:",Pt,"){&:not(:first-of-type){border-left:none;}}"),c0=o.uC("div",{target:"ey54pln2",label:"Row"})("display:grid;grid-template-columns:",({widths:e})=>e.map(t=>`${t}%`).join(" "),";@container content-panel-column (max-width:",Pt,"){grid-template-columns:repeat(1,1fr);}@container content-panel-column ((min-width:",Pt,") and (max-width:",Io,")){grid-template-columns:",({widths:e})=>e.length===1?"repeat(1, 1fr)":"repeat(2, 1fr)",";}"),d0=o.uC("div",{target:"ey54pln3",label:"Subcell"})("border-bottom:",({dividerWidth:e,dividerColor:t})=>Jt(t,e),";&:not(:first-of-type){border-left:",({dividerWidth:e,dividerColor:t})=>Jt(t,e),";}height:",({height:e})=>o.iz(e)?"auto":Number.isInteger(e)?`calc(${e}px + 32px)`:`calc(${e} + 32px)`,";@container ((min-width:",Pt,") and (max-width:",Io,")){&:last-of-type{grid-column-end:",({rowWidths:e})=>e.length%2===0?"span 1":"span 2",";}}@container (max-width:",Pt,"){&:not(:first-of-type){border-left:none;}}"),u0=({layout:e,responsive:t,widgets:n})=>{const{themeSettings:r}=o.DT(),i=o.q(()=>e??Zc(n),[e,n]),a=o.aA[r.widget.spaceAround]||"0px";o._(()=>{window.dispatchEvent(new Event("resize"))},[t]);const l=i.columns.map(s=>s.widthPercentage);return o.Hi(l0,{padding:a,widths:l,children:i.columns.map((s,d)=>{var c;return o.Hi(s0,{colWidths:l,responsive:t,dividerWidth:r.dashboard.dividerLineWidth,dividerColor:r.dashboard.dividerLineColor,children:(c=s.rows)==null?void 0:c.map((u,p)=>{const h=u.cells.map(f=>f.widthPercentage);return o.Hi(c0,{widths:h,children:u.cells.map(f=>{var m;const g=n.find(b=>b.id===f.widgetId);return(g==null?void 0:g.widgetType)==="pivot"&&f.height&&(m=g==null?void 0:g.styleOptions)!=null&&m.isAutoHeight&&(g.styleOptions.isAutoHeight=!1),o.Hi(d0,{responsive:t,rowWidths:h,height:f.height,dividerWidth:r.dashboard.dividerLineWidth,dividerColor:r.dashboard.dividerLineColor,children:g&&o.Hi(Rd,w({},g))},`${f.widgetId},${f.widthPercentage}`)})},`${d},${p}`)})},d)})})},Wr="#d5d5d5",Br=1,Pd={filtersPanel:{visible:!0,collapsedInitially:!1,persistCollapsedStateToLocalStorage:!1,actions:{addFilter:{enabled:!1,multiSelect:{visible:!0}},editFilter:{enabled:!1,multiSelect:{visible:!0}},deleteFilter:{enabled:!1}}},toolbar:{visible:!0},widgetsPanel:{responsive:!1}},ls=S(w({},Pd),{persist:!1}),Fd=48,p0=o.uC("div",{target:"e14fvu5w0",label:"DashboardHeaderContainer"})("height:",Fd,"px;font-family:",({font:e})=>e,";background-color:",({background:e})=>e,";color:",({color:e})=>e,";border-bottom:",Jt(Wr,Br),";padding:10px 20px;display:flex;align-items:center;box-sizing:border-box;"),h0=o.uC("div",{target:"e14fvu5w1",label:"DashboardHeaderTitle"})("font-size:13px;font-weight:700;"),f0=({title:e})=>{const{themeSettings:t}=o.DT();return o.Hi(p0,{font:t.typography.fontFamily,color:t.typography.primaryTextColor,background:t.general.backgroundColor,children:o.Hi(h0,{children:e})})},jd=o.k((e,t)=>o.Hi("button",S(w({},e),{ref:t,className:"csdk-rounded 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}))),m0=e=>{const t=e,{tooltipTitle:n,disableTooltip:r,children:i,disabled:a}=t,l=oe(t,["tooltipTitle","disableTooltip","children","disabled"]);return o.Hi(o.Tc,{title:n,disableHoverListener:r,children:o.Hi("span",{children:o.Hi(jd,S(w({disabled:a,style:a?S(w({},l.style||{}),{pointerEvents:"none"}):l.style},l),{children:i}))})})},Oo=e=>{const t=e,{wrapperClassName:n,label:r,isLabelInactive:i,indeterminate:a,className:l,labelProps:s}=t,d=oe(t,["wrapperClassName","label","isLabelInactive","indeterminate","className","labelProps"]),c=["csdk-border-l","csdk-pl-3"],u=o.F(null);return o._(()=>{u.current&&(u.current.indeterminate=a??!1)},[u,a]),i&&c.push("csdk-opacity-50"),o.Fc("label",S(w({},s),{className:o.$i("csdk-my-[2px] csdk-flex csdk-items-center csdk-leading-4 csdk-text-[13px]",n,{"csdk-cursor-pointer":!e.disabled},l,s==null?void 0:s.className),children:[o.Hi("input",S(w({},d),{ref:u,type:"checkbox",className:o.$i("csdk-accent-UI-default csdk-h-checkbox csdk-w-checkbox csdk-m-checkbox",{"csdk-cursor-pointer":!e.disabled})})),r&&o.Hi("span",{className:c.join(" "),children:r})]}))},g0=o.uC("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;}"),b0=o.uC("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;"),ss=o.uC("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;}"),or=e=>{var t;const n=e,{callback:r,className:i,type:a="text",value:l,disabled:s,containerStyle:d,labelStyle:c,inputStyle:u}=n,p=oe(n,["callback","className","type","value","disabled","containerStyle","labelStyle","inputStyle"]),[h,f]=o.p((t=l==null?void 0:l.toString())!=null?t:""),m=o.b(),{themeSettings:g}=o.DT(),b=o.x((v,y)=>{const x=y==="increment"?parseFloat(v)+1:parseFloat(v)-1;o.wN(x)&&(r(x.toString()),f(x.toString()))},[r,f]);return o.Fc("div",{className:"csdk-flex csdk-items-center csdk-gap-x-2",style:d,children:[e.label&&o.Hi("label",{style:c,className:"csdk-min-w-fit",htmlFor:e.id,children:e.label}),o.Fc("div",{className:"csdk-h-full csdk-w-[100%] csdk-flex csdk-justify-end",children:[o.Hi(g0,S(w({},p),{type:a,style:u,ref:m,className:["csdk-border-UI-default",i].join(" "),value:h,onChange:v=>{r(v.target.value),f(v.target.value)},disabled:s})),a==="number"&&o.Fc(b0,{children:[o.Hi(ss,{onClick:()=>b(h,"increment"),children:o.Hi("svg",{className:"csdk-mt-[2px]",width:24,height:24,viewBox:"0 0 24 24",children:o.Hi("path",{fill:g.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"})})}),o.Hi(ss,{onClick:()=>b(h,"decrement"),children:o.Hi("svg",{className:"csdk-mt-[-2px]",width:24,height:24,viewBox:"0 0 24 24",children:o.Hi("path",{fill:g.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"})})})]})]})]})},zd=e=>o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("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"})})),v0=e=>o.Fc("label",{children:[o.Hi("input",S(w({},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]}),y0=o.uC("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"}}),w0=e=>{var t=e,{items:n,currentSelection:r,title:i,className:a}=t,l=oe(t,["items","currentSelection","title","className"]);return o.Fc(y0,{className:a,children:[o.Hi("div",{className:"csdk-ml-1.5",children:i}),n.map((s,d)=>o.Hi(v0,w({value:s,label:s,checked:s===r},l),d))]})},Wd=o.G(void 0);process.env.NODE_ENV!=="production"&&(Wd.displayName="FormControlContext");function x0(){return o.P(Wd)}function k0(e){return o.De("PrivateSwitchBase",e)}o.ke("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const _0=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],S0=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,a={root:["root",n&&"checked",r&&"disabled",i&&`edge${o.me(i)}`],input:["input"]};return o.He(a,k0,t)},C0=o.de(o.Tn)(({ownerState:e})=>o.hy({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),D0=o.de("input",{shouldForwardProp:o.aa})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Aa=o.k(function(e,t){const{autoFocus:n,checked:r,checkedIcon:i,className:a,defaultChecked:l,disabled:s,disableFocusRipple:d=!1,edge:c=!1,icon:u,id:p,inputProps:h,inputRef:f,name:m,onBlur:g,onChange:b,onFocus:v,readOnly:y,required:x=!1,tabIndex:C,type:k,value:D}=e,M=o.se(e,_0),[E,H]=o.F0({controlled:r,default:!!l,name:"SwitchBase",state:"checked"}),R=x0(),O=I=>{v&&v(I),R&&R.onFocus&&R.onFocus(I)},F=I=>{g&&g(I),R&&R.onBlur&&R.onBlur(I)},P=I=>{if(I.nativeEvent.defaultPrevented)return;const j=I.target.checked;H(j),b&&b(I,j)};let L=s;R&&typeof L>"u"&&(L=R.disabled);const N=k==="checkbox"||k==="radio",T=o.hy({},e,{checked:E,disabled:L,disableFocusRipple:d,edge:c}),A=S0(T);return o.u(C0,o.hy({component:"span",className:o.ce(A.root,a),centerRipple:!0,focusRipple:!d,disabled:L,tabIndex:null,role:void 0,onFocus:O,onBlur:F,ownerState:T,ref:t},M,{children:[o.u(D0,o.hy({autoFocus:n,checked:r,defaultChecked:l,className:A.input,disabled:L,id:N?p:void 0,name:m,onChange:P,readOnly:y,ref:f,required:x,ownerState:T,tabIndex:C,type:k},k==="checkbox"&&D===void 0?{}:{value:D},h)),E?i:u]}))});process.env.NODE_ENV!=="production"&&(Aa.propTypes={autoFocus:o.d.bool,checked:o.d.bool,checkedIcon:o.d.node.isRequired,classes:o.d.object,className:o.d.string,defaultChecked:o.d.bool,disabled:o.d.bool,disableFocusRipple:o.d.bool,edge:o.d.oneOf(["end","start",!1]),icon:o.d.node.isRequired,id:o.d.string,inputProps:o.d.object,inputRef:o.sa,name:o.d.string,onBlur:o.d.func,onChange:o.d.func,onFocus:o.d.func,readOnly:o.d.bool,required:o.d.bool,sx:o.d.object,tabIndex:o.d.oneOfType([o.d.number,o.d.string]),type:o.d.string.isRequired,value:o.d.any});function M0(e){return o.De("MuiSwitch",e)}const Re=o.ke("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),T0=["className","color","edge","size","sx"],A0=e=>{const{classes:t,edge:n,size:r,color:i,checked:a,disabled:l}=e,s={root:["root",n&&`edge${o.me(n)}`,`size${o.me(r)}`],switchBase:["switchBase",`color${o.me(i)}`,a&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=o.He(s,M0,t);return o.hy({},t,d)},E0=o.de("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${o.me(n.edge)}`],t[`size${o.me(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,[`& .${Re.thumb}`]:{width:16,height:16},[`& .${Re.switchBase}`]:{padding:4,[`&.${Re.checked}`]:{transform:"translateX(16px)"}}}}]}),N0=o.de(Aa,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Re.input}`]:t.input},n.color!=="default"&&t[`color${o.me(n.color)}`]]}})(({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}),[`&.${Re.checked}`]:{transform:"translateX(20px)"},[`&.${Re.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Re.checked} + .${Re.track}`]:{opacity:.5},[`&.${Re.disabled} + .${Re.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Re.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:o.Fe(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${Re.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:o.Fe(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Re.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?o.gb(e.palette[t].main,.62):o.hb(e.palette[t].main,.55)}`}},[`&.${Re.checked} + .${Re.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),L0=o.de("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({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}`})),I0=o.de("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Bd=o.k(function(e,t){const n=o.Le({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:a=!1,size:l="medium",sx:s}=n,d=o.se(n,T0),c=o.hy({},n,{color:i,edge:a,size:l}),u=A0(c),p=o.u(I0,{className:u.thumb,ownerState:c});return o.u(E0,{className:o.ce(u.root,r),sx:s,ownerState:c,children:[o.u(N0,o.hy({type:"checkbox",icon:p,checkedIcon:p,ref:t,ownerState:c},d,{classes:o.hy({},u,{root:u.switchBase})})),o.u(L0,{className:u.track,ownerState:c})]})});process.env.NODE_ENV!=="production"&&(Bd.propTypes={checked:o.d.bool,checkedIcon:o.d.node,classes:o.d.object,className:o.d.string,color:o.d.oneOfType([o.d.oneOf(["default","primary","secondary","error","info","success","warning"]),o.d.string]),defaultChecked:o.d.bool,disabled:o.d.bool,disableRipple:o.d.bool,edge:o.d.oneOf(["end","start",!1]),icon:o.d.node,id:o.d.string,inputProps:o.d.object,inputRef:o.sa,onChange:o.d.func,required:o.d.bool,size:o.d.oneOfType([o.d.oneOf(["medium","small"]),o.d.string]),sx:o.d.oneOfType([o.d.arrayOf(o.d.oneOfType([o.d.func,o.d.object,o.d.bool])),o.d.func,o.d.object]),value:o.d.any});const Yd=o.uC(Bd,{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"}}}),qd=()=>{const{themeSettings:e}=o.DT(),{backgroundColor:t}=e.general,n=o.jAe(t,o.IAe);return o.Hi("div",{className:"csdk-flex csdk-justify-center","data-testid":"triangle-indicator",children:o.Hi("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]"})})},O0=e=>{const t=e,{color:n=o.c5}=t,r=oe(t,["color"]);return o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{children:o.Hi("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})}))},H0=e=>o.Fc("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:[o.Hi("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||o.c5}),o.Hi("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||o.c5}),o.Hi("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||o.c5})]})),R0=e=>o.Hi("svg",S(w({width:"22",height:"22",viewBox:"0 0 22 22",fill:"#b4b4b4",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Fc("g",{transform:"translate(5.000000,5.000000) scale(.70, 0.6)",children:[o.Hi("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"}),o.Hi("rect",{y:"10",x:"4",width:"12",height:"9",fill:"#dcdcdc"})]})})),Ud=e=>{const t=e.width||"24",n=e.height||"24";return o.Hi("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:o.Hi("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||o.c5})})},Ho=e=>{var t;return o.Hi("svg",S(w({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),{children:o.Hi("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"})}))},P0=e=>o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("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"})})),F0=e=>o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("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"})})),j0=e=>{var t;return o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("path",{fill:(t=e.color)!=null?t:"#5B6372",d:"M9 11h7v1H9v-1zm0 2h7v1H9v-1z"})}))},z0=e=>{var t;return o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("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"})}))},W0=e=>{var t;return o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("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"})}))},B0=e=>{var t;return o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("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"})}))},Y0=e=>{var t;return o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("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"})}))},q0=e=>{var t;return o.Hi("svg",S(w({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),{children:o.Hi("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"})}))},Yr=e=>e==="white",cs="rgb(240, 240, 240)",U0="rgba(0, 0, 0, 0.26)",V0=o.uC("button",{target:"e1pmmnp20",label:"CalendarButton"})("cursor:pointer;background-color:",({theme:e,variant:t,disabled:n})=>n?cs:Yr(t)?e.general.backgroundColor:o.OAe,";border:",({variant:e})=>Yr(e)?"1px solid rgb(110 115 125 / var(--tw-border-opacity))":"none",";color:",({theme:e,isActive:t,disabled:n})=>n?U0:t?e.general.primaryButtonTextColor:e.typography.primaryTextColor,";border-radius:0.375rem;&:hover{background-color:",({theme:e,variant:t,disabled:n})=>n?cs:o.jAe(Yr(t)?e.general.backgroundColor:o.OAe),";transition:0.2s;}transition:color 250ms;"),Q0=o.uC("label",{target:"e1pmmnp21",label:"CalendarLabel"})("color:",({theme:e,variant:t})=>Yr(t)?e.typography.primaryTextColor:e.general.primaryButtonTextColor,";"),Yi=e=>{const{variant:t="grey",label:n,isActive:r,theme:i}=e,a=`csdk-text-left csdk-w-[152px] csdk-bg-[${o.OAe}] csdk-text-[13px] csdk-outline-0 csdk-border csdk-border-transparent csdk-p-input csdk-h-6 csdk-rounded-[4px] `;return o.Fc("div",{className:"csdk-relative csdk-flex csdk-mr-[5px] csdk-cursor-pointer","aria-label":"DateRangeField",children:[n&&o.Hi(Q0,{htmlFor:e.id,className:"csdk-my-[5px] csdk-mr-[7px] csdk-text-[13px] csdk-leading-[18px]",theme:i,variant:t,children:n}),o.Hi("div",{className:"csdk-relative csdk-h-6",children:o.Fc(V0,S(w({},e),{variant:t,"aria-label":"DateRangeFieldButton",className:a+"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,o.Hi("div",{"aria-label":"DateRangeFieldIcon",className:"csdk-absolute csdk-right-[4px] csdk-top-1/2 csdk-transform -csdk-translate-y-1/2",children:o.Hi(Ud,{className:"csdk-flex csdk-text-text-active","aria-hidden":"true",iconColor:r?i.general.primaryButtonTextColor:i.typography.primaryTextColor})})]}))})]})};function ds(e){return e.substring(2).toLowerCase()}function G0(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Ft(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:a="onTouchEnd"}=e,l=o.F(!1),s=o.F(null),d=o.F(!1),c=o.F(!1);o._(()=>(setTimeout(()=>{d.current=!0},0),()=>{d.current=!1}),[]);const u=o.at(t.ref,s),p=o.ur(m=>{const g=c.current;c.current=!1;const b=o.nt(s.current);if(!d.current||!s.current||"clientX"in m&&G0(m,b))return;if(l.current){l.current=!1;return}let v;m.composedPath?v=m.composedPath().indexOf(s.current)>-1:v=!b.documentElement.contains(m.target)||s.current.contains(m.target),!v&&(n||!g)&&i(m)}),h=m=>g=>{c.current=!0;const b=t.props[m];b&&b(g)},f={ref:u};return a!==!1&&(f[a]=h(a)),o._(()=>{if(a!==!1){const m=ds(a),g=o.nt(s.current),b=()=>{l.current=!0};return g.addEventListener(m,p),g.addEventListener("touchmove",b),()=>{g.removeEventListener(m,p),g.removeEventListener("touchmove",b)}}},[p,a]),r!==!1&&(f[r]=h(r)),o._(()=>{if(r!==!1){const m=ds(r),g=o.nt(s.current);return g.addEventListener(m,p),()=>{g.removeEventListener(m,p)}}},[p,r]),o.u(o.m,{children:o.hn(t,f)})}process.env.NODE_ENV!=="production"&&(Ft.propTypes={children:o.xn.isRequired,disableReactTree:o.d.bool,mouseEvent:o.d.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:o.d.func.isRequired,touchEvent:o.d.oneOf(["onTouchEnd","onTouchStart",!1])});process.env.NODE_ENV!=="production"&&(Ft.propTypes=o.L0(Ft.propTypes));const qi=e=>{var t,n;const[r,i]=o.p(!1),{themeSettings:a}=o.DT(),l=()=>{i(!r)},s=o.F(null),d=(t=e.selectedIdx)!=null?t:null,c={fontFamily:a.typography.fontFamily,fontWeight:400,textTransform:"none",fontSize:"13px",color:a.typography.primaryTextColor},u=e.elements.map((p,h)=>o.Hi(o.Ll,{onClick:()=>{i(!1)},sx:S(w({},c),{minHeight:"unset","&:hover":{backgroundColor:o.jAe(a.general.backgroundColor)}}),disabled:e.disabled,children:p},h));return o.Fc(o.d5,{children:[o.Hi(o.Hi$1,{ref:s,onClick:l,className:"csdk-h-full csdk-border-solid csdk-border-input csdk-box-border",sx:S(w({},c),{border:"1px solid rgb(110 115 125 / var(--tw-border-opacity))",marginLeft:"5px",marginRight:"5px",borderRadius:"0.375rem",verticalAlign:"unset","&:hover":{backgroundColor:o.jAe(a.general.backgroundColor)}}),disabled:e.disabled,children:((n=e.icon)!=null?n:d!==null)?e.elements[d??0]:o.Hi("div",{children:"Select..."})}),o.Hi(o.Da,{open:r,anchorEl:s.current,placement:"bottom-start",sx:{backgroundColor:a.general.backgroundColor,border:"1px solid #c4c8cd",borderRadius:"4px",boxShadow:"0px 2px 2px rgba(0, 0, 0, 0.25)"},children:o.Hi(Ft,{onClickAway:()=>i(!1),children:o.Hi(o.D0,{autoFocusItem:r,children:u})})})]})},Fn=o.uC("div",{target:"e1f1pk9t0",label:"FilterContentDisplay"})("padding:12px;font-size:13px;"),xt=e=>e==="vertical",$0=o.uC("div",{target:"e1jswn0s0",label:"BackgroundFilterIcon"})(`background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpkZmY0YWNkMy1lYWYxLTQwNzItYTdlMy1hMjk3YzZjZTFlODUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTBFNDE0ODgwMjBFMTFFNThCQzJGRjdDRkI3RTQ1RUMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODRDMjI3QTIwMUU4MTFFNThCQzJGRjdDRkI3RTQ1RUMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpkZmY0YWNkMy1lYWYxLTQwNzItYTdlMy1hMjk3YzZjZTFlODUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6ZGZmNGFjZDMtZWFmMS00MDcyLWE3ZTMtYTI5N2M2Y2UxZTg1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+caeyqgAAAIdJREFUeNpi/P
|
|
9
9
|
center center no-repeat;float:left;margin:4px 0 0 0;width:16px;height:16px;display:inline-block;`),Ea="1px solid #dadada",us=215,Z0=o.uC("div",{target:"e1grm6eo0",label:"BaseContainer"})("width:min-content;max-width:100%;align-self:flex-start;box-sizing:border-box;",({shouldShowBorder:e})=>e&&o.Nu`
|
|
10
10
|
border: ${Ea};
|